1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
35 \use_default_options false
39 \maintain_unincluded_children false
42 InsetLayout Flex:MenuItem
51 \newcommand*{\menuitem}[1]{{\sffamily #1}}
54 # In case we need to do with sans...
55 #InsetLayout CharStyle:Code
60 #\renewcommand{\code}[1]{{\sffamily #1}}
65 \language_package default
70 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
79 \default_output_format default
81 \bibtex_command default
82 \index_command default
86 \pdf_title "LyX Configuration Manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX-documentation Customization"
89 \pdf_keywords "LyX, documentation, customization"
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen true
93 \pdf_bookmarksopenlevel 1
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \use_package amsmath 0
103 \use_package amssymb 0
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 0
108 \use_package stackrel 0
109 \use_package stmaryrd 0
110 \use_package undertilde 0
112 \cite_engine_type numerical
116 \paperorientation portrait
131 \paragraph_separation indent
132 \paragraph_indentation default
133 \quotes_language english
136 \paperpagestyle headings
137 \tracking_changes true
138 \output_changes false
142 \author -712698321 "Jürgen Spitzmüller"
143 \author -195340706 "Georg Baum"
145 \author 155139281 "Jrgen Spitzmller"
146 \author 1082167584 "Kayvan Sylvan" kayvan@sylvan.com
147 \author 1414654397 "Richard Heck"
148 \author 2090807402 "usti"
154 Customizing LyX: Features for the Advanced User
162 \begin_layout Plain Layout
164 If you have comments or error corrections, please send them to the LyX Documenta
166 \begin_inset CommandInset href
168 target "lyx-docs@lists.lyx.org"
175 \begin_inset Quotes eld
179 \begin_inset Quotes erd
182 in the subject header, and please cc the current maintainer of this file,
183 Richard Heck <rgheck@comcast.net>.
189 \begin_inset Newline newline
193 \begin_inset Newline newline
197 \change_deleted -712698321 1357054389
199 \change_inserted -712698321 1357054389
205 \begin_layout Standard
206 \begin_inset CommandInset toc
207 LatexCommand tableofcontents
214 \begin_layout Standard
215 \begin_inset Note Note
218 \begin_layout Plain Layout
219 Please use change tracking when modifying this document.
220 This makes it easier for our translators to recognize things that have
221 been changed, and it helps the maintainer keep up-to-date with what's been
230 \begin_layout Chapter
234 \begin_layout Standard
235 This manual covers the customization features present in LyX.
236 In it, we discuss issues like keyboard shortcuts, screen previewing options,
237 printer options, sending commands to LyX via the LyX Server, internationalizati
238 on, installing new LaTeX classes and LyX layouts, etc.
239 We can't possibly hope to touch on everything you can change—our developers
240 add new features faster than we can document them—but we will explain the
241 most common customizations and hopefully point you in the right direction
242 for some of the more obscure ones.
245 \begin_layout Standard
246 \begin_inset Branch OutDated
249 \begin_layout Standard
250 Information from previous versions of this document that now seems to be
251 outdated is contained in the OutDated branch of this document.
252 By default, this information will not appear in the LaTeX output.
260 \begin_layout Chapter
261 LyX configuration files
264 \begin_layout Standard
265 This chapter aims to help you to find your way through the LyX configuration
267 Before continuing to read this chapter, you should find out where your
268 LyX library and user directories are by using
269 \begin_inset Flex MenuItem
272 \begin_layout Plain Layout
273 Help\SpecialChar \menuseparator
284 The library directory is the place where LyX places its system-wide configurati
285 on files; the user directory is where you can place your modified versions.
286 We will call the former
287 \begin_inset Flex Code
290 \begin_layout Plain Layout
297 \begin_inset Flex MenuItem
300 \begin_layout Plain Layout
306 in the remainder of this document.
310 \begin_layout Section
312 \begin_inset Flex Code
315 \begin_layout Plain Layout
324 \begin_layout Standard
325 \begin_inset Flex Code
328 \begin_layout Plain Layout
334 and its sub-directories contain a number of files and that can be used
335 to customize LyX's behavior.
336 You can change many of these files from within LyX itself through the
337 \begin_inset Flex MenuItem
340 \begin_layout Plain Layout
341 Tools\SpecialChar \menuseparator
348 Most customization that you will want to do in LyX is possible through
350 However, many other inner aspects of LyX can be customized by modifying
352 \begin_inset Flex Code
355 \begin_layout Plain Layout
362 These files fall in different categories, described in the following subsection
366 \begin_layout Subsection
367 Automatically generated files
370 \begin_layout Standard
371 The files, which are to be found in
372 \begin_inset Flex MenuItem
375 \begin_layout Plain Layout
381 , are generated when you configure LyX.
382 They contain various default values that are guessed by inspection.
383 In general, it is not a good idea to modify them, since they might be overwritt
387 \begin_layout Labeling
388 \labelwidthstring 00.00.0000
389 \begin_inset Flex Code
392 \begin_layout Plain Layout
398 contains defaults for various commands.
401 \begin_layout Labeling
402 \labelwidthstring 00.00.0000
403 \begin_inset Flex Code
406 \begin_layout Plain Layout
412 contains the list of packages that have been recognized by LyX.
413 It is currently unused by the LyX program itself, but the information extracted
414 , and more, is made available with
415 \begin_inset Flex MenuItem
418 \begin_layout Plain Layout
419 Help\SpecialChar \menuseparator
432 \begin_layout Labeling
433 \labelwidthstring 00.00.0000
434 \begin_inset Flex Code
437 \begin_layout Plain Layout
443 the list of text classes that have been found in your
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
453 directories, along with the associated LaTeX document class and their descripti
457 \begin_layout Labeling
458 \labelwidthstring 00.00.0000
459 \begin_inset Flex Code
462 \begin_layout Plain Layout
468 the list of layout modules found in your
469 \begin_inset Flex Code
472 \begin_layout Plain Layout
481 \begin_layout Labeling
482 \labelwidthstring 00.00.0000
483 \begin_inset Flex Code
486 \begin_layout Plain Layout
492 lists of various sorts of LaTeX-related files found on your system
495 \begin_layout Labeling
496 \labelwidthstring 00.00.0000
497 \begin_inset Flex Code
500 \begin_layout Plain Layout
506 is automatically generated during configuration from the file
507 \begin_inset Flex Code
510 \begin_layout Plain Layout
517 It contains information on your LaTeX configuration.
520 \begin_layout Subsection
524 \begin_layout Standard
525 These directories are duplicated between
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
536 \begin_inset Flex Code
539 \begin_layout Plain Layout
546 If a particular files exists in both places, the one in
547 \begin_inset Flex Code
550 \begin_layout Plain Layout
559 \begin_layout Labeling
560 \labelwidthstring 00.00.0000
561 \begin_inset Flex Code
564 \begin_layout Plain Layout
570 this directory contains files with the extension
571 \begin_inset Flex Code
574 \begin_layout Plain Layout
580 that define the keybindings used in LyX.
581 If there exists an internationalized version of the bind file named
582 \begin_inset Flex Code
585 \begin_layout Plain Layout
591 , that will be used first.
594 \begin_layout Labeling
595 \labelwidthstring 00.00.0000
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
605 contains graphics files that can be included in documents.
609 \begin_layout Labeling
610 \labelwidthstring 00.00.0000
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 contains LyX documentation files (including the one you are currently reading).
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
631 deserves special attention, as noted above.
632 The internationalized help docs are in subdirectories
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
643 \begin_inset Quotes eld
647 \begin_inset Quotes erd
650 is the ISO language code.
656 \begin_inset CommandInset ref
658 reference "cha:Internationalizing-LyX"
665 \begin_layout Labeling
666 \labelwidthstring 00.00.0000
667 \begin_inset Flex Code
670 \begin_layout Plain Layout
676 contains example files that explain how to use some features.
677 In the file browser, press the
678 \begin_inset Flex MenuItem
681 \begin_layout Plain Layout
690 \begin_layout Labeling
691 \labelwidthstring 00.00.0000
692 \begin_inset Flex Code
695 \begin_layout Plain Layout
701 contains image files that are used by the
702 \begin_inset Flex MenuItem
705 \begin_layout Plain Layout
712 In addition, it also contains the individual icons used in the toolbar
713 and the banners that can be shown when LyX is launched.
716 \begin_layout Labeling
717 \labelwidthstring 00.00.0000
718 \begin_inset Flex Code
721 \begin_layout Plain Layout
727 contains keyboard keymapping files.
733 \begin_inset CommandInset ref
735 reference "sec:International-Keymap-Stuff"
742 \begin_layout Labeling
743 \labelwidthstring 00.00.0000
744 \begin_inset Flex Code
747 \begin_layout Plain Layout
753 contains the text class and module files described in Chapter
758 \begin_inset CommandInset ref
760 reference "cha:Installing-New-Document"
767 \begin_layout Labeling
768 \labelwidthstring 00.00.0000
769 \begin_inset Flex Code
772 \begin_layout Plain Layout
779 \begin_inset Flex Code
782 \begin_layout Plain Layout
788 Python scripts used to convert between LyX versions.
789 These can be run from the command line if, say, you want to batch-convert
793 \begin_layout Labeling
794 \labelwidthstring 00.00.0000
795 \begin_inset Flex Code
798 \begin_layout Plain Layout
804 contains some files that demonstrate the capabilities of the
805 \begin_inset Flex MenuItem
808 \begin_layout Plain Layout
819 Also contains some scripts used by LyX itself.
822 \begin_layout Labeling
823 \labelwidthstring 00.00.0000
824 \begin_inset Flex Code
827 \begin_layout Plain Layout
833 contains the standard LyX template files described in Chapter
838 \begin_inset CommandInset ref
840 reference "sub:Creating-Templates"
847 \begin_layout Labeling
848 \labelwidthstring 00.00.0000
849 \begin_inset Flex Code
852 \begin_layout Plain Layout
858 contains files with the extension
859 \begin_inset Flex Code
862 \begin_layout Plain Layout
868 that define the user interface to LyX.
869 That is, the files define which items appear in which menus and the items
870 appearing on the toolbar.
873 \begin_layout Subsection
874 Files you don't want to modify
877 \begin_layout Standard
878 These files are used internally by LyX and you generally do not need to
879 modify them unless you are a developer.
882 \begin_layout Labeling
883 \labelwidthstring 00.00.0000
884 \begin_inset Flex Code
887 \begin_layout Plain Layout
893 this file contains the list of LyX developers.
894 The contents are displayed with the menu entry
895 \begin_inset Flex MenuItem
898 \begin_layout Plain Layout
899 Help\SpecialChar \menuseparator
912 \begin_layout Labeling
913 \labelwidthstring 00.00.0000
914 \begin_inset Flex Code
917 \begin_layout Plain Layout
923 this is a LaTeX script used during the configuration process.
927 \begin_layout Labeling
928 \labelwidthstring 00.00.0000
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
938 this is the script that is used to re-configure LyX.
939 It creates configuration files in the directory it was run from.
942 \begin_layout Subsection
943 Other files needing a line or two
944 \change_deleted -712698321 1357054454
946 \change_inserted -712698321 1357054454
947 \SpecialChar \ldots{}
953 \begin_layout Labeling
954 \labelwidthstring 00.00.0000
955 \begin_inset Flex Code
958 \begin_layout Plain Layout
964 this contains tables describing how different character encodings can be
968 \begin_layout Labeling
969 \labelwidthstring 00.00.0000
970 \begin_inset Flex Code
973 \begin_layout Plain Layout
979 this file contains the templates available to the new
980 \begin_inset Flex MenuItem
983 \begin_layout Plain Layout
996 \begin_layout Labeling
997 \labelwidthstring 00.00.0000
998 \begin_inset Flex Code
1001 \begin_layout Plain Layout
1007 this file contains a list of all the languages currently supported by LyX.
1008 \change_inserted -712698321 1357054565
1012 \begin_layout Labeling
1013 \labelwidthstring 00.00.0000
1015 \change_inserted -712698321 1357054669
1016 \begin_inset Flex Code
1019 \begin_layout Plain Layout
1021 \change_inserted -712698321 1357054669
1029 contains information about the supported fonts.
1030 \change_inserted -195340706 1334775793
1034 \begin_layout Labeling
1035 \labelwidthstring 00.00.0000
1037 \change_inserted -195340706 1334775793
1038 \begin_inset Flex Code
1041 \begin_layout Plain Layout
1043 \change_inserted -195340706 1334775793
1049 this file contains translations for internationalized paragraph styles
1051 \begin_inset space \thinspace{}
1055 \begin_inset CommandInset ref
1057 reference "sub:I18n"
1062 \change_inserted -712698321 1357054494
1066 \begin_layout Labeling
1067 \labelwidthstring 00.00.0000
1069 \change_inserted -712698321 1357054554
1070 \begin_inset Flex Code
1073 \begin_layout Plain Layout
1075 \change_inserted -712698321 1357054508
1083 this file contains information about unicode-encoded glyphs and the way
1084 they are supported by LyX via LaTeX.
1089 \begin_layout Section
1090 Your local configuration directory
1093 \begin_layout Standard
1094 Even if you are using LyX as an unprivileged user, you might want to change
1095 LyX configuration for your own use.
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1106 directory contains all your personal configuration files.
1107 This is the directory described as
1108 \begin_inset Quotes eld
1112 \begin_inset Quotes erd
1116 \begin_inset Flex MenuItem
1119 \begin_layout Plain Layout
1120 Help\SpecialChar \menuseparator
1122 \begin_inset space ~
1131 This directory is used as a mirror of
1132 \begin_inset Flex Code
1135 \begin_layout Plain Layout
1141 , which means that every file in
1142 \begin_inset Flex Code
1145 \begin_layout Plain Layout
1151 is a replacement for the corresponding file in
1152 \begin_inset Flex Code
1155 \begin_layout Plain Layout
1162 Any configuration file described in the above sections can be placed either
1163 in the system-wide directory, in which case it will affect all users, or
1164 in your local directory for your own use.
1167 \begin_layout Standard
1168 To make things clearer, let's provide a few examples:
1171 \begin_layout Itemize
1172 The preferences set in the
1173 \begin_inset Flex MenuItem
1176 \begin_layout Plain Layout
1177 Tools\SpecialChar \menuseparator
1183 dialog are saved to a file
1184 \begin_inset Flex Code
1187 \begin_layout Plain Layout
1194 \begin_inset Flex Code
1197 \begin_layout Plain Layout
1206 \begin_layout Itemize
1207 When you reconfigure using
1208 \begin_inset Flex MenuItem
1211 \begin_layout Plain Layout
1212 Tools\SpecialChar \menuseparator
1219 \begin_inset Flex Code
1222 \begin_layout Plain Layout
1228 script, and the resulting files are written in your local configuration
1230 This means that any additional text class file that you might have added
1232 \begin_inset Flex Code
1235 \begin_layout Plain Layout
1241 will be added to the list of classes in the
1242 \begin_inset Flex MenuItem
1245 \begin_layout Plain Layout
1246 Document\SpecialChar \menuseparator
1255 \begin_layout Itemize
1256 If you get some updated documentation from LyX ftp site and cannot install
1257 it because you do not have sysadmin rights on your system, you can just
1259 \begin_inset Flex Code
1262 \begin_layout Plain Layout
1268 and the items in the
1269 \begin_inset Flex MenuItem
1272 \begin_layout Plain Layout
1278 menu will open them!
1281 \begin_layout Section
1282 Running LyX with multiple configurations
1285 \begin_layout Standard
1286 The configuration freedom of the local configuration directory may not suffice
1287 if you want to have more than one configuration at your disposal.
1288 For example, you may want to be use different key bindings or printer settings
1290 You can achieve this by having several such directories.
1291 You then specify which directory to use at run-time.
1294 \begin_layout Standard
1295 Invoking LyX with the command line switch
1296 \begin_inset Flex Code
1299 \begin_layout Plain Layout
1309 instructs the program to read the configuration from that directory, and
1310 not from the default directory.
1311 (You can determine the default directory by running LyX without the
1312 \begin_inset Flex Code
1315 \begin_layout Plain Layout
1321 switch.) If the specified directory does not exist, LyX offers to create
1322 it for you, just like it does for the default directory on the first time
1323 you run the program.
1324 You can modify the configuration options in this additional user directory
1325 exactly as you would for the default directory.
1326 These directories are completely independent (but read on).
1327 Note that setting the environment variable
1328 \begin_inset Flex Code
1331 \begin_layout Plain Layout
1337 to some value has exactly the same effect.
1340 \begin_layout Standard
1341 Having several configurations also requires more maintenance: if you want
1342 to add a new layout to
1343 \begin_inset Flex Code
1346 \begin_layout Plain Layout
1352 which you want available from all your configurations, you must add it
1353 to each directory separately.
1354 You can avoid this with the following trick: after LyX creates the additional
1355 directory, most of the subdirectories (see above) are empty.
1356 If you want the new configuration to mirror an existing one, replace the
1357 empty subdirectory with a symbolic link to the matching subdirectory in
1358 the existing configuration.
1360 \begin_inset Flex Code
1363 \begin_layout Plain Layout
1369 subdirectory, however, since it contains a file written by the configuration
1370 script (also accessible through
1371 \begin_inset Flex MenuItem
1374 \begin_layout Plain Layout
1375 Tools\SpecialChar \menuseparator
1381 ) which is configuration-specific.
1384 \begin_layout Chapter
1385 The Preferences dialog
1388 \begin_layout Standard
1389 All options of the preferences dialog are described in the Appendix
1391 The Preferences Dialog
1398 For some options you might find here more details.
1401 \begin_layout Section
1403 \begin_inset CommandInset label
1412 \begin_layout Standard
1413 The first step is to define your file formats if they are not already defined.
1415 \begin_inset Flex MenuItem
1418 \begin_layout Plain Layout
1419 Tools\SpecialChar \menuseparator
1427 \begin_inset Flex MenuItem
1430 \begin_layout Plain Layout
1431 File Handling\SpecialChar \menuseparator
1438 \begin_inset Flex MenuItem
1441 \begin_layout Plain Layout
1442 New\SpecialChar \ldots{}
1448 button to define your new format.
1450 \begin_inset Flex MenuItem
1453 \begin_layout Plain Layout
1459 field contains the name used to identify the format in the GUI.
1461 \begin_inset Flex MenuItem
1464 \begin_layout Plain Layout
1470 is used to identify the format internally.
1471 You will also need to enter a file extension.
1472 These are all required.
1474 \begin_inset Flex MenuItem
1477 \begin_layout Plain Layout
1483 field is used to provide a keyboard shortcut on the menus.
1484 (For example, pressing
1485 \begin_inset Flex MenuItem
1488 \begin_layout Plain Layout
1495 \begin_inset Flex MenuItem
1498 \begin_layout Plain Layout
1499 View\SpecialChar \menuseparator
1500 View (Other Formats)\SpecialChar \menuseparator
1509 \begin_layout Standard
1511 \begin_inset Flex MenuItem
1514 \begin_layout Plain Layout
1521 \begin_inset Flex MenuItem
1524 \begin_layout Plain Layout
1531 For example, you might want to use
1532 \begin_inset Flex MenuItem
1535 \begin_layout Plain Layout
1541 to view PostScript files.
1542 You can enter the command needed to start the program in the corresponding
1544 In defining this command, you can use the four variables listed in the
1546 The viewer is launched when you view an image in LyX or use the
1547 \begin_inset Flex MenuItem
1550 \begin_layout Plain Layout
1557 The editor is for example launched when you right-click on an image and
1559 \begin_inset Flex MenuItem
1562 \begin_layout Plain Layout
1568 in the appearing context menu.
1571 \begin_layout Standard
1573 \change_inserted -195340706 1329851811
1575 \begin_inset Flex MenuItem
1578 \begin_layout Plain Layout
1584 type of a format is optional, but if it is specified, it must be unique
1586 It is used to detect files of this format from the file contents.
1587 For some important file formats there is no MIME type officially registered
1589 \begin_inset CommandInset href
1592 target "http://www.iana.org/assignments/media-types/"
1597 Therefore LyX uses the extended list of MIME types as specified by
1598 \begin_inset CommandInset href
1600 name "freedesktop.org"
1601 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1608 \begin_layout Standard
1610 \begin_inset Flex MenuItem
1613 \begin_layout Plain Layout
1619 option tells LyX that a format is suitable for document export.
1620 If this is set and if a suitable conversion route exists (see sec.
1621 \begin_inset space \thinspace{}
1625 \begin_inset CommandInset ref
1627 reference "sec:Converters"
1631 ), the format will appear in the
1632 \begin_inset Flex MenuItem
1635 \begin_layout Plain Layout
1636 File\SpecialChar \menuseparator
1643 The format will also appear in the
1644 \begin_inset Flex MenuItem
1647 \begin_layout Plain Layout
1653 menu if a viewer is specified for the format.
1654 Pure image formats, such as
1655 \begin_inset Flex Code
1658 \begin_layout Plain Layout
1664 , should not use this option.
1665 Formats that can both represent vector graphics and documents like
1666 \begin_inset Flex Code
1669 \begin_layout Plain Layout
1678 \begin_layout Standard
1680 \begin_inset Flex MenuItem
1683 \begin_layout Plain Layout
1684 Vector graphics format
1689 tells LyX that a format can contain vector graphics.
1690 This information is used to determine the target format of included graphics
1692 \begin_inset Flex MenuItem
1695 \begin_layout Plain Layout
1702 Included graphics may need to be converted to either
1703 \begin_inset Flex MenuItem
1706 \begin_layout Plain Layout
1713 \begin_inset Flex MenuItem
1716 \begin_layout Plain Layout
1723 \begin_inset Flex MenuItem
1726 \begin_layout Plain Layout
1733 \begin_inset Flex MenuItem
1736 \begin_layout Plain Layout
1742 cannot handle other image formats.
1743 If an included graphic is not already in
1744 \begin_inset Flex MenuItem
1747 \begin_layout Plain Layout
1754 \begin_inset Flex MenuItem
1757 \begin_layout Plain Layout
1764 \begin_inset Flex MenuItem
1767 \begin_layout Plain Layout
1773 format, it is converted to
1774 \begin_inset Flex MenuItem
1777 \begin_layout Plain Layout
1783 if the vector format option is set, and otherwise to
1784 \begin_inset Flex MenuItem
1787 \begin_layout Plain Layout
1796 \begin_layout Section
1800 \begin_layout Standard
1801 Since all conversions from one format to another take place in LyX's temporary
1802 directory, it is sometimes necessary to modify a file before copying it
1803 to the temporary directory in order that the conversion may be performed.
1807 \begin_layout Plain Layout
1808 For example, the file may refer to other files—images, for example—using
1809 relative file names, and these may become invalid when the file is copied
1810 to the temporary directory.
1815 This is done by a Copier: It copies a file to (or from) the temporary directory
1816 and may modify it in the process.
1819 \begin_layout Standard
1820 The definitions of the copiers may use four variables:
1823 \begin_layout Labeling
1824 \labelwidthstring 00.00.0000
1825 \begin_inset Flex Code
1828 \begin_layout Plain Layout
1834 The LyX system directory (e.
1835 \begin_inset space \thinspace{}
1839 \begin_inset space \space{}
1843 \begin_inset Flex MenuItem
1846 \begin_layout Plain Layout
1855 \begin_layout Labeling
1856 \labelwidthstring 00.00.0000
1857 \begin_inset Flex Code
1860 \begin_layout Plain Layout
1869 \begin_layout Labeling
1870 \labelwidthstring 00.00.0000
1871 \begin_inset Flex Code
1874 \begin_layout Plain Layout
1881 \change_inserted 1082167584 1348453985
1885 \begin_layout Labeling
1886 \labelwidthstring 00.00.0000
1888 \change_inserted 1082167584 1348453986
1889 $$b The base name (without filename extension) in the LyX temporary directory
1892 \begin_layout Labeling
1893 \labelwidthstring 00.00.0000
1895 \change_inserted 1082167584 1348453986
1896 $$p The full directory path of the LyX temporary directory
1899 \begin_layout Labeling
1900 \labelwidthstring 00.00.0000
1902 \change_inserted 1082167584 1348453986
1903 $$r The full pathname to the original LyX file being processed
1906 \begin_layout Labeling
1907 \labelwidthstring 00.00.0000
1909 \change_inserted 1082167584 1348453986
1910 $$f The filename (without any directory path) of the LyX file.
1913 \begin_layout Labeling
1914 \labelwidthstring 00.00.0000
1915 \begin_inset Flex Code
1918 \begin_layout Plain Layout
1925 \change_inserted 1082167584 1348453720
1929 \begin_layout Standard
1930 The latter should be the filename as it would be used in a LaTeX's
1937 It is relevant only when exporting files suitable for such inclusion.
1940 \begin_layout Standard
1941 Copiers can be used to do almost anything with output files.
1942 For example, suppose you want generated pdf files to be copied to a special
1944 \begin_inset Flex Code
1947 \begin_layout Plain Layout
1954 Then you could write a shell script such as this one:
1957 \begin_layout Standard
1958 \begin_inset listings
1962 \begin_layout Plain Layout
1967 \begin_layout Plain Layout
1972 \begin_layout Plain Layout
1974 TOFILE=`basename $2`
1977 \begin_layout Plain Layout
1979 cp $FROMFILE /home/you/pdf/$TOFILE
1984 Save it in your local LyX directory—say,
1985 \begin_inset Flex Code
1988 \begin_layout Plain Layout
1989 /home/you/.lyx/scripts/pdfcopier.sh
1994 —and make it executable, if you need to do so on your platform.
1996 \begin_inset Flex MenuItem
1999 \begin_layout Plain Layout
2000 Tools\SpecialChar \menuseparator
2006 dialog, select under
2007 \begin_inset Flex MenuItem
2010 \begin_layout Plain Layout
2011 File Handling\SpecialChar \menuseparator
2018 \begin_inset Flex MenuItem
2021 \begin_layout Plain Layout
2027 format—or one of the other pdf formats—and enter
2028 \begin_inset Flex Code
2031 \begin_layout Plain Layout
2032 pdfcopier.sh $$i $$o
2038 \begin_inset Flex MenuItem
2041 \begin_layout Plain Layout
2051 \begin_layout Standard
2052 Copiers are used by LyX in various of its own conversions.
2053 For example, if appropriate programs are found, LyX will automatically
2054 install copiers for the
2055 \begin_inset Flex MenuItem
2058 \begin_layout Plain Layout
2065 \begin_inset Flex MenuItem
2068 \begin_layout Plain Layout
2070 \begin_inset space ~
2079 When these formats are exported, the copier sees that not just the main
2080 HTML file but various associated files (style files, images, etc.) are also
2082 All these files are written to a subdirectory of the directory in which
2083 the original LyX file was found.
2087 \begin_layout Plain Layout
2088 This copier can be customized.
2090 \begin_inset Quotes eld
2094 \begin_inset Quotes erd
2097 argument takes a comma-separated list of extensions to be copied; if it
2098 is omitted, all files will be copied.
2100 \begin_inset Quotes eld
2104 \begin_inset Quotes erd
2107 argument determines the extension added to the generated directory.
2109 \begin_inset Quotes eld
2113 \begin_inset Flex MenuItem
2116 \begin_layout Plain Layout
2123 \begin_inset Quotes erd
2126 , so HTML generated from
2127 \begin_inset Flex MenuItem
2130 \begin_layout Plain Layout
2131 /path/to/filename.lyx
2137 \begin_inset Flex MenuItem
2140 \begin_layout Plain Layout
2141 /path/to/filename.html.LyXconv
2155 \begin_layout Section
2157 \begin_inset CommandInset label
2159 name "sec:Converters"
2166 \begin_layout Standard
2167 You can define your own Converters to convert files between different formats.
2169 \begin_inset Flex MenuItem
2172 \begin_layout Plain Layout
2173 Tools\SpecialChar \menuseparator
2174 Preferences\SpecialChar \menuseparator
2175 File Handling\SpecialChar \menuseparator
2184 \begin_layout Standard
2185 To define a new converter, select the
2186 \begin_inset Flex MenuItem
2189 \begin_layout Plain Layout
2191 \begin_inset space ~
2200 \begin_inset Flex MenuItem
2203 \begin_layout Plain Layout
2205 \begin_inset space ~
2213 from the drop-down lists, enter the command needed for the conversion,
2215 \begin_inset Flex MenuItem
2218 \begin_layout Plain Layout
2225 Several variables can be used in the definition of converters:
2228 \begin_layout Labeling
2229 \labelwidthstring 00.00.0000
2230 \begin_inset Flex Code
2233 \begin_layout Plain Layout
2239 The LyX system directory
2242 \begin_layout Labeling
2243 \labelwidthstring 00.00.0000
2244 \begin_inset Flex Code
2247 \begin_layout Plain Layout
2256 \begin_layout Labeling
2257 \labelwidthstring 00.00.0000
2258 \begin_inset Flex Code
2261 \begin_layout Plain Layout
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex Code
2275 \begin_layout Plain Layout
2281 The base filename of the input file (i.
2282 \begin_inset space \thinspace{}
2285 g., without the extension)
2288 \begin_layout Labeling
2289 \labelwidthstring 00.00.0000
2290 \begin_inset Flex Code
2293 \begin_layout Plain Layout
2299 The path to the input file
2302 \begin_layout Labeling
2303 \labelwidthstring 00.00.0000
2304 \begin_inset Flex Code
2307 \begin_layout Plain Layout
2313 The path to the original input file (this is different from $$p when a
2314 chain of converters is called)
2317 \begin_layout Labeling
2318 \labelwidthstring 00.00.0000
2319 \begin_inset Flex Code
2322 \begin_layout Plain Layout
2328 The iconv name for the encoding of the document.
2331 \begin_layout Standard
2333 \begin_inset Flex MenuItem
2336 \begin_layout Plain Layout
2338 \begin_inset space ~
2346 field you can enter the following flags, separated by commas:
2349 \begin_layout Labeling
2350 \labelwidthstring 00.00.0000
2351 \begin_inset Flex Code
2354 \begin_layout Plain Layout
2360 This converter runs some form of LaTeX.
2361 This will make LyX's LaTeX error logs available.
2364 \begin_layout Labeling
2365 \labelwidthstring 00.00.0000
2366 \begin_inset Flex Code
2369 \begin_layout Plain Layout
2376 \begin_inset Flex MenuItem
2379 \begin_layout Plain Layout
2385 file for the conversion.
2386 \change_inserted 1414654397 1337693117
2390 \begin_layout Labeling
2391 \labelwidthstring 00.00.0000
2393 \change_inserted 1414654397 1337693188
2394 \begin_inset Flex Code
2397 \begin_layout Plain Layout
2399 \change_inserted 1414654397 1337693129
2408 \begin_inset Quotes eld
2412 \begin_inset Quotes erd
2415 file from the backend, which in practice means a LaTeX file like the one
2416 we would export, without
2417 \begin_inset Flex Code
2420 \begin_layout Plain Layout
2422 \change_inserted 1414654397 1337693184
2435 \begin_layout Labeling
2436 \labelwidthstring 00.00.0000
2437 \begin_inset Flex Code
2440 \begin_layout Plain Layout
2449 \begin_layout Standard
2450 The following three flags are not really flags at all because they take
2452 \begin_inset Flex MenuItem
2455 \begin_layout Plain Layout
2457 \begin_inset space ~
2461 \begin_inset space ~
2472 \begin_layout Labeling
2473 \labelwidthstring 00.00.0000
2474 \begin_inset Flex Code
2477 \begin_layout Plain Layout
2483 If set, the converter's standard error will be redirected to a file
2484 \begin_inset Flex Code
2487 \begin_layout Plain Layout
2493 , and the script given as argument will be run as:
2494 \begin_inset Flex Code
2497 \begin_layout Plain Layout
2498 script < infile.out > infile.log
2504 The argument may contain
2505 \begin_inset Flex Code
2508 \begin_layout Plain Layout
2517 \begin_layout Labeling
2518 \labelwidthstring 00.00.0000
2519 \begin_inset Flex Code
2522 \begin_layout Plain Layout
2528 The name of the directory in which the converter will dump the generated
2530 LyX will not create this directory, and it does not copy anything into
2531 it, though it will copy this directory to the destination.
2532 The argument may contain
2533 \begin_inset Flex Code
2536 \begin_layout Plain Layout
2542 , which will be replaced by the base name of the input and output files,
2543 respectively, when the directory is copied.
2544 \begin_inset Newline newline
2547 Note that resultdir and usetempdir make no sense together.
2548 The latter will be ignored if the former is given.
2551 \begin_layout Labeling
2552 \labelwidthstring 00.00.0000
2553 \begin_inset Flex Code
2556 \begin_layout Plain Layout
2562 Determines the output file name and may, contain
2563 \begin_inset Flex Code
2566 \begin_layout Plain Layout
2573 Sensible only with resultdir and optional even then; if not given, it defaults
2577 \begin_layout Standard
2578 None of these last three are presently used in any of the converters that
2579 are installed with LyX.
2583 \begin_layout Standard
2584 You do not have to define converters for all formats between which you want
2586 For example, you will note that there is no `LyX to PostScript' converter,
2587 but LyX will export PostScript.
2588 It does so by first creating a LaTeX file (no converter needs to be defined
2589 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2590 and finally converting the resulting DVI file to PostScript.
2591 LyX finds such `chains' of converters automatically, and it will always
2592 choose the shortest possible chain.
2593 You can, though, still define multiple conversion methods between file
2595 For example, the standard LyX configuration provides three ways to convert
2596 LaTeX to PDF: Directly, using
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2606 ; via (DVI and) PostScript, using
2607 \begin_inset Flex MenuItem
2610 \begin_layout Plain Layout
2617 \begin_inset Flex MenuItem
2620 \begin_layout Plain Layout
2627 To define such alternate chains, you must define multiple target `file
2628 formats', as described in section
2629 \begin_inset CommandInset ref
2631 reference "sec:Formats"
2636 For example, in the standard configuration, the formats named
2637 \begin_inset Flex MenuItem
2640 \begin_layout Plain Layout
2647 \begin_inset Flex MenuItem
2650 \begin_layout Plain Layout
2657 \begin_inset Flex MenuItem
2660 \begin_layout Plain Layout
2666 are defined, all of which share the extension
2667 \begin_inset Flex MenuItem
2670 \begin_layout Plain Layout
2676 , and which correspond to the conversion methods just mentioned.
2679 \begin_layout Chapter
2680 Internationalizing LyX
2681 \begin_inset CommandInset label
2683 name "cha:Internationalizing-LyX"
2690 \begin_layout Standard
2691 LyX supports using a translated interface.
2692 Last time we checked, LyX provided text in thirty languages.
2693 The language of choice is called your
2698 (For further reading on locale settings, see also the documentation for
2699 locale that comes with your operating system.
2700 For Linux, the manual page for
2701 \begin_inset Flex Code
2704 \begin_layout Plain Layout
2710 could be a good place to start).
2713 \begin_layout Standard
2714 Notice that these translations will work, but do contain a few flaws.
2715 In particular, all dialogs have been designed with the English text in
2716 mind, which means that some of the translated text will be too large to
2717 fit within the space allocated.
2718 This is only a display problem and will not cause any harm.
2719 Also, you will find that some of the translations do not define shortcut
2720 keys for everything.
2721 Sometimes, there are simply not enough free letters to do it.
2722 Other times, the translator just hasn't got around to doing it yet.
2723 Our localization team, which you may wish to join,
2727 \begin_layout Plain Layout
2728 If you are a fluent speaker of a language other than English, joining these
2729 teams is a great way to give back to the LyX community!
2734 will of course try to fix these shortcomings in future versions of LyX.
2737 \begin_layout Section
2741 \begin_layout Subsection
2742 Translating the graphical user interface (text messages).
2745 \begin_layout Standard
2747 \begin_inset Flex Code
2750 \begin_layout Plain Layout
2756 library to handle the internationalization of the interface.
2757 To have LyX speak your favorite language in all menus and dialogs, you
2759 \begin_inset Flex Code
2762 \begin_layout Plain Layout
2768 -file for that language.
2769 When this is available, you'll have to generate a
2770 \begin_inset Flex Code
2773 \begin_layout Plain Layout
2779 -file from it and install the
2780 \begin_inset Flex Code
2783 \begin_layout Plain Layout
2790 The process of doing all of this is explained in the documentation for
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2802 It is possible to do this just for yourself, but if you're going to do
2803 it, you might as well share the results of your labors with the rest of
2805 Send a message to the LyX developers' list for more information about how
2809 \begin_layout Standard
2810 In short, this is what you should do (xx denotes the language code):
2813 \begin_layout Itemize
2814 Check out the LyX source code.
2816 \begin_inset CommandInset href
2818 name "information on the web"
2819 target "http://www.lyx.org/HowToUseSVN"
2826 \begin_layout Itemize
2828 \begin_inset Flex Code
2831 \begin_layout Plain Layout
2837 to the folder of the
2838 \begin_inset Flex Code
2841 \begin_layout Plain Layout
2849 \begin_inset Flex Code
2852 \begin_layout Plain Layout
2860 \begin_inset Flex Code
2863 \begin_layout Plain Layout
2869 doesn't exist anywhere, it can be remade with the console command
2870 \begin_inset Flex Code
2873 \begin_layout Plain Layout
2879 in that directory, or you can use an existing po-file for some other language
2883 \begin_layout Itemize
2885 \begin_inset Flex Code
2888 \begin_layout Plain Layout
2898 \begin_layout Plain Layout
2899 This is just a text file, so it can be edited in any text editor.
2900 But there are also specialized programs that support such editing, such
2905 (for all platforms) or
2914 contains a `mode' for editing
2915 \begin_inset Flex Code
2918 \begin_layout Plain Layout
2929 For some menu- and widget-labels, there are also shortcut keys that should
2931 Those keys are marked after a `|', and should be translated according to
2932 the words and phrases of the language.
2933 You should also fill also out the information at the beginning of the new
2935 \begin_inset Flex Code
2938 \begin_layout Plain Layout
2944 -file with your email-address, etc., so people know where to reach you with
2945 suggestions and entertaining flames.
2948 \begin_layout Standard
2949 If you are just doing this on your own, then:
2952 \begin_layout Itemize
2954 \begin_inset Flex Code
2957 \begin_layout Plain Layout
2964 This can be done with
2965 \begin_inset Flex Code
2968 \begin_layout Plain Layout
2969 msgfmt -o xx.mo < xx.po
2977 \begin_layout Itemize
2979 \begin_inset Flex Code
2982 \begin_layout Plain Layout
2988 -file to your locale-tree, at the correct directory for application messages
2993 xx, and under the name
2994 \begin_inset Flex Code
2997 \begin_layout Plain Layout
3004 \begin_inset space \thinspace{}
3008 \begin_inset space \space{}
3012 \begin_inset Flex Code
3015 \begin_layout Plain Layout
3016 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3026 \begin_layout Standard
3027 As said, however, it would be best if the new
3028 \begin_inset Flex Code
3031 \begin_layout Plain Layout
3037 -file could be added to the LyX distribution, so others can use it.
3038 Adding it involves making additional changes to LyX.
3039 So send an email to the developers' mailing list if you're interested in
3043 \begin_layout Subsubsection
3047 \begin_layout Standard
3048 Sometimes it turns out that one English message needs to be translated into
3049 different messages in the target language.
3050 One example is the message
3051 \begin_inset Flex Code
3054 \begin_layout Plain Layout
3060 which has the German translation
3068 , depending upon exactly what the English
3069 \begin_inset Quotes eld
3073 \begin_inset Quotes erd
3078 \begin_inset Flex Code
3081 \begin_layout Plain Layout
3087 does not handle such ambiguous translations.
3088 Therefore you have to add some context information to the message: Instead
3090 \begin_inset Flex Code
3093 \begin_layout Plain Layout
3100 \begin_inset Flex Code
3103 \begin_layout Plain Layout
3104 To[[as in 'From format x to format y']]
3110 \begin_inset Flex Code
3113 \begin_layout Plain Layout
3114 To[[as in 'From page x to page y']].
3119 Now the two occurrences of
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3130 \begin_inset Flex Code
3133 \begin_layout Plain Layout
3139 and can be translated correctly to
3150 \begin_layout Standard
3151 Of course the context information needs to be stripped off the original
3152 message when no translation is used.
3153 Therefore you have to put it in double square brackets at the end of the
3154 message (see the example above).
3155 The translation mechanism of LyX ensures that everything in double square
3156 brackets at the end of messages is removed before displaying the message.
3159 \begin_layout Subsection
3160 Translating the documentation.
3163 \begin_layout Standard
3164 The online documentation (in the
3165 \begin_inset Flex MenuItem
3168 \begin_layout Plain Layout
3174 -menu) can (and should!) be translated.
3175 If there are translated versions of the documentation available
3179 \begin_layout Plain Layout
3180 As of March 2008, at least some of the documents have been translated into
3181 fourteen languages, with the Tutorial available in a few more.
3186 and the locale is set accordingly, these will be used automagically by
3188 LyX looks for translated versions as
3189 \begin_inset Flex Code
3192 \begin_layout Plain Layout
3193 LyXDir/doc/xx/DocName.lyx
3199 \begin_inset Flex Code
3202 \begin_layout Plain Layout
3208 is the code for the language currently in use.
3209 If there are no translated documents, the default English versions will
3211 Note that the translated versions must have the same filenames (
3212 \begin_inset Flex Code
3215 \begin_layout Plain Layout
3221 above) as the original.
3222 If you feel up to translating the documentation (an excellent way to proof-read
3223 the original documentation by the way!), there are a few things you should
3227 \begin_layout Itemize
3228 Check out the documentation translation web page at
3229 \begin_inset CommandInset href
3231 name "http://www.lyx.org/Translation"
3232 target "http://www.lyx.org/Translation"
3237 That way, you can find out which (if any) documents have already been translate
3238 d into your language.
3239 You can also find out who (if anyone) is organizing the effort to translate
3240 the documentation into your language.
3241 If no one is organizing the effort, please let us know that you're interested.
3244 \begin_layout Standard
3245 Once you get to actually translating, here's a few hints for you that may
3249 \begin_layout Itemize
3250 Join the documentation team! There is information on how to do that in
3251 \begin_inset Flex Code
3254 \begin_layout Plain Layout
3261 \begin_inset Flex MenuItem
3264 \begin_layout Plain Layout
3265 Help\SpecialChar \menuseparator
3271 ), which by the way is the first document you should translate.
3274 \begin_layout Itemize
3275 Learn the typographic conventions for the language you are translating to.
3276 Typography is an ancient art and over the centuries, a great variety of
3277 conventions have developed throughout different parts of the world.
3278 Also study the professional terminology amongst typographers in your country.
3279 Inventing your own terminology will only confuse the users.
3282 (Warning! Typography is addictive!)
3285 \begin_layout Itemize
3286 Make a copy of the document.
3287 This will be your working copy.
3288 You can use this as your personal translated help-file by placing it in
3290 \begin_inset Flex Code
3293 \begin_layout Plain Layout
3302 \begin_layout Itemize
3303 Sometimes the original document (from the LyX-team) will be updated.
3304 Use the source viewer at
3305 \begin_inset CommandInset href
3307 name "http://www.lyx.org/trac/timeline"
3308 target "http://www.lyx.org/trac/timeline"
3312 to see what has been changed.
3313 That way you can easily see which parts of the translated document need
3317 \begin_layout Standard
3318 If you ever find an error in the original document, fix it and notify the
3319 rest of the documentation team of the changes! (You didn't forget to join
3320 the documentation team, did you?)
3323 \begin_layout Standard
3324 \begin_inset Branch OutDated
3327 \begin_layout Section
3328 International Keyboard Support
3331 \begin_layout Standard
3334 [Editor's Note: The following section is by
3342 It needs to be fixed to conform to the new Documentation Style sheet and
3343 to make use of the new v1.0 features.
3344 The whole thing also needs to be merged with the section following it.-jw
3345 It may also be badly out of date.-rh (2008)]
3348 \begin_layout Subsection
3349 Defining Own Keymaps: Keymap File Format
3352 \begin_layout Standard
3353 Let's look at a keyboard definition file a little closer.
3354 It is a plain text file defining
3357 \begin_layout Itemize
3358 key-to-key or key-to-string translations
3361 \begin_layout Itemize
3365 \begin_layout Itemize
3366 dead keys exceptions
3369 \begin_layout Standard
3370 To define key-to-key or key-to-string translation, use this command:
3373 \begin_layout Quotation
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_layout Standard
3400 \begin_inset Flex Code
3403 \begin_layout Plain Layout
3409 is the key to be translated and
3410 \begin_inset Flex Code
3413 \begin_layout Plain Layout
3419 is the string to be inserted into the document.
3420 To define dead keys, use:
3423 \begin_layout Quotation
3424 \begin_inset Flex Code
3427 \begin_layout Plain Layout
3436 \begin_inset Flex Code
3439 \begin_layout Plain Layout
3448 \begin_layout Standard
3450 \begin_inset Flex Code
3453 \begin_layout Plain Layout
3459 is a keyboard key and
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3470 The following dead keys are supported (shortcut name is in parentheses):
3473 \begin_layout Quotation
3477 \begin_inset space \hfill{}
3483 \begin_layout Quotation
3485 \begin_inset space \hfill{}
3491 \begin_layout Quotation
3493 \begin_inset space \hfill{}
3499 \begin_layout Quotation
3501 \begin_inset space \hfill{}
3507 \begin_layout Quotation
3509 \begin_inset space \hfill{}
3515 \begin_layout Quotation
3517 \begin_inset space \hfill{}
3524 \begin_layout Plain Layout
3536 \begin_layout Quotation
3538 \begin_inset space \hfill{}
3544 \begin_layout Quotation
3546 \begin_inset space \hfill{}
3553 \begin_layout Plain Layout
3565 \begin_layout Quotation
3567 \begin_inset space \hfill{}
3573 \begin_layout Quotation
3575 \begin_inset space \hfill{}
3581 \begin_layout Quotation
3583 \begin_inset space \hfill{}
3590 \begin_layout Plain Layout
3602 \begin_layout Quotation
3604 \begin_inset space \hfill{}
3611 \begin_layout Plain Layout
3623 \begin_layout Quotation
3625 \begin_inset space \hfill{}
3631 \begin_layout Quotation
3632 hungarian umlaut (hug)
3633 \begin_inset space \hfill{}
3639 \begin_layout Quotation
3641 \begin_inset space \hfill{}
3647 \begin_layout Quotation
3649 \begin_inset space \hfill{}
3656 \begin_layout Plain Layout
3668 \begin_layout Standard
3669 Since in many international keyboards there are exceptions to what some
3670 dead keys should do, you can define them using
3673 \begin_layout Quotation
3674 \begin_inset Flex Code
3677 \begin_layout Plain Layout
3685 deadkey key outstring
3688 \begin_layout Standard
3689 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3693 \begin_layout Quotation
3694 \begin_inset Flex Code
3697 \begin_layout Plain Layout
3710 \begin_layout Standard
3711 to make it work correctly.
3712 Also, you have to define as exceptions dead keys over i and j, to remove
3713 the dot from them before inserting an accent mark.
3714 I will change this when the time comes, but so far I haven't had time.
3717 \begin_layout Standard
3718 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3721 \begin_inset Flex Code
3724 \begin_layout Plain Layout
3730 have different meaning.
3732 \begin_inset Flex Code
3735 \begin_layout Plain Layout
3741 marks comments, quotes start and end LaTeX-style commands.
3742 To enter quote, you'll need to use
3743 \begin_inset Flex Code
3746 \begin_layout Plain Layout
3755 \begin_inset Flex Code
3758 \begin_layout Plain Layout
3765 \begin_inset Flex Code
3768 \begin_layout Plain Layout
3779 \begin_layout Standard
3780 If you make a keyboard description file that works for your language, please
3781 mail it to me, so I can include it in the next keymap distribution.
3784 \begin_layout Standard
3785 More keywords will be supported in keymap configuration file in future,
3789 \begin_layout Itemize
3790 \begin_inset Flex Code
3793 \begin_layout Plain Layout
3804 \begin_inset space \hfill{}
3808 \begin_inset Flex Code
3811 \begin_layout Plain Layout
3820 \begin_layout Itemize
3821 \begin_inset Flex Code
3824 \begin_layout Plain Layout
3835 \begin_inset space \hfill{}
3839 \begin_inset Flex Code
3842 \begin_layout Plain Layout
3848 an external keymap translation program
3851 \begin_layout Standard
3852 Also, it should look into
3853 \begin_inset Flex Code
3856 \begin_layout Plain Layout
3862 file for defaults, too (for example, a
3863 \begin_inset Flex Code
3866 \begin_layout Plain Layout
3874 option to include default keyboard).
3882 \begin_layout Section
3883 International Keymap Stuff
3884 \begin_inset CommandInset label
3886 name "sec:International-Keymap-Stuff"
3893 \begin_layout Standard
3894 \begin_inset Note Note
3897 \begin_layout Plain Layout
3898 In doing the revisions on this document in March 2008, I did not look over
3899 this stuff, as I do not understand it.
3900 It would be good if someone else could do so.
3909 \begin_layout Standard
3910 The next two sections describe the
3911 \begin_inset Flex Code
3914 \begin_layout Plain Layout
3923 \begin_inset Flex Code
3926 \begin_layout Plain Layout
3934 file syntax in detail.
3935 These sections should help you design your own key map if the ones provided
3936 do not meet your needs.
3939 \begin_layout Subsection
3943 \begin_layout Standard
3947 \begin_inset Flex Code
3950 \begin_layout Plain Layout
3956 file maps keystrokes to characters or strings.
3957 As the name suggests, it sets a keyboard mapping.
3959 \begin_inset Flex Code
3962 \begin_layout Plain Layout
3973 \begin_inset Flex Code
3976 \begin_layout Plain Layout
3991 \begin_inset Flex Code
3994 \begin_layout Plain Layout
4007 \begin_inset Flex Code
4010 \begin_layout Plain Layout
4019 \begin_inset Flex Code
4022 \begin_layout Plain Layout
4030 are described in this section.
4033 \begin_layout Labeling
4034 \labelwidthstring 00.00.0000
4035 \begin_inset Flex Code
4038 \begin_layout Plain Layout
4046 Map a character to a string
4049 \begin_layout LyX-Code
4064 \begin_layout Standard
4097 the double-quote (")
4114 must be escaped with a preceding backslash (
4125 \begin_layout Standard
4127 \begin_inset Flex MenuItem
4130 \begin_layout Plain Layout
4138 statement to cause the symbol
4139 \begin_inset Flex MenuItem
4142 \begin_layout Plain Layout
4150 to be output for the keystroke
4151 \begin_inset Flex MenuItem
4154 \begin_layout Plain Layout
4165 \begin_layout LyX-Code
4171 \begin_layout Labeling
4172 \labelwidthstring 00.00.0000
4173 \begin_inset Flex Code
4176 \begin_layout Plain Layout
4184 Specify an accent character
4187 \begin_layout LyX-Code
4196 \begin_layout Standard
4197 This will make the cha
4235 This is the dead key
4239 \begin_layout Plain Layout
4246 refers to a key that does not produce a character by itself, but when followed
4247 with another key, produces the desired accent character.
4248 For example, a German characte
4250 r with an umlaut like
4260 can be produced in this manner.
4269 \begin_layout Standard
4282 and then another key not in
4299 followed by the other, not allowed key, as output.
4303 \begin_inset Flex MenuItem
4306 \begin_layout Plain Layout
4314 cancels a dead key, so if
4325 \begin_inset Flex MenuItem
4328 \begin_layout Plain Layout
4337 , the cursor will not go one position backwards but will instead cancel
4353 might have had on the next keystroke.
4357 \begin_layout Standard
4358 The following example specifies that the character ' is to be an acute accent,
4359 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4362 \begin_layout LyX-Code
4365 kmod ' acute aeiouAEIOU
4368 \begin_layout Labeling
4369 \labelwidthstring 00.00.0000
4370 \begin_inset Flex Code
4373 \begin_layout Plain Layout
4379 Specify an exception to the accent character
4382 \begin_layout LyX-Code
4391 \begin_layout Standard
4392 This defines an exce
4433 have been assigned a keystroke with a previous
4436 \begin_inset Flex Code
4439 \begin_layout Plain Layout
4463 must not belong in the
4510 If such a declaration does not exist in
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4555 \begin_inset Flex Code
4558 \begin_layout Plain Layout
4572 \begin_layout Standard
4573 The following command produces causes äi to be produced when you enter acute-i
4577 \begin_layout LyX-Code
4591 \begin_layout Labeling
4592 \labelwidthstring 00.00.0000
4593 \begin_inset Flex Code
4596 \begin_layout Plain Layout
4602 Combine two accent characters
4605 \begin_layout LyX-Code
4611 accent1 accent2 allowed
4614 \begin_layout Standard
4615 This one is getting pretty esoteric.
4616 It allows you to combine the effect
4672 \begin_inset Flex Code
4675 \begin_layout Plain Layout
4703 \begin_layout Standard
4704 Consider this example from the
4705 \begin_inset Flex Code
4708 \begin_layout Plain Layout
4719 \begin_layout LyX-Code
4722 kmod ; acute aeioyvhAEIOYVH
4726 kcomb acute umlaut iyIY
4729 \begin_layout Standard
4730 This allows you to press
4731 \begin_inset Flex MenuItem
4734 \begin_layout Plain Layout
4742 and get the effect of
4743 \begin_inset Flex Code
4746 \begin_layout Plain Layout
4765 in this case cancels the last dead key, so if you press
4766 \begin_inset Flex MenuItem
4769 \begin_layout Plain Layout
4778 \begin_inset Flex Code
4781 \begin_layout Plain Layout
4794 \begin_layout Subsection
4798 \begin_layout Standard
4800 \begin_inset Flex Code
4803 \begin_layout Plain Layout
4811 mapping is performed, a
4812 \begin_inset Flex Code
4815 \begin_layout Plain Layout
4825 file maps the strings that the symbols generate to characters in the current
4827 The LyX distribution currently includes at least the
4828 \begin_inset Flex Code
4831 \begin_layout Plain Layout
4840 \begin_inset Flex Code
4843 \begin_layout Plain Layout
4854 \begin_layout Standard
4856 \begin_inset Flex Code
4859 \begin_layout Plain Layout
4867 file is a sequence of declarations of the form
4870 \begin_layout LyX-Code
4883 \begin_layout Standard
4884 For example, in order to map
4885 \begin_inset Flex MenuItem
4888 \begin_layout Plain Layout
4898 to the corresponding character in the iso-8859-1 set (233), the following
4902 \begin_layout LyX-Code
4910 \begin_layout Standard
4912 \begin_inset Flex Code
4915 \begin_layout Plain Layout
4924 \begin_inset Flex Code
4927 \begin_layout Plain Layout
4945 the same character can apply to more than one string.
4947 \begin_inset Flex Code
4950 \begin_layout Plain Layout
4961 \begin_layout LyX-Code
4973 \begin_inset Newline newline
4989 \begin_layout Standard
4990 If LyX cannot find a mapping for the string produced by the keystroke or
4991 a deadkey sequence, it will check if it looks like an accented char and
4992 try to draw an accent over the character on screen.
4995 \begin_layout Subsection
4999 \begin_layout Standard
5000 There is a second way to add support for international characters through
5001 so-called dead-keys.
5002 A dead-key works in combination with a letter to produce an accented character.
5003 Here, we'll explain how to create a really simple dead-key to illustrate
5007 \begin_layout Standard
5008 Suppose you happen to need the circumflex character,
5009 \begin_inset Quotes eld
5013 \begin_inset Quotes erd
5018 \begin_inset Flex MenuItem
5021 \begin_layout Plain Layout
5028 \begin_inset space ~
5032 \begin_inset Flex MenuItem
5035 \begin_layout Plain Layout
5041 ] to the LyX command
5042 \begin_inset Flex Code
5045 \begin_layout Plain Layout
5052 \begin_inset Flex Code
5055 \begin_layout Plain Layout
5062 Now, whenever you type the
5063 \begin_inset Flex MenuItem
5066 \begin_layout Plain Layout
5072 -key followed by a letter, that letter will have a circumflex accent on
5074 For example, the sequence
5075 \begin_inset Quotes eld
5079 \begin_inset Flex MenuItem
5082 \begin_layout Plain Layout
5089 \begin_inset Quotes erd
5092 produces the letter:
5093 \begin_inset Quotes eld
5097 \begin_inset Quotes erd
5101 If you tried to type
5102 \begin_inset Quotes eld
5106 \begin_inset Flex MenuItem
5109 \begin_layout Plain Layout
5116 \begin_inset Quotes erd
5119 , however, LyX will complain with a beep, since a
5120 \begin_inset Quotes eld
5124 \begin_inset Flex MenuItem
5127 \begin_layout Plain Layout
5134 \begin_inset Quotes erd
5137 never takes a circumflex accent.
5139 \begin_inset Flex MenuItem
5142 \begin_layout Plain Layout
5148 after a dead-key produces the bare-accent.
5149 Please note this last point! If you bind a key to a dead-key, you'll need
5150 to rebind the character on that key to yet another key.
5152 \begin_inset Flex MenuItem
5155 \begin_layout Plain Layout
5161 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5164 \begin_layout Standard
5165 One common way to bind dead-keys is to use
5166 \begin_inset Flex MenuItem
5169 \begin_layout Plain Layout
5176 \begin_inset Flex MenuItem
5179 \begin_layout Plain Layout
5186 \begin_inset Flex MenuItem
5189 \begin_layout Plain Layout
5195 in combination with an accent, like
5196 \begin_inset Quotes eld
5200 \begin_inset Flex MenuItem
5203 \begin_layout Plain Layout
5210 \begin_inset Quotes erd
5214 \begin_inset Quotes eld
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5228 \begin_inset Quotes erd
5232 \begin_inset Quotes eld
5236 \begin_inset Flex MenuItem
5239 \begin_layout Plain Layout
5246 \begin_inset Quotes erd
5250 Another way involves using
5251 \begin_inset Flex Code
5254 \begin_layout Plain Layout
5261 \begin_inset Flex Code
5264 \begin_layout Plain Layout
5270 to set up the special
5271 \begin_inset Flex Code
5274 \begin_layout Plain Layout
5282 \begin_inset Flex Code
5285 \begin_layout Plain Layout
5291 acts in some ways just like
5292 \begin_inset Flex MenuItem
5295 \begin_layout Plain Layout
5301 and permits you to bind keys to accented characters.
5302 You can also turn keys into dead-keys by binding them to something like
5304 \begin_inset Flex Code
5307 \begin_layout Plain Layout
5313 and then binding this symbolic key to the corresponding LyX command.
5317 \begin_layout Plain Layout
5322 : This is exactly what I do in my
5323 \begin_inset Flex Code
5326 \begin_layout Plain Layout
5333 \begin_inset Flex Code
5336 \begin_layout Plain Layout
5344 \begin_inset Flex MenuItem
5347 \begin_layout Plain Layout
5349 \begin_inset space ~
5358 \begin_inset Flex Code
5361 \begin_layout Plain Layout
5367 and a bunch of these
5368 \begin_inset Quotes eld
5372 \begin_inset Flex Code
5375 \begin_layout Plain Layout
5382 \begin_inset Quotes erd
5385 symbolic keys bound such things as
5386 \begin_inset Flex MenuItem
5389 \begin_layout Plain Layout
5391 \begin_inset space ~
5400 \begin_inset Flex MenuItem
5403 \begin_layout Plain Layout
5405 \begin_inset space ~
5414 This is how I produce my accented characters.
5419 You can make just about anything into the
5420 \begin_inset Flex Code
5423 \begin_layout Plain Layout
5430 \begin_inset Flex MenuItem
5433 \begin_layout Plain Layout
5439 keys, a spare function key, etc.
5440 As for the LyX commands that produce accents, check the entry for
5441 \begin_inset Flex Code
5444 \begin_layout Plain Layout
5455 You'll find the complete list there.
5458 \begin_layout Subsection
5459 Saving your Language Configuration
5462 \begin_layout Standard
5463 You can edit your preferences so that your desired language environment
5464 is automatically configured when LyX starts up, via the
5465 \begin_inset Flex MenuItem
5468 \begin_layout Plain Layout
5469 Edit\SpecialChar \menuseparator
5478 \begin_layout Chapter
5479 Installing New Document Classes, Layouts, and Templates
5480 \begin_inset CommandInset label
5482 name "cha:Installing-New-Document"
5487 \begin_inset Argument 1
5490 \begin_layout Plain Layout
5491 Installing New Document Classes
5499 \begin_layout Standard
5500 In this chapter, we describe the procedures for creating and installing
5501 new LyX layout and template files, as well as offer a refresher on correctly
5502 installing new LaTeX document classes.
5506 \begin_layout Standard
5507 First, let us a say a few words about how one ought to think about the relation
5508 between LyX and LaTeX.
5509 The thing to understand is that, in a certain sense, LyX doesn't know anything
5511 Indeed, from LyX's point of view, LaTeX is just one of several
5512 \begin_inset Quotes eld
5516 \begin_inset Quotes erd
5519 in which it is capable of producing output.
5520 Other such formats are DocBook, plaintext, and XHTML.
5521 LaTeX is, of course, a particularly important format, but very little of
5522 the information LyX has about LaTeX is actually contained in the program
5527 \begin_layout Plain Layout
5528 Some commands are sufficiently complex that they are
5529 \begin_inset Quotes eld
5533 \begin_inset Quotes erd
5537 But the developers generally regard this as a Bad Thing.
5542 Rather, that information, even for the standard classes like
5543 \begin_inset Flex Code
5546 \begin_layout Plain Layout
5552 , is contained in `layout files'.
5553 Similarly, LyX itself does not know much about DocBook or XHTML.
5554 What it knows is contained in layout files.
5557 \begin_layout Standard
5558 You can think of the layout file for a given document class as a translation
5559 manual between LyX constructs---paragraphs with their corresponding styles,
5560 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5562 Almost everything LyX knows about
5563 \begin_inset Flex Code
5566 \begin_layout Plain Layout
5572 , for example, is contained in the file
5573 \begin_inset Flex Code
5576 \begin_layout Plain Layout
5582 and in various other files it includes.
5583 For this reason, anyone intending to write layout files should plan to
5584 study the existing files.
5585 A good place to start is with
5586 \begin_inset Flex Code
5589 \begin_layout Plain Layout
5595 , which is included in
5596 \begin_inset Flex Code
5599 \begin_layout Plain Layout
5606 \begin_inset Flex Code
5609 \begin_layout Plain Layout
5615 , and many of the other layout files for document classes.
5616 This file is where sections and the like are defined:
5617 \begin_inset Flex Code
5620 \begin_layout Plain Layout
5626 tells LyX how paragraphs that are marked with the Section, Subsection,
5627 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5630 \begin_inset Flex Code
5633 \begin_layout Plain Layout
5639 file basically just includes several of these
5640 \begin_inset Flex Code
5643 \begin_layout Plain Layout
5652 \begin_layout Standard
5653 Defining the LyX--LaTeX correspondence is not the only thing layout files
5655 Their other job is to define how the LyX constructs themselves will appear
5657 The fact that layout files have these two jobs is often a source of confusion,
5658 because they are completely separate.
5659 Telling LyX how to translate a certain paragraph style into LaTeX does
5660 not tell LyX how to display it; conversely, telling LyX how to display
5661 a certain paragraph style does not tell LyX how to translate it into LaTeX
5662 (let alone tell LaTeX how to display it).
5663 So, in general, when you define a new LyX construct, you must always do
5664 two quite separate things: (i)
5665 \begin_inset space ~
5668 tell LyX how to translate it into LaTeX and (ii)
5669 \begin_inset space ~
5672 tell LyX how to display it.
5675 \begin_layout Standard
5676 Much the same is true, of course, as regards LyX's other backend formats,
5677 though XHTML is in some ways different, because in that case LyX
5681 able, to some extent, to use information about how it should display a
5682 paragraph on the screen to output information (in the form of CSS) about
5683 how the paragraph should be displayed in a browser.
5684 Even in this case, however, the distinction between what LyX does internally
5685 and how things are rendered externally remains in force, and the two can
5686 be controlled separately.
5688 \begin_inset CommandInset ref
5690 reference "sec:Tags-for-XHTML"
5697 \begin_layout Section
5698 Installing new LaTeX files
5701 \begin_layout Standard
5702 Some installations may not include a LaTeX package or class file that you
5703 would like to use within LyX.
5704 For example, you might need FoilTeX, a package for preparing slides for
5705 overhead projectors.
5706 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5707 a user interface for installing such packages.
5708 For example, with MiKTeX, you start the program
5709 \begin_inset Quotes eld
5713 \begin_inset space ~
5717 \begin_inset Quotes erd
5720 to get a list of available packages.
5721 To install one of them, right click on it or use the corresponding toolbar
5725 \begin_layout Standard
5726 If your LaTeX distribution does not provide such a `package manager', or
5727 if the package is not available from your distribution, then follow these
5728 steps to install it manually:
5731 \begin_layout Enumerate
5732 Get the package from
5733 \begin_inset CommandInset href
5736 target "http://www.ctan.org/"
5743 \begin_layout Enumerate
5744 If the package contains a file with the ending
5745 \begin_inset Quotes eld
5749 \begin_inset Flex Code
5752 \begin_layout Plain Layout
5759 \begin_inset Quotes erd
5762 (is the case for FoilTeX) then open a console, change to the folder of
5763 this file and execute the command
5764 \begin_inset Flex Code
5767 \begin_layout Plain Layout
5774 You have now unpacked the package and have all files to install it.
5775 Most LaTeX-packages are not packed and you can skip this step.
5778 \begin_layout Enumerate
5779 Now you need to decide if the package should be available for all users
5784 \begin_layout Enumerate
5785 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5786 for all users on your system, then install it in your `local' TeX tree,
5787 otherwise install it in your own `user' TeX tree.
5788 Where these trees should be created, if they do not already exist, depends
5790 To find this out, look in the file
5791 \begin_inset Flex Code
5794 \begin_layout Plain Layout
5804 \begin_layout Plain Layout
5805 This is usually in the directory
5806 \begin_inset Flex Code
5809 \begin_layout Plain Layout
5815 , though you can execute the command
5816 \begin_inset Flex Code
5819 \begin_layout Plain Layout
5830 The location of the `local' TeX tree is defined by the
5831 \begin_inset Flex Code
5834 \begin_layout Plain Layout
5840 variable; this is usually somewhere like
5841 \begin_inset Flex Code
5844 \begin_layout Plain Layout
5845 /usr/local/share/texmf
5851 The location of the `user' TeX tree is defined by
5852 \begin_inset Flex Code
5855 \begin_layout Plain Layout
5862 \begin_inset Flex Code
5865 \begin_layout Plain Layout
5872 (If these variables are not predefined, you have to define them.) You'll
5873 probably need root permissions to create or modify the `local' tree, but
5874 not for your `user' tree.
5875 \begin_inset Newline newline
5878 In general, it is recommended to install in the user tree because your user
5879 will not be modified or even overwritten when you upgrade your system.
5880 It will typically also be backed up together with everything else when
5881 you backup your home directory (which, of course, you do on a regular basis).
5884 \begin_layout Enumerate
5885 On Windows, if you want the new package to be available for all users on
5886 your system, change to the folder where LaTeX is installed and then change
5888 \begin_inset Flex Code
5891 \begin_layout Plain Layout
5902 (For MiKTeX, this would be by default the folder
5903 \begin_inset Flex Code
5906 \begin_layout Plain Layout
5924 \begin_layout Plain Layout
5925 Note that this will be the correct path only on English installations.
5926 On a German one, it would be
5927 \begin_inset Flex Code
5930 \begin_layout Plain Layout
5944 , and similarly for other languages.
5949 Create there a new folder
5950 \begin_inset Flex Code
5953 \begin_layout Plain Layout
5959 and copy all files of the package into it.
5961 \begin_inset Newline newline
5964 If the package should only available for you or you don't have admin permissions
5965 , do the same, but in the local LaTeX folder.
5967 \begin_inset space \thinspace{}
5971 \begin_inset space ~
5974 2.8 under Windows XP, this would be the folder:
5975 \begin_inset Newline newline
5981 \begin_inset Flex Code
5984 \begin_layout Plain Layout
5987 Documents and Settings
5999 \begin_inset Newline newline
6005 \begin_inset Phantom HPhantom
6008 \begin_layout Plain Layout
6019 \begin_inset Flex Code
6022 \begin_layout Plain Layout
6035 \begin_inset Newline newline
6038 On Vista, it would be:
6039 \begin_inset Newline newline
6043 \begin_inset Flex Code
6046 \begin_layout Plain Layout
6072 \begin_layout Enumerate
6073 Now one only need to tell LaTeX that there are new files.
6074 This depends on the used LaTeX-Distribution:
6078 \begin_layout Enumerate
6079 For TeXLive execute the command
6080 \begin_inset Flex Code
6083 \begin_layout Plain Layout
6090 If you installed the package for all users, then you will probably need
6091 to have root permissions for that.
6094 \begin_layout Enumerate
6095 For MiKTeX, if you have installed the package for all users, start the program
6097 \begin_inset Quotes eld
6101 \begin_inset space ~
6105 \begin_inset Quotes erd
6108 and press the button marked
6109 \begin_inset Quotes eld
6113 \begin_inset Quotes erd
6117 Otherwise start the program
6118 \begin_inset Quotes eld
6122 \begin_inset Quotes erd
6129 \begin_layout Enumerate
6130 Finally, you need to tell LyX that there are new packages available.
6131 So, in LyX, use the menu
6132 \begin_inset Flex MenuItem
6135 \begin_layout Plain Layout
6138 \SpecialChar \menuseparator
6144 and then restart LyX.
6147 \begin_layout Standard
6148 Now the package is installed.
6149 In our example, the document class
6150 \begin_inset Flex Code
6153 \begin_layout Plain Layout
6155 \begin_inset space ~
6162 \begin_layout Plain Layout
6174 will now be available under
6175 \begin_inset Flex MenuItem
6178 \begin_layout Plain Layout
6179 Document\SpecialChar \menuseparator
6180 Settings\SpecialChar \menuseparator
6190 \begin_layout Standard
6191 If you would like to use a LaTeX document class that is not even listed
6193 \begin_inset Flex MenuItem
6196 \begin_layout Plain Layout
6197 Document\SpecialChar \menuseparator
6198 Settings\SpecialChar \menuseparator
6204 , then you need to create a `layout' file for it.
6205 That is the topic of the next section.
6208 \begin_layout Section
6209 Types of layout files
6212 \begin_layout Standard
6213 This section describes the various sorts of LyX files that contain layout
6215 These files describe various paragraph and character styles, determining
6216 how LyX should display them and how they should be translated into LaTeX,
6217 DocBook, XHTML, or whatever output format is being used.
6221 \begin_layout Standard
6222 We shall try to provide a thorough description of the process of writing
6224 However, there are so many different types of documents supported even
6225 by just LaTeX that we can't hope to cover every different possibility or
6226 problem you might encounter.
6227 The LyX users' list is frequented by people with lots of experience with
6228 layout design who are willing to share what they've learned, so please
6229 feel free to ask questions there.
6232 \begin_layout Standard
6233 As you prepare to write a new layout, it is extremely helpful to look at
6234 the layouts distributed with LyX.
6235 If you write a LyX layout for a LaTeX document class that might also be
6236 used by others, or write a module that might be useful to others, then
6237 you should consider posting your layout to the
6238 \begin_inset CommandInset href
6240 name "layout section on the LyX wiki"
6241 target "http://wiki.lyx.org/Layouts/Layouts"
6245 or even to the LyX developers' list, so that it might be included in LyX
6250 \begin_layout Plain Layout
6251 Note that LyX is licensed under the General Public License, so any material
6252 that is contributed to LyX must be similarly licensed.
6260 \begin_layout Subsection
6262 \begin_inset CommandInset label
6264 name "sub:Layout-modules"
6271 \begin_layout Standard
6272 We have spoken to this point about `layout files'.
6273 But there are different sorts of files that contain layout information.
6274 Layout files, strictly so called, have the
6275 \begin_inset Flex Code
6278 \begin_layout Plain Layout
6284 extension and provide LyX with information about document classes.
6285 As of LyX 1.6, however, layout information can also be contained in layout
6291 \begin_inset Flex Code
6294 \begin_layout Plain Layout
6301 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6302 some modules—such as the
6303 \begin_inset Flex Code
6306 \begin_layout Plain Layout
6312 module—specifically provide support for one package.
6313 In a sense, layout modules are similar to included
6317 \begin_layout Plain Layout
6318 These can have any extension, but by convention have the
6319 \begin_inset Flex Code
6322 \begin_layout Plain Layout
6334 \begin_inset Flex Code
6337 \begin_layout Plain Layout
6343 —in that modules are not specific to a given document class but may be used
6344 with many different classes.
6345 The difference is that using an included file with
6346 \begin_inset Flex Code
6349 \begin_layout Plain Layout
6355 requires editing that file.
6356 Modules, by contrast, are selected in the
6357 \begin_inset Flex MenuItem
6360 \begin_layout Plain Layout
6361 Document\SpecialChar \menuseparator
6370 \begin_layout Standard
6371 Building modules is the easiest way to get started with layout editing,
6372 since it can be as simple as adding a single new paragraph style or flex
6374 But modules may, in principle, contain anything a layout file can contain.
6377 \begin_layout Standard
6378 After creating a new module and copying it to the
6379 \begin_inset Flex Code
6382 \begin_layout Plain Layout
6388 folder, you will need to reconfigure and then restart LyX for the module
6389 to appear in the menu.
6390 However, changes you make to the module will be seen immediately, if you
6392 \begin_inset Flex MenuItem
6395 \begin_layout Plain Layout
6396 Document\SpecialChar \menuseparator
6402 , highlight something, and then hit
6403 \begin_inset Quotes eld
6407 \begin_inset Quotes erd
6413 It is strongly recommended that you save your work before doing this
6418 it is strongly recommended that you not attempt to edit modules while simultaneo
6419 usly working on actual documents
6422 Though of course the developers strive to keep LyX stable in such situations,
6423 syntax errors and the like in your module file could cause strange behavior.
6426 \begin_layout Subsubsection
6430 \begin_layout Standard
6431 Modules are to LyX as packages are to LaTeX.
6432 Sometimes, however, you find yourself wanting a specific inset or character
6433 style just for one document and writing a module that will also be available
6434 to other documents makes little sense.
6435 What you need is LyX's
6436 \begin_inset Quotes eld
6440 \begin_inset Quotes erd
6446 \begin_layout Standard
6447 You will find it under
6449 Document\SpecialChar \menuseparator
6450 Settings\SpecialChar \menuseparator
6454 The large text box allows you to enter anything that you might enter in
6455 a layout file or module.
6456 You can think of a document's local layout, in fact, as a module that belongs
6458 So, in particular, you must enter a
6459 \begin_inset Flex Code
6462 \begin_layout Plain Layout
6469 Any format is acceptable, but one would normally use the format current
6471 (In LyX 2.0, the current layout format is 35.) You should be aware that local
6472 layout is not supported by versions of LyX prior to 1.6, so you should not
6473 use it if you want to be able to export your document to LyX 1.5 or earlier
6474 (without, that is, losing the local layout information).
6475 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6476 though there is no UI for it---then you should use format 11 and, of course,
6477 use only layout constructs that were available in LyX 1.6.
6480 \begin_layout Standard
6481 When you have entered something in the
6482 \begin_inset Flex Code
6485 \begin_layout Plain Layout
6491 pane, LyX will enable the
6492 \begin_inset Quotes eld
6496 \begin_inset Quotes erd
6499 button at the bottom.
6500 Clicking this button will cause LyX to determine whether what you have
6501 entered is valid layout information for the chosen format.
6502 LyX will report the result but, unfortunately, will not tell you what errors
6503 there might have been.
6504 These will be written to the terminal, however, if LyX is started from
6506 You will not be permitted to save your local layout until you have entered
6510 \begin_layout Standard
6511 The warnings at the end of the previous section apply here, too.
6512 Do not play with local layout while you are actually working, especially
6513 if you have not saved your document.
6514 That said, using local layout with a test document can be a very convenient
6515 way to try out layout ideas, or even to start developing a module.
6518 \begin_layout Subsection
6520 \begin_inset Flex MenuItem
6523 \begin_layout Plain Layout
6532 \begin_layout Standard
6533 There are two situations you are likely to encounter when wanting to support
6534 a new LaTeX document class, involving style (
6535 \begin_inset Flex Code
6538 \begin_layout Plain Layout
6544 ) files and LaTeX2e class (
6545 \begin_inset Flex Code
6548 \begin_layout Plain Layout
6555 Supporting a style file is usually fairly easy.
6556 Supporting a new class file is a bit harder.
6557 We'll discuss the former in this section and the latter in the next.
6558 Similar remarks apply, of course, if you want to support a new DocBook
6562 \begin_layout Standard
6563 The easier case is the one in which your new document class is provided
6564 as a style file that is to be used in conjunction with an already supported
6566 For the sake of the example, we'll assume that the style file is called
6568 \begin_inset Flex MenuItem
6571 \begin_layout Plain Layout
6577 and that it is meant to be used with
6578 \begin_inset Flex MenuItem
6581 \begin_layout Plain Layout
6587 , which is a standard class.
6591 \begin_layout Standard
6592 Start by copying the existing class's layout file into your local directory:
6596 \begin_layout Plain Layout
6597 Of course, which directory is your local directory will vary by platform,
6598 and LyX allows you to specify your local directory on startup, too, using
6600 \begin_inset Flex Code
6603 \begin_layout Plain Layout
6617 \begin_layout LyX-Code
6618 cp report.layout ~/.lyx/layouts/myclass.layout
6621 \begin_layout Standard
6623 \begin_inset Flex Code
6626 \begin_layout Plain Layout
6632 and change the line:
6635 \begin_layout LyX-Code
6638 DeclareLaTeXClass{report}
6641 \begin_layout Standard
6645 \begin_layout LyX-Code
6648 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6651 \begin_layout Standard
6655 \begin_layout LyX-Code
6657 \begin_inset Newline newline
6663 \begin_inset Newline newline
6669 \begin_layout Standard
6670 near the top of the file.
6673 \begin_layout Standard
6674 Start LyX and select
6675 \begin_inset Flex MenuItem
6678 \begin_layout Plain Layout
6679 Tools\SpecialChar \menuseparator
6686 Then restart LyX and try creating a new document.
6688 \begin_inset Flex MenuItem
6691 \begin_layout Plain Layout
6697 " as a document class option in the
6698 \begin_inset Flex MenuItem
6701 \begin_layout Plain Layout
6702 Document\SpecialChar \menuseparator
6709 It is likely that some of the sectioning commands and such in your new
6710 class will work differently from how they worked in the base class—
6711 \begin_inset Flex Code
6714 \begin_layout Plain Layout
6720 in this example—so you can fiddle around with the settings for the different
6721 sections if you wish.
6722 The layout information for sections is contained in
6723 \begin_inset Flex Code
6726 \begin_layout Plain Layout
6732 , but you do not need to copy and change this file.
6733 Instead, you can simply add your changes to your layout file, after the
6735 \begin_inset Flex Code
6738 \begin_layout Plain Layout
6744 , which itself includes
6745 \begin_inset Flex Code
6748 \begin_layout Plain Layout
6755 For example, you might add these lines:
6758 \begin_layout LyX-Code
6762 \begin_layout LyX-Code
6766 \begin_layout LyX-Code
6770 \begin_layout LyX-Code
6774 \begin_layout LyX-Code
6778 \begin_layout Standard
6779 to change the font for chapter headings to sans-serif.
6780 This will override (or, in this case, add to) the existing declaration
6781 for the Chapter style.
6785 \begin_layout Standard
6786 Your new package may also provide commands or environments not present in
6788 In this case, you will want to add these to the layout file.
6790 \begin_inset space ~
6794 \begin_inset CommandInset ref
6796 reference "sec:TextClass"
6800 for information on how to do so.
6803 \begin_layout Standard
6805 \begin_inset Flex MenuItem
6808 \begin_layout Plain Layout
6814 can be used with several different document classes, and even if it cannot,
6815 you might find it easiest just to write a module that you can load with
6817 The simplest possible such module would be:
6820 \begin_layout LyX-Code
6823 DeclareLyXModule{My Package}
6826 \begin_layout LyX-Code
6830 \begin_layout LyX-Code
6831 #Support for mypkg.sty.
6834 \begin_layout LyX-Code
6836 \begin_inset Newline newline
6842 \begin_layout LyX-Code
6844 \begin_inset Newline newline
6850 \begin_layout LyX-Code
6852 \begin_inset Newline newline
6858 \begin_inset Newline newline
6864 \begin_layout Standard
6865 A more complex module might modify the behavior of some existing constructs
6866 or define some new ones.
6868 \begin_inset space ~
6872 \begin_inset CommandInset ref
6874 reference "sec:TextClass"
6881 \begin_layout Subsection
6883 \begin_inset Flex MenuItem
6886 \begin_layout Plain Layout
6895 \begin_layout Standard
6896 There are two possibilities here.
6897 One is that the class file is itself based upon an existing document class.
6898 For example, many thesis classes are based upon
6899 \begin_inset Flex MenuItem
6902 \begin_layout Plain Layout
6909 To see whether yours is, look for a line like
6912 \begin_layout LyX-Code
6918 \begin_layout Standard
6920 If so, then you may proceed largely as in the previous section, though
6922 \begin_inset Flex Code
6925 \begin_layout Plain Layout
6931 line will be different.
6932 If your new class is
6933 \begin_inset Flex Code
6936 \begin_layout Plain Layout
6942 and it is based upon
6943 \begin_inset Flex Code
6946 \begin_layout Plain Layout
6952 , then the line should read:
6956 \begin_layout Plain Layout
6957 And it will be easiest if you save the file to
6958 \begin_inset Flex Code
6961 \begin_layout Plain Layout
6967 : LyX assumes that the document class has the same name as the layout file.
6976 \begin_layout LyX-Code
6979 DeclareLaTeXClass[thesis,book]{thesis}
6982 \begin_layout Standard
6983 If, on the other hand, the new class is not based upon an existing class,
6984 you will probably have to
6985 \begin_inset Quotes eld
6989 \begin_inset Quotes erd
6993 We strongly suggest copying an existing layout file which uses a similar
6994 LaTeX class and then modifying it, if you can do so.
6995 At least use an existing file as a starting point so you can find out what
6996 items you need to worry about.
6997 Again, the specifics are covered below.
7000 \begin_layout Subsection
7002 \begin_inset CommandInset label
7004 name "sub:Creating-Templates"
7011 \begin_layout Standard
7012 Once you have written a layout file for a new document class, you might
7013 want to consider writing a
7018 A template acts as a kind of tutorial for your layout, showing how it might
7019 be used, though containing dummy content.
7020 You can of course look at the various templates included with LyX for ideas.
7023 \begin_layout Standard
7024 Templates are created just like usual documents: using LyX.
7025 The only difference is that usual documents contain all possible settings,
7026 including the font scheme and the paper size.
7027 Usually a user doesn't want a template to overwrite his preferred settings
7028 for such parameters.
7029 For that reason, the designer of a template should remove the corresponding
7031 \begin_inset Flex Code
7034 \begin_layout Plain Layout
7043 \begin_inset Flex Code
7046 \begin_layout Plain Layout
7054 from the template LyX file.
7055 This can be done with any simple text-editor, for example
7056 \begin_inset Flex Code
7059 \begin_layout Plain Layout
7066 \begin_inset Flex Code
7069 \begin_layout Plain Layout
7078 \begin_layout Standard
7079 Put the edited template files you create in
7080 \begin_inset Flex Code
7083 \begin_layout Plain Layout
7089 , copy the ones you use from the global template directory in
7090 \begin_inset Flex Code
7093 \begin_layout Plain Layout
7099 to the same place, and redefine the template path in the
7100 \begin_inset Flex MenuItem
7103 \begin_layout Plain Layout
7104 Tools\SpecialChar \menuseparator
7105 Preferences\SpecialChar \menuseparator
7114 \begin_layout Standard
7115 Note, by the way, that there is a template which has a particular meaning:
7117 \begin_inset Flex Code
7120 \begin_layout Plain Layout
7127 This template is loaded every time you create a new document with
7128 \begin_inset Flex MenuItem
7131 \begin_layout Plain Layout
7132 File\SpecialChar \menuseparator
7138 in order to provide useful defaults.
7139 To create this template from inside LyX, all you have to do is to open
7140 a document with the correct settings, and use the
7141 \begin_inset Flex MenuItem
7144 \begin_layout Plain Layout
7145 Save as Document Defaults
7153 \begin_layout Subsection
7154 Upgrading old layout files
7157 \begin_layout Standard
7158 The format of layout files changes with each LyX release, so old layout
7159 files need to be converted to the new format.
7160 If LyX reads a layout file in an older format, it automatically calls the
7162 \begin_inset Flex Code
7165 \begin_layout Plain Layout
7171 to convert it to a temporary file in current format.
7172 The original file is left untouched.
7173 If you use the layout file often, then, you may want to convert it permanently,
7174 so that LyX does not have to do so itself every time.
7175 To do this, you can call the converter manually:
7178 \begin_layout Enumerate
7180 \begin_inset Flex Code
7183 \begin_layout Plain Layout
7190 \begin_inset Flex Code
7193 \begin_layout Plain Layout
7202 \begin_layout Enumerate
7204 \begin_inset Newline newline
7208 \begin_inset Flex Code
7211 \begin_layout Plain Layout
7212 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7218 \begin_inset Newline newline
7222 \begin_inset Flex Code
7225 \begin_layout Plain Layout
7231 is the name of your LyX system directory.
7234 \begin_layout Standard
7235 Note that manual conversion does not affect included files, so these will
7236 have to be converted separately.
7239 \begin_layout Section
7240 \begin_inset CommandInset label
7242 name "sec:TextClass"
7246 The layout file format
7249 \begin_layout Standard
7250 The following sections describe how layout files are structured and written.
7251 Our advice is to go slowly, save and test often.
7252 It is really not that hard, except that the multitude of options can become
7253 overwhelming, especially if you try to check out too many at once.
7254 It becomes easier if you use existing layouts of LyX as examples/reference
7255 or if you modify an existing layout to your needs.
7258 \begin_layout Standard
7259 Note that all the tags used in layout files are case-insensitive.
7261 \begin_inset Flex Code
7264 \begin_layout Plain Layout
7271 \begin_inset Flex Code
7274 \begin_layout Plain Layout
7281 \begin_inset Flex Code
7284 \begin_layout Plain Layout
7290 are really the same tag.
7291 The possible arguments are printed in brackets after the tag's name.
7292 The default argument is typeset
7293 \begin_inset Flex Code
7296 \begin_layout Plain Layout
7305 If the argument has a data type like
7306 \begin_inset Quotes eld
7310 \begin_inset Quotes erd
7314 \begin_inset Quotes eld
7318 \begin_inset Quotes erd
7321 , the default is shown like this:
7322 \begin_inset Flex Code
7325 \begin_layout Plain Layout
7336 \begin_layout Subsection
7337 The document class declaration
7338 \change_inserted -712698321 1349766602
7344 \begin_layout Standard
7345 Lines in a layout file which begin with
7346 \begin_inset Flex Code
7349 \begin_layout Plain Layout
7356 There is one exception to this rule.
7358 \begin_inset Flex Code
7361 \begin_layout Plain Layout
7367 files should begin with
7368 \change_deleted -712698321 1349766533
7372 \change_inserted -712698321 1349766536
7378 \begin_layout LyX-Code
7381 #% Do not delete the line below; configure depends on this
7384 \begin_layout LyX-Code
7390 \change_deleted -712698321 1349766193
7392 \change_inserted -712698321 1349766201
7393 Article (Standard Class)
7396 \change_inserted -712698321 1349766538
7400 \begin_layout LyX-Code
7402 \change_inserted -712698321 1349766581
7407 DeclareCategory{Articles}
7412 \begin_layout Standard
7414 \change_inserted -712698321 1349766695
7418 \change_inserted -712698321 1349766626
7422 \change_deleted -712698321 1349766628
7424 \change_inserted -712698321 1349766628
7427 used when you (re)configure LyX.
7428 The layout file is read by the LaTeX script
7429 \begin_inset Flex Code
7432 \begin_layout Plain Layout
7438 , in a special mode where
7439 \begin_inset Flex Code
7442 \begin_layout Plain Layout
7449 The first line is just a LaTeX comment,
7450 \change_deleted -712698321 1349766656
7453 the second one contains the
7454 \change_inserted -712698321 1349766650
7457 declaration of the text class
7458 \change_inserted -712698321 1349766689
7459 , and the third line contains the optional classification of the class
7462 If these lines appear in a file named
7463 \begin_inset Flex Code
7466 \begin_layout Plain Layout
7472 , then they define a text class of name
7473 \begin_inset Flex Code
7476 \begin_layout Plain Layout
7482 (the name of the layout file) which uses the LaTeX document class
7483 \begin_inset Flex Code
7486 \begin_layout Plain Layout
7492 (the default is to use the same name as the layout).
7494 \begin_inset Quotes eld
7498 \change_deleted -712698321 1349766253
7500 \change_inserted -712698321 1349766260
7501 Article (Standard Class)
7504 \begin_inset Quotes erd
7507 that appears above is used as a description of the text class in the
7508 \begin_inset Flex MenuItem
7511 \begin_layout Plain Layout
7512 Document\SpecialChar \menuseparator
7520 \change_inserted -712698321 1349767097
7522 \begin_inset Quotes eld
7526 \begin_inset Quotes erd
7529 in the example) is also used in the
7530 \begin_inset Flex MenuItem
7533 \begin_layout Plain Layout
7535 \change_inserted -712698321 1349766801
7536 Document\SpecialChar \menuseparator
7542 dialog: the text classes are grouped by these categories (which are usually
7543 genres, so typical categories are
7544 \begin_inset Quotes eld
7548 \begin_inset Quotes erd
7552 \begin_inset Quotes eld
7556 \begin_inset Quotes erd
7560 \begin_inset Quotes eld
7564 \begin_inset Quotes erd
7568 \begin_inset Quotes eld
7572 \begin_inset Quotes erd
7576 \begin_inset Quotes eld
7580 \begin_inset Quotes erd
7584 \begin_inset Quotes eld
7588 \begin_inset Quotes erd
7592 If no category has been declared, the class will be put in the
7593 \begin_inset Quotes eld
7597 \begin_inset Quotes erd
7605 \begin_layout Standard
7606 Let's assume that you wrote your own text class that uses the
7607 \begin_inset Flex Code
7610 \begin_layout Plain Layout
7616 document class, but where you changed the appearance of the section headings.
7617 If you put it in a file
7618 \begin_inset Flex Code
7621 \begin_layout Plain Layout
7627 , the header of this file should be:
7630 \begin_layout LyX-Code
7633 #% Do not delete the line below; configure depends on this
7636 \begin_layout LyX-Code
7641 DeclareLaTeXClass[article]{
7642 \change_deleted -712698321 1349766303
7644 \change_inserted -712698321 1349766303
7648 \change_deleted -712698321 1349766338
7650 \change_inserted -712698321 1349766338
7654 \change_deleted -712698321 1349766340
7656 \change_inserted -712698321 1349766340
7660 \change_deleted -712698321 1349766343
7662 \change_inserted -712698321 1349766343
7666 \change_inserted -712698321 1349767223
7670 \begin_layout LyX-Code
7672 \change_inserted -712698321 1349767223
7677 DeclareCategory{Articles}
7682 \begin_layout Standard
7683 This declares a text class
7684 \begin_inset Flex Code
7687 \begin_layout Plain Layout
7693 , associated with the LaTeX document class
7694 \begin_inset Flex Code
7697 \begin_layout Plain Layout
7704 \begin_inset Quotes eld
7708 \change_deleted -712698321 1349766329
7710 \change_inserted -712698321 1349766329
7714 \change_deleted -712698321 1349766347
7716 \change_inserted -712698321 1349766347
7720 \change_deleted -712698321 1349766350
7722 \change_inserted -712698321 1349766350
7726 \change_deleted -712698321 1349766352
7728 \change_inserted -712698321 1349766352
7732 \begin_inset Quotes erd
7736 If your text class depends on several packages, you can declare it as:
7739 \begin_layout LyX-Code
7742 #% Do not delete the line below; configure depends on this
7745 \begin_layout LyX-Code
7750 DeclareLaTeXClass[article,foo.sty]{
7751 \change_deleted -712698321 1349766366
7753 \change_inserted -712698321 1349766366
7757 \change_deleted -712698321 1349766369
7759 \change_inserted -712698321 1349766369
7763 \change_deleted -712698321 1349766371
7765 \change_inserted -712698321 1349766371
7769 \change_deleted -712698321 1349766374
7771 \change_inserted -712698321 1349766374
7775 \change_inserted -712698321 1349767240
7779 \begin_layout LyX-Code
7781 \change_inserted -712698321 1349767240
7786 DeclareCategory{Articles}
7791 \begin_layout Standard
7792 This indicates that your text class uses the
7793 \begin_inset Flex Code
7796 \begin_layout Plain Layout
7803 Finally, it is also possible to declare classes for DocBook code.
7804 Typical declarations will look like:
7807 \begin_layout LyX-Code
7810 #% Do not delete the line below; configure depends on this
7813 \begin_layout LyX-Code
7818 DeclareDocBookClass[article]{SGML (DocBook
7819 \change_deleted -712698321 1349766387
7821 \change_inserted -712698321 1349766387
7825 \change_inserted -712698321 1349767247
7829 \begin_layout LyX-Code
7831 \change_inserted -712698321 1349767302
7836 DeclareCategory{Articles (DocBook)}
7841 \begin_layout Standard
7842 Note that these declarations can also be given an optional parameter declaring
7843 the name of the document class (but not a list).
7846 \begin_layout Standard
7847 So, to be as explicit as possible, the form of the layout declaration is:
7850 \begin_layout LyX-Code
7855 DeclareLaTeXClass[class,package.sty]{layout description}
7856 \change_inserted -712698321 1349767329
7860 \begin_layout LyX-Code
7862 \change_inserted -712698321 1349767339
7867 DeclareCategory{category}
7872 \begin_layout Standard
7873 The class need only be specified if the name of the LaTeX class file and
7874 the name of the layout file are different or if there are packages to load.
7875 If the name of the class file is not specified, then LyX will simply assume
7876 that it is the same as the name of the layout file.
7879 \begin_layout Standard
7880 When the text class has been modified to your taste, all you have to do
7881 is to copy it either to
7882 \begin_inset Flex Code
7885 \begin_layout Plain Layout
7892 \begin_inset Flex Code
7895 \begin_layout Plain Layout
7902 \begin_inset Flex MenuItem
7905 \begin_layout Plain Layout
7906 Tools\SpecialChar \menuseparator
7912 , exit LyX and restart.
7913 Then your new text class should be available along with the others.
7916 \begin_layout Standard
7917 Once the layout file is installed, you can edit it and see your changes
7918 without having to reconfigure or to restart LyX.
7923 \begin_layout Plain Layout
7924 In versions of LyX prior to 1.6, this was not true.
7925 As a result, editing layout files was very time consuming, since you had
7926 constantly to restart LyX to see changes.
7931 You can force a reload of the current layout by using the LyX function
7933 \begin_inset Flex MenuItem
7936 \begin_layout Plain Layout
7943 There is no default binding for this function—though, of course, you can
7944 bind it to a key yourself.
7945 But you will normally use this function simply by entering it in the mini-buffe
7950 \begin_layout Standard
7956 \begin_inset Flex MenuItem
7959 \begin_layout Plain Layout
7965 is very much an `advanced feature'.
7970 recommended that you save your work before using this function.
7975 recommended that you not attempt to edit layout information while simultaneousl
7976 y working on a document that you care about.
7977 Use a test document.
7978 Syntax errors and the like in your layout file could cause peculiar behavior.
7979 In particular, such errors could cause LyX to regard the current layout
7980 as invalid and to attempt to switch to some other layout.
7984 \begin_layout Plain Layout
7985 Really bad syntax errors may even caused LyX to exit.
7986 This is because certain sorts of errors may make LyX unable to read
7996 The LyX team strives to keep LyX stable in such situations, but safe is
8001 \begin_layout Plain Layout
8002 While we're giving advice: make regular backups.
8003 And be nice to your mother.
8011 \begin_layout Subsection
8012 The Module declaration
8015 \begin_layout Standard
8016 A module must begin with a line like the following:
8019 \begin_layout LyX-Code
8022 DeclareLyXModule[endnotes.sty]{Endnotes}
8025 \begin_layout Standard
8026 The mandatory argument, in curly brackets, is the name of the module, as
8028 \begin_inset Flex MenuItem
8031 \begin_layout Plain Layout
8032 Document\SpecialChar \menuseparator
8033 Settings\SpecialChar \menuseparator
8040 The argument in square brackets is optional: It declares any LaTeX packages
8041 on which the module depends.
8042 It is also possible to use the form
8043 \begin_inset Flex MenuItem
8046 \begin_layout Plain Layout
8052 as an optional argument, which declares that the module can only be used
8053 when there exists a conversion chain between the formats `
8054 \begin_inset Flex Code
8057 \begin_layout Plain Layout
8064 \begin_inset Flex Code
8067 \begin_layout Plain Layout
8076 \begin_layout Standard
8077 The module declaration should then be followed by lines like the following
8081 \begin_layout Plain Layout
8082 Preferably in English if the module should be published with LyX.
8083 This description will appear in the list of messages to be translated and
8084 will be thus translated with the next interface update.
8092 \begin_layout LyX-Code
8096 \begin_layout LyX-Code
8097 #Adds an endnote command, in addition to footnotes.
8101 \begin_layout LyX-Code
8102 #You will need to add
8104 theendnotes in TeX code where you
8107 \begin_layout LyX-Code
8108 #want the endnotes to appear.
8112 \begin_layout LyX-Code
8116 \begin_layout LyX-Code
8117 #Requires: somemodule | othermodule
8120 \begin_layout LyX-Code
8121 #Excludes: badmodule
8124 \begin_layout Standard
8125 The description is used in
8126 \begin_inset Flex MenuItem
8129 \begin_layout Plain Layout
8130 Document\SpecialChar \menuseparator
8131 Settings\SpecialChar \menuseparator
8137 to provide the user with information about what the module does.
8139 \begin_inset Flex Code
8142 \begin_layout Plain Layout
8148 line is used to identify other modules with which this one must be used;
8150 \begin_inset Flex Code
8153 \begin_layout Plain Layout
8159 line is used to identify modules with which this one may not be used.
8160 Both are optional, and, as shown, multiple modules should be separated
8161 with the pipe symbol: |.
8162 Note that the required modules are treated disjunctively:
8166 of the required modules must be used.
8171 excluded module may be used.
8172 Note that modules are identified here by their filenames without the
8173 \begin_inset Flex Code
8176 \begin_layout Plain Layout
8184 \begin_inset Flex Code
8187 \begin_layout Plain Layout
8194 \begin_inset Flex Code
8197 \begin_layout Plain Layout
8206 \begin_layout Subsection
8210 \begin_layout Standard
8211 The first non-comment line of any layout file, included file, or module
8216 contain the file format number:
8219 \begin_layout Description
8220 \begin_inset Flex Code
8223 \begin_layout Plain Layout
8230 \begin_inset Flex Code
8233 \begin_layout Plain Layout
8239 ] The format number of the layout file.
8242 \begin_layout Standard
8243 This tag was introduced with LyX
8244 \begin_inset space ~
8248 Layout files from older LyX versions do not have an explicit file format
8249 and are considered to have
8250 \begin_inset Flex Code
8253 \begin_layout Plain Layout
8255 \begin_inset space ~
8264 The format for the present version of LyX is format 35.
8265 But each version of LyX is capable of reading earlier versions' layout
8266 files, just as they are capable of reading files produced by earlier versions
8268 There is, however, no provision for converting to earlier formats.
8271 \begin_layout Subsection
8272 \begin_inset CommandInset label
8274 name "sub:General-text-class"
8278 General text class parameters
8281 \begin_layout Standard
8282 These are general parameters that govern the behavior of an entire document
8288 mean that they must appear in
8289 \begin_inset Flex Code
8292 \begin_layout Plain Layout
8298 files rather than in modules.
8299 A module can contain any layout tag.)
8302 \begin_layout Description
8303 \begin_inset Flex Code
8306 \begin_layout Plain Layout
8312 Adds information that will be output in the
8313 \begin_inset Flex Code
8316 \begin_layout Plain Layout
8322 block when the document is output to XHTML.
8323 Typically, this would be used to output CSS style information, but it can
8324 be used for anything that can appear in
8325 \begin_inset Flex Code
8328 \begin_layout Plain Layout
8336 \begin_inset Quotes eld
8340 \begin_inset Flex Code
8343 \begin_layout Plain Layout
8350 \begin_inset Quotes erd
8356 \begin_layout Description
8357 \begin_inset Flex Code
8360 \begin_layout Plain Layout
8366 Adds information to the document preamble.
8368 \begin_inset Newline newline
8372 \begin_inset Quotes eld
8376 \begin_inset Flex Code
8379 \begin_layout Plain Layout
8386 \begin_inset Quotes erd
8392 \begin_layout Description
8393 \begin_inset Flex Code
8396 \begin_layout Plain Layout
8402 Defines formats for use in the display of bibliographic information.
8404 \begin_inset CommandInset ref
8406 reference "sub:Citation-format-description"
8412 \begin_inset Quotes eld
8416 \begin_inset Flex Code
8419 \begin_layout Plain Layout
8426 \begin_inset Quotes erd
8432 \begin_layout Description
8433 \begin_inset Flex Code
8436 \begin_layout Plain Layout
8442 Describes various global options supported by the document class.
8444 \begin_inset space ~
8448 \begin_inset CommandInset ref
8450 reference "sub:ClassOptions"
8456 \begin_inset Quotes eld
8460 \begin_inset Flex Code
8463 \begin_layout Plain Layout
8470 \begin_inset Quotes erd
8476 \begin_layout Description
8477 \begin_inset Flex Code
8480 \begin_layout Plain Layout
8487 \begin_inset Flex Code
8490 \begin_layout Plain Layout
8499 \begin_inset space \thinspace{}
8503 \begin_inset Flex Code
8506 \begin_layout Plain Layout
8512 ] Whether the class should
8516 to having one or two columns.
8517 Can be changed in the
8518 \begin_inset Flex MenuItem
8521 \begin_layout Plain Layout
8522 Document\SpecialChar \menuseparator
8531 \begin_layout Description
8532 \begin_inset Flex Code
8535 \begin_layout Plain Layout
8542 \begin_inset Flex Code
8545 \begin_layout Plain Layout
8551 ] This sequence defines the properties for a counter.
8552 If the counter does not yet exist, it is created; if it does exist, it
8555 \begin_inset Quotes eld
8559 \begin_inset Flex Code
8562 \begin_layout Plain Layout
8569 \begin_inset Quotes erd
8573 \begin_inset Newline newline
8577 \begin_inset space ~
8581 \begin_inset CommandInset ref
8583 reference "sub:Counters"
8587 for details on counters.
8590 \begin_layout Description
8591 \begin_inset Flex Code
8594 \begin_layout Plain Layout
8600 Sets the default font used to display the document.
8602 \begin_inset space ~
8606 \begin_inset CommandInset ref
8608 reference "sub:Font-description"
8612 for how to declare fonts.
8614 \begin_inset Quotes eld
8618 \begin_inset Flex Code
8621 \begin_layout Plain Layout
8628 \begin_inset Quotes erd
8634 \begin_layout Description
8635 \begin_inset Flex Code
8638 \begin_layout Plain Layout
8645 \begin_inset Flex Code
8648 \begin_layout Plain Layout
8654 ] Specifies a module to be included by default with this document class.
8655 The module is specified as filename without the
8656 \begin_inset Flex Code
8659 \begin_layout Plain Layout
8666 The user can still remove the module, but it will be active at the outset.
8667 (This applies only when new files are created, or when this class is chosen
8668 for an existing document.)
8671 \begin_layout Description
8672 \begin_inset Flex Code
8675 \begin_layout Plain Layout
8682 \begin_inset Flex Code
8685 \begin_layout Plain Layout
8691 ] This is the style that will be assigned to new paragraphs, usually
8692 \begin_inset Flex MenuItem
8695 \begin_layout Plain Layout
8702 This will default to the first defined style if not given, but you are
8703 encouraged to use this directive.
8706 \begin_layout Description
8707 \begin_inset Flex Code
8710 \begin_layout Plain Layout
8717 \begin_inset Flex Code
8720 \begin_layout Plain Layout
8726 ] This tag indicates that the module (which is specified by filename without
8728 \begin_inset Flex Code
8731 \begin_layout Plain Layout
8737 extension) cannot be used with this document class.
8738 This might be used in a journal-specific layout file to prevent, say, the
8740 \begin_inset Flex Code
8743 \begin_layout Plain Layout
8749 module that numbers theorems by section.
8754 be used in a module.
8755 Modules have their own way of excluding other modules (see section
8756 \begin_inset space ~
8760 \begin_inset CommandInset ref
8762 reference "sub:Layout-modules"
8769 \begin_layout Description
8770 \begin_inset Flex Code
8773 \begin_layout Plain Layout
8779 Defines a new float.
8781 \begin_inset space ~
8785 \begin_inset CommandInset ref
8787 reference "sub:Floats"
8793 \begin_inset Quotes eld
8797 \begin_inset Flex Code
8800 \begin_layout Plain Layout
8807 \begin_inset Quotes erd
8813 \begin_layout Description
8814 \begin_inset Flex Code
8817 \begin_layout Plain Layout
8823 Sets the information that will be output in the
8824 \begin_inset Flex Code
8827 \begin_layout Plain Layout
8833 block when this document class is output to XHTML.
8834 Note that this will completely override any prior
8835 \begin_inset Flex Code
8838 \begin_layout Plain Layout
8845 \begin_inset Flex Code
8848 \begin_layout Plain Layout
8856 \begin_inset Newline newline
8860 \begin_inset Flex Code
8863 \begin_layout Plain Layout
8869 if you just want to add material to the preamble.) Must end with
8870 \begin_inset Quotes eld
8874 \begin_inset Flex Code
8877 \begin_layout Plain Layout
8884 \begin_inset Quotes erd
8890 \begin_layout Description
8891 \begin_inset Flex Code
8894 \begin_layout Plain Layout
8901 \begin_inset Flex Code
8904 \begin_layout Plain Layout
8910 ] The style to use for the table of contents, bibliography, and so forth,
8911 when the document is output to HTML.
8912 For articles, this should normally be
8913 \begin_inset Flex Code
8916 \begin_layout Plain Layout
8923 \begin_inset Flex Code
8926 \begin_layout Plain Layout
8933 If it is not given, then LyX will attempt to figure out which layout to
8937 \begin_layout Description
8938 \begin_inset Flex Code
8941 \begin_layout Plain Layout
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8957 ] Modifies the properties of the given counter.
8958 If the counter does not exist, the statement is ignored.
8960 \begin_inset Quotes eld
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8974 \begin_inset Quotes erd
8978 \begin_inset Newline newline
8982 \begin_inset space ~
8986 \begin_inset CommandInset ref
8988 reference "sub:Counters"
8992 for details on counters.
8995 \begin_layout Description
8996 \begin_inset Flex Code
8999 \begin_layout Plain Layout
9006 \begin_inset Flex Code
9009 \begin_layout Plain Layout
9015 ] Modifies the properties of the given paragraph style.
9016 If the style does not exist, the statement is ignored.
9018 \begin_inset Quotes eld
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9032 \begin_inset Quotes erd
9038 \begin_layout Description
9039 \begin_inset Flex Code
9042 \begin_layout Plain Layout
9049 \begin_inset Flex Code
9052 \begin_layout Plain Layout
9058 ] This allows you to include another layout definition file within yours
9059 to avoid duplicating commands.
9060 Common examples are the standard layout files, for example,
9061 \begin_inset Flex Code
9064 \begin_layout Plain Layout
9070 , which contains most of the basic layouts.
9073 \begin_layout Description
9074 \begin_inset Flex Code
9077 \begin_layout Plain Layout
9084 \begin_inset Flex Code
9087 \begin_layout Plain Layout
9093 ] This section (re-)defines the layout of an inset.
9094 It can be applied to an existing inset or to a new, user-defined inset,
9095 e.g., a new character style.
9097 \begin_inset Quotes eld
9101 \begin_inset Flex Code
9104 \begin_layout Plain Layout
9111 \begin_inset Quotes erd
9115 \begin_inset Newline newline
9119 \begin_inset space ~
9123 \begin_inset CommandInset ref
9125 reference "sub:Flex-insets-and"
9129 for more information.
9133 \begin_layout Description
9134 \begin_inset Flex Code
9137 \begin_layout Plain Layout
9144 \begin_inset Flex Code
9147 \begin_layout Plain Layout
9153 ] A string that indicates the width of the left margin on the screen, for
9155 \begin_inset Quotes eld
9159 \begin_inset Flex Code
9162 \begin_layout Plain Layout
9169 \begin_inset Quotes erd
9173 (Note that this is not a `length', like
9174 \begin_inset Quotes eld
9178 \begin_inset Quotes erd
9184 \begin_layout Description
9185 \begin_inset Flex Code
9188 \begin_layout Plain Layout
9195 \begin_inset Flex Code
9198 \begin_layout Plain Layout
9204 ] Deletes an existing counter, usually one defined in an included file.
9207 \begin_layout Description
9208 \begin_inset Flex Code
9211 \begin_layout Plain Layout
9218 \begin_inset Flex Code
9221 \begin_layout Plain Layout
9227 ] Deletes an existing float.
9228 This is particularly useful when you want to suppress a float that has
9229 been defined in an input file.
9232 \begin_layout Description
9233 \begin_inset Flex Code
9236 \begin_layout Plain Layout
9243 \begin_inset Flex Code
9246 \begin_layout Plain Layout
9252 ] Deletes an existing style.
9255 \begin_layout Description
9256 \begin_inset Flex Code
9259 \begin_layout Plain Layout
9266 \begin_inset Flex Code
9269 \begin_layout Plain Layout
9275 ] The file format (as defined in the LyX preferences) produced by this document
9277 It is mainly useful when
9278 \begin_inset Flex Code
9281 \begin_layout Plain Layout
9288 \begin_inset Flex Code
9291 \begin_layout Plain Layout
9297 and one wants to define a new type of literate document.
9298 The format is reset to
9299 \begin_inset Quotes eld
9303 \begin_inset Flex Code
9306 \begin_layout Plain Layout
9313 \begin_inset Quotes erd
9317 \begin_inset Quotes eld
9321 \begin_inset Flex Code
9324 \begin_layout Plain Layout
9331 \begin_inset Quotes erd
9334 when the corresponding
9335 \begin_inset Flex Code
9338 \begin_layout Plain Layout
9344 parameter is encountered.
9347 \begin_layout Description
9348 \begin_inset Flex Code
9351 \begin_layout Plain Layout
9358 \begin_inset Flex Code
9361 \begin_layout Plain Layout
9372 \begin_inset Flex Code
9375 \begin_layout Plain Layout
9382 \begin_inset Flex Code
9385 \begin_layout Plain Layout
9391 ] Specifies what sort of output documents using this class will produce.
9394 \begin_layout Description
9395 \begin_inset Flex Code
9398 \begin_layout Plain Layout
9405 \begin_inset Flex Code
9408 \begin_layout Plain Layout
9417 \begin_inset Flex Code
9420 \begin_layout Plain Layout
9427 \begin_inset Flex Code
9430 \begin_layout Plain Layout
9436 ] The default pagestyle.
9437 Can be changed in the
9438 \begin_inset Flex MenuItem
9441 \begin_layout Plain Layout
9442 Document\SpecialChar \menuseparator
9451 \begin_layout Description
9452 \begin_inset Flex Code
9455 \begin_layout Plain Layout
9461 Sets the preamble for the LaTeX document.
9462 Note that this will completely override any prior
9463 \begin_inset Flex Code
9466 \begin_layout Plain Layout
9473 \begin_inset Flex Code
9476 \begin_layout Plain Layout
9484 \begin_inset Flex Code
9487 \begin_layout Plain Layout
9493 if you just want to add material to the preamble.) Must end with
9494 \begin_inset Quotes eld
9498 \begin_inset Flex Code
9501 \begin_layout Plain Layout
9508 \begin_inset Quotes erd
9514 \begin_layout Description
9515 \begin_inset Flex Code
9518 \begin_layout Plain Layout
9525 \begin_inset Flex Code
9528 \begin_layout Plain Layout
9535 \begin_inset Flex Code
9538 \begin_layout Plain Layout
9547 \begin_inset space \thinspace{}
9551 \begin_inset Flex Code
9554 \begin_layout Plain Layout
9560 ] Whether the class already provides the feature
9561 \begin_inset Flex Code
9564 \begin_layout Plain Layout
9571 A feature is in general the name of a package (e.
9572 \begin_inset space \thinspace{}
9576 \begin_inset space \space{}
9580 \begin_inset Flex Code
9583 \begin_layout Plain Layout
9590 \begin_inset Flex Code
9593 \begin_layout Plain Layout
9600 \begin_inset space \thinspace{}
9604 \begin_inset space \space{}
9608 \begin_inset Flex Code
9611 \begin_layout Plain Layout
9618 \begin_inset Flex Code
9621 \begin_layout Plain Layout
9629 \begin_inset space ~
9633 \begin_inset CommandInset ref
9635 reference "chap:List-of-functions"
9639 for the list of features.
9642 \begin_layout Description
9643 \begin_inset Flex Code
9646 \begin_layout Plain Layout
9653 \begin_inset Flex Code
9656 \begin_layout Plain Layout
9662 ] Indicates that this layout provides the functionality of the module mentioned,
9663 which should be specified by the filename without the
9664 \begin_inset Flex Code
9667 \begin_layout Plain Layout
9674 This will typically be used if the layout includes the module directly,
9675 rather than using the
9676 \begin_inset Flex Code
9679 \begin_layout Plain Layout
9685 tag to indicate that it ought to be used.
9686 It could also be used in a module that provided an alternate implementation
9687 of the same functionality.
9690 \begin_layout Description
9691 \begin_inset Flex Code
9694 \begin_layout Plain Layout
9701 \begin_inset Flex Code
9704 \begin_layout Plain Layout
9710 ] Whether the class requires the feature
9711 \begin_inset Flex Code
9714 \begin_layout Plain Layout
9721 Multiple features must be separated by commas.
9722 Note that you can only request supported features.
9724 \begin_inset space ~
9728 \begin_inset CommandInset ref
9730 reference "chap:List-of-functions"
9734 for the list of features.)
9737 \begin_layout Description
9738 \begin_inset Flex Code
9741 \begin_layout Plain Layout
9748 \begin_inset Flex Code
9751 \begin_layout Plain Layout
9757 ] A string that indicates the width of the right margin on the screen, for
9759 \begin_inset Quotes eld
9763 \begin_inset Flex Code
9766 \begin_layout Plain Layout
9773 \begin_inset Quotes erd
9779 \begin_layout Description
9780 \begin_inset Flex Code
9783 \begin_layout Plain Layout
9790 \begin_inset Flex Code
9793 \begin_layout Plain Layout
9799 ] Sets which divisions get numbered.
9801 \begin_inset Newline newline
9805 \begin_inset Flex Code
9808 \begin_layout Plain Layout
9817 \begin_layout Description
9818 \begin_inset Flex Code
9821 \begin_layout Plain Layout
9828 \begin_inset Flex Code
9831 \begin_layout Plain Layout
9840 \begin_inset space \thinspace{}
9844 \begin_inset Flex Code
9847 \begin_layout Plain Layout
9853 ] Whether the class-default should be printing on one or both sides of the
9855 Can be changed in the
9856 \begin_inset Flex MenuItem
9859 \begin_layout Plain Layout
9860 Document\SpecialChar \menuseparator
9869 \begin_layout Description
9870 \begin_inset Flex Code
9873 \begin_layout Plain Layout
9880 \begin_inset Flex Code
9883 \begin_layout Plain Layout
9889 ] This sequence defines a paragraph style.
9890 If the style does not yet exist, it is created; if it does exist, its parameter
9893 \begin_inset Quotes eld
9897 \begin_inset Flex Code
9900 \begin_layout Plain Layout
9907 \begin_inset Quotes erd
9911 \begin_inset Newline newline
9915 \begin_inset space ~
9919 \begin_inset CommandInset ref
9921 reference "sub:Paragraph-Styles"
9925 for details on paragraph styles.
9928 \begin_layout Description
9929 \begin_inset Flex Code
9932 \begin_layout Plain Layout
9939 \begin_inset Flex Code
9942 \begin_layout Plain Layout
9948 ] The name of the command or environment to be used with
9949 \begin_inset Flex Code
9952 \begin_layout Plain Layout
9961 \begin_layout Description
9962 \begin_inset Flex Code
9965 \begin_layout Plain Layout
9972 \begin_inset Flex Code
9975 \begin_layout Plain Layout
9984 \begin_inset Flex Code
9987 \begin_layout Plain Layout
9993 ] Indicates what kind of markup is used to define the title of a document.
9995 \begin_inset Flex Code
9998 \begin_layout Plain Layout
10004 means that the macro with name
10005 \begin_inset Flex Code
10008 \begin_layout Plain Layout
10014 will be inserted after the last layout which has
10015 \begin_inset Quotes eld
10019 \begin_inset Flex Code
10022 \begin_layout Plain Layout
10024 \begin_inset space ~
10033 \begin_inset Quotes erd
10038 \begin_inset Flex Code
10041 \begin_layout Plain Layout
10047 corresponds to the case where all layouts which have
10048 \begin_inset Quotes eld
10052 \begin_inset Flex Code
10055 \begin_layout Plain Layout
10057 \begin_inset space ~
10066 \begin_inset Quotes erd
10069 should be enclosed into the
10070 \begin_inset Flex Code
10073 \begin_layout Plain Layout
10082 \begin_layout Description
10083 \begin_inset Flex Code
10086 \begin_layout Plain Layout
10093 \begin_inset Flex Code
10096 \begin_layout Plain Layout
10102 ] Sets which divisions are included in the table of contents.
10104 \begin_inset Flex Code
10107 \begin_layout Plain Layout
10116 \begin_layout Subsection
10117 \begin_inset Flex Code
10120 \begin_layout Plain Layout
10127 \begin_inset CommandInset label
10129 name "sub:ClassOptions"
10136 \begin_layout Standard
10138 \begin_inset Flex Code
10141 \begin_layout Plain Layout
10147 section can contain the following entries:
10150 \begin_layout Description
10151 \begin_inset Flex Code
10154 \begin_layout Plain Layout
10161 \begin_inset Flex Code
10164 \begin_layout Plain Layout
10170 ] The list of available font sizes for the document's main font, separated
10172 \begin_inset Quotes eld
10176 \begin_inset Flex Code
10179 \begin_layout Plain Layout
10186 \begin_inset Quotes erd
10192 \begin_layout Description
10193 \begin_inset Flex Code
10196 \begin_layout Plain Layout
10202 Used to set the DTD line with XML-based output classes.
10204 \begin_inset space \thinspace{}
10208 \begin_inset Quotes eld
10211 -//OASIS//DTD DocBook V4.2//EN
10212 \begin_inset Quotes erd
10218 \begin_layout Description
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10229 \begin_inset Flex Code
10232 \begin_layout Plain Layout
10233 string="empty|plain|headings|fancy"
10238 ] The list of available page sty\SpecialChar \-
10240 \begin_inset Quotes eld
10244 \begin_inset Flex Code
10247 \begin_layout Plain Layout
10254 \begin_inset Quotes erd
10260 \begin_layout Description
10261 \begin_inset Flex Code
10264 \begin_layout Plain Layout
10271 \begin_inset Flex Code
10274 \begin_layout Plain Layout
10280 ] Some document class options, separated by a comma, that will be added
10281 to the optional part of the
10282 \begin_inset Flex Code
10285 \begin_layout Plain Layout
10296 \begin_layout Standard
10298 \begin_inset Flex Code
10301 \begin_layout Plain Layout
10307 section must end with
10308 \begin_inset Quotes eld
10312 \begin_inset Flex Code
10315 \begin_layout Plain Layout
10322 \begin_inset Quotes erd
10328 \begin_layout Subsection
10330 \begin_inset CommandInset label
10332 name "sub:Paragraph-Styles"
10339 \begin_layout Standard
10340 A paragraph style description looks like this:
10344 \begin_layout Plain Layout
10345 Note that this will either define a new style or modify an existing one.
10353 \begin_layout LyX-Code
10360 \begin_layout LyX-Code
10364 \begin_layout LyX-Code
10368 \begin_layout Standard
10369 where the following commands are allowed:
10372 \begin_layout Description
10373 \begin_inset Flex Code
10376 \begin_layout Plain Layout
10383 \begin_inset Flex Code
10386 \begin_layout Plain Layout
10391 , left, right, center
10396 ] Paragraph alignment.
10399 \begin_layout Description
10400 \begin_inset Flex Code
10403 \begin_layout Plain Layout
10410 \begin_inset Flex Code
10413 \begin_layout Plain Layout
10418 , left, right, center
10423 ] A comma separated list of permitted alignments.
10424 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10426 For example a right-aligned or centered enumeration isn't possible.)
10427 \change_inserted -712698321 1353679769
10431 \begin_layout Description
10433 \change_inserted -712698321 1353680268
10434 \begin_inset Flex Code
10437 \begin_layout Plain Layout
10439 \change_inserted -712698321 1353679781
10446 \begin_inset Flex Code
10449 \begin_layout Plain Layout
10451 \change_inserted -712698321 1353679772
10457 ] Defines argument number <int> of a command\SpecialChar \slash{}
10458 environment associated with
10460 This is useful for things like section headings, and only makes sense with
10462 Every (optional or required) argument of a command or environment -- except
10463 for the required argument that is associated with the content of the paragraph
10464 itself -- has a separate definition, where the number specifies the order
10466 The definition must end with
10467 \begin_inset Flex Code
10470 \begin_layout Plain Layout
10472 \change_inserted -712698321 1353680069
10479 So a command with two optional arguments has:
10483 \begin_layout Quote
10485 \change_inserted -712698321 1353680127
10491 \begin_layout Quote
10493 \change_inserted -712698321 1353680195
10499 \begin_layout Quote
10501 \change_inserted -712698321 1353680135
10507 \begin_layout Quote
10509 \change_inserted -712698321 1353680140
10515 \begin_layout Quote
10517 \change_inserted -712698321 1353680197
10523 \begin_layout Quote
10525 \change_inserted -712698321 1353680147
10531 \begin_layout Standard
10533 \change_inserted -712698321 1353680528
10535 \begin_inset Flex Code
10538 \begin_layout Plain Layout
10540 \change_inserted -712698321 1353680412
10546 definition, the following specifications are possible:
10549 \begin_layout Itemize
10551 \change_inserted -712698321 1355076779
10552 \begin_inset Flex Code
10555 \begin_layout Plain Layout
10557 \change_inserted -712698321 1353680543
10566 \begin_inset Flex Code
10569 \begin_layout Plain Layout
10571 \change_inserted -712698321 1353680567
10577 The string that will appear both in the menu (to insert this argument)
10578 and on the argument inset button (unless you also specify a separate
10579 \begin_inset Flex Code
10582 \begin_layout Plain Layout
10584 \change_inserted -712698321 1355076779
10591 For the menu, you can define an accelerator by appending the respective
10592 character to the string, divided by
10593 \begin_inset Quotes eld
10597 \begin_inset Quotes erd
10601 \begin_inset space \thinspace{}
10606 \begin_inset Flex Code
10609 \begin_layout Plain Layout
10611 \change_inserted -712698321 1353691482
10612 \begin_inset Quotes eld
10616 \begin_inset Quotes erd
10629 \begin_layout Itemize
10631 \change_inserted -712698321 1355076754
10632 \begin_inset Flex Code
10635 \begin_layout Plain Layout
10637 \change_inserted -712698321 1355076658
10644 \begin_inset Flex Code
10647 \begin_layout Plain Layout
10649 \change_inserted -712698321 1355076654
10655 A separate string for the menu.
10656 You can define an accelerator by appending the respective character to
10657 the string, divided by
10658 \begin_inset Quotes eld
10662 \begin_inset Quotes erd
10666 \begin_inset space \thinspace{}
10671 \begin_inset Flex Code
10674 \begin_layout Plain Layout
10676 \change_inserted -712698321 1355076654
10677 \begin_inset Quotes eld
10681 \begin_inset Quotes erd
10690 This specification is optional.
10691 If it is not given the
10692 \begin_inset Flex Code
10695 \begin_layout Plain Layout
10697 \change_inserted -712698321 1355076736
10705 will be used instead for the menu.
10708 \begin_layout Itemize
10710 \change_inserted -712698321 1353680665
10711 \begin_inset Flex Code
10714 \begin_layout Plain Layout
10716 \change_inserted -712698321 1353680616
10723 \begin_inset Flex Code
10726 \begin_layout Plain Layout
10728 \change_inserted -712698321 1353680623
10734 A longer explanatory text that appears in the tooltip when hovering over
10735 the argument inset.
10738 \begin_layout Itemize
10740 \change_inserted -712698321 1353680874
10741 \begin_inset Flex Code
10744 \begin_layout Plain Layout
10746 \change_inserted -712698321 1353680732
10753 \begin_inset Flex Code
10756 \begin_layout Plain Layout
10758 \change_inserted -712698321 1353680738
10764 Declare if this is a mandatory
10765 \change_inserted 2090807402 1353765594
10767 \change_inserted -712698321 1353680874
10769 \change_inserted 2090807402 1353765599
10771 \change_inserted -712698321 1353680874
10773 Mandatory arguments will be output empty if not given, while optional arguments
10774 will not be output at all.
10775 By default, mandatory arguments are delimited by
10776 \begin_inset Flex Code
10779 \begin_layout Plain Layout
10781 \change_inserted -712698321 1353680808
10789 , while optional arguments are delimited by
10790 \begin_inset Flex Code
10793 \begin_layout Plain Layout
10795 \change_inserted -712698321 1353680833
10804 \begin_layout Itemize
10806 \change_inserted -712698321 1353917199
10807 \begin_inset Flex Code
10810 \begin_layout Plain Layout
10812 \change_inserted -712698321 1353680879
10819 \begin_inset Flex Code
10822 \begin_layout Plain Layout
10824 \change_inserted -712698321 1353680874
10830 defines another argument (by its number) which this argument requires to
10831 be output if it is itself output.
10833 \begin_inset space \thinspace{}
10836 g., in LaTeX commands, optional arguments often require previous optional
10837 arguments to be output (at least empty), as in
10838 \begin_inset Flex Code
10841 \begin_layout Plain Layout
10843 \change_inserted -712698321 1353688183
10846 command[][arg]{text}
10854 This can be achieved by the statement
10855 \begin_inset Flex Code
10858 \begin_layout Plain Layout
10860 \change_inserted -712698321 1353681031
10869 \begin_inset Flex Code
10872 \begin_layout Plain Layout
10874 \change_inserted -712698321 1353681045
10885 \begin_layout Itemize
10887 \change_inserted -712698321 1354263104
10888 \begin_inset Flex Code
10891 \begin_layout Plain Layout
10893 \change_inserted -712698321 1353681072
10902 \begin_inset Flex Code
10905 \begin_layout Plain Layout
10907 \change_inserted -712698321 1353681067
10913 defines a custom left delimiter (instead of
10914 \begin_inset Flex Code
10917 \begin_layout Plain Layout
10919 \change_inserted -712698321 1353681127
10928 \begin_inset Flex Code
10931 \begin_layout Plain Layout
10933 \change_inserted -712698321 1353681133
10942 A line break in the output can be indicated by
10943 \begin_inset Flex Code
10946 \begin_layout Plain Layout
10948 \change_inserted -712698321 1354263104
10959 \begin_layout Itemize
10961 \change_inserted -712698321 1355144479
10962 \begin_inset Flex Code
10965 \begin_layout Plain Layout
10967 \change_inserted -712698321 1353681149
10974 \begin_inset Flex Code
10977 \begin_layout Plain Layout
10979 \change_inserted -712698321 1353681146
10985 defines a custom right delimiter (instead of
10986 \begin_inset Flex Code
10989 \begin_layout Plain Layout
10991 \change_inserted -712698321 1353681158
10998 \begin_inset Flex Code
11001 \begin_layout Plain Layout
11003 \change_inserted -712698321 1353681161
11010 A line break in the output can be indicated by
11011 \begin_inset Flex Code
11014 \begin_layout Plain Layout
11016 \change_inserted -712698321 1354263106
11025 \begin_layout Itemize
11027 \change_inserted -712698321 1355144578
11028 \begin_inset Flex Code
11031 \begin_layout Plain Layout
11033 \change_inserted -712698321 1355144487
11042 \begin_inset Flex Code
11045 \begin_layout Plain Layout
11047 \change_inserted -712698321 1355144500
11053 defines an argument that is inserted in any case (alone or in addition
11054 to user-specified arguments).
11055 Multiple arguments need to be separated by comma.
11060 \begin_layout Itemize
11062 \change_inserted -712698321 1353917320
11063 \begin_inset Flex Code
11066 \begin_layout Plain Layout
11068 \change_inserted -712698321 1353917320
11074 The font used for the argument content.
11076 \begin_inset space ~
11080 \begin_inset CommandInset ref
11082 reference "sub:Font-description"
11089 \begin_layout Itemize
11091 \change_inserted -712698321 1353917320
11092 \begin_inset Flex Code
11095 \begin_layout Plain Layout
11097 \change_inserted -712698321 1353917320
11103 The font used for the label.
11105 \begin_inset space ~
11109 \begin_inset CommandInset ref
11111 reference "sub:Font-description"
11118 \begin_layout Itemize
11120 \change_inserted -712698321 1355661048
11121 \begin_inset Flex Code
11124 \begin_layout Plain Layout
11126 \change_inserted -712698321 1353917320
11133 \begin_inset Flex Code
11136 \begin_layout Plain Layout
11138 \change_inserted -712698321 1353917320
11145 \begin_inset Flex Code
11148 \begin_layout Plain Layout
11150 \change_inserted -712698321 1353917320
11157 \begin_inset Flex Code
11160 \begin_layout Plain Layout
11162 \change_inserted -712698321 1353917320
11168 , describing the rendering style used for the inset's frame and buttons.
11170 \begin_inset Flex Code
11173 \begin_layout Plain Layout
11175 \change_inserted -712698321 1353917320
11184 \begin_layout Itemize
11186 \change_inserted -712698321 1355747298
11187 \begin_inset Flex Code
11190 \begin_layout Plain Layout
11192 \change_inserted -712698321 1355661057
11199 \begin_inset Flex Code
11202 \begin_layout Plain Layout
11204 \change_inserted -712698321 1355661049
11211 \begin_inset Flex Code
11214 \begin_layout Plain Layout
11216 \change_inserted -712698321 1355661077
11224 , this argument is automatically inserted when the respective style is selected.
11225 Currently, only one argument per style\SpecialChar \slash{}
11226 layout can be automatically inserted.
11227 \change_inserted 155139281 1354198988
11231 \begin_layout Standard
11233 \change_inserted -712698321 1356689813
11234 By default, the text entered in the LyX workarea in the respective layout
11235 is the last (mandatory) argument of a command if the
11236 \begin_inset Flex Code
11239 \begin_layout Plain Layout
11241 \change_inserted -712698321 1356689619
11250 \begin_inset Flex Code
11253 \begin_layout Plain Layout
11255 \change_inserted -712698321 1356689629
11264 However, arguments with the prefix
11265 \begin_inset Flex Code
11268 \begin_layout Plain Layout
11270 \change_inserted -712698321 1356689679
11278 are output after this workarea argument.
11279 Note that post-argument numbering restarts at 1, so the first argument
11280 following the workarea argument is
11281 \begin_inset Flex Code
11284 \begin_layout Plain Layout
11286 \change_inserted -712698321 1356689813
11295 Post-arguments are ignored in any other
11296 \begin_inset Flex Code
11299 \begin_layout Plain Layout
11301 \change_inserted -712698321 1356689801
11308 \begin_inset Flex Code
11311 \begin_layout Plain Layout
11313 \change_inserted -712698321 1356689801
11324 \begin_layout Standard
11326 \change_inserted 155139281 1354199102
11328 \begin_inset Flex Code
11331 \begin_layout Plain Layout
11333 \change_inserted 155139281 1354199013
11344 \begin_inset Flex Code
11347 \begin_layout Plain Layout
11349 \change_inserted 155139281 1354199102
11360 \begin_inset Flex Code
11363 \begin_layout Plain Layout
11365 \change_inserted 155139281 1354199044
11373 followed by the number (e.
11374 \begin_inset space \thinspace{}
11379 \begin_inset Flex Code
11382 \begin_layout Plain Layout
11384 \change_inserted 155139281 1354199064
11398 \begin_layout Description
11399 \begin_inset Flex Code
11402 \begin_layout Plain Layout
11408 Note that this will completely override any prior
11409 \begin_inset Flex Code
11412 \begin_layout Plain Layout
11418 declaration for this style.
11420 \begin_inset Quotes eld
11424 \begin_inset Flex Code
11427 \begin_layout Plain Layout
11434 \begin_inset Quotes erd
11439 \begin_inset space ~
11443 \begin_inset CommandInset ref
11445 reference "sub:I18n"
11449 for details on its use.
11452 \begin_layout Description
11453 \begin_inset Flex Code
11456 \begin_layout Plain Layout
11463 \begin_inset Flex Code
11466 \begin_layout Plain Layout
11476 \begin_layout Plain Layout
11477 Note that a `float' here is a real number, such as: 1.5.
11482 The vertical space with which the last of a chain of paragraphs with this
11483 style is separated from the following paragraph.
11484 If the next paragraph has another style, the separations are not simply
11485 added, but the maximum is taken.
11488 \begin_layout Description
11489 \begin_inset Flex Code
11492 \begin_layout Plain Layout
11499 \begin_inset Flex Code
11502 \begin_layout Plain Layout
11508 ] The category for this style.
11509 This is used to group related styles in the style combobox on the toolbar.
11510 Any string can be used, but you may want to use existing categories with
11515 \begin_layout Description
11516 \begin_inset Flex Code
11519 \begin_layout Plain Layout
11525 Depth of XML command.
11526 Used only with XML-type formats.
11529 \begin_layout Description
11530 \begin_inset Flex Code
11533 \begin_layout Plain Layout
11540 \begin_inset Flex Code
11543 \begin_layout Plain Layout
11549 ] Copies all the features of an existing style into the current one.
11553 \begin_layout Description
11554 \begin_inset Flex Code
11557 \begin_layout Plain Layout
11564 \begin_inset Flex Code
11567 \begin_layout Plain Layout
11573 ] The name of a style whose preamble should be output
11578 This allows to ensure some ordering of the preamble snippets when macros
11579 definitions depend on one another.
11583 \begin_layout Plain Layout
11584 Note that, besides that functionality, there is no way to ensure any ordering
11586 The ordering that you see in a given version of LyX may change without
11587 warning in later versions.
11595 \begin_layout Description
11596 \begin_inset Flex Code
11599 \begin_layout Plain Layout
11606 \begin_inset Flex Code
11609 \begin_layout Plain Layout
11614 , Box, Filled_Box, Static
11619 ] The type of label that stands at the end of the paragraph (or sequence
11621 \begin_inset Flex Code
11624 \begin_layout Plain Layout
11631 \begin_inset Newline newline
11635 \begin_inset Flex Code
11638 \begin_layout Plain Layout
11645 \begin_inset Flex Code
11648 \begin_layout Plain Layout
11655 \begin_inset Flex Code
11658 \begin_layout Plain Layout
11666 \begin_inset Flex Code
11669 \begin_layout Plain Layout
11676 \begin_inset Quotes eld
11680 \begin_inset Quotes erd
11684 \begin_inset Flex Code
11687 \begin_layout Plain Layout
11694 \begin_inset space \space{}
11698 \begin_inset Flex Code
11701 \begin_layout Plain Layout
11707 ) is a white (resp.
11708 \begin_inset space ~
11711 black) square suitable for end of proof markers,
11712 \begin_inset Flex Code
11715 \begin_layout Plain Layout
11721 is an explicit text string.
11724 \begin_layout Description
11725 \begin_inset Flex Code
11728 \begin_layout Plain Layout
11735 \begin_inset Flex Code
11738 \begin_layout Plain Layout
11744 ] The string used for a label with a
11745 \begin_inset Flex Code
11748 \begin_layout Plain Layout
11755 \begin_inset Newline newline
11759 \begin_inset Flex Code
11762 \begin_layout Plain Layout
11772 \begin_layout Description
11773 \begin_inset Flex Code
11776 \begin_layout Plain Layout
11782 The font used for both the text body
11788 \begin_inset space ~
11792 \begin_inset CommandInset ref
11794 reference "sub:Font-description"
11799 Note that defining this font automatically defines the
11800 \begin_inset Flex Code
11803 \begin_layout Plain Layout
11810 So you should define this one first if you also want to define
11811 \begin_inset Flex Code
11814 \begin_layout Plain Layout
11823 \begin_layout Description
11824 \begin_inset Flex Code
11827 \begin_layout Plain Layout
11834 \begin_inset Flex Code
11837 \begin_layout Plain Layout
11846 \begin_inset space \thinspace{}
11850 \begin_inset Flex Code
11853 \begin_layout Plain Layout
11859 ] Usually LyX does not allow you to insert more than one space between words,
11860 since a space is considered as the separation between two words, not a
11861 character or symbol of its own.
11862 This is a very fine thing but sometimes annoying, for example, when typing
11863 program code or plain LaTeX code.
11865 \begin_inset Flex Code
11868 \begin_layout Plain Layout
11875 Note that LyX will create protected blanks for the additional blanks when
11876 in another mode than LaTeX-mode.
11879 \begin_layout Description
11880 \begin_inset Flex Code
11883 \begin_layout Plain Layout
11889 These tags are used with XHTML output.
11891 \begin_inset CommandInset ref
11893 reference "sub:Paragraph-Style-XHTML"
11900 \begin_layout Description
11901 \begin_inset Flex Code
11904 \begin_layout Plain Layout
11910 [FIXME] (Used only with XML-type formats.)
11913 \begin_layout Description
11914 \begin_inset Flex Code
11917 \begin_layout Plain Layout
11924 \begin_inset Flex Code
11927 \begin_layout Plain Layout
11936 \begin_inset space \thinspace{}
11940 \begin_inset Flex Code
11943 \begin_layout Plain Layout
11950 \begin_inset Flex Code
11953 \begin_layout Plain Layout
11959 , marks the style as to be included in the document preamble and not in
11961 This is useful for document classes that want such information as the title
11962 and author to appear in the preamble.
11963 Note that this works only for styles for which the
11964 \begin_inset Flex Code
11967 \begin_layout Plain Layout
11974 \begin_inset Flex Code
11977 \begin_layout Plain Layout
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11996 \begin_layout Description
11997 \begin_inset Flex Code
12000 \begin_layout Plain Layout
12007 \begin_inset Flex Code
12010 \begin_layout Plain Layout
12019 \begin_inset space \thinspace{}
12023 \begin_inset Flex Code
12026 \begin_layout Plain Layout
12033 \begin_inset Flex Code
12036 \begin_layout Plain Layout
12042 , marks the style as being part of a title block (see also the
12043 \begin_inset Flex Code
12046 \begin_layout Plain Layout
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12065 \begin_layout Description
12067 \change_inserted -712698321 1355932296
12068 \begin_inset Flex Code
12071 \begin_layout Plain Layout
12073 \change_inserted -712698321 1355932178
12080 \begin_inset Flex Code
12083 \begin_layout Plain Layout
12085 \change_inserted -712698321 1355932181
12091 ] The LaTeX command sequence declaring an item in a list.
12092 The command is to be defined without the preceding backslash (the default
12094 \begin_inset Quotes eld
12098 \begin_inset Quotes erd
12102 \begin_inset Flex Code
12105 \begin_layout Plain Layout
12107 \change_inserted -712698321 1355932279
12117 in the LaTeX output).
12120 \begin_layout Description
12121 \begin_inset Flex Code
12124 \begin_layout Plain Layout
12131 \begin_inset Flex Code
12134 \begin_layout Plain Layout
12140 ] This provides extra space between paragraphs that have the same style.
12141 If you put other styles into an environment, each is separated with the
12143 \begin_inset Flex Code
12146 \begin_layout Plain Layout
12153 But the whole items of the environment are additionally separated with
12155 \begin_inset Flex Code
12158 \begin_layout Plain Layout
12165 Note that this is a
12170 \begin_layout Description
12171 \begin_inset Flex Code
12174 \begin_layout Plain Layout
12180 [FIXME] (Used only with XML-type formats.)
12183 \begin_layout Description
12184 \begin_inset Flex Code
12187 \begin_layout Plain Layout
12194 \begin_inset Flex Code
12197 \begin_layout Plain Layout
12206 \begin_inset space \thinspace{}
12210 \begin_inset Flex Code
12213 \begin_layout Plain Layout
12219 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12220 lead to empty LaTeX output.
12221 There are some cases where this could be desirable however: in a letter
12222 template, the required fields can be provided as empty fields, so that
12223 people do not forget them; in some special classes, a style can be used
12224 as some kind of break, which does not contain actual text.
12227 \begin_layout Description
12228 \begin_inset Flex Code
12231 \begin_layout Plain Layout
12238 \begin_inset Flex Code
12241 \begin_layout Plain Layout
12247 ] The vertical space between the label and the text body.
12248 Only used for labels that are above the text body (
12249 \begin_inset Flex Code
12252 \begin_layout Plain Layout
12259 \begin_inset Newline newline
12263 \begin_inset Flex Code
12266 \begin_layout Plain Layout
12267 Centered_Top_Environment
12275 \begin_layout Description
12276 \begin_inset Flex Code
12279 \begin_layout Plain Layout
12286 \begin_inset Flex Code
12289 \begin_layout Plain Layout
12295 ] The name of the counter for automatic numbering.
12297 \change_inserted 1414654397 1360434581
12298 In order to have the counter appear with your label, you will need to reference
12299 it in the LabelString.
12300 This will work with
12301 \begin_inset Flex Code
12304 \begin_layout Plain Layout
12306 \change_inserted 1414654397 1360434565
12315 \begin_inset Flex Code
12318 \begin_layout Plain Layout
12320 \change_inserted 1414654397 1360434569
12329 \begin_inset Flex Code
12332 \begin_layout Plain Layout
12334 \change_inserted 1414654397 1360434574
12343 \begin_inset Flex Code
12346 \begin_layout Plain Layout
12348 \change_inserted 1414654397 1360434578
12359 \begin_inset Newline newline
12363 \change_deleted 1414654397 1360434393
12369 \begin_inset Flex Code
12372 \begin_layout Plain Layout
12379 \begin_inset Flex Code
12382 \begin_layout Plain Layout
12389 In that case, the counter will be stepped each time the style appears.
12390 \begin_inset Newline newline
12400 \begin_inset Flex Code
12403 \begin_layout Plain Layout
12410 \begin_inset Flex Code
12413 \begin_layout Plain Layout
12419 , though this case is a bit complicated.
12420 Suppose you declare
12421 \begin_inset Quotes eld
12425 \begin_inset Flex Code
12428 \begin_layout Plain Layout
12429 LabelCounter myenum
12435 \begin_inset Quotes erd
12439 Then the actual counters used are
12440 \begin_inset Flex Code
12443 \begin_layout Plain Layout
12450 \begin_inset Flex Code
12453 \begin_layout Plain Layout
12460 \begin_inset Flex Code
12463 \begin_layout Plain Layout
12470 \begin_inset Flex Code
12473 \begin_layout Plain Layout
12479 , much as in LaTeX.
12480 These counters must all be declared separately.
12481 \begin_inset Newline newline
12485 \begin_inset CommandInset ref
12487 reference "sub:Counters"
12491 for details on counters.
12494 \begin_layout Description
12495 \begin_inset Flex Code
12498 \begin_layout Plain Layout
12504 The font used for the label.
12506 \begin_inset space ~
12510 \begin_inset CommandInset ref
12512 reference "sub:Font-description"
12519 \begin_layout Description
12520 \begin_inset Flex Code
12523 \begin_layout Plain Layout
12530 \begin_inset Flex Code
12533 \begin_layout Plain Layout
12539 ] Text that indicates how far a label should be indented.
12542 \begin_layout Description
12543 \begin_inset Flex Code
12546 \begin_layout Plain Layout
12553 \begin_inset Flex Code
12556 \begin_layout Plain Layout
12562 ] Text that indicates the amount of horizontal space between the label and
12564 Only used for labels that are not above the text body.
12567 \begin_layout Description
12568 \begin_inset Flex Code
12571 \begin_layout Plain Layout
12578 \begin_inset Flex Code
12581 \begin_layout Plain Layout
12587 ] The string used for
12588 \change_inserted 1414654397 1360434358
12590 \change_deleted 1414654397 1360434353
12595 \begin_inset Flex Code
12598 \begin_layout Plain Layout
12604 is set, this string can be contain the special formatting commands described
12606 \begin_inset CommandInset ref
12608 reference "sub:Counters"
12615 \begin_layout Description
12616 \begin_inset Flex Code
12619 \begin_layout Plain Layout
12620 LabelStringAppendix
12626 \begin_inset Flex Code
12629 \begin_layout Plain Layout
12635 ] This is used inside the appendix instead of
12636 \begin_inset Newline newline
12640 \begin_inset Flex Code
12643 \begin_layout Plain Layout
12651 \begin_inset Flex Code
12654 \begin_layout Plain Layout
12661 \begin_inset Newline newline
12665 \begin_inset Flex Code
12668 \begin_layout Plain Layout
12669 LabelStringAppendix
12677 \begin_layout Description
12678 \begin_inset Flex Code
12681 \begin_layout Plain Layout
12687 [FIXME] (Used only with XML-type formats.)
12690 \begin_layout Description
12691 \begin_inset Flex Code
12694 \begin_layout Plain Layout
12701 \begin_inset Flex Code
12704 \begin_layout Plain Layout
12710 \change_inserted 1414654397 1360434611
12712 \change_deleted 1414654397 1360434612
12716 \begin_inset Newline newline
12720 \change_inserted 1414654397 1360434627
12722 \change_deleted 1414654397 1360434623
12723 _Top_Environment, Counter,
12725 Sensitive, Enumerate,
12726 \begin_inset Newline newline
12729 Itemize, Bibliography
12738 \begin_layout Description
12739 \begin_inset Flex Code
12742 \begin_layout Plain Layout
12748 means the label is the very first word (up to the first real blank).
12749 Use protected spaces if you want more than one word as the label.
12753 \begin_layout Description
12754 \begin_inset Flex Code
12757 \begin_layout Plain Layout
12763 means the label is simply what is declared as
12764 \begin_inset Flex Code
12767 \begin_layout Plain Layout
12775 \change_deleted 1414654397 1360434660
12776 Note that this really is `static'.
12778 \change_inserted 1414654397 1360434794
12779 This will be displayed
12780 \begin_inset Quotes eld
12784 \begin_inset Quotes erd
12787 , at the beginning of the paragraph.
12789 \begin_inset Flex Code
12792 \begin_layout Plain Layout
12794 \change_inserted 1414654397 1360434743
12803 \begin_inset Flex Code
12806 \begin_layout Plain Layout
12808 \change_inserted 1414654397 1360434747
12816 , then it will be displayed only in the first paragraph in any sequence
12817 of paragraphs with the same
12818 \begin_inset Flex Code
12821 \begin_layout Plain Layout
12823 \change_inserted 1414654397 1360434794
12836 \begin_layout Description
12837 \begin_inset Flex Code
12840 \begin_layout Plain Layout
12842 \change_deleted 1414654397 1360434641
12844 \change_inserted 1414654397 1360434643
12853 \begin_inset space ~
12857 \begin_inset space ~
12861 \begin_inset Flex Code
12864 \begin_layout Plain Layout
12866 \change_deleted 1414654397 1360434649
12874 are special cases of
12875 \begin_inset Flex Code
12878 \begin_layout Plain Layout
12885 The label will be printed above the paragraph
12886 \change_inserted 1414654397 1360434839
12887 either at the beginning of the line or centered
12888 \change_deleted 1414654397 1360434813
12889 , but only at the top of an environment or the top of a chain of paragraphs
12891 This might be used with the
12892 \begin_inset Flex MenuItem
12895 \begin_layout Plain Layout
12906 \begin_layout Description
12907 \begin_inset Flex Code
12910 \begin_layout Plain Layout
12916 is a special case for the caption-labels
12917 \begin_inset Quotes eld
12921 \begin_inset Quotes erd
12925 \begin_inset Quotes eld
12929 \begin_inset Quotes erd
12933 \begin_inset Newline newline
12937 \begin_inset Flex Code
12940 \begin_layout Plain Layout
12946 means the (hardcoded) label string depends on the kind of float: It is
12947 hardcoded to be `FloatType N', where N is the value of the counter associated
12949 For the case that a caption is inserted outside of a float
12950 \change_inserted 1414654397 1360434861
12954 \begin_inset Flex Code
12957 \begin_layout Plain Layout
12964 \change_inserted 1414654397 1360434866
12966 \change_deleted 1414654397 1360434868
12967 should be set to e.
12968 \begin_inset space \thinspace{}
12972 \begin_inset space \space{}
12978 \begin_inset Quotes eld
12982 \begin_inset Quotes erd
12988 \begin_layout Description
12990 \change_deleted 1414654397 1360434875
12991 \begin_inset Flex Code
12994 \begin_layout Plain Layout
13000 defines automatically numbered labels.
13002 \begin_inset Flex Code
13005 \begin_layout Plain Layout
13011 will be expanded to contain any counters: So the result will for example
13013 \begin_inset Quotes eld
13017 \begin_inset Flex Code
13020 \begin_layout Plain Layout
13031 \begin_inset Quotes erd
13036 \begin_inset space ~
13040 \begin_inset CommandInset ref
13042 reference "sub:Counters"
13046 for more information on counters.
13049 \begin_layout Description
13050 \begin_inset Flex Code
13053 \begin_layout Plain Layout
13059 produces the usual sort of enumeration labels.
13060 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13061 small Roman numerals, and uppercase letters for the four possible depths.
13064 \begin_layout Description
13065 \begin_inset Flex Code
13068 \begin_layout Plain Layout
13074 produces various bullets at the different levels.
13075 It is also hardcoded.
13078 \begin_layout Description
13079 \begin_inset Flex Code
13082 \begin_layout Plain Layout
13089 \change_deleted 1414654397 1360434898
13090 is used internally by LyX and
13092 should be used only with
13093 \begin_inset Flex Code
13096 \begin_layout Plain Layout
13097 LatexType BibEnvironment
13106 \begin_layout Description
13107 \begin_inset Flex Code
13110 \begin_layout Plain Layout
13116 Note that this will completely override any prior
13117 \begin_inset Flex Code
13120 \begin_layout Plain Layout
13126 declaration for this style.
13128 \begin_inset Quotes eld
13132 \begin_inset Flex Code
13135 \begin_layout Plain Layout
13142 \begin_inset Quotes erd
13147 \begin_inset CommandInset ref
13149 reference "sub:I18n"
13153 for details on its use.
13156 \begin_layout Description
13157 \begin_inset Flex Code
13160 \begin_layout Plain Layout
13167 \begin_inset Flex Code
13170 \begin_layout Plain Layout
13176 ] The name of the corresponding LaTeX stuff.
13177 Either the environment or command name.
13180 \begin_layout Description
13181 \begin_inset Flex Code
13184 \begin_layout Plain Layout
13191 \begin_inset Flex Code
13194 \begin_layout Plain Layout
13200 ] An optional parameter for the corresponding
13201 \begin_inset Flex Code
13204 \begin_layout Plain Layout
13211 This parameter cannot be changed from within LyX
13212 \change_inserted -712698321 1355144804
13214 \begin_inset Flex Code
13217 \begin_layout Plain Layout
13219 \change_inserted -712698321 1355144804
13225 for customizable parameters)
13229 \change_inserted -712698321 1355144804
13230 This will be output as is after all LaTeX
13231 \begin_inset Flex Code
13234 \begin_layout Plain Layout
13236 \change_inserted -712698321 1355144658
13249 \begin_layout Description
13250 \begin_inset Flex Code
13253 \begin_layout Plain Layout
13260 \begin_inset Flex Code
13263 \begin_layout Plain Layout
13268 , Command, Environment, Item_Environment,
13269 \begin_inset Newline newline
13272 List_Environment, Bib_Environment
13277 ] How the style should be translated into LaTeX.
13281 \begin_layout Plain Layout
13282 \begin_inset Flex Code
13285 \begin_layout Plain Layout
13291 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13292 Visit the SGML class files for specific examples.
13301 \begin_layout Description
13302 \begin_inset Flex Code
13305 \begin_layout Plain Layout
13311 means nothing special.
13314 \begin_layout Description
13315 \begin_inset Flex Code
13318 \begin_layout Plain Layout
13325 \begin_inset Flex Code
13328 \begin_layout Plain Layout
13335 {\SpecialChar \ldots{}
13344 \begin_layout Description
13345 \begin_inset Flex Code
13348 \begin_layout Plain Layout
13355 \begin_inset Flex Code
13358 \begin_layout Plain Layout
13365 }\SpecialChar \ldots{}
13381 \begin_layout Description
13382 \begin_inset Flex Code
13385 \begin_layout Plain Layout
13392 \begin_inset Flex Code
13395 \begin_layout Plain Layout
13402 \begin_inset Flex Code
13405 \begin_layout Plain Layout
13413 is generated for each paragraph of this environment.
13417 \begin_layout Description
13418 \begin_inset Flex Code
13421 \begin_layout Plain Layout
13428 \begin_inset Flex Code
13431 \begin_layout Plain Layout
13438 \begin_inset Newline newline
13442 \begin_inset Flex Code
13445 \begin_layout Plain Layout
13451 is passed as an argument to the environment.
13452 \begin_inset Newline newline
13456 \begin_inset Flex Code
13459 \begin_layout Plain Layout
13465 can be defined in the
13466 \begin_inset Flex MenuItem
13469 \begin_layout Plain Layout
13470 Edit\SpecialChar \menuseparator
13472 \begin_inset space ~
13483 \begin_layout Description
13484 \begin_inset Flex Code
13487 \begin_layout Plain Layout
13494 \begin_inset Flex Code
13497 \begin_layout Plain Layout
13503 but adds additionally the necessary mandatory argument (the longest label)
13504 to the begin statement of the bibliography environment:
13505 \begin_inset Newline newline
13509 \begin_inset Flex Code
13512 \begin_layout Plain Layout
13515 begin{thebibliography}{99}
13520 It is therefore only useful for bibliography environments.
13521 The default longest label
13522 \begin_inset Quotes eld
13526 \begin_inset Quotes erd
13529 can be changed by the user in the paragraph settings of a bibliography
13533 \begin_layout Standard
13534 Putting the last few things together, the LaTeX output will be either:
13537 \begin_layout LyX-Code
13540 LatexName[LatexParam]{\SpecialChar \ldots{}
13544 \begin_layout Standard
13548 \begin_layout LyX-Code
13551 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13557 \begin_layout Standard
13558 depending upon the LaTeX type.
13562 \begin_layout Description
13564 \change_inserted -712698321 1354263086
13565 \begin_inset Flex Code
13568 \begin_layout Plain Layout
13570 \change_inserted -712698321 1353866852
13577 \begin_inset Flex Code
13580 \begin_layout Plain Layout
13582 \change_inserted -712698321 1353866852
13588 ] A string that is put at the beginning of the style content.
13589 A line break in the output can be indicated by
13590 \begin_inset Flex Code
13593 \begin_layout Plain Layout
13595 \change_inserted -712698321 1354263086
13606 \begin_layout Description
13607 \begin_inset Flex Code
13610 \begin_layout Plain Layout
13617 \begin_inset Flex Code
13620 \begin_layout Plain Layout
13626 ] If you put styles into environments, the different
13627 \begin_inset Flex Code
13630 \begin_layout Plain Layout
13636 are not simply added, but added with a factor
13637 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13641 Note that this parameter is also used when
13642 \begin_inset Flex Code
13645 \begin_layout Plain Layout
13652 \begin_inset Flex Code
13655 \begin_layout Plain Layout
13662 \begin_inset Flex Code
13665 \begin_layout Plain Layout
13672 Then it is added to the manual or dynamic margin.
13673 \begin_inset Newline newline
13677 \begin_inset Quotes eld
13681 \begin_inset Flex Code
13684 \begin_layout Plain Layout
13691 \begin_inset Quotes erd
13694 means that the paragraph is indented with the width of
13695 \begin_inset Quotes eld
13699 \begin_inset Flex Code
13702 \begin_layout Plain Layout
13709 \begin_inset Quotes erd
13712 in the normal font.
13713 You can get a negative width by prefixing the string with
13714 \begin_inset Quotes eld
13718 \begin_inset Flex Code
13721 \begin_layout Plain Layout
13728 \begin_inset Quotes erd
13732 This way was chosen so that the look is the same with each used screen
13736 \begin_layout Description
13737 \begin_inset Flex Code
13740 \begin_layout Plain Layout
13747 \begin_inset Flex Code
13750 \begin_layout Plain Layout
13755 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13761 \begin_inset Newline newline
13764 The kind of margin that the style has on the left side.
13768 \begin_layout Description
13769 \begin_inset Flex Code
13772 \begin_layout Plain Layout
13778 just means a fixed margin.
13781 \begin_layout Description
13782 \begin_inset Flex Code
13785 \begin_layout Plain Layout
13791 means that the left margin depends on the string entered in the
13792 \begin_inset Flex MenuItem
13795 \begin_layout Plain Layout
13796 Edit\SpecialChar \menuseparator
13798 \begin_inset space ~
13807 This is used to typeset nice lists without tabulators.
13810 \begin_layout Description
13811 \begin_inset Flex Code
13814 \begin_layout Plain Layout
13820 means that the margin depends on the size of the label.
13821 This is used for automatic enumerated headlines.
13822 It is obvious that the headline
13823 \begin_inset Quotes eld
13826 5.4.3.2.1 Very long headline
13827 \begin_inset Quotes erd
13830 must have a wider left margin (as wide as
13831 \begin_inset Quotes eld
13835 \begin_inset Quotes erd
13838 plus the space) than
13839 \begin_inset Quotes eld
13842 3.2 Very long headline
13843 \begin_inset Quotes erd
13847 \begin_inset Quotes eld
13851 \begin_inset Quotes erd
13854 are not able to do this.
13857 \begin_layout Description
13858 \begin_inset Flex Code
13861 \begin_layout Plain Layout
13867 is similar, but only the very first row of the paragraph is dynamic, while
13868 the others are static; this is used, for example, for descriptions.
13871 \begin_layout Description
13872 \begin_inset Flex Code
13875 \begin_layout Plain Layout
13881 means the margin is chosen in a way that the longest row of this paragraph
13882 fits to the right margin.
13883 This is used to typeset an address on the right edge of the page.
13887 \begin_layout Description
13888 \begin_inset Flex Code
13891 \begin_layout Plain Layout
13898 \begin_inset Flex Code
13901 \begin_layout Plain Layout
13910 \begin_inset space \thinspace{}
13914 \begin_inset Flex Code
13917 \begin_layout Plain Layout
13923 ] Whether fragile commands in this style should be
13924 \begin_inset Flex Code
13927 \begin_layout Plain Layout
13940 whether this command should itself be protected.)
13943 \begin_layout Description
13944 \begin_inset Flex Code
13947 \begin_layout Plain Layout
13954 \begin_inset Flex Code
13957 \begin_layout Plain Layout
13964 \begin_inset space \thinspace{}
13968 \begin_inset Flex Code
13971 \begin_layout Plain Layout
13979 ] Whether newlines are translated into LaTeX newlines (
13980 \begin_inset Flex Code
13983 \begin_layout Plain Layout
13994 The translation can be switched off to allow more comfortable LaTeX editing
13998 \begin_layout Description
13999 \begin_inset Flex Code
14002 \begin_layout Plain Layout
14009 \begin_inset Flex Code
14012 \begin_layout Plain Layout
14021 \begin_inset space \thinspace{}
14025 \begin_inset Flex Code
14028 \begin_layout Plain Layout
14034 ] If set to true, and if
14035 \begin_inset Flex Code
14038 \begin_layout Plain Layout
14045 \begin_inset Flex Code
14048 \begin_layout Plain Layout
14054 ) paragraphs are being indented, then the indentation of such a paragraph
14055 following one of this type will be suppressed.
14056 (So this will not affect the display of non-default paragraphs.)
14059 \begin_layout Description
14060 \begin_inset Flex Code
14063 \begin_layout Plain Layout
14070 \begin_inset Flex Code
14073 \begin_layout Plain Layout
14079 ] Name of a style that has replaced this style.
14080 This is used to rename a style, while keeping backward compatibility.
14083 \begin_layout Description
14085 \change_deleted -712698321 1353679722
14086 \begin_inset Flex Code
14089 \begin_layout Plain Layout
14096 \begin_inset Flex Code
14099 \begin_layout Plain Layout
14105 ] The number of optional arguments that can be used with this style.
14106 This is useful for things like section headings, and only makes sense with
14108 Note that, on output, the optional arguments will all precede any required
14109 arguments (see below).
14110 So one can have constructs like:
14114 \begin_layout LyX-Code
14116 \change_deleted -712698321 1353679722
14119 mycmd[opt1]{req1}{contents of paragraph}
14122 \begin_layout Standard
14124 \change_deleted -712698321 1353679722
14125 but one cannot have things like:
14128 \begin_layout LyX-Code
14130 \change_deleted -712698321 1353679722
14133 mycmd[opt1]{req1}[opt2]{contents of paragraph}
14136 \begin_layout Standard
14138 \change_deleted -712698321 1353679722
14139 at least, not without ERT (with which you can have anything).
14146 \begin_layout Description
14147 \begin_inset Flex Code
14150 \begin_layout Plain Layout
14157 \begin_inset Flex Code
14160 \begin_layout Plain Layout
14169 \begin_inset space \thinspace{}
14173 \begin_inset Flex Code
14176 \begin_layout Plain Layout
14182 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
14183 output, but only by a line break; together with
14184 \begin_inset Flex Code
14187 \begin_layout Plain Layout
14193 , this allows to emulate a plain text editor (like the ERT inset).
14196 \begin_layout Description
14197 \begin_inset Flex Code
14200 \begin_layout Plain Layout
14207 \begin_inset Flex Code
14210 \begin_layout Plain Layout
14216 ] The indent of the very first line of a paragraph.
14218 \begin_inset Newline newline
14222 \begin_inset Flex Code
14225 \begin_layout Plain Layout
14231 will be fixed for a certain style.
14232 The exception is the default style, since the indentation for these paragraphs
14233 can be prohibited with
14234 \begin_inset Flex Code
14237 \begin_layout Plain Layout
14245 \begin_inset Flex Code
14248 \begin_layout Plain Layout
14254 style paragraphs inside environments use the
14255 \begin_inset Flex Code
14258 \begin_layout Plain Layout
14264 of the environment, not their native one.
14266 \begin_inset Flex Code
14269 \begin_layout Plain Layout
14275 paragraphs inside an enumeration are not indented.
14278 \begin_layout Description
14279 \begin_inset Flex Code
14282 \begin_layout Plain Layout
14289 \begin_inset Flex Code
14292 \begin_layout Plain Layout
14298 ] The vertical space between two paragraphs of this style.
14301 \begin_layout Description
14302 \begin_inset Flex Code
14305 \begin_layout Plain Layout
14312 \begin_inset Flex Code
14315 \begin_layout Plain Layout
14321 ] LyX allows the user to choose either
14322 \begin_inset Quotes eld
14326 \begin_inset Quotes erd
14330 \begin_inset Quotes eld
14334 \begin_inset Quotes erd
14337 to separate paragraphs.
14339 \begin_inset Quotes eld
14343 \begin_inset Quotes erd
14347 \begin_inset Flex Code
14350 \begin_layout Plain Layout
14358 \begin_inset Quotes eld
14362 \begin_inset Quotes erd
14366 \begin_inset Flex Code
14369 \begin_layout Plain Layout
14375 is ignored and all paragraphs are separated by the
14376 \begin_inset Flex Code
14379 \begin_layout Plain Layout
14386 The vertical space is calculated with
14387 \begin_inset Flex Code
14390 \begin_layout Plain Layout
14392 \begin_inset space ~
14401 \begin_inset Flex Code
14404 \begin_layout Plain Layout
14410 is the height of a row with the normal font.
14411 This way, the look stays the same with different screen fonts.
14414 \begin_layout Description
14415 \begin_inset Flex Code
14418 \begin_layout Plain Layout
14425 \begin_inset Flex Code
14428 \begin_layout Plain Layout
14437 \begin_inset space \thinspace{}
14441 \begin_inset Flex Code
14444 \begin_layout Plain Layout
14450 ] Whether the contents of this paragraph should be output in raw form, meaning
14451 without special translations that LaTeX would require.
14454 \begin_layout Description
14455 \begin_inset Flex Code
14458 \begin_layout Plain Layout
14464 Information to be included in the LaTeX preamble when this style is used.
14465 Used to define macros, load packages, etc., required by this particular
14468 \begin_inset Quotes eld
14472 \begin_inset Flex Code
14475 \begin_layout Plain Layout
14482 \begin_inset Quotes erd
14488 \begin_layout Description
14489 \begin_inset Flex Code
14492 \begin_layout Plain Layout
14499 \begin_inset Flex Code
14502 \begin_layout Plain Layout
14508 ] The prefix to use when creating labels referring to paragraphs of this
14510 This allows the use of formatted references.
14513 \begin_layout Description
14515 \change_deleted -712698321 1353681258
14516 \begin_inset Flex Code
14519 \begin_layout Plain Layout
14526 \begin_inset Flex Code
14529 \begin_layout Plain Layout
14535 ] The number of required arguments that the LaTeX command or environment
14536 corresponding to this style expects.
14537 In the case of a command, these are required arguments
14541 that associated with the content of the paragraph itself.
14542 These do not actually have to be provided: LyX will output empty arguments
14544 Note that optional arguments will be output before required arguments.
14545 See the discussion of the
14546 \begin_inset Flex Code
14549 \begin_layout Plain Layout
14555 tag above for more information.
14560 \begin_layout Description
14561 \begin_inset Flex Code
14564 \begin_layout Plain Layout
14571 \begin_inset Flex Code
14574 \begin_layout Plain Layout
14580 ] Whether the style requires the feature
14581 \begin_inset Flex Code
14584 \begin_layout Plain Layout
14591 See the description of
14592 \begin_inset Flex Code
14595 \begin_layout Plain Layout
14602 \begin_inset space ~
14606 \begin_inset CommandInset ref
14608 reference "sub:General-text-class"
14612 ) for information on `features'.
14615 \begin_layout Description
14617 \change_inserted -712698321 1353693371
14618 \begin_inset Flex Code
14621 \begin_layout Plain Layout
14623 \change_inserted -712698321 1353693146
14632 \begin_inset Flex Code
14635 \begin_layout Plain Layout
14637 \change_inserted -712698321 1353693235
14646 \begin_inset Flex Code
14649 \begin_layout Plain Layout
14651 \change_inserted -712698321 1353693235
14657 ] Resets the LaTeX arguments of this style (as defined via the
14658 \begin_inset Flex Code
14661 \begin_layout Plain Layout
14663 \change_inserted -712698321 1353693371
14672 This is useful if you have copied a style via
14673 \begin_inset Flex Code
14676 \begin_layout Plain Layout
14678 \change_inserted -712698321 1353693302
14686 , but you do not want to inherit its (required and optional) arguments.
14691 \begin_layout Description
14693 \change_inserted -712698321 1354263074
14694 \begin_inset Flex Code
14697 \begin_layout Plain Layout
14699 \change_inserted -712698321 1353866876
14706 \begin_inset Flex Code
14709 \begin_layout Plain Layout
14711 \change_inserted -712698321 1353866873
14717 ] A string that is put at the end of the layout content.
14718 A line break in the output can be indicated by
14719 \begin_inset Flex Code
14722 \begin_layout Plain Layout
14724 \change_inserted -712698321 1354263069
14735 \begin_layout Description
14736 \begin_inset Flex Code
14739 \begin_layout Plain Layout
14746 \begin_inset Flex Code
14749 \begin_layout Plain Layout
14756 \begin_inset Flex Code
14759 \begin_layout Plain Layout
14768 \begin_layout Description
14769 \begin_inset Flex Code
14772 \begin_layout Plain Layout
14779 \begin_inset Flex Code
14782 \begin_layout Plain Layout
14791 \begin_inset Flex Code
14794 \begin_layout Plain Layout
14801 \begin_inset Flex Code
14804 \begin_layout Plain Layout
14811 \begin_inset Flex Code
14814 \begin_layout Plain Layout
14816 \begin_inset space ~
14824 ] This defines what the default spacing should be in the style.
14826 \begin_inset Flex Code
14829 \begin_layout Plain Layout
14836 \begin_inset Flex Code
14839 \begin_layout Plain Layout
14846 \begin_inset Flex Code
14849 \begin_layout Plain Layout
14855 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14856 If you specify the argument
14857 \begin_inset Flex Code
14860 \begin_layout Plain Layout
14866 , then you must also provide a value argument which will be the actual multiplie
14868 Note that, contrary to other parameters,
14869 \begin_inset Flex Code
14872 \begin_layout Plain Layout
14878 implies the generation of specific LaTeX code, using the LaTeX package
14882 \begin_inset Flex Code
14885 \begin_layout Plain Layout
14894 \begin_layout Description
14895 \begin_inset Flex Code
14898 \begin_layout Plain Layout
14905 \begin_inset Flex Code
14908 \begin_layout Plain Layout
14915 \begin_inset space \thinspace{}
14919 \begin_inset Flex Code
14922 \begin_layout Plain Layout
14930 ] Allow spell-checking paragraphs of this style.
14934 \begin_layout Description
14935 \begin_inset Flex Code
14938 \begin_layout Plain Layout
14944 The font used for the text body .
14946 \begin_inset CommandInset ref
14948 reference "sub:Font-description"
14955 \begin_layout Description
14956 \begin_inset Flex Code
14959 \begin_layout Plain Layout
14968 \begin_inset Flex Code
14971 \begin_layout Plain Layout
14981 The level of the style in the table of contents.
14982 This is used for automatic numbering of section headings.
14985 \begin_layout Description
14986 \begin_inset Flex Code
14989 \begin_layout Plain Layout
14996 \begin_inset Flex Code
14999 \begin_layout Plain Layout
15005 ] The vertical space with which the very first of a chain of paragraphs
15006 with this style is separated from the previous paragraph.
15007 If the previous paragraph has another style, the separations are not simply
15008 added, but the maximum is taken.
15011 \begin_layout Subsection
15012 \begin_inset CommandInset label
15018 Internationalization of Paragraph Styles
15021 \begin_layout Standard
15022 LyX has long supported internationalization of layout information, but,
15023 until version 2.0, this applied only to the user interface and not to, say,
15025 Thus, French authors were forced to resort to ugly hacks if they wanted
15030 1' instead of `Theorem 1'.
15031 Thanks to Georg Baum, that is no longer the case.
15034 \begin_layout Standard
15036 \begin_inset Flex Code
15039 \begin_layout Plain Layout
15045 defines text that is to appear in the typeset document, it may use
15046 \begin_inset Flex Code
15049 \begin_layout Plain Layout
15056 \begin_inset Flex Code
15059 \begin_layout Plain Layout
15065 to support non-English and even multi-language documents correctly.
15066 The following excerpt (from the
15067 \begin_inset Flex Code
15070 \begin_layout Plain Layout
15076 file) shows how this works:
15079 \begin_layout LyX-Code
15084 \begin_layout LyX-Code
15087 theoremstyle{remark}
15090 \begin_layout LyX-Code
15093 newtheorem{claim}[thm]{
15100 \begin_layout LyX-Code
15104 \begin_layout LyX-Code
15108 \begin_layout LyX-Code
15113 claimname}{_(Claim)}
15116 \begin_layout LyX-Code
15120 \begin_layout LyX-Code
15124 \begin_layout LyX-Code
15133 claimname}{_(Claim)}}
15136 \begin_layout LyX-Code
15141 \begin_layout Standard
15142 In principle, any legal LaTeX may appear in the
15143 \begin_inset Flex Code
15146 \begin_layout Plain Layout
15153 \begin_inset Flex Code
15156 \begin_layout Plain Layout
15162 tags, but in practice they will typically look as they do here.
15163 The key to correct translation of the typeset text is the definition of
15165 \begin_inset Flex Code
15168 \begin_layout Plain Layout
15177 \begin_inset Flex Code
15180 \begin_layout Plain Layout
15192 \begin_layout Standard
15194 \begin_inset Flex Code
15197 \begin_layout Plain Layout
15203 tag provides for internationalization based upon the overall language of
15205 The contents of the tag will be included in the preamble, just as with
15207 \begin_inset Flex Code
15210 \begin_layout Plain Layout
15217 What makes it special is the use of the
15218 \begin_inset Quotes eld
15222 \begin_inset Quotes erd
15226 \begin_inset Flex Code
15229 \begin_layout Plain Layout
15235 , which will be replaced, when LyX produces LaTeX output, with the translation
15236 of its argument into the document language.
15239 \begin_layout Standard
15241 \begin_inset Flex Code
15244 \begin_layout Plain Layout
15250 tag is more complex, since it is meant to provide support for multi-language
15251 documents and so offers an interface to the
15252 \begin_inset Flex Code
15255 \begin_layout Plain Layout
15262 Its contents will be added to the preamble once for each language that
15263 appears in the document.
15264 In this case, the argument to
15265 \begin_inset Flex Code
15268 \begin_layout Plain Layout
15274 will be replaced with its translation into the language in question; the
15276 \begin_inset Flex Code
15279 \begin_layout Plain Layout
15285 is replaced by the language name (as used by the babel package).
15288 \begin_layout Standard
15289 A German document that also included a French section would thus have the
15290 following in the preamble:
15293 \begin_layout LyX-Code
15302 claimname}{Affirmation}}
15303 \begin_inset Newline newline
15314 claimname}{Behauptung}}
15315 \begin_inset Newline newline
15322 claimname}{Behauptung}
15325 \begin_layout Standard
15327 \begin_inset Flex Code
15330 \begin_layout Plain Layout
15336 will then conspire to produce the correct text in the output.
15339 \begin_layout Standard
15340 One important point to note here is that the translations are provided by
15341 LyX itself, through the
15342 \change_inserted -195340706 1334775793
15344 \begin_inset Flex Code
15347 \begin_layout Plain Layout
15349 \change_inserted -195340706 1334775793
15356 \change_deleted -195340706 1334775793
15357 same mechanism it uses for internationalization of the user interface
15360 This means, in effect, that
15361 \begin_inset Flex Code
15364 \begin_layout Plain Layout
15371 \begin_inset Flex Code
15374 \begin_layout Plain Layout
15380 are really only of use in layout files that are provided with LyX, since
15381 text entered in user-created layout files will not be seen by LyX's internation
15383 \change_inserted -195340706 1334775793
15385 \begin_inset Flex Code
15388 \begin_layout Plain Layout
15390 \change_inserted -195340706 1334775793
15396 file is modified accordingly
15399 That said, however, any layout created with the intention that it will
15400 be included with LyX should use these tags where appropriate.
15402 \change_inserted -195340706 1334775793
15403 Please note that the paragraph style translations provided by LyX will
15404 never change with a minor update (e.g.
15405 from version 2.1.x to 2.1.y).
15406 It is however quite likely that a major update (e.g.
15407 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15412 \begin_layout Subsection
15414 \begin_inset CommandInset label
15423 \begin_layout Standard
15424 It is necessary to define the floats (
15425 \begin_inset Flex MenuItem
15428 \begin_layout Plain Layout
15435 \begin_inset Flex MenuItem
15438 \begin_layout Plain Layout
15444 , \SpecialChar \ldots{}
15445 ) in the text class itself.
15446 Standard floats are included in the file
15447 \begin_inset Flex Code
15450 \begin_layout Plain Layout
15456 , so you may have to do no more than add
15459 \begin_layout LyX-Code
15460 Input stdfloats.inc
15463 \begin_layout Standard
15464 to your layout file.
15465 If you want to implement a text class that proposes some other float types
15466 (like the AGU class bundled with LyX), the information below will hopefully
15470 \begin_layout Description
15471 \begin_inset Flex Code
15474 \begin_layout Plain Layout
15481 \begin_inset Flex Code
15484 \begin_layout Plain Layout
15491 \begin_inset Quotes erd
15495 \begin_inset Quotes erd
15498 ] The file name extension of an auxiliary file for the list of figures (or
15500 LaTeX writes the captions to this file.
15503 \begin_layout Description
15504 \begin_inset Flex Code
15507 \begin_layout Plain Layout
15514 \begin_inset Flex Code
15517 \begin_layout Plain Layout
15524 \begin_inset Quotes erd
15528 \begin_inset Quotes erd
15531 ] The string that will be used in the menus and also for the caption.
15532 This is translated to the current language if babel is used.
15535 \begin_layout Description
15536 \begin_inset Flex Code
15539 \begin_layout Plain Layout
15545 These tags control the XHTML output.
15547 \begin_inset space ~
15551 \begin_inset CommandInset ref
15553 reference "sec:Tags-for-XHTML"
15560 \begin_layout Description
15561 \begin_inset Flex Code
15564 \begin_layout Plain Layout
15573 \begin_inset Flex Code
15576 \begin_layout Plain Layout
15585 \begin_inset space \thinspace{}
15589 \begin_inset Flex Code
15592 \begin_layout Plain Layout
15598 ] Indicates whether the float is already defined in the document class or
15599 if instead the LaTeX package
15600 \begin_inset Flex Code
15603 \begin_layout Plain Layout
15609 needs to be loaded to define it on-the-fly.
15611 \begin_inset Flex Code
15614 \begin_layout Plain Layout
15621 \begin_inset Flex Code
15624 \begin_layout Plain Layout
15631 It should be set to
15632 \begin_inset Flex Code
15635 \begin_layout Plain Layout
15641 if the float is already defined by the LaTeX document class.
15644 \begin_layout Description
15645 \begin_inset Flex Code
15648 \begin_layout Plain Layout
15655 \begin_inset Flex Code
15658 \begin_layout Plain Layout
15665 \begin_inset Quotes erd
15669 \begin_inset Quotes erd
15672 ] The command used to generate a list of floats of this type; the leading
15681 \begin_inset Flex Code
15684 \begin_layout Plain Layout
15690 is false, since there is no standard way to generate this command.
15692 \begin_inset Flex Code
15695 \begin_layout Plain Layout
15701 is true, since in that case there is a standard way to define the command.
15704 \begin_layout Description
15705 \begin_inset Flex Code
15708 \begin_layout Plain Layout
15715 \begin_inset Flex Code
15718 \begin_layout Plain Layout
15725 \begin_inset Quotes erd
15729 \begin_inset Quotes erd
15732 ] A title for a list of floats of this kind (list of figures, tables, or
15734 It is used for the screen label within LyX, it is used by LaTeX for the
15735 title and it is used as the title in the XHTML output.
15736 It will be translated to the document language.
15739 \begin_layout Description
15740 \begin_inset Flex Code
15743 \begin_layout Plain Layout
15750 \begin_inset Flex Code
15753 \begin_layout Plain Layout
15760 \begin_inset Quotes erd
15764 \begin_inset Quotes erd
15767 ] This (optional) argument determines whether floats of this class will
15768 be numbered within some sectional unit of the document.
15770 \begin_inset Flex Code
15773 \begin_layout Plain Layout
15780 \begin_inset Quotes eld
15784 \begin_inset Flex Code
15787 \begin_layout Plain Layout
15794 \begin_inset Quotes erd
15797 , the floats will be numbered within chapters.
15801 \begin_layout Description
15802 \begin_inset Flex Code
15805 \begin_layout Plain Layout
15812 \begin_inset Flex Code
15815 \begin_layout Plain Layout
15822 \begin_inset Quotes erd
15826 \begin_inset Quotes erd
15829 ] The default placement for the given class of floats.
15830 The string should be as in standard LaTeX:
15831 \begin_inset Flex Code
15834 \begin_layout Plain Layout
15841 \begin_inset Flex Code
15844 \begin_layout Plain Layout
15851 \begin_inset Flex Code
15854 \begin_layout Plain Layout
15861 \begin_inset Flex Code
15864 \begin_layout Plain Layout
15870 for top, bottom, page, and here, respectively.
15874 \begin_layout Plain Layout
15875 Note that the order of these letters in the string is irrelevant, like in
15881 On top of that there is a new type,
15882 \begin_inset Flex Code
15885 \begin_layout Plain Layout
15891 , which does not really correspond to a float, since it means: put it
15892 \begin_inset Quotes eld
15896 \begin_inset Quotes erd
15900 Note however that the
15901 \begin_inset Flex Code
15904 \begin_layout Plain Layout
15910 specifier is special and, because of implementation details, cannot be
15911 used in non-built in float types.
15912 If you do not understand what this means, just use
15913 \begin_inset Quotes eld
15917 \begin_inset Flex Code
15920 \begin_layout Plain Layout
15927 \begin_inset Quotes erd
15933 \begin_layout Description
15934 \begin_inset Flex Code
15937 \begin_layout Plain Layout
15944 \begin_inset Flex Code
15947 \begin_layout Plain Layout
15953 ] The prefix to use when creating labels referring to floats of this type.
15954 This allows the use of formatted references.
15955 Note that you can remove any
15956 \begin_inset Flex Code
15959 \begin_layout Plain Layout
15965 set by a copied style by using the special value
15966 \begin_inset Quotes eld
15970 \begin_inset Quotes erd
15973 , which must be all caps.
15976 \begin_layout Description
15977 \begin_inset Flex Code
15980 \begin_layout Plain Layout
15987 \begin_inset Flex Code
15990 \begin_layout Plain Layout
15997 \begin_inset Quotes erd
16001 \begin_inset Quotes erd
16004 ] The style used when defining the float using
16005 \begin_inset Flex Code
16008 \begin_layout Plain Layout
16019 \begin_layout Description
16020 \begin_inset Flex Code
16023 \begin_layout Plain Layout
16030 \begin_inset Flex Code
16033 \begin_layout Plain Layout
16040 \begin_inset Quotes erd
16044 \begin_inset Quotes erd
16048 \begin_inset Quotes eld
16052 \begin_inset Quotes erd
16055 of the new class of floats, like program or algorithm.
16056 After the appropriate
16057 \begin_inset Flex Code
16060 \begin_layout Plain Layout
16069 \begin_inset Flex Code
16072 \begin_layout Plain Layout
16081 \begin_inset Flex Code
16084 \begin_layout Plain Layout
16095 \begin_layout Description
16096 \begin_inset Flex Code
16099 \begin_layout Plain Layout
16106 \begin_inset Flex Code
16109 \begin_layout Plain Layout
16116 \begin_inset space \thinspace{}
16120 \begin_inset Flex Code
16123 \begin_layout Plain Layout
16131 ] Specifies whether this float is defined using the LaTeX package
16132 \begin_inset Flex Code
16135 \begin_layout Plain Layout
16141 , either by the class file, another package or on-the-fly by LyX itself.
16144 \begin_layout Standard
16145 Note that defining a float with type
16146 \begin_inset Flex Code
16149 \begin_layout Plain Layout
16157 automatically defines the corresponding counter with name
16158 \begin_inset Flex Code
16161 \begin_layout Plain Layout
16172 \begin_layout Subsection
16173 Flex insets and InsetLayout
16174 \begin_inset CommandInset label
16176 name "sub:Flex-insets-and"
16183 \begin_layout Standard
16184 Flex insets come in three different kinds:
16187 \begin_layout Itemize
16189 \begin_inset Flex Code
16192 \begin_layout Plain Layout
16198 ): These define semantic markup corresponding to such LaTeX commands as
16200 \begin_inset Flex Code
16203 \begin_layout Plain Layout
16212 \begin_inset Flex Code
16215 \begin_layout Plain Layout
16226 \begin_layout Itemize
16228 \begin_inset Flex Code
16231 \begin_layout Plain Layout
16237 ): These can be used to define custom collapsible insets, similar to TeX
16238 code, footnote, and the like.
16239 An obvious example is an endnote inset, which is defined in the
16240 \begin_inset Flex Code
16243 \begin_layout Plain Layout
16252 \begin_layout Itemize
16254 \begin_inset Flex Code
16257 \begin_layout Plain Layout
16263 ): For use with DocBook classes.
16266 \begin_layout Standard
16267 Flex insets are defined using the
16268 \begin_inset Flex Code
16271 \begin_layout Plain Layout
16277 tag, which shall be explained in a moment.
16280 \begin_layout Standard
16282 \begin_inset Flex Code
16285 \begin_layout Plain Layout
16291 tag also serves another function: It can be used to customize the general
16292 layout of many different types of insets.
16294 \begin_inset Flex Code
16297 \begin_layout Plain Layout
16303 can be used to customize the layout parameters for footnotes, marginal
16304 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16305 boxes, tables, algorithms, URLs, and
16306 \change_deleted -712698321 1356964515
16308 \change_inserted -712698321 1356964516
16311 s, as well as to define Flex insets.
16314 \begin_layout Standard
16316 \begin_inset Flex Code
16319 \begin_layout Plain Layout
16325 definition must begin with a line of the form:
16328 \begin_layout LyX-Code
16332 \begin_layout Standard
16334 \begin_inset Flex Code
16337 \begin_layout Plain Layout
16343 indicates the inset whose layout is being defined, and here there are
16344 \change_deleted -712698321 1356964888
16346 \change_inserted -712698321 1356964888
16348 \change_deleted 5863208 1334489267
16354 \begin_layout Enumerate
16355 The layout for a pre-existing inset is being modified.
16356 In this case, can be
16357 \begin_inset Flex Code
16360 \begin_layout Plain Layout
16366 any one of the following:
16367 \begin_inset Flex Code
16370 \begin_layout Plain Layout
16377 \begin_inset Flex Code
16380 \begin_layout Plain Layout
16387 \begin_inset Flex Code
16390 \begin_layout Plain Layout
16397 \begin_inset Flex Code
16400 \begin_layout Plain Layout
16407 \change_inserted -712698321 1356964563
16409 \begin_inset Flex Code
16412 \begin_layout Plain Layout
16414 \change_inserted -712698321 1356964560
16425 \begin_inset Flex Code
16428 \begin_layout Plain Layout
16435 \begin_inset Flex Code
16438 \begin_layout Plain Layout
16445 \begin_inset Flex Code
16448 \begin_layout Plain Layout
16455 \begin_inset Flex Code
16458 \begin_layout Plain Layout
16465 \begin_inset Flex Code
16468 \begin_layout Plain Layout
16475 \begin_inset Flex Code
16478 \begin_layout Plain Layout
16485 \begin_inset Flex Code
16488 \begin_layout Plain Layout
16495 \begin_inset Flex Code
16498 \begin_layout Plain Layout
16505 \begin_inset Flex Code
16508 \begin_layout Plain Layout
16515 \begin_inset Flex Code
16518 \begin_layout Plain Layout
16525 \begin_inset Flex Code
16528 \begin_layout Plain Layout
16535 \begin_inset Flex Code
16538 \begin_layout Plain Layout
16545 \begin_inset Flex Code
16548 \begin_layout Plain Layout
16555 \change_deleted -712698321 1356964592
16557 \begin_inset Flex Code
16560 \begin_layout Plain Layout
16562 \change_deleted -712698321 1353866704
16566 \change_inserted -712698321 1353866707
16577 \begin_inset Flex Code
16580 \begin_layout Plain Layout
16587 \begin_inset Flex Code
16590 \begin_layout Plain Layout
16599 \begin_layout Enumerate
16600 The layout for a Flex inset is being defined.
16602 \begin_inset Flex Code
16605 \begin_layout Plain Layout
16611 must be of the form
16612 \begin_inset Quotes eld
16616 \begin_inset Flex Code
16619 \begin_layout Plain Layout
16626 \begin_inset Quotes erd
16630 \begin_inset Flex Code
16633 \begin_layout Plain Layout
16639 may be be any valid identifier not used by a pre-existing Flex inset.
16640 The identifier may include spaces, but in that case the whole thing must
16641 be wrapped in quotes.
16642 Note that the definition of a flex inset
16647 \begin_inset Flex Code
16650 \begin_layout Plain Layout
16656 entry, declaring which type of inset it defines.
16657 \change_inserted 5863208 1334489312
16661 \begin_layout Enumerate
16663 \change_inserted 5863208 1334492248
16664 The layout for user specific branch is being defined.
16666 \begin_inset Flex Code
16669 \begin_layout Plain Layout
16671 \change_inserted 5863208 1334489384
16677 must be of the form
16678 \begin_inset Quotes eld
16682 \begin_inset Flex Code
16685 \begin_layout Plain Layout
16687 \change_inserted 5863208 1334489392
16694 \begin_inset Quotes erd
16698 \begin_inset Flex Code
16701 \begin_layout Plain Layout
16703 \change_inserted 5863208 1334489384
16709 may be be any valid identifier of branch defined in user's document.
16710 The identifier may include spaces, but in that case the whole thing must
16711 be wrapped in quotes.
16712 The main purpose of this feature is to allow LaTeX wrapping around specific
16713 branches as user needs.
16714 \change_inserted -712698321 1356964893
16718 \begin_layout Enumerate
16720 \change_inserted -712698321 1356965125
16721 The layout of a user (or class) specific caption is being defined.
16723 \begin_inset Flex Code
16726 \begin_layout Plain Layout
16728 \change_inserted -712698321 1356964939
16734 must be of the form
16735 \begin_inset Quotes eld
16739 \begin_inset Flex Code
16742 \begin_layout Plain Layout
16744 \change_inserted -712698321 1356964943
16751 \begin_inset Quotes erd
16755 \begin_inset Flex Code
16758 \begin_layout Plain Layout
16760 \change_inserted -712698321 1356964939
16766 specifies the name of the caption as it appears in the menu.
16767 Have a look at the standard caption (
16768 \begin_inset Flex Code
16771 \begin_layout Plain Layout
16773 \change_inserted -712698321 1356964987
16779 ), the specific captions of the KOMA-Script classes (
16780 \begin_inset Flex Code
16783 \begin_layout Plain Layout
16785 \change_inserted -712698321 1356965018
16792 \begin_inset Flex Code
16795 \begin_layout Plain Layout
16797 \change_inserted -712698321 1356965021
16808 \begin_inset Flex Code
16811 \begin_layout Plain Layout
16813 \change_inserted -712698321 1356965045
16819 ) for applications.
16824 \begin_layout Standard
16826 \begin_inset Flex Code
16829 \begin_layout Plain Layout
16835 definition can contain the following entries:
16838 \begin_layout Description
16840 \change_inserted -712698321 1353681390
16841 \begin_inset Flex Code
16844 \begin_layout Plain Layout
16846 \change_inserted -712698321 1353681344
16853 \begin_inset Flex Code
16856 \begin_layout Plain Layout
16858 \change_inserted -712698321 1353681344
16864 ] Defines argument number <int> of a command\SpecialChar \slash{}
16865 environment associated with
16866 the current layout.
16867 The definition must end with
16868 \begin_inset Flex Code
16871 \begin_layout Plain Layout
16873 \change_inserted -712698321 1353681344
16881 \begin_inset space ~
16885 \begin_inset CommandInset ref
16887 reference "sub:Paragraph-Styles"
16894 \begin_layout Description
16896 \change_inserted -195340706 1333913893
16897 \begin_inset Flex Code
16900 \begin_layout Plain Layout
16906 Preamble for changing languages.
16908 \begin_inset space ~
16912 \begin_inset CommandInset ref
16914 reference "sub:I18n"
16921 \begin_layout Description
16922 \begin_inset Flex Code
16925 \begin_layout Plain Layout
16932 \begin_inset Flex Code
16935 \begin_layout Plain Layout
16941 ] The color for the inset's background.
16943 \begin_inset space ~
16947 \begin_inset CommandInset ref
16949 reference "chap:Names-of-colors"
16953 for a list of the available color names.
16956 \begin_layout Description
16957 \begin_inset Flex Code
16960 \begin_layout Plain Layout
16967 \begin_inset Flex Code
16970 \begin_layout Plain Layout
16979 \begin_inset space \thinspace{}
16983 \begin_inset Flex Code
16986 \begin_layout Plain Layout
16992 ] Whether to use the content of the inset as the label, when the inset is
16997 \begin_layout Description
16998 \begin_inset Flex Code
17001 \begin_layout Plain Layout
17008 \begin_inset Flex Code
17011 \begin_layout Plain Layout
17017 ] As with paragraph styles, see sec.
17018 \begin_inset space ~
17022 \begin_inset CommandInset ref
17024 reference "sub:Paragraph-Styles"
17029 Note that you need to specify the complete type, e.
17030 \begin_inset space \thinspace{}
17034 \begin_inset space ~
17038 \begin_inset Flex Code
17041 \begin_layout Plain Layout
17042 CopyStyle Flex:<name>
17050 \begin_layout Description
17051 \begin_inset Flex Code
17054 \begin_layout Plain Layout
17061 \begin_inset Flex Code
17064 \begin_layout Plain Layout
17073 \begin_inset space \thinspace{}
17077 \begin_inset Flex Code
17080 \begin_layout Plain Layout
17086 ] Indicates whether the user may employ the Paragraph Settings dialog to
17087 customize the paragraph.
17090 \begin_layout Description
17091 \begin_inset Flex Code
17094 \begin_layout Plain Layout
17101 \begin_inset Flex Code
17104 \begin_layout Plain Layout
17111 \begin_inset Flex Code
17114 \begin_layout Plain Layout
17121 \begin_inset Flex Code
17124 \begin_layout Plain Layout
17130 , describing the rendering style used for the inset's frame and buttons.
17131 Footnotes generally use
17132 \begin_inset Flex Code
17135 \begin_layout Plain Layout
17141 , ERT insets generally
17142 \begin_inset Flex Code
17145 \begin_layout Plain Layout
17151 , and character styles
17152 \begin_inset Flex Code
17155 \begin_layout Plain Layout
17164 \begin_layout Description
17165 \begin_inset Flex Code
17168 \begin_layout Plain Layout
17175 \begin_inset Flex Code
17178 \begin_layout Plain Layout
17187 \begin_inset space \thinspace{}
17193 \begin_inset Flex Code
17196 \begin_layout Plain Layout
17205 \begin_inset Flex Code
17208 \begin_layout Plain Layout
17215 \begin_inset Flex Code
17218 \begin_layout Plain Layout
17225 Indicates whether the environment will stand on its own in the output or
17226 will appear inline with the surrounding text.
17227 If set to false, it is supposed that the LaTeX environment ignores white
17228 space (including one newline character) after the
17229 \begin_inset Flex Code
17232 \begin_layout Plain Layout
17245 \begin_inset Flex Code
17248 \begin_layout Plain Layout
17264 \begin_layout Description
17265 \begin_inset Flex Code
17268 \begin_layout Plain Layout
17274 Required at the end of the
17275 \begin_inset Flex Code
17278 \begin_layout Plain Layout
17287 \begin_layout Description
17288 \begin_inset Flex Code
17291 \begin_layout Plain Layout
17297 The font used for both the text body
17303 \begin_inset space ~
17307 \begin_inset CommandInset ref
17309 reference "sub:Font-description"
17314 Note that defining this font automatically defines the
17315 \begin_inset Flex Code
17318 \begin_layout Plain Layout
17324 to the same value, so define this first and define
17325 \begin_inset Flex Code
17328 \begin_layout Plain Layout
17334 later if you want them to be different.
17335 \change_inserted 155139281 1354130923
17339 \begin_layout Description
17341 \change_inserted 155139281 1354130923
17342 \begin_inset Flex Code
17345 \begin_layout Plain Layout
17347 \change_inserted 155139281 1354130923
17348 ForceLocalFontSwitch
17354 \begin_inset Flex Code
17357 \begin_layout Plain Layout
17359 \change_inserted 155139281 1354130923
17368 \begin_inset Flex Code
17371 \begin_layout Plain Layout
17373 \change_inserted 155139281 1354130923
17379 ] When using babel, always use a local font switch (
17380 \begin_inset Flex Code
17383 \begin_layout Plain Layout
17385 \change_inserted 155139281 1354130923
17393 ), never a global one (such as
17394 \begin_inset Flex Code
17397 \begin_layout Plain Layout
17399 \change_inserted 155139281 1354130923
17412 \begin_layout Description
17413 \begin_inset Flex Code
17416 \begin_layout Plain Layout
17423 \begin_inset Flex Code
17426 \begin_layout Plain Layout
17435 \begin_inset space \thinspace{}
17439 \begin_inset Flex Code
17442 \begin_layout Plain Layout
17449 \begin_inset Quotes eld
17453 \begin_inset Quotes erd
17456 language, leading to Left-to-Right (Latin) output, e.
17457 \begin_inset space \thinspace{}
17461 \begin_inset space \space{}
17464 in TeX code or URL.
17468 \begin_layout Description
17469 \begin_inset Flex Code
17472 \begin_layout Plain Layout
17479 \begin_inset Flex Code
17482 \begin_layout Plain Layout
17491 \begin_inset space \thinspace{}
17495 \begin_inset Flex Code
17498 \begin_layout Plain Layout
17504 ] Indicates whether the
17505 \begin_inset Flex Code
17508 \begin_layout Plain Layout
17514 should be used or, instead, the user can change the paragraph style used
17519 \begin_layout Description
17520 \begin_inset Flex Code
17523 \begin_layout Plain Layout
17530 \begin_inset Flex Code
17533 \begin_layout Plain Layout
17542 \begin_inset space \thinspace{}
17546 \begin_inset Flex Code
17549 \begin_layout Plain Layout
17555 ] As with paragraph styles, see sec.
17556 \begin_inset space ~
17560 \begin_inset CommandInset ref
17562 reference "sub:Paragraph-Styles"
17569 \begin_layout Description
17570 \begin_inset Flex Code
17573 \begin_layout Plain Layout
17579 These tags control the XHTML output.
17581 \begin_inset space ~
17585 \begin_inset CommandInset ref
17587 reference "sec:Tags-for-XHTML"
17594 \begin_layout Description
17595 \begin_inset Flex Code
17598 \begin_layout Plain Layout
17605 \begin_inset Flex Code
17608 \begin_layout Plain Layout
17617 \begin_inset space \thinspace{}
17621 \begin_inset Flex Code
17624 \begin_layout Plain Layout
17630 ] Whether to include the contents of this inset in the strings generated
17631 for the `Outline' pane.
17632 One would not, for example, want the content of a footnote in a section
17633 header to be included in the TOC displayed in the outline, but one would
17634 normally want the content of a character style displayed.
17635 Default is false: not to include.
17638 \begin_layout Description
17639 \begin_inset Flex Code
17642 \begin_layout Plain Layout
17651 \begin_inset Flex Code
17654 \begin_layout Plain Layout
17663 \begin_inset space \thinspace{}
17667 \begin_inset Flex Code
17670 \begin_layout Plain Layout
17676 ] As with paragraph styles, see sec.
17677 \begin_inset space ~
17681 \begin_inset CommandInset ref
17683 reference "sub:Paragraph-Styles"
17690 \begin_layout Description
17691 \begin_inset Flex Code
17694 \begin_layout Plain Layout
17700 The font used for the label.
17702 \begin_inset space ~
17706 \begin_inset CommandInset ref
17708 reference "sub:Font-description"
17713 Note that this definition can never appear before
17714 \begin_inset Flex Code
17717 \begin_layout Plain Layout
17723 , lest it be ineffective.
17726 \begin_layout Description
17727 \begin_inset Flex Code
17730 \begin_layout Plain Layout
17737 \begin_inset Flex Code
17740 \begin_layout Plain Layout
17747 \begin_inset Quotes erd
17751 \begin_inset Quotes erd
17754 ] What will be displayed on the button or elsewhere as the inset label.
17756 \begin_inset Flex Code
17759 \begin_layout Plain Layout
17766 \begin_inset Flex Code
17769 \begin_layout Plain Layout
17775 ) modify this label on the fly.
17778 \begin_layout Description
17780 \change_inserted -195340706 1333913893
17781 \begin_inset Flex Code
17784 \begin_layout Plain Layout
17790 Language dependent preamble.
17792 \begin_inset space ~
17796 \begin_inset CommandInset ref
17798 reference "sub:I18n"
17805 \begin_layout Description
17806 \begin_inset Flex Code
17809 \begin_layout Plain Layout
17816 \begin_inset Flex Code
17819 \begin_layout Plain Layout
17825 ] The name of the corresponding LaTeX stuff.
17826 Either the environment or command name.
17829 \begin_layout Description
17830 \begin_inset Flex Code
17833 \begin_layout Plain Layout
17840 \begin_inset Flex Code
17843 \begin_layout Plain Layout
17849 ] The optional parameter for the corresponding
17850 \begin_inset Flex Code
17853 \begin_layout Plain Layout
17859 stuff, including possible bracket pairs like
17860 \begin_inset Flex Code
17863 \begin_layout Plain Layout
17871 \change_inserted -712698321 1355144715
17872 This will be output as is after all LaTeX
17873 \begin_inset Flex Code
17876 \begin_layout Plain Layout
17878 \change_inserted -712698321 1355144713
17887 This parameter cannot be changed from within LyX
17888 \change_inserted -712698321 1355144775
17890 \begin_inset Flex Code
17893 \begin_layout Plain Layout
17895 \change_inserted -712698321 1355144747
17901 for customizable parameters)
17906 \begin_layout Description
17907 \begin_inset Flex Code
17910 \begin_layout Plain Layout
17917 \begin_inset Flex Code
17920 \begin_layout Plain Layout
17922 \change_deleted -712698321 1353867544
17929 Command, Environment,
17930 \change_inserted -712698321 1353867573
17932 \change_deleted -712698321 1353867557
17941 \begin_inset Flex Code
17944 \begin_layout Plain Layout
17946 \change_deleted -712698321 1353867564
17950 \change_deleted -712698321 1353867569
17958 ] How the style should be translated into LaTeX.
17962 \begin_layout Plain Layout
17963 \begin_inset Flex Code
17966 \begin_layout Plain Layout
17972 is perhaps a bit misleading, since these rules apply to SGML classes, too.
17973 Visit the SGML class files for specific examples.
17982 \begin_layout Description
17983 \begin_inset Flex Code
17986 \begin_layout Plain Layout
17988 \change_deleted -712698321 1353867582
17990 \change_inserted -712698321 1353867583
17998 means nothing special.
18002 \begin_layout Description
18003 \begin_inset Flex Code
18006 \begin_layout Plain Layout
18013 \begin_inset Flex Code
18016 \begin_layout Plain Layout
18023 {\SpecialChar \ldots{}
18032 \begin_layout Description
18033 \begin_inset Flex Code
18036 \begin_layout Plain Layout
18043 \begin_inset Flex Code
18046 \begin_layout Plain Layout
18053 }\SpecialChar \ldots{}
18069 \begin_layout Description
18071 \change_deleted -712698321 1353867600
18072 \begin_inset Flex Code
18075 \begin_layout Plain Layout
18082 \begin_inset Flex Code
18085 \begin_layout Plain Layout
18092 \begin_inset Flex Code
18095 \begin_layout Plain Layout
18103 is generated for each paragraph of this environment.
18107 \begin_layout Description
18109 \change_deleted -712698321 1353867600
18110 \begin_inset Flex Code
18113 \begin_layout Plain Layout
18120 \begin_inset Flex Code
18123 \begin_layout Plain Layout
18130 \begin_inset Flex Code
18133 \begin_layout Plain Layout
18139 is passed as an argument to the environment.
18141 \begin_inset Flex Code
18144 \begin_layout Plain Layout
18150 can be defined in the
18151 \begin_inset Flex MenuItem
18154 \begin_layout Plain Layout
18159 \SpecialChar \menuseparator
18165 \begin_inset space ~
18179 \begin_layout Standard
18180 Putting the last few things together, the LaTeX output will be either:
18183 \begin_layout LyX-Code
18187 \change_deleted 2090807402 1356919073
18189 \change_inserted 2090807402 1356919073
18193 \change_deleted 2090807402 1356919073
18195 \change_inserted 2090807402 1356919002
18198 ]{\SpecialChar \ldots{}
18202 \begin_layout Standard
18206 \begin_layout LyX-Code
18210 \change_deleted 2090807402 1356919013
18212 \change_inserted 2090807402 1356919014
18216 \change_deleted 2090807402 1356919013
18218 \change_inserted 2090807402 1356919008
18221 ] \SpecialChar \ldots{}
18225 \change_deleted 2090807402 1356919016
18227 \change_inserted 2090807402 1356919016
18233 \begin_layout Standard
18234 depending upon the LaTeX type.
18238 \begin_layout Description
18240 \change_inserted -712698321 1354263128
18241 \begin_inset Flex Code
18244 \begin_layout Plain Layout
18246 \change_inserted -712698321 1353866742
18255 \begin_inset Flex Code
18258 \begin_layout Plain Layout
18260 \change_inserted -712698321 1353866752
18266 ] A string that is put at the beginning of the layout content.
18267 A line break in the output can be indicated by
18268 \begin_inset Flex Code
18271 \begin_layout Plain Layout
18273 \change_inserted -712698321 1354263128
18284 \begin_layout Description
18285 \begin_inset Flex Code
18288 \begin_layout Plain Layout
18295 \begin_inset Flex Code
18298 \begin_layout Plain Layout
18305 \begin_inset Flex Code
18308 \begin_layout Plain Layout
18315 \begin_inset Flex Code
18318 \begin_layout Plain Layout
18325 \begin_inset Flex Code
18328 \begin_layout Plain Layout
18334 (indicating a dummy definition ending definitions of charstyles, etc).
18335 This entry is required in and is only meaningful for Flex insets.
18336 Among other things, it determines on which menu this inset will appear.
18338 \begin_inset Flex Code
18341 \begin_layout Plain Layout
18348 \begin_inset Flex Code
18351 \begin_layout Plain Layout
18357 will automatically set
18358 \begin_inset Flex Code
18361 \begin_layout Plain Layout
18369 \begin_inset Flex Code
18372 \begin_layout Plain Layout
18378 can be set to true for
18379 \begin_inset Flex Code
18382 \begin_layout Plain Layout
18388 insets by setting it
18393 \begin_inset Flex Code
18396 \begin_layout Plain Layout
18405 \begin_layout Description
18406 \begin_inset Flex Code
18409 \begin_layout Plain Layout
18416 \begin_inset Flex Code
18419 \begin_layout Plain Layout
18428 \begin_inset space \thinspace{}
18432 \begin_inset Flex Code
18435 \begin_layout Plain Layout
18441 ] Whether multiple paragraphs are permitted in this inset.
18443 \begin_inset Flex Code
18446 \begin_layout Plain Layout
18452 to the same value and
18453 \begin_inset Flex Code
18456 \begin_layout Plain Layout
18462 to the opposite value.
18463 These can be reset to other values, if they are used
18468 \begin_inset Flex Code
18471 \begin_layout Plain Layout
18481 \begin_layout Description
18482 \begin_inset Flex Code
18485 \begin_layout Plain Layout
18492 \begin_inset Flex Code
18495 \begin_layout Plain Layout
18504 \begin_inset space \thinspace{}
18508 \begin_inset Flex Code
18511 \begin_layout Plain Layout
18517 ] Whether fragile commands in this inset should be
18518 \begin_inset Flex Code
18521 \begin_layout Plain Layout
18534 whether the command should itself be protected.) Default is false.
18535 \change_inserted 1414654397 1360681873
18539 \begin_layout Description
18541 \change_inserted 1414654397 1360681892
18542 \begin_inset Flex Code
18545 \begin_layout Plain Layout
18547 \change_inserted 1414654397 1360681880
18554 \begin_inset Flex Code
18557 \begin_layout Plain Layout
18559 \change_inserted 1414654397 1360681883
18565 ] Deletes an existing
18566 \begin_inset Flex Code
18569 \begin_layout Plain Layout
18571 \change_inserted 1414654397 1360681892
18582 \begin_layout Description
18583 \begin_inset Flex Code
18586 \begin_layout Plain Layout
18593 \begin_inset Flex Code
18596 \begin_layout Plain Layout
18605 \begin_inset space \thinspace{}
18609 \begin_inset Flex Code
18612 \begin_layout Plain Layout
18618 ] As with paragraph styles, see sec.
18619 \begin_inset space ~
18623 \begin_inset CommandInset ref
18625 reference "sub:Paragraph-Styles"
18633 \begin_layout Description
18634 \begin_inset Flex Code
18637 \begin_layout Plain Layout
18644 \begin_inset Flex Code
18647 \begin_layout Plain Layout
18656 \begin_inset space \thinspace{}
18660 \begin_inset Flex Code
18663 \begin_layout Plain Layout
18669 ] As with paragraph styles, see sec.
18670 \begin_inset space ~
18674 \begin_inset CommandInset ref
18676 reference "sub:Paragraph-Styles"
18684 \begin_layout Description
18685 \begin_inset Flex Code
18688 \begin_layout Plain Layout
18694 As with paragraph styles, see sec.
18695 \begin_inset space ~
18699 \begin_inset CommandInset ref
18701 reference "sub:Paragraph-Styles"
18708 \begin_layout Description
18709 \begin_inset Flex Code
18712 \begin_layout Plain Layout
18719 \begin_inset Flex Code
18722 \begin_layout Plain Layout
18728 ] The prefix to use when creating labels referring to insets of this type.
18729 This allows the use of formatted references.
18732 \begin_layout Description
18733 \begin_inset Flex Code
18736 \begin_layout Plain Layout
18743 \begin_inset Flex Code
18746 \begin_layout Plain Layout
18752 ] As with paragraph styles, see sec.
18753 \begin_inset space ~
18757 \begin_inset CommandInset ref
18759 reference "sub:Paragraph-Styles"
18764 \change_inserted -712698321 1354439699
18768 \begin_layout Description
18770 \change_inserted -712698321 1354439705
18771 \begin_inset Flex Code
18774 \begin_layout Plain Layout
18776 \change_inserted -712698321 1354439699
18783 \begin_inset Flex Code
18786 \begin_layout Plain Layout
18788 \change_inserted -712698321 1354439699
18797 \begin_inset Flex Code
18800 \begin_layout Plain Layout
18802 \change_inserted -712698321 1354439699
18808 ] Resets the LaTeX arguments of this layout (as defined via the
18809 \begin_inset Flex Code
18812 \begin_layout Plain Layout
18814 \change_inserted -712698321 1354439699
18821 This is useful if you have copied a style via
18822 \begin_inset Flex Code
18825 \begin_layout Plain Layout
18827 \change_inserted -712698321 1354439699
18833 , but you do not want to inherit its (required and optional) arguments.
18835 \change_deleted -712698321 1354439698
18841 \begin_layout Description
18842 \begin_inset Flex Code
18845 \begin_layout Plain Layout
18852 \begin_inset Flex Code
18855 \begin_layout Plain Layout
18862 \begin_inset space \thinspace{}
18866 \begin_inset Flex Code
18869 \begin_layout Plain Layout
18877 ] Whether this inset should use the font of its surrounding environment
18879 Default is true: uses its own.
18882 \begin_layout Description
18884 \change_inserted -712698321 1354263134
18885 \begin_inset Flex Code
18888 \begin_layout Plain Layout
18890 \change_inserted -712698321 1353866810
18897 \begin_inset Flex Code
18900 \begin_layout Plain Layout
18902 \change_inserted -712698321 1353866806
18908 ] A string that is put at the end of the layout content.
18909 A line break in the output can be indicated by
18910 \begin_inset Flex Code
18913 \begin_layout Plain Layout
18915 \change_inserted -712698321 1354263134
18926 \begin_layout Description
18927 \begin_inset Flex Code
18930 \begin_layout Plain Layout
18937 \begin_inset Flex Code
18940 \begin_layout Plain Layout
18947 \begin_inset space \thinspace{}
18951 \begin_inset Flex Code
18954 \begin_layout Plain Layout
18962 ] Allow spell-checking the contents of this inset.
18966 \begin_layout Subsection
18968 \begin_inset CommandInset label
18970 name "sub:Counters"
18977 \begin_layout Standard
18978 It is necessary to define the counters (
18979 \begin_inset Flex MenuItem
18982 \begin_layout Plain Layout
18989 \begin_inset Flex MenuItem
18992 \begin_layout Plain Layout
18998 , \SpecialChar \ldots{}
18999 ) in the text class itself.
19000 The standard counters are defined in the file
19001 \begin_inset Flex Code
19004 \begin_layout Plain Layout
19010 , so you may have to do no more than add
19013 \begin_layout LyX-Code
19014 Input stdcounters.inc
19017 \begin_layout Standard
19018 to your layout file to get them to work.
19019 But if you want to define custom counters, then you can do so.
19020 The counter declaration must begin with:
19023 \begin_layout LyX-Code
19024 Counter CounterName
19027 \begin_layout Standard
19029 \begin_inset Flex Code
19032 \begin_layout Plain Layout
19038 ' is replaced by the name of the counter.
19039 And it must end with
19040 \begin_inset Quotes eld
19044 \begin_inset Flex Code
19047 \begin_layout Plain Layout
19054 \begin_inset Quotes erd
19058 The following parameters can also be used:
19061 \begin_layout Description
19062 \begin_inset Flex Code
19065 \begin_layout Plain Layout
19072 \begin_inset Flex Code
19075 \begin_layout Plain Layout
19082 \begin_inset Quotes erd
19086 \begin_inset Quotes erd
19089 ] When defined, this string defines how the counter is displayed.
19090 Setting this value sets
19091 \begin_inset Flex Code
19094 \begin_layout Plain Layout
19095 LabelStringAppendix
19101 The following special constructs can be used in the string:
19105 \begin_layout Itemize
19106 \begin_inset Flex Code
19109 \begin_layout Plain Layout
19117 will be replaced by the expansion of the
19118 \begin_inset Flex Code
19121 \begin_layout Plain Layout
19128 \begin_inset Flex Code
19131 \begin_layout Plain Layout
19132 LabelStringAppendix
19138 \begin_inset Flex Code
19141 \begin_layout Plain Layout
19151 \begin_layout Itemize
19152 counter values can be expressed using LaTeX-like macros
19153 \begin_inset Newline newline
19157 \begin_inset Flex Code
19160 \begin_layout Plain Layout
19177 \begin_inset Flex Code
19180 \begin_layout Plain Layout
19192 \begin_layout Plain Layout
19202 Actually, the situation is a bit more complicated: any
19221 other than those described below will produce arabic numerals.
19222 It would not be surprising to see this change in the future.
19228 \begin_inset Flex Code
19231 \begin_layout Plain Layout
19237 : 1, 2, 3,\SpecialChar \ldots{}
19239 \begin_inset Flex Code
19242 \begin_layout Plain Layout
19248 for lower-case letters: a, b, c, \SpecialChar \ldots{}
19250 \begin_inset Flex Code
19253 \begin_layout Plain Layout
19259 for upper-case letters: A, B, C, \SpecialChar \ldots{}
19261 \begin_inset Flex Code
19264 \begin_layout Plain Layout
19270 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
19272 \begin_inset Flex Code
19275 \begin_layout Plain Layout
19281 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
19283 \begin_inset Flex Code
19286 \begin_layout Plain Layout
19292 for hebrew numerals.
19296 \begin_layout Standard
19297 If LabelString is not defined, a default value is constructed as follows:
19298 if the counter has a master counter
19299 \begin_inset Flex Code
19302 \begin_layout Plain Layout
19309 \begin_inset Flex Code
19312 \begin_layout Plain Layout
19319 \begin_inset Newline newline
19323 \begin_inset Flex Code
19326 \begin_layout Plain Layout
19336 is used; otherwise the string
19337 \begin_inset Flex Code
19340 \begin_layout Plain Layout
19351 \begin_layout Description
19352 \begin_inset Flex Code
19355 \begin_layout Plain Layout
19356 LabelStringAppendix
19362 \begin_inset Flex Code
19365 \begin_layout Plain Layout
19372 \begin_inset Quotes erd
19376 \begin_inset Quotes erd
19380 \begin_inset Flex Code
19383 \begin_layout Plain Layout
19389 , but for use in the Appendix.
19392 \begin_layout Description
19393 \begin_inset Flex Code
19396 \begin_layout Plain Layout
19403 \begin_inset Flex Code
19406 \begin_layout Plain Layout
19413 \begin_inset Quotes erd
19417 \begin_inset Quotes erd
19420 ] A format for use with formatted references to this counter.
19421 For example, one might want to have references to section numbers appear
19423 \begin_inset Quotes eld
19427 \begin_inset Quotes erd
19431 The string should contain
19432 \begin_inset Quotes eld
19436 \begin_inset Quotes erd
19440 This will be replaced by the counter number itself.
19441 So, for sections, it would be: Section ##.
19444 \begin_layout Description
19445 \begin_inset Flex Code
19448 \begin_layout Plain Layout
19455 \begin_inset Flex Code
19458 \begin_layout Plain Layout
19465 \begin_inset Quotes erd
19469 \begin_inset Quotes erd
19472 ] If this is set to the name of another counter, the present counter will
19473 be reset every time the other one is increased.
19475 \begin_inset Flex Code
19478 \begin_layout Plain Layout
19485 \begin_inset Flex Code
19488 \begin_layout Plain Layout
19497 \begin_layout Subsection
19499 \begin_inset CommandInset label
19501 name "sub:Font-description"
19508 \begin_layout Standard
19509 A font description looks like this:
19512 \begin_layout LyX-Code
19526 \begin_layout LyX-Code
19530 \begin_layout LyX-Code
19534 \begin_layout Standard
19535 The following commands are available:
19538 \begin_layout Description
19539 \begin_inset Flex Code
19542 \begin_layout Plain Layout
19549 \begin_inset Flex Code
19552 \begin_layout Plain Layout
19561 \begin_inset Flex Code
19564 \begin_layout Plain Layout
19571 \begin_inset Flex Code
19574 \begin_layout Plain Layout
19581 \begin_inset Flex Code
19584 \begin_layout Plain Layout
19591 \begin_inset Flex Code
19594 \begin_layout Plain Layout
19601 \begin_inset Flex Code
19604 \begin_layout Plain Layout
19611 \begin_inset Flex Code
19614 \begin_layout Plain Layout
19621 \begin_inset Flex Code
19624 \begin_layout Plain Layout
19631 \begin_inset Flex Code
19634 \begin_layout Plain Layout
19643 \begin_layout Description
19644 \begin_inset Flex Code
19647 \begin_layout Plain Layout
19654 \begin_inset Flex Code
19657 \begin_layout Plain Layout
19666 \begin_inset Flex Code
19669 \begin_layout Plain Layout
19676 \begin_inset Flex Code
19679 \begin_layout Plain Layout
19688 \begin_layout Description
19689 \begin_inset Flex Code
19692 \begin_layout Plain Layout
19699 \begin_inset Flex Code
19702 \begin_layout Plain Layout
19708 ] Valid arguments are:
19709 \begin_inset Flex Code
19712 \begin_layout Plain Layout
19719 \begin_inset Flex Code
19722 \begin_layout Plain Layout
19729 \begin_inset Flex Code
19732 \begin_layout Plain Layout
19739 \begin_inset Flex Code
19742 \begin_layout Plain Layout
19749 \begin_inset Flex Code
19752 \begin_layout Plain Layout
19759 \begin_inset Flex Code
19762 \begin_layout Plain Layout
19769 \begin_inset Flex Code
19772 \begin_layout Plain Layout
19779 \begin_inset Flex Code
19782 \begin_layout Plain Layout
19789 \begin_inset Flex Code
19792 \begin_layout Plain Layout
19799 \begin_inset Flex Code
19802 \begin_layout Plain Layout
19809 \begin_inset Flex Code
19812 \begin_layout Plain Layout
19819 \begin_inset Flex Code
19822 \begin_layout Plain Layout
19829 Each of these turns on or off the corresponding attribute.
19831 \begin_inset Flex Code
19834 \begin_layout Plain Layout
19840 turns on emphasis, and
19841 \begin_inset Flex Code
19844 \begin_layout Plain Layout
19852 \begin_inset Newline newline
19855 If the latter seems puzzling, remember that the font settings for the present
19856 context are generally inherited from the surrounding context.
19858 \begin_inset Flex Code
19861 \begin_layout Plain Layout
19867 would turn off the emphasis that was anyway in effect, say, in a theorem
19871 \begin_layout Description
19872 \begin_inset Flex Code
19875 \begin_layout Plain Layout
19882 \begin_inset Flex Code
19885 \begin_layout Plain Layout
19894 \begin_inset Flex Code
19897 \begin_layout Plain Layout
19906 \begin_layout Description
19907 \begin_inset Flex Code
19910 \begin_layout Plain Layout
19917 \begin_inset Flex Code
19920 \begin_layout Plain Layout
19929 \begin_inset Flex Code
19932 \begin_layout Plain Layout
19939 \begin_inset Flex Code
19942 \begin_layout Plain Layout
19949 \begin_inset Flex Code
19952 \begin_layout Plain Layout
19961 \begin_layout Description
19962 \begin_inset Flex Code
19965 \begin_layout Plain Layout
19972 \begin_inset Flex Code
19975 \begin_layout Plain Layout
19982 \begin_inset Flex Code
19985 \begin_layout Plain Layout
19992 \begin_inset Flex Code
19995 \begin_layout Plain Layout
20004 \begin_inset Flex Code
20007 \begin_layout Plain Layout
20014 \begin_inset Flex Code
20017 \begin_layout Plain Layout
20024 \begin_inset Flex Code
20027 \begin_layout Plain Layout
20034 \begin_inset Flex Code
20037 \begin_layout Plain Layout
20044 \begin_inset Flex Code
20047 \begin_layout Plain Layout
20056 \begin_layout Subsection
20057 \begin_inset CommandInset label
20059 name "sub:Citation-format-description"
20063 Citation format description
20066 \begin_layout Standard
20068 \begin_inset Flex Code
20071 \begin_layout Plain Layout
20077 blocks are used to describe how bibliographic information should be displayed,
20078 both within LyX itself (in the citation dialog and in tooltips, for example)
20079 and in XHTML output.
20080 Such a block might look like this:
20083 \begin_layout LyX-Code
20087 \begin_layout LyX-Code
20091 \begin_layout LyX-Code
20095 \begin_layout LyX-Code
20099 \begin_layout Standard
20100 The individual lines define how the bibliographic information associated
20101 with an article or book, respectively, is to be displayed, and such a definitio
20102 n can be given for any `entry type' that might be present in a BibTeX file.
20103 LyX defines a default format in the source code that will be used if no
20104 specific definition has been given.
20105 LyX predefines several formats in the file
20106 \begin_inset Flex Code
20109 \begin_layout Plain Layout
20115 , which is included in most of LyX's document classes.
20118 \begin_layout Standard
20119 The definitions use a simple language that allows BibTeX keys to be replaced
20121 Keys should be enclosed in
20122 \begin_inset Flex Code
20125 \begin_layout Plain Layout
20132 \begin_inset Flex Code
20135 \begin_layout Plain Layout
20142 So a simple definition might look like this:
20145 \begin_layout LyX-Code
20147 \begin_inset Quotes eld
20151 \begin_inset Quotes erd
20157 \begin_layout Standard
20158 This would print the author, followed by a comma, followed by the title,
20159 in quotes, followed by a period.
20162 \begin_layout Standard
20163 Of course, sometimes you may want to print a key only if it exists.
20164 This can be done by using a conditional construction, such as:
20165 \begin_inset Flex Code
20168 \begin_layout Plain Layout
20170 \begin_inset space ~
20180 \begin_inset Flex Code
20183 \begin_layout Plain Layout
20189 key exists, then print
20190 \begin_inset Quotes eld
20194 \begin_inset space ~
20198 \begin_inset Quotes erd
20201 followed by the volume key.
20202 It is also possible to have an else clause in the conditional, such as:
20203 \begin_inset Newline newline
20207 \begin_inset Flex Code
20210 \begin_layout Plain Layout
20211 {%author%[[%author%]][[%editor%, ed.]]}
20217 \begin_inset Newline newline
20221 \begin_inset Flex Code
20224 \begin_layout Plain Layout
20230 key is printed if it exists; otherwise, the editor key is printed, followed
20232 \begin_inset Quotes eld
20236 \begin_inset space ~
20240 \begin_inset Quotes erd
20243 Note that the key is again enclosed in
20244 \begin_inset Flex Code
20247 \begin_layout Plain Layout
20253 signs; the entire conditional is enclosed in braces; and the if and else
20254 clauses are enclosed in double brackets,
20255 \begin_inset Quotes eld
20259 \begin_inset Flex Code
20262 \begin_layout Plain Layout
20269 \begin_inset Quotes eld
20273 \begin_inset Quotes eld
20277 \begin_inset Flex Code
20280 \begin_layout Plain Layout
20287 \begin_inset Quotes erd
20291 There must be no space between any of these.
20294 \begin_layout Standard
20295 There is one other piece of syntax available in definitions, which looks
20297 \begin_inset Flex Code
20300 \begin_layout Plain Layout
20307 This defines a piece of formatting information that is to be used when
20309 \begin_inset Quotes eld
20313 \begin_inset Quotes erd
20317 Obviously, we do not want to output HTML tags when writing plain text,
20318 so they should be wrapped in
20319 \begin_inset Quotes eld
20323 \begin_inset Quotes erd
20327 \begin_inset Quotes eld
20331 \begin_inset Quotes erd
20337 \begin_layout Standard
20338 Two special sorts of definitions are also possible in a
20339 \begin_inset Flex Code
20342 \begin_layout Plain Layout
20349 An example of the first would be:
20352 \begin_layout LyX-Code
20354 \begin_inset Quotes eld
20358 \begin_inset Quotes erd
20364 \begin_layout Standard
20365 This is an abbreviation, or macro, and it can be used by treating it as
20367 \begin_inset Flex Code
20370 \begin_layout Plain Layout
20378 \begin_inset Flex Code
20381 \begin_layout Plain Layout
20387 exactly as it would treat its definition.
20388 So, let us issue the obvious
20396 \begin_layout LyX-Code
20400 \begin_layout Standard
20401 or anything like it.
20402 LyX shouldn't go into an infinite loop, but it may go into a long one before
20406 \begin_layout Standard
20407 The second sort of special definition might look like this:
20410 \begin_layout LyX-Code
20414 \begin_layout Standard
20415 This defines a translatable piece of text, which allows relevant parts of
20416 the bibliography to be translated.
20417 It can be included in a definition by treating it as a key:
20418 \begin_inset Flex Code
20421 \begin_layout Plain Layout
20428 Several of these are predefined in
20429 \begin_inset Flex Code
20432 \begin_layout Plain Layout
20439 Note that these are not macros, in the sense just defined.
20440 They will not be expanded.
20443 \begin_layout Standard
20444 So here then is an example that use all these features:
20445 \begin_inset VSpace defskip
20451 \begin_layout Standard
20455 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20458 \begin_layout Standard
20459 \begin_inset VSpace defskip
20462 This defines a macro that prints the author, followed by a comma, if the
20464 \begin_inset Flex Code
20467 \begin_layout Plain Layout
20473 key is defined, or else prints the name of the editor, followed by the
20475 \begin_inset Flex Code
20478 \begin_layout Plain Layout
20484 or its translation (it is by default
20485 \begin_inset Quotes eld
20489 \begin_inset Quotes erd
20493 \begin_inset Flex Code
20496 \begin_layout Plain Layout
20503 Note that this is in fact defined in
20504 \begin_inset Flex Code
20507 \begin_layout Plain Layout
20513 , so you can use it in your own definitions, or re-definitions, if you load
20517 \begin_layout Section
20518 \begin_inset CommandInset label
20520 name "sec:Tags-for-XHTML"
20524 Tags for XHTML output
20527 \begin_layout Standard
20528 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20529 by layout information.
20530 In general, LyX provides sensible defaults and, as mentioned earlier, it
20531 will even construct default CSS style rules from the other layout tags.
20532 For example, LyX will attempt to use the information provided in the
20533 \begin_inset Flex Code
20536 \begin_layout Plain Layout
20542 declaration for the Chapter style to write CSS that will appropriately
20543 format chapter headings.
20546 \begin_layout Standard
20547 In many cases, then, you may not have to do anything at all to get acceptable
20548 XHTML output for your own environments, custom insets, and so forth.
20549 But in some cases you will, and so LyX provides a number of layout tags
20550 that can be used to customize the XHTML and CSS that are generated.
20553 \begin_layout Standard
20554 Note that there are two tags,
20555 \begin_inset Flex Code
20558 \begin_layout Plain Layout
20565 \begin_inset Flex Code
20568 \begin_layout Plain Layout
20574 that may appear outside style and inset declarations.
20576 \begin_inset CommandInset ref
20578 reference "sub:General-text-class"
20582 for details on these.
20585 \begin_layout Subsection
20586 \begin_inset CommandInset label
20588 name "sub:Paragraph-Style-XHTML"
20595 \begin_layout Standard
20596 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20597 dealing with a normal paragraph, a command, or an environment, where this
20598 is itself determined by the contents of the corresponding
20599 \begin_inset Flex Code
20602 \begin_layout Plain Layout
20612 \begin_layout Standard
20613 For a command or normal paragraph, the output XHTML has the following form:
20616 \begin_layout LyX-Code
20618 \begin_inset Quotes erd
20622 \begin_inset Quotes erd
20628 \begin_layout LyX-Code
20630 \begin_inset Quotes erd
20634 \begin_inset Quotes erd
20640 \begin_layout LyX-Code
20641 Contents of the paragraph.
20644 \begin_layout LyX-Code
20648 \begin_layout Standard
20649 The label tags are of course omitted if the paragraph does not have a label.
20652 \begin_layout Standard
20653 For an environment that is not some sort of list, the XHTML takes this form:
20656 \begin_layout LyX-Code
20658 \begin_inset Quotes erd
20662 \begin_inset Quotes erd
20668 \begin_layout LyX-Code
20670 \begin_inset Quotes erd
20674 \begin_inset Quotes erd
20678 \begin_inset Quotes erd
20682 \begin_inset Quotes erd
20685 >Environment Label</labeltag>First paragraph.</itemtag>
20688 \begin_layout LyX-Code
20689 <itemtag>Second paragraph.</itemtag>
20692 \begin_layout LyX-Code
20696 \begin_layout Standard
20697 Note that the label is output only for the first paragraph, as it should
20698 be for a theorem, for example.
20702 \begin_layout Standard
20703 For a list, we have one of these forms:
20706 \begin_layout LyX-Code
20708 \begin_inset Quotes erd
20712 \begin_inset Quotes erd
20718 \begin_layout LyX-Code
20720 \begin_inset Quotes erd
20724 \begin_inset Quotes erd
20728 \begin_inset Quotes erd
20732 \begin_inset Quotes erd
20735 >List Label</labeltag>First item.</itemtag>
20738 \begin_layout LyX-Code
20740 \begin_inset Quotes erd
20744 \begin_inset Quotes erd
20748 \begin_inset Quotes erd
20752 \begin_inset Quotes erd
20755 >List Label</labeltag>Second item.</itemtag>
20758 \begin_layout LyX-Code
20762 \begin_layout LyX-Code
20766 \begin_layout LyX-Code
20768 \begin_inset Quotes erd
20772 \begin_inset Quotes erd
20778 \begin_layout LyX-Code
20780 \begin_inset Quotes erd
20784 \begin_inset Quotes erd
20787 >List Label</labeltag><itemtag attr=
20788 \begin_inset Quotes erd
20792 \begin_inset Quotes erd
20795 >First item.</itemtag>
20798 \begin_layout LyX-Code
20800 \begin_inset Quotes erd
20804 \begin_inset Quotes erd
20807 >List Label</labeltag><itemtag attr=
20808 \begin_inset Quotes erd
20812 \begin_inset Quotes erd
20815 >Second item.</itemtag>
20818 \begin_layout LyX-Code
20822 \begin_layout Standard
20823 Note the different orders of
20824 \begin_inset Flex Code
20827 \begin_layout Plain Layout
20834 \begin_inset Flex Code
20837 \begin_layout Plain Layout
20844 Which order we get depends upon the setting of
20845 \begin_inset Flex Code
20848 \begin_layout Plain Layout
20855 \begin_inset Flex Code
20858 \begin_layout Plain Layout
20864 is false (the default), you get the first of these, with the label within
20865 the item; if true, you get the second, with the label outside the item.
20868 \begin_layout Standard
20869 The specific tags and attributes output for each paragraph type can be controlle
20870 d by means of the layout tags we are about to describe.
20871 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20872 so you often may not need to do very much to get good XHTML output.
20873 Think of the available tags as there so you can tweak things to your liking.
20876 \begin_layout Description
20877 \begin_inset Flex Code
20880 \begin_layout Plain Layout
20887 \begin_inset Flex Code
20890 \begin_layout Plain Layout
20896 ] Specifies attribute information to be output with the main tag.
20898 \begin_inset Quotes eld
20902 \begin_inset Flex Code
20905 \begin_layout Plain Layout
20912 \begin_inset Quotes erd
20916 By default, LyX will output
20917 \begin_inset Quotes eld
20921 \begin_inset Flex Code
20924 \begin_layout Plain Layout
20931 \begin_inset Quotes erd
20935 \begin_inset Flex Code
20938 \begin_layout Plain Layout
20944 is the LyX name of the layout, made lowercase, for example: chapter.
20949 contain any style information.
20951 \begin_inset Flex Code
20954 \begin_layout Plain Layout
20963 \begin_layout Description
20964 \begin_inset Flex Code
20967 \begin_layout Plain Layout
20974 \begin_inset Flex Code
20977 \begin_layout Plain Layout
20987 ] Whether to output the default CSS information LyX generates for this layout,
20988 even if additional information is explicitly provided via
20989 \begin_inset Flex Code
20992 \begin_layout Plain Layout
21000 \begin_inset Flex Code
21003 \begin_layout Plain Layout
21009 allows you to alter or augment the generated CSS, rather than to override
21012 \begin_inset Flex Code
21015 \begin_layout Plain Layout
21024 \begin_layout Description
21025 \begin_inset Flex Code
21028 \begin_layout Plain Layout
21035 \begin_inset Flex Code
21038 \begin_layout Plain Layout
21044 ] The tag to be used for individual paragraphs of environments, replacing
21046 \begin_inset Flex Code
21049 \begin_layout Plain Layout
21055 in the examples above.
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21069 \begin_layout Description
21070 \begin_inset Flex Code
21073 \begin_layout Plain Layout
21080 \begin_inset Flex Code
21083 \begin_layout Plain Layout
21089 ] Attributes for the item tag.
21091 \begin_inset Quotes eld
21095 \begin_inset Flex Code
21098 \begin_layout Plain Layout
21099 class=`layoutname_item'
21105 \begin_inset Quotes erd
21113 contain any style information.
21115 \begin_inset Flex Code
21118 \begin_layout Plain Layout
21127 \begin_layout Description
21128 \begin_inset Flex Code
21131 \begin_layout Plain Layout
21138 \begin_inset Flex Code
21141 \begin_layout Plain Layout
21147 ] The tag to be used for paragraph and item labels, replacing
21148 \begin_inset Flex Code
21151 \begin_layout Plain Layout
21157 in the examples above.
21159 \begin_inset Flex Code
21162 \begin_layout Plain Layout
21169 \begin_inset Flex Code
21172 \begin_layout Plain Layout
21179 \begin_inset Flex Code
21182 \begin_layout Plain Layout
21189 \begin_inset Flex Code
21192 \begin_layout Plain Layout
21193 Centered_Top_Environment
21198 , in which case it defaults to
21199 \begin_inset Flex Code
21202 \begin_layout Plain Layout
21211 \begin_layout Description
21212 \begin_inset Flex Code
21215 \begin_layout Plain Layout
21222 \begin_inset Flex Code
21225 \begin_layout Plain Layout
21231 ] Attributes for the label tag.
21233 \begin_inset Quotes eld
21237 \begin_inset Flex Code
21240 \begin_layout Plain Layout
21241 class=`layoutname_label'
21247 \begin_inset Quotes erd
21255 contain any style information.
21257 \begin_inset Flex Code
21260 \begin_layout Plain Layout
21269 \begin_layout Description
21270 \begin_inset Flex Code
21273 \begin_layout Plain Layout
21280 \begin_inset Flex Code
21283 \begin_layout Plain Layout
21293 ] Meaningful only for list-like environments, this tag controls whether
21294 the label tag is output before or inside the item tag.
21295 This is used, for example, in the description environment, where we want
21297 \begin_inset Flex Code
21300 \begin_layout Plain Layout
21301 <dt>\SpecialChar \ldots{}
21302 </dt><dd>\SpecialChar \ldots{}
21310 \begin_inset Flex Code
21313 \begin_layout Plain Layout
21319 : The label tag is output inside the item tag.
21322 \begin_layout Description
21323 \begin_inset Flex Code
21326 \begin_layout Plain Layout
21332 Information to be output in the
21333 \begin_inset Flex Code
21336 \begin_layout Plain Layout
21342 section when this style is used.
21343 This might, for example, be used to include a
21344 \begin_inset Flex Code
21347 \begin_layout Plain Layout
21354 \begin_inset Flex Code
21357 \begin_layout Plain Layout
21366 \begin_layout Description
21367 \begin_inset Flex Code
21370 \begin_layout Plain Layout
21376 CSS style information to be included when this style is used.
21377 Note that this will automatically be wrapped in a layout-generated
21378 \begin_inset Flex Code
21381 \begin_layout Plain Layout
21387 block, so only the CSS itself need be included.
21390 \begin_layout Description
21391 \begin_inset Flex Code
21394 \begin_layout Plain Layout
21401 \begin_inset Flex Code
21404 \begin_layout Plain Layout
21410 ] The tag to be used for the main label, replacing
21411 \begin_inset Flex Code
21414 \begin_layout Plain Layout
21420 in the examples above.
21422 \begin_inset Flex Code
21425 \begin_layout Plain Layout
21434 \begin_layout Description
21435 \begin_inset Flex Code
21438 \begin_layout Plain Layout
21445 \begin_inset Flex Code
21448 \begin_layout Plain Layout
21458 ] Marks this style as the one to be used to generate the
21459 \begin_inset Flex Code
21462 \begin_layout Plain Layout
21468 tag for the XHTML file.
21469 By default, it is false.
21471 \begin_inset Flex Code
21474 \begin_layout Plain Layout
21480 file sets it to true for the
21481 \begin_inset Flex Code
21484 \begin_layout Plain Layout
21494 \begin_layout Subsection
21498 \begin_layout Standard
21499 The XHTML output of insets can also be controlled by information in layout
21504 \begin_layout Plain Layout
21505 At present, this is true only for
21506 \begin_inset Quotes eld
21510 \begin_inset Quotes erd
21513 insets (insets you can type into) and is not true for
21514 \begin_inset Quotes eld
21518 \begin_inset Quotes erd
21521 insets (insets that are associated with dialog boxes).
21526 Here, too, LyX tries to provide sensible defaults, and it constructs default
21528 But everything can be customized.
21531 \begin_layout Standard
21532 The XHTML LyX outputs for an inset has the following form:
21535 \begin_layout LyX-Code
21537 \begin_inset Quotes erd
21541 \begin_inset Quotes erd
21547 \begin_layout LyX-Code
21548 <labeltag>Label</labeltag>
21551 \begin_layout LyX-Code
21553 \begin_inset Quotes erd
21557 \begin_inset Quotes erd
21560 >Contents of the inset.</innertag>
21563 \begin_layout LyX-Code
21567 \begin_layout Standard
21568 If the inset permits multiple paragraphs---that is, if
21569 \begin_inset Flex Code
21572 \begin_layout Plain Layout
21578 is true---then the contents of the inset will itself be output as paragraphs
21579 formatted according to the styles used for those paragraphs (standard,
21580 quote, and the like).
21581 The label tag is of course omitted if the paragraph does not have a label
21582 and, at present, is always
21583 \begin_inset Flex Code
21586 \begin_layout Plain Layout
21593 The inner tag is optional and, by default, does not appear.
21596 \begin_layout Standard
21597 The specific tags and attributes output for each inset can be controlled
21598 by means of the following layout tags.
21601 \begin_layout Description
21602 \begin_inset Flex Code
21605 \begin_layout Plain Layout
21612 \begin_inset Flex Code
21615 \begin_layout Plain Layout
21621 ] Specifies attribute information to be output with the main tag.
21623 \begin_inset Quotes eld
21627 \begin_inset Flex Code
21630 \begin_layout Plain Layout
21631 class=`myinset' onclick=`\SpecialChar \ldots{}
21638 \begin_inset Quotes erd
21642 By default, LyX will output
21643 \begin_inset Quotes eld
21647 \begin_inset Flex Code
21650 \begin_layout Plain Layout
21657 \begin_inset Quotes erd
21661 \begin_inset Flex Code
21664 \begin_layout Plain Layout
21670 is the LyX name of the inset, made lowercase and with non-alphanumeric
21671 characters converted to underscores, for example: footnote.
21674 \begin_layout Description
21675 \begin_inset Flex Code
21678 \begin_layout Plain Layout
21685 \begin_inset Flex Code
21688 \begin_layout Plain Layout
21698 ] Whether to output the default CSS information LyX generates for this layout,
21699 even if additional information is explicitly provided via
21700 \begin_inset Flex Code
21703 \begin_layout Plain Layout
21711 \begin_inset Flex Code
21714 \begin_layout Plain Layout
21720 allows you to alter or augment the generated CSS, rather than to override
21725 \begin_layout Description
21726 \begin_inset Flex Code
21729 \begin_layout Plain Layout
21736 \begin_inset Flex Code
21739 \begin_layout Plain Layout
21745 ] Attributes for the inner tag.
21747 \begin_inset Quotes eld
21751 \begin_inset Flex Code
21754 \begin_layout Plain Layout
21755 class=`insetname_inner'
21761 \begin_inset Quotes erd
21767 \begin_layout Description
21768 \begin_inset Flex Code
21771 \begin_layout Plain Layout
21778 \begin_inset Flex Code
21781 \begin_layout Plain Layout
21787 ] The inner tag, replacing
21788 \begin_inset Flex Code
21791 \begin_layout Plain Layout
21797 in the examples above.
21798 By default, there is none.
21801 \begin_layout Description
21802 \begin_inset Flex Code
21805 \begin_layout Plain Layout
21812 \begin_inset Flex Code
21815 \begin_layout Plain Layout
21823 ] Whether this inset represents a standalone block of text (such as a footnote)
21824 or instead represents material that is included in the surrounding text
21825 (such as a branch).
21829 \begin_layout Description
21830 \begin_inset Flex Code
21833 \begin_layout Plain Layout
21840 \begin_inset Flex Code
21843 \begin_layout Plain Layout
21849 ] A label for this inset, possibly including a reference to a counter.
21850 For example, for footnote, it might be:
21851 \begin_inset Flex Code
21854 \begin_layout Plain Layout
21863 This is optional, and there is no default.
21866 \begin_layout Description
21867 \begin_inset Flex Code
21870 \begin_layout Plain Layout
21876 Information to be output in the
21877 \begin_inset Flex Code
21880 \begin_layout Plain Layout
21886 section when this style is used.
21887 This might, for example, be used to include a
21888 \begin_inset Flex Code
21891 \begin_layout Plain Layout
21898 \begin_inset Flex Code
21901 \begin_layout Plain Layout
21910 \begin_layout Description
21911 \begin_inset Flex Code
21914 \begin_layout Plain Layout
21920 CSS style information to be included when this style is used.
21921 Note that this will automatically be wrapped in a layout-generated
21922 \begin_inset Flex Code
21925 \begin_layout Plain Layout
21931 block, so only the CSS itself need be included.
21934 \begin_layout Description
21935 \begin_inset Flex Code
21938 \begin_layout Plain Layout
21945 \begin_inset Flex Code
21948 \begin_layout Plain Layout
21954 ] The tag to be used for the main label, replacing
21955 \begin_inset Flex Code
21958 \begin_layout Plain Layout
21964 in the examples above.
21965 The default depends upon the setting of
21966 \begin_inset Flex Code
21969 \begin_layout Plain Layout
21976 \begin_inset Flex Code
21979 \begin_layout Plain Layout
21985 is true, the default is
21986 \begin_inset Flex Code
21989 \begin_layout Plain Layout
21995 ; if it is false, the default is
21996 \begin_inset Flex Code
21999 \begin_layout Plain Layout
22008 \begin_layout Subsection
22012 \begin_layout Standard
22013 The XHTML output for floats too can be controlled by layout information.
22014 The output has the following form:
22017 \begin_layout LyX-Code
22019 \begin_inset Quotes erd
22023 \begin_inset Quotes erd
22029 \begin_layout LyX-Code
22030 Contents of the float.
22033 \begin_layout LyX-Code
22037 \begin_layout Standard
22038 The caption, if there is one, is a separate inset and will be output as
22040 Its appearance can be controlled via the InsetLayout for caption insets.
22044 \begin_layout Description
22045 \begin_inset Flex Code
22048 \begin_layout Plain Layout
22055 \begin_inset Flex Code
22058 \begin_layout Plain Layout
22064 ] Specifies attribute information to be output with the main tag.
22066 \begin_inset Quotes eld
22070 \begin_inset Flex Code
22073 \begin_layout Plain Layout
22074 class=`myfloat' onclick=`\SpecialChar \ldots{}
22081 \begin_inset Quotes erd
22085 By default, LyX will output
22086 \begin_inset Quotes eld
22090 \begin_inset Flex Code
22093 \begin_layout Plain Layout
22094 class=`float float-floattype'
22100 \begin_inset Quotes erd
22104 \begin_inset Flex Code
22107 \begin_layout Plain Layout
22113 is LyX's name for this type of float, as determined by the float declaration
22115 \begin_inset CommandInset ref
22117 reference "sub:Floats"
22121 ), though made lowercase and with non-alphanumeric characters converted
22122 to underscores, for example: float-table.
22125 \begin_layout Description
22126 \begin_inset Flex Code
22129 \begin_layout Plain Layout
22135 CSS style information to be included when this float is used.
22136 Note that this will automatically be wrapped in a layout-generated
22137 \begin_inset Flex Code
22140 \begin_layout Plain Layout
22146 block, so only the CSS itself need be included.
22149 \begin_layout Description
22150 \begin_inset Flex Code
22153 \begin_layout Plain Layout
22160 \begin_inset Flex Code
22163 \begin_layout Plain Layout
22169 ] The tag to be used for this float, replacing
22170 \begin_inset Quotes eld
22174 \begin_inset Flex Code
22177 \begin_layout Plain Layout
22184 \begin_inset Quotes erd
22187 in the example above.
22189 \begin_inset Flex Code
22192 \begin_layout Plain Layout
22198 and will rarely need changing.
22201 \begin_layout Subsection
22202 Bibliography formatting
22205 \begin_layout Standard
22206 The bibliography can be formatted using
22207 \begin_inset Flex Code
22210 \begin_layout Plain Layout
22218 \begin_inset CommandInset ref
22220 reference "sub:Citation-format-description"
22227 \begin_layout Subsection
22231 \begin_layout Standard
22232 We have several times mentioned that LyX will generate default CSS style
22233 rules for both insets and paragraph styles, based upon the other layout
22234 information that is provided.
22235 In this section, we shall say a word about which layout information LyX
22239 \begin_layout Standard
22240 At present, LyX auto-generates CSS only for font information, making use
22242 \begin_inset Flex Code
22245 \begin_layout Plain Layout
22252 \begin_inset Flex Code
22255 \begin_layout Plain Layout
22262 \begin_inset Flex Code
22265 \begin_layout Plain Layout
22272 \begin_inset Flex Code
22275 \begin_layout Plain Layout
22282 \begin_inset Flex Code
22285 \begin_layout Plain Layout
22293 \begin_inset CommandInset ref
22295 reference "sub:Font-description"
22299 .) The translation is mostly straightforward and obvious.
22301 \begin_inset Quotes eld
22305 \begin_inset Flex Code
22308 \begin_layout Plain Layout
22315 \begin_inset Quotes erd
22319 \begin_inset Quotes eld
22323 \begin_inset Flex Code
22326 \begin_layout Plain Layout
22327 font-family: sans-serif;
22333 \begin_inset Quotes erd
22337 The correspondence of LyX sizes and CSS sizes is a little less obvious
22338 but nonetheless intuitive.
22340 \begin_inset Flex Code
22343 \begin_layout Plain Layout
22350 \begin_inset Flex URL
22353 \begin_layout Plain Layout
22363 \begin_layout Chapter
22364 Including External Material
22367 \begin_layout Standard
22368 \begin_inset Box Shadowbox
22378 height_special "totalheight"
22381 \begin_layout Plain Layout
22382 WARNING: This portion of the documentation has not been updated for some
22384 We certainly hope that it is still accurate, but there are no guarantees.
22392 \begin_layout Standard
22393 The use of material from sources external to LyX is covered in detail in
22399 This part of the manual covers what needs to happen behind the scenes for
22400 new sorts of material to be included.
22403 \begin_layout Section
22407 \begin_layout Standard
22408 The external material feature is based on the concept of a
22413 A template is a specification of how LyX should interface with a certain
22415 As bundled, LyX comes with predefined templates for Xfig figures, various
22416 raster format images, chess diagrams, and LilyPond music notation.
22417 You can check the actual list by using the menu
22418 \begin_inset Flex MenuItem
22421 \begin_layout Plain Layout
22422 Insert\SpecialChar \menuseparator
22423 File\SpecialChar \menuseparator
22430 Furthermore, it is possible to roll your own template to support a specific
22432 Later we'll describe in more detail what is involved, and hopefully you
22433 will submit all the templates you create so we can include them in a later
22437 \begin_layout Standard
22438 Another basic idea of the external material feature is to distinguish between
22439 the original file that serves as a base for final material and the produced
22440 file that is included in your exported or printed document.
22441 For example, consider the case of a figure produced with
22442 \begin_inset Flex Code
22445 \begin_layout Plain Layout
22452 The Xfig application itself works on an original file with the
22453 \begin_inset Flex Code
22456 \begin_layout Plain Layout
22463 Within Xfig, you create and change your figure, and when you are done,
22465 \begin_inset Flex Code
22468 \begin_layout Plain Layout
22475 When you want to include the figure in your document, you invoke
22476 \begin_inset Flex Code
22479 \begin_layout Plain Layout
22485 in order to create a PostScript file that can readily be included in your
22488 \begin_inset Flex Code
22491 \begin_layout Plain Layout
22497 file is the original file, and the PostScript file is the produced file.
22500 \begin_layout Standard
22501 This distinction is important in order to allow updating of the material
22502 while you are in the process of writing the document.
22503 Furthermore, it provides us with the flexibility that is needed to support
22504 multiple export formats.
22505 For instance, in the case of a plain text file, it is not exactly an award-winn
22506 ing idea to include the figure as raw PostScript.
22507 Instead, you would either prefer to just include a reference to the figure
22508 or try to invoke some graphics to ASCII converter to make the final result
22509 look similar to the real graphics.
22510 The external material management allows you to do this, because it is parametri
22511 zed on the different export formats that LyX supports.
22514 \begin_layout Standard
22515 Besides supporting the production of different products according to the
22516 exported format, it supports tight integration with editing and viewing
22518 In the case of an Xfig figure, you are able to invoke Xfig on the original
22519 file with a single click from within the external material dialog in LyX,
22520 and also preview the produced PostScript file with Ghostview with another
22522 No more fiddling around with the command line and/or file browsers to locate
22523 and manipulate the original or produced files.
22524 In this way, you are finally able to take full advantage of the many different
22525 applications that are relevant to use when you write your documents, and
22526 ultimately be more productive.
22529 \begin_layout Section
22530 The external template configuration file
22533 \begin_layout Standard
22534 It is relatively easy to add custom external template definitions to LyX.
22535 However, be aware that doing this in an careless manner most probably
22539 introduce an easily exploitable security hole.
22540 So before you do this, please read the discussion about security in section
22542 \begin_inset CommandInset ref
22544 reference "sec:Security-discussion"
22551 \begin_layout Standard
22552 Having said that, we encourage you to submit any interesting templates that
22557 \begin_layout Standard
22558 The external templates are defined in the
22559 \begin_inset Flex Code
22562 \begin_layout Plain Layout
22563 LyXDir/lib/external_templates
22569 You can place your own version in
22570 \begin_inset Flex Code
22573 \begin_layout Plain Layout
22574 UserDir/external_templates
22582 \begin_layout Standard
22583 A typical template looks like this:
22586 \begin_layout LyX-Code
22590 \begin_layout LyX-Code
22591 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22594 \begin_layout LyX-Code
22598 \begin_layout LyX-Code
22602 \begin_layout LyX-Code
22606 \begin_layout LyX-Code
22610 \begin_layout LyX-Code
22614 \begin_layout LyX-Code
22615 AutomaticProduction true
22618 \begin_layout LyX-Code
22622 \begin_layout LyX-Code
22626 \begin_layout LyX-Code
22630 \begin_layout LyX-Code
22631 TransformCommand Rotate RotationLatexCommand
22634 \begin_layout LyX-Code
22635 TransformCommand Resize ResizeLatexCommand
22638 \begin_layout LyX-Code
22639 Product "$$RotateFront$$ResizeFront
22642 \begin_layout LyX-Code
22647 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22650 \begin_layout LyX-Code
22651 $$ResizeBack$$RotateBack"
22654 \begin_layout LyX-Code
22658 \begin_layout LyX-Code
22659 UpdateResult "$$AbsPath$$Basename.pstex_t"
22662 \begin_layout LyX-Code
22663 Requirement "graphicx"
22666 \begin_layout LyX-Code
22667 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22670 \begin_layout LyX-Code
22671 ReferencedFile latex "$$AbsPath$$Basename.eps"
22674 \begin_layout LyX-Code
22675 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22678 \begin_layout LyX-Code
22682 \begin_layout LyX-Code
22686 \begin_layout LyX-Code
22687 TransformCommand Rotate RotationLatexCommand
22690 \begin_layout LyX-Code
22691 TransformCommand Resize ResizeLatexCommand
22694 \begin_layout LyX-Code
22695 Product "$$RotateFront$$ResizeFront
22698 \begin_layout LyX-Code
22703 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22706 \begin_layout LyX-Code
22707 $$ResizeBack$$RotateBack"
22710 \begin_layout LyX-Code
22711 UpdateFormat pdftex
22714 \begin_layout LyX-Code
22715 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22718 \begin_layout LyX-Code
22719 Requirement "graphicx"
22722 \begin_layout LyX-Code
22723 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22726 \begin_layout LyX-Code
22727 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22730 \begin_layout LyX-Code
22734 \begin_layout LyX-Code
22738 \begin_layout LyX-Code
22739 Product "$$Contents(
22741 "$$AbsPath$$Basename.asc
22746 \begin_layout LyX-Code
22747 UpdateFormat asciixfig
22750 \begin_layout LyX-Code
22751 UpdateResult "$$AbsPath$$Basename.asc"
22754 \begin_layout LyX-Code
22758 \begin_layout LyX-Code
22762 \begin_layout LyX-Code
22763 Product "<graphic fileref=
22765 "$$AbsOrRelPathMaster$$Basename.eps
22770 \begin_layout LyX-Code
22774 \begin_layout LyX-Code
22778 \begin_layout LyX-Code
22779 UpdateResult "$$AbsPath$$Basename.eps"
22782 \begin_layout LyX-Code
22783 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22786 \begin_layout LyX-Code
22787 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22790 \begin_layout LyX-Code
22794 \begin_layout LyX-Code
22795 Product "[XFig: $$FName]"
22798 \begin_layout LyX-Code
22802 \begin_layout LyX-Code
22806 \begin_layout Standard
22807 As you can see, the template is enclosed in
22808 \begin_inset Flex Code
22811 \begin_layout Plain Layout
22817 \SpecialChar \ldots{}
22819 \begin_inset Flex Code
22822 \begin_layout Plain Layout
22829 It contains a header specifying some general settings and, for each supported
22830 primary document file format, a section
22831 \begin_inset Flex Code
22834 \begin_layout Plain Layout
22840 \SpecialChar \ldots{}
22842 \begin_inset Flex Code
22845 \begin_layout Plain Layout
22854 \begin_layout Subsection
22855 The template header
22858 \begin_layout Description
22859 \begin_inset Flex Code
22862 \begin_layout Plain Layout
22863 AutomaticProduction
22864 \begin_inset space ~
22872 Whether the file represented by the template must be generated by LyX.
22873 This command must occur exactly once.
22876 \begin_layout Description
22877 \begin_inset Flex Code
22880 \begin_layout Plain Layout
22882 \begin_inset space ~
22890 A glob pattern that is used in the file dialog to filter out the desired
22892 If there is more than one possible file extension (e.
22893 \begin_inset space \thinspace{}
22897 \begin_inset space \space{}
22901 \begin_inset Flex Code
22904 \begin_layout Plain Layout
22911 \begin_inset Flex Code
22914 \begin_layout Plain Layout
22920 ), use something like
22921 \begin_inset Flex Code
22924 \begin_layout Plain Layout
22931 This command must occur exactly once.
22934 \begin_layout Description
22935 \begin_inset Flex Code
22938 \begin_layout Plain Layout
22940 \begin_inset space ~
22948 The text that is displayed on the button.
22949 This command must occur exactly once.
22952 \begin_layout Description
22953 \begin_inset Flex Code
22956 \begin_layout Plain Layout
22958 \begin_inset space ~
22962 \begin_inset space ~
22970 The help text that is used in the External dialog.
22971 Provide enough information to explain to the user just what the template
22972 can provide him with.
22973 This command must occur exactly once.
22976 \begin_layout Description
22977 \begin_inset Flex Code
22980 \begin_layout Plain Layout
22982 \begin_inset space ~
22990 The file format of the original file.
22991 This must be the name of a format that is known to LyX (see section
22992 \begin_inset space ~
22996 \begin_inset CommandInset ref
22998 reference "sec:Formats"
23004 \begin_inset Quotes eld
23008 \begin_inset Flex Code
23011 \begin_layout Plain Layout
23018 \begin_inset Quotes erd
23021 if the template can handle original files of more than one format.
23022 LyX will attempt to interrogate the file itself in order to deduce its
23023 format in this case.
23024 This command must occur exactly once.
23027 \begin_layout Description
23028 \begin_inset Flex Code
23031 \begin_layout Plain Layout
23033 \begin_inset space ~
23041 A unique name for the template.
23042 It must not contain substitution macros (see below).
23045 \begin_layout Description
23046 \begin_inset Flex Code
23049 \begin_layout Plain Layout
23051 \begin_inset space ~
23054 Rotate|Resize|Clip|Extra
23059 This command specifies which transformations are supported by this template.
23060 It may occur zero or more times.
23061 This command enables the corresponding tabs in the external dialog.
23063 \begin_inset Flex Code
23066 \begin_layout Plain Layout
23072 command must have either a corresponding
23073 \begin_inset Flex Code
23076 \begin_layout Plain Layout
23083 \begin_inset Flex Code
23086 \begin_layout Plain Layout
23093 \begin_inset Flex Code
23096 \begin_layout Plain Layout
23103 Otherwise the transformation will not be supported by that format.
23106 \begin_layout Subsection
23110 \begin_layout Description
23111 \begin_inset Flex Code
23114 \begin_layout Plain Layout
23116 \begin_inset space ~
23119 LaTeX|PDFLaTeX|PlainText|DocBook
23124 The primary document file format that this format definition is for.
23125 Not every template has a sensible representation in all document file formats.
23126 Please define nevertheless a
23127 \begin_inset Flex Code
23130 \begin_layout Plain Layout
23136 section for all templates.
23137 Use a dummy text when no representation is available.
23138 Then you can at least see a reference to the external material in the exported
23142 \begin_layout Description
23143 \begin_inset Flex Code
23146 \begin_layout Plain Layout
23148 \begin_inset space ~
23152 \begin_inset space ~
23160 This command defines an additional macro
23161 \begin_inset Flex Code
23164 \begin_layout Plain Layout
23170 for substitution in
23171 \begin_inset Flex Code
23174 \begin_layout Plain Layout
23182 \begin_inset Flex Code
23185 \begin_layout Plain Layout
23191 itself may contain substitution macros.
23192 The advantage over using
23193 \begin_inset Flex Code
23196 \begin_layout Plain Layout
23203 \begin_inset Flex Code
23206 \begin_layout Plain Layout
23212 is that the substituted value of
23213 \begin_inset Flex Code
23216 \begin_layout Plain Layout
23222 is sanitized so that it is a valid optional argument in the document format.
23223 This command may occur zero or more times.
23226 \begin_layout Description
23227 \begin_inset Flex Code
23230 \begin_layout Plain Layout
23232 \begin_inset space ~
23240 The text that is inserted in the exported document.
23241 This is actually the most important command and can be quite complex.
23242 This command must occur exactly once.
23245 \begin_layout Description
23246 \begin_inset Flex Code
23249 \begin_layout Plain Layout
23251 \begin_inset space ~
23259 This command specifies a preamble snippet that will be included in the
23261 It has to be defined using
23262 \begin_inset Flex Code
23265 \begin_layout Plain Layout
23271 \SpecialChar \ldots{}
23273 \begin_inset Flex Code
23276 \begin_layout Plain Layout
23283 This command may occur zero or more times.
23286 \begin_layout Description
23287 \begin_inset Flex Code
23290 \begin_layout Plain Layout
23292 \begin_inset space ~
23296 \begin_inset space ~
23304 This command denotes files that are created by the conversion process and
23305 are needed for a particular export format.
23306 If the filename is relative, it is interpreted relative to the master document.
23307 This command may be given zero or more times.
23310 \begin_layout Description
23311 \begin_inset Flex Code
23314 \begin_layout Plain Layout
23316 \begin_inset space ~
23324 The name of a required LaTeX package.
23325 The package is included via
23326 \begin_inset Flex Code
23329 \begin_layout Plain Layout
23337 in the LaTeX preamble.
23338 This command may occur zero or more times.
23341 \begin_layout Description
23342 \begin_inset Flex Code
23345 \begin_layout Plain Layout
23347 \begin_inset space ~
23351 \begin_inset space ~
23354 RotationLatexCommand
23359 This command specifies that the built in LaTeX command should be used for
23361 This command may occur once or not at all.
23364 \begin_layout Description
23365 \begin_inset Flex Code
23368 \begin_layout Plain Layout
23370 \begin_inset space ~
23374 \begin_inset space ~
23382 This command specifies that the built in LaTeX command should be used for
23384 This command may occur once or not at all.
23387 \begin_layout Description
23388 \begin_inset Flex Code
23391 \begin_layout Plain Layout
23393 \begin_inset space ~
23397 \begin_inset space ~
23400 RotationLatexOption
23405 This command specifies that rotation is done via an optional argument.
23406 This command may occur once or not at all.
23409 \begin_layout Description
23410 \begin_inset Flex Code
23413 \begin_layout Plain Layout
23415 \begin_inset space ~
23419 \begin_inset space ~
23427 This command specifies that resizing is done via an optional argument.
23428 This command may occur once or not at all.
23431 \begin_layout Description
23432 \begin_inset Flex Code
23435 \begin_layout Plain Layout
23437 \begin_inset space ~
23441 \begin_inset space ~
23449 This command specifies that clipping is done via an optional argument.
23450 This command may occur once or not at all.
23453 \begin_layout Description
23454 \begin_inset Flex Code
23457 \begin_layout Plain Layout
23459 \begin_inset space ~
23463 \begin_inset space ~
23471 This command specifies that an extra optional argument is used.
23472 This command may occur once or not at all.
23475 \begin_layout Description
23476 \begin_inset Flex Code
23479 \begin_layout Plain Layout
23481 \begin_inset space ~
23489 The file format of the converted file.
23490 This must be the name of a format that is known to LyX (see the
23491 \begin_inset Flex MenuItem
23494 \begin_layout Plain Layout
23499 ools\SpecialChar \menuseparator
23504 references\SpecialChar \menuseparator
23505 File Handling\SpecialChar \menuseparator
23512 This command must occur exactly once.
23515 \begin_layout Description
23516 \begin_inset Flex Code
23519 \begin_layout Plain Layout
23521 \begin_inset space ~
23529 The file name of the converted file.
23530 The file name must be absolute.
23531 This command must occur exactly once.
23534 \begin_layout Subsection
23535 Preamble definitions
23538 \begin_layout Standard
23539 The external template configuration file may contain additional preamble
23540 definitions enclosed by
23541 \begin_inset Flex Code
23544 \begin_layout Plain Layout
23550 \SpecialChar \ldots{}
23552 \begin_inset Flex Code
23555 \begin_layout Plain Layout
23562 They can be used by the templates in the
23563 \begin_inset Flex Code
23566 \begin_layout Plain Layout
23575 \begin_layout Section
23576 The substitution mechanism
23579 \begin_layout Standard
23580 When the external material facility invokes an external program, it is done
23581 on the basis of a command defined in the template configuration file.
23582 These commands can contain various macros that are expanded before execution.
23583 Execution always take place in the directory of the containing document.
23586 \begin_layout Standard
23587 Also, whenever external material is to be displayed, the name will be produced
23588 by the substitution mechanism, and most other commands in the template
23589 definition support substitution as well.
23592 \begin_layout Standard
23593 The available macros are the following:
23596 \begin_layout Description
23597 \begin_inset Flex Code
23600 \begin_layout Plain Layout
23601 $$AbsOrRelPathMaster
23606 The file path, absolute or relative to the master LyX document.
23609 \begin_layout Description
23610 \begin_inset Flex Code
23613 \begin_layout Plain Layout
23614 $$AbsOrRelPathParent
23619 The file path, absolute or relative to the LyX document.
23622 \begin_layout Description
23623 \begin_inset Flex Code
23626 \begin_layout Plain Layout
23632 The absolute file path.
23635 \begin_layout Description
23636 \begin_inset Flex Code
23639 \begin_layout Plain Layout
23645 The filename without path and without the extension.
23648 \begin_layout Description
23649 \begin_inset Flex Code
23652 \begin_layout Plain Layout
23654 \begin_inset Quotes eld
23658 \begin_inset Quotes erd
23666 This macro will expand to the contents of the file with the name
23667 \begin_inset Flex Code
23670 \begin_layout Plain Layout
23679 \begin_layout Description
23680 \begin_inset Flex Code
23683 \begin_layout Plain Layout
23689 The file extension (including the dot).
23692 \begin_layout Description
23693 \begin_inset Flex Code
23696 \begin_layout Plain Layout
23702 The filename of the file specified in the external material dialog.
23703 This is either an absolute name, or it is relative to the LyX document.
23706 \begin_layout Description
23707 \begin_inset Flex Code
23710 \begin_layout Plain Layout
23717 \begin_inset Flex Code
23720 \begin_layout Plain Layout
23726 (absolute name or relative to the LyX document).
23729 \begin_layout Description
23730 \begin_inset Flex Code
23733 \begin_layout Plain Layout
23739 The file path, relative to the master LyX document.
23742 \begin_layout Description
23743 \begin_inset Flex Code
23746 \begin_layout Plain Layout
23752 The file path, relative to the LyX document.
23755 \begin_layout Description
23756 \begin_inset Flex Code
23759 \begin_layout Plain Layout
23765 This macro will expand to the absolute path of the system directory.
23766 This is typically used to point to the various helper scripts that are
23770 \begin_layout Description
23771 \begin_inset Flex Code
23774 \begin_layout Plain Layout
23780 A name and full path to a temporary file which will be automatically deleted
23781 whenever the containing document is closed, or the external material insertion
23785 \begin_layout Standard
23786 All path macros contain a trailing directory separator, so you can construct
23788 \begin_inset space \thinspace{}
23792 \begin_inset space \space{}
23795 the absolute filename with
23796 \begin_inset Flex Code
23799 \begin_layout Plain Layout
23800 $$AbsPath$$Basename$$Extension
23808 \begin_layout Standard
23809 The macros above are substituted in all commands unless otherwise noted.
23811 \begin_inset Flex Code
23814 \begin_layout Plain Layout
23820 supports additionally the following substitutions if they are enabled by
23822 \begin_inset Flex Code
23825 \begin_layout Plain Layout
23832 \begin_inset Flex Code
23835 \begin_layout Plain Layout
23844 \begin_layout Description
23845 \begin_inset Flex Code
23848 \begin_layout Plain Layout
23854 The front part of the resize command.
23857 \begin_layout Description
23858 \begin_inset Flex Code
23861 \begin_layout Plain Layout
23867 The back part of the resize command.
23870 \begin_layout Description
23871 \begin_inset Flex Code
23874 \begin_layout Plain Layout
23880 The front part of the rotation command.
23883 \begin_layout Description
23884 \begin_inset Flex Code
23887 \begin_layout Plain Layout
23893 The back part of the rotation command.
23896 \begin_layout Standard
23897 The value string of the
23898 \begin_inset Flex Code
23901 \begin_layout Plain Layout
23907 command supports additionally the following substitutions if they are enabled
23909 \begin_inset Flex Code
23912 \begin_layout Plain Layout
23919 \begin_inset Flex Code
23922 \begin_layout Plain Layout
23931 \begin_layout Description
23932 \begin_inset Flex Code
23935 \begin_layout Plain Layout
23944 \begin_layout Description
23945 \begin_inset Flex Code
23948 \begin_layout Plain Layout
23957 \begin_layout Description
23958 \begin_inset Flex Code
23961 \begin_layout Plain Layout
23970 \begin_layout Description
23971 \begin_inset Flex Code
23974 \begin_layout Plain Layout
23980 The rotation option.
23983 \begin_layout Standard
23984 You may ask why there are so many path macros.
23985 There are mainly two reasons:
23988 \begin_layout Enumerate
23989 Relative and absolute file names should remain relative or absolute, respectivel
23991 Users may have reasons to prefer either form.
23992 Relative names are useful for portable documents that should work on different
23993 machines, for example.
23994 Absolute names may be required by some programs.
23997 \begin_layout Enumerate
23998 LaTeX treats relative file names differently than LyX and other programs
23999 in nested included files.
24000 For LyX, a relative file name is always relative to the document that contains
24002 For LaTeX, it is always relative to the master document.
24003 These two definitions are identical if you have only one document, but
24004 differ if you have a master document that includes part documents.
24005 That means that relative filenames must be transformed when presented to
24007 Fortunately LyX does this automatically for you if you choose the right
24011 \begin_layout Standard
24012 So which path macro should be used in new template definitions? The rule
24016 \begin_layout Itemize
24018 \begin_inset Flex Code
24021 \begin_layout Plain Layout
24027 if an absolute path is required.
24030 \begin_layout Itemize
24032 \begin_inset Flex Code
24035 \begin_layout Plain Layout
24036 $$AbsOrRelPathMaster
24041 if the substituted string is some kind of LaTeX input.
24044 \begin_layout Itemize
24046 \begin_inset Flex Code
24049 \begin_layout Plain Layout
24050 $$AbsOrRelPathParent
24055 in order to preserve the user's choice.
24058 \begin_layout Standard
24059 There are special cases where this rule does not work and e.
24060 \begin_inset space \thinspace{}
24064 \begin_inset space \space{}
24067 relative names are needed, but normally it will work just fine.
24068 One example for such a case is the command
24069 \begin_inset Flex Code
24072 \begin_layout Plain Layout
24073 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24078 in the XFig template above: We can't use the absolute name because the
24080 \begin_inset Flex Code
24083 \begin_layout Plain Layout
24089 files needs the relative name in order to rewrite the file content.
24092 \begin_layout Section
24093 Security discussion
24094 \begin_inset CommandInset label
24096 name "sec:Security-discussion"
24103 \begin_layout Standard
24104 The external material feature interfaces with a lot of external programs
24105 and does so automatically, so we have to consider the security implications
24107 In particular, since you have the option of including your own filenames
24108 and/or parameter strings and those are expanded into a command, it seems
24109 that it would be possible to create a malicious document which executes
24110 arbitrary commands when a user views or prints the document.
24111 This is something we definitely want to avoid.
24114 \begin_layout Standard
24115 However, since the external program commands are specified in the template
24116 configuration file only, there are no security issues if LyX is properly
24117 configured with safe templates only.
24118 This is so because the external programs are invoked with the
24119 \begin_inset Flex Code
24122 \begin_layout Plain Layout
24128 -system call rather than the
24129 \begin_inset Flex Code
24132 \begin_layout Plain Layout
24138 system-call, so it's not possible to execute arbitrary commands from the
24139 filename or parameter section via the shell.
24142 \begin_layout Standard
24143 This also implies that you are restricted in what command strings you can
24144 use in the external material templates.
24145 In particular, pipes and redirection are not readily available.
24146 This has to be so if LyX should remain safe.
24147 If you want to use some of the shell features, you should write a safe
24148 script to do this in a controlled manner, and then invoke the script from
24149 the command string.
24153 \begin_layout Standard
24154 It is possible to design a template that interacts directly with the shell,
24155 but since this would allow a malicious user to execute arbitrary commands
24156 by writing clever filenames and/or parameters, we generally recommend that
24157 you only use safe scripts that work with the
24158 \begin_inset Flex Code
24161 \begin_layout Plain Layout
24167 system call in a controlled manner.
24168 Of course, for use in a controlled environment, it can be tempting to just
24169 fall back to use ordinary shell scripts.
24170 If you do so, be aware that you
24174 provide an easily exploitable security hole in your system.
24175 Of course it stands to reason that such unsafe templates will never be
24176 included in the standard LyX distribution, although we do encourage people
24177 to submit new templates in the open source tradition.
24178 But LyX as shipped from the official distribution channels will never have
24182 \begin_layout Standard
24183 Including external material provides a lot of power, and you have to be
24184 careful not to introduce security hazards with this power.
24185 A subtle error in a single line in an innocent looking script can open
24186 the door to huge security problems.
24187 So if you do not fully understand the issues, we recommend that you consult
24188 a knowledgeable security professional or the LyX development team if you
24189 have any questions about whether a given template is safe or not.
24190 And do this before you use it in an uncontrolled environment.
24193 \begin_layout Chapter
24195 List of functions to be used in layouts
24196 \begin_inset CommandInset label
24198 name "chap:List-of-functions"
24205 \begin_layout Standard
24207 \begin_inset Tabular
24208 <lyxtabular version="3" rows="10" columns="6">
24209 <features rotate="0" tabularvalignment="middle">
24210 <column alignment="left" valignment="top" width="14col%">
24211 <column alignment="left" valignment="top" width="14col%">
24212 <column alignment="left" valignment="top" width="14col%">
24213 <column alignment="left" valignment="top" width="14col%">
24214 <column alignment="left" valignment="top" width="14col%">
24215 <column alignment="left" valignment="top" width="14col%">
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
24235 <cell alignment="left" valignment="top" usebox="none">
24238 \begin_layout Plain Layout
24244 <cell alignment="left" valignment="top" usebox="none">
24247 \begin_layout Plain Layout
24253 <cell alignment="left" valignment="top" usebox="none">
24256 \begin_layout Plain Layout
24262 <cell alignment="left" valignment="top" usebox="none">
24265 \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
24291 <cell alignment="left" valignment="top" usebox="none">
24294 \begin_layout Plain Layout
24300 <cell alignment="left" valignment="top" usebox="none">
24303 \begin_layout Plain Layout
24309 <cell alignment="left" valignment="top" usebox="none">
24312 \begin_layout Plain Layout
24318 <cell alignment="left" valignment="top" usebox="none">
24321 \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
24347 <cell alignment="left" valignment="top" usebox="none">
24350 \begin_layout Plain Layout
24356 <cell alignment="left" valignment="top" usebox="none">
24359 \begin_layout Plain Layout
24365 <cell alignment="left" valignment="top" usebox="none">
24368 \begin_layout Plain Layout
24374 <cell alignment="left" valignment="top" usebox="none">
24377 \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
24403 <cell alignment="left" valignment="top" usebox="none">
24406 \begin_layout Plain Layout
24412 <cell alignment="left" valignment="top" usebox="none">
24415 \begin_layout Plain Layout
24421 <cell alignment="left" valignment="top" usebox="none">
24424 \begin_layout Plain Layout
24430 <cell alignment="left" valignment="top" usebox="none">
24433 \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
24459 <cell alignment="left" valignment="top" usebox="none">
24462 \begin_layout Plain Layout
24468 <cell alignment="left" valignment="top" usebox="none">
24471 \begin_layout Plain Layout
24477 <cell alignment="left" valignment="top" usebox="none">
24480 \begin_layout Plain Layout
24486 <cell alignment="left" valignment="top" usebox="none">
24489 \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
24515 <cell alignment="left" valignment="top" usebox="none">
24518 \begin_layout Plain Layout
24524 <cell alignment="left" valignment="top" usebox="none">
24527 \begin_layout Plain Layout
24533 <cell alignment="left" valignment="top" usebox="none">
24536 \begin_layout Plain Layout
24542 <cell alignment="left" valignment="top" usebox="none">
24545 \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
24589 <cell alignment="left" valignment="top" usebox="none">
24592 \begin_layout Plain Layout
24598 <cell alignment="left" valignment="top" usebox="none">
24601 \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
24645 <cell alignment="left" valignment="top" usebox="none">
24648 \begin_layout Plain Layout
24654 <cell alignment="left" valignment="top" usebox="none">
24657 \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
24701 <cell alignment="left" valignment="top" usebox="none">
24704 \begin_layout Plain Layout
24710 <cell alignment="left" valignment="top" usebox="none">
24713 \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
24757 <cell alignment="left" valignment="top" usebox="none">
24760 \begin_layout Plain Layout
24766 <cell alignment="left" valignment="top" usebox="none">
24769 \begin_layout Plain Layout
24783 \begin_layout Standard
24785 \begin_inset Tabular
24786 <lyxtabular version="3" rows="10" columns="6">
24787 <features rotate="0" tabularvalignment="middle">
24788 <column alignment="left" valignment="top" width="14col%">
24789 <column alignment="left" valignment="top" width="14col%">
24790 <column alignment="left" valignment="top" width="14col%">
24791 <column alignment="left" valignment="top" width="14col%">
24792 <column alignment="left" valignment="top" width="14col%">
24793 <column alignment="left" valignment="top" width="14col%">
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
24813 <cell alignment="left" valignment="top" usebox="none">
24816 \begin_layout Plain Layout
24822 <cell alignment="left" valignment="top" usebox="none">
24825 \begin_layout Plain Layout
24831 <cell alignment="left" valignment="top" usebox="none">
24834 \begin_layout Plain Layout
24840 <cell alignment="left" valignment="top" usebox="none">
24843 \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
24869 <cell alignment="left" valignment="top" usebox="none">
24872 \begin_layout Plain Layout
24878 <cell alignment="left" valignment="top" usebox="none">
24881 \begin_layout Plain Layout
24887 <cell alignment="left" valignment="top" usebox="none">
24890 \begin_layout Plain Layout
24896 <cell alignment="left" valignment="top" usebox="none">
24899 \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
24925 <cell alignment="left" valignment="top" usebox="none">
24928 \begin_layout Plain Layout
24934 <cell alignment="left" valignment="top" usebox="none">
24937 \begin_layout Plain Layout
24943 <cell alignment="left" valignment="top" usebox="none">
24946 \begin_layout Plain Layout
24952 <cell alignment="left" valignment="top" usebox="none">
24955 \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
24981 <cell alignment="left" valignment="top" usebox="none">
24984 \begin_layout Plain Layout
24990 <cell alignment="left" valignment="top" usebox="none">
24993 \begin_layout Plain Layout
24999 <cell alignment="left" valignment="top" usebox="none">
25002 \begin_layout Plain Layout
25008 <cell alignment="left" valignment="top" usebox="none">
25011 \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
25037 <cell alignment="left" valignment="top" usebox="none">
25040 \begin_layout Plain Layout
25046 <cell alignment="left" valignment="top" usebox="none">
25049 \begin_layout Plain Layout
25055 <cell alignment="left" valignment="top" usebox="none">
25058 \begin_layout Plain Layout
25064 <cell alignment="left" valignment="top" usebox="none">
25067 \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
25093 <cell alignment="left" valignment="top" usebox="none">
25096 \begin_layout Plain Layout
25102 <cell alignment="left" valignment="top" usebox="none">
25105 \begin_layout Plain Layout
25111 <cell alignment="left" valignment="top" usebox="none">
25114 \begin_layout Plain Layout
25120 <cell alignment="left" valignment="top" usebox="none">
25123 \begin_layout Plain Layout
25131 <cell alignment="left" valignment="top" usebox="none">
25134 \begin_layout Plain Layout
25140 <cell alignment="left" valignment="top" usebox="none">
25143 \begin_layout Plain Layout
25149 <cell alignment="left" valignment="top" usebox="none">
25152 \begin_layout Plain Layout
25158 <cell alignment="left" valignment="top" usebox="none">
25161 \begin_layout Plain Layout
25167 <cell alignment="left" valignment="top" usebox="none">
25170 \begin_layout Plain Layout
25176 <cell alignment="left" valignment="top" usebox="none">
25179 \begin_layout Plain Layout
25187 <cell alignment="left" valignment="top" usebox="none">
25190 \begin_layout Plain Layout
25196 <cell alignment="left" valignment="top" usebox="none">
25199 \begin_layout Plain Layout
25205 <cell alignment="left" valignment="top" usebox="none">
25208 \begin_layout Plain Layout
25214 <cell alignment="left" valignment="top" usebox="none">
25217 \begin_layout Plain Layout
25223 <cell alignment="left" valignment="top" usebox="none">
25226 \begin_layout Plain Layout
25232 <cell alignment="left" valignment="top" usebox="none">
25235 \begin_layout Plain Layout
25243 <cell alignment="left" valignment="top" usebox="none">
25246 \begin_layout Plain Layout
25252 <cell alignment="left" valignment="top" usebox="none">
25255 \begin_layout Plain Layout
25261 <cell alignment="left" valignment="top" usebox="none">
25264 \begin_layout Plain Layout
25270 <cell alignment="left" valignment="top" usebox="none">
25273 \begin_layout Plain Layout
25279 <cell alignment="left" valignment="top" usebox="none">
25282 \begin_layout Plain Layout
25288 <cell alignment="left" valignment="top" usebox="none">
25291 \begin_layout Plain Layout
25299 <cell alignment="left" valignment="top" usebox="none">
25302 \begin_layout Plain Layout
25308 <cell alignment="left" valignment="top" usebox="none">
25311 \begin_layout Plain Layout
25317 <cell alignment="left" valignment="top" usebox="none">
25320 \begin_layout Plain Layout
25326 <cell alignment="left" valignment="top" usebox="none">
25329 \begin_layout Plain Layout
25335 <cell alignment="left" valignment="top" usebox="none">
25338 \begin_layout Plain Layout
25344 <cell alignment="left" valignment="top" usebox="none">
25347 \begin_layout Plain Layout
25361 \begin_layout Chapter
25362 List of supported LyX functions to be used in layouts
25365 \begin_layout Standard
25367 \begin_inset Tabular
25368 <lyxtabular version="3" rows="10" columns="8">
25369 <features rotate="0" tabularvalignment="middle">
25370 <column alignment="left" valignment="top" width="0">
25371 <column alignment="left" valignment="top" width="0">
25372 <column alignment="left" valignment="top" width="0">
25373 <column alignment="left" valignment="top" width="0">
25374 <column alignment="left" valignment="top" width="0">
25375 <column alignment="left" valignment="top" width="0">
25376 <column alignment="left" valignment="top" width="0">
25377 <column alignment="left" valignment="top" width="0">
25379 <cell alignment="left" valignment="top" usebox="none">
25382 \begin_layout Plain Layout
25388 <cell alignment="left" valignment="top" usebox="none">
25391 \begin_layout Plain Layout
25397 <cell alignment="left" valignment="top" usebox="none">
25400 \begin_layout Plain Layout
25406 <cell alignment="left" valignment="top" usebox="none">
25409 \begin_layout Plain Layout
25415 <cell alignment="center" valignment="top" usebox="none">
25418 \begin_layout Plain Layout
25424 <cell alignment="center" valignment="top" usebox="none">
25427 \begin_layout Plain Layout
25433 <cell alignment="center" valignment="top" usebox="none">
25436 \begin_layout Plain Layout
25442 <cell alignment="center" valignment="top" usebox="none">
25445 \begin_layout Plain Layout
25453 <cell alignment="left" valignment="top" usebox="none">
25456 \begin_layout Plain Layout
25462 <cell alignment="left" valignment="top" usebox="none">
25465 \begin_layout Plain Layout
25471 <cell alignment="left" valignment="top" usebox="none">
25474 \begin_layout Plain Layout
25480 <cell alignment="left" valignment="top" usebox="none">
25483 \begin_layout Plain Layout
25489 <cell alignment="center" valignment="top" usebox="none">
25492 \begin_layout Plain Layout
25498 <cell alignment="center" valignment="top" usebox="none">
25501 \begin_layout Plain Layout
25507 <cell alignment="center" valignment="top" usebox="none">
25510 \begin_layout Plain Layout
25516 <cell alignment="center" valignment="top" usebox="none">
25519 \begin_layout Plain Layout
25527 <cell alignment="left" valignment="top" usebox="none">
25530 \begin_layout Plain Layout
25536 <cell alignment="left" valignment="top" usebox="none">
25539 \begin_layout Plain Layout
25545 <cell alignment="left" valignment="top" usebox="none">
25548 \begin_layout Plain Layout
25554 <cell alignment="left" valignment="top" usebox="none">
25557 \begin_layout Plain Layout
25563 <cell alignment="center" valignment="top" usebox="none">
25566 \begin_layout Plain Layout
25572 <cell alignment="center" valignment="top" usebox="none">
25575 \begin_layout Plain Layout
25581 <cell alignment="center" valignment="top" usebox="none">
25584 \begin_layout Plain Layout
25590 <cell alignment="center" valignment="top" usebox="none">
25593 \begin_layout Plain Layout
25601 <cell alignment="left" valignment="top" usebox="none">
25604 \begin_layout Plain Layout
25610 <cell alignment="left" valignment="top" usebox="none">
25613 \begin_layout Plain Layout
25619 <cell alignment="left" valignment="top" usebox="none">
25622 \begin_layout Plain Layout
25628 <cell alignment="left" valignment="top" usebox="none">
25631 \begin_layout Plain Layout
25637 <cell alignment="center" valignment="top" usebox="none">
25640 \begin_layout Plain Layout
25646 <cell alignment="center" valignment="top" usebox="none">
25649 \begin_layout Plain Layout
25655 <cell alignment="center" valignment="top" usebox="none">
25658 \begin_layout Plain Layout
25664 <cell alignment="center" valignment="top" usebox="none">
25667 \begin_layout Plain Layout
25675 <cell alignment="left" valignment="top" usebox="none">
25678 \begin_layout Plain Layout
25684 <cell alignment="left" valignment="top" usebox="none">
25687 \begin_layout Plain Layout
25693 <cell alignment="left" valignment="top" usebox="none">
25696 \begin_layout Plain Layout
25702 <cell alignment="left" valignment="top" usebox="none">
25705 \begin_layout Plain Layout
25711 <cell alignment="center" valignment="top" usebox="none">
25714 \begin_layout Plain Layout
25720 <cell alignment="center" valignment="top" usebox="none">
25723 \begin_layout Plain Layout
25729 <cell alignment="center" valignment="top" usebox="none">
25732 \begin_layout Plain Layout
25738 <cell alignment="center" valignment="top" usebox="none">
25741 \begin_layout Plain Layout
25749 <cell alignment="left" valignment="top" usebox="none">
25752 \begin_layout Plain Layout
25758 <cell alignment="left" valignment="top" usebox="none">
25761 \begin_layout Plain Layout
25767 <cell alignment="left" valignment="top" usebox="none">
25770 \begin_layout Plain Layout
25776 <cell alignment="left" valignment="top" usebox="none">
25779 \begin_layout Plain Layout
25785 <cell alignment="center" valignment="top" usebox="none">
25788 \begin_layout Plain Layout
25794 <cell alignment="center" valignment="top" usebox="none">
25797 \begin_layout Plain Layout
25803 <cell alignment="center" valignment="top" usebox="none">
25806 \begin_layout Plain Layout
25812 <cell alignment="center" valignment="top" usebox="none">
25815 \begin_layout Plain Layout
25823 <cell alignment="left" valignment="top" usebox="none">
25826 \begin_layout Plain Layout
25832 <cell alignment="left" valignment="top" usebox="none">
25835 \begin_layout Plain Layout
25841 <cell alignment="left" valignment="top" usebox="none">
25844 \begin_layout Plain Layout
25850 <cell alignment="left" valignment="top" usebox="none">
25853 \begin_layout Plain Layout
25859 <cell alignment="center" valignment="top" usebox="none">
25862 \begin_layout Plain Layout
25868 <cell alignment="center" valignment="top" usebox="none">
25871 \begin_layout Plain Layout
25877 <cell alignment="center" valignment="top" usebox="none">
25880 \begin_layout Plain Layout
25886 <cell alignment="center" valignment="top" usebox="none">
25889 \begin_layout Plain Layout
25897 <cell alignment="left" valignment="top" usebox="none">
25900 \begin_layout Plain Layout
25906 <cell alignment="left" valignment="top" usebox="none">
25909 \begin_layout Plain Layout
25915 <cell alignment="left" valignment="top" usebox="none">
25918 \begin_layout Plain Layout
25924 <cell alignment="left" valignment="top" usebox="none">
25927 \begin_layout Plain Layout
25933 <cell alignment="center" valignment="top" usebox="none">
25936 \begin_layout Plain Layout
25942 <cell alignment="center" valignment="top" usebox="none">
25945 \begin_layout Plain Layout
25951 <cell alignment="center" valignment="top" usebox="none">
25954 \begin_layout Plain Layout
25960 <cell alignment="center" valignment="top" usebox="none">
25963 \begin_layout Plain Layout
25971 <cell alignment="left" valignment="top" usebox="none">
25974 \begin_layout Plain Layout
25980 <cell alignment="left" valignment="top" usebox="none">
25983 \begin_layout Plain Layout
25989 <cell alignment="left" valignment="top" usebox="none">
25992 \begin_layout Plain Layout
25998 <cell alignment="left" valignment="top" usebox="none">
26001 \begin_layout Plain Layout
26007 <cell alignment="center" valignment="top" usebox="none">
26010 \begin_layout Plain Layout
26016 <cell alignment="center" valignment="top" usebox="none">
26019 \begin_layout Plain Layout
26025 <cell alignment="center" valignment="top" usebox="none">
26028 \begin_layout Plain Layout
26034 <cell alignment="center" valignment="top" usebox="none">
26037 \begin_layout Plain Layout
26045 <cell alignment="left" valignment="top" usebox="none">
26048 \begin_layout Plain Layout
26054 <cell alignment="left" valignment="top" usebox="none">
26057 \begin_layout Plain Layout
26063 <cell alignment="left" valignment="top" usebox="none">
26066 \begin_layout Plain Layout
26072 <cell alignment="left" valignment="top" usebox="none">
26075 \begin_layout Plain Layout
26081 <cell alignment="center" valignment="top" usebox="none">
26084 \begin_layout Plain Layout
26090 <cell alignment="center" valignment="top" usebox="none">
26093 \begin_layout Plain Layout
26099 <cell alignment="center" valignment="top" usebox="none">
26102 \begin_layout Plain Layout
26108 <cell alignment="center" valignment="top" usebox="none">
26111 \begin_layout Plain Layout
26125 \begin_layout Standard
26126 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
26127 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
26128 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
26129 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
26130 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
26131 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
26132 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
26133 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
26134 xargs xcolor xy yhmath
26137 \begin_layout Chapter
26138 Names of available colors to be used in layouts
26139 \begin_inset CommandInset label
26141 name "chap:Names-of-colors"
26148 \begin_layout Standard
26149 The colors listed here are the standard colors and the those that you can
26150 adjust in the LyX preferences.
26153 \begin_layout Description
26166 No particular color -- clear or default
26169 \begin_layout Description
26173 \begin_layout Description
26177 \begin_layout Description
26181 \begin_layout Description
26185 \begin_layout Description
26189 \begin_layout Description
26193 \begin_layout Description
26197 \begin_layout Description
26201 \begin_layout Description
26202 cursor Cursor color
26205 \begin_layout Description
26206 background Background color
26209 \begin_layout Description
26210 foreground Foreground color
26213 \begin_layout Description
26214 selection Background color of selected text
26217 \begin_layout Description
26218 selectiontext Foreground color of selected text
26221 \begin_layout Description
26222 latex Text color in LaTeX mode
26225 \begin_layout Description
26226 preview The color used for previews
26229 \begin_layout Description
26230 inlinecompletion Inline completion color
26233 \begin_layout Description
26234 nonunique_inlinecompletion Inline completion color for the non-unique part
26237 \begin_layout Description
26238 notelabel Label color for notes
26241 \begin_layout Description
26242 notebg Background color of notes
26245 \begin_layout Description
26246 commentlabel Label color for comments
26249 \begin_layout Description
26250 commentbg Background color of comments
26253 \begin_layout Description
26254 greyedoutlabel Label color for greyedout insets
26257 \begin_layout Description
26258 greyedouttext Color for greyedout inset text
26261 \begin_layout Description
26262 greyedoutbg Background color of greyedout inset
26265 \begin_layout Description
26266 shadedbg Background color of shaded box
26269 \begin_layout Description
26270 listingsbg Background color of listings inset
26273 \begin_layout Description
26274 branchlabel Label color for branches
26277 \begin_layout Description
26278 footlabel Label color for footnotes
26281 \begin_layout Description
26282 indexlabel Label color for index insets
26285 \begin_layout Description
26286 marginlabel Label color for margin notes
26289 \begin_layout Description
26290 phantomtext Text color for phantom insets
26293 \begin_layout Description
26294 urllabel Label color for URL insets
26297 \begin_layout Description
26298 urltext Color for URL inset text
26301 \begin_layout Description
26302 depthbar Color for the depth bars in the margin
26305 \begin_layout Description
26306 language Color for marking foreign language words
26309 \begin_layout Description
26310 command Text color for command insets
26313 \begin_layout Description
26314 commandbg Background color for command insets
26317 \begin_layout Description
26318 commandframe Frame color for command insets
26321 \begin_layout Description
26322 special Special chars text color
26325 \begin_layout Description
26326 graphicsbg Graphics inset background color
26329 \begin_layout Description
26330 math Math inset text color
26333 \begin_layout Description
26334 mathbg Math inset background color
26337 \begin_layout Description
26338 mathmacrobg Macro math inset background color
26341 \begin_layout Description
26342 mathmacrohoverbg Macro math inset background color hovered
26345 \begin_layout Description
26346 mathmacrolabel Macro math label color
26349 \begin_layout Description
26350 mathmacroframe Macro math frame color
26353 \begin_layout Description
26354 mathmacroblend Macro math blended color
26357 \begin_layout Description
26358 mathmacrooldarg Macro template color for old parameters
26361 \begin_layout Description
26362 mathmacronewarg Macro template color for new parameters
26365 \begin_layout Description
26366 mathframe Math inset frame color under focus
26369 \begin_layout Description
26370 mathcorners Math inset frame color not under focus
26373 \begin_layout Description
26374 mathline Math line color
26377 \begin_layout Description
26378 collapsable Collapsable insets text
26381 \begin_layout Description
26382 collapsableframe Collapsable insets frame
26385 \begin_layout Description
26386 insetbg Inset marker background color
26389 \begin_layout Description
26390 insetframe Inset marker frame color
26393 \begin_layout Description
26394 error Error box text color
26397 \begin_layout Description
26398 eolmarker End of line marker color
26401 \begin_layout Description
26402 added_space Added space colour
26405 \begin_layout Description
26406 appendix Appendix marker color
26409 \begin_layout Description
26410 changebar Changebar color
26413 \begin_layout Description
26414 deletedtext Deleted text color
26417 \begin_layout Description
26418 addedtext Added text color
26421 \begin_layout Description
26422 changedtextauthor1 Changed text color author 1
26425 \begin_layout Description
26426 changedtextauthor2 Changed text color author 2
26429 \begin_layout Description
26430 changedtextauthor3 Changed text color author 3
26433 \begin_layout Description
26434 changedtextauthor4 Changed text color author 4
26437 \begin_layout Description
26438 changedtextauthor5 Changed text color author 5
26441 \begin_layout Description
26442 deletedtextmodifier Deleted text modifying color
26445 \begin_layout Description
26446 tabularline Table line color
26449 \begin_layout Description
26450 tabularonoffline Table line color
26453 \begin_layout Description
26454 bottomarea Bottom area color
26457 \begin_layout Description
26458 newpage New page color
26461 \begin_layout Description
26462 pagebreak Page break color
26465 \begin_layout Description
26466 buttonframe Color used for button frame
26469 \begin_layout Description
26470 buttonbg Color used for bottom background
26473 \begin_layout Description
26474 buttonhoverbg Color used for buttom under focus
26477 \begin_layout Description
26478 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
26482 \begin_layout Description
26483 previewframe Preview frame color
26486 \begin_layout Description
26487 inherit Color is inherited
26490 \begin_layout Description
26491 regexpframe Color for regexp frame
26494 \begin_layout Description
26495 ignore For ignoring updates of a color