1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
35 \use_default_options false
39 \maintain_unincluded_children false
42 InsetLayout Flex:MenuItem
51 \newcommand*{\menuitem}[1]{{\sffamily #1}}
54 # In case we need to do with sans...
55 #InsetLayout CharStyle:Code
60 #\renewcommand{\code}[1]{{\sffamily #1}}
65 \language_package default
70 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
79 \default_output_format default
81 \bibtex_command default
82 \index_command default
86 \pdf_title "LyX Configuration Manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX-documentation Customization"
89 \pdf_keywords "LyX, documentation, customization"
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen true
93 \pdf_bookmarksopenlevel 1
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \use_package amsmath 0
103 \use_package amssymb 0
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 0
108 \use_package stackrel 0
109 \use_package stmaryrd 0
110 \use_package undertilde 0
112 \cite_engine_type numerical
116 \paperorientation portrait
131 \paragraph_separation indent
132 \paragraph_indentation default
133 \quotes_language english
136 \paperpagestyle headings
137 \tracking_changes true
138 \output_changes false
142 \author -712698321 "Jürgen Spitzmüller"
143 \author -195340706 "Georg Baum"
145 \author 155139281 "Jrgen Spitzmller"
146 \author 1082167584 "Kayvan Sylvan" kayvan@sylvan.com
147 \author 1414654397 "Richard Heck"
148 \author 2090807402 "usti"
154 Customizing LyX: Features for the Advanced User
162 \begin_layout Plain Layout
164 If you have comments or error corrections, please send them to the LyX Documenta
166 \begin_inset CommandInset href
168 target "lyx-docs@lists.lyx.org"
175 \begin_inset Quotes eld
179 \begin_inset Quotes erd
182 in the subject header, and please cc the current maintainer of this file,
183 Richard Heck <rgheck@comcast.net>.
189 \begin_inset Newline newline
193 \begin_inset Newline newline
197 \change_deleted -712698321 1357054389
199 \change_inserted -712698321 1357054389
205 \begin_layout Standard
206 \begin_inset CommandInset toc
207 LatexCommand tableofcontents
214 \begin_layout Standard
215 \begin_inset Note Note
218 \begin_layout Plain Layout
219 Please use change tracking when modifying this document.
220 This makes it easier for our translators to recognize things that have
221 been changed, and it helps the maintainer keep up-to-date with what's been
230 \begin_layout Chapter
234 \begin_layout Standard
235 This manual covers the customization features present in LyX.
236 In it, we discuss issues like keyboard shortcuts, screen previewing options,
237 printer options, sending commands to LyX via the LyX Server, internationalizati
238 on, installing new LaTeX classes and LyX layouts, etc.
239 We can't possibly hope to touch on everything you can change—our developers
240 add new features faster than we can document them—but we will explain the
241 most common customizations and hopefully point you in the right direction
242 for some of the more obscure ones.
245 \begin_layout Standard
246 \begin_inset Branch OutDated
249 \begin_layout Standard
250 Information from previous versions of this document that now seems to be
251 outdated is contained in the OutDated branch of this document.
252 By default, this information will not appear in the LaTeX output.
260 \begin_layout Chapter
261 LyX configuration files
264 \begin_layout Standard
265 This chapter aims to help you to find your way through the LyX configuration
267 Before continuing to read this chapter, you should find out where your
268 LyX library and user directories are by using
269 \begin_inset Flex MenuItem
272 \begin_layout Plain Layout
273 Help\SpecialChar \menuseparator
284 The library directory is the place where LyX places its system-wide configurati
285 on files; the user directory is where you can place your modified versions.
286 We will call the former
287 \begin_inset Flex Code
290 \begin_layout Plain Layout
297 \begin_inset Flex MenuItem
300 \begin_layout Plain Layout
306 in the remainder of this document.
310 \begin_layout Section
312 \begin_inset Flex Code
315 \begin_layout Plain Layout
324 \begin_layout Standard
325 \begin_inset Flex Code
328 \begin_layout Plain Layout
334 and its sub-directories contain a number of files and that can be used
335 to customize LyX's behavior.
336 You can change many of these files from within LyX itself through the
337 \begin_inset Flex MenuItem
340 \begin_layout Plain Layout
341 Tools\SpecialChar \menuseparator
348 Most customization that you will want to do in LyX is possible through
350 However, many other inner aspects of LyX can be customized by modifying
352 \begin_inset Flex Code
355 \begin_layout Plain Layout
362 These files fall in different categories, described in the following subsection
366 \begin_layout Subsection
367 Automatically generated files
370 \begin_layout Standard
371 The files, which are to be found in
372 \begin_inset Flex MenuItem
375 \begin_layout Plain Layout
381 , are generated when you configure LyX.
382 They contain various default values that are guessed by inspection.
383 In general, it is not a good idea to modify them, since they might be overwritt
387 \begin_layout Labeling
388 \labelwidthstring 00.00.0000
389 \begin_inset Flex Code
392 \begin_layout Plain Layout
398 contains defaults for various commands.
401 \begin_layout Labeling
402 \labelwidthstring 00.00.0000
403 \begin_inset Flex Code
406 \begin_layout Plain Layout
412 contains the list of packages that have been recognized by LyX.
413 It is currently unused by the LyX program itself, but the information extracted
414 , and more, is made available with
415 \begin_inset Flex MenuItem
418 \begin_layout Plain Layout
419 Help\SpecialChar \menuseparator
432 \begin_layout Labeling
433 \labelwidthstring 00.00.0000
434 \begin_inset Flex Code
437 \begin_layout Plain Layout
443 the list of text classes that have been found in your
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
453 directories, along with the associated LaTeX document class and their descripti
457 \begin_layout Labeling
458 \labelwidthstring 00.00.0000
459 \begin_inset Flex Code
462 \begin_layout Plain Layout
468 the list of layout modules found in your
469 \begin_inset Flex Code
472 \begin_layout Plain Layout
481 \begin_layout Labeling
482 \labelwidthstring 00.00.0000
483 \begin_inset Flex Code
486 \begin_layout Plain Layout
492 lists of various sorts of LaTeX-related files found on your system
495 \begin_layout Labeling
496 \labelwidthstring 00.00.0000
497 \begin_inset Flex Code
500 \begin_layout Plain Layout
506 is automatically generated during configuration from the file
507 \begin_inset Flex Code
510 \begin_layout Plain Layout
517 It contains information on your LaTeX configuration.
520 \begin_layout Subsection
524 \begin_layout Standard
525 These directories are duplicated between
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
536 \begin_inset Flex Code
539 \begin_layout Plain Layout
546 If a particular files exists in both places, the one in
547 \begin_inset Flex Code
550 \begin_layout Plain Layout
559 \begin_layout Labeling
560 \labelwidthstring 00.00.0000
561 \begin_inset Flex Code
564 \begin_layout Plain Layout
570 this directory contains files with the extension
571 \begin_inset Flex Code
574 \begin_layout Plain Layout
580 that define the keybindings used in LyX.
581 If there exists an internationalized version of the bind file named
582 \begin_inset Flex Code
585 \begin_layout Plain Layout
591 , that will be used first.
594 \begin_layout Labeling
595 \labelwidthstring 00.00.0000
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
605 contains graphics files that can be included in documents.
609 \begin_layout Labeling
610 \labelwidthstring 00.00.0000
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 contains LyX documentation files (including the one you are currently reading).
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
631 deserves special attention, as noted above.
632 The internationalized help docs are in subdirectories
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
643 \begin_inset Quotes eld
647 \begin_inset Quotes erd
650 is the ISO language code.
656 \begin_inset CommandInset ref
658 reference "cha:Internationalizing-LyX"
665 \begin_layout Labeling
666 \labelwidthstring 00.00.0000
667 \begin_inset Flex Code
670 \begin_layout Plain Layout
676 contains example files that explain how to use some features.
677 In the file browser, press the
678 \begin_inset Flex MenuItem
681 \begin_layout Plain Layout
690 \begin_layout Labeling
691 \labelwidthstring 00.00.0000
692 \begin_inset Flex Code
695 \begin_layout Plain Layout
701 contains image files that are used by the
702 \begin_inset Flex MenuItem
705 \begin_layout Plain Layout
712 In addition, it also contains the individual icons used in the toolbar
713 and the banners that can be shown when LyX is launched.
716 \begin_layout Labeling
717 \labelwidthstring 00.00.0000
718 \begin_inset Flex Code
721 \begin_layout Plain Layout
727 contains keyboard keymapping files.
733 \begin_inset CommandInset ref
735 reference "sec:International-Keymap-Stuff"
742 \begin_layout Labeling
743 \labelwidthstring 00.00.0000
744 \begin_inset Flex Code
747 \begin_layout Plain Layout
753 contains the text class and module files described in Chapter
758 \begin_inset CommandInset ref
760 reference "cha:Installing-New-Document"
767 \begin_layout Labeling
768 \labelwidthstring 00.00.0000
769 \begin_inset Flex Code
772 \begin_layout Plain Layout
779 \begin_inset Flex Code
782 \begin_layout Plain Layout
788 Python scripts used to convert between LyX versions.
789 These can be run from the command line if, say, you want to batch-convert
793 \begin_layout Labeling
794 \labelwidthstring 00.00.0000
795 \begin_inset Flex Code
798 \begin_layout Plain Layout
804 contains some files that demonstrate the capabilities of the
805 \begin_inset Flex MenuItem
808 \begin_layout Plain Layout
819 Also contains some scripts used by LyX itself.
822 \begin_layout Labeling
823 \labelwidthstring 00.00.0000
824 \begin_inset Flex Code
827 \begin_layout Plain Layout
833 contains the standard LyX template files described in Chapter
838 \begin_inset CommandInset ref
840 reference "sub:Creating-Templates"
847 \begin_layout Labeling
848 \labelwidthstring 00.00.0000
849 \begin_inset Flex Code
852 \begin_layout Plain Layout
858 contains files with the extension
859 \begin_inset Flex Code
862 \begin_layout Plain Layout
868 that define the user interface to LyX.
869 That is, the files define which items appear in which menus and the items
870 appearing on the toolbar.
873 \begin_layout Subsection
874 Files you don't want to modify
877 \begin_layout Standard
878 These files are used internally by LyX and you generally do not need to
879 modify them unless you are a developer.
882 \begin_layout Labeling
883 \labelwidthstring 00.00.0000
884 \begin_inset Flex Code
887 \begin_layout Plain Layout
893 this file contains the list of LyX developers.
894 The contents are displayed with the menu entry
895 \begin_inset Flex MenuItem
898 \begin_layout Plain Layout
899 Help\SpecialChar \menuseparator
912 \begin_layout Labeling
913 \labelwidthstring 00.00.0000
914 \begin_inset Flex Code
917 \begin_layout Plain Layout
923 this is a LaTeX script used during the configuration process.
927 \begin_layout Labeling
928 \labelwidthstring 00.00.0000
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
938 this is the script that is used to re-configure LyX.
939 It creates configuration files in the directory it was run from.
942 \begin_layout Subsection
943 Other files needing a line or two
944 \change_deleted -712698321 1357054454
946 \change_inserted -712698321 1357054454
947 \SpecialChar \ldots{}
953 \begin_layout Labeling
954 \labelwidthstring 00.00.0000
955 \begin_inset Flex Code
958 \begin_layout Plain Layout
964 this contains tables describing how different character encodings can be
968 \begin_layout Labeling
969 \labelwidthstring 00.00.0000
970 \begin_inset Flex Code
973 \begin_layout Plain Layout
979 this file contains the templates available to the new
980 \begin_inset Flex MenuItem
983 \begin_layout Plain Layout
996 \begin_layout Labeling
997 \labelwidthstring 00.00.0000
998 \begin_inset Flex Code
1001 \begin_layout Plain Layout
1007 this file contains a list of all the languages currently supported by LyX.
1008 \change_inserted -712698321 1357054565
1012 \begin_layout Labeling
1013 \labelwidthstring 00.00.0000
1015 \change_inserted -712698321 1357054669
1016 \begin_inset Flex Code
1019 \begin_layout Plain Layout
1021 \change_inserted -712698321 1357054669
1029 contains information about the supported fonts.
1030 \change_inserted -195340706 1334775793
1034 \begin_layout Labeling
1035 \labelwidthstring 00.00.0000
1037 \change_inserted -195340706 1334775793
1038 \begin_inset Flex Code
1041 \begin_layout Plain Layout
1043 \change_inserted -195340706 1334775793
1049 this file contains translations for internationalized paragraph styles
1051 \begin_inset space \thinspace{}
1055 \begin_inset CommandInset ref
1057 reference "sub:I18n"
1062 \change_inserted -712698321 1357054494
1066 \begin_layout Labeling
1067 \labelwidthstring 00.00.0000
1069 \change_inserted -712698321 1357054554
1070 \begin_inset Flex Code
1073 \begin_layout Plain Layout
1075 \change_inserted -712698321 1357054508
1083 this file contains information about unicode-encoded glyphs and the way
1084 they are supported by LyX via LaTeX.
1089 \begin_layout Section
1090 Your local configuration directory
1093 \begin_layout Standard
1094 Even if you are using LyX as an unprivileged user, you might want to change
1095 LyX configuration for your own use.
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1106 directory contains all your personal configuration files.
1107 This is the directory described as
1108 \begin_inset Quotes eld
1112 \begin_inset Quotes erd
1116 \begin_inset Flex MenuItem
1119 \begin_layout Plain Layout
1120 Help\SpecialChar \menuseparator
1122 \begin_inset space ~
1131 This directory is used as a mirror of
1132 \begin_inset Flex Code
1135 \begin_layout Plain Layout
1141 , which means that every file in
1142 \begin_inset Flex Code
1145 \begin_layout Plain Layout
1151 is a replacement for the corresponding file in
1152 \begin_inset Flex Code
1155 \begin_layout Plain Layout
1162 Any configuration file described in the above sections can be placed either
1163 in the system-wide directory, in which case it will affect all users, or
1164 in your local directory for your own use.
1167 \begin_layout Standard
1168 To make things clearer, let's provide a few examples:
1171 \begin_layout Itemize
1172 The preferences set in the
1173 \begin_inset Flex MenuItem
1176 \begin_layout Plain Layout
1177 Tools\SpecialChar \menuseparator
1183 dialog are saved to a file
1184 \begin_inset Flex Code
1187 \begin_layout Plain Layout
1194 \begin_inset Flex Code
1197 \begin_layout Plain Layout
1206 \begin_layout Itemize
1207 When you reconfigure using
1208 \begin_inset Flex MenuItem
1211 \begin_layout Plain Layout
1212 Tools\SpecialChar \menuseparator
1219 \begin_inset Flex Code
1222 \begin_layout Plain Layout
1228 script, and the resulting files are written in your local configuration
1230 This means that any additional text class file that you might have added
1232 \begin_inset Flex Code
1235 \begin_layout Plain Layout
1241 will be added to the list of classes in the
1242 \begin_inset Flex MenuItem
1245 \begin_layout Plain Layout
1246 Document\SpecialChar \menuseparator
1255 \begin_layout Itemize
1256 If you get some updated documentation from LyX ftp site and cannot install
1257 it because you do not have sysadmin rights on your system, you can just
1259 \begin_inset Flex Code
1262 \begin_layout Plain Layout
1268 and the items in the
1269 \begin_inset Flex MenuItem
1272 \begin_layout Plain Layout
1278 menu will open them!
1281 \begin_layout Section
1282 Running LyX with multiple configurations
1285 \begin_layout Standard
1286 The configuration freedom of the local configuration directory may not suffice
1287 if you want to have more than one configuration at your disposal.
1288 For example, you may want to be use different key bindings or printer settings
1290 You can achieve this by having several such directories.
1291 You then specify which directory to use at run-time.
1294 \begin_layout Standard
1295 Invoking LyX with the command line switch
1296 \begin_inset Flex Code
1299 \begin_layout Plain Layout
1309 instructs the program to read the configuration from that directory, and
1310 not from the default directory.
1311 (You can determine the default directory by running LyX without the
1312 \begin_inset Flex Code
1315 \begin_layout Plain Layout
1321 switch.) If the specified directory does not exist, LyX offers to create
1322 it for you, just like it does for the default directory on the first time
1323 you run the program.
1324 You can modify the configuration options in this additional user directory
1325 exactly as you would for the default directory.
1326 These directories are completely independent (but read on).
1327 Note that setting the environment variable
1328 \begin_inset Flex Code
1331 \begin_layout Plain Layout
1337 to some value has exactly the same effect.
1340 \begin_layout Standard
1341 Having several configurations also requires more maintenance: if you want
1342 to add a new layout to
1343 \begin_inset Flex Code
1346 \begin_layout Plain Layout
1352 which you want available from all your configurations, you must add it
1353 to each directory separately.
1354 You can avoid this with the following trick: after LyX creates the additional
1355 directory, most of the subdirectories (see above) are empty.
1356 If you want the new configuration to mirror an existing one, replace the
1357 empty subdirectory with a symbolic link to the matching subdirectory in
1358 the existing configuration.
1360 \begin_inset Flex Code
1363 \begin_layout Plain Layout
1369 subdirectory, however, since it contains a file written by the configuration
1370 script (also accessible through
1371 \begin_inset Flex MenuItem
1374 \begin_layout Plain Layout
1375 Tools\SpecialChar \menuseparator
1381 ) which is configuration-specific.
1384 \begin_layout Chapter
1385 The Preferences dialog
1388 \begin_layout Standard
1389 All options of the preferences dialog are described in the Appendix
1391 The Preferences Dialog
1398 For some options you might find here more details.
1401 \begin_layout Section
1403 \begin_inset CommandInset label
1412 \begin_layout Standard
1413 The first step is to define your file formats if they are not already defined.
1415 \begin_inset Flex MenuItem
1418 \begin_layout Plain Layout
1419 Tools\SpecialChar \menuseparator
1427 \begin_inset Flex MenuItem
1430 \begin_layout Plain Layout
1431 File Handling\SpecialChar \menuseparator
1438 \begin_inset Flex MenuItem
1441 \begin_layout Plain Layout
1442 New\SpecialChar \ldots{}
1448 button to define your new format.
1450 \begin_inset Flex MenuItem
1453 \begin_layout Plain Layout
1459 field contains the name used to identify the format in the GUI.
1461 \begin_inset Flex MenuItem
1464 \begin_layout Plain Layout
1470 is used to identify the format internally.
1471 You will also need to enter a file extension.
1472 These are all required.
1474 \begin_inset Flex MenuItem
1477 \begin_layout Plain Layout
1483 field is used to provide a keyboard shortcut on the menus.
1484 (For example, pressing
1485 \begin_inset Flex MenuItem
1488 \begin_layout Plain Layout
1495 \begin_inset Flex MenuItem
1498 \begin_layout Plain Layout
1499 View\SpecialChar \menuseparator
1500 View (Other Formats)\SpecialChar \menuseparator
1509 \begin_layout Standard
1511 \begin_inset Flex MenuItem
1514 \begin_layout Plain Layout
1521 \begin_inset Flex MenuItem
1524 \begin_layout Plain Layout
1531 For example, you might want to use
1532 \begin_inset Flex MenuItem
1535 \begin_layout Plain Layout
1541 to view PostScript files.
1542 You can enter the command needed to start the program in the corresponding
1544 In defining this command, you can use the four variables listed in the
1546 The viewer is launched when you view an image in LyX or use the
1547 \begin_inset Flex MenuItem
1550 \begin_layout Plain Layout
1557 The editor is for example launched when you right-click on an image and
1559 \begin_inset Flex MenuItem
1562 \begin_layout Plain Layout
1568 in the appearing context menu.
1571 \begin_layout Standard
1573 \change_inserted -195340706 1329851811
1575 \begin_inset Flex MenuItem
1578 \begin_layout Plain Layout
1584 type of a format is optional, but if it is specified, it must be unique
1586 It is used to detect files of this format from the file contents.
1587 For some important file formats there is no MIME type officially registered
1589 \begin_inset CommandInset href
1592 target "http://www.iana.org/assignments/media-types/"
1597 Therefore LyX uses the extended list of MIME types as specified by
1598 \begin_inset CommandInset href
1600 name "freedesktop.org"
1601 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1608 \begin_layout Standard
1610 \begin_inset Flex MenuItem
1613 \begin_layout Plain Layout
1619 option tells LyX that a format is suitable for document export.
1620 If this is set and if a suitable conversion route exists (see sec.
1621 \begin_inset space \thinspace{}
1625 \begin_inset CommandInset ref
1627 reference "sec:Converters"
1631 ), the format will appear in the
1632 \begin_inset Flex MenuItem
1635 \begin_layout Plain Layout
1636 File\SpecialChar \menuseparator
1643 The format will also appear in the
1644 \begin_inset Flex MenuItem
1647 \begin_layout Plain Layout
1653 menu if a viewer is specified for the format.
1654 Pure image formats, such as
1655 \begin_inset Flex Code
1658 \begin_layout Plain Layout
1664 , should not use this option.
1665 Formats that can both represent vector graphics and documents like
1666 \begin_inset Flex Code
1669 \begin_layout Plain Layout
1678 \begin_layout Standard
1680 \begin_inset Flex MenuItem
1683 \begin_layout Plain Layout
1684 Vector graphics format
1689 tells LyX that a format can contain vector graphics.
1690 This information is used to determine the target format of included graphics
1692 \begin_inset Flex MenuItem
1695 \begin_layout Plain Layout
1702 Included graphics may need to be converted to either
1703 \begin_inset Flex MenuItem
1706 \begin_layout Plain Layout
1713 \begin_inset Flex MenuItem
1716 \begin_layout Plain Layout
1723 \begin_inset Flex MenuItem
1726 \begin_layout Plain Layout
1733 \begin_inset Flex MenuItem
1736 \begin_layout Plain Layout
1742 cannot handle other image formats.
1743 If an included graphic is not already in
1744 \begin_inset Flex MenuItem
1747 \begin_layout Plain Layout
1754 \begin_inset Flex MenuItem
1757 \begin_layout Plain Layout
1764 \begin_inset Flex MenuItem
1767 \begin_layout Plain Layout
1773 format, it is converted to
1774 \begin_inset Flex MenuItem
1777 \begin_layout Plain Layout
1783 if the vector format option is set, and otherwise to
1784 \begin_inset Flex MenuItem
1787 \begin_layout Plain Layout
1796 \begin_layout Section
1800 \begin_layout Standard
1801 Since all conversions from one format to another take place in LyX's temporary
1802 directory, it is sometimes necessary to modify a file before copying it
1803 to the temporary directory in order that the conversion may be performed.
1807 \begin_layout Plain Layout
1808 For example, the file may refer to other files—images, for example—using
1809 relative file names, and these may become invalid when the file is copied
1810 to the temporary directory.
1815 This is done by a Copier: It copies a file to (or from) the temporary directory
1816 and may modify it in the process.
1819 \begin_layout Standard
1820 The definitions of the copiers may use four variables:
1823 \begin_layout Labeling
1824 \labelwidthstring 00.00.0000
1825 \begin_inset Flex Code
1828 \begin_layout Plain Layout
1834 The LyX system directory (e.
1835 \begin_inset space \thinspace{}
1839 \begin_inset space \space{}
1843 \begin_inset Flex MenuItem
1846 \begin_layout Plain Layout
1855 \begin_layout Labeling
1856 \labelwidthstring 00.00.0000
1857 \begin_inset Flex Code
1860 \begin_layout Plain Layout
1869 \begin_layout Labeling
1870 \labelwidthstring 00.00.0000
1871 \begin_inset Flex Code
1874 \begin_layout Plain Layout
1881 \change_inserted 1082167584 1348453985
1885 \begin_layout Labeling
1886 \labelwidthstring 00.00.0000
1888 \change_inserted 1082167584 1348453986
1889 $$b The base name (without filename extension) in the LyX temporary directory
1892 \begin_layout Labeling
1893 \labelwidthstring 00.00.0000
1895 \change_inserted 1082167584 1348453986
1896 $$p The full directory path of the LyX temporary directory
1899 \begin_layout Labeling
1900 \labelwidthstring 00.00.0000
1902 \change_inserted 1082167584 1348453986
1903 $$r The full pathname to the original LyX file being processed
1906 \begin_layout Labeling
1907 \labelwidthstring 00.00.0000
1909 \change_inserted 1082167584 1348453986
1910 $$f The filename (without any directory path) of the LyX file.
1913 \begin_layout Labeling
1914 \labelwidthstring 00.00.0000
1915 \begin_inset Flex Code
1918 \begin_layout Plain Layout
1925 \change_inserted 1082167584 1348453720
1929 \begin_layout Standard
1930 The latter should be the filename as it would be used in a LaTeX's
1937 It is relevant only when exporting files suitable for such inclusion.
1940 \begin_layout Standard
1941 Copiers can be used to do almost anything with output files.
1942 For example, suppose you want generated pdf files to be copied to a special
1944 \begin_inset Flex Code
1947 \begin_layout Plain Layout
1954 Then you could write a shell script such as this one:
1957 \begin_layout Standard
1958 \begin_inset listings
1962 \begin_layout Plain Layout
1967 \begin_layout Plain Layout
1972 \begin_layout Plain Layout
1974 TOFILE=`basename $2`
1977 \begin_layout Plain Layout
1979 cp $FROMFILE /home/you/pdf/$TOFILE
1984 Save it in your local LyX directory—say,
1985 \begin_inset Flex Code
1988 \begin_layout Plain Layout
1989 /home/you/.lyx/scripts/pdfcopier.sh
1994 —and make it executable, if you need to do so on your platform.
1996 \begin_inset Flex MenuItem
1999 \begin_layout Plain Layout
2000 Tools\SpecialChar \menuseparator
2006 dialog, select under
2007 \begin_inset Flex MenuItem
2010 \begin_layout Plain Layout
2011 File Handling\SpecialChar \menuseparator
2018 \begin_inset Flex MenuItem
2021 \begin_layout Plain Layout
2027 format—or one of the other pdf formats—and enter
2028 \begin_inset Flex Code
2031 \begin_layout Plain Layout
2032 pdfcopier.sh $$i $$o
2038 \begin_inset Flex MenuItem
2041 \begin_layout Plain Layout
2051 \begin_layout Standard
2052 Copiers are used by LyX in various of its own conversions.
2053 For example, if appropriate programs are found, LyX will automatically
2054 install copiers for the
2055 \begin_inset Flex MenuItem
2058 \begin_layout Plain Layout
2065 \begin_inset Flex MenuItem
2068 \begin_layout Plain Layout
2070 \begin_inset space ~
2079 When these formats are exported, the copier sees that not just the main
2080 HTML file but various associated files (style files, images, etc.) are also
2082 All these files are written to a subdirectory of the directory in which
2083 the original LyX file was found.
2087 \begin_layout Plain Layout
2088 This copier can be customized.
2090 \begin_inset Quotes eld
2094 \begin_inset Quotes erd
2097 argument takes a comma-separated list of extensions to be copied; if it
2098 is omitted, all files will be copied.
2100 \begin_inset Quotes eld
2104 \begin_inset Quotes erd
2107 argument determines the extension added to the generated directory.
2109 \begin_inset Quotes eld
2113 \begin_inset Flex MenuItem
2116 \begin_layout Plain Layout
2123 \begin_inset Quotes erd
2126 , so HTML generated from
2127 \begin_inset Flex MenuItem
2130 \begin_layout Plain Layout
2131 /path/to/filename.lyx
2137 \begin_inset Flex MenuItem
2140 \begin_layout Plain Layout
2141 /path/to/filename.html.LyXconv
2155 \begin_layout Section
2157 \begin_inset CommandInset label
2159 name "sec:Converters"
2166 \begin_layout Standard
2167 You can define your own Converters to convert files between different formats.
2169 \begin_inset Flex MenuItem
2172 \begin_layout Plain Layout
2173 Tools\SpecialChar \menuseparator
2174 Preferences\SpecialChar \menuseparator
2175 File Handling\SpecialChar \menuseparator
2184 \begin_layout Standard
2185 To define a new converter, select the
2186 \begin_inset Flex MenuItem
2189 \begin_layout Plain Layout
2191 \begin_inset space ~
2200 \begin_inset Flex MenuItem
2203 \begin_layout Plain Layout
2205 \begin_inset space ~
2213 from the drop-down lists, enter the command needed for the conversion,
2215 \begin_inset Flex MenuItem
2218 \begin_layout Plain Layout
2225 Several variables can be used in the definition of converters:
2228 \begin_layout Labeling
2229 \labelwidthstring 00.00.0000
2230 \begin_inset Flex Code
2233 \begin_layout Plain Layout
2239 The LyX system directory
2242 \begin_layout Labeling
2243 \labelwidthstring 00.00.0000
2244 \begin_inset Flex Code
2247 \begin_layout Plain Layout
2256 \begin_layout Labeling
2257 \labelwidthstring 00.00.0000
2258 \begin_inset Flex Code
2261 \begin_layout Plain Layout
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex Code
2275 \begin_layout Plain Layout
2281 The base filename of the input file (i.
2282 \begin_inset space \thinspace{}
2285 g., without the extension)
2288 \begin_layout Labeling
2289 \labelwidthstring 00.00.0000
2290 \begin_inset Flex Code
2293 \begin_layout Plain Layout
2299 The path to the input file
2302 \begin_layout Labeling
2303 \labelwidthstring 00.00.0000
2304 \begin_inset Flex Code
2307 \begin_layout Plain Layout
2313 The path to the original input file (this is different from $$p when a
2314 chain of converters is called)
2317 \begin_layout Labeling
2318 \labelwidthstring 00.00.0000
2319 \begin_inset Flex Code
2322 \begin_layout Plain Layout
2328 The iconv name for the encoding of the document.
2331 \begin_layout Standard
2333 \begin_inset Flex MenuItem
2336 \begin_layout Plain Layout
2338 \begin_inset space ~
2346 field you can enter the following flags, separated by commas:
2349 \begin_layout Labeling
2350 \labelwidthstring 00.00.0000
2351 \begin_inset Flex Code
2354 \begin_layout Plain Layout
2360 This converter runs some form of LaTeX.
2361 This will make LyX's LaTeX error logs available.
2364 \begin_layout Labeling
2365 \labelwidthstring 00.00.0000
2366 \begin_inset Flex Code
2369 \begin_layout Plain Layout
2376 \begin_inset Flex MenuItem
2379 \begin_layout Plain Layout
2385 file for the conversion.
2386 \change_inserted 1414654397 1337693117
2390 \begin_layout Labeling
2391 \labelwidthstring 00.00.0000
2393 \change_inserted 1414654397 1337693188
2394 \begin_inset Flex Code
2397 \begin_layout Plain Layout
2399 \change_inserted 1414654397 1337693129
2408 \begin_inset Quotes eld
2412 \begin_inset Quotes erd
2415 file from the backend, which in practice means a LaTeX file like the one
2416 we would export, without
2417 \begin_inset Flex Code
2420 \begin_layout Plain Layout
2422 \change_inserted 1414654397 1337693184
2435 \begin_layout Labeling
2436 \labelwidthstring 00.00.0000
2437 \begin_inset Flex Code
2440 \begin_layout Plain Layout
2449 \begin_layout Standard
2450 The following three flags are not really flags at all because they take
2452 \begin_inset Flex MenuItem
2455 \begin_layout Plain Layout
2457 \begin_inset space ~
2461 \begin_inset space ~
2472 \begin_layout Labeling
2473 \labelwidthstring 00.00.0000
2474 \begin_inset Flex Code
2477 \begin_layout Plain Layout
2483 If set, the converter's standard error will be redirected to a file
2484 \begin_inset Flex Code
2487 \begin_layout Plain Layout
2493 , and the script given as argument will be run as:
2494 \begin_inset Flex Code
2497 \begin_layout Plain Layout
2498 script < infile.out > infile.log
2504 The argument may contain
2505 \begin_inset Flex Code
2508 \begin_layout Plain Layout
2517 \begin_layout Labeling
2518 \labelwidthstring 00.00.0000
2519 \begin_inset Flex Code
2522 \begin_layout Plain Layout
2528 The name of the directory in which the converter will dump the generated
2530 LyX will not create this directory, and it does not copy anything into
2531 it, though it will copy this directory to the destination.
2532 The argument may contain
2533 \begin_inset Flex Code
2536 \begin_layout Plain Layout
2542 , which will be replaced by the base name of the input and output files,
2543 respectively, when the directory is copied.
2544 \begin_inset Newline newline
2547 Note that resultdir and usetempdir make no sense together.
2548 The latter will be ignored if the former is given.
2551 \begin_layout Labeling
2552 \labelwidthstring 00.00.0000
2553 \begin_inset Flex Code
2556 \begin_layout Plain Layout
2562 Determines the output file name and may, contain
2563 \begin_inset Flex Code
2566 \begin_layout Plain Layout
2573 Sensible only with resultdir and optional even then; if not given, it defaults
2577 \begin_layout Standard
2578 None of these last three are presently used in any of the converters that
2579 are installed with LyX.
2583 \begin_layout Standard
2584 You do not have to define converters for all formats between which you want
2586 For example, you will note that there is no `LyX to PostScript' converter,
2587 but LyX will export PostScript.
2588 It does so by first creating a LaTeX file (no converter needs to be defined
2589 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2590 and finally converting the resulting DVI file to PostScript.
2591 LyX finds such `chains' of converters automatically, and it will always
2592 choose the shortest possible chain.
2593 You can, though, still define multiple conversion methods between file
2595 For example, the standard LyX configuration provides three ways to convert
2596 LaTeX to PDF: Directly, using
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2606 ; via (DVI and) PostScript, using
2607 \begin_inset Flex MenuItem
2610 \begin_layout Plain Layout
2617 \begin_inset Flex MenuItem
2620 \begin_layout Plain Layout
2627 To define such alternate chains, you must define multiple target `file
2628 formats', as described in section
2629 \begin_inset CommandInset ref
2631 reference "sec:Formats"
2636 For example, in the standard configuration, the formats named
2637 \begin_inset Flex MenuItem
2640 \begin_layout Plain Layout
2647 \begin_inset Flex MenuItem
2650 \begin_layout Plain Layout
2657 \begin_inset Flex MenuItem
2660 \begin_layout Plain Layout
2666 are defined, all of which share the extension
2667 \begin_inset Flex MenuItem
2670 \begin_layout Plain Layout
2676 , and which correspond to the conversion methods just mentioned.
2679 \begin_layout Chapter
2680 Internationalizing LyX
2681 \begin_inset CommandInset label
2683 name "cha:Internationalizing-LyX"
2690 \begin_layout Standard
2691 LyX supports using a translated interface.
2692 Last time we checked, LyX provided text in thirty languages.
2693 The language of choice is called your
2698 (For further reading on locale settings, see also the documentation for
2699 locale that comes with your operating system.
2700 For Linux, the manual page for
2701 \begin_inset Flex Code
2704 \begin_layout Plain Layout
2710 could be a good place to start).
2713 \begin_layout Standard
2714 Notice that these translations will work, but do contain a few flaws.
2715 In particular, all dialogs have been designed with the English text in
2716 mind, which means that some of the translated text will be too large to
2717 fit within the space allocated.
2718 This is only a display problem and will not cause any harm.
2719 Also, you will find that some of the translations do not define shortcut
2720 keys for everything.
2721 Sometimes, there are simply not enough free letters to do it.
2722 Other times, the translator just hasn't got around to doing it yet.
2723 Our localization team, which you may wish to join,
2727 \begin_layout Plain Layout
2728 If you are a fluent speaker of a language other than English, joining these
2729 teams is a great way to give back to the LyX community!
2734 will of course try to fix these shortcomings in future versions of LyX.
2737 \begin_layout Section
2741 \begin_layout Subsection
2742 Translating the graphical user interface (text messages).
2745 \begin_layout Standard
2747 \begin_inset Flex Code
2750 \begin_layout Plain Layout
2756 library to handle the internationalization of the interface.
2757 To have LyX speak your favorite language in all menus and dialogs, you
2759 \begin_inset Flex Code
2762 \begin_layout Plain Layout
2768 -file for that language.
2769 When this is available, you'll have to generate a
2770 \begin_inset Flex Code
2773 \begin_layout Plain Layout
2779 -file from it and install the
2780 \begin_inset Flex Code
2783 \begin_layout Plain Layout
2790 The process of doing all of this is explained in the documentation for
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2802 It is possible to do this just for yourself, but if you're going to do
2803 it, you might as well share the results of your labors with the rest of
2805 Send a message to the LyX developers' list for more information about how
2809 \begin_layout Standard
2810 In short, this is what you should do (xx denotes the language code):
2813 \begin_layout Itemize
2814 Check out the LyX source code.
2816 \begin_inset CommandInset href
2818 name "information on the web"
2819 target "http://www.lyx.org/HowToUseSVN"
2826 \begin_layout Itemize
2828 \begin_inset Flex Code
2831 \begin_layout Plain Layout
2837 to the folder of the
2838 \begin_inset Flex Code
2841 \begin_layout Plain Layout
2849 \begin_inset Flex Code
2852 \begin_layout Plain Layout
2860 \begin_inset Flex Code
2863 \begin_layout Plain Layout
2869 doesn't exist anywhere, it can be remade with the console command
2870 \begin_inset Flex Code
2873 \begin_layout Plain Layout
2879 in that directory, or you can use an existing po-file for some other language
2883 \begin_layout Itemize
2885 \begin_inset Flex Code
2888 \begin_layout Plain Layout
2898 \begin_layout Plain Layout
2899 This is just a text file, so it can be edited in any text editor.
2900 But there are also specialized programs that support such editing, such
2905 (for all platforms) or
2914 contains a `mode' for editing
2915 \begin_inset Flex Code
2918 \begin_layout Plain Layout
2929 For some menu- and widget-labels, there are also shortcut keys that should
2931 Those keys are marked after a `|', and should be translated according to
2932 the words and phrases of the language.
2933 You should also fill also out the information at the beginning of the new
2935 \begin_inset Flex Code
2938 \begin_layout Plain Layout
2944 -file with your email-address, etc., so people know where to reach you with
2945 suggestions and entertaining flames.
2948 \begin_layout Standard
2949 If you are just doing this on your own, then:
2952 \begin_layout Itemize
2954 \begin_inset Flex Code
2957 \begin_layout Plain Layout
2964 This can be done with
2965 \begin_inset Flex Code
2968 \begin_layout Plain Layout
2969 msgfmt -o xx.mo < xx.po
2977 \begin_layout Itemize
2979 \begin_inset Flex Code
2982 \begin_layout Plain Layout
2988 -file to your locale-tree, at the correct directory for application messages
2993 xx, and under the name
2994 \begin_inset Flex Code
2997 \begin_layout Plain Layout
3004 \begin_inset space \thinspace{}
3008 \begin_inset space \space{}
3012 \begin_inset Flex Code
3015 \begin_layout Plain Layout
3016 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3026 \begin_layout Standard
3027 As said, however, it would be best if the new
3028 \begin_inset Flex Code
3031 \begin_layout Plain Layout
3037 -file could be added to the LyX distribution, so others can use it.
3038 Adding it involves making additional changes to LyX.
3039 So send an email to the developers' mailing list if you're interested in
3043 \begin_layout Subsubsection
3047 \begin_layout Standard
3048 Sometimes it turns out that one English message needs to be translated into
3049 different messages in the target language.
3050 One example is the message
3051 \begin_inset Flex Code
3054 \begin_layout Plain Layout
3060 which has the German translation
3068 , depending upon exactly what the English
3069 \begin_inset Quotes eld
3073 \begin_inset Quotes erd
3078 \begin_inset Flex Code
3081 \begin_layout Plain Layout
3087 does not handle such ambiguous translations.
3088 Therefore you have to add some context information to the message: Instead
3090 \begin_inset Flex Code
3093 \begin_layout Plain Layout
3100 \begin_inset Flex Code
3103 \begin_layout Plain Layout
3104 To[[as in 'From format x to format y']]
3110 \begin_inset Flex Code
3113 \begin_layout Plain Layout
3114 To[[as in 'From page x to page y']].
3119 Now the two occurrences of
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3130 \begin_inset Flex Code
3133 \begin_layout Plain Layout
3139 and can be translated correctly to
3150 \begin_layout Standard
3151 Of course the context information needs to be stripped off the original
3152 message when no translation is used.
3153 Therefore you have to put it in double square brackets at the end of the
3154 message (see the example above).
3155 The translation mechanism of LyX ensures that everything in double square
3156 brackets at the end of messages is removed before displaying the message.
3159 \begin_layout Subsection
3160 Translating the documentation.
3163 \begin_layout Standard
3164 The online documentation (in the
3165 \begin_inset Flex MenuItem
3168 \begin_layout Plain Layout
3174 -menu) can (and should!) be translated.
3175 If there are translated versions of the documentation available
3179 \begin_layout Plain Layout
3180 As of March 2008, at least some of the documents have been translated into
3181 fourteen languages, with the Tutorial available in a few more.
3186 and the locale is set accordingly, these will be used automagically by
3188 LyX looks for translated versions as
3189 \begin_inset Flex Code
3192 \begin_layout Plain Layout
3193 LyXDir/doc/xx/DocName.lyx
3199 \begin_inset Flex Code
3202 \begin_layout Plain Layout
3208 is the code for the language currently in use.
3209 If there are no translated documents, the default English versions will
3211 Note that the translated versions must have the same filenames (
3212 \begin_inset Flex Code
3215 \begin_layout Plain Layout
3221 above) as the original.
3222 If you feel up to translating the documentation (an excellent way to proof-read
3223 the original documentation by the way!), there are a few things you should
3227 \begin_layout Itemize
3228 Check out the documentation translation web page at
3229 \begin_inset CommandInset href
3231 name "http://www.lyx.org/Translation"
3232 target "http://www.lyx.org/Translation"
3237 That way, you can find out which (if any) documents have already been translate
3238 d into your language.
3239 You can also find out who (if anyone) is organizing the effort to translate
3240 the documentation into your language.
3241 If no one is organizing the effort, please let us know that you're interested.
3244 \begin_layout Standard
3245 Once you get to actually translating, here's a few hints for you that may
3249 \begin_layout Itemize
3250 Join the documentation team! There is information on how to do that in
3251 \begin_inset Flex Code
3254 \begin_layout Plain Layout
3261 \begin_inset Flex MenuItem
3264 \begin_layout Plain Layout
3265 Help\SpecialChar \menuseparator
3271 ), which by the way is the first document you should translate.
3274 \begin_layout Itemize
3275 Learn the typographic conventions for the language you are translating to.
3276 Typography is an ancient art and over the centuries, a great variety of
3277 conventions have developed throughout different parts of the world.
3278 Also study the professional terminology amongst typographers in your country.
3279 Inventing your own terminology will only confuse the users.
3282 (Warning! Typography is addictive!)
3285 \begin_layout Itemize
3286 Make a copy of the document.
3287 This will be your working copy.
3288 You can use this as your personal translated help-file by placing it in
3290 \begin_inset Flex Code
3293 \begin_layout Plain Layout
3302 \begin_layout Itemize
3303 Sometimes the original document (from the LyX-team) will be updated.
3304 Use the source viewer at
3305 \begin_inset CommandInset href
3307 name "http://www.lyx.org/trac/timeline"
3308 target "http://www.lyx.org/trac/timeline"
3312 to see what has been changed.
3313 That way you can easily see which parts of the translated document need
3317 \begin_layout Standard
3318 If you ever find an error in the original document, fix it and notify the
3319 rest of the documentation team of the changes! (You didn't forget to join
3320 the documentation team, did you?)
3323 \begin_layout Standard
3324 \begin_inset Branch OutDated
3327 \begin_layout Section
3328 International Keyboard Support
3331 \begin_layout Standard
3334 [Editor's Note: The following section is by
3342 It needs to be fixed to conform to the new Documentation Style sheet and
3343 to make use of the new v1.0 features.
3344 The whole thing also needs to be merged with the section following it.-jw
3345 It may also be badly out of date.-rh (2008)]
3348 \begin_layout Subsection
3349 Defining Own Keymaps: Keymap File Format
3352 \begin_layout Standard
3353 Let's look at a keyboard definition file a little closer.
3354 It is a plain text file defining
3357 \begin_layout Itemize
3358 key-to-key or key-to-string translations
3361 \begin_layout Itemize
3365 \begin_layout Itemize
3366 dead keys exceptions
3369 \begin_layout Standard
3370 To define key-to-key or key-to-string translation, use this command:
3373 \begin_layout Quotation
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_layout Standard
3400 \begin_inset Flex Code
3403 \begin_layout Plain Layout
3409 is the key to be translated and
3410 \begin_inset Flex Code
3413 \begin_layout Plain Layout
3419 is the string to be inserted into the document.
3420 To define dead keys, use:
3423 \begin_layout Quotation
3424 \begin_inset Flex Code
3427 \begin_layout Plain Layout
3436 \begin_inset Flex Code
3439 \begin_layout Plain Layout
3448 \begin_layout Standard
3450 \begin_inset Flex Code
3453 \begin_layout Plain Layout
3459 is a keyboard key and
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3470 The following dead keys are supported (shortcut name is in parentheses):
3473 \begin_layout Quotation
3477 \begin_inset space \hfill{}
3483 \begin_layout Quotation
3485 \begin_inset space \hfill{}
3491 \begin_layout Quotation
3493 \begin_inset space \hfill{}
3499 \begin_layout Quotation
3501 \begin_inset space \hfill{}
3507 \begin_layout Quotation
3509 \begin_inset space \hfill{}
3515 \begin_layout Quotation
3517 \begin_inset space \hfill{}
3524 \begin_layout Plain Layout
3536 \begin_layout Quotation
3538 \begin_inset space \hfill{}
3544 \begin_layout Quotation
3546 \begin_inset space \hfill{}
3553 \begin_layout Plain Layout
3565 \begin_layout Quotation
3567 \begin_inset space \hfill{}
3573 \begin_layout Quotation
3575 \begin_inset space \hfill{}
3581 \begin_layout Quotation
3583 \begin_inset space \hfill{}
3590 \begin_layout Plain Layout
3602 \begin_layout Quotation
3604 \begin_inset space \hfill{}
3611 \begin_layout Plain Layout
3623 \begin_layout Quotation
3625 \begin_inset space \hfill{}
3631 \begin_layout Quotation
3632 hungarian umlaut (hug)
3633 \begin_inset space \hfill{}
3639 \begin_layout Quotation
3641 \begin_inset space \hfill{}
3647 \begin_layout Quotation
3649 \begin_inset space \hfill{}
3656 \begin_layout Plain Layout
3668 \begin_layout Standard
3669 Since in many international keyboards there are exceptions to what some
3670 dead keys should do, you can define them using
3673 \begin_layout Quotation
3674 \begin_inset Flex Code
3677 \begin_layout Plain Layout
3685 deadkey key outstring
3688 \begin_layout Standard
3689 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3693 \begin_layout Quotation
3694 \begin_inset Flex Code
3697 \begin_layout Plain Layout
3710 \begin_layout Standard
3711 to make it work correctly.
3712 Also, you have to define as exceptions dead keys over i and j, to remove
3713 the dot from them before inserting an accent mark.
3714 I will change this when the time comes, but so far I haven't had time.
3717 \begin_layout Standard
3718 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3721 \begin_inset Flex Code
3724 \begin_layout Plain Layout
3730 have different meaning.
3732 \begin_inset Flex Code
3735 \begin_layout Plain Layout
3741 marks comments, quotes start and end LaTeX-style commands.
3742 To enter quote, you'll need to use
3743 \begin_inset Flex Code
3746 \begin_layout Plain Layout
3755 \begin_inset Flex Code
3758 \begin_layout Plain Layout
3765 \begin_inset Flex Code
3768 \begin_layout Plain Layout
3779 \begin_layout Standard
3780 If you make a keyboard description file that works for your language, please
3781 mail it to me, so I can include it in the next keymap distribution.
3784 \begin_layout Standard
3785 More keywords will be supported in keymap configuration file in future,
3789 \begin_layout Itemize
3790 \begin_inset Flex Code
3793 \begin_layout Plain Layout
3804 \begin_inset space \hfill{}
3808 \begin_inset Flex Code
3811 \begin_layout Plain Layout
3820 \begin_layout Itemize
3821 \begin_inset Flex Code
3824 \begin_layout Plain Layout
3835 \begin_inset space \hfill{}
3839 \begin_inset Flex Code
3842 \begin_layout Plain Layout
3848 an external keymap translation program
3851 \begin_layout Standard
3852 Also, it should look into
3853 \begin_inset Flex Code
3856 \begin_layout Plain Layout
3862 file for defaults, too (for example, a
3863 \begin_inset Flex Code
3866 \begin_layout Plain Layout
3874 option to include default keyboard).
3882 \begin_layout Section
3883 International Keymap Stuff
3884 \begin_inset CommandInset label
3886 name "sec:International-Keymap-Stuff"
3893 \begin_layout Standard
3894 \begin_inset Note Note
3897 \begin_layout Plain Layout
3898 In doing the revisions on this document in March 2008, I did not look over
3899 this stuff, as I do not understand it.
3900 It would be good if someone else could do so.
3909 \begin_layout Standard
3910 The next two sections describe the
3911 \begin_inset Flex Code
3914 \begin_layout Plain Layout
3923 \begin_inset Flex Code
3926 \begin_layout Plain Layout
3934 file syntax in detail.
3935 These sections should help you design your own key map if the ones provided
3936 do not meet your needs.
3939 \begin_layout Subsection
3943 \begin_layout Standard
3947 \begin_inset Flex Code
3950 \begin_layout Plain Layout
3956 file maps keystrokes to characters or strings.
3957 As the name suggests, it sets a keyboard mapping.
3959 \begin_inset Flex Code
3962 \begin_layout Plain Layout
3973 \begin_inset Flex Code
3976 \begin_layout Plain Layout
3991 \begin_inset Flex Code
3994 \begin_layout Plain Layout
4007 \begin_inset Flex Code
4010 \begin_layout Plain Layout
4019 \begin_inset Flex Code
4022 \begin_layout Plain Layout
4030 are described in this section.
4033 \begin_layout Labeling
4034 \labelwidthstring 00.00.0000
4035 \begin_inset Flex Code
4038 \begin_layout Plain Layout
4046 Map a character to a string
4049 \begin_layout LyX-Code
4064 \begin_layout Standard
4097 the double-quote (")
4114 must be escaped with a preceding backslash (
4125 \begin_layout Standard
4127 \begin_inset Flex MenuItem
4130 \begin_layout Plain Layout
4138 statement to cause the symbol
4139 \begin_inset Flex MenuItem
4142 \begin_layout Plain Layout
4150 to be output for the keystroke
4151 \begin_inset Flex MenuItem
4154 \begin_layout Plain Layout
4165 \begin_layout LyX-Code
4171 \begin_layout Labeling
4172 \labelwidthstring 00.00.0000
4173 \begin_inset Flex Code
4176 \begin_layout Plain Layout
4184 Specify an accent character
4187 \begin_layout LyX-Code
4196 \begin_layout Standard
4197 This will make the cha
4235 This is the dead key
4239 \begin_layout Plain Layout
4246 refers to a key that does not produce a character by itself, but when followed
4247 with another key, produces the desired accent character.
4248 For example, a German characte
4250 r with an umlaut like
4260 can be produced in this manner.
4269 \begin_layout Standard
4282 and then another key not in
4299 followed by the other, not allowed key, as output.
4303 \begin_inset Flex MenuItem
4306 \begin_layout Plain Layout
4314 cancels a dead key, so if
4325 \begin_inset Flex MenuItem
4328 \begin_layout Plain Layout
4337 , the cursor will not go one position backwards but will instead cancel
4353 might have had on the next keystroke.
4357 \begin_layout Standard
4358 The following example specifies that the character ' is to be an acute accent,
4359 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4362 \begin_layout LyX-Code
4365 kmod ' acute aeiouAEIOU
4368 \begin_layout Labeling
4369 \labelwidthstring 00.00.0000
4370 \begin_inset Flex Code
4373 \begin_layout Plain Layout
4379 Specify an exception to the accent character
4382 \begin_layout LyX-Code
4391 \begin_layout Standard
4392 This defines an exce
4433 have been assigned a keystroke with a previous
4436 \begin_inset Flex Code
4439 \begin_layout Plain Layout
4463 must not belong in the
4510 If such a declaration does not exist in
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4555 \begin_inset Flex Code
4558 \begin_layout Plain Layout
4572 \begin_layout Standard
4573 The following command produces causes äi to be produced when you enter acute-i
4577 \begin_layout LyX-Code
4591 \begin_layout Labeling
4592 \labelwidthstring 00.00.0000
4593 \begin_inset Flex Code
4596 \begin_layout Plain Layout
4602 Combine two accent characters
4605 \begin_layout LyX-Code
4611 accent1 accent2 allowed
4614 \begin_layout Standard
4615 This one is getting pretty esoteric.
4616 It allows you to combine the effect
4672 \begin_inset Flex Code
4675 \begin_layout Plain Layout
4703 \begin_layout Standard
4704 Consider this example from the
4705 \begin_inset Flex Code
4708 \begin_layout Plain Layout
4719 \begin_layout LyX-Code
4722 kmod ; acute aeioyvhAEIOYVH
4726 kcomb acute umlaut iyIY
4729 \begin_layout Standard
4730 This allows you to press
4731 \begin_inset Flex MenuItem
4734 \begin_layout Plain Layout
4742 and get the effect of
4743 \begin_inset Flex Code
4746 \begin_layout Plain Layout
4765 in this case cancels the last dead key, so if you press
4766 \begin_inset Flex MenuItem
4769 \begin_layout Plain Layout
4778 \begin_inset Flex Code
4781 \begin_layout Plain Layout
4794 \begin_layout Subsection
4798 \begin_layout Standard
4800 \begin_inset Flex Code
4803 \begin_layout Plain Layout
4811 mapping is performed, a
4812 \begin_inset Flex Code
4815 \begin_layout Plain Layout
4825 file maps the strings that the symbols generate to characters in the current
4827 The LyX distribution currently includes at least the
4828 \begin_inset Flex Code
4831 \begin_layout Plain Layout
4840 \begin_inset Flex Code
4843 \begin_layout Plain Layout
4854 \begin_layout Standard
4856 \begin_inset Flex Code
4859 \begin_layout Plain Layout
4867 file is a sequence of declarations of the form
4870 \begin_layout LyX-Code
4883 \begin_layout Standard
4884 For example, in order to map
4885 \begin_inset Flex MenuItem
4888 \begin_layout Plain Layout
4898 to the corresponding character in the iso-8859-1 set (233), the following
4902 \begin_layout LyX-Code
4910 \begin_layout Standard
4912 \begin_inset Flex Code
4915 \begin_layout Plain Layout
4924 \begin_inset Flex Code
4927 \begin_layout Plain Layout
4945 the same character can apply to more than one string.
4947 \begin_inset Flex Code
4950 \begin_layout Plain Layout
4961 \begin_layout LyX-Code
4973 \begin_inset Newline newline
4989 \begin_layout Standard
4990 If LyX cannot find a mapping for the string produced by the keystroke or
4991 a deadkey sequence, it will check if it looks like an accented char and
4992 try to draw an accent over the character on screen.
4995 \begin_layout Subsection
4999 \begin_layout Standard
5000 There is a second way to add support for international characters through
5001 so-called dead-keys.
5002 A dead-key works in combination with a letter to produce an accented character.
5003 Here, we'll explain how to create a really simple dead-key to illustrate
5007 \begin_layout Standard
5008 Suppose you happen to need the circumflex character,
5009 \begin_inset Quotes eld
5013 \begin_inset Quotes erd
5018 \begin_inset Flex MenuItem
5021 \begin_layout Plain Layout
5028 \begin_inset space ~
5032 \begin_inset Flex MenuItem
5035 \begin_layout Plain Layout
5041 ] to the LyX command
5042 \begin_inset Flex Code
5045 \begin_layout Plain Layout
5052 \begin_inset Flex Code
5055 \begin_layout Plain Layout
5062 Now, whenever you type the
5063 \begin_inset Flex MenuItem
5066 \begin_layout Plain Layout
5072 -key followed by a letter, that letter will have a circumflex accent on
5074 For example, the sequence
5075 \begin_inset Quotes eld
5079 \begin_inset Flex MenuItem
5082 \begin_layout Plain Layout
5089 \begin_inset Quotes erd
5092 produces the letter:
5093 \begin_inset Quotes eld
5097 \begin_inset Quotes erd
5101 If you tried to type
5102 \begin_inset Quotes eld
5106 \begin_inset Flex MenuItem
5109 \begin_layout Plain Layout
5116 \begin_inset Quotes erd
5119 , however, LyX will complain with a beep, since a
5120 \begin_inset Quotes eld
5124 \begin_inset Flex MenuItem
5127 \begin_layout Plain Layout
5134 \begin_inset Quotes erd
5137 never takes a circumflex accent.
5139 \begin_inset Flex MenuItem
5142 \begin_layout Plain Layout
5148 after a dead-key produces the bare-accent.
5149 Please note this last point! If you bind a key to a dead-key, you'll need
5150 to rebind the character on that key to yet another key.
5152 \begin_inset Flex MenuItem
5155 \begin_layout Plain Layout
5161 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5164 \begin_layout Standard
5165 One common way to bind dead-keys is to use
5166 \begin_inset Flex MenuItem
5169 \begin_layout Plain Layout
5176 \begin_inset Flex MenuItem
5179 \begin_layout Plain Layout
5186 \begin_inset Flex MenuItem
5189 \begin_layout Plain Layout
5195 in combination with an accent, like
5196 \begin_inset Quotes eld
5200 \begin_inset Flex MenuItem
5203 \begin_layout Plain Layout
5210 \begin_inset Quotes erd
5214 \begin_inset Quotes eld
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5228 \begin_inset Quotes erd
5232 \begin_inset Quotes eld
5236 \begin_inset Flex MenuItem
5239 \begin_layout Plain Layout
5246 \begin_inset Quotes erd
5250 Another way involves using
5251 \begin_inset Flex Code
5254 \begin_layout Plain Layout
5261 \begin_inset Flex Code
5264 \begin_layout Plain Layout
5270 to set up the special
5271 \begin_inset Flex Code
5274 \begin_layout Plain Layout
5282 \begin_inset Flex Code
5285 \begin_layout Plain Layout
5291 acts in some ways just like
5292 \begin_inset Flex MenuItem
5295 \begin_layout Plain Layout
5301 and permits you to bind keys to accented characters.
5302 You can also turn keys into dead-keys by binding them to something like
5304 \begin_inset Flex Code
5307 \begin_layout Plain Layout
5313 and then binding this symbolic key to the corresponding LyX command.
5317 \begin_layout Plain Layout
5322 : This is exactly what I do in my
5323 \begin_inset Flex Code
5326 \begin_layout Plain Layout
5333 \begin_inset Flex Code
5336 \begin_layout Plain Layout
5344 \begin_inset Flex MenuItem
5347 \begin_layout Plain Layout
5349 \begin_inset space ~
5358 \begin_inset Flex Code
5361 \begin_layout Plain Layout
5367 and a bunch of these
5368 \begin_inset Quotes eld
5372 \begin_inset Flex Code
5375 \begin_layout Plain Layout
5382 \begin_inset Quotes erd
5385 symbolic keys bound such things as
5386 \begin_inset Flex MenuItem
5389 \begin_layout Plain Layout
5391 \begin_inset space ~
5400 \begin_inset Flex MenuItem
5403 \begin_layout Plain Layout
5405 \begin_inset space ~
5414 This is how I produce my accented characters.
5419 You can make just about anything into the
5420 \begin_inset Flex Code
5423 \begin_layout Plain Layout
5430 \begin_inset Flex MenuItem
5433 \begin_layout Plain Layout
5439 keys, a spare function key, etc.
5440 As for the LyX commands that produce accents, check the entry for
5441 \begin_inset Flex Code
5444 \begin_layout Plain Layout
5455 You'll find the complete list there.
5458 \begin_layout Subsection
5459 Saving your Language Configuration
5462 \begin_layout Standard
5463 You can edit your preferences so that your desired language environment
5464 is automatically configured when LyX starts up, via the
5465 \begin_inset Flex MenuItem
5468 \begin_layout Plain Layout
5469 Edit\SpecialChar \menuseparator
5478 \begin_layout Chapter
5479 Installing New Document Classes, Layouts, and Templates
5480 \begin_inset CommandInset label
5482 name "cha:Installing-New-Document"
5487 \begin_inset Argument 1
5490 \begin_layout Plain Layout
5491 Installing New Document Classes
5499 \begin_layout Standard
5500 In this chapter, we describe the procedures for creating and installing
5501 new LyX layout and template files, as well as offer a refresher on correctly
5502 installing new LaTeX document classes.
5506 \begin_layout Standard
5507 First, let us a say a few words about how one ought to think about the relation
5508 between LyX and LaTeX.
5509 The thing to understand is that, in a certain sense, LyX doesn't know anything
5511 Indeed, from LyX's point of view, LaTeX is just one of several
5512 \begin_inset Quotes eld
5516 \begin_inset Quotes erd
5519 in which it is capable of producing output.
5520 Other such formats are DocBook, plaintext, and XHTML.
5521 LaTeX is, of course, a particularly important format, but very little of
5522 the information LyX has about LaTeX is actually contained in the program
5527 \begin_layout Plain Layout
5528 Some commands are sufficiently complex that they are
5529 \begin_inset Quotes eld
5533 \begin_inset Quotes erd
5537 But the developers generally regard this as a Bad Thing.
5542 Rather, that information, even for the standard classes like
5543 \begin_inset Flex Code
5546 \begin_layout Plain Layout
5552 , is contained in `layout files'.
5553 Similarly, LyX itself does not know much about DocBook or XHTML.
5554 What it knows is contained in layout files.
5557 \begin_layout Standard
5558 You can think of the layout file for a given document class as a translation
5559 manual between LyX constructs---paragraphs with their corresponding styles,
5560 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5562 Almost everything LyX knows about
5563 \begin_inset Flex Code
5566 \begin_layout Plain Layout
5572 , for example, is contained in the file
5573 \begin_inset Flex Code
5576 \begin_layout Plain Layout
5582 and in various other files it includes.
5583 For this reason, anyone intending to write layout files should plan to
5584 study the existing files.
5585 A good place to start is with
5586 \begin_inset Flex Code
5589 \begin_layout Plain Layout
5595 , which is included in
5596 \begin_inset Flex Code
5599 \begin_layout Plain Layout
5606 \begin_inset Flex Code
5609 \begin_layout Plain Layout
5615 , and many of the other layout files for document classes.
5616 This file is where sections and the like are defined:
5617 \begin_inset Flex Code
5620 \begin_layout Plain Layout
5626 tells LyX how paragraphs that are marked with the Section, Subsection,
5627 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5630 \begin_inset Flex Code
5633 \begin_layout Plain Layout
5639 file basically just includes several of these
5640 \begin_inset Flex Code
5643 \begin_layout Plain Layout
5652 \begin_layout Standard
5653 Defining the LyX--LaTeX correspondence is not the only thing layout files
5655 Their other job is to define how the LyX constructs themselves will appear
5657 The fact that layout files have these two jobs is often a source of confusion,
5658 because they are completely separate.
5659 Telling LyX how to translate a certain paragraph style into LaTeX does
5660 not tell LyX how to display it; conversely, telling LyX how to display
5661 a certain paragraph style does not tell LyX how to translate it into LaTeX
5662 (let alone tell LaTeX how to display it).
5663 So, in general, when you define a new LyX construct, you must always do
5664 two quite separate things: (i)
5665 \begin_inset space ~
5668 tell LyX how to translate it into LaTeX and (ii)
5669 \begin_inset space ~
5672 tell LyX how to display it.
5675 \begin_layout Standard
5676 Much the same is true, of course, as regards LyX's other backend formats,
5677 though XHTML is in some ways different, because in that case LyX
5681 able, to some extent, to use information about how it should display a
5682 paragraph on the screen to output information (in the form of CSS) about
5683 how the paragraph should be displayed in a browser.
5684 Even in this case, however, the distinction between what LyX does internally
5685 and how things are rendered externally remains in force, and the two can
5686 be controlled separately.
5688 \begin_inset CommandInset ref
5690 reference "sec:Tags-for-XHTML"
5697 \begin_layout Section
5698 Installing new LaTeX files
5701 \begin_layout Standard
5702 Some installations may not include a LaTeX package or class file that you
5703 would like to use within LyX.
5704 For example, you might need FoilTeX, a package for preparing slides for
5705 overhead projectors.
5706 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5707 a user interface for installing such packages.
5708 For example, with MiKTeX, you start the program
5709 \begin_inset Quotes eld
5713 \begin_inset space ~
5717 \begin_inset Quotes erd
5720 to get a list of available packages.
5721 To install one of them, right click on it or use the corresponding toolbar
5725 \begin_layout Standard
5726 If your LaTeX distribution does not provide such a `package manager', or
5727 if the package is not available from your distribution, then follow these
5728 steps to install it manually:
5731 \begin_layout Enumerate
5732 Get the package from
5733 \begin_inset CommandInset href
5736 target "http://www.ctan.org/"
5743 \begin_layout Enumerate
5744 If the package contains a file with the ending
5745 \begin_inset Quotes eld
5749 \begin_inset Flex Code
5752 \begin_layout Plain Layout
5759 \begin_inset Quotes erd
5762 (is the case for FoilTeX) then open a console, change to the folder of
5763 this file and execute the command
5764 \begin_inset Flex Code
5767 \begin_layout Plain Layout
5774 You have now unpacked the package and have all files to install it.
5775 Most LaTeX-packages are not packed and you can skip this step.
5778 \begin_layout Enumerate
5779 Now you need to decide if the package should be available for all users
5784 \begin_layout Enumerate
5785 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5786 for all users on your system, then install it in your `local' TeX tree,
5787 otherwise install it in your own `user' TeX tree.
5788 Where these trees should be created, if they do not already exist, depends
5790 To find this out, look in the file
5791 \begin_inset Flex Code
5794 \begin_layout Plain Layout
5804 \begin_layout Plain Layout
5805 This is usually in the directory
5806 \begin_inset Flex Code
5809 \begin_layout Plain Layout
5815 , though you can execute the command
5816 \begin_inset Flex Code
5819 \begin_layout Plain Layout
5830 The location of the `local' TeX tree is defined by the
5831 \begin_inset Flex Code
5834 \begin_layout Plain Layout
5840 variable; this is usually somewhere like
5841 \begin_inset Flex Code
5844 \begin_layout Plain Layout
5845 /usr/local/share/texmf
5851 The location of the `user' TeX tree is defined by
5852 \begin_inset Flex Code
5855 \begin_layout Plain Layout
5862 \begin_inset Flex Code
5865 \begin_layout Plain Layout
5872 (If these variables are not predefined, you have to define them.) You'll
5873 probably need root permissions to create or modify the `local' tree, but
5874 not for your `user' tree.
5875 \begin_inset Newline newline
5878 In general, it is recommended to install in the user tree because your user
5879 will not be modified or even overwritten when you upgrade your system.
5880 It will typically also be backed up together with everything else when
5881 you backup your home directory (which, of course, you do on a regular basis).
5884 \begin_layout Enumerate
5885 On Windows, if you want the new package to be available for all users on
5886 your system, change to the folder where LaTeX is installed and then change
5888 \begin_inset Flex Code
5891 \begin_layout Plain Layout
5902 (For MiKTeX, this would be by default the folder
5903 \begin_inset Flex Code
5906 \begin_layout Plain Layout
5924 \begin_layout Plain Layout
5925 Note that this will be the correct path only on English installations.
5926 On a German one, it would be
5927 \begin_inset Flex Code
5930 \begin_layout Plain Layout
5944 , and similarly for other languages.
5949 Create there a new folder
5950 \begin_inset Flex Code
5953 \begin_layout Plain Layout
5959 and copy all files of the package into it.
5961 \begin_inset Newline newline
5964 If the package should only available for you or you don't have admin permissions
5965 , do the same, but in the local LaTeX folder.
5967 \begin_inset space \thinspace{}
5971 \begin_inset space ~
5974 2.8 under Windows XP, this would be the folder:
5975 \begin_inset Newline newline
5981 \begin_inset Flex Code
5984 \begin_layout Plain Layout
5987 Documents and Settings
5999 \begin_inset Newline newline
6005 \begin_inset Phantom HPhantom
6008 \begin_layout Plain Layout
6019 \begin_inset Flex Code
6022 \begin_layout Plain Layout
6035 \begin_inset Newline newline
6038 On Vista, it would be:
6039 \begin_inset Newline newline
6043 \begin_inset Flex Code
6046 \begin_layout Plain Layout
6072 \begin_layout Enumerate
6073 Now one only need to tell LaTeX that there are new files.
6074 This depends on the used LaTeX-Distribution:
6078 \begin_layout Enumerate
6079 For TeXLive execute the command
6080 \begin_inset Flex Code
6083 \begin_layout Plain Layout
6090 If you installed the package for all users, then you will probably need
6091 to have root permissions for that.
6094 \begin_layout Enumerate
6095 For MiKTeX, if you have installed the package for all users, start the program
6097 \begin_inset Quotes eld
6101 \begin_inset space ~
6105 \begin_inset Quotes erd
6108 and press the button marked
6109 \begin_inset Quotes eld
6113 \begin_inset Quotes erd
6117 Otherwise start the program
6118 \begin_inset Quotes eld
6122 \begin_inset Quotes erd
6129 \begin_layout Enumerate
6130 Finally, you need to tell LyX that there are new packages available.
6131 So, in LyX, use the menu
6132 \begin_inset Flex MenuItem
6135 \begin_layout Plain Layout
6138 \SpecialChar \menuseparator
6144 and then restart LyX.
6147 \begin_layout Standard
6148 Now the package is installed.
6149 In our example, the document class
6150 \begin_inset Flex Code
6153 \begin_layout Plain Layout
6155 \begin_inset space ~
6162 \begin_layout Plain Layout
6174 will now be available under
6175 \begin_inset Flex MenuItem
6178 \begin_layout Plain Layout
6179 Document\SpecialChar \menuseparator
6180 Settings\SpecialChar \menuseparator
6190 \begin_layout Standard
6191 If you would like to use a LaTeX document class that is not even listed
6193 \begin_inset Flex MenuItem
6196 \begin_layout Plain Layout
6197 Document\SpecialChar \menuseparator
6198 Settings\SpecialChar \menuseparator
6204 , then you need to create a `layout' file for it.
6205 That is the topic of the next section.
6208 \begin_layout Section
6209 Types of layout files
6212 \begin_layout Standard
6213 This section describes the various sorts of LyX files that contain layout
6215 These files describe various paragraph and character styles, determining
6216 how LyX should display them and how they should be translated into LaTeX,
6217 DocBook, XHTML, or whatever output format is being used.
6221 \begin_layout Standard
6222 We shall try to provide a thorough description of the process of writing
6224 However, there are so many different types of documents supported even
6225 by just LaTeX that we can't hope to cover every different possibility or
6226 problem you might encounter.
6227 The LyX users' list is frequented by people with lots of experience with
6228 layout design who are willing to share what they've learned, so please
6229 feel free to ask questions there.
6232 \begin_layout Standard
6233 As you prepare to write a new layout, it is extremely helpful to look at
6234 the layouts distributed with LyX.
6235 If you write a LyX layout for a LaTeX document class that might also be
6236 used by others, or write a module that might be useful to others, then
6237 you should consider posting your layout to the
6238 \begin_inset CommandInset href
6240 name "layout section on the LyX wiki"
6241 target "http://wiki.lyx.org/Layouts/Layouts"
6245 or even to the LyX developers' list, so that it might be included in LyX
6250 \begin_layout Plain Layout
6251 Note that LyX is licensed under the General Public License, so any material
6252 that is contributed to LyX must be similarly licensed.
6260 \begin_layout Subsection
6262 \begin_inset CommandInset label
6264 name "sub:Layout-modules"
6271 \begin_layout Standard
6272 We have spoken to this point about `layout files'.
6273 But there are different sorts of files that contain layout information.
6274 Layout files, strictly so called, have the
6275 \begin_inset Flex Code
6278 \begin_layout Plain Layout
6284 extension and provide LyX with information about document classes.
6285 As of LyX 1.6, however, layout information can also be contained in layout
6291 \begin_inset Flex Code
6294 \begin_layout Plain Layout
6301 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6302 some modules—such as the
6303 \begin_inset Flex Code
6306 \begin_layout Plain Layout
6312 module—specifically provide support for one package.
6313 In a sense, layout modules are similar to included
6317 \begin_layout Plain Layout
6318 These can have any extension, but by convention have the
6319 \begin_inset Flex Code
6322 \begin_layout Plain Layout
6334 \begin_inset Flex Code
6337 \begin_layout Plain Layout
6343 —in that modules are not specific to a given document class but may be used
6344 with many different classes.
6345 The difference is that using an included file with
6346 \begin_inset Flex Code
6349 \begin_layout Plain Layout
6355 requires editing that file.
6356 Modules, by contrast, are selected in the
6357 \begin_inset Flex MenuItem
6360 \begin_layout Plain Layout
6361 Document\SpecialChar \menuseparator
6370 \begin_layout Standard
6371 Building modules is the easiest way to get started with layout editing,
6372 since it can be as simple as adding a single new paragraph style or flex
6374 But modules may, in principle, contain anything a layout file can contain.
6377 \begin_layout Standard
6378 After creating a new module and copying it to the
6379 \begin_inset Flex Code
6382 \begin_layout Plain Layout
6388 folder, you will need to reconfigure and then restart LyX for the module
6389 to appear in the menu.
6390 However, changes you make to the module will be seen immediately, if you
6392 \begin_inset Flex MenuItem
6395 \begin_layout Plain Layout
6396 Document\SpecialChar \menuseparator
6402 , highlight something, and then hit
6403 \begin_inset Quotes eld
6407 \begin_inset Quotes erd
6413 It is strongly recommended that you save your work before doing this
6418 it is strongly recommended that you not attempt to edit modules while simultaneo
6419 usly working on actual documents
6422 Though of course the developers strive to keep LyX stable in such situations,
6423 syntax errors and the like in your module file could cause strange behavior.
6426 \begin_layout Subsubsection
6430 \begin_layout Standard
6431 Modules are to LyX as packages are to LaTeX.
6432 Sometimes, however, you find yourself wanting a specific inset or character
6433 style just for one document and writing a module that will also be available
6434 to other documents makes little sense.
6435 What you need is LyX's
6436 \begin_inset Quotes eld
6440 \begin_inset Quotes erd
6446 \begin_layout Standard
6447 You will find it under
6449 Document\SpecialChar \menuseparator
6450 Settings\SpecialChar \menuseparator
6454 The large text box allows you to enter anything that you might enter in
6455 a layout file or module.
6456 You can think of a document's local layout, in fact, as a module that belongs
6458 So, in particular, you must enter a
6459 \begin_inset Flex Code
6462 \begin_layout Plain Layout
6469 Any format is acceptable, but one would normally use the format current
6471 (In LyX 2.0, the current layout format is 35.) You should be aware that local
6472 layout is not supported by versions of LyX prior to 1.6, so you should not
6473 use it if you want to be able to export your document to LyX 1.5 or earlier
6474 (without, that is, losing the local layout information).
6475 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6476 though there is no UI for it---then you should use format 11 and, of course,
6477 use only layout constructs that were available in LyX 1.6.
6480 \begin_layout Standard
6481 When you have entered something in the
6482 \begin_inset Flex Code
6485 \begin_layout Plain Layout
6491 pane, LyX will enable the
6492 \begin_inset Quotes eld
6496 \begin_inset Quotes erd
6499 button at the bottom.
6500 Clicking this button will cause LyX to determine whether what you have
6501 entered is valid layout information for the chosen format.
6502 LyX will report the result but, unfortunately, will not tell you what errors
6503 there might have been.
6504 These will be written to the terminal, however, if LyX is started from
6506 You will not be permitted to save your local layout until you have entered
6510 \begin_layout Standard
6511 The warnings at the end of the previous section apply here, too.
6512 Do not play with local layout while you are actually working, especially
6513 if you have not saved your document.
6514 That said, using local layout with a test document can be a very convenient
6515 way to try out layout ideas, or even to start developing a module.
6518 \begin_layout Subsection
6520 \begin_inset Flex MenuItem
6523 \begin_layout Plain Layout
6532 \begin_layout Standard
6533 There are two situations you are likely to encounter when wanting to support
6534 a new LaTeX document class, involving style (
6535 \begin_inset Flex Code
6538 \begin_layout Plain Layout
6544 ) files and LaTeX2e class (
6545 \begin_inset Flex Code
6548 \begin_layout Plain Layout
6555 Supporting a style file is usually fairly easy.
6556 Supporting a new class file is a bit harder.
6557 We'll discuss the former in this section and the latter in the next.
6558 Similar remarks apply, of course, if you want to support a new DocBook
6562 \begin_layout Standard
6563 The easier case is the one in which your new document class is provided
6564 as a style file that is to be used in conjunction with an already supported
6566 For the sake of the example, we'll assume that the style file is called
6568 \begin_inset Flex MenuItem
6571 \begin_layout Plain Layout
6577 and that it is meant to be used with
6578 \begin_inset Flex MenuItem
6581 \begin_layout Plain Layout
6587 , which is a standard class.
6591 \begin_layout Standard
6592 Start by copying the existing class's layout file into your local directory:
6596 \begin_layout Plain Layout
6597 Of course, which directory is your local directory will vary by platform,
6598 and LyX allows you to specify your local directory on startup, too, using
6600 \begin_inset Flex Code
6603 \begin_layout Plain Layout
6617 \begin_layout LyX-Code
6618 cp report.layout ~/.lyx/layouts/myclass.layout
6621 \begin_layout Standard
6623 \begin_inset Flex Code
6626 \begin_layout Plain Layout
6632 and change the line:
6635 \begin_layout LyX-Code
6638 DeclareLaTeXClass{report}
6641 \begin_layout Standard
6645 \begin_layout LyX-Code
6648 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6651 \begin_layout Standard
6655 \begin_layout LyX-Code
6657 \begin_inset Newline newline
6663 \begin_inset Newline newline
6669 \begin_layout Standard
6670 near the top of the file.
6673 \begin_layout Standard
6674 Start LyX and select
6675 \begin_inset Flex MenuItem
6678 \begin_layout Plain Layout
6679 Tools\SpecialChar \menuseparator
6686 Then restart LyX and try creating a new document.
6688 \begin_inset Flex MenuItem
6691 \begin_layout Plain Layout
6697 " as a document class option in the
6698 \begin_inset Flex MenuItem
6701 \begin_layout Plain Layout
6702 Document\SpecialChar \menuseparator
6709 It is likely that some of the sectioning commands and such in your new
6710 class will work differently from how they worked in the base class—
6711 \begin_inset Flex Code
6714 \begin_layout Plain Layout
6720 in this example—so you can fiddle around with the settings for the different
6721 sections if you wish.
6722 The layout information for sections is contained in
6723 \begin_inset Flex Code
6726 \begin_layout Plain Layout
6732 , but you do not need to copy and change this file.
6733 Instead, you can simply add your changes to your layout file, after the
6735 \begin_inset Flex Code
6738 \begin_layout Plain Layout
6744 , which itself includes
6745 \begin_inset Flex Code
6748 \begin_layout Plain Layout
6755 For example, you might add these lines:
6758 \begin_layout LyX-Code
6762 \begin_layout LyX-Code
6766 \begin_layout LyX-Code
6770 \begin_layout LyX-Code
6774 \begin_layout LyX-Code
6778 \begin_layout Standard
6779 to change the font for chapter headings to sans-serif.
6780 This will override (or, in this case, add to) the existing declaration
6781 for the Chapter style.
6785 \begin_layout Standard
6786 Your new package may also provide commands or environments not present in
6788 In this case, you will want to add these to the layout file.
6790 \begin_inset CommandInset ref
6792 reference "sec:TextClass"
6796 for information on how to do so.
6799 \begin_layout Standard
6801 \begin_inset Flex MenuItem
6804 \begin_layout Plain Layout
6810 can be used with several different document classes, and even if it cannot,
6811 you might find it easiest just to write a module that you can load with
6813 The simplest possible such module would be:
6816 \begin_layout LyX-Code
6819 DeclareLyXModule{My Package}
6822 \begin_layout LyX-Code
6826 \begin_layout LyX-Code
6827 #Support for mypkg.sty.
6830 \begin_layout LyX-Code
6832 \begin_inset Newline newline
6838 \begin_layout LyX-Code
6840 \begin_inset Newline newline
6846 \begin_layout LyX-Code
6848 \begin_inset Newline newline
6854 \begin_inset Newline newline
6860 \begin_layout Standard
6861 A more complex module might modify the behavior of some existing constructs
6862 or define some new ones.
6864 \begin_inset CommandInset ref
6866 reference "sec:TextClass"
6873 \begin_layout Subsection
6875 \begin_inset Flex MenuItem
6878 \begin_layout Plain Layout
6887 \begin_layout Standard
6888 There are two possibilities here.
6889 One is that the class file is itself based upon an existing document class.
6890 For example, many thesis classes are based upon
6891 \begin_inset Flex MenuItem
6894 \begin_layout Plain Layout
6901 To see whether yours is, look for a line like
6904 \begin_layout LyX-Code
6910 \begin_layout Standard
6912 If so, then you may proceed largely as in the previous section, though
6914 \begin_inset Flex Code
6917 \begin_layout Plain Layout
6923 line will be different.
6924 If your new class is
6925 \begin_inset Flex Code
6928 \begin_layout Plain Layout
6934 and it is based upon
6935 \begin_inset Flex Code
6938 \begin_layout Plain Layout
6944 , then the line should read:
6948 \begin_layout Plain Layout
6949 And it will be easiest if you save the file to
6950 \begin_inset Flex Code
6953 \begin_layout Plain Layout
6959 : LyX assumes that the document class has the same name as the layout file.
6968 \begin_layout LyX-Code
6971 DeclareLaTeXClass[thesis,book]{thesis}
6974 \begin_layout Standard
6975 If, on the other hand, the new class is not based upon an existing class,
6976 you will probably have to
6977 \begin_inset Quotes eld
6981 \begin_inset Quotes erd
6985 We strongly suggest copying an existing layout file which uses a similar
6986 LaTeX class and then modifying it, if you can do so.
6987 At least use an existing file as a starting point so you can find out what
6988 items you need to worry about.
6989 Again, the specifics are covered below.
6992 \begin_layout Subsection
6994 \begin_inset CommandInset label
6996 name "sub:Creating-Templates"
7003 \begin_layout Standard
7004 Once you have written a layout file for a new document class, you might
7005 want to consider writing a
7010 A template acts as a kind of tutorial for your layout, showing how it might
7011 be used, though containing dummy content.
7012 You can of course look at the various templates included with LyX for ideas.
7015 \begin_layout Standard
7016 Templates are created just like usual documents: using LyX.
7017 The only difference is that usual documents contain all possible settings,
7018 including the font scheme and the paper size.
7019 Usually a user doesn't want a template to overwrite his preferred settings
7020 for such parameters.
7021 For that reason, the designer of a template should remove the corresponding
7023 \begin_inset Flex Code
7026 \begin_layout Plain Layout
7035 \begin_inset Flex Code
7038 \begin_layout Plain Layout
7046 from the template LyX file.
7047 This can be done with any simple text-editor, for example
7048 \begin_inset Flex Code
7051 \begin_layout Plain Layout
7058 \begin_inset Flex Code
7061 \begin_layout Plain Layout
7071 \begin_layout Standard
7072 Put the edited template files you create in
7073 \begin_inset Flex Code
7076 \begin_layout Plain Layout
7082 , copy the ones you use from the global template directory in
7083 \begin_inset Flex Code
7086 \begin_layout Plain Layout
7092 to the same place, and redefine the template path in the
7093 \begin_inset Flex MenuItem
7096 \begin_layout Plain Layout
7097 Tools\SpecialChar \menuseparator
7098 Preferences\SpecialChar \menuseparator
7107 \begin_layout Standard
7108 Note, by the way, that there is a template which has a particular meaning:
7110 \begin_inset Flex Code
7113 \begin_layout Plain Layout
7120 This template is loaded every time you create a new document with
7121 \begin_inset Flex MenuItem
7124 \begin_layout Plain Layout
7125 File\SpecialChar \menuseparator
7131 in order to provide useful defaults.
7132 To create this template from inside LyX, all you have to do is to open
7133 a document with the correct settings, and use the
7134 \begin_inset Flex MenuItem
7137 \begin_layout Plain Layout
7138 Save as Document Defaults
7146 \begin_layout Subsection
7147 Upgrading old layout files
7150 \begin_layout Standard
7151 The format of layout files changes with each LyX release, so old layout
7152 files need to be converted to the new format.
7153 This process has been automated since LyX 1.4: If LyX reads a layout file
7154 in an older format, it automatically calls the script
7155 \begin_inset Flex Code
7158 \begin_layout Plain Layout
7164 to convert it to a temporary file in current format.
7165 The original file is left untouched.
7166 If you use the layout file often, then, you may want to convert it permanently,
7167 so that LyX does not have to do so itself every time.
7168 To do this, you can call the converter manually:
7171 \begin_layout LyX-Code
7172 mv myclass.layout myclass.old
7175 \begin_layout LyX-Code
7176 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7179 \begin_layout Standard
7181 \begin_inset Flex Code
7184 \begin_layout Plain Layout
7190 with the name of your LyX system directory, of course.
7193 \begin_layout Standard
7194 Note that manual conversion does not affect included files, so these will
7195 have to be converted separately.
7198 \begin_layout Section
7199 \begin_inset CommandInset label
7201 name "sec:TextClass"
7205 The layout file format
7208 \begin_layout Standard
7209 When it's finally time to get your hands dirty and create or edit your own
7210 layout file, the following sections describe what you're up against.
7211 Our advice is to go slowly, save and test often, listen to soothing music,
7212 and enjoy one or two of your favorite adult beverages; more if you are
7213 getting particularly stuck.
7214 It's really not that hard, except that the multitude of options can become
7215 overwhelming if you try to do too much in one sitting.
7216 Go have another adult beverage, just for good measure.
7219 \begin_layout Standard
7220 Note that all the tags used in layout files are case-insensitive.
7222 \begin_inset Flex Code
7225 \begin_layout Plain Layout
7232 \begin_inset Flex Code
7235 \begin_layout Plain Layout
7242 \begin_inset Flex Code
7245 \begin_layout Plain Layout
7251 are really the same tag.
7252 The possible values are printed in brackets after the feature's name.
7253 The default value if a feature isn't specified inside a text class-description
7255 \begin_inset Flex Code
7258 \begin_layout Plain Layout
7267 If the argument has a data type like
7268 \begin_inset Quotes eld
7272 \begin_inset Quotes erd
7276 \begin_inset Quotes eld
7280 \begin_inset Quotes erd
7283 , the default is shown like this:
7284 \begin_inset Flex Code
7287 \begin_layout Plain Layout
7298 \begin_layout Subsection
7299 The document class declaration
7300 \change_inserted -712698321 1349766602
7306 \begin_layout Standard
7307 Lines in a layout file which begin with
7308 \begin_inset Flex Code
7311 \begin_layout Plain Layout
7318 There is one exception to this rule.
7320 \begin_inset Flex Code
7323 \begin_layout Plain Layout
7329 files should begin with
7330 \change_deleted -712698321 1349766533
7334 \change_inserted -712698321 1349766536
7340 \begin_layout LyX-Code
7343 #% Do not delete the line below; configure depends on this
7346 \begin_layout LyX-Code
7352 \change_deleted -712698321 1349766193
7354 \change_inserted -712698321 1349766201
7355 Article (Standard Class)
7358 \change_inserted -712698321 1349766538
7362 \begin_layout LyX-Code
7364 \change_inserted -712698321 1349766581
7369 DeclareCategory{Articles}
7374 \begin_layout Standard
7376 \change_inserted -712698321 1349766695
7380 \change_inserted -712698321 1349766626
7384 \change_deleted -712698321 1349766628
7386 \change_inserted -712698321 1349766628
7389 used when you (re)configure LyX.
7390 The layout file is read by the LaTeX script
7391 \begin_inset Flex Code
7394 \begin_layout Plain Layout
7400 , in a special mode where
7401 \begin_inset Flex Code
7404 \begin_layout Plain Layout
7411 The first line is just a LaTeX comment,
7412 \change_deleted -712698321 1349766656
7415 the second one contains the
7416 \change_inserted -712698321 1349766650
7419 declaration of the text class
7420 \change_inserted -712698321 1349766689
7421 , and the third line contains the optional classification of the class
7424 If these lines appear in a file named
7425 \begin_inset Flex Code
7428 \begin_layout Plain Layout
7434 , then they define a text class of name
7435 \begin_inset Flex Code
7438 \begin_layout Plain Layout
7444 (the name of the layout file) which uses the LaTeX document class
7445 \begin_inset Flex Code
7448 \begin_layout Plain Layout
7454 (the default is to use the same name as the layout).
7456 \begin_inset Quotes eld
7460 \change_deleted -712698321 1349766253
7462 \change_inserted -712698321 1349766260
7463 Article (Standard Class)
7466 \begin_inset Quotes erd
7469 that appears above is used as a description of the text class in the
7470 \begin_inset Flex MenuItem
7473 \begin_layout Plain Layout
7474 Document\SpecialChar \menuseparator
7482 \change_inserted -712698321 1349767097
7484 \begin_inset Quotes eld
7488 \begin_inset Quotes erd
7491 in the example) is also used in the
7492 \begin_inset Flex MenuItem
7495 \begin_layout Plain Layout
7497 \change_inserted -712698321 1349766801
7498 Document\SpecialChar \menuseparator
7504 dialog: the text classes are grouped by these categories (which are usually
7505 genres, so typical categories are
7506 \begin_inset Quotes eld
7510 \begin_inset Quotes erd
7514 \begin_inset Quotes eld
7518 \begin_inset Quotes erd
7522 \begin_inset Quotes eld
7526 \begin_inset Quotes erd
7530 \begin_inset Quotes eld
7534 \begin_inset Quotes erd
7538 \begin_inset Quotes eld
7542 \begin_inset Quotes erd
7546 \begin_inset Quotes eld
7550 \begin_inset Quotes erd
7554 If no category has been declared, the class will be put in the
7555 \begin_inset Quotes eld
7559 \begin_inset Quotes erd
7567 \begin_layout Standard
7568 Let's assume that you wrote your own text class that uses the
7569 \begin_inset Flex Code
7572 \begin_layout Plain Layout
7578 document class, but where you changed the appearance of the section headings.
7579 If you put it in a file
7580 \begin_inset Flex Code
7583 \begin_layout Plain Layout
7589 , the header of this file should be:
7592 \begin_layout LyX-Code
7595 #% Do not delete the line below; configure depends on this
7598 \begin_layout LyX-Code
7603 DeclareLaTeXClass[article]{
7604 \change_deleted -712698321 1349766303
7606 \change_inserted -712698321 1349766303
7610 \change_deleted -712698321 1349766338
7612 \change_inserted -712698321 1349766338
7616 \change_deleted -712698321 1349766340
7618 \change_inserted -712698321 1349766340
7622 \change_deleted -712698321 1349766343
7624 \change_inserted -712698321 1349766343
7628 \change_inserted -712698321 1349767223
7632 \begin_layout LyX-Code
7634 \change_inserted -712698321 1349767223
7639 DeclareCategory{Articles}
7644 \begin_layout Standard
7645 This declares a text class
7646 \begin_inset Flex Code
7649 \begin_layout Plain Layout
7655 , associated with the LaTeX document class
7656 \begin_inset Flex Code
7659 \begin_layout Plain Layout
7666 \begin_inset Quotes eld
7670 \change_deleted -712698321 1349766329
7672 \change_inserted -712698321 1349766329
7676 \change_deleted -712698321 1349766347
7678 \change_inserted -712698321 1349766347
7682 \change_deleted -712698321 1349766350
7684 \change_inserted -712698321 1349766350
7688 \change_deleted -712698321 1349766352
7690 \change_inserted -712698321 1349766352
7694 \begin_inset Quotes erd
7698 If your text class depends on several packages, you can declare it as:
7701 \begin_layout LyX-Code
7704 #% Do not delete the line below; configure depends on this
7707 \begin_layout LyX-Code
7712 DeclareLaTeXClass[article,foo.sty]{
7713 \change_deleted -712698321 1349766366
7715 \change_inserted -712698321 1349766366
7719 \change_deleted -712698321 1349766369
7721 \change_inserted -712698321 1349766369
7725 \change_deleted -712698321 1349766371
7727 \change_inserted -712698321 1349766371
7731 \change_deleted -712698321 1349766374
7733 \change_inserted -712698321 1349766374
7737 \change_inserted -712698321 1349767240
7741 \begin_layout LyX-Code
7743 \change_inserted -712698321 1349767240
7748 DeclareCategory{Articles}
7753 \begin_layout Standard
7754 This indicates that your text class uses the
7755 \begin_inset Flex Code
7758 \begin_layout Plain Layout
7765 Finally, it is also possible to declare classes for DocBook code.
7766 Typical declarations will look like:
7769 \begin_layout LyX-Code
7772 #% Do not delete the line below; configure depends on this
7775 \begin_layout LyX-Code
7780 DeclareDocBookClass[article]{SGML (DocBook
7781 \change_deleted -712698321 1349766387
7783 \change_inserted -712698321 1349766387
7787 \change_inserted -712698321 1349767247
7791 \begin_layout LyX-Code
7793 \change_inserted -712698321 1349767302
7798 DeclareCategory{Articles (DocBook)}
7803 \begin_layout Standard
7804 Note that these declarations can also be given an optional parameter declaring
7805 the name of the document class (but not a list).
7808 \begin_layout Standard
7809 So, to be as explicit as possible, the form of the layout declaration is:
7812 \begin_layout LyX-Code
7817 DeclareLaTeXClass[class,package.sty]{layout description}
7818 \change_inserted -712698321 1349767329
7822 \begin_layout LyX-Code
7824 \change_inserted -712698321 1349767339
7829 DeclareCategory{category}
7834 \begin_layout Standard
7835 The class need only be specified if the name of the LaTeX class file and
7836 the name of the layout file are different or if there are packages to load.
7837 If the name of the class file is not specified, then LyX will simply assume
7838 that it is the same as the name of the layout file.
7841 \begin_layout Standard
7842 When the text class has been modified to your taste, all you have to do
7843 is to copy it either to
7844 \begin_inset Flex Code
7847 \begin_layout Plain Layout
7854 \begin_inset Flex Code
7857 \begin_layout Plain Layout
7864 \begin_inset Flex MenuItem
7867 \begin_layout Plain Layout
7868 Tools\SpecialChar \menuseparator
7874 , exit LyX and restart.
7875 Then your new text class should be available along with the others.
7878 \begin_layout Standard
7879 Once the layout file is installed, you can edit it and see your changes
7880 without having to reconfigure or to restart LyX.
7885 \begin_layout Plain Layout
7886 In versions of LyX prior to 1.6, this was not true.
7887 As a result, editing layout files was very time consuming, since you had
7888 constantly to restart LyX to see changes.
7893 You can force a reload of the current layout by using the LyX function
7895 \begin_inset Flex MenuItem
7898 \begin_layout Plain Layout
7905 There is no default binding for this function—though, of course, you can
7906 bind it to a key yourself.
7907 But you will normally use this function simply by entering it in the mini-buffe
7912 \begin_layout Standard
7918 \begin_inset Flex MenuItem
7921 \begin_layout Plain Layout
7927 is very much an `advanced feature'.
7932 recommended that you save your work before using this function.
7937 recommended that you not attempt to edit layout information while simultaneousl
7938 y working on a document that you care about.
7939 Use a test document.
7940 Syntax errors and the like in your layout file could cause peculiar behavior.
7941 In particular, such errors could cause LyX to regard the current layout
7942 as invalid and to attempt to switch to some other layout.
7946 \begin_layout Plain Layout
7947 Really bad syntax errors may even caused LyX to exit.
7948 This is because certain sorts of errors may make LyX unable to read
7958 The LyX team strives to keep LyX stable in such situations, but safe is
7963 \begin_layout Plain Layout
7964 While we're giving advice: make regular backups.
7965 And be nice to your mother.
7973 \begin_layout Subsection
7974 The Module declaration
7977 \begin_layout Standard
7978 A module must begin with a line like the following:
7981 \begin_layout LyX-Code
7984 DeclareLyXModule[endnotes.sty]{Endnotes}
7987 \begin_layout Standard
7988 The mandatory argument, in curly brackets, is the name of the module, as
7990 \begin_inset Flex MenuItem
7993 \begin_layout Plain Layout
7994 Document\SpecialChar \menuseparator
7995 Settings\SpecialChar \menuseparator
8002 The argument in square brackets is optional: It declares any LaTeX packages
8003 on which the module depends.
8004 Please note that only packages about which LyX knows should be listed in
8005 the square brackets.
8009 \begin_layout Plain Layout
8010 The list of such packages is documented only in the source code.
8015 LyX will not check for arbitrary packages.
8016 It is also possible to use the form
8017 \begin_inset Flex MenuItem
8020 \begin_layout Plain Layout
8026 as an optional argument, which declares that the module can only be used
8027 when there exists a conversion chain between the formats `
8028 \begin_inset Flex Code
8031 \begin_layout Plain Layout
8038 \begin_inset Flex Code
8041 \begin_layout Plain Layout
8050 \begin_layout Standard
8051 The module declaration should then be followed by lines like the following
8055 \begin_layout Plain Layout
8056 Preferably in English if the module should be published with LyX.
8057 This description will appear in the list of messages to be translated and
8058 will be thus translated with the next interface update.
8066 \begin_layout LyX-Code
8070 \begin_layout LyX-Code
8071 #Adds an endnote command, in addition to footnotes.
8075 \begin_layout LyX-Code
8076 #You will need to add
8078 theendnotes in TeX code where you
8081 \begin_layout LyX-Code
8082 #want the endnotes to appear.
8086 \begin_layout LyX-Code
8090 \begin_layout LyX-Code
8091 #Requires: somemodule | othermodule
8094 \begin_layout LyX-Code
8095 #Excludes: badmodule
8098 \begin_layout Standard
8099 The description is used in
8100 \begin_inset Flex MenuItem
8103 \begin_layout Plain Layout
8104 Document\SpecialChar \menuseparator
8105 Settings\SpecialChar \menuseparator
8111 to provide the user with information about what the module does.
8113 \begin_inset Flex Code
8116 \begin_layout Plain Layout
8122 line is used to identify other modules with which this one must be used;
8124 \begin_inset Flex Code
8127 \begin_layout Plain Layout
8133 line is used to identify modules with which this one may not be used.
8134 Both are optional, and, as shown, multiple modules should be separated
8135 with the pipe symbol: |.
8136 Note that the required modules are treated disjunctively:
8140 of the required modules must be used.
8145 excluded module may be used.
8146 Note that modules are identified here by their
8151 \begin_inset Flex Code
8154 \begin_layout Plain Layout
8162 \begin_inset Flex Code
8165 \begin_layout Plain Layout
8172 \begin_inset Flex Code
8175 \begin_layout Plain Layout
8184 \begin_layout Subsection
8188 \begin_layout Standard
8189 The first non-comment line of any layout file, included file, or module
8194 contain the file format number:
8197 \begin_layout Description
8198 \begin_inset Flex Code
8201 \begin_layout Plain Layout
8208 \begin_inset Flex Code
8211 \begin_layout Plain Layout
8217 ] The format number of the layout file.
8220 \begin_layout Standard
8221 This tag was introduced with LyX
8222 \begin_inset space ~
8226 Layout files from older LyX versions do not have an explicit file format
8227 and are considered to have
8228 \begin_inset Flex Code
8231 \begin_layout Plain Layout
8233 \begin_inset space ~
8242 The format for the present version of LyX is format 35.
8243 But each version of LyX is capable of reading earlier versions' layout
8244 files, just as they are capable of reading files produced by earlier versions
8246 There is, however, no provision for converting to earlier formats.
8249 \begin_layout Subsection
8250 \begin_inset CommandInset label
8252 name "sub:General-text-class"
8256 General text class parameters
8259 \begin_layout Standard
8260 These are general parameters that govern the behavior of an entire document
8266 mean that they must appear in
8267 \begin_inset Flex Code
8270 \begin_layout Plain Layout
8276 files rather than in modules.
8277 A module can contain any layout tag.)
8280 \begin_layout Description
8281 \begin_inset Flex Code
8284 \begin_layout Plain Layout
8290 Adds information that will be output in the
8291 \begin_inset Flex Code
8294 \begin_layout Plain Layout
8300 block when the document is output to XHTML.
8301 Typically, this would be used to output CSS style information, but it can
8302 be used for anything that can appear in
8303 \begin_inset Flex Code
8306 \begin_layout Plain Layout
8314 \begin_inset Quotes eld
8318 \begin_inset Flex Code
8321 \begin_layout Plain Layout
8328 \begin_inset Quotes erd
8334 \begin_layout Description
8335 \begin_inset Flex Code
8338 \begin_layout Plain Layout
8344 Adds information to the document preamble.
8346 \begin_inset Newline newline
8350 \begin_inset Quotes eld
8354 \begin_inset Flex Code
8357 \begin_layout Plain Layout
8364 \begin_inset Quotes erd
8370 \begin_layout Description
8371 \begin_inset Flex Code
8374 \begin_layout Plain Layout
8380 Defines formats for use in the display of bibliographic information.
8382 \begin_inset CommandInset ref
8384 reference "sub:Citation-format-description"
8390 \begin_inset Quotes eld
8394 \begin_inset Flex Code
8397 \begin_layout Plain Layout
8404 \begin_inset Quotes erd
8410 \begin_layout Description
8411 \begin_inset Flex Code
8414 \begin_layout Plain Layout
8420 Describes various global options supported by the document class.
8422 \begin_inset space ~
8426 \begin_inset CommandInset ref
8428 reference "sub:ClassOptions"
8434 \begin_inset Quotes eld
8438 \begin_inset Flex Code
8441 \begin_layout Plain Layout
8448 \begin_inset Quotes erd
8454 \begin_layout Description
8455 \begin_inset Flex Code
8458 \begin_layout Plain Layout
8465 \begin_inset Flex Code
8468 \begin_layout Plain Layout
8477 \begin_inset space \thinspace{}
8481 \begin_inset Flex Code
8484 \begin_layout Plain Layout
8490 ] Whether the class should
8494 to having one or two columns.
8495 Can be changed in the
8496 \begin_inset Flex MenuItem
8499 \begin_layout Plain Layout
8500 Document\SpecialChar \menuseparator
8509 \begin_layout Description
8510 \begin_inset Flex Code
8513 \begin_layout Plain Layout
8520 \begin_inset Flex Code
8523 \begin_layout Plain Layout
8529 ] This sequence defines the properties for a counter.
8530 If the counter does not yet exist, it is created; if it does exist, it
8533 \begin_inset Quotes eld
8537 \begin_inset Flex Code
8540 \begin_layout Plain Layout
8547 \begin_inset Quotes erd
8551 \begin_inset Newline newline
8555 \begin_inset space ~
8559 \begin_inset CommandInset ref
8561 reference "sub:Counters"
8565 for details on counters.
8568 \begin_layout Description
8569 \begin_inset Flex Code
8572 \begin_layout Plain Layout
8578 Sets the default font used to display the document.
8580 \begin_inset space ~
8584 \begin_inset CommandInset ref
8586 reference "sub:Font-description"
8590 for how to declare fonts.
8592 \begin_inset Quotes eld
8596 \begin_inset Flex Code
8599 \begin_layout Plain Layout
8606 \begin_inset Quotes erd
8612 \begin_layout Description
8613 \begin_inset Flex Code
8616 \begin_layout Plain Layout
8623 \begin_inset Flex Code
8626 \begin_layout Plain Layout
8632 ] Specifies a module to be included by default with this document class.
8633 The module is specified as filename without the
8634 \begin_inset Flex Code
8637 \begin_layout Plain Layout
8644 The user can still remove the module, but it will be active at the outset.
8645 (This applies only when new files are created, or when this class is chosen
8646 for an existing document.)
8649 \begin_layout Description
8650 \begin_inset Flex Code
8653 \begin_layout Plain Layout
8660 \begin_inset Flex Code
8663 \begin_layout Plain Layout
8669 ] This is the style that will be assigned to new paragraphs, usually
8670 \begin_inset Flex MenuItem
8673 \begin_layout Plain Layout
8680 This will default to the first defined style if not given, but you are
8681 encouraged to use this directive.
8684 \begin_layout Description
8685 \begin_inset Flex Code
8688 \begin_layout Plain Layout
8695 \begin_inset Flex Code
8698 \begin_layout Plain Layout
8704 ] This tag indicates that the module (which is specified by filename without
8706 \begin_inset Flex Code
8709 \begin_layout Plain Layout
8715 extension) cannot be used with this document class.
8716 This might be used in a journal-specific layout file to prevent, say, the
8718 \begin_inset Flex Code
8721 \begin_layout Plain Layout
8727 module that numbers theorems by section.
8732 be used in a module.
8733 Modules have their own way of excluding other modules (see section
8734 \begin_inset space ~
8738 \begin_inset CommandInset ref
8740 reference "sub:Layout-modules"
8747 \begin_layout Description
8748 \begin_inset Flex Code
8751 \begin_layout Plain Layout
8757 Defines a new float.
8759 \begin_inset space ~
8763 \begin_inset CommandInset ref
8765 reference "sub:Floats"
8771 \begin_inset Quotes eld
8775 \begin_inset Flex Code
8778 \begin_layout Plain Layout
8785 \begin_inset Quotes erd
8791 \begin_layout Description
8792 \begin_inset Flex Code
8795 \begin_layout Plain Layout
8801 Sets the information that will be output in the
8802 \begin_inset Flex Code
8805 \begin_layout Plain Layout
8811 block when this document class is output to XHTML.
8812 Note that this will completely override any prior
8813 \begin_inset Flex Code
8816 \begin_layout Plain Layout
8823 \begin_inset Flex Code
8826 \begin_layout Plain Layout
8834 \begin_inset Newline newline
8838 \begin_inset Flex Code
8841 \begin_layout Plain Layout
8847 if you just want to add material to the preamble.) Must end with
8848 \begin_inset Quotes eld
8852 \begin_inset Flex Code
8855 \begin_layout Plain Layout
8862 \begin_inset Quotes erd
8868 \begin_layout Description
8869 \begin_inset Flex Code
8872 \begin_layout Plain Layout
8879 \begin_inset Flex Code
8882 \begin_layout Plain Layout
8888 ] The style to use for the table of contents, bibliography, and so forth,
8889 when the document is output to HTML.
8890 For articles, this should normally be
8891 \begin_inset Flex Code
8894 \begin_layout Plain Layout
8901 \begin_inset Flex Code
8904 \begin_layout Plain Layout
8911 If it is not given, then LyX will attempt to figure out which layout to
8915 \begin_layout Description
8916 \begin_inset Flex Code
8919 \begin_layout Plain Layout
8926 \begin_inset Flex Code
8929 \begin_layout Plain Layout
8935 ] Modifies the properties of the given counter.
8936 If the counter does not exist, the statement is ignored.
8938 \begin_inset Quotes eld
8942 \begin_inset Flex Code
8945 \begin_layout Plain Layout
8952 \begin_inset Quotes erd
8956 \begin_inset Newline newline
8960 \begin_inset space ~
8964 \begin_inset CommandInset ref
8966 reference "sub:Counters"
8970 for details on counters.
8973 \begin_layout Description
8974 \begin_inset Flex Code
8977 \begin_layout Plain Layout
8984 \begin_inset Flex Code
8987 \begin_layout Plain Layout
8993 ] Modifies the properties of the given paragraph style.
8994 If the style does not exist, the statement is ignored.
8996 \begin_inset Quotes eld
9000 \begin_inset Flex Code
9003 \begin_layout Plain Layout
9010 \begin_inset Quotes erd
9016 \begin_layout Description
9017 \begin_inset Flex Code
9020 \begin_layout Plain Layout
9027 \begin_inset Flex Code
9030 \begin_layout Plain Layout
9036 ] This allows you to include another layout definition file within yours
9037 to avoid duplicating commands.
9038 Common examples are the standard layout files, for example,
9039 \begin_inset Flex Code
9042 \begin_layout Plain Layout
9048 , which contains most of the basic layouts.
9051 \begin_layout Description
9052 \begin_inset Flex Code
9055 \begin_layout Plain Layout
9062 \begin_inset Flex Code
9065 \begin_layout Plain Layout
9071 ] This section (re-)defines the layout of an inset.
9072 It can be applied to an existing inset or to a new, user-defined inset,
9073 e.g., a new character style.
9075 \begin_inset Quotes eld
9079 \begin_inset Flex Code
9082 \begin_layout Plain Layout
9089 \begin_inset Quotes erd
9093 \begin_inset Newline newline
9097 \begin_inset space ~
9101 \begin_inset CommandInset ref
9103 reference "sub:Flex-insets-and"
9107 for more information.
9111 \begin_layout Description
9112 \begin_inset Flex Code
9115 \begin_layout Plain Layout
9122 \begin_inset Flex Code
9125 \begin_layout Plain Layout
9131 ] A string that indicates the width of the left margin on the screen, for
9133 \begin_inset Quotes eld
9137 \begin_inset Flex Code
9140 \begin_layout Plain Layout
9147 \begin_inset Quotes erd
9151 (Note that this is not a `length', like
9152 \begin_inset Quotes eld
9156 \begin_inset Quotes erd
9162 \begin_layout Description
9163 \begin_inset Flex Code
9166 \begin_layout Plain Layout
9173 \begin_inset Flex Code
9176 \begin_layout Plain Layout
9182 ] Deletes an existing counter, usually one defined in an included file.
9185 \begin_layout Description
9186 \begin_inset Flex Code
9189 \begin_layout Plain Layout
9196 \begin_inset Flex Code
9199 \begin_layout Plain Layout
9205 ] Deletes an existing float.
9206 This is particularly useful when you want to suppress a float that has
9207 been defined in an input file.
9210 \begin_layout Description
9211 \begin_inset Flex Code
9214 \begin_layout Plain Layout
9221 \begin_inset Flex Code
9224 \begin_layout Plain Layout
9230 ] Deletes an existing style.
9233 \begin_layout Description
9234 \begin_inset Flex Code
9237 \begin_layout Plain Layout
9244 \begin_inset Flex Code
9247 \begin_layout Plain Layout
9253 ] The file format (as defined in the LyX preferences) produced by this document
9255 It is mainly useful when
9256 \begin_inset Flex Code
9259 \begin_layout Plain Layout
9266 \begin_inset Flex Code
9269 \begin_layout Plain Layout
9275 and one wants to define a new type of literate document.
9276 The format is reset to
9277 \begin_inset Quotes eld
9281 \begin_inset Flex Code
9284 \begin_layout Plain Layout
9291 \begin_inset Quotes erd
9295 \begin_inset Quotes eld
9299 \begin_inset Flex Code
9302 \begin_layout Plain Layout
9309 \begin_inset Quotes erd
9312 when the corresponding
9313 \begin_inset Flex Code
9316 \begin_layout Plain Layout
9322 parameter is encountered.
9325 \begin_layout Description
9326 \begin_inset Flex Code
9329 \begin_layout Plain Layout
9336 \begin_inset Flex Code
9339 \begin_layout Plain Layout
9350 \begin_inset Flex Code
9353 \begin_layout Plain Layout
9360 \begin_inset Flex Code
9363 \begin_layout Plain Layout
9369 ] Specifies what sort of output documents using this class will produce.
9372 \begin_layout Description
9373 \begin_inset Flex Code
9376 \begin_layout Plain Layout
9383 \begin_inset Flex Code
9386 \begin_layout Plain Layout
9395 \begin_inset Flex Code
9398 \begin_layout Plain Layout
9405 \begin_inset Flex Code
9408 \begin_layout Plain Layout
9414 ] The default pagestyle.
9415 Can be changed in the
9416 \begin_inset Flex MenuItem
9419 \begin_layout Plain Layout
9420 Document\SpecialChar \menuseparator
9429 \begin_layout Description
9430 \begin_inset Flex Code
9433 \begin_layout Plain Layout
9439 Sets the preamble for the LaTeX document.
9440 Note that this will completely override any prior
9441 \begin_inset Flex Code
9444 \begin_layout Plain Layout
9451 \begin_inset Flex Code
9454 \begin_layout Plain Layout
9462 \begin_inset Flex Code
9465 \begin_layout Plain Layout
9471 if you just want to add material to the preamble.) Must end with
9472 \begin_inset Quotes eld
9476 \begin_inset Flex Code
9479 \begin_layout Plain Layout
9486 \begin_inset Quotes erd
9492 \begin_layout Description
9493 \begin_inset Flex Code
9496 \begin_layout Plain Layout
9503 \begin_inset Flex Code
9506 \begin_layout Plain Layout
9513 \begin_inset Flex Code
9516 \begin_layout Plain Layout
9525 \begin_inset space \thinspace{}
9529 \begin_inset Flex Code
9532 \begin_layout Plain Layout
9538 ] Whether the class already provides the feature
9539 \begin_inset Flex Code
9542 \begin_layout Plain Layout
9549 A feature is in general the name of a package (e.
9550 \begin_inset space \thinspace{}
9554 \begin_inset space \space{}
9558 \begin_inset Flex Code
9561 \begin_layout Plain Layout
9568 \begin_inset Flex Code
9571 \begin_layout Plain Layout
9578 \begin_inset space \thinspace{}
9582 \begin_inset space \space{}
9586 \begin_inset Flex Code
9589 \begin_layout Plain Layout
9596 \begin_inset Flex Code
9599 \begin_layout Plain Layout
9607 \begin_inset space ~
9611 \begin_inset CommandInset ref
9613 reference "chap:List-of-functions"
9617 for the list of features.
9620 \begin_layout Description
9621 \begin_inset Flex Code
9624 \begin_layout Plain Layout
9631 \begin_inset Flex Code
9634 \begin_layout Plain Layout
9640 ] Indicates that this layout provides the functionality of the module mentioned,
9641 which should be specified by the filename without the
9642 \begin_inset Flex Code
9645 \begin_layout Plain Layout
9652 This will typically be used if the layout includes the module directly,
9653 rather than using the
9654 \begin_inset Flex Code
9657 \begin_layout Plain Layout
9663 tag to indicate that it ought to be used.
9664 It could also be used in a module that provided an alternate implementation
9665 of the same functionality.
9668 \begin_layout Description
9669 \begin_inset Flex Code
9672 \begin_layout Plain Layout
9679 \begin_inset Flex Code
9682 \begin_layout Plain Layout
9688 ] Whether the class requires the feature
9689 \begin_inset Flex Code
9692 \begin_layout Plain Layout
9699 Multiple features must be separated by commas.
9700 Note that you can only request supported features.
9702 \begin_inset space ~
9706 \begin_inset CommandInset ref
9708 reference "chap:List-of-functions"
9712 for the list of features.)
9715 \begin_layout Description
9716 \begin_inset Flex Code
9719 \begin_layout Plain Layout
9726 \begin_inset Flex Code
9729 \begin_layout Plain Layout
9735 ] A string that indicates the width of the right margin on the screen, for
9737 \begin_inset Quotes eld
9741 \begin_inset Flex Code
9744 \begin_layout Plain Layout
9751 \begin_inset Quotes erd
9757 \begin_layout Description
9758 \begin_inset Flex Code
9761 \begin_layout Plain Layout
9768 \begin_inset Flex Code
9771 \begin_layout Plain Layout
9777 ] Sets which divisions get numbered.
9779 \begin_inset Newline newline
9783 \begin_inset Flex Code
9786 \begin_layout Plain Layout
9795 \begin_layout Description
9796 \begin_inset Flex Code
9799 \begin_layout Plain Layout
9806 \begin_inset Flex Code
9809 \begin_layout Plain Layout
9818 \begin_inset space \thinspace{}
9822 \begin_inset Flex Code
9825 \begin_layout Plain Layout
9831 ] Whether the class-default should be printing on one or both sides of the
9833 Can be changed in the
9834 \begin_inset Flex MenuItem
9837 \begin_layout Plain Layout
9838 Document\SpecialChar \menuseparator
9847 \begin_layout Description
9848 \begin_inset Flex Code
9851 \begin_layout Plain Layout
9858 \begin_inset Flex Code
9861 \begin_layout Plain Layout
9867 ] This sequence defines a paragraph style.
9868 If the style does not yet exist, it is created; if it does exist, its parameter
9871 \begin_inset Quotes eld
9875 \begin_inset Flex Code
9878 \begin_layout Plain Layout
9885 \begin_inset Quotes erd
9889 \begin_inset Newline newline
9893 \begin_inset space ~
9897 \begin_inset CommandInset ref
9899 reference "sub:Paragraph-Styles"
9903 for details on paragraph styles.
9906 \begin_layout Description
9907 \begin_inset Flex Code
9910 \begin_layout Plain Layout
9917 \begin_inset Flex Code
9920 \begin_layout Plain Layout
9926 ] The name of the command or environment to be used with
9927 \begin_inset Flex Code
9930 \begin_layout Plain Layout
9939 \begin_layout Description
9940 \begin_inset Flex Code
9943 \begin_layout Plain Layout
9950 \begin_inset Flex Code
9953 \begin_layout Plain Layout
9962 \begin_inset Flex Code
9965 \begin_layout Plain Layout
9971 ] Indicates what kind of markup is used to define the title of a document.
9973 \begin_inset Flex Code
9976 \begin_layout Plain Layout
9982 means that the macro with name
9983 \begin_inset Flex Code
9986 \begin_layout Plain Layout
9992 will be inserted after the last layout which has
9993 \begin_inset Quotes eld
9997 \begin_inset Flex Code
10000 \begin_layout Plain Layout
10002 \begin_inset space ~
10011 \begin_inset Quotes erd
10016 \begin_inset Flex Code
10019 \begin_layout Plain Layout
10025 corresponds to the case where all layouts which have
10026 \begin_inset Quotes eld
10030 \begin_inset Flex Code
10033 \begin_layout Plain Layout
10035 \begin_inset space ~
10044 \begin_inset Quotes erd
10047 should be enclosed into the
10048 \begin_inset Flex Code
10051 \begin_layout Plain Layout
10060 \begin_layout Description
10061 \begin_inset Flex Code
10064 \begin_layout Plain Layout
10071 \begin_inset Flex Code
10074 \begin_layout Plain Layout
10080 ] Sets which divisions are included in the table of contents.
10082 \begin_inset Flex Code
10085 \begin_layout Plain Layout
10094 \begin_layout Subsection
10095 \begin_inset Flex Code
10098 \begin_layout Plain Layout
10105 \begin_inset CommandInset label
10107 name "sub:ClassOptions"
10114 \begin_layout Standard
10116 \begin_inset Flex Code
10119 \begin_layout Plain Layout
10125 section can contain the following entries:
10128 \begin_layout Description
10129 \begin_inset Flex Code
10132 \begin_layout Plain Layout
10139 \begin_inset Flex Code
10142 \begin_layout Plain Layout
10148 ] The list of available font sizes for the document's main font, separated
10150 \begin_inset Quotes eld
10154 \begin_inset Flex Code
10157 \begin_layout Plain Layout
10164 \begin_inset Quotes erd
10170 \begin_layout Description
10171 \begin_inset Flex Code
10174 \begin_layout Plain Layout
10180 Used to set the DTD line with XML-based output classes.
10182 \begin_inset space \thinspace{}
10186 \begin_inset Quotes eld
10189 -//OASIS//DTD DocBook V4.2//EN
10190 \begin_inset Quotes erd
10196 \begin_layout Description
10197 \begin_inset Flex Code
10200 \begin_layout Plain Layout
10207 \begin_inset Flex Code
10210 \begin_layout Plain Layout
10211 string="empty|plain|headings|fancy"
10216 ] The list of available page sty\SpecialChar \-
10218 \begin_inset Quotes eld
10222 \begin_inset Flex Code
10225 \begin_layout Plain Layout
10232 \begin_inset Quotes erd
10238 \begin_layout Description
10239 \begin_inset Flex Code
10242 \begin_layout Plain Layout
10249 \begin_inset Flex Code
10252 \begin_layout Plain Layout
10258 ] Some document class options, separated by a comma, that will be added
10259 to the optional part of the
10260 \begin_inset Flex Code
10263 \begin_layout Plain Layout
10274 \begin_layout Standard
10276 \begin_inset Flex Code
10279 \begin_layout Plain Layout
10285 section must end with
10286 \begin_inset Quotes eld
10290 \begin_inset Flex Code
10293 \begin_layout Plain Layout
10300 \begin_inset Quotes erd
10306 \begin_layout Subsection
10308 \begin_inset CommandInset label
10310 name "sub:Paragraph-Styles"
10317 \begin_layout Standard
10318 A paragraph style description looks like this:
10322 \begin_layout Plain Layout
10323 Note that this will either define a new style or modify an existing one.
10331 \begin_layout LyX-Code
10338 \begin_layout LyX-Code
10342 \begin_layout LyX-Code
10346 \begin_layout Standard
10347 where the following commands are allowed:
10350 \begin_layout Description
10351 \begin_inset Flex Code
10354 \begin_layout Plain Layout
10361 \begin_inset Flex Code
10364 \begin_layout Plain Layout
10369 , left, right, center
10374 ] Paragraph alignment.
10377 \begin_layout Description
10378 \begin_inset Flex Code
10381 \begin_layout Plain Layout
10388 \begin_inset Flex Code
10391 \begin_layout Plain Layout
10396 , left, right, center
10401 ] A comma separated list of permitted alignments.
10402 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10404 For example a right-aligned or centered enumeration isn't possible.)
10405 \change_inserted -712698321 1353679769
10409 \begin_layout Description
10411 \change_inserted -712698321 1353680268
10412 \begin_inset Flex Code
10415 \begin_layout Plain Layout
10417 \change_inserted -712698321 1353679781
10424 \begin_inset Flex Code
10427 \begin_layout Plain Layout
10429 \change_inserted -712698321 1353679772
10435 ] Defines argument number <int> of a command\SpecialChar \slash{}
10436 environment associated with
10438 This is useful for things like section headings, and only makes sense with
10440 Every (optional or required) argument of a command or environment -- except
10441 for the required argument that is associated with the content of the paragraph
10442 itself -- has a separate definition, where the number specifies the order
10444 The definition must end with
10445 \begin_inset Flex Code
10448 \begin_layout Plain Layout
10450 \change_inserted -712698321 1353680069
10457 So a command with two optional arguments has:
10461 \begin_layout Quote
10463 \change_inserted -712698321 1353680127
10469 \begin_layout Quote
10471 \change_inserted -712698321 1353680195
10477 \begin_layout Quote
10479 \change_inserted -712698321 1353680135
10485 \begin_layout Quote
10487 \change_inserted -712698321 1353680140
10493 \begin_layout Quote
10495 \change_inserted -712698321 1353680197
10501 \begin_layout Quote
10503 \change_inserted -712698321 1353680147
10509 \begin_layout Standard
10511 \change_inserted -712698321 1353680528
10513 \begin_inset Flex Code
10516 \begin_layout Plain Layout
10518 \change_inserted -712698321 1353680412
10524 definition, the following specifications are possible:
10527 \begin_layout Itemize
10529 \change_inserted -712698321 1355076779
10530 \begin_inset Flex Code
10533 \begin_layout Plain Layout
10535 \change_inserted -712698321 1353680543
10544 \begin_inset Flex Code
10547 \begin_layout Plain Layout
10549 \change_inserted -712698321 1353680567
10555 The string that will appear both in the menu (to insert this argument)
10556 and on the argument inset button (unless you also specify a separate
10557 \begin_inset Flex Code
10560 \begin_layout Plain Layout
10562 \change_inserted -712698321 1355076779
10569 For the menu, you can define an accelerator by appending the respective
10570 character to the string, divided by
10571 \begin_inset Quotes eld
10575 \begin_inset Quotes erd
10579 \begin_inset space \thinspace{}
10584 \begin_inset Flex Code
10587 \begin_layout Plain Layout
10589 \change_inserted -712698321 1353691482
10590 \begin_inset Quotes eld
10594 \begin_inset Quotes erd
10607 \begin_layout Itemize
10609 \change_inserted -712698321 1355076754
10610 \begin_inset Flex Code
10613 \begin_layout Plain Layout
10615 \change_inserted -712698321 1355076658
10622 \begin_inset Flex Code
10625 \begin_layout Plain Layout
10627 \change_inserted -712698321 1355076654
10633 A separate string for the menu.
10634 You can define an accelerator by appending the respective character to
10635 the string, divided by
10636 \begin_inset Quotes eld
10640 \begin_inset Quotes erd
10644 \begin_inset space \thinspace{}
10649 \begin_inset Flex Code
10652 \begin_layout Plain Layout
10654 \change_inserted -712698321 1355076654
10655 \begin_inset Quotes eld
10659 \begin_inset Quotes erd
10668 This specification is optional.
10669 If it is not given the
10670 \begin_inset Flex Code
10673 \begin_layout Plain Layout
10675 \change_inserted -712698321 1355076736
10683 will be used instead for the menu.
10686 \begin_layout Itemize
10688 \change_inserted -712698321 1353680665
10689 \begin_inset Flex Code
10692 \begin_layout Plain Layout
10694 \change_inserted -712698321 1353680616
10701 \begin_inset Flex Code
10704 \begin_layout Plain Layout
10706 \change_inserted -712698321 1353680623
10712 A longer explanatory text that appears in the tooltip when hovering over
10713 the argument inset.
10716 \begin_layout Itemize
10718 \change_inserted -712698321 1353680874
10719 \begin_inset Flex Code
10722 \begin_layout Plain Layout
10724 \change_inserted -712698321 1353680732
10731 \begin_inset Flex Code
10734 \begin_layout Plain Layout
10736 \change_inserted -712698321 1353680738
10742 Declare if this is a mandatory
10743 \change_inserted 2090807402 1353765594
10745 \change_inserted -712698321 1353680874
10747 \change_inserted 2090807402 1353765599
10749 \change_inserted -712698321 1353680874
10751 Mandatory arguments will be output empty if not given, while optional arguments
10752 will not be output at all.
10753 By default, mandatory arguments are delimited by
10754 \begin_inset Flex Code
10757 \begin_layout Plain Layout
10759 \change_inserted -712698321 1353680808
10767 , while optional arguments are delimited by
10768 \begin_inset Flex Code
10771 \begin_layout Plain Layout
10773 \change_inserted -712698321 1353680833
10782 \begin_layout Itemize
10784 \change_inserted -712698321 1353917199
10785 \begin_inset Flex Code
10788 \begin_layout Plain Layout
10790 \change_inserted -712698321 1353680879
10797 \begin_inset Flex Code
10800 \begin_layout Plain Layout
10802 \change_inserted -712698321 1353680874
10808 defines another argument (by its number) which this argument requires to
10809 be output if it is itself output.
10811 \begin_inset space \thinspace{}
10814 g., in LaTeX commands, optional arguments often require previous optional
10815 arguments to be output (at least empty), as in
10816 \begin_inset Flex Code
10819 \begin_layout Plain Layout
10821 \change_inserted -712698321 1353688183
10824 command[][arg]{text}
10832 This can be achieved by the statement
10833 \begin_inset Flex Code
10836 \begin_layout Plain Layout
10838 \change_inserted -712698321 1353681031
10847 \begin_inset Flex Code
10850 \begin_layout Plain Layout
10852 \change_inserted -712698321 1353681045
10863 \begin_layout Itemize
10865 \change_inserted -712698321 1354263104
10866 \begin_inset Flex Code
10869 \begin_layout Plain Layout
10871 \change_inserted -712698321 1353681072
10880 \begin_inset Flex Code
10883 \begin_layout Plain Layout
10885 \change_inserted -712698321 1353681067
10891 defines a custom left delimiter (instead of
10892 \begin_inset Flex Code
10895 \begin_layout Plain Layout
10897 \change_inserted -712698321 1353681127
10906 \begin_inset Flex Code
10909 \begin_layout Plain Layout
10911 \change_inserted -712698321 1353681133
10920 A line break in the output can be indicated by
10921 \begin_inset Flex Code
10924 \begin_layout Plain Layout
10926 \change_inserted -712698321 1354263104
10937 \begin_layout Itemize
10939 \change_inserted -712698321 1355144479
10940 \begin_inset Flex Code
10943 \begin_layout Plain Layout
10945 \change_inserted -712698321 1353681149
10952 \begin_inset Flex Code
10955 \begin_layout Plain Layout
10957 \change_inserted -712698321 1353681146
10963 defines a custom right delimiter (instead of
10964 \begin_inset Flex Code
10967 \begin_layout Plain Layout
10969 \change_inserted -712698321 1353681158
10976 \begin_inset Flex Code
10979 \begin_layout Plain Layout
10981 \change_inserted -712698321 1353681161
10988 A line break in the output can be indicated by
10989 \begin_inset Flex Code
10992 \begin_layout Plain Layout
10994 \change_inserted -712698321 1354263106
11003 \begin_layout Itemize
11005 \change_inserted -712698321 1355144578
11006 \begin_inset Flex Code
11009 \begin_layout Plain Layout
11011 \change_inserted -712698321 1355144487
11020 \begin_inset Flex Code
11023 \begin_layout Plain Layout
11025 \change_inserted -712698321 1355144500
11031 defines an argument that is inserted in any case (alone or in addition
11032 to user-specified arguments).
11033 Multiple arguments need to be separated by comma.
11038 \begin_layout Itemize
11040 \change_inserted -712698321 1353917320
11041 \begin_inset Flex Code
11044 \begin_layout Plain Layout
11046 \change_inserted -712698321 1353917320
11052 The font used for the argument content.
11054 \begin_inset space ~
11058 \begin_inset CommandInset ref
11060 reference "sub:Font-description"
11067 \begin_layout Itemize
11069 \change_inserted -712698321 1353917320
11070 \begin_inset Flex Code
11073 \begin_layout Plain Layout
11075 \change_inserted -712698321 1353917320
11081 The font used for the label.
11083 \begin_inset space ~
11087 \begin_inset CommandInset ref
11089 reference "sub:Font-description"
11096 \begin_layout Itemize
11098 \change_inserted -712698321 1355661048
11099 \begin_inset Flex Code
11102 \begin_layout Plain Layout
11104 \change_inserted -712698321 1353917320
11111 \begin_inset Flex Code
11114 \begin_layout Plain Layout
11116 \change_inserted -712698321 1353917320
11123 \begin_inset Flex Code
11126 \begin_layout Plain Layout
11128 \change_inserted -712698321 1353917320
11135 \begin_inset Flex Code
11138 \begin_layout Plain Layout
11140 \change_inserted -712698321 1353917320
11146 , describing the rendering style used for the inset's frame and buttons.
11148 \begin_inset Flex Code
11151 \begin_layout Plain Layout
11153 \change_inserted -712698321 1353917320
11162 \begin_layout Itemize
11164 \change_inserted -712698321 1355747298
11165 \begin_inset Flex Code
11168 \begin_layout Plain Layout
11170 \change_inserted -712698321 1355661057
11177 \begin_inset Flex Code
11180 \begin_layout Plain Layout
11182 \change_inserted -712698321 1355661049
11189 \begin_inset Flex Code
11192 \begin_layout Plain Layout
11194 \change_inserted -712698321 1355661077
11202 , this argument is automatically inserted when the respective style is selected.
11203 Currently, only one argument per style\SpecialChar \slash{}
11204 layout can be automatically inserted.
11205 \change_inserted 155139281 1354198988
11209 \begin_layout Standard
11211 \change_inserted -712698321 1356689813
11212 By default, the text entered in the LyX workarea in the respective layout
11213 is the last (mandatory) argument of a command if the
11214 \begin_inset Flex Code
11217 \begin_layout Plain Layout
11219 \change_inserted -712698321 1356689619
11228 \begin_inset Flex Code
11231 \begin_layout Plain Layout
11233 \change_inserted -712698321 1356689629
11242 However, arguments with the prefix
11243 \begin_inset Flex Code
11246 \begin_layout Plain Layout
11248 \change_inserted -712698321 1356689679
11256 are output after this workarea argument.
11257 Note that post-argument numbering restarts at 1, so the first argument
11258 following the workarea argument is
11259 \begin_inset Flex Code
11262 \begin_layout Plain Layout
11264 \change_inserted -712698321 1356689813
11273 Post-arguments are ignored in any other
11274 \begin_inset Flex Code
11277 \begin_layout Plain Layout
11279 \change_inserted -712698321 1356689801
11286 \begin_inset Flex Code
11289 \begin_layout Plain Layout
11291 \change_inserted -712698321 1356689801
11302 \begin_layout Standard
11304 \change_inserted 155139281 1354199102
11306 \begin_inset Flex Code
11309 \begin_layout Plain Layout
11311 \change_inserted 155139281 1354199013
11322 \begin_inset Flex Code
11325 \begin_layout Plain Layout
11327 \change_inserted 155139281 1354199102
11338 \begin_inset Flex Code
11341 \begin_layout Plain Layout
11343 \change_inserted 155139281 1354199044
11351 followed by the number (e.
11352 \begin_inset space \thinspace{}
11357 \begin_inset Flex Code
11360 \begin_layout Plain Layout
11362 \change_inserted 155139281 1354199064
11376 \begin_layout Description
11377 \begin_inset Flex Code
11380 \begin_layout Plain Layout
11386 Note that this will completely override any prior
11387 \begin_inset Flex Code
11390 \begin_layout Plain Layout
11396 declaration for this style.
11398 \begin_inset Quotes eld
11402 \begin_inset Flex Code
11405 \begin_layout Plain Layout
11412 \begin_inset Quotes erd
11417 \begin_inset space ~
11421 \begin_inset CommandInset ref
11423 reference "sub:I18n"
11427 for details on its use.
11430 \begin_layout Description
11431 \begin_inset Flex Code
11434 \begin_layout Plain Layout
11441 \begin_inset Flex Code
11444 \begin_layout Plain Layout
11454 \begin_layout Plain Layout
11455 Note that a `float' here is a real number, such as: 1.5.
11460 The vertical space with which the last of a chain of paragraphs with this
11461 style is separated from the following paragraph.
11462 If the next paragraph has another style, the separations are not simply
11463 added, but the maximum is taken.
11466 \begin_layout Description
11467 \begin_inset Flex Code
11470 \begin_layout Plain Layout
11477 \begin_inset Flex Code
11480 \begin_layout Plain Layout
11486 ] The category for this style.
11487 This is used to group related styles in the style combobox on the toolbar.
11488 Any string can be used, but you may want to use existing categories with
11493 \begin_layout Description
11494 \begin_inset Flex Code
11497 \begin_layout Plain Layout
11503 Depth of XML command.
11504 Used only with XML-type formats.
11507 \begin_layout Description
11508 \begin_inset Flex Code
11511 \begin_layout Plain Layout
11518 \begin_inset Flex Code
11521 \begin_layout Plain Layout
11527 ] Copies all the features of an existing style into the current one.
11531 \begin_layout Description
11532 \begin_inset Flex Code
11535 \begin_layout Plain Layout
11542 \begin_inset Flex Code
11545 \begin_layout Plain Layout
11551 ] The name of a style whose preamble should be output
11556 This allows to ensure some ordering of the preamble snippets when macros
11557 definitions depend on one another.
11561 \begin_layout Plain Layout
11562 Note that, besides that functionality, there is no way to ensure any ordering
11564 The ordering that you see in a given version of LyX may change without
11565 warning in later versions.
11573 \begin_layout Description
11574 \begin_inset Flex Code
11577 \begin_layout Plain Layout
11584 \begin_inset Flex Code
11587 \begin_layout Plain Layout
11592 , Box, Filled_Box, Static
11597 ] The type of label that stands at the end of the paragraph (or sequence
11599 \begin_inset Flex Code
11602 \begin_layout Plain Layout
11609 \begin_inset Newline newline
11613 \begin_inset Flex Code
11616 \begin_layout Plain Layout
11623 \begin_inset Flex Code
11626 \begin_layout Plain Layout
11633 \begin_inset Flex Code
11636 \begin_layout Plain Layout
11644 \begin_inset Flex Code
11647 \begin_layout Plain Layout
11654 \begin_inset Quotes eld
11658 \begin_inset Quotes erd
11662 \begin_inset Flex Code
11665 \begin_layout Plain Layout
11672 \begin_inset space \space{}
11676 \begin_inset Flex Code
11679 \begin_layout Plain Layout
11685 ) is a white (resp.
11686 \begin_inset space ~
11689 black) square suitable for end of proof markers,
11690 \begin_inset Flex Code
11693 \begin_layout Plain Layout
11699 is an explicit text string.
11702 \begin_layout Description
11703 \begin_inset Flex Code
11706 \begin_layout Plain Layout
11713 \begin_inset Flex Code
11716 \begin_layout Plain Layout
11722 ] The string used for a label with a
11723 \begin_inset Flex Code
11726 \begin_layout Plain Layout
11733 \begin_inset Newline newline
11737 \begin_inset Flex Code
11740 \begin_layout Plain Layout
11750 \begin_layout Description
11751 \begin_inset Flex Code
11754 \begin_layout Plain Layout
11760 The font used for both the text body
11766 \begin_inset space ~
11770 \begin_inset CommandInset ref
11772 reference "sub:Font-description"
11777 Note that defining this font automatically defines the
11778 \begin_inset Flex Code
11781 \begin_layout Plain Layout
11788 So you should define this one first if you also want to define
11789 \begin_inset Flex Code
11792 \begin_layout Plain Layout
11801 \begin_layout Description
11802 \begin_inset Flex Code
11805 \begin_layout Plain Layout
11812 \begin_inset Flex Code
11815 \begin_layout Plain Layout
11824 \begin_inset space \thinspace{}
11828 \begin_inset Flex Code
11831 \begin_layout Plain Layout
11837 ] Usually LyX does not allow you to insert more than one space between words,
11838 since a space is considered as the separation between two words, not a
11839 character or symbol of its own.
11840 This is a very fine thing but sometimes annoying, for example, when typing
11841 program code or plain LaTeX code.
11843 \begin_inset Flex Code
11846 \begin_layout Plain Layout
11853 Note that LyX will create protected blanks for the additional blanks when
11854 in another mode than LaTeX-mode.
11857 \begin_layout Description
11858 \begin_inset Flex Code
11861 \begin_layout Plain Layout
11867 These tags are used with XHTML output.
11869 \begin_inset CommandInset ref
11871 reference "sub:Paragraph-Style-XHTML"
11878 \begin_layout Description
11879 \begin_inset Flex Code
11882 \begin_layout Plain Layout
11888 [FIXME] (Used only with XML-type formats.)
11891 \begin_layout Description
11892 \begin_inset Flex Code
11895 \begin_layout Plain Layout
11902 \begin_inset Flex Code
11905 \begin_layout Plain Layout
11914 \begin_inset space \thinspace{}
11918 \begin_inset Flex Code
11921 \begin_layout Plain Layout
11928 \begin_inset Flex Code
11931 \begin_layout Plain Layout
11937 , marks the style as to be included in the document preamble and not in
11939 This is useful for document classes that want such information as the title
11940 and author to appear in the preamble.
11941 Note that this works only for styles for which the
11942 \begin_inset Flex Code
11945 \begin_layout Plain Layout
11952 \begin_inset Flex Code
11955 \begin_layout Plain Layout
11962 \begin_inset Flex Code
11965 \begin_layout Plain Layout
11974 \begin_layout Description
11975 \begin_inset Flex Code
11978 \begin_layout Plain Layout
11985 \begin_inset Flex Code
11988 \begin_layout Plain Layout
11997 \begin_inset space \thinspace{}
12001 \begin_inset Flex Code
12004 \begin_layout Plain Layout
12011 \begin_inset Flex Code
12014 \begin_layout Plain Layout
12020 , marks the style as being part of a title block (see also the
12021 \begin_inset Flex Code
12024 \begin_layout Plain Layout
12031 \begin_inset Flex Code
12034 \begin_layout Plain Layout
12043 \begin_layout Description
12045 \change_inserted -712698321 1355932296
12046 \begin_inset Flex Code
12049 \begin_layout Plain Layout
12051 \change_inserted -712698321 1355932178
12058 \begin_inset Flex Code
12061 \begin_layout Plain Layout
12063 \change_inserted -712698321 1355932181
12069 ] The LaTeX command sequence declaring an item in a list.
12070 The command is to be defined without the preceding backslash (the default
12072 \begin_inset Quotes eld
12076 \begin_inset Quotes erd
12080 \begin_inset Flex Code
12083 \begin_layout Plain Layout
12085 \change_inserted -712698321 1355932279
12095 in the LaTeX output).
12098 \begin_layout Description
12099 \begin_inset Flex Code
12102 \begin_layout Plain Layout
12109 \begin_inset Flex Code
12112 \begin_layout Plain Layout
12118 ] This provides extra space between paragraphs that have the same style.
12119 If you put other styles into an environment, each is separated with the
12121 \begin_inset Flex Code
12124 \begin_layout Plain Layout
12131 But the whole items of the environment are additionally separated with
12133 \begin_inset Flex Code
12136 \begin_layout Plain Layout
12143 Note that this is a
12148 \begin_layout Description
12149 \begin_inset Flex Code
12152 \begin_layout Plain Layout
12158 [FIXME] (Used only with XML-type formats.)
12161 \begin_layout Description
12162 \begin_inset Flex Code
12165 \begin_layout Plain Layout
12172 \begin_inset Flex Code
12175 \begin_layout Plain Layout
12184 \begin_inset space \thinspace{}
12188 \begin_inset Flex Code
12191 \begin_layout Plain Layout
12197 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12198 lead to empty LaTeX output.
12199 There are some cases where this could be desirable however: in a letter
12200 template, the required fields can be provided as empty fields, so that
12201 people do not forget them; in some special classes, a style can be used
12202 as some kind of break, which does not contain actual text.
12205 \begin_layout Description
12206 \begin_inset Flex Code
12209 \begin_layout Plain Layout
12216 \begin_inset Flex Code
12219 \begin_layout Plain Layout
12225 ] The vertical space between the label and the text body.
12226 Only used for labels that are above the text body (
12227 \begin_inset Flex Code
12230 \begin_layout Plain Layout
12237 \begin_inset Newline newline
12241 \begin_inset Flex Code
12244 \begin_layout Plain Layout
12245 Centered_Top_Environment
12253 \begin_layout Description
12254 \begin_inset Flex Code
12257 \begin_layout Plain Layout
12264 \begin_inset Flex Code
12267 \begin_layout Plain Layout
12273 ] The name of the counter for automatic numbering.
12274 \begin_inset Newline newline
12282 \begin_inset Flex Code
12285 \begin_layout Plain Layout
12292 \begin_inset Flex Code
12295 \begin_layout Plain Layout
12302 In that case, the counter will be stepped each time the style appears.
12303 \begin_inset Newline newline
12311 \begin_inset Flex Code
12314 \begin_layout Plain Layout
12321 \begin_inset Flex Code
12324 \begin_layout Plain Layout
12330 , though this case is a bit complicated.
12331 Suppose you declare
12332 \begin_inset Quotes eld
12336 \begin_inset Flex Code
12339 \begin_layout Plain Layout
12340 LabelCounter myenum
12346 \begin_inset Quotes erd
12350 Then the actual counters used are
12351 \begin_inset Flex Code
12354 \begin_layout Plain Layout
12361 \begin_inset Flex Code
12364 \begin_layout Plain Layout
12371 \begin_inset Flex Code
12374 \begin_layout Plain Layout
12381 \begin_inset Flex Code
12384 \begin_layout Plain Layout
12390 , much as in LaTeX.
12391 These counters must all be declared separately.
12392 \begin_inset Newline newline
12396 \begin_inset CommandInset ref
12398 reference "sub:Counters"
12402 for details on counters.
12405 \begin_layout Description
12406 \begin_inset Flex Code
12409 \begin_layout Plain Layout
12415 The font used for the label.
12417 \begin_inset space ~
12421 \begin_inset CommandInset ref
12423 reference "sub:Font-description"
12430 \begin_layout Description
12431 \begin_inset Flex Code
12434 \begin_layout Plain Layout
12441 \begin_inset Flex Code
12444 \begin_layout Plain Layout
12450 ] Text that indicates how far a label should be indented.
12453 \begin_layout Description
12454 \begin_inset Flex Code
12457 \begin_layout Plain Layout
12464 \begin_inset Flex Code
12467 \begin_layout Plain Layout
12473 ] Text that indicates the amount of horizontal space between the label and
12475 Only used for labels that are not above the text body.
12478 \begin_layout Description
12479 \begin_inset Flex Code
12482 \begin_layout Plain Layout
12489 \begin_inset Flex Code
12492 \begin_layout Plain Layout
12498 ] The string used for a label with a
12499 \begin_inset Flex Code
12502 \begin_layout Plain Layout
12509 \begin_inset Flex Code
12512 \begin_layout Plain Layout
12520 \begin_inset Flex Code
12523 \begin_layout Plain Layout
12529 is set, this string can be contain the special formatting commands described
12531 \begin_inset CommandInset ref
12533 reference "sub:Counters"
12540 \begin_layout Description
12541 \begin_inset Flex Code
12544 \begin_layout Plain Layout
12545 LabelStringAppendix
12551 \begin_inset Flex Code
12554 \begin_layout Plain Layout
12560 ] This is used inside the appendix instead of
12561 \begin_inset Newline newline
12565 \begin_inset Flex Code
12568 \begin_layout Plain Layout
12576 \begin_inset Flex Code
12579 \begin_layout Plain Layout
12586 \begin_inset Newline newline
12590 \begin_inset Flex Code
12593 \begin_layout Plain Layout
12594 LabelStringAppendix
12602 \begin_layout Description
12603 \begin_inset Flex Code
12606 \begin_layout Plain Layout
12612 [FIXME] (Used only with XML-type formats.)
12615 \begin_layout Description
12616 \begin_inset Flex Code
12619 \begin_layout Plain Layout
12626 \begin_inset Flex Code
12629 \begin_layout Plain Layout
12634 , Manual, Static, Top_Environment,
12635 \begin_inset Newline newline
12638 Centered_Top_Environment, Counter, Sensitive, Enumerate,
12639 \begin_inset Newline newline
12642 Itemize, Bibliography
12651 \begin_layout Description
12652 \begin_inset Flex Code
12655 \begin_layout Plain Layout
12661 means the label is the very first word (up to the first real blank).
12662 Use protected spaces if you want more than one word as the label.
12666 \begin_layout Description
12667 \begin_inset Flex Code
12670 \begin_layout Plain Layout
12676 means the label is simply what is declared as
12677 \begin_inset Flex Code
12680 \begin_layout Plain Layout
12687 Note that this really is `static'.
12690 \begin_layout Description
12691 \begin_inset Flex Code
12694 \begin_layout Plain Layout
12701 \begin_inset space ~
12705 \begin_inset space ~
12709 \begin_inset Flex Code
12712 \begin_layout Plain Layout
12713 Centered_Top_Environment
12718 are special cases of
12719 \begin_inset Flex Code
12722 \begin_layout Plain Layout
12729 The label will be printed above the paragraph, but only at the top of an
12730 environment or the top of a chain of paragraphs with this style.
12731 This might be used with the
12732 \begin_inset Flex MenuItem
12735 \begin_layout Plain Layout
12741 style, for example.
12744 \begin_layout Description
12745 \begin_inset Flex Code
12748 \begin_layout Plain Layout
12754 is a special case for the caption-labels
12755 \begin_inset Quotes eld
12759 \begin_inset Quotes erd
12763 \begin_inset Quotes eld
12767 \begin_inset Quotes erd
12771 \begin_inset Newline newline
12775 \begin_inset Flex Code
12778 \begin_layout Plain Layout
12784 means the (hardcoded) label string depends on the kind of float: It is
12785 hardcoded to be `FloatType N', where N is the value of the counter associated
12789 \begin_layout Description
12790 \begin_inset Flex Code
12793 \begin_layout Plain Layout
12799 defines automatically numbered labels.
12801 \begin_inset Flex Code
12804 \begin_layout Plain Layout
12810 will be expanded to contain any counters: So the result will for example
12812 \begin_inset Quotes eld
12816 \begin_inset Flex Code
12819 \begin_layout Plain Layout
12830 \begin_inset Quotes erd
12835 \begin_inset space ~
12839 \begin_inset CommandInset ref
12841 reference "sub:Counters"
12845 for more information on counters.
12848 \begin_layout Description
12849 \begin_inset Flex Code
12852 \begin_layout Plain Layout
12858 produces the usual sort of enumeration labels.
12859 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12860 small Roman numerals, and uppercase letters for the four possible depths.
12863 \begin_layout Description
12864 \begin_inset Flex Code
12867 \begin_layout Plain Layout
12873 produces various bullets at the different levels.
12874 It is also hardcoded.
12877 \begin_layout Description
12878 \begin_inset Flex Code
12881 \begin_layout Plain Layout
12887 is used internally by LyX and should be used only with
12888 \begin_inset Flex Code
12891 \begin_layout Plain Layout
12892 LatexType BibEnvironment
12901 \begin_layout Description
12902 \begin_inset Flex Code
12905 \begin_layout Plain Layout
12911 Note that this will completely override any prior
12912 \begin_inset Flex Code
12915 \begin_layout Plain Layout
12921 declaration for this style.
12923 \begin_inset Quotes eld
12927 \begin_inset Flex Code
12930 \begin_layout Plain Layout
12937 \begin_inset Quotes erd
12942 \begin_inset CommandInset ref
12944 reference "sub:I18n"
12948 for details on its use.
12951 \begin_layout Description
12952 \begin_inset Flex Code
12955 \begin_layout Plain Layout
12962 \begin_inset Flex Code
12965 \begin_layout Plain Layout
12971 ] The name of the corresponding LaTeX stuff.
12972 Either the environment or command name.
12975 \begin_layout Description
12976 \begin_inset Flex Code
12979 \begin_layout Plain Layout
12986 \begin_inset Flex Code
12989 \begin_layout Plain Layout
12995 ] An optional parameter for the corresponding
12996 \begin_inset Flex Code
12999 \begin_layout Plain Layout
13006 This parameter cannot be changed from within LyX
13007 \change_inserted -712698321 1355144804
13009 \begin_inset Flex Code
13012 \begin_layout Plain Layout
13014 \change_inserted -712698321 1355144804
13020 for customizable parameters)
13024 \change_inserted -712698321 1355144804
13025 This will be output as is after all LaTeX
13026 \begin_inset Flex Code
13029 \begin_layout Plain Layout
13031 \change_inserted -712698321 1355144658
13044 \begin_layout Description
13045 \begin_inset Flex Code
13048 \begin_layout Plain Layout
13055 \begin_inset Flex Code
13058 \begin_layout Plain Layout
13063 , Command, Environment, Item_Environment,
13064 \begin_inset Newline newline
13067 List_Environment, Bib_Environment
13072 ] How the style should be translated into LaTeX.
13076 \begin_layout Plain Layout
13077 \begin_inset Flex Code
13080 \begin_layout Plain Layout
13086 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13087 Visit the SGML class files for specific examples.
13096 \begin_layout Description
13097 \begin_inset Flex Code
13100 \begin_layout Plain Layout
13106 means nothing special.
13109 \begin_layout Description
13110 \begin_inset Flex Code
13113 \begin_layout Plain Layout
13120 \begin_inset Flex Code
13123 \begin_layout Plain Layout
13130 {\SpecialChar \ldots{}
13139 \begin_layout Description
13140 \begin_inset Flex Code
13143 \begin_layout Plain Layout
13150 \begin_inset Flex Code
13153 \begin_layout Plain Layout
13160 }\SpecialChar \ldots{}
13176 \begin_layout Description
13177 \begin_inset Flex Code
13180 \begin_layout Plain Layout
13187 \begin_inset Flex Code
13190 \begin_layout Plain Layout
13197 \begin_inset Flex Code
13200 \begin_layout Plain Layout
13208 is generated for each paragraph of this environment.
13212 \begin_layout Description
13213 \begin_inset Flex Code
13216 \begin_layout Plain Layout
13223 \begin_inset Flex Code
13226 \begin_layout Plain Layout
13233 \begin_inset Newline newline
13237 \begin_inset Flex Code
13240 \begin_layout Plain Layout
13246 is passed as an argument to the environment.
13247 \begin_inset Newline newline
13251 \begin_inset Flex Code
13254 \begin_layout Plain Layout
13260 can be defined in the
13261 \begin_inset Flex MenuItem
13264 \begin_layout Plain Layout
13265 Edit\SpecialChar \menuseparator
13267 \begin_inset space ~
13278 \begin_layout Description
13279 \begin_inset Flex Code
13282 \begin_layout Plain Layout
13289 \begin_inset Flex Code
13292 \begin_layout Plain Layout
13298 but adds additionally the necessary mandatory argument to the begin statement
13299 of the bibliography environment:
13300 \begin_inset Newline newline
13304 \begin_inset Flex Code
13307 \begin_layout Plain Layout
13310 begin{thebibliography}{99}
13315 It is therefore only useful for bibliography environments.
13318 \begin_layout Standard
13319 Putting the last few things together, the LaTeX output will be either:
13322 \begin_layout LyX-Code
13325 LatexName[LatexParam]{\SpecialChar \ldots{}
13329 \begin_layout Standard
13333 \begin_layout LyX-Code
13336 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13342 \begin_layout Standard
13343 depending upon the LaTeX type.
13347 \begin_layout Description
13349 \change_inserted -712698321 1354263086
13350 \begin_inset Flex Code
13353 \begin_layout Plain Layout
13355 \change_inserted -712698321 1353866852
13362 \begin_inset Flex Code
13365 \begin_layout Plain Layout
13367 \change_inserted -712698321 1353866852
13373 ] A string that is put at the beginning of the style content.
13374 A line break in the output can be indicated by
13375 \begin_inset Flex Code
13378 \begin_layout Plain Layout
13380 \change_inserted -712698321 1354263086
13391 \begin_layout Description
13392 \begin_inset Flex Code
13395 \begin_layout Plain Layout
13402 \begin_inset Flex Code
13405 \begin_layout Plain Layout
13411 ] If you put styles into environments, the different
13412 \begin_inset Flex Code
13415 \begin_layout Plain Layout
13421 are not simply added, but added with a factor
13422 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13426 Note that this parameter is also used when
13427 \begin_inset Flex Code
13430 \begin_layout Plain Layout
13437 \begin_inset Flex Code
13440 \begin_layout Plain Layout
13447 \begin_inset Flex Code
13450 \begin_layout Plain Layout
13457 Then it is added to the manual or dynamic margin.
13458 \begin_inset Newline newline
13462 \begin_inset Quotes eld
13466 \begin_inset Flex Code
13469 \begin_layout Plain Layout
13476 \begin_inset Quotes erd
13479 means that the paragraph is indented with the width of
13480 \begin_inset Quotes eld
13484 \begin_inset Flex Code
13487 \begin_layout Plain Layout
13494 \begin_inset Quotes erd
13497 in the normal font.
13498 You can get a negative width by prefixing the string with
13499 \begin_inset Quotes eld
13503 \begin_inset Flex Code
13506 \begin_layout Plain Layout
13513 \begin_inset Quotes erd
13517 This way was chosen so that the look is the same with each used screen
13521 \begin_layout Description
13522 \begin_inset Flex Code
13525 \begin_layout Plain Layout
13532 \begin_inset Flex Code
13535 \begin_layout Plain Layout
13540 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13546 \begin_inset Newline newline
13549 The kind of margin that the style has on the left side.
13553 \begin_layout Description
13554 \begin_inset Flex Code
13557 \begin_layout Plain Layout
13563 just means a fixed margin.
13566 \begin_layout Description
13567 \begin_inset Flex Code
13570 \begin_layout Plain Layout
13576 means that the left margin depends on the string entered in the
13577 \begin_inset Flex MenuItem
13580 \begin_layout Plain Layout
13581 Edit\SpecialChar \menuseparator
13583 \begin_inset space ~
13592 This is used to typeset nice lists without tabulators.
13595 \begin_layout Description
13596 \begin_inset Flex Code
13599 \begin_layout Plain Layout
13605 means that the margin depends on the size of the label.
13606 This is used for automatic enumerated headlines.
13607 It is obvious that the headline
13608 \begin_inset Quotes eld
13611 5.4.3.2.1 Very long headline
13612 \begin_inset Quotes erd
13615 must have a wider left margin (as wide as
13616 \begin_inset Quotes eld
13620 \begin_inset Quotes erd
13623 plus the space) than
13624 \begin_inset Quotes eld
13627 3.2 Very long headline
13628 \begin_inset Quotes erd
13632 \begin_inset Quotes eld
13636 \begin_inset Quotes erd
13639 are not able to do this.
13642 \begin_layout Description
13643 \begin_inset Flex Code
13646 \begin_layout Plain Layout
13652 is similar, but only the very first row of the paragraph is dynamic, while
13653 the others are static; this is used, for example, for descriptions.
13656 \begin_layout Description
13657 \begin_inset Flex Code
13660 \begin_layout Plain Layout
13666 means the margin is chosen in a way that the longest row of this paragraph
13667 fits to the right margin.
13668 This is used to typeset an address on the right edge of the page.
13672 \begin_layout Description
13673 \begin_inset Flex Code
13676 \begin_layout Plain Layout
13683 \begin_inset Flex Code
13686 \begin_layout Plain Layout
13695 \begin_inset space \thinspace{}
13699 \begin_inset Flex Code
13702 \begin_layout Plain Layout
13708 ] Whether fragile commands in this style should be
13709 \begin_inset Flex Code
13712 \begin_layout Plain Layout
13725 whether this command should itself be protected.)
13728 \begin_layout Description
13729 \begin_inset Flex Code
13732 \begin_layout Plain Layout
13739 \begin_inset Flex Code
13742 \begin_layout Plain Layout
13749 \begin_inset space \thinspace{}
13753 \begin_inset Flex Code
13756 \begin_layout Plain Layout
13764 ] Whether newlines are translated into LaTeX newlines (
13765 \begin_inset Flex Code
13768 \begin_layout Plain Layout
13779 The translation can be switched off to allow more comfortable LaTeX editing
13783 \begin_layout Description
13784 \begin_inset Flex Code
13787 \begin_layout Plain Layout
13794 \begin_inset Flex Code
13797 \begin_layout Plain Layout
13806 \begin_inset space \thinspace{}
13810 \begin_inset Flex Code
13813 \begin_layout Plain Layout
13819 ] If set to true, and if
13820 \begin_inset Flex Code
13823 \begin_layout Plain Layout
13830 \begin_inset Flex Code
13833 \begin_layout Plain Layout
13839 ) paragraphs are being indented, then the indentation of such a paragraph
13840 following one of this type will be suppressed.
13841 (So this will not affect the display of non-default paragraphs.)
13844 \begin_layout Description
13845 \begin_inset Flex Code
13848 \begin_layout Plain Layout
13855 \begin_inset Flex Code
13858 \begin_layout Plain Layout
13864 ] Name of a style that has replaced this style.
13865 This is used to rename a style, while keeping backward compatibility.
13868 \begin_layout Description
13870 \change_deleted -712698321 1353679722
13871 \begin_inset Flex Code
13874 \begin_layout Plain Layout
13881 \begin_inset Flex Code
13884 \begin_layout Plain Layout
13890 ] The number of optional arguments that can be used with this style.
13891 This is useful for things like section headings, and only makes sense with
13893 Note that, on output, the optional arguments will all precede any required
13894 arguments (see below).
13895 So one can have constructs like:
13899 \begin_layout LyX-Code
13901 \change_deleted -712698321 1353679722
13904 mycmd[opt1]{req1}{contents of paragraph}
13907 \begin_layout Standard
13909 \change_deleted -712698321 1353679722
13910 but one cannot have things like:
13913 \begin_layout LyX-Code
13915 \change_deleted -712698321 1353679722
13918 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13921 \begin_layout Standard
13923 \change_deleted -712698321 1353679722
13924 at least, not without ERT (with which you can have anything).
13931 \begin_layout Description
13932 \begin_inset Flex Code
13935 \begin_layout Plain Layout
13942 \begin_inset Flex Code
13945 \begin_layout Plain Layout
13954 \begin_inset space \thinspace{}
13958 \begin_inset Flex Code
13961 \begin_layout Plain Layout
13967 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13968 output, but only by a line break; together with
13969 \begin_inset Flex Code
13972 \begin_layout Plain Layout
13978 , this allows to emulate a plain text editor (like the ERT inset).
13981 \begin_layout Description
13982 \begin_inset Flex Code
13985 \begin_layout Plain Layout
13992 \begin_inset Flex Code
13995 \begin_layout Plain Layout
14001 ] The indent of the very first line of a paragraph.
14003 \begin_inset Newline newline
14007 \begin_inset Flex Code
14010 \begin_layout Plain Layout
14016 will be fixed for a certain style.
14017 The exception is the default style, since the indentation for these paragraphs
14018 can be prohibited with
14019 \begin_inset Flex Code
14022 \begin_layout Plain Layout
14030 \begin_inset Flex Code
14033 \begin_layout Plain Layout
14039 style paragraphs inside environments use the
14040 \begin_inset Flex Code
14043 \begin_layout Plain Layout
14049 of the environment, not their native one.
14051 \begin_inset Flex Code
14054 \begin_layout Plain Layout
14060 paragraphs inside an enumeration are not indented.
14063 \begin_layout Description
14064 \begin_inset Flex Code
14067 \begin_layout Plain Layout
14074 \begin_inset Flex Code
14077 \begin_layout Plain Layout
14083 ] The vertical space between two paragraphs of this style.
14086 \begin_layout Description
14087 \begin_inset Flex Code
14090 \begin_layout Plain Layout
14097 \begin_inset Flex Code
14100 \begin_layout Plain Layout
14106 ] LyX allows the user to choose either
14107 \begin_inset Quotes eld
14111 \begin_inset Quotes erd
14115 \begin_inset Quotes eld
14119 \begin_inset Quotes erd
14122 to separate paragraphs.
14124 \begin_inset Quotes eld
14128 \begin_inset Quotes erd
14132 \begin_inset Flex Code
14135 \begin_layout Plain Layout
14143 \begin_inset Quotes eld
14147 \begin_inset Quotes erd
14151 \begin_inset Flex Code
14154 \begin_layout Plain Layout
14160 is ignored and all paragraphs are separated by the
14161 \begin_inset Flex Code
14164 \begin_layout Plain Layout
14171 The vertical space is calculated with
14172 \begin_inset Flex Code
14175 \begin_layout Plain Layout
14177 \begin_inset space ~
14186 \begin_inset Flex Code
14189 \begin_layout Plain Layout
14195 is the height of a row with the normal font.
14196 This way, the look stays the same with different screen fonts.
14199 \begin_layout Description
14200 \begin_inset Flex Code
14203 \begin_layout Plain Layout
14210 \begin_inset Flex Code
14213 \begin_layout Plain Layout
14222 \begin_inset space \thinspace{}
14226 \begin_inset Flex Code
14229 \begin_layout Plain Layout
14235 ] Whether the contents of this paragraph should be output in raw form, meaning
14236 without special translations that LaTeX would require.
14239 \begin_layout Description
14240 \begin_inset Flex Code
14243 \begin_layout Plain Layout
14249 Information to be included in the LaTeX preamble when this style is used.
14250 Used to define macros, load packages, etc., required by this particular
14253 \begin_inset Quotes eld
14257 \begin_inset Flex Code
14260 \begin_layout Plain Layout
14267 \begin_inset Quotes erd
14273 \begin_layout Description
14274 \begin_inset Flex Code
14277 \begin_layout Plain Layout
14284 \begin_inset Flex Code
14287 \begin_layout Plain Layout
14293 ] The prefix to use when creating labels referring to paragraphs of this
14295 This allows the use of formatted references.
14298 \begin_layout Description
14300 \change_deleted -712698321 1353681258
14301 \begin_inset Flex Code
14304 \begin_layout Plain Layout
14311 \begin_inset Flex Code
14314 \begin_layout Plain Layout
14320 ] The number of required arguments that the LaTeX command or environment
14321 corresponding to this style expects.
14322 In the case of a command, these are required arguments
14326 that associated with the content of the paragraph itself.
14327 These do not actually have to be provided: LyX will output empty arguments
14329 Note that optional arguments will be output before required arguments.
14330 See the discussion of the
14331 \begin_inset Flex Code
14334 \begin_layout Plain Layout
14340 tag above for more information.
14345 \begin_layout Description
14346 \begin_inset Flex Code
14349 \begin_layout Plain Layout
14356 \begin_inset Flex Code
14359 \begin_layout Plain Layout
14365 ] Whether the style requires the feature
14366 \begin_inset Flex Code
14369 \begin_layout Plain Layout
14376 See the description of
14377 \begin_inset Flex Code
14380 \begin_layout Plain Layout
14387 \begin_inset space ~
14391 \begin_inset CommandInset ref
14393 reference "sub:General-text-class"
14397 ) for information on `features'.
14400 \begin_layout Description
14402 \change_inserted -712698321 1353693371
14403 \begin_inset Flex Code
14406 \begin_layout Plain Layout
14408 \change_inserted -712698321 1353693146
14417 \begin_inset Flex Code
14420 \begin_layout Plain Layout
14422 \change_inserted -712698321 1353693235
14431 \begin_inset Flex Code
14434 \begin_layout Plain Layout
14436 \change_inserted -712698321 1353693235
14442 ] Resets the LaTeX arguments of this style (as defined via the
14443 \begin_inset Flex Code
14446 \begin_layout Plain Layout
14448 \change_inserted -712698321 1353693371
14457 This is useful if you have copied a style via
14458 \begin_inset Flex Code
14461 \begin_layout Plain Layout
14463 \change_inserted -712698321 1353693302
14471 , but you do not want to inherit its (required and optional) arguments.
14476 \begin_layout Description
14478 \change_inserted -712698321 1354263074
14479 \begin_inset Flex Code
14482 \begin_layout Plain Layout
14484 \change_inserted -712698321 1353866876
14491 \begin_inset Flex Code
14494 \begin_layout Plain Layout
14496 \change_inserted -712698321 1353866873
14502 ] A string that is put at the end of the layout content.
14503 A line break in the output can be indicated by
14504 \begin_inset Flex Code
14507 \begin_layout Plain Layout
14509 \change_inserted -712698321 1354263069
14520 \begin_layout Description
14521 \begin_inset Flex Code
14524 \begin_layout Plain Layout
14531 \begin_inset Flex Code
14534 \begin_layout Plain Layout
14541 \begin_inset Flex Code
14544 \begin_layout Plain Layout
14553 \begin_layout Description
14554 \begin_inset Flex Code
14557 \begin_layout Plain Layout
14564 \begin_inset Flex Code
14567 \begin_layout Plain Layout
14576 \begin_inset Flex Code
14579 \begin_layout Plain Layout
14586 \begin_inset Flex Code
14589 \begin_layout Plain Layout
14596 \begin_inset Flex Code
14599 \begin_layout Plain Layout
14601 \begin_inset space ~
14609 ] This defines what the default spacing should be in the style.
14611 \begin_inset Flex Code
14614 \begin_layout Plain Layout
14621 \begin_inset Flex Code
14624 \begin_layout Plain Layout
14631 \begin_inset Flex Code
14634 \begin_layout Plain Layout
14640 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14641 If you specify the argument
14642 \begin_inset Flex Code
14645 \begin_layout Plain Layout
14651 , then you must also provide a value argument which will be the actual multiplie
14653 Note that, contrary to other parameters,
14654 \begin_inset Flex Code
14657 \begin_layout Plain Layout
14663 implies the generation of specific LaTeX code, using the LaTeX package
14667 \begin_inset Flex Code
14670 \begin_layout Plain Layout
14679 \begin_layout Description
14680 \begin_inset Flex Code
14683 \begin_layout Plain Layout
14690 \begin_inset Flex Code
14693 \begin_layout Plain Layout
14700 \begin_inset space \thinspace{}
14704 \begin_inset Flex Code
14707 \begin_layout Plain Layout
14715 ] Allow spell-checking paragraphs of this style.
14719 \begin_layout Description
14720 \begin_inset Flex Code
14723 \begin_layout Plain Layout
14729 The font used for the text body .
14731 \begin_inset CommandInset ref
14733 reference "sub:Font-description"
14740 \begin_layout Description
14741 \begin_inset Flex Code
14744 \begin_layout Plain Layout
14753 \begin_inset Flex Code
14756 \begin_layout Plain Layout
14766 The level of the style in the table of contents.
14767 This is used for automatic numbering of section headings.
14770 \begin_layout Description
14771 \begin_inset Flex Code
14774 \begin_layout Plain Layout
14781 \begin_inset Flex Code
14784 \begin_layout Plain Layout
14790 ] The vertical space with which the very first of a chain of paragraphs
14791 with this style is separated from the previous paragraph.
14792 If the previous paragraph has another style, the separations are not simply
14793 added, but the maximum is taken.
14796 \begin_layout Subsection
14797 \begin_inset CommandInset label
14803 Internationalization of Paragraph Styles
14806 \begin_layout Standard
14807 LyX has long supported internationalization of layout information, but,
14808 until version 2.0, this applied only to the user interface and not to, say,
14810 Thus, French authors were forced to resort to ugly hacks if they wanted
14815 1' instead of `Theorem 1'.
14816 Thanks to Georg Baum, that is no longer the case.
14819 \begin_layout Standard
14821 \begin_inset Flex Code
14824 \begin_layout Plain Layout
14830 defines text that is to appear in the typeset document, it may use
14831 \begin_inset Flex Code
14834 \begin_layout Plain Layout
14841 \begin_inset Flex Code
14844 \begin_layout Plain Layout
14850 to support non-English and even multi-language documents correctly.
14851 The following excerpt (from the
14852 \begin_inset Flex Code
14855 \begin_layout Plain Layout
14861 file) shows how this works:
14864 \begin_layout LyX-Code
14869 \begin_layout LyX-Code
14872 theoremstyle{remark}
14875 \begin_layout LyX-Code
14878 newtheorem{claim}[thm]{
14885 \begin_layout LyX-Code
14889 \begin_layout LyX-Code
14893 \begin_layout LyX-Code
14898 claimname}{_(Claim)}
14901 \begin_layout LyX-Code
14905 \begin_layout LyX-Code
14909 \begin_layout LyX-Code
14918 claimname}{_(Claim)}}
14921 \begin_layout LyX-Code
14926 \begin_layout Standard
14927 In principle, any legal LaTeX may appear in the
14928 \begin_inset Flex Code
14931 \begin_layout Plain Layout
14938 \begin_inset Flex Code
14941 \begin_layout Plain Layout
14947 tags, but in practice they will typically look as they do here.
14948 The key to correct translation of the typeset text is the definition of
14950 \begin_inset Flex Code
14953 \begin_layout Plain Layout
14962 \begin_inset Flex Code
14965 \begin_layout Plain Layout
14977 \begin_layout Standard
14979 \begin_inset Flex Code
14982 \begin_layout Plain Layout
14988 tag provides for internationalization based upon the overall language of
14990 The contents of the tag will be included in the preamble, just as with
14992 \begin_inset Flex Code
14995 \begin_layout Plain Layout
15002 What makes it special is the use of the
15003 \begin_inset Quotes eld
15007 \begin_inset Quotes erd
15011 \begin_inset Flex Code
15014 \begin_layout Plain Layout
15020 , which will be replaced, when LyX produces LaTeX output, with the translation
15021 of its argument into the document language.
15024 \begin_layout Standard
15026 \begin_inset Flex Code
15029 \begin_layout Plain Layout
15035 tag is more complex, since it is meant to provide support for multi-language
15036 documents and so offers an interface to the
15037 \begin_inset Flex Code
15040 \begin_layout Plain Layout
15047 Its contents will be added to the preamble once for each language that
15048 appears in the document.
15049 In this case, the argument to
15050 \begin_inset Flex Code
15053 \begin_layout Plain Layout
15059 will be replaced with its translation into the language in question; the
15061 \begin_inset Flex Code
15064 \begin_layout Plain Layout
15070 is replaced by the language name (as used by the babel package).
15073 \begin_layout Standard
15074 A German document that also included a French section would thus have the
15075 following in the preamble:
15078 \begin_layout LyX-Code
15087 claimname}{Affirmation}}
15088 \begin_inset Newline newline
15099 claimname}{Behauptung}}
15100 \begin_inset Newline newline
15107 claimname}{Behauptung}
15110 \begin_layout Standard
15112 \begin_inset Flex Code
15115 \begin_layout Plain Layout
15121 will then conspire to produce the correct text in the output.
15124 \begin_layout Standard
15125 One important point to note here is that the translations are provided by
15126 LyX itself, through the
15127 \change_inserted -195340706 1334775793
15129 \begin_inset Flex Code
15132 \begin_layout Plain Layout
15134 \change_inserted -195340706 1334775793
15141 \change_deleted -195340706 1334775793
15142 same mechanism it uses for internationalization of the user interface
15145 This means, in effect, that
15146 \begin_inset Flex Code
15149 \begin_layout Plain Layout
15156 \begin_inset Flex Code
15159 \begin_layout Plain Layout
15165 are really only of use in layout files that are provided with LyX, since
15166 text entered in user-created layout files will not be seen by LyX's internation
15168 \change_inserted -195340706 1334775793
15170 \begin_inset Flex Code
15173 \begin_layout Plain Layout
15175 \change_inserted -195340706 1334775793
15181 file is modified accordingly
15184 That said, however, any layout created with the intention that it will
15185 be included with LyX should use these tags where appropriate.
15187 \change_inserted -195340706 1334775793
15188 Please note that the paragraph style translations provided by LyX will
15189 never change with a minor update (e.g.
15190 from version 2.1.x to 2.1.y).
15191 It is however quite likely that a major update (e.g.
15192 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15197 \begin_layout Subsection
15199 \begin_inset CommandInset label
15208 \begin_layout Standard
15209 It is necessary to define the floats (
15210 \begin_inset Flex MenuItem
15213 \begin_layout Plain Layout
15220 \begin_inset Flex MenuItem
15223 \begin_layout Plain Layout
15229 , \SpecialChar \ldots{}
15230 ) in the text class itself.
15231 Standard floats are included in the file
15232 \begin_inset Flex Code
15235 \begin_layout Plain Layout
15241 , so you may have to do no more than add
15244 \begin_layout LyX-Code
15245 Input stdfloats.inc
15248 \begin_layout Standard
15249 to your layout file.
15250 If you want to implement a text class that proposes some other float types
15251 (like the AGU class bundled with LyX), the information below will hopefully
15255 \begin_layout Description
15256 \begin_inset Flex Code
15259 \begin_layout Plain Layout
15266 \begin_inset Flex Code
15269 \begin_layout Plain Layout
15276 \begin_inset Quotes erd
15280 \begin_inset Quotes erd
15283 ] The file name extension of an auxiliary file for the list of figures (or
15285 LaTeX writes the captions to this file.
15288 \begin_layout Description
15289 \begin_inset Flex Code
15292 \begin_layout Plain Layout
15299 \begin_inset Flex Code
15302 \begin_layout Plain Layout
15309 \begin_inset Quotes erd
15313 \begin_inset Quotes erd
15316 ] The string that will be used in the menus and also for the caption.
15317 This is translated to the current language if babel is used.
15320 \begin_layout Description
15321 \begin_inset Flex Code
15324 \begin_layout Plain Layout
15330 These tags control the XHTML output.
15332 \begin_inset space ~
15336 \begin_inset CommandInset ref
15338 reference "sec:Tags-for-XHTML"
15345 \begin_layout Description
15346 \begin_inset Flex Code
15349 \begin_layout Plain Layout
15358 \begin_inset Flex Code
15361 \begin_layout Plain Layout
15370 \begin_inset space \thinspace{}
15374 \begin_inset Flex Code
15377 \begin_layout Plain Layout
15383 ] Indicates whether the float is already defined in the document class or
15384 if instead the LaTeX package
15385 \begin_inset Flex Code
15388 \begin_layout Plain Layout
15394 needs to be loaded to define it on-the-fly.
15396 \begin_inset Flex Code
15399 \begin_layout Plain Layout
15406 \begin_inset Flex Code
15409 \begin_layout Plain Layout
15416 It should be set to
15417 \begin_inset Flex Code
15420 \begin_layout Plain Layout
15426 if the float is already defined by the LaTeX document class.
15429 \begin_layout Description
15430 \begin_inset Flex Code
15433 \begin_layout Plain Layout
15440 \begin_inset Flex Code
15443 \begin_layout Plain Layout
15450 \begin_inset Quotes erd
15454 \begin_inset Quotes erd
15457 ] The command used to generate a list of floats of this type; the leading
15466 \begin_inset Flex Code
15469 \begin_layout Plain Layout
15475 is false, since there is no standard way to generate this command.
15477 \begin_inset Flex Code
15480 \begin_layout Plain Layout
15486 is true, since in that case there is a standard way to define the command.
15489 \begin_layout Description
15490 \begin_inset Flex Code
15493 \begin_layout Plain Layout
15500 \begin_inset Flex Code
15503 \begin_layout Plain Layout
15510 \begin_inset Quotes erd
15514 \begin_inset Quotes erd
15517 ] A title for a list of floats of this kind (list of figures, tables, or
15519 It is used for the screen label within LyX, it is used by LaTeX for the
15520 title and it is used as the title in the XHTML output.
15521 It will be translated to the document language.
15524 \begin_layout Description
15525 \begin_inset Flex Code
15528 \begin_layout Plain Layout
15535 \begin_inset Flex Code
15538 \begin_layout Plain Layout
15545 \begin_inset Quotes erd
15549 \begin_inset Quotes erd
15552 ] This (optional) argument determines whether floats of this class will
15553 be numbered within some sectional unit of the document.
15555 \begin_inset Flex Code
15558 \begin_layout Plain Layout
15565 \begin_inset Quotes eld
15569 \begin_inset Flex Code
15572 \begin_layout Plain Layout
15579 \begin_inset Quotes erd
15582 , the floats will be numbered within chapters.
15586 \begin_layout Description
15587 \begin_inset Flex Code
15590 \begin_layout Plain Layout
15597 \begin_inset Flex Code
15600 \begin_layout Plain Layout
15607 \begin_inset Quotes erd
15611 \begin_inset Quotes erd
15614 ] The default placement for the given class of floats.
15615 The string should be as in standard LaTeX:
15616 \begin_inset Flex Code
15619 \begin_layout Plain Layout
15626 \begin_inset Flex Code
15629 \begin_layout Plain Layout
15636 \begin_inset Flex Code
15639 \begin_layout Plain Layout
15646 \begin_inset Flex Code
15649 \begin_layout Plain Layout
15655 for top, bottom, page, and here, respectively.
15659 \begin_layout Plain Layout
15660 Note that the order of these letters in the string is irrelevant, like in
15666 On top of that there is a new type,
15667 \begin_inset Flex Code
15670 \begin_layout Plain Layout
15676 , which does not really correspond to a float, since it means: put it
15677 \begin_inset Quotes eld
15681 \begin_inset Quotes erd
15685 Note however that the
15686 \begin_inset Flex Code
15689 \begin_layout Plain Layout
15695 specifier is special and, because of implementation details, cannot be
15696 used in non-built in float types.
15697 If you do not understand what this means, just use
15698 \begin_inset Quotes eld
15702 \begin_inset Flex Code
15705 \begin_layout Plain Layout
15712 \begin_inset Quotes erd
15718 \begin_layout Description
15719 \begin_inset Flex Code
15722 \begin_layout Plain Layout
15729 \begin_inset Flex Code
15732 \begin_layout Plain Layout
15738 ] The prefix to use when creating labels referring to floats of this type.
15739 This allows the use of formatted references.
15740 Note that you can remove any
15741 \begin_inset Flex Code
15744 \begin_layout Plain Layout
15750 set by a copied style by using the special value
15751 \begin_inset Quotes eld
15755 \begin_inset Quotes erd
15758 , which must be all caps.
15761 \begin_layout Description
15762 \begin_inset Flex Code
15765 \begin_layout Plain Layout
15772 \begin_inset Flex Code
15775 \begin_layout Plain Layout
15782 \begin_inset Quotes erd
15786 \begin_inset Quotes erd
15789 ] The style used when defining the float using
15790 \begin_inset Flex Code
15793 \begin_layout Plain Layout
15804 \begin_layout Description
15805 \begin_inset Flex Code
15808 \begin_layout Plain Layout
15815 \begin_inset Flex Code
15818 \begin_layout Plain Layout
15825 \begin_inset Quotes erd
15829 \begin_inset Quotes erd
15833 \begin_inset Quotes eld
15837 \begin_inset Quotes erd
15840 of the new class of floats, like program or algorithm.
15841 After the appropriate
15842 \begin_inset Flex Code
15845 \begin_layout Plain Layout
15854 \begin_inset Flex Code
15857 \begin_layout Plain Layout
15866 \begin_inset Flex Code
15869 \begin_layout Plain Layout
15880 \begin_layout Description
15881 \begin_inset Flex Code
15884 \begin_layout Plain Layout
15891 \begin_inset Flex Code
15894 \begin_layout Plain Layout
15901 \begin_inset space \thinspace{}
15905 \begin_inset Flex Code
15908 \begin_layout Plain Layout
15916 ] Specifies whether this float is defined using the LaTeX package
15917 \begin_inset Flex Code
15920 \begin_layout Plain Layout
15926 , either by the class file, another package or on-the-fly by LyX itself.
15929 \begin_layout Standard
15930 Note that defining a float with type
15931 \begin_inset Flex Code
15934 \begin_layout Plain Layout
15942 automatically defines the corresponding counter with name
15943 \begin_inset Flex Code
15946 \begin_layout Plain Layout
15957 \begin_layout Subsection
15958 Flex insets and InsetLayout
15959 \begin_inset CommandInset label
15961 name "sub:Flex-insets-and"
15968 \begin_layout Standard
15969 Flex insets come in three different kinds:
15972 \begin_layout Itemize
15974 \begin_inset Flex Code
15977 \begin_layout Plain Layout
15983 ): These define semantic markup corresponding to such LaTeX commands as
15985 \begin_inset Flex Code
15988 \begin_layout Plain Layout
15997 \begin_inset Flex Code
16000 \begin_layout Plain Layout
16011 \begin_layout Itemize
16013 \begin_inset Flex Code
16016 \begin_layout Plain Layout
16022 ): These can be used to define custom collapsible insets, similar to TeX
16023 code, footnote, and the like.
16024 An obvious example is an endnote inset, which is defined in the
16025 \begin_inset Flex Code
16028 \begin_layout Plain Layout
16037 \begin_layout Itemize
16039 \begin_inset Flex Code
16042 \begin_layout Plain Layout
16048 ): For use with DocBook classes.
16051 \begin_layout Standard
16052 Flex insets are defined using the
16053 \begin_inset Flex Code
16056 \begin_layout Plain Layout
16062 tag, which shall be explained in a moment.
16065 \begin_layout Standard
16067 \begin_inset Flex Code
16070 \begin_layout Plain Layout
16076 tag also serves another function: It can be used to customize the general
16077 layout of many different types of insets.
16079 \begin_inset Flex Code
16082 \begin_layout Plain Layout
16088 can be used to customize the layout parameters for footnotes, marginal
16089 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16090 boxes, tables, algorithms, URLs, and
16091 \change_deleted -712698321 1356964515
16093 \change_inserted -712698321 1356964516
16096 s, as well as to define Flex insets.
16099 \begin_layout Standard
16101 \begin_inset Flex Code
16104 \begin_layout Plain Layout
16110 definition must begin with a line of the form:
16113 \begin_layout LyX-Code
16117 \begin_layout Standard
16119 \begin_inset Flex Code
16122 \begin_layout Plain Layout
16128 indicates the inset whose layout is being defined, and here there are
16129 \change_deleted -712698321 1356964888
16131 \change_inserted -712698321 1356964888
16133 \change_deleted 5863208 1334489267
16139 \begin_layout Enumerate
16140 The layout for a pre-existing inset is being modified.
16141 In this case, can be
16142 \begin_inset Flex Code
16145 \begin_layout Plain Layout
16151 any one of the following:
16152 \begin_inset Flex Code
16155 \begin_layout Plain Layout
16162 \begin_inset Flex Code
16165 \begin_layout Plain Layout
16172 \begin_inset Flex Code
16175 \begin_layout Plain Layout
16182 \begin_inset Flex Code
16185 \begin_layout Plain Layout
16192 \change_inserted -712698321 1356964563
16194 \begin_inset Flex Code
16197 \begin_layout Plain Layout
16199 \change_inserted -712698321 1356964560
16210 \begin_inset Flex Code
16213 \begin_layout Plain Layout
16220 \begin_inset Flex Code
16223 \begin_layout Plain Layout
16230 \begin_inset Flex Code
16233 \begin_layout Plain Layout
16240 \begin_inset Flex Code
16243 \begin_layout Plain Layout
16250 \begin_inset Flex Code
16253 \begin_layout Plain Layout
16260 \begin_inset Flex Code
16263 \begin_layout Plain Layout
16270 \begin_inset Flex Code
16273 \begin_layout Plain Layout
16280 \begin_inset Flex Code
16283 \begin_layout Plain Layout
16290 \begin_inset Flex Code
16293 \begin_layout Plain Layout
16300 \begin_inset Flex Code
16303 \begin_layout Plain Layout
16310 \begin_inset Flex Code
16313 \begin_layout Plain Layout
16320 \begin_inset Flex Code
16323 \begin_layout Plain Layout
16330 \begin_inset Flex Code
16333 \begin_layout Plain Layout
16340 \change_deleted -712698321 1356964592
16342 \begin_inset Flex Code
16345 \begin_layout Plain Layout
16347 \change_deleted -712698321 1353866704
16351 \change_inserted -712698321 1353866707
16362 \begin_inset Flex Code
16365 \begin_layout Plain Layout
16372 \begin_inset Flex Code
16375 \begin_layout Plain Layout
16384 \begin_layout Enumerate
16385 The layout for a Flex inset is being defined.
16387 \begin_inset Flex Code
16390 \begin_layout Plain Layout
16396 must be of the form
16397 \begin_inset Quotes eld
16401 \begin_inset Flex Code
16404 \begin_layout Plain Layout
16411 \begin_inset Quotes erd
16415 \begin_inset Flex Code
16418 \begin_layout Plain Layout
16424 may be be any valid identifier not used by a pre-existing Flex inset.
16425 The identifier may include spaces, but in that case the whole thing must
16426 be wrapped in quotes.
16427 Note that the definition of a flex inset
16432 \begin_inset Flex Code
16435 \begin_layout Plain Layout
16441 entry, declaring which type of inset it defines.
16442 \change_inserted 5863208 1334489312
16446 \begin_layout Enumerate
16448 \change_inserted 5863208 1334492248
16449 The layout for user specific branch is being defined.
16451 \begin_inset Flex Code
16454 \begin_layout Plain Layout
16456 \change_inserted 5863208 1334489384
16462 must be of the form
16463 \begin_inset Quotes eld
16467 \begin_inset Flex Code
16470 \begin_layout Plain Layout
16472 \change_inserted 5863208 1334489392
16479 \begin_inset Quotes erd
16483 \begin_inset Flex Code
16486 \begin_layout Plain Layout
16488 \change_inserted 5863208 1334489384
16494 may be be any valid identifier of branch defined in user's document.
16495 The identifier may include spaces, but in that case the whole thing must
16496 be wrapped in quotes.
16497 The main purpose of this feature is to allow LaTeX wrapping around specific
16498 branches as user needs.
16499 \change_inserted -712698321 1356964893
16503 \begin_layout Enumerate
16505 \change_inserted -712698321 1356965125
16506 The layout of a user (or class) specific caption is being defined.
16508 \begin_inset Flex Code
16511 \begin_layout Plain Layout
16513 \change_inserted -712698321 1356964939
16519 must be of the form
16520 \begin_inset Quotes eld
16524 \begin_inset Flex Code
16527 \begin_layout Plain Layout
16529 \change_inserted -712698321 1356964943
16536 \begin_inset Quotes erd
16540 \begin_inset Flex Code
16543 \begin_layout Plain Layout
16545 \change_inserted -712698321 1356964939
16551 specifies the name of the caption as it appears in the menu.
16552 Have a look at the standard caption (
16553 \begin_inset Flex Code
16556 \begin_layout Plain Layout
16558 \change_inserted -712698321 1356964987
16564 ), the specific captions of the KOMA-Script classes (
16565 \begin_inset Flex Code
16568 \begin_layout Plain Layout
16570 \change_inserted -712698321 1356965018
16577 \begin_inset Flex Code
16580 \begin_layout Plain Layout
16582 \change_inserted -712698321 1356965021
16593 \begin_inset Flex Code
16596 \begin_layout Plain Layout
16598 \change_inserted -712698321 1356965045
16604 ) for applications.
16609 \begin_layout Standard
16611 \begin_inset Flex Code
16614 \begin_layout Plain Layout
16620 definition can contain the following entries:
16623 \begin_layout Description
16625 \change_inserted -712698321 1353681390
16626 \begin_inset Flex Code
16629 \begin_layout Plain Layout
16631 \change_inserted -712698321 1353681344
16638 \begin_inset Flex Code
16641 \begin_layout Plain Layout
16643 \change_inserted -712698321 1353681344
16649 ] Defines argument number <int> of a command\SpecialChar \slash{}
16650 environment associated with
16651 the current layout.
16652 The definition must end with
16653 \begin_inset Flex Code
16656 \begin_layout Plain Layout
16658 \change_inserted -712698321 1353681344
16666 \begin_inset space ~
16670 \begin_inset CommandInset ref
16672 reference "sub:Paragraph-Styles"
16679 \begin_layout Description
16681 \change_inserted -195340706 1333913893
16682 \begin_inset Flex Code
16685 \begin_layout Plain Layout
16691 Preamble for changing languages.
16693 \begin_inset space ~
16697 \begin_inset CommandInset ref
16699 reference "sub:I18n"
16706 \begin_layout Description
16707 \begin_inset Flex Code
16710 \begin_layout Plain Layout
16717 \begin_inset Flex Code
16720 \begin_layout Plain Layout
16726 ] The color for the inset's background.
16728 \begin_inset space ~
16732 \begin_inset CommandInset ref
16734 reference "chap:Names-of-colors"
16738 for a list of the available color names.
16741 \begin_layout Description
16742 \begin_inset Flex Code
16745 \begin_layout Plain Layout
16752 \begin_inset Flex Code
16755 \begin_layout Plain Layout
16764 \begin_inset space \thinspace{}
16768 \begin_inset Flex Code
16771 \begin_layout Plain Layout
16777 ] Whether to use the content of the inset as the label, when the inset is
16782 \begin_layout Description
16783 \begin_inset Flex Code
16786 \begin_layout Plain Layout
16793 \begin_inset Flex Code
16796 \begin_layout Plain Layout
16802 ] As with paragraph styles, see sec.
16803 \begin_inset space ~
16807 \begin_inset CommandInset ref
16809 reference "sub:Paragraph-Styles"
16814 Note that you need to specify the complete type, e.
16815 \begin_inset space \thinspace{}
16819 \begin_inset space ~
16823 \begin_inset Flex Code
16826 \begin_layout Plain Layout
16827 CopyStyle Flex:<name>
16835 \begin_layout Description
16836 \begin_inset Flex Code
16839 \begin_layout Plain Layout
16846 \begin_inset Flex Code
16849 \begin_layout Plain Layout
16858 \begin_inset space \thinspace{}
16862 \begin_inset Flex Code
16865 \begin_layout Plain Layout
16871 ] Indicates whether the user may employ the Paragraph Settings dialog to
16872 customize the paragraph.
16875 \begin_layout Description
16876 \begin_inset Flex Code
16879 \begin_layout Plain Layout
16886 \begin_inset Flex Code
16889 \begin_layout Plain Layout
16896 \begin_inset Flex Code
16899 \begin_layout Plain Layout
16906 \begin_inset Flex Code
16909 \begin_layout Plain Layout
16915 , describing the rendering style used for the inset's frame and buttons.
16916 Footnotes generally use
16917 \begin_inset Flex Code
16920 \begin_layout Plain Layout
16926 , ERT insets generally
16927 \begin_inset Flex Code
16930 \begin_layout Plain Layout
16936 , and character styles
16937 \begin_inset Flex Code
16940 \begin_layout Plain Layout
16949 \begin_layout Description
16950 \begin_inset Flex Code
16953 \begin_layout Plain Layout
16960 \begin_inset Flex Code
16963 \begin_layout Plain Layout
16972 \begin_inset space \thinspace{}
16978 \begin_inset Flex Code
16981 \begin_layout Plain Layout
16990 \begin_inset Flex Code
16993 \begin_layout Plain Layout
17000 \begin_inset Flex Code
17003 \begin_layout Plain Layout
17010 Indicates whether the environment will stand on its own in the output or
17011 will appear inline with the surrounding text.
17012 If set to false, it is supposed that the LaTeX environment ignores white
17013 space (including one newline character) after the
17014 \begin_inset Flex Code
17017 \begin_layout Plain Layout
17030 \begin_inset Flex Code
17033 \begin_layout Plain Layout
17049 \begin_layout Description
17050 \begin_inset Flex Code
17053 \begin_layout Plain Layout
17059 Required at the end of the
17060 \begin_inset Flex Code
17063 \begin_layout Plain Layout
17072 \begin_layout Description
17073 \begin_inset Flex Code
17076 \begin_layout Plain Layout
17082 The font used for both the text body
17088 \begin_inset space ~
17092 \begin_inset CommandInset ref
17094 reference "sub:Font-description"
17099 Note that defining this font automatically defines the
17100 \begin_inset Flex Code
17103 \begin_layout Plain Layout
17109 to the same value, so define this first and define
17110 \begin_inset Flex Code
17113 \begin_layout Plain Layout
17119 later if you want them to be different.
17120 \change_inserted 155139281 1354130923
17124 \begin_layout Description
17126 \change_inserted 155139281 1354130923
17127 \begin_inset Flex Code
17130 \begin_layout Plain Layout
17132 \change_inserted 155139281 1354130923
17133 ForceLocalFontSwitch
17139 \begin_inset Flex Code
17142 \begin_layout Plain Layout
17144 \change_inserted 155139281 1354130923
17153 \begin_inset Flex Code
17156 \begin_layout Plain Layout
17158 \change_inserted 155139281 1354130923
17164 ] When using babel, always use a local font switch (
17165 \begin_inset Flex Code
17168 \begin_layout Plain Layout
17170 \change_inserted 155139281 1354130923
17178 ), never a global one (such as
17179 \begin_inset Flex Code
17182 \begin_layout Plain Layout
17184 \change_inserted 155139281 1354130923
17197 \begin_layout Description
17198 \begin_inset Flex Code
17201 \begin_layout Plain Layout
17208 \begin_inset Flex Code
17211 \begin_layout Plain Layout
17220 \begin_inset space \thinspace{}
17224 \begin_inset Flex Code
17227 \begin_layout Plain Layout
17234 \begin_inset Quotes eld
17238 \begin_inset Quotes erd
17241 language, leading to Left-to-Right (Latin) output, e.
17242 \begin_inset space \thinspace{}
17246 \begin_inset space \space{}
17249 in TeX code or URL.
17253 \begin_layout Description
17254 \begin_inset Flex Code
17257 \begin_layout Plain Layout
17264 \begin_inset Flex Code
17267 \begin_layout Plain Layout
17276 \begin_inset space \thinspace{}
17280 \begin_inset Flex Code
17283 \begin_layout Plain Layout
17289 ] Indicates whether the
17290 \begin_inset Flex Code
17293 \begin_layout Plain Layout
17299 should be used or, instead, the user can change the paragraph style used
17304 \begin_layout Description
17305 \begin_inset Flex Code
17308 \begin_layout Plain Layout
17315 \begin_inset Flex Code
17318 \begin_layout Plain Layout
17327 \begin_inset space \thinspace{}
17331 \begin_inset Flex Code
17334 \begin_layout Plain Layout
17340 ] As with paragraph styles, see sec.
17341 \begin_inset space ~
17345 \begin_inset CommandInset ref
17347 reference "sub:Paragraph-Styles"
17354 \begin_layout Description
17355 \begin_inset Flex Code
17358 \begin_layout Plain Layout
17364 These tags control the XHTML output.
17366 \begin_inset space ~
17370 \begin_inset CommandInset ref
17372 reference "sec:Tags-for-XHTML"
17379 \begin_layout Description
17380 \begin_inset Flex Code
17383 \begin_layout Plain Layout
17390 \begin_inset Flex Code
17393 \begin_layout Plain Layout
17402 \begin_inset space \thinspace{}
17406 \begin_inset Flex Code
17409 \begin_layout Plain Layout
17415 ] Whether to include the contents of this inset in the strings generated
17416 for the `Outline' pane.
17417 One would not, for example, want the content of a footnote in a section
17418 header to be included in the TOC displayed in the outline, but one would
17419 normally want the content of a character style displayed.
17420 Default is false: not to include.
17423 \begin_layout Description
17424 \begin_inset Flex Code
17427 \begin_layout Plain Layout
17436 \begin_inset Flex Code
17439 \begin_layout Plain Layout
17448 \begin_inset space \thinspace{}
17452 \begin_inset Flex Code
17455 \begin_layout Plain Layout
17461 ] As with paragraph styles, see sec.
17462 \begin_inset space ~
17466 \begin_inset CommandInset ref
17468 reference "sub:Paragraph-Styles"
17475 \begin_layout Description
17476 \begin_inset Flex Code
17479 \begin_layout Plain Layout
17485 The font used for the label.
17487 \begin_inset space ~
17491 \begin_inset CommandInset ref
17493 reference "sub:Font-description"
17498 Note that this definition can never appear before
17499 \begin_inset Flex Code
17502 \begin_layout Plain Layout
17508 , lest it be ineffective.
17511 \begin_layout Description
17512 \begin_inset Flex Code
17515 \begin_layout Plain Layout
17522 \begin_inset Flex Code
17525 \begin_layout Plain Layout
17532 \begin_inset Quotes erd
17536 \begin_inset Quotes erd
17539 ] What will be displayed on the button or elsewhere as the inset label.
17541 \begin_inset Flex Code
17544 \begin_layout Plain Layout
17551 \begin_inset Flex Code
17554 \begin_layout Plain Layout
17560 ) modify this label on the fly.
17563 \begin_layout Description
17565 \change_inserted -195340706 1333913893
17566 \begin_inset Flex Code
17569 \begin_layout Plain Layout
17575 Language dependent preamble.
17577 \begin_inset space ~
17581 \begin_inset CommandInset ref
17583 reference "sub:I18n"
17590 \begin_layout Description
17591 \begin_inset Flex Code
17594 \begin_layout Plain Layout
17601 \begin_inset Flex Code
17604 \begin_layout Plain Layout
17610 ] The name of the corresponding LaTeX stuff.
17611 Either the environment or command name.
17614 \begin_layout Description
17615 \begin_inset Flex Code
17618 \begin_layout Plain Layout
17625 \begin_inset Flex Code
17628 \begin_layout Plain Layout
17634 ] The optional parameter for the corresponding
17635 \begin_inset Flex Code
17638 \begin_layout Plain Layout
17644 stuff, including possible bracket pairs like
17645 \begin_inset Flex Code
17648 \begin_layout Plain Layout
17656 \change_inserted -712698321 1355144715
17657 This will be output as is after all LaTeX
17658 \begin_inset Flex Code
17661 \begin_layout Plain Layout
17663 \change_inserted -712698321 1355144713
17672 This parameter cannot be changed from within LyX
17673 \change_inserted -712698321 1355144775
17675 \begin_inset Flex Code
17678 \begin_layout Plain Layout
17680 \change_inserted -712698321 1355144747
17686 for customizable parameters)
17691 \begin_layout Description
17692 \begin_inset Flex Code
17695 \begin_layout Plain Layout
17702 \begin_inset Flex Code
17705 \begin_layout Plain Layout
17707 \change_deleted -712698321 1353867544
17714 Command, Environment,
17715 \change_inserted -712698321 1353867573
17717 \change_deleted -712698321 1353867557
17726 \begin_inset Flex Code
17729 \begin_layout Plain Layout
17731 \change_deleted -712698321 1353867564
17735 \change_deleted -712698321 1353867569
17743 ] How the style should be translated into LaTeX.
17747 \begin_layout Plain Layout
17748 \begin_inset Flex Code
17751 \begin_layout Plain Layout
17757 is perhaps a bit misleading, since these rules apply to SGML classes, too.
17758 Visit the SGML class files for specific examples.
17767 \begin_layout Description
17768 \begin_inset Flex Code
17771 \begin_layout Plain Layout
17773 \change_deleted -712698321 1353867582
17775 \change_inserted -712698321 1353867583
17783 means nothing special.
17787 \begin_layout Description
17788 \begin_inset Flex Code
17791 \begin_layout Plain Layout
17798 \begin_inset Flex Code
17801 \begin_layout Plain Layout
17808 {\SpecialChar \ldots{}
17817 \begin_layout Description
17818 \begin_inset Flex Code
17821 \begin_layout Plain Layout
17828 \begin_inset Flex Code
17831 \begin_layout Plain Layout
17838 }\SpecialChar \ldots{}
17854 \begin_layout Description
17856 \change_deleted -712698321 1353867600
17857 \begin_inset Flex Code
17860 \begin_layout Plain Layout
17867 \begin_inset Flex Code
17870 \begin_layout Plain Layout
17877 \begin_inset Flex Code
17880 \begin_layout Plain Layout
17888 is generated for each paragraph of this environment.
17892 \begin_layout Description
17894 \change_deleted -712698321 1353867600
17895 \begin_inset Flex Code
17898 \begin_layout Plain Layout
17905 \begin_inset Flex Code
17908 \begin_layout Plain Layout
17915 \begin_inset Flex Code
17918 \begin_layout Plain Layout
17924 is passed as an argument to the environment.
17926 \begin_inset Flex Code
17929 \begin_layout Plain Layout
17935 can be defined in the
17936 \begin_inset Flex MenuItem
17939 \begin_layout Plain Layout
17944 \SpecialChar \menuseparator
17950 \begin_inset space ~
17964 \begin_layout Standard
17965 Putting the last few things together, the LaTeX output will be either:
17968 \begin_layout LyX-Code
17972 \change_deleted 2090807402 1356919073
17974 \change_inserted 2090807402 1356919073
17978 \change_deleted 2090807402 1356919073
17980 \change_inserted 2090807402 1356919002
17983 ]{\SpecialChar \ldots{}
17987 \begin_layout Standard
17991 \begin_layout LyX-Code
17995 \change_deleted 2090807402 1356919013
17997 \change_inserted 2090807402 1356919014
18001 \change_deleted 2090807402 1356919013
18003 \change_inserted 2090807402 1356919008
18006 ] \SpecialChar \ldots{}
18010 \change_deleted 2090807402 1356919016
18012 \change_inserted 2090807402 1356919016
18018 \begin_layout Standard
18019 depending upon the LaTeX type.
18023 \begin_layout Description
18025 \change_inserted -712698321 1354263128
18026 \begin_inset Flex Code
18029 \begin_layout Plain Layout
18031 \change_inserted -712698321 1353866742
18040 \begin_inset Flex Code
18043 \begin_layout Plain Layout
18045 \change_inserted -712698321 1353866752
18051 ] A string that is put at the beginning of the layout content.
18052 A line break in the output can be indicated by
18053 \begin_inset Flex Code
18056 \begin_layout Plain Layout
18058 \change_inserted -712698321 1354263128
18069 \begin_layout Description
18070 \begin_inset Flex Code
18073 \begin_layout Plain Layout
18080 \begin_inset Flex Code
18083 \begin_layout Plain Layout
18090 \begin_inset Flex Code
18093 \begin_layout Plain Layout
18100 \begin_inset Flex Code
18103 \begin_layout Plain Layout
18110 \begin_inset Flex Code
18113 \begin_layout Plain Layout
18119 (indicating a dummy definition ending definitions of charstyles, etc).
18120 This entry is required in and is only meaningful for Flex insets.
18121 Among other things, it determines on which menu this inset will appear.
18123 \begin_inset Flex Code
18126 \begin_layout Plain Layout
18133 \begin_inset Flex Code
18136 \begin_layout Plain Layout
18142 will automatically set
18143 \begin_inset Flex Code
18146 \begin_layout Plain Layout
18154 \begin_inset Flex Code
18157 \begin_layout Plain Layout
18163 can be set to true for
18164 \begin_inset Flex Code
18167 \begin_layout Plain Layout
18173 insets by setting it
18178 \begin_inset Flex Code
18181 \begin_layout Plain Layout
18190 \begin_layout Description
18191 \begin_inset Flex Code
18194 \begin_layout Plain Layout
18201 \begin_inset Flex Code
18204 \begin_layout Plain Layout
18213 \begin_inset space \thinspace{}
18217 \begin_inset Flex Code
18220 \begin_layout Plain Layout
18226 ] Whether multiple paragraphs are permitted in this inset.
18228 \begin_inset Flex Code
18231 \begin_layout Plain Layout
18237 to the same value and
18238 \begin_inset Flex Code
18241 \begin_layout Plain Layout
18247 to the opposite value.
18248 These can be reset to other values, if they are used
18253 \begin_inset Flex Code
18256 \begin_layout Plain Layout
18266 \begin_layout Description
18267 \begin_inset Flex Code
18270 \begin_layout Plain Layout
18277 \begin_inset Flex Code
18280 \begin_layout Plain Layout
18289 \begin_inset space \thinspace{}
18293 \begin_inset Flex Code
18296 \begin_layout Plain Layout
18302 ] Whether fragile commands in this inset should be
18303 \begin_inset Flex Code
18306 \begin_layout Plain Layout
18319 whether the command should itself be protected.) Default is false.
18322 \begin_layout Description
18323 \begin_inset Flex Code
18326 \begin_layout Plain Layout
18333 \begin_inset Flex Code
18336 \begin_layout Plain Layout
18345 \begin_inset space \thinspace{}
18349 \begin_inset Flex Code
18352 \begin_layout Plain Layout
18358 ] As with paragraph styles, see sec.
18359 \begin_inset space ~
18363 \begin_inset CommandInset ref
18365 reference "sub:Paragraph-Styles"
18373 \begin_layout Description
18374 \begin_inset Flex Code
18377 \begin_layout Plain Layout
18384 \begin_inset Flex Code
18387 \begin_layout Plain Layout
18396 \begin_inset space \thinspace{}
18400 \begin_inset Flex Code
18403 \begin_layout Plain Layout
18409 ] As with paragraph styles, see sec.
18410 \begin_inset space ~
18414 \begin_inset CommandInset ref
18416 reference "sub:Paragraph-Styles"
18424 \begin_layout Description
18425 \begin_inset Flex Code
18428 \begin_layout Plain Layout
18434 As with paragraph styles, see sec.
18435 \begin_inset space ~
18439 \begin_inset CommandInset ref
18441 reference "sub:Paragraph-Styles"
18448 \begin_layout Description
18449 \begin_inset Flex Code
18452 \begin_layout Plain Layout
18459 \begin_inset Flex Code
18462 \begin_layout Plain Layout
18468 ] The prefix to use when creating labels referring to insets of this type.
18469 This allows the use of formatted references.
18472 \begin_layout Description
18473 \begin_inset Flex Code
18476 \begin_layout Plain Layout
18483 \begin_inset Flex Code
18486 \begin_layout Plain Layout
18492 ] As with paragraph styles, see sec.
18493 \begin_inset space ~
18497 \begin_inset CommandInset ref
18499 reference "sub:Paragraph-Styles"
18504 \change_inserted -712698321 1354439699
18508 \begin_layout Description
18510 \change_inserted -712698321 1354439705
18511 \begin_inset Flex Code
18514 \begin_layout Plain Layout
18516 \change_inserted -712698321 1354439699
18523 \begin_inset Flex Code
18526 \begin_layout Plain Layout
18528 \change_inserted -712698321 1354439699
18537 \begin_inset Flex Code
18540 \begin_layout Plain Layout
18542 \change_inserted -712698321 1354439699
18548 ] Resets the LaTeX arguments of this layout (as defined via the
18549 \begin_inset Flex Code
18552 \begin_layout Plain Layout
18554 \change_inserted -712698321 1354439699
18561 This is useful if you have copied a style via
18562 \begin_inset Flex Code
18565 \begin_layout Plain Layout
18567 \change_inserted -712698321 1354439699
18573 , but you do not want to inherit its (required and optional) arguments.
18575 \change_deleted -712698321 1354439698
18581 \begin_layout Description
18582 \begin_inset Flex Code
18585 \begin_layout Plain Layout
18592 \begin_inset Flex Code
18595 \begin_layout Plain Layout
18602 \begin_inset space \thinspace{}
18606 \begin_inset Flex Code
18609 \begin_layout Plain Layout
18617 ] Whether this inset should use the font of its surrounding environment
18619 Default is true: uses its own.
18622 \begin_layout Description
18624 \change_inserted -712698321 1354263134
18625 \begin_inset Flex Code
18628 \begin_layout Plain Layout
18630 \change_inserted -712698321 1353866810
18637 \begin_inset Flex Code
18640 \begin_layout Plain Layout
18642 \change_inserted -712698321 1353866806
18648 ] A string that is put at the end of the layout content.
18649 A line break in the output can be indicated by
18650 \begin_inset Flex Code
18653 \begin_layout Plain Layout
18655 \change_inserted -712698321 1354263134
18666 \begin_layout Description
18667 \begin_inset Flex Code
18670 \begin_layout Plain Layout
18677 \begin_inset Flex Code
18680 \begin_layout Plain Layout
18687 \begin_inset space \thinspace{}
18691 \begin_inset Flex Code
18694 \begin_layout Plain Layout
18702 ] Allow spell-checking the contents of this inset.
18706 \begin_layout Subsection
18708 \begin_inset CommandInset label
18710 name "sub:Counters"
18717 \begin_layout Standard
18718 It is necessary to define the counters (
18719 \begin_inset Flex MenuItem
18722 \begin_layout Plain Layout
18729 \begin_inset Flex MenuItem
18732 \begin_layout Plain Layout
18738 , \SpecialChar \ldots{}
18739 ) in the text class itself.
18740 The standard counters are defined in the file
18741 \begin_inset Flex Code
18744 \begin_layout Plain Layout
18750 , so you may have to do no more than add
18753 \begin_layout LyX-Code
18754 Input stdcounters.inc
18757 \begin_layout Standard
18758 to your layout file to get them to work.
18759 But if you want to define custom counters, then you can do so.
18760 The counter declaration must begin with:
18763 \begin_layout LyX-Code
18764 Counter CounterName
18767 \begin_layout Standard
18769 \begin_inset Flex Code
18772 \begin_layout Plain Layout
18778 ' is replaced by the name of the counter.
18779 And it must end with
18780 \begin_inset Quotes eld
18784 \begin_inset Flex Code
18787 \begin_layout Plain Layout
18794 \begin_inset Quotes erd
18798 The following parameters can also be used:
18801 \begin_layout Description
18802 \begin_inset Flex Code
18805 \begin_layout Plain Layout
18812 \begin_inset Flex Code
18815 \begin_layout Plain Layout
18822 \begin_inset Quotes erd
18826 \begin_inset Quotes erd
18829 ] When defined, this string defines how the counter is displayed.
18830 Setting this value sets
18831 \begin_inset Flex Code
18834 \begin_layout Plain Layout
18835 LabelStringAppendix
18841 The following special constructs can be used in the string:
18845 \begin_layout Itemize
18846 \begin_inset Flex Code
18849 \begin_layout Plain Layout
18857 will be replaced by the expansion of the
18858 \begin_inset Flex Code
18861 \begin_layout Plain Layout
18868 \begin_inset Flex Code
18871 \begin_layout Plain Layout
18872 LabelStringAppendix
18878 \begin_inset Flex Code
18881 \begin_layout Plain Layout
18891 \begin_layout Itemize
18892 counter values can be expressed using LaTeX-like macros
18893 \begin_inset Newline newline
18897 \begin_inset Flex Code
18900 \begin_layout Plain Layout
18917 \begin_inset Flex Code
18920 \begin_layout Plain Layout
18932 \begin_layout Plain Layout
18942 Actually, the situation is a bit more complicated: any
18961 other than those described below will produce arabic numerals.
18962 It would not be surprising to see this change in the future.
18968 \begin_inset Flex Code
18971 \begin_layout Plain Layout
18977 : 1, 2, 3,\SpecialChar \ldots{}
18979 \begin_inset Flex Code
18982 \begin_layout Plain Layout
18988 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18990 \begin_inset Flex Code
18993 \begin_layout Plain Layout
18999 for upper-case letters: A, B, C, \SpecialChar \ldots{}
19001 \begin_inset Flex Code
19004 \begin_layout Plain Layout
19010 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
19012 \begin_inset Flex Code
19015 \begin_layout Plain Layout
19021 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
19023 \begin_inset Flex Code
19026 \begin_layout Plain Layout
19032 for hebrew numerals.
19036 \begin_layout Standard
19037 If LabelString is not defined, a default value is constructed as follows:
19038 if the counter has a master counter
19039 \begin_inset Flex Code
19042 \begin_layout Plain Layout
19049 \begin_inset Flex Code
19052 \begin_layout Plain Layout
19059 \begin_inset Newline newline
19063 \begin_inset Flex Code
19066 \begin_layout Plain Layout
19076 is used; otherwise the string
19077 \begin_inset Flex Code
19080 \begin_layout Plain Layout
19091 \begin_layout Description
19092 \begin_inset Flex Code
19095 \begin_layout Plain Layout
19096 LabelStringAppendix
19102 \begin_inset Flex Code
19105 \begin_layout Plain Layout
19112 \begin_inset Quotes erd
19116 \begin_inset Quotes erd
19120 \begin_inset Flex Code
19123 \begin_layout Plain Layout
19129 , but for use in the Appendix.
19132 \begin_layout Description
19133 \begin_inset Flex Code
19136 \begin_layout Plain Layout
19143 \begin_inset Flex Code
19146 \begin_layout Plain Layout
19153 \begin_inset Quotes erd
19157 \begin_inset Quotes erd
19160 ] A format for use with formatted references to this counter.
19161 For example, one might want to have references to section numbers appear
19163 \begin_inset Quotes eld
19167 \begin_inset Quotes erd
19171 The string should contain
19172 \begin_inset Quotes eld
19176 \begin_inset Quotes erd
19180 This will be replaced by the counter number itself.
19181 So, for sections, it would be: Section ##.
19184 \begin_layout Description
19185 \begin_inset Flex Code
19188 \begin_layout Plain Layout
19195 \begin_inset Flex Code
19198 \begin_layout Plain Layout
19205 \begin_inset Quotes erd
19209 \begin_inset Quotes erd
19212 ] If this is set to the name of another counter, the present counter will
19213 be reset every time the other one is increased.
19215 \begin_inset Flex Code
19218 \begin_layout Plain Layout
19225 \begin_inset Flex Code
19228 \begin_layout Plain Layout
19237 \begin_layout Subsection
19239 \begin_inset CommandInset label
19241 name "sub:Font-description"
19248 \begin_layout Standard
19249 A font description looks like this:
19252 \begin_layout LyX-Code
19266 \begin_layout LyX-Code
19270 \begin_layout LyX-Code
19274 \begin_layout Standard
19275 The following commands are available:
19278 \begin_layout Description
19279 \begin_inset Flex Code
19282 \begin_layout Plain Layout
19289 \begin_inset Flex Code
19292 \begin_layout Plain Layout
19301 \begin_inset Flex Code
19304 \begin_layout Plain Layout
19311 \begin_inset Flex Code
19314 \begin_layout Plain Layout
19321 \begin_inset Flex Code
19324 \begin_layout Plain Layout
19331 \begin_inset Flex Code
19334 \begin_layout Plain Layout
19341 \begin_inset Flex Code
19344 \begin_layout Plain Layout
19351 \begin_inset Flex Code
19354 \begin_layout Plain Layout
19361 \begin_inset Flex Code
19364 \begin_layout Plain Layout
19371 \begin_inset Flex Code
19374 \begin_layout Plain Layout
19383 \begin_layout Description
19384 \begin_inset Flex Code
19387 \begin_layout Plain Layout
19394 \begin_inset Flex Code
19397 \begin_layout Plain Layout
19406 \begin_inset Flex Code
19409 \begin_layout Plain Layout
19416 \begin_inset Flex Code
19419 \begin_layout Plain Layout
19428 \begin_layout Description
19429 \begin_inset Flex Code
19432 \begin_layout Plain Layout
19439 \begin_inset Flex Code
19442 \begin_layout Plain Layout
19448 ] Valid arguments are:
19449 \begin_inset Flex Code
19452 \begin_layout Plain Layout
19459 \begin_inset Flex Code
19462 \begin_layout Plain Layout
19469 \begin_inset Flex Code
19472 \begin_layout Plain Layout
19479 \begin_inset Flex Code
19482 \begin_layout Plain Layout
19489 \begin_inset Flex Code
19492 \begin_layout Plain Layout
19499 \begin_inset Flex Code
19502 \begin_layout Plain Layout
19509 \begin_inset Flex Code
19512 \begin_layout Plain Layout
19519 \begin_inset Flex Code
19522 \begin_layout Plain Layout
19529 \begin_inset Flex Code
19532 \begin_layout Plain Layout
19539 \begin_inset Flex Code
19542 \begin_layout Plain Layout
19549 \begin_inset Flex Code
19552 \begin_layout Plain Layout
19559 \begin_inset Flex Code
19562 \begin_layout Plain Layout
19569 Each of these turns on or off the corresponding attribute.
19571 \begin_inset Flex Code
19574 \begin_layout Plain Layout
19580 turns on emphasis, and
19581 \begin_inset Flex Code
19584 \begin_layout Plain Layout
19592 \begin_inset Newline newline
19595 If the latter seems puzzling, remember that the font settings for the present
19596 context are generally inherited from the surrounding context.
19598 \begin_inset Flex Code
19601 \begin_layout Plain Layout
19607 would turn off the emphasis that was anyway in effect, say, in a theorem
19611 \begin_layout Description
19612 \begin_inset Flex Code
19615 \begin_layout Plain Layout
19622 \begin_inset Flex Code
19625 \begin_layout Plain Layout
19634 \begin_inset Flex Code
19637 \begin_layout Plain Layout
19646 \begin_layout Description
19647 \begin_inset Flex Code
19650 \begin_layout Plain Layout
19657 \begin_inset Flex Code
19660 \begin_layout Plain Layout
19669 \begin_inset Flex Code
19672 \begin_layout Plain Layout
19679 \begin_inset Flex Code
19682 \begin_layout Plain Layout
19689 \begin_inset Flex Code
19692 \begin_layout Plain Layout
19701 \begin_layout Description
19702 \begin_inset Flex Code
19705 \begin_layout Plain Layout
19712 \begin_inset Flex Code
19715 \begin_layout Plain Layout
19722 \begin_inset Flex Code
19725 \begin_layout Plain Layout
19732 \begin_inset Flex Code
19735 \begin_layout Plain Layout
19744 \begin_inset Flex Code
19747 \begin_layout Plain Layout
19754 \begin_inset Flex Code
19757 \begin_layout Plain Layout
19764 \begin_inset Flex Code
19767 \begin_layout Plain Layout
19774 \begin_inset Flex Code
19777 \begin_layout Plain Layout
19784 \begin_inset Flex Code
19787 \begin_layout Plain Layout
19796 \begin_layout Subsection
19797 \begin_inset CommandInset label
19799 name "sub:Citation-format-description"
19803 Citation format description
19806 \begin_layout Standard
19808 \begin_inset Flex Code
19811 \begin_layout Plain Layout
19817 blocks are used to describe how bibliographic information should be displayed,
19818 both within LyX itself (in the citation dialog and in tooltips, for example)
19819 and in XHTML output.
19820 Such a block might look like this:
19823 \begin_layout LyX-Code
19827 \begin_layout LyX-Code
19831 \begin_layout LyX-Code
19835 \begin_layout LyX-Code
19839 \begin_layout Standard
19840 The individual lines define how the bibliographic information associated
19841 with an article or book, respectively, is to be displayed, and such a definitio
19842 n can be given for any `entry type' that might be present in a BibTeX file.
19843 LyX defines a default format in the source code that will be used if no
19844 specific definition has been given.
19845 LyX predefines several formats in the file
19846 \begin_inset Flex Code
19849 \begin_layout Plain Layout
19855 , which is included in most of LyX's document classes.
19858 \begin_layout Standard
19859 The definitions use a simple language that allows BibTeX keys to be replaced
19861 Keys should be enclosed in
19862 \begin_inset Flex Code
19865 \begin_layout Plain Layout
19872 \begin_inset Flex Code
19875 \begin_layout Plain Layout
19882 So a simple definition might look like this:
19885 \begin_layout LyX-Code
19887 \begin_inset Quotes eld
19891 \begin_inset Quotes erd
19897 \begin_layout Standard
19898 This would print the author, followed by a comma, followed by the title,
19899 in quotes, followed by a period.
19902 \begin_layout Standard
19903 Of course, sometimes you may want to print a key only if it exists.
19904 This can be done by using a conditional construction, such as:
19905 \begin_inset Flex Code
19908 \begin_layout Plain Layout
19910 \begin_inset space ~
19920 \begin_inset Flex Code
19923 \begin_layout Plain Layout
19929 key exists, then print
19930 \begin_inset Quotes eld
19934 \begin_inset space ~
19938 \begin_inset Quotes erd
19941 followed by the volume key.
19942 It is also possible to have an else clause in the conditional, such as:
19943 \begin_inset Newline newline
19947 \begin_inset Flex Code
19950 \begin_layout Plain Layout
19951 {%author%[[%author%]][[%editor%, ed.]]}
19957 \begin_inset Newline newline
19961 \begin_inset Flex Code
19964 \begin_layout Plain Layout
19970 key is printed if it exists; otherwise, the editor key is printed, followed
19972 \begin_inset Quotes eld
19976 \begin_inset space ~
19980 \begin_inset Quotes erd
19983 Note that the key is again enclosed in
19984 \begin_inset Flex Code
19987 \begin_layout Plain Layout
19993 signs; the entire conditional is enclosed in braces; and the if and else
19994 clauses are enclosed in double brackets,
19995 \begin_inset Quotes eld
19999 \begin_inset Flex Code
20002 \begin_layout Plain Layout
20009 \begin_inset Quotes eld
20013 \begin_inset Quotes eld
20017 \begin_inset Flex Code
20020 \begin_layout Plain Layout
20027 \begin_inset Quotes erd
20031 There must be no space between any of these.
20034 \begin_layout Standard
20035 There is one other piece of syntax available in definitions, which looks
20037 \begin_inset Flex Code
20040 \begin_layout Plain Layout
20047 This defines a piece of formatting information that is to be used when
20049 \begin_inset Quotes eld
20053 \begin_inset Quotes erd
20057 Obviously, we do not want to output HTML tags when writing plain text,
20058 so they should be wrapped in
20059 \begin_inset Quotes eld
20063 \begin_inset Quotes erd
20067 \begin_inset Quotes eld
20071 \begin_inset Quotes erd
20077 \begin_layout Standard
20078 Two special sorts of definitions are also possible in a
20079 \begin_inset Flex Code
20082 \begin_layout Plain Layout
20089 An example of the first would be:
20092 \begin_layout LyX-Code
20094 \begin_inset Quotes eld
20098 \begin_inset Quotes erd
20104 \begin_layout Standard
20105 This is an abbreviation, or macro, and it can be used by treating it as
20107 \begin_inset Flex Code
20110 \begin_layout Plain Layout
20118 \begin_inset Flex Code
20121 \begin_layout Plain Layout
20127 exactly as it would treat its definition.
20128 So, let us issue the obvious
20136 \begin_layout LyX-Code
20140 \begin_layout Standard
20141 or anything like it.
20142 LyX shouldn't go into an infinite loop, but it may go into a long one before
20146 \begin_layout Standard
20147 The second sort of special definition might look like this:
20150 \begin_layout LyX-Code
20154 \begin_layout Standard
20155 This defines a translatable piece of text, which allows relevant parts of
20156 the bibliography to be translated.
20157 It can be included in a definition by treating it as a key:
20158 \begin_inset Flex Code
20161 \begin_layout Plain Layout
20168 Several of these are predefined in
20169 \begin_inset Flex Code
20172 \begin_layout Plain Layout
20179 Note that these are not macros, in the sense just defined.
20180 They will not be expanded.
20183 \begin_layout Standard
20184 So here then is an example that use all these features:
20185 \begin_inset VSpace defskip
20191 \begin_layout Standard
20195 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20198 \begin_layout Standard
20199 \begin_inset VSpace defskip
20202 This defines a macro that prints the author, followed by a comma, if the
20204 \begin_inset Flex Code
20207 \begin_layout Plain Layout
20213 key is defined, or else prints the name of the editor, followed by the
20215 \begin_inset Flex Code
20218 \begin_layout Plain Layout
20224 or its translation (it is by default
20225 \begin_inset Quotes eld
20229 \begin_inset Quotes erd
20233 \begin_inset Flex Code
20236 \begin_layout Plain Layout
20243 Note that this is in fact defined in
20244 \begin_inset Flex Code
20247 \begin_layout Plain Layout
20253 , so you can use it in your own definitions, or re-definitions, if you load
20257 \begin_layout Section
20258 \begin_inset CommandInset label
20260 name "sec:Tags-for-XHTML"
20264 Tags for XHTML output
20267 \begin_layout Standard
20268 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20269 by layout information.
20270 In general, LyX provides sensible defaults and, as mentioned earlier, it
20271 will even construct default CSS style rules from the other layout tags.
20272 For example, LyX will attempt to use the information provided in the
20273 \begin_inset Flex Code
20276 \begin_layout Plain Layout
20282 declaration for the Chapter style to write CSS that will appropriately
20283 format chapter headings.
20286 \begin_layout Standard
20287 In many cases, then, you may not have to do anything at all to get acceptable
20288 XHTML output for your own environments, custom insets, and so forth.
20289 But in some cases you will, and so LyX provides a number of layout tags
20290 that can be used to customize the XHTML and CSS that are generated.
20293 \begin_layout Standard
20294 Note that there are two tags,
20295 \begin_inset Flex Code
20298 \begin_layout Plain Layout
20305 \begin_inset Flex Code
20308 \begin_layout Plain Layout
20314 that may appear outside style and inset declarations.
20316 \begin_inset CommandInset ref
20318 reference "sub:General-text-class"
20322 for details on these.
20325 \begin_layout Subsection
20326 \begin_inset CommandInset label
20328 name "sub:Paragraph-Style-XHTML"
20335 \begin_layout Standard
20336 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20337 dealing with a normal paragraph, a command, or an environment, where this
20338 is itself determined by the contents of the corresponding
20339 \begin_inset Flex Code
20342 \begin_layout Plain Layout
20352 \begin_layout Standard
20353 For a command or normal paragraph, the output XHTML has the following form:
20356 \begin_layout LyX-Code
20358 \begin_inset Quotes erd
20362 \begin_inset Quotes erd
20368 \begin_layout LyX-Code
20370 \begin_inset Quotes erd
20374 \begin_inset Quotes erd
20380 \begin_layout LyX-Code
20381 Contents of the paragraph.
20384 \begin_layout LyX-Code
20388 \begin_layout Standard
20389 The label tags are of course omitted if the paragraph does not have a label.
20392 \begin_layout Standard
20393 For an environment that is not some sort of list, the XHTML takes this form:
20396 \begin_layout LyX-Code
20398 \begin_inset Quotes erd
20402 \begin_inset Quotes erd
20408 \begin_layout LyX-Code
20410 \begin_inset Quotes erd
20414 \begin_inset Quotes erd
20418 \begin_inset Quotes erd
20422 \begin_inset Quotes erd
20425 >Environment Label</labeltag>First paragraph.</itemtag>
20428 \begin_layout LyX-Code
20429 <itemtag>Second paragraph.</itemtag>
20432 \begin_layout LyX-Code
20436 \begin_layout Standard
20437 Note that the label is output only for the first paragraph, as it should
20438 be for a theorem, for example.
20442 \begin_layout Standard
20443 For a list, we have one of these forms:
20446 \begin_layout LyX-Code
20448 \begin_inset Quotes erd
20452 \begin_inset Quotes erd
20458 \begin_layout LyX-Code
20460 \begin_inset Quotes erd
20464 \begin_inset Quotes erd
20468 \begin_inset Quotes erd
20472 \begin_inset Quotes erd
20475 >List Label</labeltag>First item.</itemtag>
20478 \begin_layout LyX-Code
20480 \begin_inset Quotes erd
20484 \begin_inset Quotes erd
20488 \begin_inset Quotes erd
20492 \begin_inset Quotes erd
20495 >List Label</labeltag>Second item.</itemtag>
20498 \begin_layout LyX-Code
20502 \begin_layout LyX-Code
20506 \begin_layout LyX-Code
20508 \begin_inset Quotes erd
20512 \begin_inset Quotes erd
20518 \begin_layout LyX-Code
20520 \begin_inset Quotes erd
20524 \begin_inset Quotes erd
20527 >List Label</labeltag><itemtag attr=
20528 \begin_inset Quotes erd
20532 \begin_inset Quotes erd
20535 >First item.</itemtag>
20538 \begin_layout LyX-Code
20540 \begin_inset Quotes erd
20544 \begin_inset Quotes erd
20547 >List Label</labeltag><itemtag attr=
20548 \begin_inset Quotes erd
20552 \begin_inset Quotes erd
20555 >Second item.</itemtag>
20558 \begin_layout LyX-Code
20562 \begin_layout Standard
20563 Note the different orders of
20564 \begin_inset Flex Code
20567 \begin_layout Plain Layout
20574 \begin_inset Flex Code
20577 \begin_layout Plain Layout
20584 Which order we get depends upon the setting of
20585 \begin_inset Flex Code
20588 \begin_layout Plain Layout
20595 \begin_inset Flex Code
20598 \begin_layout Plain Layout
20604 is false (the default), you get the first of these, with the label within
20605 the item; if true, you get the second, with the label outside the item.
20608 \begin_layout Standard
20609 The specific tags and attributes output for each paragraph type can be controlle
20610 d by means of the layout tags we are about to describe.
20611 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20612 so you often may not need to do very much to get good XHTML output.
20613 Think of the available tags as there so you can tweak things to your liking.
20616 \begin_layout Description
20617 \begin_inset Flex Code
20620 \begin_layout Plain Layout
20627 \begin_inset Flex Code
20630 \begin_layout Plain Layout
20636 ] Specifies attribute information to be output with the main tag.
20638 \begin_inset Quotes eld
20642 \begin_inset Flex Code
20645 \begin_layout Plain Layout
20652 \begin_inset Quotes erd
20656 By default, LyX will output
20657 \begin_inset Quotes eld
20661 \begin_inset Flex Code
20664 \begin_layout Plain Layout
20671 \begin_inset Quotes erd
20675 \begin_inset Flex Code
20678 \begin_layout Plain Layout
20684 is the LyX name of the layout, made lowercase, for example: chapter.
20689 contain any style information.
20691 \begin_inset Flex Code
20694 \begin_layout Plain Layout
20703 \begin_layout Description
20704 \begin_inset Flex Code
20707 \begin_layout Plain Layout
20714 \begin_inset Flex Code
20717 \begin_layout Plain Layout
20727 ] Whether to output the default CSS information LyX generates for this layout,
20728 even if additional information is explicitly provided via
20729 \begin_inset Flex Code
20732 \begin_layout Plain Layout
20740 \begin_inset Flex Code
20743 \begin_layout Plain Layout
20749 allows you to alter or augment the generated CSS, rather than to override
20752 \begin_inset Flex Code
20755 \begin_layout Plain Layout
20764 \begin_layout Description
20765 \begin_inset Flex Code
20768 \begin_layout Plain Layout
20775 \begin_inset Flex Code
20778 \begin_layout Plain Layout
20784 ] The tag to be used for individual paragraphs of environments, replacing
20786 \begin_inset Flex Code
20789 \begin_layout Plain Layout
20795 in the examples above.
20797 \begin_inset Flex Code
20800 \begin_layout Plain Layout
20809 \begin_layout Description
20810 \begin_inset Flex Code
20813 \begin_layout Plain Layout
20820 \begin_inset Flex Code
20823 \begin_layout Plain Layout
20829 ] Attributes for the item tag.
20831 \begin_inset Quotes eld
20835 \begin_inset Flex Code
20838 \begin_layout Plain Layout
20839 class=`layoutname_item'
20845 \begin_inset Quotes erd
20853 contain any style information.
20855 \begin_inset Flex Code
20858 \begin_layout Plain Layout
20867 \begin_layout Description
20868 \begin_inset Flex Code
20871 \begin_layout Plain Layout
20878 \begin_inset Flex Code
20881 \begin_layout Plain Layout
20887 ] The tag to be used for paragraph and item labels, replacing
20888 \begin_inset Flex Code
20891 \begin_layout Plain Layout
20897 in the examples above.
20899 \begin_inset Flex Code
20902 \begin_layout Plain Layout
20909 \begin_inset Flex Code
20912 \begin_layout Plain Layout
20919 \begin_inset Flex Code
20922 \begin_layout Plain Layout
20929 \begin_inset Flex Code
20932 \begin_layout Plain Layout
20933 Centered_Top_Environment
20938 , in which case it defaults to
20939 \begin_inset Flex Code
20942 \begin_layout Plain Layout
20951 \begin_layout Description
20952 \begin_inset Flex Code
20955 \begin_layout Plain Layout
20962 \begin_inset Flex Code
20965 \begin_layout Plain Layout
20971 ] Attributes for the label tag.
20973 \begin_inset Quotes eld
20977 \begin_inset Flex Code
20980 \begin_layout Plain Layout
20981 class=`layoutname_label'
20987 \begin_inset Quotes erd
20995 contain any style information.
20997 \begin_inset Flex Code
21000 \begin_layout Plain Layout
21009 \begin_layout Description
21010 \begin_inset Flex Code
21013 \begin_layout Plain Layout
21020 \begin_inset Flex Code
21023 \begin_layout Plain Layout
21033 ] Meaningful only for list-like environments, this tag controls whether
21034 the label tag is output before or inside the item tag.
21035 This is used, for example, in the description environment, where we want
21037 \begin_inset Flex Code
21040 \begin_layout Plain Layout
21041 <dt>\SpecialChar \ldots{}
21042 </dt><dd>\SpecialChar \ldots{}
21050 \begin_inset Flex Code
21053 \begin_layout Plain Layout
21059 : The label tag is output inside the item tag.
21062 \begin_layout Description
21063 \begin_inset Flex Code
21066 \begin_layout Plain Layout
21072 Information to be output in the
21073 \begin_inset Flex Code
21076 \begin_layout Plain Layout
21082 section when this style is used.
21083 This might, for example, be used to include a
21084 \begin_inset Flex Code
21087 \begin_layout Plain Layout
21094 \begin_inset Flex Code
21097 \begin_layout Plain Layout
21106 \begin_layout Description
21107 \begin_inset Flex Code
21110 \begin_layout Plain Layout
21116 CSS style information to be included when this style is used.
21117 Note that this will automatically be wrapped in a layout-generated
21118 \begin_inset Flex Code
21121 \begin_layout Plain Layout
21127 block, so only the CSS itself need be included.
21130 \begin_layout Description
21131 \begin_inset Flex Code
21134 \begin_layout Plain Layout
21141 \begin_inset Flex Code
21144 \begin_layout Plain Layout
21150 ] The tag to be used for the main label, replacing
21151 \begin_inset Flex Code
21154 \begin_layout Plain Layout
21160 in the examples above.
21162 \begin_inset Flex Code
21165 \begin_layout Plain Layout
21174 \begin_layout Description
21175 \begin_inset Flex Code
21178 \begin_layout Plain Layout
21185 \begin_inset Flex Code
21188 \begin_layout Plain Layout
21198 ] Marks this style as the one to be used to generate the
21199 \begin_inset Flex Code
21202 \begin_layout Plain Layout
21208 tag for the XHTML file.
21209 By default, it is false.
21211 \begin_inset Flex Code
21214 \begin_layout Plain Layout
21220 file sets it to true for the
21221 \begin_inset Flex Code
21224 \begin_layout Plain Layout
21234 \begin_layout Subsection
21238 \begin_layout Standard
21239 The XHTML output of insets can also be controlled by information in layout
21244 \begin_layout Plain Layout
21245 At present, this is true only for
21246 \begin_inset Quotes eld
21250 \begin_inset Quotes erd
21253 insets (insets you can type into) and is not true for
21254 \begin_inset Quotes eld
21258 \begin_inset Quotes erd
21261 insets (insets that are associated with dialog boxes).
21266 Here, too, LyX tries to provide sensible defaults, and it constructs default
21268 But everything can be customized.
21271 \begin_layout Standard
21272 The XHTML LyX outputs for an inset has the following form:
21275 \begin_layout LyX-Code
21277 \begin_inset Quotes erd
21281 \begin_inset Quotes erd
21287 \begin_layout LyX-Code
21288 <labeltag>Label</labeltag>
21291 \begin_layout LyX-Code
21293 \begin_inset Quotes erd
21297 \begin_inset Quotes erd
21300 >Contents of the inset.</innertag>
21303 \begin_layout LyX-Code
21307 \begin_layout Standard
21308 If the inset permits multiple paragraphs---that is, if
21309 \begin_inset Flex Code
21312 \begin_layout Plain Layout
21318 is true---then the contents of the inset will itself be output as paragraphs
21319 formatted according to the styles used for those paragraphs (standard,
21320 quote, and the like).
21321 The label tag is of course omitted if the paragraph does not have a label
21322 and, at present, is always
21323 \begin_inset Flex Code
21326 \begin_layout Plain Layout
21333 The inner tag is optional and, by default, does not appear.
21336 \begin_layout Standard
21337 The specific tags and attributes output for each inset can be controlled
21338 by means of the following layout tags.
21341 \begin_layout Description
21342 \begin_inset Flex Code
21345 \begin_layout Plain Layout
21352 \begin_inset Flex Code
21355 \begin_layout Plain Layout
21361 ] Specifies attribute information to be output with the main tag.
21363 \begin_inset Quotes eld
21367 \begin_inset Flex Code
21370 \begin_layout Plain Layout
21371 class=`myinset' onclick=`\SpecialChar \ldots{}
21378 \begin_inset Quotes erd
21382 By default, LyX will output
21383 \begin_inset Quotes eld
21387 \begin_inset Flex Code
21390 \begin_layout Plain Layout
21397 \begin_inset Quotes erd
21401 \begin_inset Flex Code
21404 \begin_layout Plain Layout
21410 is the LyX name of the inset, made lowercase and with non-alphanumeric
21411 characters converted to underscores, for example: footnote.
21414 \begin_layout Description
21415 \begin_inset Flex Code
21418 \begin_layout Plain Layout
21425 \begin_inset Flex Code
21428 \begin_layout Plain Layout
21438 ] Whether to output the default CSS information LyX generates for this layout,
21439 even if additional information is explicitly provided via
21440 \begin_inset Flex Code
21443 \begin_layout Plain Layout
21451 \begin_inset Flex Code
21454 \begin_layout Plain Layout
21460 allows you to alter or augment the generated CSS, rather than to override
21465 \begin_layout Description
21466 \begin_inset Flex Code
21469 \begin_layout Plain Layout
21476 \begin_inset Flex Code
21479 \begin_layout Plain Layout
21485 ] Attributes for the inner tag.
21487 \begin_inset Quotes eld
21491 \begin_inset Flex Code
21494 \begin_layout Plain Layout
21495 class=`insetname_inner'
21501 \begin_inset Quotes erd
21507 \begin_layout Description
21508 \begin_inset Flex Code
21511 \begin_layout Plain Layout
21518 \begin_inset Flex Code
21521 \begin_layout Plain Layout
21527 ] The inner tag, replacing
21528 \begin_inset Flex Code
21531 \begin_layout Plain Layout
21537 in the examples above.
21538 By default, there is none.
21541 \begin_layout Description
21542 \begin_inset Flex Code
21545 \begin_layout Plain Layout
21552 \begin_inset Flex Code
21555 \begin_layout Plain Layout
21563 ] Whether this inset represents a standalone block of text (such as a footnote)
21564 or instead represents material that is included in the surrounding text
21565 (such as a branch).
21569 \begin_layout Description
21570 \begin_inset Flex Code
21573 \begin_layout Plain Layout
21580 \begin_inset Flex Code
21583 \begin_layout Plain Layout
21589 ] A label for this inset, possibly including a reference to a counter.
21590 For example, for footnote, it might be:
21591 \begin_inset Flex Code
21594 \begin_layout Plain Layout
21603 This is optional, and there is no default.
21606 \begin_layout Description
21607 \begin_inset Flex Code
21610 \begin_layout Plain Layout
21616 Information to be output in the
21617 \begin_inset Flex Code
21620 \begin_layout Plain Layout
21626 section when this style is used.
21627 This might, for example, be used to include a
21628 \begin_inset Flex Code
21631 \begin_layout Plain Layout
21638 \begin_inset Flex Code
21641 \begin_layout Plain Layout
21650 \begin_layout Description
21651 \begin_inset Flex Code
21654 \begin_layout Plain Layout
21660 CSS style information to be included when this style is used.
21661 Note that this will automatically be wrapped in a layout-generated
21662 \begin_inset Flex Code
21665 \begin_layout Plain Layout
21671 block, so only the CSS itself need be included.
21674 \begin_layout Description
21675 \begin_inset Flex Code
21678 \begin_layout Plain Layout
21685 \begin_inset Flex Code
21688 \begin_layout Plain Layout
21694 ] The tag to be used for the main label, replacing
21695 \begin_inset Flex Code
21698 \begin_layout Plain Layout
21704 in the examples above.
21705 The default depends upon the setting of
21706 \begin_inset Flex Code
21709 \begin_layout Plain Layout
21716 \begin_inset Flex Code
21719 \begin_layout Plain Layout
21725 is true, the default is
21726 \begin_inset Flex Code
21729 \begin_layout Plain Layout
21735 ; if it is false, the default is
21736 \begin_inset Flex Code
21739 \begin_layout Plain Layout
21748 \begin_layout Subsection
21752 \begin_layout Standard
21753 The XHTML output for floats too can be controlled by layout information.
21754 The output has the following form:
21757 \begin_layout LyX-Code
21759 \begin_inset Quotes erd
21763 \begin_inset Quotes erd
21769 \begin_layout LyX-Code
21770 Contents of the float.
21773 \begin_layout LyX-Code
21777 \begin_layout Standard
21778 The caption, if there is one, is a separate inset and will be output as
21780 Its appearance can be controlled via the InsetLayout for caption insets.
21784 \begin_layout Description
21785 \begin_inset Flex Code
21788 \begin_layout Plain Layout
21795 \begin_inset Flex Code
21798 \begin_layout Plain Layout
21804 ] Specifies attribute information to be output with the main tag.
21806 \begin_inset Quotes eld
21810 \begin_inset Flex Code
21813 \begin_layout Plain Layout
21814 class=`myfloat' onclick=`\SpecialChar \ldots{}
21821 \begin_inset Quotes erd
21825 By default, LyX will output
21826 \begin_inset Quotes eld
21830 \begin_inset Flex Code
21833 \begin_layout Plain Layout
21834 class=`float float-floattype'
21840 \begin_inset Quotes erd
21844 \begin_inset Flex Code
21847 \begin_layout Plain Layout
21853 is LyX's name for this type of float, as determined by the float declaration
21855 \begin_inset CommandInset ref
21857 reference "sub:Floats"
21861 ), though made lowercase and with non-alphanumeric characters converted
21862 to underscores, for example: float-table.
21865 \begin_layout Description
21866 \begin_inset Flex Code
21869 \begin_layout Plain Layout
21875 CSS style information to be included when this float is used.
21876 Note that this will automatically be wrapped in a layout-generated
21877 \begin_inset Flex Code
21880 \begin_layout Plain Layout
21886 block, so only the CSS itself need be included.
21889 \begin_layout Description
21890 \begin_inset Flex Code
21893 \begin_layout Plain Layout
21900 \begin_inset Flex Code
21903 \begin_layout Plain Layout
21909 ] The tag to be used for this float, replacing
21910 \begin_inset Quotes eld
21914 \begin_inset Flex Code
21917 \begin_layout Plain Layout
21924 \begin_inset Quotes erd
21927 in the example above.
21929 \begin_inset Flex Code
21932 \begin_layout Plain Layout
21938 and will rarely need changing.
21941 \begin_layout Subsection
21942 Bibliography formatting
21945 \begin_layout Standard
21946 The bibliography can be formatted using
21947 \begin_inset Flex Code
21950 \begin_layout Plain Layout
21958 \begin_inset CommandInset ref
21960 reference "sub:Citation-format-description"
21967 \begin_layout Subsection
21971 \begin_layout Standard
21972 We have several times mentioned that LyX will generate default CSS style
21973 rules for both insets and paragraph styles, based upon the other layout
21974 information that is provided.
21975 In this section, we shall say a word about which layout information LyX
21979 \begin_layout Standard
21980 At present, LyX auto-generates CSS only for font information, making use
21982 \begin_inset Flex Code
21985 \begin_layout Plain Layout
21992 \begin_inset Flex Code
21995 \begin_layout Plain Layout
22002 \begin_inset Flex Code
22005 \begin_layout Plain Layout
22012 \begin_inset Flex Code
22015 \begin_layout Plain Layout
22022 \begin_inset Flex Code
22025 \begin_layout Plain Layout
22033 \begin_inset CommandInset ref
22035 reference "sub:Font-description"
22039 .) The translation is mostly straightforward and obvious.
22041 \begin_inset Quotes eld
22045 \begin_inset Flex Code
22048 \begin_layout Plain Layout
22055 \begin_inset Quotes erd
22059 \begin_inset Quotes eld
22063 \begin_inset Flex Code
22066 \begin_layout Plain Layout
22067 font-family: sans-serif;
22073 \begin_inset Quotes erd
22077 The correspondence of LyX sizes and CSS sizes is a little less obvious
22078 but nonetheless intuitive.
22080 \begin_inset Flex Code
22083 \begin_layout Plain Layout
22090 \begin_inset Flex URL
22093 \begin_layout Plain Layout
22103 \begin_layout Chapter
22104 Including External Material
22107 \begin_layout Standard
22108 \begin_inset Box Shadowbox
22118 height_special "totalheight"
22121 \begin_layout Plain Layout
22122 WARNING: This portion of the documentation has not been updated for some
22124 We certainly hope that it is still accurate, but there are no guarantees.
22132 \begin_layout Standard
22133 The use of material from sources external to LyX is covered in detail in
22139 This part of the manual covers what needs to happen behind the scenes for
22140 new sorts of material to be included.
22143 \begin_layout Section
22147 \begin_layout Standard
22148 The external material feature is based on the concept of a
22153 A template is a specification of how LyX should interface with a certain
22155 As bundled, LyX comes with predefined templates for Xfig figures, various
22156 raster format images, chess diagrams, and LilyPond music notation.
22157 You can check the actual list by using the menu
22158 \begin_inset Flex MenuItem
22161 \begin_layout Plain Layout
22162 Insert\SpecialChar \menuseparator
22163 File\SpecialChar \menuseparator
22170 Furthermore, it is possible to roll your own template to support a specific
22172 Later we'll describe in more detail what is involved, and hopefully you
22173 will submit all the templates you create so we can include them in a later
22177 \begin_layout Standard
22178 Another basic idea of the external material feature is to distinguish between
22179 the original file that serves as a base for final material and the produced
22180 file that is included in your exported or printed document.
22181 For example, consider the case of a figure produced with
22182 \begin_inset Flex Code
22185 \begin_layout Plain Layout
22192 The Xfig application itself works on an original file with the
22193 \begin_inset Flex Code
22196 \begin_layout Plain Layout
22203 Within Xfig, you create and change your figure, and when you are done,
22205 \begin_inset Flex Code
22208 \begin_layout Plain Layout
22215 When you want to include the figure in your document, you invoke
22216 \begin_inset Flex Code
22219 \begin_layout Plain Layout
22225 in order to create a PostScript file that can readily be included in your
22228 \begin_inset Flex Code
22231 \begin_layout Plain Layout
22237 file is the original file, and the PostScript file is the produced file.
22240 \begin_layout Standard
22241 This distinction is important in order to allow updating of the material
22242 while you are in the process of writing the document.
22243 Furthermore, it provides us with the flexibility that is needed to support
22244 multiple export formats.
22245 For instance, in the case of a plain text file, it is not exactly an award-winn
22246 ing idea to include the figure as raw PostScript.
22247 Instead, you would either prefer to just include a reference to the figure
22248 or try to invoke some graphics to ASCII converter to make the final result
22249 look similar to the real graphics.
22250 The external material management allows you to do this, because it is parametri
22251 zed on the different export formats that LyX supports.
22254 \begin_layout Standard
22255 Besides supporting the production of different products according to the
22256 exported format, it supports tight integration with editing and viewing
22258 In the case of an Xfig figure, you are able to invoke Xfig on the original
22259 file with a single click from within the external material dialog in LyX,
22260 and also preview the produced PostScript file with Ghostview with another
22262 No more fiddling around with the command line and/or file browsers to locate
22263 and manipulate the original or produced files.
22264 In this way, you are finally able to take full advantage of the many different
22265 applications that are relevant to use when you write your documents, and
22266 ultimately be more productive.
22269 \begin_layout Section
22270 The external template configuration file
22273 \begin_layout Standard
22274 It is relatively easy to add custom external template definitions to LyX.
22275 However, be aware that doing this in an careless manner most probably
22279 introduce an easily exploitable security hole.
22280 So before you do this, please read the discussion about security in section
22282 \begin_inset CommandInset ref
22284 reference "sec:Security-discussion"
22291 \begin_layout Standard
22292 Having said that, we encourage you to submit any interesting templates that
22297 \begin_layout Standard
22298 The external templates are defined in the
22299 \begin_inset Flex Code
22302 \begin_layout Plain Layout
22303 LyXDir/lib/external_templates
22309 You can place your own version in
22310 \begin_inset Flex Code
22313 \begin_layout Plain Layout
22314 UserDir/external_templates
22322 \begin_layout Standard
22323 A typical template looks like this:
22326 \begin_layout LyX-Code
22330 \begin_layout LyX-Code
22331 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22334 \begin_layout LyX-Code
22338 \begin_layout LyX-Code
22342 \begin_layout LyX-Code
22346 \begin_layout LyX-Code
22350 \begin_layout LyX-Code
22354 \begin_layout LyX-Code
22355 AutomaticProduction true
22358 \begin_layout LyX-Code
22362 \begin_layout LyX-Code
22366 \begin_layout LyX-Code
22370 \begin_layout LyX-Code
22371 TransformCommand Rotate RotationLatexCommand
22374 \begin_layout LyX-Code
22375 TransformCommand Resize ResizeLatexCommand
22378 \begin_layout LyX-Code
22379 Product "$$RotateFront$$ResizeFront
22382 \begin_layout LyX-Code
22387 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22390 \begin_layout LyX-Code
22391 $$ResizeBack$$RotateBack"
22394 \begin_layout LyX-Code
22398 \begin_layout LyX-Code
22399 UpdateResult "$$AbsPath$$Basename.pstex_t"
22402 \begin_layout LyX-Code
22403 Requirement "graphicx"
22406 \begin_layout LyX-Code
22407 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22410 \begin_layout LyX-Code
22411 ReferencedFile latex "$$AbsPath$$Basename.eps"
22414 \begin_layout LyX-Code
22415 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22418 \begin_layout LyX-Code
22422 \begin_layout LyX-Code
22426 \begin_layout LyX-Code
22427 TransformCommand Rotate RotationLatexCommand
22430 \begin_layout LyX-Code
22431 TransformCommand Resize ResizeLatexCommand
22434 \begin_layout LyX-Code
22435 Product "$$RotateFront$$ResizeFront
22438 \begin_layout LyX-Code
22443 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22446 \begin_layout LyX-Code
22447 $$ResizeBack$$RotateBack"
22450 \begin_layout LyX-Code
22451 UpdateFormat pdftex
22454 \begin_layout LyX-Code
22455 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22458 \begin_layout LyX-Code
22459 Requirement "graphicx"
22462 \begin_layout LyX-Code
22463 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22466 \begin_layout LyX-Code
22467 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22470 \begin_layout LyX-Code
22474 \begin_layout LyX-Code
22478 \begin_layout LyX-Code
22479 Product "$$Contents(
22481 "$$AbsPath$$Basename.asc
22486 \begin_layout LyX-Code
22487 UpdateFormat asciixfig
22490 \begin_layout LyX-Code
22491 UpdateResult "$$AbsPath$$Basename.asc"
22494 \begin_layout LyX-Code
22498 \begin_layout LyX-Code
22502 \begin_layout LyX-Code
22503 Product "<graphic fileref=
22505 "$$AbsOrRelPathMaster$$Basename.eps
22510 \begin_layout LyX-Code
22514 \begin_layout LyX-Code
22518 \begin_layout LyX-Code
22519 UpdateResult "$$AbsPath$$Basename.eps"
22522 \begin_layout LyX-Code
22523 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22526 \begin_layout LyX-Code
22527 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22530 \begin_layout LyX-Code
22534 \begin_layout LyX-Code
22535 Product "[XFig: $$FName]"
22538 \begin_layout LyX-Code
22542 \begin_layout LyX-Code
22546 \begin_layout Standard
22547 As you can see, the template is enclosed in
22548 \begin_inset Flex Code
22551 \begin_layout Plain Layout
22557 \SpecialChar \ldots{}
22559 \begin_inset Flex Code
22562 \begin_layout Plain Layout
22569 It contains a header specifying some general settings and, for each supported
22570 primary document file format, a section
22571 \begin_inset Flex Code
22574 \begin_layout Plain Layout
22580 \SpecialChar \ldots{}
22582 \begin_inset Flex Code
22585 \begin_layout Plain Layout
22594 \begin_layout Subsection
22595 The template header
22598 \begin_layout Description
22599 \begin_inset Flex Code
22602 \begin_layout Plain Layout
22603 AutomaticProduction
22604 \begin_inset space ~
22612 Whether the file represented by the template must be generated by LyX.
22613 This command must occur exactly once.
22616 \begin_layout Description
22617 \begin_inset Flex Code
22620 \begin_layout Plain Layout
22622 \begin_inset space ~
22630 A glob pattern that is used in the file dialog to filter out the desired
22632 If there is more than one possible file extension (e.
22633 \begin_inset space \thinspace{}
22637 \begin_inset space \space{}
22641 \begin_inset Flex Code
22644 \begin_layout Plain Layout
22651 \begin_inset Flex Code
22654 \begin_layout Plain Layout
22660 ), use something like
22661 \begin_inset Flex Code
22664 \begin_layout Plain Layout
22671 This command must occur exactly once.
22674 \begin_layout Description
22675 \begin_inset Flex Code
22678 \begin_layout Plain Layout
22680 \begin_inset space ~
22688 The text that is displayed on the button.
22689 This command must occur exactly once.
22692 \begin_layout Description
22693 \begin_inset Flex Code
22696 \begin_layout Plain Layout
22698 \begin_inset space ~
22702 \begin_inset space ~
22710 The help text that is used in the External dialog.
22711 Provide enough information to explain to the user just what the template
22712 can provide him with.
22713 This command must occur exactly once.
22716 \begin_layout Description
22717 \begin_inset Flex Code
22720 \begin_layout Plain Layout
22722 \begin_inset space ~
22730 The file format of the original file.
22731 This must be the name of a format that is known to LyX (see section
22732 \begin_inset space ~
22736 \begin_inset CommandInset ref
22738 reference "sec:Formats"
22744 \begin_inset Quotes eld
22748 \begin_inset Flex Code
22751 \begin_layout Plain Layout
22758 \begin_inset Quotes erd
22761 if the template can handle original files of more than one format.
22762 LyX will attempt to interrogate the file itself in order to deduce its
22763 format in this case.
22764 This command must occur exactly once.
22767 \begin_layout Description
22768 \begin_inset Flex Code
22771 \begin_layout Plain Layout
22773 \begin_inset space ~
22781 A unique name for the template.
22782 It must not contain substitution macros (see below).
22785 \begin_layout Description
22786 \begin_inset Flex Code
22789 \begin_layout Plain Layout
22791 \begin_inset space ~
22794 Rotate|Resize|Clip|Extra
22799 This command specifies which transformations are supported by this template.
22800 It may occur zero or more times.
22801 This command enables the corresponding tabs in the external dialog.
22803 \begin_inset Flex Code
22806 \begin_layout Plain Layout
22812 command must have either a corresponding
22813 \begin_inset Flex Code
22816 \begin_layout Plain Layout
22823 \begin_inset Flex Code
22826 \begin_layout Plain Layout
22833 \begin_inset Flex Code
22836 \begin_layout Plain Layout
22843 Otherwise the transformation will not be supported by that format.
22846 \begin_layout Subsection
22850 \begin_layout Description
22851 \begin_inset Flex Code
22854 \begin_layout Plain Layout
22856 \begin_inset space ~
22859 LaTeX|PDFLaTeX|PlainText|DocBook
22864 The primary document file format that this format definition is for.
22865 Not every template has a sensible representation in all document file formats.
22866 Please define nevertheless a
22867 \begin_inset Flex Code
22870 \begin_layout Plain Layout
22876 section for all templates.
22877 Use a dummy text when no representation is available.
22878 Then you can at least see a reference to the external material in the exported
22882 \begin_layout Description
22883 \begin_inset Flex Code
22886 \begin_layout Plain Layout
22888 \begin_inset space ~
22892 \begin_inset space ~
22900 This command defines an additional macro
22901 \begin_inset Flex Code
22904 \begin_layout Plain Layout
22910 for substitution in
22911 \begin_inset Flex Code
22914 \begin_layout Plain Layout
22922 \begin_inset Flex Code
22925 \begin_layout Plain Layout
22931 itself may contain substitution macros.
22932 The advantage over using
22933 \begin_inset Flex Code
22936 \begin_layout Plain Layout
22943 \begin_inset Flex Code
22946 \begin_layout Plain Layout
22952 is that the substituted value of
22953 \begin_inset Flex Code
22956 \begin_layout Plain Layout
22962 is sanitized so that it is a valid optional argument in the document format.
22963 This command may occur zero or more times.
22966 \begin_layout Description
22967 \begin_inset Flex Code
22970 \begin_layout Plain Layout
22972 \begin_inset space ~
22980 The text that is inserted in the exported document.
22981 This is actually the most important command and can be quite complex.
22982 This command must occur exactly once.
22985 \begin_layout Description
22986 \begin_inset Flex Code
22989 \begin_layout Plain Layout
22991 \begin_inset space ~
22999 This command specifies a preamble snippet that will be included in the
23001 It has to be defined using
23002 \begin_inset Flex Code
23005 \begin_layout Plain Layout
23011 \SpecialChar \ldots{}
23013 \begin_inset Flex Code
23016 \begin_layout Plain Layout
23023 This command may occur zero or more times.
23026 \begin_layout Description
23027 \begin_inset Flex Code
23030 \begin_layout Plain Layout
23032 \begin_inset space ~
23036 \begin_inset space ~
23044 This command denotes files that are created by the conversion process and
23045 are needed for a particular export format.
23046 If the filename is relative, it is interpreted relative to the master document.
23047 This command may be given zero or more times.
23050 \begin_layout Description
23051 \begin_inset Flex Code
23054 \begin_layout Plain Layout
23056 \begin_inset space ~
23064 The name of a required LaTeX package.
23065 The package is included via
23066 \begin_inset Flex Code
23069 \begin_layout Plain Layout
23077 in the LaTeX preamble.
23078 This command may occur zero or more times.
23081 \begin_layout Description
23082 \begin_inset Flex Code
23085 \begin_layout Plain Layout
23087 \begin_inset space ~
23091 \begin_inset space ~
23094 RotationLatexCommand
23099 This command specifies that the built in LaTeX command should be used for
23101 This command may occur once or not at all.
23104 \begin_layout Description
23105 \begin_inset Flex Code
23108 \begin_layout Plain Layout
23110 \begin_inset space ~
23114 \begin_inset space ~
23122 This command specifies that the built in LaTeX command should be used for
23124 This command may occur once or not at all.
23127 \begin_layout Description
23128 \begin_inset Flex Code
23131 \begin_layout Plain Layout
23133 \begin_inset space ~
23137 \begin_inset space ~
23140 RotationLatexOption
23145 This command specifies that rotation is done via an optional argument.
23146 This command may occur once or not at all.
23149 \begin_layout Description
23150 \begin_inset Flex Code
23153 \begin_layout Plain Layout
23155 \begin_inset space ~
23159 \begin_inset space ~
23167 This command specifies that resizing is done via an optional argument.
23168 This command may occur once or not at all.
23171 \begin_layout Description
23172 \begin_inset Flex Code
23175 \begin_layout Plain Layout
23177 \begin_inset space ~
23181 \begin_inset space ~
23189 This command specifies that clipping is done via an optional argument.
23190 This command may occur once or not at all.
23193 \begin_layout Description
23194 \begin_inset Flex Code
23197 \begin_layout Plain Layout
23199 \begin_inset space ~
23203 \begin_inset space ~
23211 This command specifies that an extra optional argument is used.
23212 This command may occur once or not at all.
23215 \begin_layout Description
23216 \begin_inset Flex Code
23219 \begin_layout Plain Layout
23221 \begin_inset space ~
23229 The file format of the converted file.
23230 This must be the name of a format that is known to LyX (see the
23231 \begin_inset Flex MenuItem
23234 \begin_layout Plain Layout
23239 ools\SpecialChar \menuseparator
23244 references\SpecialChar \menuseparator
23245 File Handling\SpecialChar \menuseparator
23252 This command must occur exactly once.
23255 \begin_layout Description
23256 \begin_inset Flex Code
23259 \begin_layout Plain Layout
23261 \begin_inset space ~
23269 The file name of the converted file.
23270 The file name must be absolute.
23271 This command must occur exactly once.
23274 \begin_layout Subsection
23275 Preamble definitions
23278 \begin_layout Standard
23279 The external template configuration file may contain additional preamble
23280 definitions enclosed by
23281 \begin_inset Flex Code
23284 \begin_layout Plain Layout
23290 \SpecialChar \ldots{}
23292 \begin_inset Flex Code
23295 \begin_layout Plain Layout
23302 They can be used by the templates in the
23303 \begin_inset Flex Code
23306 \begin_layout Plain Layout
23315 \begin_layout Section
23316 The substitution mechanism
23319 \begin_layout Standard
23320 When the external material facility invokes an external program, it is done
23321 on the basis of a command defined in the template configuration file.
23322 These commands can contain various macros that are expanded before execution.
23323 Execution always take place in the directory of the containing document.
23326 \begin_layout Standard
23327 Also, whenever external material is to be displayed, the name will be produced
23328 by the substitution mechanism, and most other commands in the template
23329 definition support substitution as well.
23332 \begin_layout Standard
23333 The available macros are the following:
23336 \begin_layout Description
23337 \begin_inset Flex Code
23340 \begin_layout Plain Layout
23341 $$AbsOrRelPathMaster
23346 The file path, absolute or relative to the master LyX document.
23349 \begin_layout Description
23350 \begin_inset Flex Code
23353 \begin_layout Plain Layout
23354 $$AbsOrRelPathParent
23359 The file path, absolute or relative to the LyX document.
23362 \begin_layout Description
23363 \begin_inset Flex Code
23366 \begin_layout Plain Layout
23372 The absolute file path.
23375 \begin_layout Description
23376 \begin_inset Flex Code
23379 \begin_layout Plain Layout
23385 The filename without path and without the extension.
23388 \begin_layout Description
23389 \begin_inset Flex Code
23392 \begin_layout Plain Layout
23394 \begin_inset Quotes eld
23398 \begin_inset Quotes erd
23406 This macro will expand to the contents of the file with the name
23407 \begin_inset Flex Code
23410 \begin_layout Plain Layout
23419 \begin_layout Description
23420 \begin_inset Flex Code
23423 \begin_layout Plain Layout
23429 The file extension (including the dot).
23432 \begin_layout Description
23433 \begin_inset Flex Code
23436 \begin_layout Plain Layout
23442 The filename of the file specified in the external material dialog.
23443 This is either an absolute name, or it is relative to the LyX document.
23446 \begin_layout Description
23447 \begin_inset Flex Code
23450 \begin_layout Plain Layout
23457 \begin_inset Flex Code
23460 \begin_layout Plain Layout
23466 (absolute name or relative to the LyX document).
23469 \begin_layout Description
23470 \begin_inset Flex Code
23473 \begin_layout Plain Layout
23479 The file path, relative to the master LyX document.
23482 \begin_layout Description
23483 \begin_inset Flex Code
23486 \begin_layout Plain Layout
23492 The file path, relative to the LyX document.
23495 \begin_layout Description
23496 \begin_inset Flex Code
23499 \begin_layout Plain Layout
23505 This macro will expand to the absolute path of the system directory.
23506 This is typically used to point to the various helper scripts that are
23510 \begin_layout Description
23511 \begin_inset Flex Code
23514 \begin_layout Plain Layout
23520 A name and full path to a temporary file which will be automatically deleted
23521 whenever the containing document is closed, or the external material insertion
23525 \begin_layout Standard
23526 All path macros contain a trailing directory separator, so you can construct
23528 \begin_inset space \thinspace{}
23532 \begin_inset space \space{}
23535 the absolute filename with
23536 \begin_inset Flex Code
23539 \begin_layout Plain Layout
23540 $$AbsPath$$Basename$$Extension
23548 \begin_layout Standard
23549 The macros above are substituted in all commands unless otherwise noted.
23551 \begin_inset Flex Code
23554 \begin_layout Plain Layout
23560 supports additionally the following substitutions if they are enabled by
23562 \begin_inset Flex Code
23565 \begin_layout Plain Layout
23572 \begin_inset Flex Code
23575 \begin_layout Plain Layout
23584 \begin_layout Description
23585 \begin_inset Flex Code
23588 \begin_layout Plain Layout
23594 The front part of the resize command.
23597 \begin_layout Description
23598 \begin_inset Flex Code
23601 \begin_layout Plain Layout
23607 The back part of the resize command.
23610 \begin_layout Description
23611 \begin_inset Flex Code
23614 \begin_layout Plain Layout
23620 The front part of the rotation command.
23623 \begin_layout Description
23624 \begin_inset Flex Code
23627 \begin_layout Plain Layout
23633 The back part of the rotation command.
23636 \begin_layout Standard
23637 The value string of the
23638 \begin_inset Flex Code
23641 \begin_layout Plain Layout
23647 command supports additionally the following substitutions if they are enabled
23649 \begin_inset Flex Code
23652 \begin_layout Plain Layout
23659 \begin_inset Flex Code
23662 \begin_layout Plain Layout
23671 \begin_layout Description
23672 \begin_inset Flex Code
23675 \begin_layout Plain Layout
23684 \begin_layout Description
23685 \begin_inset Flex Code
23688 \begin_layout Plain Layout
23697 \begin_layout Description
23698 \begin_inset Flex Code
23701 \begin_layout Plain Layout
23710 \begin_layout Description
23711 \begin_inset Flex Code
23714 \begin_layout Plain Layout
23720 The rotation option.
23723 \begin_layout Standard
23724 You may ask why there are so many path macros.
23725 There are mainly two reasons:
23728 \begin_layout Enumerate
23729 Relative and absolute file names should remain relative or absolute, respectivel
23731 Users may have reasons to prefer either form.
23732 Relative names are useful for portable documents that should work on different
23733 machines, for example.
23734 Absolute names may be required by some programs.
23737 \begin_layout Enumerate
23738 LaTeX treats relative file names differently than LyX and other programs
23739 in nested included files.
23740 For LyX, a relative file name is always relative to the document that contains
23742 For LaTeX, it is always relative to the master document.
23743 These two definitions are identical if you have only one document, but
23744 differ if you have a master document that includes part documents.
23745 That means that relative filenames must be transformed when presented to
23747 Fortunately LyX does this automatically for you if you choose the right
23751 \begin_layout Standard
23752 So which path macro should be used in new template definitions? The rule
23756 \begin_layout Itemize
23758 \begin_inset Flex Code
23761 \begin_layout Plain Layout
23767 if an absolute path is required.
23770 \begin_layout Itemize
23772 \begin_inset Flex Code
23775 \begin_layout Plain Layout
23776 $$AbsOrRelPathMaster
23781 if the substituted string is some kind of LaTeX input.
23784 \begin_layout Itemize
23786 \begin_inset Flex Code
23789 \begin_layout Plain Layout
23790 $$AbsOrRelPathParent
23795 in order to preserve the user's choice.
23798 \begin_layout Standard
23799 There are special cases where this rule does not work and e.
23800 \begin_inset space \thinspace{}
23804 \begin_inset space \space{}
23807 relative names are needed, but normally it will work just fine.
23808 One example for such a case is the command
23809 \begin_inset Flex Code
23812 \begin_layout Plain Layout
23813 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23818 in the XFig template above: We can't use the absolute name because the
23820 \begin_inset Flex Code
23823 \begin_layout Plain Layout
23829 files needs the relative name in order to rewrite the file content.
23832 \begin_layout Section
23833 Security discussion
23834 \begin_inset CommandInset label
23836 name "sec:Security-discussion"
23843 \begin_layout Standard
23844 The external material feature interfaces with a lot of external programs
23845 and does so automatically, so we have to consider the security implications
23847 In particular, since you have the option of including your own filenames
23848 and/or parameter strings and those are expanded into a command, it seems
23849 that it would be possible to create a malicious document which executes
23850 arbitrary commands when a user views or prints the document.
23851 This is something we definitely want to avoid.
23854 \begin_layout Standard
23855 However, since the external program commands are specified in the template
23856 configuration file only, there are no security issues if LyX is properly
23857 configured with safe templates only.
23858 This is so because the external programs are invoked with the
23859 \begin_inset Flex Code
23862 \begin_layout Plain Layout
23868 -system call rather than the
23869 \begin_inset Flex Code
23872 \begin_layout Plain Layout
23878 system-call, so it's not possible to execute arbitrary commands from the
23879 filename or parameter section via the shell.
23882 \begin_layout Standard
23883 This also implies that you are restricted in what command strings you can
23884 use in the external material templates.
23885 In particular, pipes and redirection are not readily available.
23886 This has to be so if LyX should remain safe.
23887 If you want to use some of the shell features, you should write a safe
23888 script to do this in a controlled manner, and then invoke the script from
23889 the command string.
23893 \begin_layout Standard
23894 It is possible to design a template that interacts directly with the shell,
23895 but since this would allow a malicious user to execute arbitrary commands
23896 by writing clever filenames and/or parameters, we generally recommend that
23897 you only use safe scripts that work with the
23898 \begin_inset Flex Code
23901 \begin_layout Plain Layout
23907 system call in a controlled manner.
23908 Of course, for use in a controlled environment, it can be tempting to just
23909 fall back to use ordinary shell scripts.
23910 If you do so, be aware that you
23914 provide an easily exploitable security hole in your system.
23915 Of course it stands to reason that such unsafe templates will never be
23916 included in the standard LyX distribution, although we do encourage people
23917 to submit new templates in the open source tradition.
23918 But LyX as shipped from the official distribution channels will never have
23922 \begin_layout Standard
23923 Including external material provides a lot of power, and you have to be
23924 careful not to introduce security hazards with this power.
23925 A subtle error in a single line in an innocent looking script can open
23926 the door to huge security problems.
23927 So if you do not fully understand the issues, we recommend that you consult
23928 a knowledgeable security professional or the LyX development team if you
23929 have any questions about whether a given template is safe or not.
23930 And do this before you use it in an uncontrolled environment.
23933 \begin_layout Chapter
23935 List of functions to be used in layouts
23936 \begin_inset CommandInset label
23938 name "chap:List-of-functions"
23945 \begin_layout Standard
23947 \begin_inset Tabular
23948 <lyxtabular version="3" rows="10" columns="6">
23949 <features rotate="0" tabularvalignment="middle">
23950 <column alignment="left" valignment="top" width="14col%">
23951 <column alignment="left" valignment="top" width="14col%">
23952 <column alignment="left" valignment="top" width="14col%">
23953 <column alignment="left" valignment="top" width="14col%">
23954 <column alignment="left" valignment="top" width="14col%">
23955 <column alignment="left" valignment="top" width="14col%">
23957 <cell alignment="left" valignment="top" usebox="none">
23960 \begin_layout Plain Layout
23966 <cell alignment="left" valignment="top" usebox="none">
23969 \begin_layout Plain Layout
23975 <cell alignment="left" valignment="top" usebox="none">
23978 \begin_layout Plain Layout
23984 <cell alignment="left" valignment="top" usebox="none">
23987 \begin_layout Plain Layout
23993 <cell alignment="left" valignment="top" usebox="none">
23996 \begin_layout Plain Layout
24002 <cell alignment="left" valignment="top" usebox="none">
24005 \begin_layout Plain Layout
24013 <cell alignment="left" valignment="top" usebox="none">
24016 \begin_layout Plain Layout
24022 <cell alignment="left" valignment="top" usebox="none">
24025 \begin_layout Plain Layout
24031 <cell alignment="left" valignment="top" usebox="none">
24034 \begin_layout Plain Layout
24040 <cell alignment="left" valignment="top" usebox="none">
24043 \begin_layout Plain Layout
24049 <cell alignment="left" valignment="top" usebox="none">
24052 \begin_layout Plain Layout
24058 <cell alignment="left" valignment="top" usebox="none">
24061 \begin_layout Plain Layout
24069 <cell alignment="left" valignment="top" usebox="none">
24072 \begin_layout Plain Layout
24078 <cell alignment="left" valignment="top" usebox="none">
24081 \begin_layout Plain Layout
24087 <cell alignment="left" valignment="top" usebox="none">
24090 \begin_layout Plain Layout
24096 <cell alignment="left" valignment="top" usebox="none">
24099 \begin_layout Plain Layout
24105 <cell alignment="left" valignment="top" usebox="none">
24108 \begin_layout Plain Layout
24114 <cell alignment="left" valignment="top" usebox="none">
24117 \begin_layout Plain Layout
24125 <cell alignment="left" valignment="top" usebox="none">
24128 \begin_layout Plain Layout
24134 <cell alignment="left" valignment="top" usebox="none">
24137 \begin_layout Plain Layout
24143 <cell alignment="left" valignment="top" usebox="none">
24146 \begin_layout Plain Layout
24152 <cell alignment="left" valignment="top" usebox="none">
24155 \begin_layout Plain Layout
24161 <cell alignment="left" valignment="top" usebox="none">
24164 \begin_layout Plain Layout
24170 <cell alignment="left" valignment="top" usebox="none">
24173 \begin_layout Plain Layout
24181 <cell alignment="left" valignment="top" usebox="none">
24184 \begin_layout Plain Layout
24190 <cell alignment="left" valignment="top" usebox="none">
24193 \begin_layout Plain Layout
24199 <cell alignment="left" valignment="top" usebox="none">
24202 \begin_layout Plain Layout
24208 <cell alignment="left" valignment="top" usebox="none">
24211 \begin_layout Plain Layout
24217 <cell alignment="left" valignment="top" usebox="none">
24220 \begin_layout Plain Layout
24226 <cell alignment="left" valignment="top" usebox="none">
24229 \begin_layout Plain Layout
24237 <cell alignment="left" valignment="top" usebox="none">
24240 \begin_layout Plain Layout
24246 <cell alignment="left" valignment="top" usebox="none">
24249 \begin_layout Plain Layout
24255 <cell alignment="left" valignment="top" usebox="none">
24258 \begin_layout Plain Layout
24264 <cell alignment="left" valignment="top" usebox="none">
24267 \begin_layout Plain Layout
24273 <cell alignment="left" valignment="top" usebox="none">
24276 \begin_layout Plain Layout
24282 <cell alignment="left" valignment="top" usebox="none">
24285 \begin_layout Plain Layout
24293 <cell alignment="left" valignment="top" usebox="none">
24296 \begin_layout Plain Layout
24302 <cell alignment="left" valignment="top" usebox="none">
24305 \begin_layout Plain Layout
24311 <cell alignment="left" valignment="top" usebox="none">
24314 \begin_layout Plain Layout
24320 <cell alignment="left" valignment="top" usebox="none">
24323 \begin_layout Plain Layout
24329 <cell alignment="left" valignment="top" usebox="none">
24332 \begin_layout Plain Layout
24338 <cell alignment="left" valignment="top" usebox="none">
24341 \begin_layout Plain Layout
24349 <cell alignment="left" valignment="top" usebox="none">
24352 \begin_layout Plain Layout
24358 <cell alignment="left" valignment="top" usebox="none">
24361 \begin_layout Plain Layout
24367 <cell alignment="left" valignment="top" usebox="none">
24370 \begin_layout Plain Layout
24376 <cell alignment="left" valignment="top" usebox="none">
24379 \begin_layout Plain Layout
24385 <cell alignment="left" valignment="top" usebox="none">
24388 \begin_layout Plain Layout
24394 <cell alignment="left" valignment="top" usebox="none">
24397 \begin_layout Plain Layout
24405 <cell alignment="left" valignment="top" usebox="none">
24408 \begin_layout Plain Layout
24414 <cell alignment="left" valignment="top" usebox="none">
24417 \begin_layout Plain Layout
24423 <cell alignment="left" valignment="top" usebox="none">
24426 \begin_layout Plain Layout
24432 <cell alignment="left" valignment="top" usebox="none">
24435 \begin_layout Plain Layout
24441 <cell alignment="left" valignment="top" usebox="none">
24444 \begin_layout Plain Layout
24450 <cell alignment="left" valignment="top" usebox="none">
24453 \begin_layout Plain Layout
24461 <cell alignment="left" valignment="top" usebox="none">
24464 \begin_layout Plain Layout
24470 <cell alignment="left" valignment="top" usebox="none">
24473 \begin_layout Plain Layout
24479 <cell alignment="left" valignment="top" usebox="none">
24482 \begin_layout Plain Layout
24488 <cell alignment="left" valignment="top" usebox="none">
24491 \begin_layout Plain Layout
24497 <cell alignment="left" valignment="top" usebox="none">
24500 \begin_layout Plain Layout
24506 <cell alignment="left" valignment="top" usebox="none">
24509 \begin_layout Plain Layout
24523 \begin_layout Standard
24525 \begin_inset Tabular
24526 <lyxtabular version="3" rows="10" columns="6">
24527 <features rotate="0" tabularvalignment="middle">
24528 <column alignment="left" valignment="top" width="14col%">
24529 <column alignment="left" valignment="top" width="14col%">
24530 <column alignment="left" valignment="top" width="14col%">
24531 <column alignment="left" valignment="top" width="14col%">
24532 <column alignment="left" valignment="top" width="14col%">
24533 <column alignment="left" valignment="top" width="14col%">
24535 <cell alignment="left" valignment="top" usebox="none">
24538 \begin_layout Plain Layout
24544 <cell alignment="left" valignment="top" usebox="none">
24547 \begin_layout Plain Layout
24553 <cell alignment="left" valignment="top" usebox="none">
24556 \begin_layout Plain Layout
24562 <cell alignment="left" valignment="top" usebox="none">
24565 \begin_layout Plain Layout
24571 <cell alignment="left" valignment="top" usebox="none">
24574 \begin_layout Plain Layout
24580 <cell alignment="left" valignment="top" usebox="none">
24583 \begin_layout Plain Layout
24591 <cell alignment="left" valignment="top" usebox="none">
24594 \begin_layout Plain Layout
24600 <cell alignment="left" valignment="top" usebox="none">
24603 \begin_layout Plain Layout
24609 <cell alignment="left" valignment="top" usebox="none">
24612 \begin_layout Plain Layout
24618 <cell alignment="left" valignment="top" usebox="none">
24621 \begin_layout Plain Layout
24627 <cell alignment="left" valignment="top" usebox="none">
24630 \begin_layout Plain Layout
24636 <cell alignment="left" valignment="top" usebox="none">
24639 \begin_layout Plain Layout
24647 <cell alignment="left" valignment="top" usebox="none">
24650 \begin_layout Plain Layout
24656 <cell alignment="left" valignment="top" usebox="none">
24659 \begin_layout Plain Layout
24665 <cell alignment="left" valignment="top" usebox="none">
24668 \begin_layout Plain Layout
24674 <cell alignment="left" valignment="top" usebox="none">
24677 \begin_layout Plain Layout
24683 <cell alignment="left" valignment="top" usebox="none">
24686 \begin_layout Plain Layout
24692 <cell alignment="left" valignment="top" usebox="none">
24695 \begin_layout Plain Layout
24703 <cell alignment="left" valignment="top" usebox="none">
24706 \begin_layout Plain Layout
24712 <cell alignment="left" valignment="top" usebox="none">
24715 \begin_layout Plain Layout
24721 <cell alignment="left" valignment="top" usebox="none">
24724 \begin_layout Plain Layout
24730 <cell alignment="left" valignment="top" usebox="none">
24733 \begin_layout Plain Layout
24739 <cell alignment="left" valignment="top" usebox="none">
24742 \begin_layout Plain Layout
24748 <cell alignment="left" valignment="top" usebox="none">
24751 \begin_layout Plain Layout
24759 <cell alignment="left" valignment="top" usebox="none">
24762 \begin_layout Plain Layout
24768 <cell alignment="left" valignment="top" usebox="none">
24771 \begin_layout Plain Layout
24777 <cell alignment="left" valignment="top" usebox="none">
24780 \begin_layout Plain Layout
24786 <cell alignment="left" valignment="top" usebox="none">
24789 \begin_layout Plain Layout
24795 <cell alignment="left" valignment="top" usebox="none">
24798 \begin_layout Plain Layout
24804 <cell alignment="left" valignment="top" usebox="none">
24807 \begin_layout Plain Layout
24815 <cell alignment="left" valignment="top" usebox="none">
24818 \begin_layout Plain Layout
24824 <cell alignment="left" valignment="top" usebox="none">
24827 \begin_layout Plain Layout
24833 <cell alignment="left" valignment="top" usebox="none">
24836 \begin_layout Plain Layout
24842 <cell alignment="left" valignment="top" usebox="none">
24845 \begin_layout Plain Layout
24851 <cell alignment="left" valignment="top" usebox="none">
24854 \begin_layout Plain Layout
24860 <cell alignment="left" valignment="top" usebox="none">
24863 \begin_layout Plain Layout
24871 <cell alignment="left" valignment="top" usebox="none">
24874 \begin_layout Plain Layout
24880 <cell alignment="left" valignment="top" usebox="none">
24883 \begin_layout Plain Layout
24889 <cell alignment="left" valignment="top" usebox="none">
24892 \begin_layout Plain Layout
24898 <cell alignment="left" valignment="top" usebox="none">
24901 \begin_layout Plain Layout
24907 <cell alignment="left" valignment="top" usebox="none">
24910 \begin_layout Plain Layout
24916 <cell alignment="left" valignment="top" usebox="none">
24919 \begin_layout Plain Layout
24927 <cell alignment="left" valignment="top" usebox="none">
24930 \begin_layout Plain Layout
24936 <cell alignment="left" valignment="top" usebox="none">
24939 \begin_layout Plain Layout
24945 <cell alignment="left" valignment="top" usebox="none">
24948 \begin_layout Plain Layout
24954 <cell alignment="left" valignment="top" usebox="none">
24957 \begin_layout Plain Layout
24963 <cell alignment="left" valignment="top" usebox="none">
24966 \begin_layout Plain Layout
24972 <cell alignment="left" valignment="top" usebox="none">
24975 \begin_layout Plain Layout
24983 <cell alignment="left" valignment="top" usebox="none">
24986 \begin_layout Plain Layout
24992 <cell alignment="left" valignment="top" usebox="none">
24995 \begin_layout Plain Layout
25001 <cell alignment="left" valignment="top" usebox="none">
25004 \begin_layout Plain Layout
25010 <cell alignment="left" valignment="top" usebox="none">
25013 \begin_layout Plain Layout
25019 <cell alignment="left" valignment="top" usebox="none">
25022 \begin_layout Plain Layout
25028 <cell alignment="left" valignment="top" usebox="none">
25031 \begin_layout Plain Layout
25039 <cell alignment="left" valignment="top" usebox="none">
25042 \begin_layout Plain Layout
25048 <cell alignment="left" valignment="top" usebox="none">
25051 \begin_layout Plain Layout
25057 <cell alignment="left" valignment="top" usebox="none">
25060 \begin_layout Plain Layout
25066 <cell alignment="left" valignment="top" usebox="none">
25069 \begin_layout Plain Layout
25075 <cell alignment="left" valignment="top" usebox="none">
25078 \begin_layout Plain Layout
25084 <cell alignment="left" valignment="top" usebox="none">
25087 \begin_layout Plain Layout
25101 \begin_layout Chapter
25102 List of supported LyX functions to be used in layouts
25105 \begin_layout Standard
25107 \begin_inset Tabular
25108 <lyxtabular version="3" rows="10" columns="8">
25109 <features rotate="0" tabularvalignment="middle">
25110 <column alignment="left" valignment="top" width="0">
25111 <column alignment="left" valignment="top" width="0">
25112 <column alignment="left" valignment="top" width="0">
25113 <column alignment="left" valignment="top" width="0">
25114 <column alignment="left" valignment="top" width="0">
25115 <column alignment="left" valignment="top" width="0">
25116 <column alignment="left" valignment="top" width="0">
25117 <column alignment="left" valignment="top" width="0">
25119 <cell alignment="left" valignment="top" usebox="none">
25122 \begin_layout Plain Layout
25128 <cell alignment="left" valignment="top" usebox="none">
25131 \begin_layout Plain Layout
25137 <cell alignment="left" valignment="top" usebox="none">
25140 \begin_layout Plain Layout
25146 <cell alignment="left" valignment="top" usebox="none">
25149 \begin_layout Plain Layout
25155 <cell alignment="center" valignment="top" usebox="none">
25158 \begin_layout Plain Layout
25164 <cell alignment="center" valignment="top" usebox="none">
25167 \begin_layout Plain Layout
25173 <cell alignment="center" valignment="top" usebox="none">
25176 \begin_layout Plain Layout
25182 <cell alignment="center" valignment="top" usebox="none">
25185 \begin_layout Plain Layout
25193 <cell alignment="left" valignment="top" usebox="none">
25196 \begin_layout Plain Layout
25202 <cell alignment="left" valignment="top" usebox="none">
25205 \begin_layout Plain Layout
25211 <cell alignment="left" valignment="top" usebox="none">
25214 \begin_layout Plain Layout
25220 <cell alignment="left" valignment="top" usebox="none">
25223 \begin_layout Plain Layout
25229 <cell alignment="center" valignment="top" usebox="none">
25232 \begin_layout Plain Layout
25238 <cell alignment="center" valignment="top" usebox="none">
25241 \begin_layout Plain Layout
25247 <cell alignment="center" valignment="top" usebox="none">
25250 \begin_layout Plain Layout
25256 <cell alignment="center" valignment="top" usebox="none">
25259 \begin_layout Plain Layout
25267 <cell alignment="left" valignment="top" usebox="none">
25270 \begin_layout Plain Layout
25276 <cell alignment="left" valignment="top" usebox="none">
25279 \begin_layout Plain Layout
25285 <cell alignment="left" valignment="top" usebox="none">
25288 \begin_layout Plain Layout
25294 <cell alignment="left" valignment="top" usebox="none">
25297 \begin_layout Plain Layout
25303 <cell alignment="center" valignment="top" usebox="none">
25306 \begin_layout Plain Layout
25312 <cell alignment="center" valignment="top" usebox="none">
25315 \begin_layout Plain Layout
25321 <cell alignment="center" valignment="top" usebox="none">
25324 \begin_layout Plain Layout
25330 <cell alignment="center" valignment="top" usebox="none">
25333 \begin_layout Plain Layout
25341 <cell alignment="left" valignment="top" usebox="none">
25344 \begin_layout Plain Layout
25350 <cell alignment="left" valignment="top" usebox="none">
25353 \begin_layout Plain Layout
25359 <cell alignment="left" valignment="top" usebox="none">
25362 \begin_layout Plain Layout
25368 <cell alignment="left" valignment="top" usebox="none">
25371 \begin_layout Plain Layout
25377 <cell alignment="center" valignment="top" usebox="none">
25380 \begin_layout Plain Layout
25386 <cell alignment="center" valignment="top" usebox="none">
25389 \begin_layout Plain Layout
25395 <cell alignment="center" valignment="top" usebox="none">
25398 \begin_layout Plain Layout
25404 <cell alignment="center" valignment="top" usebox="none">
25407 \begin_layout Plain Layout
25415 <cell alignment="left" valignment="top" usebox="none">
25418 \begin_layout Plain Layout
25424 <cell alignment="left" valignment="top" usebox="none">
25427 \begin_layout Plain Layout
25433 <cell alignment="left" valignment="top" usebox="none">
25436 \begin_layout Plain Layout
25442 <cell alignment="left" valignment="top" usebox="none">
25445 \begin_layout Plain Layout
25451 <cell alignment="center" valignment="top" usebox="none">
25454 \begin_layout Plain Layout
25460 <cell alignment="center" valignment="top" usebox="none">
25463 \begin_layout Plain Layout
25469 <cell alignment="center" valignment="top" usebox="none">
25472 \begin_layout Plain Layout
25478 <cell alignment="center" valignment="top" usebox="none">
25481 \begin_layout Plain Layout
25489 <cell alignment="left" valignment="top" usebox="none">
25492 \begin_layout Plain Layout
25498 <cell alignment="left" valignment="top" usebox="none">
25501 \begin_layout Plain Layout
25507 <cell alignment="left" valignment="top" usebox="none">
25510 \begin_layout Plain Layout
25516 <cell alignment="left" valignment="top" usebox="none">
25519 \begin_layout Plain Layout
25525 <cell alignment="center" valignment="top" usebox="none">
25528 \begin_layout Plain Layout
25534 <cell alignment="center" valignment="top" usebox="none">
25537 \begin_layout Plain Layout
25543 <cell alignment="center" valignment="top" usebox="none">
25546 \begin_layout Plain Layout
25552 <cell alignment="center" valignment="top" usebox="none">
25555 \begin_layout Plain Layout
25563 <cell alignment="left" valignment="top" usebox="none">
25566 \begin_layout Plain Layout
25572 <cell alignment="left" valignment="top" usebox="none">
25575 \begin_layout Plain Layout
25581 <cell alignment="left" valignment="top" usebox="none">
25584 \begin_layout Plain Layout
25590 <cell alignment="left" valignment="top" usebox="none">
25593 \begin_layout Plain Layout
25599 <cell alignment="center" valignment="top" usebox="none">
25602 \begin_layout Plain Layout
25608 <cell alignment="center" valignment="top" usebox="none">
25611 \begin_layout Plain Layout
25617 <cell alignment="center" valignment="top" usebox="none">
25620 \begin_layout Plain Layout
25626 <cell alignment="center" valignment="top" usebox="none">
25629 \begin_layout Plain Layout
25637 <cell alignment="left" valignment="top" usebox="none">
25640 \begin_layout Plain Layout
25646 <cell alignment="left" valignment="top" usebox="none">
25649 \begin_layout Plain Layout
25655 <cell alignment="left" valignment="top" usebox="none">
25658 \begin_layout Plain Layout
25664 <cell alignment="left" valignment="top" usebox="none">
25667 \begin_layout Plain Layout
25673 <cell alignment="center" valignment="top" usebox="none">
25676 \begin_layout Plain Layout
25682 <cell alignment="center" valignment="top" usebox="none">
25685 \begin_layout Plain Layout
25691 <cell alignment="center" valignment="top" usebox="none">
25694 \begin_layout Plain Layout
25700 <cell alignment="center" valignment="top" usebox="none">
25703 \begin_layout Plain Layout
25711 <cell alignment="left" valignment="top" usebox="none">
25714 \begin_layout Plain Layout
25720 <cell alignment="left" valignment="top" usebox="none">
25723 \begin_layout Plain Layout
25729 <cell alignment="left" valignment="top" usebox="none">
25732 \begin_layout Plain Layout
25738 <cell alignment="left" valignment="top" usebox="none">
25741 \begin_layout Plain Layout
25747 <cell alignment="center" valignment="top" usebox="none">
25750 \begin_layout Plain Layout
25756 <cell alignment="center" valignment="top" usebox="none">
25759 \begin_layout Plain Layout
25765 <cell alignment="center" valignment="top" usebox="none">
25768 \begin_layout Plain Layout
25774 <cell alignment="center" valignment="top" usebox="none">
25777 \begin_layout Plain Layout
25785 <cell alignment="left" valignment="top" usebox="none">
25788 \begin_layout Plain Layout
25794 <cell alignment="left" valignment="top" usebox="none">
25797 \begin_layout Plain Layout
25803 <cell alignment="left" valignment="top" usebox="none">
25806 \begin_layout Plain Layout
25812 <cell alignment="left" valignment="top" usebox="none">
25815 \begin_layout Plain Layout
25821 <cell alignment="center" valignment="top" usebox="none">
25824 \begin_layout Plain Layout
25830 <cell alignment="center" valignment="top" usebox="none">
25833 \begin_layout Plain Layout
25839 <cell alignment="center" valignment="top" usebox="none">
25842 \begin_layout Plain Layout
25848 <cell alignment="center" valignment="top" usebox="none">
25851 \begin_layout Plain Layout
25865 \begin_layout Standard
25866 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
25867 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
25868 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
25869 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
25870 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
25871 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
25872 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
25873 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
25874 xargs xcolor xy yhmath
25877 \begin_layout Chapter
25878 Names of available colors to be used in layouts
25879 \begin_inset CommandInset label
25881 name "chap:Names-of-colors"
25888 \begin_layout Standard
25889 The colors listed here are the standard colors and the those that you can
25890 adjust in the LyX preferences.
25893 \begin_layout Description
25906 No particular color -- clear or default
25909 \begin_layout Description
25913 \begin_layout Description
25917 \begin_layout Description
25921 \begin_layout Description
25925 \begin_layout Description
25929 \begin_layout Description
25933 \begin_layout Description
25937 \begin_layout Description
25941 \begin_layout Description
25942 cursor Cursor color
25945 \begin_layout Description
25946 background Background color
25949 \begin_layout Description
25950 foreground Foreground color
25953 \begin_layout Description
25954 selection Background color of selected text
25957 \begin_layout Description
25958 selectiontext Foreground color of selected text
25961 \begin_layout Description
25962 latex Text color in LaTeX mode
25965 \begin_layout Description
25966 preview The color used for previews
25969 \begin_layout Description
25970 inlinecompletion Inline completion color
25973 \begin_layout Description
25974 nonunique_inlinecompletion Inline completion color for the non-unique part
25977 \begin_layout Description
25978 notelabel Label color for notes
25981 \begin_layout Description
25982 notebg Background color of notes
25985 \begin_layout Description
25986 commentlabel Label color for comments
25989 \begin_layout Description
25990 commentbg Background color of comments
25993 \begin_layout Description
25994 greyedoutlabel Label color for greyedout insets
25997 \begin_layout Description
25998 greyedouttext Color for greyedout inset text
26001 \begin_layout Description
26002 greyedoutbg Background color of greyedout inset
26005 \begin_layout Description
26006 shadedbg Background color of shaded box
26009 \begin_layout Description
26010 listingsbg Background color of listings inset
26013 \begin_layout Description
26014 branchlabel Label color for branches
26017 \begin_layout Description
26018 footlabel Label color for footnotes
26021 \begin_layout Description
26022 indexlabel Label color for index insets
26025 \begin_layout Description
26026 marginlabel Label color for margin notes
26029 \begin_layout Description
26030 phantomtext Text color for phantom insets
26033 \begin_layout Description
26034 urllabel Label color for URL insets
26037 \begin_layout Description
26038 urltext Color for URL inset text
26041 \begin_layout Description
26042 depthbar Color for the depth bars in the margin
26045 \begin_layout Description
26046 language Color for marking foreign language words
26049 \begin_layout Description
26050 command Text color for command insets
26053 \begin_layout Description
26054 commandbg Background color for command insets
26057 \begin_layout Description
26058 commandframe Frame color for command insets
26061 \begin_layout Description
26062 special Special chars text color
26065 \begin_layout Description
26066 graphicsbg Graphics inset background color
26069 \begin_layout Description
26070 math Math inset text color
26073 \begin_layout Description
26074 mathbg Math inset background color
26077 \begin_layout Description
26078 mathmacrobg Macro math inset background color
26081 \begin_layout Description
26082 mathmacrohoverbg Macro math inset background color hovered
26085 \begin_layout Description
26086 mathmacrolabel Macro math label color
26089 \begin_layout Description
26090 mathmacroframe Macro math frame color
26093 \begin_layout Description
26094 mathmacroblend Macro math blended color
26097 \begin_layout Description
26098 mathmacrooldarg Macro template color for old parameters
26101 \begin_layout Description
26102 mathmacronewarg Macro template color for new parameters
26105 \begin_layout Description
26106 mathframe Math inset frame color under focus
26109 \begin_layout Description
26110 mathcorners Math inset frame color not under focus
26113 \begin_layout Description
26114 mathline Math line color
26117 \begin_layout Description
26118 collapsable Collapsable insets text
26121 \begin_layout Description
26122 collapsableframe Collapsable insets frame
26125 \begin_layout Description
26126 insetbg Inset marker background color
26129 \begin_layout Description
26130 insetframe Inset marker frame color
26133 \begin_layout Description
26134 error Error box text color
26137 \begin_layout Description
26138 eolmarker End of line marker color
26141 \begin_layout Description
26142 added_space Added space colour
26145 \begin_layout Description
26146 appendix Appendix marker color
26149 \begin_layout Description
26150 changebar Changebar color
26153 \begin_layout Description
26154 deletedtext Deleted text color
26157 \begin_layout Description
26158 addedtext Added text color
26161 \begin_layout Description
26162 changedtextauthor1 Changed text color author 1
26165 \begin_layout Description
26166 changedtextauthor2 Changed text color author 2
26169 \begin_layout Description
26170 changedtextauthor3 Changed text color author 3
26173 \begin_layout Description
26174 changedtextauthor4 Changed text color author 4
26177 \begin_layout Description
26178 changedtextauthor5 Changed text color author 5
26181 \begin_layout Description
26182 deletedtextmodifier Deleted text modifying color
26185 \begin_layout Description
26186 tabularline Table line color
26189 \begin_layout Description
26190 tabularonoffline Table line color
26193 \begin_layout Description
26194 bottomarea Bottom area color
26197 \begin_layout Description
26198 newpage New page color
26201 \begin_layout Description
26202 pagebreak Page break color
26205 \begin_layout Description
26206 buttonframe Color used for button frame
26209 \begin_layout Description
26210 buttonbg Color used for bottom background
26213 \begin_layout Description
26214 buttonhoverbg Color used for buttom under focus
26217 \begin_layout Description
26218 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
26222 \begin_layout Description
26223 previewframe Preview frame color
26226 \begin_layout Description
26227 inherit Color is inherited
26230 \begin_layout Description
26231 regexpframe Color for regexp frame
26234 \begin_layout Description
26235 ignore For ignoring updates of a color