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
104 \use_package cancel 0
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 0
109 \use_package stackrel 0
110 \use_package stmaryrd 0
111 \use_package undertilde 0
113 \cite_engine_type numerical
117 \paperorientation portrait
132 \paragraph_separation indent
133 \paragraph_indentation default
134 \quotes_language english
137 \paperpagestyle headings
138 \tracking_changes true
139 \output_changes false
143 \author -712698321 "Jürgen Spitzmüller"
144 \author -195340706 "Georg Baum"
146 \author 155139281 "Jrgen Spitzmller"
147 \author 1082167584 "Kayvan Sylvan" kayvan@sylvan.com
148 \author 1414654397 "Richard Heck"
149 \author 2090807402 "usti"
155 Customizing LyX: Features for the Advanced User
163 \begin_layout Plain Layout
165 If you have comments or error corrections, please send them to the LyX Documenta
167 \begin_inset CommandInset href
169 target "lyx-docs@lists.lyx.org"
176 \begin_inset Quotes eld
180 \begin_inset Quotes erd
183 in the subject header, and please cc the current maintainer of this file,
184 Richard Heck <rgheck@comcast.net>.
190 \begin_inset Newline newline
194 \begin_inset Newline newline
198 \change_deleted -712698321 1357054389
200 \change_inserted -712698321 1357054389
206 \begin_layout Standard
207 \begin_inset CommandInset toc
208 LatexCommand tableofcontents
215 \begin_layout Standard
216 \begin_inset Note Note
219 \begin_layout Plain Layout
220 Please use change tracking when modifying this document.
221 This makes it easier for our translators to recognize things that have
222 been changed, and it helps the maintainer keep up-to-date with what's been
231 \begin_layout Chapter
235 \begin_layout Standard
236 This manual covers the customization features present in LyX.
237 In it, we discuss issues like keyboard shortcuts, screen previewing options,
238 printer options, sending commands to LyX via the LyX Server, internationalizati
239 on, installing new LaTeX classes and LyX layouts, etc.
240 We can't possibly hope to touch on everything you can change—our developers
241 add new features faster than we can document them—but we will explain the
242 most common customizations and hopefully point you in the right direction
243 for some of the more obscure ones.
246 \begin_layout Standard
247 \begin_inset Branch OutDated
250 \begin_layout Standard
251 Information from previous versions of this document that now seems to be
252 outdated is contained in the OutDated branch of this document.
253 By default, this information will not appear in the LaTeX output.
261 \begin_layout Chapter
262 LyX configuration files
265 \begin_layout Standard
266 This chapter aims to help you to find your way through the LyX configuration
268 Before continuing to read this chapter, you should find out where your
269 LyX library and user directories are by using
270 \begin_inset Flex MenuItem
273 \begin_layout Plain Layout
274 Help\SpecialChar \menuseparator
285 The library directory is the place where LyX places its system-wide configurati
286 on files; the user directory is where you can place your modified versions.
287 We will call the former
288 \begin_inset Flex Code
291 \begin_layout Plain Layout
298 \begin_inset Flex MenuItem
301 \begin_layout Plain Layout
307 in the remainder of this document.
311 \begin_layout Section
313 \begin_inset Flex Code
316 \begin_layout Plain Layout
325 \begin_layout Standard
326 \begin_inset Flex Code
329 \begin_layout Plain Layout
335 and its sub-directories contain a number of files and that can be used
336 to customize LyX's behavior.
337 You can change many of these files from within LyX itself through the
338 \begin_inset Flex MenuItem
341 \begin_layout Plain Layout
342 Tools\SpecialChar \menuseparator
349 Most customization that you will want to do in LyX is possible through
351 However, many other inner aspects of LyX can be customized by modifying
353 \begin_inset Flex Code
356 \begin_layout Plain Layout
363 These files fall in different categories, described in the following subsection
367 \begin_layout Subsection
368 Automatically generated files
371 \begin_layout Standard
372 The files, which are to be found in
373 \begin_inset Flex MenuItem
376 \begin_layout Plain Layout
382 , are generated when you configure LyX.
383 They contain various default values that are guessed by inspection.
384 In general, it is not a good idea to modify them, since they might be overwritt
388 \begin_layout Labeling
389 \labelwidthstring 00.00.0000
390 \begin_inset Flex Code
393 \begin_layout Plain Layout
399 contains defaults for various commands.
402 \begin_layout Labeling
403 \labelwidthstring 00.00.0000
404 \begin_inset Flex Code
407 \begin_layout Plain Layout
413 contains the list of packages that have been recognized by LyX.
414 It is currently unused by the LyX program itself, but the information extracted
415 , and more, is made available with
416 \begin_inset Flex MenuItem
419 \begin_layout Plain Layout
420 Help\SpecialChar \menuseparator
433 \begin_layout Labeling
434 \labelwidthstring 00.00.0000
435 \begin_inset Flex Code
438 \begin_layout Plain Layout
444 the list of text classes that have been found in your
445 \begin_inset Flex Code
448 \begin_layout Plain Layout
454 directories, along with the associated LaTeX document class and their descripti
458 \begin_layout Labeling
459 \labelwidthstring 00.00.0000
460 \begin_inset Flex Code
463 \begin_layout Plain Layout
469 the list of layout modules found in your
470 \begin_inset Flex Code
473 \begin_layout Plain Layout
482 \begin_layout Labeling
483 \labelwidthstring 00.00.0000
484 \begin_inset Flex Code
487 \begin_layout Plain Layout
493 lists of various sorts of LaTeX-related files found on your system
496 \begin_layout Labeling
497 \labelwidthstring 00.00.0000
498 \begin_inset Flex Code
501 \begin_layout Plain Layout
507 is automatically generated during configuration from the file
508 \begin_inset Flex Code
511 \begin_layout Plain Layout
518 It contains information on your LaTeX configuration.
521 \begin_layout Subsection
525 \begin_layout Standard
526 These directories are duplicated between
527 \begin_inset Flex Code
530 \begin_layout Plain Layout
537 \begin_inset Flex Code
540 \begin_layout Plain Layout
547 If a particular files exists in both places, the one in
548 \begin_inset Flex Code
551 \begin_layout Plain Layout
560 \begin_layout Labeling
561 \labelwidthstring 00.00.0000
562 \begin_inset Flex Code
565 \begin_layout Plain Layout
571 this directory contains files with the extension
572 \begin_inset Flex Code
575 \begin_layout Plain Layout
581 that define the keybindings used in LyX.
582 If there exists an internationalized version of the bind file named
583 \begin_inset Flex Code
586 \begin_layout Plain Layout
592 , that will be used first.
595 \begin_layout Labeling
596 \labelwidthstring 00.00.0000
597 \begin_inset Flex Code
600 \begin_layout Plain Layout
606 contains graphics files that can be included in documents.
610 \begin_layout Labeling
611 \labelwidthstring 00.00.0000
612 \begin_inset Flex Code
615 \begin_layout Plain Layout
621 contains LyX documentation files (including the one you are currently reading).
623 \begin_inset Flex Code
626 \begin_layout Plain Layout
632 deserves special attention, as noted above.
633 The internationalized help docs are in subdirectories
634 \begin_inset Flex Code
637 \begin_layout Plain Layout
644 \begin_inset Quotes eld
648 \begin_inset Quotes erd
651 is the ISO language code.
657 \begin_inset CommandInset ref
659 reference "cha:Internationalizing-LyX"
666 \begin_layout Labeling
667 \labelwidthstring 00.00.0000
668 \begin_inset Flex Code
671 \begin_layout Plain Layout
677 contains example files that explain how to use some features.
678 In the file browser, press the
679 \begin_inset Flex MenuItem
682 \begin_layout Plain Layout
691 \begin_layout Labeling
692 \labelwidthstring 00.00.0000
693 \begin_inset Flex Code
696 \begin_layout Plain Layout
702 contains image files that are used by the
703 \begin_inset Flex MenuItem
706 \begin_layout Plain Layout
713 In addition, it also contains the individual icons used in the toolbar
714 and the banners that can be shown when LyX is launched.
717 \begin_layout Labeling
718 \labelwidthstring 00.00.0000
719 \begin_inset Flex Code
722 \begin_layout Plain Layout
728 contains keyboard keymapping files.
734 \begin_inset CommandInset ref
736 reference "sec:International-Keymap-Stuff"
743 \begin_layout Labeling
744 \labelwidthstring 00.00.0000
745 \begin_inset Flex Code
748 \begin_layout Plain Layout
754 contains the text class and module files described in Chapter
759 \begin_inset CommandInset ref
761 reference "cha:Installing-New-Document"
768 \begin_layout Labeling
769 \labelwidthstring 00.00.0000
770 \begin_inset Flex Code
773 \begin_layout Plain Layout
780 \begin_inset Flex Code
783 \begin_layout Plain Layout
789 Python scripts used to convert between LyX versions.
790 These can be run from the command line if, say, you want to batch-convert
794 \begin_layout Labeling
795 \labelwidthstring 00.00.0000
796 \begin_inset Flex Code
799 \begin_layout Plain Layout
805 contains some files that demonstrate the capabilities of the
806 \begin_inset Flex MenuItem
809 \begin_layout Plain Layout
820 Also contains some scripts used by LyX itself.
823 \begin_layout Labeling
824 \labelwidthstring 00.00.0000
825 \begin_inset Flex Code
828 \begin_layout Plain Layout
834 contains the standard LyX template files described in Chapter
839 \begin_inset CommandInset ref
841 reference "sub:Creating-Templates"
848 \begin_layout Labeling
849 \labelwidthstring 00.00.0000
850 \begin_inset Flex Code
853 \begin_layout Plain Layout
859 contains files with the extension
860 \begin_inset Flex Code
863 \begin_layout Plain Layout
869 that define the user interface to LyX.
870 That is, the files define which items appear in which menus and the items
871 appearing on the toolbar.
874 \begin_layout Subsection
875 Files you don't want to modify
878 \begin_layout Standard
879 These files are used internally by LyX and you generally do not need to
880 modify them unless you are a developer.
883 \begin_layout Labeling
884 \labelwidthstring 00.00.0000
885 \begin_inset Flex Code
888 \begin_layout Plain Layout
894 this file contains the list of LyX developers.
895 The contents are displayed with the menu entry
896 \begin_inset Flex MenuItem
899 \begin_layout Plain Layout
900 Help\SpecialChar \menuseparator
913 \begin_layout Labeling
914 \labelwidthstring 00.00.0000
915 \begin_inset Flex Code
918 \begin_layout Plain Layout
924 this is a LaTeX script used during the configuration process.
928 \begin_layout Labeling
929 \labelwidthstring 00.00.0000
930 \begin_inset Flex Code
933 \begin_layout Plain Layout
939 this is the script that is used to re-configure LyX.
940 It creates configuration files in the directory it was run from.
943 \begin_layout Subsection
944 Other files needing a line or two
945 \change_deleted -712698321 1357054454
947 \change_inserted -712698321 1357054454
948 \SpecialChar \ldots{}
954 \begin_layout Labeling
955 \labelwidthstring 00.00.0000
956 \begin_inset Flex Code
959 \begin_layout Plain Layout
965 this contains tables describing how different character encodings can be
969 \begin_layout Labeling
970 \labelwidthstring 00.00.0000
971 \begin_inset Flex Code
974 \begin_layout Plain Layout
980 this file contains the templates available to the new
981 \begin_inset Flex MenuItem
984 \begin_layout Plain Layout
997 \begin_layout Labeling
998 \labelwidthstring 00.00.0000
999 \begin_inset Flex Code
1002 \begin_layout Plain Layout
1008 this file contains a list of all the languages currently supported by LyX.
1009 \change_inserted -712698321 1357054565
1013 \begin_layout Labeling
1014 \labelwidthstring 00.00.0000
1016 \change_inserted -712698321 1357054669
1017 \begin_inset Flex Code
1020 \begin_layout Plain Layout
1022 \change_inserted -712698321 1357054669
1030 contains information about the supported fonts.
1031 \change_inserted -195340706 1334775793
1035 \begin_layout Labeling
1036 \labelwidthstring 00.00.0000
1038 \change_inserted -195340706 1334775793
1039 \begin_inset Flex Code
1042 \begin_layout Plain Layout
1044 \change_inserted -195340706 1334775793
1050 this file contains translations for internationalized paragraph styles
1052 \begin_inset space \thinspace{}
1056 \begin_inset CommandInset ref
1058 reference "sub:I18n"
1063 \change_inserted -712698321 1357054494
1067 \begin_layout Labeling
1068 \labelwidthstring 00.00.0000
1070 \change_inserted -712698321 1357054554
1071 \begin_inset Flex Code
1074 \begin_layout Plain Layout
1076 \change_inserted -712698321 1357054508
1084 this file contains information about unicode-encoded glyphs and the way
1085 they are supported by LyX via LaTeX.
1090 \begin_layout Section
1091 Your local configuration directory
1094 \begin_layout Standard
1095 Even if you are using LyX as an unprivileged user, you might want to change
1096 LyX configuration for your own use.
1098 \begin_inset Flex Code
1101 \begin_layout Plain Layout
1107 directory contains all your personal configuration files.
1108 This is the directory described as
1109 \begin_inset Quotes eld
1113 \begin_inset Quotes erd
1117 \begin_inset Flex MenuItem
1120 \begin_layout Plain Layout
1121 Help\SpecialChar \menuseparator
1123 \begin_inset space ~
1132 This directory is used as a mirror of
1133 \begin_inset Flex Code
1136 \begin_layout Plain Layout
1142 , which means that every file in
1143 \begin_inset Flex Code
1146 \begin_layout Plain Layout
1152 is a replacement for the corresponding file in
1153 \begin_inset Flex Code
1156 \begin_layout Plain Layout
1163 Any configuration file described in the above sections can be placed either
1164 in the system-wide directory, in which case it will affect all users, or
1165 in your local directory for your own use.
1168 \begin_layout Standard
1169 To make things clearer, let's provide a few examples:
1172 \begin_layout Itemize
1173 The preferences set in the
1174 \begin_inset Flex MenuItem
1177 \begin_layout Plain Layout
1178 Tools\SpecialChar \menuseparator
1184 dialog are saved to a file
1185 \begin_inset Flex Code
1188 \begin_layout Plain Layout
1195 \begin_inset Flex Code
1198 \begin_layout Plain Layout
1207 \begin_layout Itemize
1208 When you reconfigure using
1209 \begin_inset Flex MenuItem
1212 \begin_layout Plain Layout
1213 Tools\SpecialChar \menuseparator
1220 \begin_inset Flex Code
1223 \begin_layout Plain Layout
1229 script, and the resulting files are written in your local configuration
1231 This means that any additional text class file that you might have added
1233 \begin_inset Flex Code
1236 \begin_layout Plain Layout
1242 will be added to the list of classes in the
1243 \begin_inset Flex MenuItem
1246 \begin_layout Plain Layout
1247 Document\SpecialChar \menuseparator
1256 \begin_layout Itemize
1257 If you get some updated documentation from LyX ftp site and cannot install
1258 it because you do not have sysadmin rights on your system, you can just
1260 \begin_inset Flex Code
1263 \begin_layout Plain Layout
1269 and the items in the
1270 \begin_inset Flex MenuItem
1273 \begin_layout Plain Layout
1279 menu will open them!
1282 \begin_layout Section
1283 Running LyX with multiple configurations
1286 \begin_layout Standard
1287 The configuration freedom of the local configuration directory may not suffice
1288 if you want to have more than one configuration at your disposal.
1289 For example, you may want to be use different key bindings or printer settings
1291 You can achieve this by having several such directories.
1292 You then specify which directory to use at run-time.
1295 \begin_layout Standard
1296 Invoking LyX with the command line switch
1297 \begin_inset Flex Code
1300 \begin_layout Plain Layout
1310 instructs the program to read the configuration from that directory, and
1311 not from the default directory.
1312 (You can determine the default directory by running LyX without the
1313 \begin_inset Flex Code
1316 \begin_layout Plain Layout
1322 switch.) If the specified directory does not exist, LyX offers to create
1323 it for you, just like it does for the default directory on the first time
1324 you run the program.
1325 You can modify the configuration options in this additional user directory
1326 exactly as you would for the default directory.
1327 These directories are completely independent (but read on).
1328 Note that setting the environment variable
1329 \begin_inset Flex Code
1332 \begin_layout Plain Layout
1338 to some value has exactly the same effect.
1341 \begin_layout Standard
1342 Having several configurations also requires more maintenance: if you want
1343 to add a new layout to
1344 \begin_inset Flex Code
1347 \begin_layout Plain Layout
1353 which you want available from all your configurations, you must add it
1354 to each directory separately.
1355 You can avoid this with the following trick: after LyX creates the additional
1356 directory, most of the subdirectories (see above) are empty.
1357 If you want the new configuration to mirror an existing one, replace the
1358 empty subdirectory with a symbolic link to the matching subdirectory in
1359 the existing configuration.
1361 \begin_inset Flex Code
1364 \begin_layout Plain Layout
1370 subdirectory, however, since it contains a file written by the configuration
1371 script (also accessible through
1372 \begin_inset Flex MenuItem
1375 \begin_layout Plain Layout
1376 Tools\SpecialChar \menuseparator
1382 ) which is configuration-specific.
1385 \begin_layout Chapter
1386 The Preferences dialog
1389 \begin_layout Standard
1390 All options of the preferences dialog are described in the Appendix
1392 The Preferences Dialog
1399 For some options you might find here more details.
1402 \begin_layout Section
1404 \begin_inset CommandInset label
1413 \begin_layout Standard
1414 The first step is to define your file formats if they are not already defined.
1416 \begin_inset Flex MenuItem
1419 \begin_layout Plain Layout
1420 Tools\SpecialChar \menuseparator
1428 \begin_inset Flex MenuItem
1431 \begin_layout Plain Layout
1432 File Handling\SpecialChar \menuseparator
1439 \begin_inset Flex MenuItem
1442 \begin_layout Plain Layout
1443 New\SpecialChar \ldots{}
1449 button to define your new format.
1451 \begin_inset Flex MenuItem
1454 \begin_layout Plain Layout
1460 field contains the name used to identify the format in the GUI.
1462 \begin_inset Flex MenuItem
1465 \begin_layout Plain Layout
1471 is used to identify the format internally.
1472 You will also need to enter a file extension.
1473 These are all required.
1475 \begin_inset Flex MenuItem
1478 \begin_layout Plain Layout
1484 field is used to provide a keyboard shortcut on the menus.
1485 (For example, pressing
1486 \begin_inset Flex MenuItem
1489 \begin_layout Plain Layout
1496 \begin_inset Flex MenuItem
1499 \begin_layout Plain Layout
1500 View\SpecialChar \menuseparator
1501 View (Other Formats)\SpecialChar \menuseparator
1510 \begin_layout Standard
1512 \begin_inset Flex MenuItem
1515 \begin_layout Plain Layout
1522 \begin_inset Flex MenuItem
1525 \begin_layout Plain Layout
1532 For example, you might want to use
1533 \begin_inset Flex MenuItem
1536 \begin_layout Plain Layout
1542 to view PostScript files.
1543 You can enter the command needed to start the program in the corresponding
1545 In defining this command, you can use the four variables listed in the
1547 The viewer is launched when you view an image in LyX or use the
1548 \begin_inset Flex MenuItem
1551 \begin_layout Plain Layout
1558 The editor is for example launched when you right-click on an image and
1560 \begin_inset Flex MenuItem
1563 \begin_layout Plain Layout
1569 in the appearing context menu.
1572 \begin_layout Standard
1574 \change_inserted -195340706 1329851811
1576 \begin_inset Flex MenuItem
1579 \begin_layout Plain Layout
1585 type of a format is optional, but if it is specified, it must be unique
1587 It is used to detect files of this format from the file contents.
1588 For some important file formats there is no MIME type officially registered
1590 \begin_inset CommandInset href
1593 target "http://www.iana.org/assignments/media-types/"
1598 Therefore LyX uses the extended list of MIME types as specified by
1599 \begin_inset CommandInset href
1601 name "freedesktop.org"
1602 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1609 \begin_layout Standard
1611 \begin_inset Flex MenuItem
1614 \begin_layout Plain Layout
1620 option tells LyX that a format is suitable for document export.
1621 If this is set and if a suitable conversion route exists (see sec.
1622 \begin_inset space \thinspace{}
1626 \begin_inset CommandInset ref
1628 reference "sec:Converters"
1632 ), the format will appear in the
1633 \begin_inset Flex MenuItem
1636 \begin_layout Plain Layout
1637 File\SpecialChar \menuseparator
1644 The format will also appear in the
1645 \begin_inset Flex MenuItem
1648 \begin_layout Plain Layout
1654 menu if a viewer is specified for the format.
1655 Pure image formats, such as
1656 \begin_inset Flex Code
1659 \begin_layout Plain Layout
1665 , should not use this option.
1666 Formats that can both represent vector graphics and documents like
1667 \begin_inset Flex Code
1670 \begin_layout Plain Layout
1679 \begin_layout Standard
1681 \begin_inset Flex MenuItem
1684 \begin_layout Plain Layout
1685 Vector graphics format
1690 tells LyX that a format can contain vector graphics.
1691 This information is used to determine the target format of included graphics
1693 \begin_inset Flex MenuItem
1696 \begin_layout Plain Layout
1703 Included graphics may need to be converted to either
1704 \begin_inset Flex MenuItem
1707 \begin_layout Plain Layout
1714 \begin_inset Flex MenuItem
1717 \begin_layout Plain Layout
1724 \begin_inset Flex MenuItem
1727 \begin_layout Plain Layout
1734 \begin_inset Flex MenuItem
1737 \begin_layout Plain Layout
1743 cannot handle other image formats.
1744 If an included graphic is not already in
1745 \begin_inset Flex MenuItem
1748 \begin_layout Plain Layout
1755 \begin_inset Flex MenuItem
1758 \begin_layout Plain Layout
1765 \begin_inset Flex MenuItem
1768 \begin_layout Plain Layout
1774 format, it is converted to
1775 \begin_inset Flex MenuItem
1778 \begin_layout Plain Layout
1784 if the vector format option is set, and otherwise to
1785 \begin_inset Flex MenuItem
1788 \begin_layout Plain Layout
1797 \begin_layout Section
1801 \begin_layout Standard
1802 Since all conversions from one format to another take place in LyX's temporary
1803 directory, it is sometimes necessary to modify a file before copying it
1804 to the temporary directory in order that the conversion may be performed.
1808 \begin_layout Plain Layout
1809 For example, the file may refer to other files—images, for example—using
1810 relative file names, and these may become invalid when the file is copied
1811 to the temporary directory.
1816 This is done by a Copier: It copies a file to (or from) the temporary directory
1817 and may modify it in the process.
1820 \begin_layout Standard
1821 The definitions of the copiers may use four variables:
1824 \begin_layout Labeling
1825 \labelwidthstring 00.00.0000
1826 \begin_inset Flex Code
1829 \begin_layout Plain Layout
1835 The LyX system directory (e.
1836 \begin_inset space \thinspace{}
1840 \begin_inset space \space{}
1844 \begin_inset Flex MenuItem
1847 \begin_layout Plain Layout
1856 \begin_layout Labeling
1857 \labelwidthstring 00.00.0000
1858 \begin_inset Flex Code
1861 \begin_layout Plain Layout
1870 \begin_layout Labeling
1871 \labelwidthstring 00.00.0000
1872 \begin_inset Flex Code
1875 \begin_layout Plain Layout
1882 \change_inserted 1082167584 1348453985
1886 \begin_layout Labeling
1887 \labelwidthstring 00.00.0000
1889 \change_inserted 1082167584 1348453986
1890 $$b The base name (without filename extension) in the LyX temporary directory
1893 \begin_layout Labeling
1894 \labelwidthstring 00.00.0000
1896 \change_inserted 1082167584 1348453986
1897 $$p The full directory path of the LyX temporary directory
1900 \begin_layout Labeling
1901 \labelwidthstring 00.00.0000
1903 \change_inserted 1082167584 1348453986
1904 $$r The full pathname to the original LyX file being processed
1907 \begin_layout Labeling
1908 \labelwidthstring 00.00.0000
1910 \change_inserted 1082167584 1348453986
1911 $$f The filename (without any directory path) of the LyX file.
1914 \begin_layout Labeling
1915 \labelwidthstring 00.00.0000
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1926 \change_inserted 1082167584 1348453720
1930 \begin_layout Standard
1931 The latter should be the filename as it would be used in a LaTeX's
1938 It is relevant only when exporting files suitable for such inclusion.
1941 \begin_layout Standard
1942 Copiers can be used to do almost anything with output files.
1943 For example, suppose you want generated pdf files to be copied to a special
1945 \begin_inset Flex Code
1948 \begin_layout Plain Layout
1955 Then you could write a shell script such as this one:
1958 \begin_layout Standard
1959 \begin_inset listings
1963 \begin_layout Plain Layout
1968 \begin_layout Plain Layout
1973 \begin_layout Plain Layout
1975 TOFILE=`basename $2`
1978 \begin_layout Plain Layout
1980 cp $FROMFILE /home/you/pdf/$TOFILE
1985 Save it in your local LyX directory—say,
1986 \begin_inset Flex Code
1989 \begin_layout Plain Layout
1990 /home/you/.lyx/scripts/pdfcopier.sh
1995 —and make it executable, if you need to do so on your platform.
1997 \begin_inset Flex MenuItem
2000 \begin_layout Plain Layout
2001 Tools\SpecialChar \menuseparator
2007 dialog, select under
2008 \begin_inset Flex MenuItem
2011 \begin_layout Plain Layout
2012 File Handling\SpecialChar \menuseparator
2019 \begin_inset Flex MenuItem
2022 \begin_layout Plain Layout
2028 format—or one of the other pdf formats—and enter
2029 \begin_inset Flex Code
2032 \begin_layout Plain Layout
2033 pdfcopier.sh $$i $$o
2039 \begin_inset Flex MenuItem
2042 \begin_layout Plain Layout
2052 \begin_layout Standard
2053 Copiers are used by LyX in various of its own conversions.
2054 For example, if appropriate programs are found, LyX will automatically
2055 install copiers for the
2056 \begin_inset Flex MenuItem
2059 \begin_layout Plain Layout
2066 \begin_inset Flex MenuItem
2069 \begin_layout Plain Layout
2071 \begin_inset space ~
2080 When these formats are exported, the copier sees that not just the main
2081 HTML file but various associated files (style files, images, etc.) are also
2083 All these files are written to a subdirectory of the directory in which
2084 the original LyX file was found.
2088 \begin_layout Plain Layout
2089 This copier can be customized.
2091 \begin_inset Quotes eld
2095 \begin_inset Quotes erd
2098 argument takes a comma-separated list of extensions to be copied; if it
2099 is omitted, all files will be copied.
2101 \begin_inset Quotes eld
2105 \begin_inset Quotes erd
2108 argument determines the extension added to the generated directory.
2110 \begin_inset Quotes eld
2114 \begin_inset Flex MenuItem
2117 \begin_layout Plain Layout
2124 \begin_inset Quotes erd
2127 , so HTML generated from
2128 \begin_inset Flex MenuItem
2131 \begin_layout Plain Layout
2132 /path/to/filename.lyx
2138 \begin_inset Flex MenuItem
2141 \begin_layout Plain Layout
2142 /path/to/filename.html.LyXconv
2156 \begin_layout Section
2158 \begin_inset CommandInset label
2160 name "sec:Converters"
2167 \begin_layout Standard
2168 You can define your own Converters to convert files between different formats.
2170 \begin_inset Flex MenuItem
2173 \begin_layout Plain Layout
2174 Tools\SpecialChar \menuseparator
2175 Preferences\SpecialChar \menuseparator
2176 File Handling\SpecialChar \menuseparator
2185 \begin_layout Standard
2186 To define a new converter, select the
2187 \begin_inset Flex MenuItem
2190 \begin_layout Plain Layout
2192 \begin_inset space ~
2201 \begin_inset Flex MenuItem
2204 \begin_layout Plain Layout
2206 \begin_inset space ~
2214 from the drop-down lists, enter the command needed for the conversion,
2216 \begin_inset Flex MenuItem
2219 \begin_layout Plain Layout
2226 Several variables can be used in the definition of converters:
2229 \begin_layout Labeling
2230 \labelwidthstring 00.00.0000
2231 \begin_inset Flex Code
2234 \begin_layout Plain Layout
2240 The LyX system directory
2243 \begin_layout Labeling
2244 \labelwidthstring 00.00.0000
2245 \begin_inset Flex Code
2248 \begin_layout Plain Layout
2257 \begin_layout Labeling
2258 \labelwidthstring 00.00.0000
2259 \begin_inset Flex Code
2262 \begin_layout Plain Layout
2271 \begin_layout Labeling
2272 \labelwidthstring 00.00.0000
2273 \begin_inset Flex Code
2276 \begin_layout Plain Layout
2282 The base filename of the input file (i.
2283 \begin_inset space \thinspace{}
2286 g., without the extension)
2289 \begin_layout Labeling
2290 \labelwidthstring 00.00.0000
2291 \begin_inset Flex Code
2294 \begin_layout Plain Layout
2300 The path to the input file
2303 \begin_layout Labeling
2304 \labelwidthstring 00.00.0000
2305 \begin_inset Flex Code
2308 \begin_layout Plain Layout
2314 The path to the original input file (this is different from $$p when a
2315 chain of converters is called)
2318 \begin_layout Labeling
2319 \labelwidthstring 00.00.0000
2320 \begin_inset Flex Code
2323 \begin_layout Plain Layout
2329 The iconv name for the encoding of the document.
2332 \begin_layout Standard
2334 \begin_inset Flex MenuItem
2337 \begin_layout Plain Layout
2339 \begin_inset space ~
2347 field you can enter the following flags, separated by commas:
2350 \begin_layout Labeling
2351 \labelwidthstring 00.00.0000
2352 \begin_inset Flex Code
2355 \begin_layout Plain Layout
2361 This converter runs some form of LaTeX.
2362 This will make LyX's LaTeX error logs available.
2365 \begin_layout Labeling
2366 \labelwidthstring 00.00.0000
2367 \begin_inset Flex Code
2370 \begin_layout Plain Layout
2377 \begin_inset Flex MenuItem
2380 \begin_layout Plain Layout
2386 file for the conversion.
2387 \change_inserted 1414654397 1337693117
2391 \begin_layout Labeling
2392 \labelwidthstring 00.00.0000
2394 \change_inserted 1414654397 1337693188
2395 \begin_inset Flex Code
2398 \begin_layout Plain Layout
2400 \change_inserted 1414654397 1337693129
2409 \begin_inset Quotes eld
2413 \begin_inset Quotes erd
2416 file from the backend, which in practice means a LaTeX file like the one
2417 we would export, without
2418 \begin_inset Flex Code
2421 \begin_layout Plain Layout
2423 \change_inserted 1414654397 1337693184
2436 \begin_layout Labeling
2437 \labelwidthstring 00.00.0000
2438 \begin_inset Flex Code
2441 \begin_layout Plain Layout
2450 \begin_layout Standard
2451 The following three flags are not really flags at all because they take
2453 \begin_inset Flex MenuItem
2456 \begin_layout Plain Layout
2458 \begin_inset space ~
2462 \begin_inset space ~
2473 \begin_layout Labeling
2474 \labelwidthstring 00.00.0000
2475 \begin_inset Flex Code
2478 \begin_layout Plain Layout
2484 If set, the converter's standard error will be redirected to a file
2485 \begin_inset Flex Code
2488 \begin_layout Plain Layout
2494 , and the script given as argument will be run as:
2495 \begin_inset Flex Code
2498 \begin_layout Plain Layout
2499 script < infile.out > infile.log
2505 The argument may contain
2506 \begin_inset Flex Code
2509 \begin_layout Plain Layout
2518 \begin_layout Labeling
2519 \labelwidthstring 00.00.0000
2520 \begin_inset Flex Code
2523 \begin_layout Plain Layout
2529 The name of the directory in which the converter will dump the generated
2531 LyX will not create this directory, and it does not copy anything into
2532 it, though it will copy this directory to the destination.
2533 The argument may contain
2534 \begin_inset Flex Code
2537 \begin_layout Plain Layout
2543 , which will be replaced by the base name of the input and output files,
2544 respectively, when the directory is copied.
2545 \begin_inset Newline newline
2548 Note that resultdir and usetempdir make no sense together.
2549 The latter will be ignored if the former is given.
2552 \begin_layout Labeling
2553 \labelwidthstring 00.00.0000
2554 \begin_inset Flex Code
2557 \begin_layout Plain Layout
2563 Determines the output file name and may, contain
2564 \begin_inset Flex Code
2567 \begin_layout Plain Layout
2574 Sensible only with resultdir and optional even then; if not given, it defaults
2578 \begin_layout Standard
2579 None of these last three are presently used in any of the converters that
2580 are installed with LyX.
2584 \begin_layout Standard
2585 You do not have to define converters for all formats between which you want
2587 For example, you will note that there is no `LyX to PostScript' converter,
2588 but LyX will export PostScript.
2589 It does so by first creating a LaTeX file (no converter needs to be defined
2590 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2591 and finally converting the resulting DVI file to PostScript.
2592 LyX finds such `chains' of converters automatically, and it will always
2593 choose the shortest possible chain.
2594 You can, though, still define multiple conversion methods between file
2596 For example, the standard LyX configuration provides
2597 \change_inserted -195340706 1363813100
2599 \change_deleted -195340706 1363813102
2602 ways to convert LaTeX to PDF: Directly, using
2603 \begin_inset Flex MenuItem
2606 \begin_layout Plain Layout
2612 ; via (DVI and) PostScript, using
2613 \begin_inset Flex MenuItem
2616 \begin_layout Plain Layout
2623 \change_deleted -195340706 1363813149
2627 \begin_inset Flex MenuItem
2630 \begin_layout Plain Layout
2637 \change_inserted -195340706 1363813143
2638 ; or directly using XeTeX or LuaTeX
2641 To define such alternate chains, you must define multiple target `file
2642 formats', as described in section
2643 \begin_inset CommandInset ref
2645 reference "sec:Formats"
2650 For example, in the standard configuration, the formats named
2651 \begin_inset Flex MenuItem
2654 \begin_layout Plain Layout
2661 \begin_inset Flex MenuItem
2664 \begin_layout Plain Layout
2671 \change_inserted -195340706 1363813075
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2678 \change_inserted -195340706 1363813079
2685 \begin_inset Flex MenuItem
2688 \begin_layout Plain Layout
2690 \change_inserted -195340706 1363813082
2699 \begin_inset Flex MenuItem
2702 \begin_layout Plain Layout
2704 \change_inserted -195340706 1363813086
2706 \change_deleted -195340706 1363813086
2714 are defined, all of which share the extension
2715 \begin_inset Flex MenuItem
2718 \begin_layout Plain Layout
2724 , and which correspond to the conversion methods just mentioned.
2727 \begin_layout Chapter
2728 Internationalizing LyX
2729 \begin_inset CommandInset label
2731 name "cha:Internationalizing-LyX"
2738 \begin_layout Standard
2739 LyX supports using a translated interface.
2740 Last time we checked, LyX provided text in thirty languages.
2741 The language of choice is called your
2746 (For further reading on locale settings, see also the documentation for
2747 locale that comes with your operating system.
2748 For Linux, the manual page for
2749 \begin_inset Flex Code
2752 \begin_layout Plain Layout
2758 could be a good place to start).
2761 \begin_layout Standard
2762 Notice that these translations will work, but do contain a few flaws.
2763 In particular, all dialogs have been designed with the English text in
2764 mind, which means that some of the translated text will be too large to
2765 fit within the space allocated.
2766 This is only a display problem and will not cause any harm.
2767 Also, you will find that some of the translations do not define shortcut
2768 keys for everything.
2769 Sometimes, there are simply not enough free letters to do it.
2770 Other times, the translator just hasn't got around to doing it yet.
2771 Our localization team, which you may wish to join,
2775 \begin_layout Plain Layout
2776 If you are a fluent speaker of a language other than English, joining these
2777 teams is a great way to give back to the LyX community!
2782 will of course try to fix these shortcomings in future versions of LyX.
2785 \begin_layout Section
2789 \begin_layout Subsection
2790 Translating the graphical user interface (text messages).
2793 \begin_layout Standard
2795 \begin_inset Flex Code
2798 \begin_layout Plain Layout
2804 library to handle the internationalization of the interface.
2805 To have LyX speak your favorite language in all menus and dialogs, you
2807 \begin_inset Flex Code
2810 \begin_layout Plain Layout
2816 -file for that language.
2817 When this is available, you'll have to generate a
2818 \begin_inset Flex Code
2821 \begin_layout Plain Layout
2827 -file from it and install the
2828 \begin_inset Flex Code
2831 \begin_layout Plain Layout
2838 The process of doing all of this is explained in the documentation for
2840 \begin_inset Flex Code
2843 \begin_layout Plain Layout
2850 It is possible to do this just for yourself, but if you're going to do
2851 it, you might as well share the results of your labors with the rest of
2853 Send a message to the LyX developers' list for more information about how
2857 \begin_layout Standard
2858 In short, this is what you should do (xx denotes the language code):
2861 \begin_layout Itemize
2862 Check out the LyX source code.
2864 \begin_inset CommandInset href
2866 name "information on the web"
2867 target "http://www.lyx.org/HowToUseSVN"
2874 \begin_layout Itemize
2876 \begin_inset Flex Code
2879 \begin_layout Plain Layout
2885 to the folder of the
2886 \begin_inset Flex Code
2889 \begin_layout Plain Layout
2897 \begin_inset Flex Code
2900 \begin_layout Plain Layout
2908 \begin_inset Flex Code
2911 \begin_layout Plain Layout
2917 doesn't exist anywhere, it can be remade with the console command
2918 \begin_inset Flex Code
2921 \begin_layout Plain Layout
2927 in that directory, or you can use an existing po-file for some other language
2931 \begin_layout Itemize
2933 \begin_inset Flex Code
2936 \begin_layout Plain Layout
2946 \begin_layout Plain Layout
2947 This is just a text file, so it can be edited in any text editor.
2948 But there are also specialized programs that support such editing, such
2953 (for all platforms) or
2962 contains a `mode' for editing
2963 \begin_inset Flex Code
2966 \begin_layout Plain Layout
2977 For some menu- and widget-labels, there are also shortcut keys that should
2979 Those keys are marked after a `|', and should be translated according to
2980 the words and phrases of the language.
2981 You should also fill also out the information at the beginning of the new
2983 \begin_inset Flex Code
2986 \begin_layout Plain Layout
2992 -file with your email-address, etc., so people know where to reach you with
2993 suggestions and entertaining flames.
2996 \begin_layout Standard
2997 If you are just doing this on your own, then:
3000 \begin_layout Itemize
3002 \begin_inset Flex Code
3005 \begin_layout Plain Layout
3012 This can be done with
3013 \begin_inset Flex Code
3016 \begin_layout Plain Layout
3017 msgfmt -o xx.mo < xx.po
3025 \begin_layout Itemize
3027 \begin_inset Flex Code
3030 \begin_layout Plain Layout
3036 -file to your locale-tree, at the correct directory for application messages
3041 xx, and under the name
3042 \begin_inset Flex Code
3045 \begin_layout Plain Layout
3052 \begin_inset space \thinspace{}
3056 \begin_inset space \space{}
3060 \begin_inset Flex Code
3063 \begin_layout Plain Layout
3064 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3074 \begin_layout Standard
3075 As said, however, it would be best if the new
3076 \begin_inset Flex Code
3079 \begin_layout Plain Layout
3085 -file could be added to the LyX distribution, so others can use it.
3086 Adding it involves making additional changes to LyX.
3087 So send an email to the developers' mailing list if you're interested in
3091 \begin_layout Subsubsection
3095 \begin_layout Standard
3096 Sometimes it turns out that one English message needs to be translated into
3097 different messages in the target language.
3098 One example is the message
3099 \begin_inset Flex Code
3102 \begin_layout Plain Layout
3108 which has the German translation
3116 , depending upon exactly what the English
3117 \begin_inset Quotes eld
3121 \begin_inset Quotes erd
3126 \begin_inset Flex Code
3129 \begin_layout Plain Layout
3135 does not handle such ambiguous translations.
3136 Therefore you have to add some context information to the message: Instead
3138 \begin_inset Flex Code
3141 \begin_layout Plain Layout
3148 \begin_inset Flex Code
3151 \begin_layout Plain Layout
3152 To[[as in 'From format x to format y']]
3158 \begin_inset Flex Code
3161 \begin_layout Plain Layout
3162 To[[as in 'From page x to page y']].
3167 Now the two occurrences of
3168 \begin_inset Flex Code
3171 \begin_layout Plain Layout
3178 \begin_inset Flex Code
3181 \begin_layout Plain Layout
3187 and can be translated correctly to
3198 \begin_layout Standard
3199 Of course the context information needs to be stripped off the original
3200 message when no translation is used.
3201 Therefore you have to put it in double square brackets at the end of the
3202 message (see the example above).
3203 The translation mechanism of LyX ensures that everything in double square
3204 brackets at the end of messages is removed before displaying the message.
3207 \begin_layout Subsection
3208 Translating the documentation.
3211 \begin_layout Standard
3212 The online documentation (in the
3213 \begin_inset Flex MenuItem
3216 \begin_layout Plain Layout
3222 -menu) can (and should!) be translated.
3223 If there are translated versions of the documentation available
3227 \begin_layout Plain Layout
3228 As of March 2008, at least some of the documents have been translated into
3229 fourteen languages, with the Tutorial available in a few more.
3234 and the locale is set accordingly, these will be used automagically by
3236 LyX looks for translated versions as
3237 \begin_inset Flex Code
3240 \begin_layout Plain Layout
3241 LyXDir/doc/xx/DocName.lyx
3247 \begin_inset Flex Code
3250 \begin_layout Plain Layout
3256 is the code for the language currently in use.
3257 If there are no translated documents, the default English versions will
3259 Note that the translated versions must have the same filenames (
3260 \begin_inset Flex Code
3263 \begin_layout Plain Layout
3269 above) as the original.
3270 If you feel up to translating the documentation (an excellent way to proof-read
3271 the original documentation by the way!), there are a few things you should
3275 \begin_layout Itemize
3276 Check out the documentation translation web page at
3277 \begin_inset CommandInset href
3279 name "http://www.lyx.org/Translation"
3280 target "http://www.lyx.org/Translation"
3285 That way, you can find out which (if any) documents have already been translate
3286 d into your language.
3287 You can also find out who (if anyone) is organizing the effort to translate
3288 the documentation into your language.
3289 If no one is organizing the effort, please let us know that you're interested.
3292 \begin_layout Standard
3293 Once you get to actually translating, here's a few hints for you that may
3297 \begin_layout Itemize
3298 Join the documentation team! There is information on how to do that in
3299 \begin_inset Flex Code
3302 \begin_layout Plain Layout
3309 \begin_inset Flex MenuItem
3312 \begin_layout Plain Layout
3313 Help\SpecialChar \menuseparator
3319 ), which by the way is the first document you should translate.
3322 \begin_layout Itemize
3323 Learn the typographic conventions for the language you are translating to.
3324 Typography is an ancient art and over the centuries, a great variety of
3325 conventions have developed throughout different parts of the world.
3326 Also study the professional terminology amongst typographers in your country.
3327 Inventing your own terminology will only confuse the users.
3330 (Warning! Typography is addictive!)
3333 \begin_layout Itemize
3334 Make a copy of the document.
3335 This will be your working copy.
3336 You can use this as your personal translated help-file by placing it in
3338 \begin_inset Flex Code
3341 \begin_layout Plain Layout
3350 \begin_layout Itemize
3351 Sometimes the original document (from the LyX-team) will be updated.
3352 Use the source viewer at
3353 \begin_inset CommandInset href
3355 name "http://www.lyx.org/trac/timeline"
3356 target "http://www.lyx.org/trac/timeline"
3360 to see what has been changed.
3361 That way you can easily see which parts of the translated document need
3365 \begin_layout Standard
3366 If you ever find an error in the original document, fix it and notify the
3367 rest of the documentation team of the changes! (You didn't forget to join
3368 the documentation team, did you?)
3371 \begin_layout Standard
3372 \begin_inset Branch OutDated
3375 \begin_layout Section
3376 International Keyboard Support
3379 \begin_layout Standard
3382 [Editor's Note: The following section is by
3390 It needs to be fixed to conform to the new Documentation Style sheet and
3391 to make use of the new v1.0 features.
3392 The whole thing also needs to be merged with the section following it.-jw
3393 It may also be badly out of date.-rh (2008)]
3396 \begin_layout Subsection
3397 Defining Own Keymaps: Keymap File Format
3400 \begin_layout Standard
3401 Let's look at a keyboard definition file a little closer.
3402 It is a plain text file defining
3405 \begin_layout Itemize
3406 key-to-key or key-to-string translations
3409 \begin_layout Itemize
3413 \begin_layout Itemize
3414 dead keys exceptions
3417 \begin_layout Standard
3418 To define key-to-key or key-to-string translation, use this command:
3421 \begin_layout Quotation
3422 \begin_inset Flex Code
3425 \begin_layout Plain Layout
3434 \begin_inset Flex Code
3437 \begin_layout Plain Layout
3446 \begin_layout Standard
3448 \begin_inset Flex Code
3451 \begin_layout Plain Layout
3457 is the key to be translated and
3458 \begin_inset Flex Code
3461 \begin_layout Plain Layout
3467 is the string to be inserted into the document.
3468 To define dead keys, use:
3471 \begin_layout Quotation
3472 \begin_inset Flex Code
3475 \begin_layout Plain Layout
3484 \begin_inset Flex Code
3487 \begin_layout Plain Layout
3496 \begin_layout Standard
3498 \begin_inset Flex Code
3501 \begin_layout Plain Layout
3507 is a keyboard key and
3508 \begin_inset Flex Code
3511 \begin_layout Plain Layout
3518 The following dead keys are supported (shortcut name is in parentheses):
3521 \begin_layout Quotation
3525 \begin_inset space \hfill{}
3531 \begin_layout Quotation
3533 \begin_inset space \hfill{}
3539 \begin_layout Quotation
3541 \begin_inset space \hfill{}
3547 \begin_layout Quotation
3549 \begin_inset space \hfill{}
3555 \begin_layout Quotation
3557 \begin_inset space \hfill{}
3563 \begin_layout Quotation
3565 \begin_inset space \hfill{}
3572 \begin_layout Plain Layout
3584 \begin_layout Quotation
3586 \begin_inset space \hfill{}
3592 \begin_layout Quotation
3594 \begin_inset space \hfill{}
3601 \begin_layout Plain Layout
3613 \begin_layout Quotation
3615 \begin_inset space \hfill{}
3621 \begin_layout Quotation
3623 \begin_inset space \hfill{}
3629 \begin_layout Quotation
3631 \begin_inset space \hfill{}
3638 \begin_layout Plain Layout
3650 \begin_layout Quotation
3652 \begin_inset space \hfill{}
3659 \begin_layout Plain Layout
3671 \begin_layout Quotation
3673 \begin_inset space \hfill{}
3679 \begin_layout Quotation
3680 hungarian umlaut (hug)
3681 \begin_inset space \hfill{}
3687 \begin_layout Quotation
3689 \begin_inset space \hfill{}
3695 \begin_layout Quotation
3697 \begin_inset space \hfill{}
3704 \begin_layout Plain Layout
3716 \begin_layout Standard
3717 Since in many international keyboards there are exceptions to what some
3718 dead keys should do, you can define them using
3721 \begin_layout Quotation
3722 \begin_inset Flex Code
3725 \begin_layout Plain Layout
3733 deadkey key outstring
3736 \begin_layout Standard
3737 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3741 \begin_layout Quotation
3742 \begin_inset Flex Code
3745 \begin_layout Plain Layout
3758 \begin_layout Standard
3759 to make it work correctly.
3760 Also, you have to define as exceptions dead keys over i and j, to remove
3761 the dot from them before inserting an accent mark.
3762 I will change this when the time comes, but so far I haven't had time.
3765 \begin_layout Standard
3766 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3769 \begin_inset Flex Code
3772 \begin_layout Plain Layout
3778 have different meaning.
3780 \begin_inset Flex Code
3783 \begin_layout Plain Layout
3789 marks comments, quotes start and end LaTeX-style commands.
3790 To enter quote, you'll need to use
3791 \begin_inset Flex Code
3794 \begin_layout Plain Layout
3803 \begin_inset Flex Code
3806 \begin_layout Plain Layout
3813 \begin_inset Flex Code
3816 \begin_layout Plain Layout
3827 \begin_layout Standard
3828 If you make a keyboard description file that works for your language, please
3829 mail it to me, so I can include it in the next keymap distribution.
3832 \begin_layout Standard
3833 More keywords will be supported in keymap configuration file in future,
3837 \begin_layout Itemize
3838 \begin_inset Flex Code
3841 \begin_layout Plain Layout
3852 \begin_inset space \hfill{}
3856 \begin_inset Flex Code
3859 \begin_layout Plain Layout
3868 \begin_layout Itemize
3869 \begin_inset Flex Code
3872 \begin_layout Plain Layout
3883 \begin_inset space \hfill{}
3887 \begin_inset Flex Code
3890 \begin_layout Plain Layout
3896 an external keymap translation program
3899 \begin_layout Standard
3900 Also, it should look into
3901 \begin_inset Flex Code
3904 \begin_layout Plain Layout
3910 file for defaults, too (for example, a
3911 \begin_inset Flex Code
3914 \begin_layout Plain Layout
3922 option to include default keyboard).
3930 \begin_layout Section
3931 International Keymap Stuff
3932 \begin_inset CommandInset label
3934 name "sec:International-Keymap-Stuff"
3941 \begin_layout Standard
3942 \begin_inset Note Note
3945 \begin_layout Plain Layout
3946 In doing the revisions on this document in March 2008, I did not look over
3947 this stuff, as I do not understand it.
3948 It would be good if someone else could do so.
3957 \begin_layout Standard
3958 The next two sections describe the
3959 \begin_inset Flex Code
3962 \begin_layout Plain Layout
3971 \begin_inset Flex Code
3974 \begin_layout Plain Layout
3982 file syntax in detail.
3983 These sections should help you design your own key map if the ones provided
3984 do not meet your needs.
3987 \begin_layout Subsection
3991 \begin_layout Standard
3995 \begin_inset Flex Code
3998 \begin_layout Plain Layout
4004 file maps keystrokes to characters or strings.
4005 As the name suggests, it sets a keyboard mapping.
4007 \begin_inset Flex Code
4010 \begin_layout Plain Layout
4021 \begin_inset Flex Code
4024 \begin_layout Plain Layout
4039 \begin_inset Flex Code
4042 \begin_layout Plain Layout
4055 \begin_inset Flex Code
4058 \begin_layout Plain Layout
4067 \begin_inset Flex Code
4070 \begin_layout Plain Layout
4078 are described in this section.
4081 \begin_layout Labeling
4082 \labelwidthstring 00.00.0000
4083 \begin_inset Flex Code
4086 \begin_layout Plain Layout
4094 Map a character to a string
4097 \begin_layout LyX-Code
4112 \begin_layout Standard
4145 the double-quote (")
4162 must be escaped with a preceding backslash (
4173 \begin_layout Standard
4175 \begin_inset Flex MenuItem
4178 \begin_layout Plain Layout
4186 statement to cause the symbol
4187 \begin_inset Flex MenuItem
4190 \begin_layout Plain Layout
4198 to be output for the keystroke
4199 \begin_inset Flex MenuItem
4202 \begin_layout Plain Layout
4213 \begin_layout LyX-Code
4219 \begin_layout Labeling
4220 \labelwidthstring 00.00.0000
4221 \begin_inset Flex Code
4224 \begin_layout Plain Layout
4232 Specify an accent character
4235 \begin_layout LyX-Code
4244 \begin_layout Standard
4245 This will make the cha
4283 This is the dead key
4287 \begin_layout Plain Layout
4294 refers to a key that does not produce a character by itself, but when followed
4295 with another key, produces the desired accent character.
4296 For example, a German characte
4298 r with an umlaut like
4308 can be produced in this manner.
4317 \begin_layout Standard
4330 and then another key not in
4347 followed by the other, not allowed key, as output.
4351 \begin_inset Flex MenuItem
4354 \begin_layout Plain Layout
4362 cancels a dead key, so if
4373 \begin_inset Flex MenuItem
4376 \begin_layout Plain Layout
4385 , the cursor will not go one position backwards but will instead cancel
4401 might have had on the next keystroke.
4405 \begin_layout Standard
4406 The following example specifies that the character ' is to be an acute accent,
4407 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4410 \begin_layout LyX-Code
4413 kmod ' acute aeiouAEIOU
4416 \begin_layout Labeling
4417 \labelwidthstring 00.00.0000
4418 \begin_inset Flex Code
4421 \begin_layout Plain Layout
4427 Specify an exception to the accent character
4430 \begin_layout LyX-Code
4439 \begin_layout Standard
4440 This defines an exce
4481 have been assigned a keystroke with a previous
4484 \begin_inset Flex Code
4487 \begin_layout Plain Layout
4511 must not belong in the
4558 If such a declaration does not exist in
4566 \begin_inset Flex Code
4569 \begin_layout Plain Layout
4603 \begin_inset Flex Code
4606 \begin_layout Plain Layout
4620 \begin_layout Standard
4621 The following command produces causes äi to be produced when you enter acute-i
4625 \begin_layout LyX-Code
4639 \begin_layout Labeling
4640 \labelwidthstring 00.00.0000
4641 \begin_inset Flex Code
4644 \begin_layout Plain Layout
4650 Combine two accent characters
4653 \begin_layout LyX-Code
4659 accent1 accent2 allowed
4662 \begin_layout Standard
4663 This one is getting pretty esoteric.
4664 It allows you to combine the effect
4720 \begin_inset Flex Code
4723 \begin_layout Plain Layout
4751 \begin_layout Standard
4752 Consider this example from the
4753 \begin_inset Flex Code
4756 \begin_layout Plain Layout
4767 \begin_layout LyX-Code
4770 kmod ; acute aeioyvhAEIOYVH
4774 kcomb acute umlaut iyIY
4777 \begin_layout Standard
4778 This allows you to press
4779 \begin_inset Flex MenuItem
4782 \begin_layout Plain Layout
4790 and get the effect of
4791 \begin_inset Flex Code
4794 \begin_layout Plain Layout
4813 in this case cancels the last dead key, so if you press
4814 \begin_inset Flex MenuItem
4817 \begin_layout Plain Layout
4826 \begin_inset Flex Code
4829 \begin_layout Plain Layout
4842 \begin_layout Subsection
4846 \begin_layout Standard
4848 \begin_inset Flex Code
4851 \begin_layout Plain Layout
4859 mapping is performed, a
4860 \begin_inset Flex Code
4863 \begin_layout Plain Layout
4873 file maps the strings that the symbols generate to characters in the current
4875 The LyX distribution currently includes at least the
4876 \begin_inset Flex Code
4879 \begin_layout Plain Layout
4888 \begin_inset Flex Code
4891 \begin_layout Plain Layout
4902 \begin_layout Standard
4904 \begin_inset Flex Code
4907 \begin_layout Plain Layout
4915 file is a sequence of declarations of the form
4918 \begin_layout LyX-Code
4931 \begin_layout Standard
4932 For example, in order to map
4933 \begin_inset Flex MenuItem
4936 \begin_layout Plain Layout
4946 to the corresponding character in the iso-8859-1 set (233), the following
4950 \begin_layout LyX-Code
4958 \begin_layout Standard
4960 \begin_inset Flex Code
4963 \begin_layout Plain Layout
4972 \begin_inset Flex Code
4975 \begin_layout Plain Layout
4993 the same character can apply to more than one string.
4995 \begin_inset Flex Code
4998 \begin_layout Plain Layout
5009 \begin_layout LyX-Code
5021 \begin_inset Newline newline
5037 \begin_layout Standard
5038 If LyX cannot find a mapping for the string produced by the keystroke or
5039 a deadkey sequence, it will check if it looks like an accented char and
5040 try to draw an accent over the character on screen.
5043 \begin_layout Subsection
5047 \begin_layout Standard
5048 There is a second way to add support for international characters through
5049 so-called dead-keys.
5050 A dead-key works in combination with a letter to produce an accented character.
5051 Here, we'll explain how to create a really simple dead-key to illustrate
5055 \begin_layout Standard
5056 Suppose you happen to need the circumflex character,
5057 \begin_inset Quotes eld
5061 \begin_inset Quotes erd
5066 \begin_inset Flex MenuItem
5069 \begin_layout Plain Layout
5076 \begin_inset space ~
5080 \begin_inset Flex MenuItem
5083 \begin_layout Plain Layout
5089 ] to the LyX command
5090 \begin_inset Flex Code
5093 \begin_layout Plain Layout
5100 \begin_inset Flex Code
5103 \begin_layout Plain Layout
5110 Now, whenever you type the
5111 \begin_inset Flex MenuItem
5114 \begin_layout Plain Layout
5120 -key followed by a letter, that letter will have a circumflex accent on
5122 For example, the sequence
5123 \begin_inset Quotes eld
5127 \begin_inset Flex MenuItem
5130 \begin_layout Plain Layout
5137 \begin_inset Quotes erd
5140 produces the letter:
5141 \begin_inset Quotes eld
5145 \begin_inset Quotes erd
5149 If you tried to type
5150 \begin_inset Quotes eld
5154 \begin_inset Flex MenuItem
5157 \begin_layout Plain Layout
5164 \begin_inset Quotes erd
5167 , however, LyX will complain with a beep, since a
5168 \begin_inset Quotes eld
5172 \begin_inset Flex MenuItem
5175 \begin_layout Plain Layout
5182 \begin_inset Quotes erd
5185 never takes a circumflex accent.
5187 \begin_inset Flex MenuItem
5190 \begin_layout Plain Layout
5196 after a dead-key produces the bare-accent.
5197 Please note this last point! If you bind a key to a dead-key, you'll need
5198 to rebind the character on that key to yet another key.
5200 \begin_inset Flex MenuItem
5203 \begin_layout Plain Layout
5209 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5212 \begin_layout Standard
5213 One common way to bind dead-keys is to use
5214 \begin_inset Flex MenuItem
5217 \begin_layout Plain Layout
5224 \begin_inset Flex MenuItem
5227 \begin_layout Plain Layout
5234 \begin_inset Flex MenuItem
5237 \begin_layout Plain Layout
5243 in combination with an accent, like
5244 \begin_inset Quotes eld
5248 \begin_inset Flex MenuItem
5251 \begin_layout Plain Layout
5258 \begin_inset Quotes erd
5262 \begin_inset Quotes eld
5266 \begin_inset Flex MenuItem
5269 \begin_layout Plain Layout
5276 \begin_inset Quotes erd
5280 \begin_inset Quotes eld
5284 \begin_inset Flex MenuItem
5287 \begin_layout Plain Layout
5294 \begin_inset Quotes erd
5298 Another way involves using
5299 \begin_inset Flex Code
5302 \begin_layout Plain Layout
5309 \begin_inset Flex Code
5312 \begin_layout Plain Layout
5318 to set up the special
5319 \begin_inset Flex Code
5322 \begin_layout Plain Layout
5330 \begin_inset Flex Code
5333 \begin_layout Plain Layout
5339 acts in some ways just like
5340 \begin_inset Flex MenuItem
5343 \begin_layout Plain Layout
5349 and permits you to bind keys to accented characters.
5350 You can also turn keys into dead-keys by binding them to something like
5352 \begin_inset Flex Code
5355 \begin_layout Plain Layout
5361 and then binding this symbolic key to the corresponding LyX command.
5365 \begin_layout Plain Layout
5370 : This is exactly what I do in my
5371 \begin_inset Flex Code
5374 \begin_layout Plain Layout
5381 \begin_inset Flex Code
5384 \begin_layout Plain Layout
5392 \begin_inset Flex MenuItem
5395 \begin_layout Plain Layout
5397 \begin_inset space ~
5406 \begin_inset Flex Code
5409 \begin_layout Plain Layout
5415 and a bunch of these
5416 \begin_inset Quotes eld
5420 \begin_inset Flex Code
5423 \begin_layout Plain Layout
5430 \begin_inset Quotes erd
5433 symbolic keys bound such things as
5434 \begin_inset Flex MenuItem
5437 \begin_layout Plain Layout
5439 \begin_inset space ~
5448 \begin_inset Flex MenuItem
5451 \begin_layout Plain Layout
5453 \begin_inset space ~
5462 This is how I produce my accented characters.
5467 You can make just about anything into the
5468 \begin_inset Flex Code
5471 \begin_layout Plain Layout
5478 \begin_inset Flex MenuItem
5481 \begin_layout Plain Layout
5487 keys, a spare function key, etc.
5488 As for the LyX commands that produce accents, check the entry for
5489 \begin_inset Flex Code
5492 \begin_layout Plain Layout
5503 You'll find the complete list there.
5506 \begin_layout Subsection
5507 Saving your Language Configuration
5510 \begin_layout Standard
5511 You can edit your preferences so that your desired language environment
5512 is automatically configured when LyX starts up, via the
5513 \begin_inset Flex MenuItem
5516 \begin_layout Plain Layout
5517 Edit\SpecialChar \menuseparator
5526 \begin_layout Chapter
5527 Installing New Document Classes, Layouts, and Templates
5528 \begin_inset CommandInset label
5530 name "cha:Installing-New-Document"
5535 \begin_inset Argument 1
5538 \begin_layout Plain Layout
5539 Installing New Document Classes
5547 \begin_layout Standard
5548 In this chapter, we describe the procedures for creating and installing
5549 new LyX layout and template files, as well as offer a refresher on correctly
5550 installing new LaTeX document classes.
5554 \begin_layout Standard
5555 First, let us a say a few words about how one ought to think about the relation
5556 between LyX and LaTeX.
5557 The thing to understand is that, in a certain sense, LyX doesn't know anything
5559 Indeed, from LyX's point of view, LaTeX is just one of several
5560 \begin_inset Quotes eld
5564 \begin_inset Quotes erd
5567 in which it is capable of producing output.
5568 Other such formats are DocBook, plaintext, and XHTML.
5569 LaTeX is, of course, a particularly important format, but very little of
5570 the information LyX has about LaTeX is actually contained in the program
5575 \begin_layout Plain Layout
5576 Some commands are sufficiently complex that they are
5577 \begin_inset Quotes eld
5581 \begin_inset Quotes erd
5585 But the developers generally regard this as a Bad Thing.
5590 Rather, that information, even for the standard classes like
5591 \begin_inset Flex Code
5594 \begin_layout Plain Layout
5600 , is contained in `layout files'.
5601 Similarly, LyX itself does not know much about DocBook or XHTML.
5602 What it knows is contained in layout files.
5605 \begin_layout Standard
5606 You can think of the layout file for a given document class as a translation
5607 manual between LyX constructs---paragraphs with their corresponding styles,
5608 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5610 Almost everything LyX knows about
5611 \begin_inset Flex Code
5614 \begin_layout Plain Layout
5620 , for example, is contained in the file
5621 \begin_inset Flex Code
5624 \begin_layout Plain Layout
5630 and in various other files it includes.
5631 For this reason, anyone intending to write layout files should plan to
5632 study the existing files.
5633 A good place to start is with
5634 \begin_inset Flex Code
5637 \begin_layout Plain Layout
5643 , which is included in
5644 \begin_inset Flex Code
5647 \begin_layout Plain Layout
5654 \begin_inset Flex Code
5657 \begin_layout Plain Layout
5663 , and many of the other layout files for document classes.
5664 This file is where sections and the like are defined:
5665 \begin_inset Flex Code
5668 \begin_layout Plain Layout
5674 tells LyX how paragraphs that are marked with the Section, Subsection,
5675 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5678 \begin_inset Flex Code
5681 \begin_layout Plain Layout
5687 file basically just includes several of these
5688 \begin_inset Flex Code
5691 \begin_layout Plain Layout
5700 \begin_layout Standard
5701 Defining the LyX--LaTeX correspondence is not the only thing layout files
5703 Their other job is to define how the LyX constructs themselves will appear
5705 The fact that layout files have these two jobs is often a source of confusion,
5706 because they are completely separate.
5707 Telling LyX how to translate a certain paragraph style into LaTeX does
5708 not tell LyX how to display it; conversely, telling LyX how to display
5709 a certain paragraph style does not tell LyX how to translate it into LaTeX
5710 (let alone tell LaTeX how to display it).
5711 So, in general, when you define a new LyX construct, you must always do
5712 two quite separate things: (i)
5713 \begin_inset space ~
5716 tell LyX how to translate it into LaTeX and (ii)
5717 \begin_inset space ~
5720 tell LyX how to display it.
5723 \begin_layout Standard
5724 Much the same is true, of course, as regards LyX's other backend formats,
5725 though XHTML is in some ways different, because in that case LyX
5729 able, to some extent, to use information about how it should display a
5730 paragraph on the screen to output information (in the form of CSS) about
5731 how the paragraph should be displayed in a browser.
5732 Even in this case, however, the distinction between what LyX does internally
5733 and how things are rendered externally remains in force, and the two can
5734 be controlled separately.
5736 \begin_inset CommandInset ref
5738 reference "sec:Tags-for-XHTML"
5745 \begin_layout Section
5746 Installing new LaTeX files
5749 \begin_layout Standard
5750 Some installations may not include a LaTeX package or class file that you
5751 would like to use within LyX.
5752 For example, you might need FoilTeX, a package for preparing slides for
5753 overhead projectors.
5754 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5755 a user interface for installing such packages.
5756 For example, with MiKTeX, you start the program
5757 \begin_inset Quotes eld
5761 \begin_inset space ~
5765 \begin_inset Quotes erd
5768 to get a list of available packages.
5769 To install one of them, right click on it or use the corresponding toolbar
5773 \begin_layout Standard
5774 If your LaTeX distribution does not provide such a `package manager', or
5775 if the package is not available from your distribution, then follow these
5776 steps to install it manually:
5779 \begin_layout Enumerate
5780 Get the package from
5781 \begin_inset CommandInset href
5784 target "http://www.ctan.org/"
5791 \begin_layout Enumerate
5792 If the package contains a file with the ending
5793 \begin_inset Quotes eld
5797 \begin_inset Flex Code
5800 \begin_layout Plain Layout
5807 \begin_inset Quotes erd
5810 (is the case for FoilTeX) then open a console, change to the folder of
5811 this file and execute the command
5812 \begin_inset Flex Code
5815 \begin_layout Plain Layout
5822 You have now unpacked the package and have all files to install it.
5823 Most LaTeX-packages are not packed and you can skip this step.
5826 \begin_layout Enumerate
5827 Now you need to decide if the package should be available for all users
5832 \begin_layout Enumerate
5833 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5834 for all users on your system, then install it in your `local' TeX tree,
5835 otherwise install it in your own `user' TeX tree.
5836 Where these trees should be created, if they do not already exist, depends
5838 To find this out, look in the file
5839 \begin_inset Flex Code
5842 \begin_layout Plain Layout
5852 \begin_layout Plain Layout
5853 This is usually in the directory
5854 \begin_inset Flex Code
5857 \begin_layout Plain Layout
5863 , though you can execute the command
5864 \begin_inset Flex Code
5867 \begin_layout Plain Layout
5878 The location of the `local' TeX tree is defined by the
5879 \begin_inset Flex Code
5882 \begin_layout Plain Layout
5888 variable; this is usually somewhere like
5889 \begin_inset Flex Code
5892 \begin_layout Plain Layout
5893 /usr/local/share/texmf
5899 The location of the `user' TeX tree is defined by
5900 \begin_inset Flex Code
5903 \begin_layout Plain Layout
5910 \begin_inset Flex Code
5913 \begin_layout Plain Layout
5920 (If these variables are not predefined, you have to define them.) You'll
5921 probably need root permissions to create or modify the `local' tree, but
5922 not for your `user' tree.
5923 \begin_inset Newline newline
5926 In general, it is recommended to install in the user tree because your user
5927 will not be modified or even overwritten when you upgrade your system.
5928 It will typically also be backed up together with everything else when
5929 you backup your home directory (which, of course, you do on a regular basis).
5932 \begin_layout Enumerate
5933 On Windows, if you want the new package to be available for all users on
5934 your system, change to the folder where LaTeX is installed and then change
5936 \begin_inset Flex Code
5939 \begin_layout Plain Layout
5950 (For MiKTeX, this would be by default the folder
5951 \begin_inset Flex Code
5954 \begin_layout Plain Layout
5972 \begin_layout Plain Layout
5973 Note that this will be the correct path only on English installations.
5974 On a German one, it would be
5975 \begin_inset Flex Code
5978 \begin_layout Plain Layout
5992 , and similarly for other languages.
5997 Create there a new folder
5998 \begin_inset Flex Code
6001 \begin_layout Plain Layout
6007 and copy all files of the package into it.
6009 \begin_inset Newline newline
6012 If the package should only available for you or you don't have admin permissions
6013 , do the same, but in the local LaTeX folder.
6015 \begin_inset space \thinspace{}
6019 \begin_inset space ~
6022 2.8 under Windows XP, this would be the folder:
6023 \begin_inset Newline newline
6029 \begin_inset Flex Code
6032 \begin_layout Plain Layout
6035 Documents and Settings
6047 \begin_inset Newline newline
6053 \begin_inset Phantom HPhantom
6056 \begin_layout Plain Layout
6067 \begin_inset Flex Code
6070 \begin_layout Plain Layout
6083 \begin_inset Newline newline
6086 On Vista, it would be:
6087 \begin_inset Newline newline
6091 \begin_inset Flex Code
6094 \begin_layout Plain Layout
6120 \begin_layout Enumerate
6121 Now one only need to tell LaTeX that there are new files.
6122 This depends on the used LaTeX-Distribution:
6126 \begin_layout Enumerate
6127 For TeXLive execute the command
6128 \begin_inset Flex Code
6131 \begin_layout Plain Layout
6138 If you installed the package for all users, then you will probably need
6139 to have root permissions for that.
6142 \begin_layout Enumerate
6143 For MiKTeX, if you have installed the package for all users, start the program
6145 \begin_inset Quotes eld
6149 \begin_inset space ~
6153 \begin_inset Quotes erd
6156 and press the button marked
6157 \begin_inset Quotes eld
6161 \begin_inset Quotes erd
6165 Otherwise start the program
6166 \begin_inset Quotes eld
6170 \begin_inset Quotes erd
6177 \begin_layout Enumerate
6178 Finally, you need to tell LyX that there are new packages available.
6179 So, in LyX, use the menu
6180 \begin_inset Flex MenuItem
6183 \begin_layout Plain Layout
6186 \SpecialChar \menuseparator
6192 and then restart LyX.
6195 \begin_layout Standard
6196 Now the package is installed.
6197 In our example, the document class
6198 \begin_inset Flex Code
6201 \begin_layout Plain Layout
6203 \begin_inset space ~
6210 \begin_layout Plain Layout
6222 will now be available under
6223 \begin_inset Flex MenuItem
6226 \begin_layout Plain Layout
6227 Document\SpecialChar \menuseparator
6228 Settings\SpecialChar \menuseparator
6238 \begin_layout Standard
6239 If you would like to use a LaTeX document class that is not even listed
6241 \begin_inset Flex MenuItem
6244 \begin_layout Plain Layout
6245 Document\SpecialChar \menuseparator
6246 Settings\SpecialChar \menuseparator
6252 , then you need to create a `layout' file for it.
6253 That is the topic of the next section.
6256 \begin_layout Section
6257 Types of layout files
6260 \begin_layout Standard
6261 This section describes the various sorts of LyX files that contain layout
6263 These files describe various paragraph and character styles, determining
6264 how LyX should display them and how they should be translated into LaTeX,
6265 DocBook, XHTML, or whatever output format is being used.
6269 \begin_layout Standard
6270 We shall try to provide a thorough description of the process of writing
6272 However, there are so many different types of documents supported even
6273 by just LaTeX that we can't hope to cover every different possibility or
6274 problem you might encounter.
6275 The LyX users' list is frequented by people with lots of experience with
6276 layout design who are willing to share what they've learned, so please
6277 feel free to ask questions there.
6280 \begin_layout Standard
6281 As you prepare to write a new layout, it is extremely helpful to look at
6282 the layouts distributed with LyX.
6283 If you write a LyX layout for a LaTeX document class that might also be
6284 used by others, or write a module that might be useful to others, then
6285 you should consider posting your layout to the
6286 \begin_inset CommandInset href
6288 name "layout section on the LyX wiki"
6289 target "http://wiki.lyx.org/Layouts/Layouts"
6293 or even to the LyX developers' list, so that it might be included in LyX
6298 \begin_layout Plain Layout
6299 Note that LyX is licensed under the General Public License, so any material
6300 that is contributed to LyX must be similarly licensed.
6308 \begin_layout Subsection
6310 \begin_inset CommandInset label
6312 name "sub:Layout-modules"
6319 \begin_layout Standard
6320 We have spoken to this point about `layout files'.
6321 But there are different sorts of files that contain layout information.
6322 Layout files, strictly so called, have the
6323 \begin_inset Flex Code
6326 \begin_layout Plain Layout
6332 extension and provide LyX with information about document classes.
6333 As of LyX 1.6, however, layout information can also be contained in layout
6339 \begin_inset Flex Code
6342 \begin_layout Plain Layout
6349 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6350 some modules—such as the
6351 \begin_inset Flex Code
6354 \begin_layout Plain Layout
6360 module—specifically provide support for one package.
6361 In a sense, layout modules are similar to included
6365 \begin_layout Plain Layout
6366 These can have any extension, but by convention have the
6367 \begin_inset Flex Code
6370 \begin_layout Plain Layout
6382 \begin_inset Flex Code
6385 \begin_layout Plain Layout
6391 —in that modules are not specific to a given document class but may be used
6392 with many different classes.
6393 The difference is that using an included file with
6394 \begin_inset Flex Code
6397 \begin_layout Plain Layout
6403 requires editing that file.
6404 Modules, by contrast, are selected in the
6405 \begin_inset Flex MenuItem
6408 \begin_layout Plain Layout
6409 Document\SpecialChar \menuseparator
6418 \begin_layout Standard
6419 Building modules is the easiest way to get started with layout editing,
6420 since it can be as simple as adding a single new paragraph style or flex
6422 But modules may, in principle, contain anything a layout file can contain.
6425 \begin_layout Standard
6426 After creating a new module and copying it to the
6427 \begin_inset Flex Code
6430 \begin_layout Plain Layout
6436 folder, you will need to reconfigure and then restart LyX for the module
6437 to appear in the menu.
6438 However, changes you make to the module will be seen immediately, if you
6440 \begin_inset Flex MenuItem
6443 \begin_layout Plain Layout
6444 Document\SpecialChar \menuseparator
6450 , highlight something, and then hit
6451 \begin_inset Quotes eld
6455 \begin_inset Quotes erd
6461 It is strongly recommended that you save your work before doing this
6466 it is strongly recommended that you not attempt to edit modules while simultaneo
6467 usly working on actual documents
6470 Though of course the developers strive to keep LyX stable in such situations,
6471 syntax errors and the like in your module file could cause strange behavior.
6474 \begin_layout Subsubsection
6478 \begin_layout Standard
6479 Modules are to LyX as packages are to LaTeX.
6480 Sometimes, however, you find yourself wanting a specific inset or character
6481 style just for one document and writing a module that will also be available
6482 to other documents makes little sense.
6483 What you need is LyX's
6484 \begin_inset Quotes eld
6488 \begin_inset Quotes erd
6494 \begin_layout Standard
6495 You will find it under
6497 Document\SpecialChar \menuseparator
6498 Settings\SpecialChar \menuseparator
6502 The large text box allows you to enter anything that you might enter in
6503 a layout file or module.
6504 You can think of a document's local layout, in fact, as a module that belongs
6506 So, in particular, you must enter a
6507 \begin_inset Flex Code
6510 \begin_layout Plain Layout
6517 Any format is acceptable, but one would normally use the format current
6519 (In LyX 2.0, the current layout format is 35.) You should be aware that local
6520 layout is not supported by versions of LyX prior to 1.6, so you should not
6521 use it if you want to be able to export your document to LyX 1.5 or earlier
6522 (without, that is, losing the local layout information).
6523 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6524 though there is no UI for it---then you should use format 11 and, of course,
6525 use only layout constructs that were available in LyX 1.6.
6528 \begin_layout Standard
6529 When you have entered something in the
6530 \begin_inset Flex Code
6533 \begin_layout Plain Layout
6539 pane, LyX will enable the
6540 \begin_inset Quotes eld
6544 \begin_inset Quotes erd
6547 button at the bottom.
6548 Clicking this button will cause LyX to determine whether what you have
6549 entered is valid layout information for the chosen format.
6550 LyX will report the result but, unfortunately, will not tell you what errors
6551 there might have been.
6552 These will be written to the terminal, however, if LyX is started from
6554 You will not be permitted to save your local layout until you have entered
6558 \begin_layout Standard
6559 The warnings at the end of the previous section apply here, too.
6560 Do not play with local layout while you are actually working, especially
6561 if you have not saved your document.
6562 That said, using local layout with a test document can be a very convenient
6563 way to try out layout ideas, or even to start developing a module.
6566 \begin_layout Subsection
6568 \begin_inset Flex MenuItem
6571 \begin_layout Plain Layout
6580 \begin_layout Standard
6581 There are two situations you are likely to encounter when wanting to support
6582 a new LaTeX document class, involving style (
6583 \begin_inset Flex Code
6586 \begin_layout Plain Layout
6592 ) files and LaTeX2e class (
6593 \begin_inset Flex Code
6596 \begin_layout Plain Layout
6603 Supporting a style file is usually fairly easy.
6604 Supporting a new class file is a bit harder.
6605 We'll discuss the former in this section and the latter in the next.
6606 Similar remarks apply, of course, if you want to support a new DocBook
6610 \begin_layout Standard
6611 The easier case is the one in which your new document class is provided
6612 as a style file that is to be used in conjunction with an already supported
6614 For the sake of the example, we'll assume that the style file is called
6616 \begin_inset Flex MenuItem
6619 \begin_layout Plain Layout
6625 and that it is meant to be used with
6626 \begin_inset Flex MenuItem
6629 \begin_layout Plain Layout
6635 , which is a standard class.
6639 \begin_layout Standard
6640 Start by copying the existing class's layout file into your local directory:
6644 \begin_layout Plain Layout
6645 Of course, which directory is your local directory will vary by platform,
6646 and LyX allows you to specify your local directory on startup, too, using
6648 \begin_inset Flex Code
6651 \begin_layout Plain Layout
6665 \begin_layout LyX-Code
6666 cp report.layout ~/.lyx/layouts/myclass.layout
6669 \begin_layout Standard
6671 \begin_inset Flex Code
6674 \begin_layout Plain Layout
6680 and change the line:
6683 \begin_layout LyX-Code
6686 DeclareLaTeXClass{report}
6689 \begin_layout Standard
6693 \begin_layout LyX-Code
6696 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6699 \begin_layout Standard
6703 \begin_layout LyX-Code
6705 \begin_inset Newline newline
6711 \begin_inset Newline newline
6717 \begin_layout Standard
6718 near the top of the file.
6721 \begin_layout Standard
6722 Start LyX and select
6723 \begin_inset Flex MenuItem
6726 \begin_layout Plain Layout
6727 Tools\SpecialChar \menuseparator
6734 Then restart LyX and try creating a new document.
6736 \begin_inset Flex MenuItem
6739 \begin_layout Plain Layout
6745 " as a document class option in the
6746 \begin_inset Flex MenuItem
6749 \begin_layout Plain Layout
6750 Document\SpecialChar \menuseparator
6757 It is likely that some of the sectioning commands and such in your new
6758 class will work differently from how they worked in the base class—
6759 \begin_inset Flex Code
6762 \begin_layout Plain Layout
6768 in this example—so you can fiddle around with the settings for the different
6769 sections if you wish.
6770 The layout information for sections is contained in
6771 \begin_inset Flex Code
6774 \begin_layout Plain Layout
6780 , but you do not need to copy and change this file.
6781 Instead, you can simply add your changes to your layout file, after the
6783 \begin_inset Flex Code
6786 \begin_layout Plain Layout
6792 , which itself includes
6793 \begin_inset Flex Code
6796 \begin_layout Plain Layout
6803 For example, you might add these lines:
6806 \begin_layout LyX-Code
6810 \begin_layout LyX-Code
6814 \begin_layout LyX-Code
6818 \begin_layout LyX-Code
6822 \begin_layout LyX-Code
6826 \begin_layout Standard
6827 to change the font for chapter headings to sans-serif.
6828 This will override (or, in this case, add to) the existing declaration
6829 for the Chapter style.
6833 \begin_layout Standard
6834 Your new package may also provide commands or environments not present in
6836 In this case, you will want to add these to the layout file.
6838 \begin_inset space ~
6842 \begin_inset CommandInset ref
6844 reference "sec:TextClass"
6848 for information on how to do so.
6851 \begin_layout Standard
6853 \begin_inset Flex MenuItem
6856 \begin_layout Plain Layout
6862 can be used with several different document classes, and even if it cannot,
6863 you might find it easiest just to write a module that you can load with
6865 The simplest possible such module would be:
6868 \begin_layout LyX-Code
6871 DeclareLyXModule{My Package}
6874 \begin_layout LyX-Code
6878 \begin_layout LyX-Code
6879 #Support for mypkg.sty.
6882 \begin_layout LyX-Code
6884 \begin_inset Newline newline
6890 \begin_layout LyX-Code
6892 \begin_inset Newline newline
6898 \begin_layout LyX-Code
6900 \begin_inset Newline newline
6906 \begin_inset Newline newline
6912 \begin_layout Standard
6913 A more complex module might modify the behavior of some existing constructs
6914 or define some new ones.
6916 \begin_inset space ~
6920 \begin_inset CommandInset ref
6922 reference "sec:TextClass"
6929 \begin_layout Subsection
6931 \begin_inset Flex MenuItem
6934 \begin_layout Plain Layout
6943 \begin_layout Standard
6944 There are two possibilities here.
6945 One is that the class file is itself based upon an existing document class.
6946 For example, many thesis classes are based upon
6947 \begin_inset Flex MenuItem
6950 \begin_layout Plain Layout
6957 To see whether yours is, look for a line like
6960 \begin_layout LyX-Code
6966 \begin_layout Standard
6968 If so, then you may proceed largely as in the previous section, though
6970 \begin_inset Flex Code
6973 \begin_layout Plain Layout
6979 line will be different.
6980 If your new class is
6981 \begin_inset Flex Code
6984 \begin_layout Plain Layout
6990 and it is based upon
6991 \begin_inset Flex Code
6994 \begin_layout Plain Layout
7000 , then the line should read:
7004 \begin_layout Plain Layout
7005 And it will be easiest if you save the file to
7006 \begin_inset Flex Code
7009 \begin_layout Plain Layout
7015 : LyX assumes that the document class has the same name as the layout file.
7024 \begin_layout LyX-Code
7027 DeclareLaTeXClass[thesis,book]{thesis}
7030 \begin_layout Standard
7031 If, on the other hand, the new class is not based upon an existing class,
7032 you will probably have to
7033 \begin_inset Quotes eld
7037 \begin_inset Quotes erd
7041 We strongly suggest copying an existing layout file which uses a similar
7042 LaTeX class and then modifying it, if you can do so.
7043 At least use an existing file as a starting point so you can find out what
7044 items you need to worry about.
7045 Again, the specifics are covered below.
7048 \begin_layout Subsection
7050 \begin_inset CommandInset label
7052 name "sub:Creating-Templates"
7059 \begin_layout Standard
7060 Once you have written a layout file for a new document class, you might
7061 want to consider writing a
7066 A template acts as a kind of tutorial for your layout, showing how it might
7067 be used, though containing dummy content.
7068 You can of course look at the various templates included with LyX for ideas.
7071 \begin_layout Standard
7072 Templates are created just like usual documents: using LyX.
7073 The only difference is that usual documents contain all possible settings,
7074 including the font scheme and the paper size.
7075 Usually a user doesn't want a template to overwrite his preferred settings
7076 for such parameters.
7077 For that reason, the designer of a template should remove the corresponding
7079 \begin_inset Flex Code
7082 \begin_layout Plain Layout
7091 \begin_inset Flex Code
7094 \begin_layout Plain Layout
7102 from the template LyX file.
7103 This can be done with any simple text-editor, for example
7104 \begin_inset Flex Code
7107 \begin_layout Plain Layout
7114 \begin_inset Flex Code
7117 \begin_layout Plain Layout
7126 \begin_layout Standard
7127 Put the edited template files you create in
7128 \begin_inset Flex Code
7131 \begin_layout Plain Layout
7137 , copy the ones you use from the global template directory in
7138 \begin_inset Flex Code
7141 \begin_layout Plain Layout
7147 to the same place, and redefine the template path in the
7148 \begin_inset Flex MenuItem
7151 \begin_layout Plain Layout
7152 Tools\SpecialChar \menuseparator
7153 Preferences\SpecialChar \menuseparator
7162 \begin_layout Standard
7163 Note, by the way, that there is a template which has a particular meaning:
7165 \begin_inset Flex Code
7168 \begin_layout Plain Layout
7175 This template is loaded every time you create a new document with
7176 \begin_inset Flex MenuItem
7179 \begin_layout Plain Layout
7180 File\SpecialChar \menuseparator
7186 in order to provide useful defaults.
7187 To create this template from inside LyX, all you have to do is to open
7188 a document with the correct settings, and use the
7189 \begin_inset Flex MenuItem
7192 \begin_layout Plain Layout
7193 Save as Document Defaults
7201 \begin_layout Subsection
7202 Upgrading old layout files
7205 \begin_layout Standard
7206 The format of layout files changes with each LyX release, so old layout
7207 files need to be converted to the new format.
7208 If LyX reads a layout file in an older format, it automatically calls the
7210 \begin_inset Flex Code
7213 \begin_layout Plain Layout
7219 to convert it to a temporary file in current format.
7220 The original file is left untouched.
7221 If you use the layout file often, then, you may want to convert it permanently,
7222 so that LyX does not have to do so itself every time.
7223 To do this, you can call the converter manually:
7226 \begin_layout Enumerate
7228 \begin_inset Flex Code
7231 \begin_layout Plain Layout
7238 \begin_inset Flex Code
7241 \begin_layout Plain Layout
7250 \begin_layout Enumerate
7252 \begin_inset Newline newline
7256 \begin_inset Flex Code
7259 \begin_layout Plain Layout
7260 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7266 \begin_inset Newline newline
7270 \begin_inset Flex Code
7273 \begin_layout Plain Layout
7279 is the name of your LyX system directory.
7282 \begin_layout Standard
7283 Note that manual conversion does not affect included files, so these will
7284 have to be converted separately.
7287 \begin_layout Section
7288 \begin_inset CommandInset label
7290 name "sec:TextClass"
7294 The layout file format
7297 \begin_layout Standard
7298 The following sections describe how layout files are structured and written.
7299 Our advice is to go slowly, save and test often.
7300 It is really not that hard, except that the multitude of options can become
7301 overwhelming, especially if you try to check out too many at once.
7302 It becomes easier if you use existing layouts of LyX as examples/reference
7303 or if you modify an existing layout to your needs.
7306 \begin_layout Standard
7307 Note that all the tags used in layout files are case-insensitive.
7309 \begin_inset Flex Code
7312 \begin_layout Plain Layout
7319 \begin_inset Flex Code
7322 \begin_layout Plain Layout
7329 \begin_inset Flex Code
7332 \begin_layout Plain Layout
7338 are really the same tag.
7339 The possible arguments are printed in brackets after the tag's name.
7340 The default argument is typeset
7341 \begin_inset Flex Code
7344 \begin_layout Plain Layout
7353 If the argument has a data type like
7354 \begin_inset Quotes eld
7358 \begin_inset Quotes erd
7362 \begin_inset Quotes eld
7366 \begin_inset Quotes erd
7369 , the default is shown like this:
7370 \begin_inset Flex Code
7373 \begin_layout Plain Layout
7384 \begin_layout Subsection
7385 The document class declaration
7386 \change_inserted -712698321 1349766602
7392 \begin_layout Standard
7393 Lines in a layout file which begin with
7394 \begin_inset Flex Code
7397 \begin_layout Plain Layout
7404 There is one exception to this rule.
7406 \begin_inset Flex Code
7409 \begin_layout Plain Layout
7415 files should begin with
7416 \change_deleted -712698321 1349766533
7420 \change_inserted -712698321 1349766536
7426 \begin_layout LyX-Code
7429 #% Do not delete the line below; configure depends on this
7432 \begin_layout LyX-Code
7438 \change_deleted -712698321 1349766193
7440 \change_inserted -712698321 1349766201
7441 Article (Standard Class)
7444 \change_inserted -712698321 1349766538
7448 \begin_layout LyX-Code
7450 \change_inserted -712698321 1349766581
7455 DeclareCategory{Articles}
7460 \begin_layout Standard
7462 \change_inserted -712698321 1349766695
7466 \change_inserted -712698321 1349766626
7470 \change_deleted -712698321 1349766628
7472 \change_inserted -712698321 1349766628
7475 used when you (re)configure LyX.
7476 The layout file is read by the LaTeX script
7477 \begin_inset Flex Code
7480 \begin_layout Plain Layout
7486 , in a special mode where
7487 \begin_inset Flex Code
7490 \begin_layout Plain Layout
7497 The first line is just a LaTeX comment,
7498 \change_deleted -712698321 1349766656
7501 the second one contains the
7502 \change_inserted -712698321 1349766650
7505 declaration of the text class
7506 \change_inserted -712698321 1349766689
7507 , and the third line contains the optional classification of the class
7510 If these lines appear in a file named
7511 \begin_inset Flex Code
7514 \begin_layout Plain Layout
7520 , then they define a text class of name
7521 \begin_inset Flex Code
7524 \begin_layout Plain Layout
7530 (the name of the layout file) which uses the LaTeX document class
7531 \begin_inset Flex Code
7534 \begin_layout Plain Layout
7540 (the default is to use the same name as the layout).
7542 \begin_inset Quotes eld
7546 \change_deleted -712698321 1349766253
7548 \change_inserted -712698321 1349766260
7549 Article (Standard Class)
7552 \begin_inset Quotes erd
7555 that appears above is used as a description of the text class in the
7556 \begin_inset Flex MenuItem
7559 \begin_layout Plain Layout
7560 Document\SpecialChar \menuseparator
7568 \change_inserted -712698321 1349767097
7570 \begin_inset Quotes eld
7574 \begin_inset Quotes erd
7577 in the example) is also used in the
7578 \begin_inset Flex MenuItem
7581 \begin_layout Plain Layout
7583 \change_inserted -712698321 1349766801
7584 Document\SpecialChar \menuseparator
7590 dialog: the text classes are grouped by these categories (which are usually
7591 genres, so typical categories are
7592 \begin_inset Quotes eld
7596 \begin_inset Quotes erd
7600 \begin_inset Quotes eld
7604 \begin_inset Quotes erd
7608 \begin_inset Quotes eld
7612 \begin_inset Quotes erd
7616 \begin_inset Quotes eld
7620 \begin_inset Quotes erd
7624 \begin_inset Quotes eld
7628 \begin_inset Quotes erd
7632 \begin_inset Quotes eld
7636 \begin_inset Quotes erd
7640 If no category has been declared, the class will be put in the
7641 \begin_inset Quotes eld
7645 \begin_inset Quotes erd
7653 \begin_layout Standard
7654 Let's assume that you wrote your own text class that uses the
7655 \begin_inset Flex Code
7658 \begin_layout Plain Layout
7664 document class, but where you changed the appearance of the section headings.
7665 If you put it in a file
7666 \begin_inset Flex Code
7669 \begin_layout Plain Layout
7675 , the header of this file should be:
7678 \begin_layout LyX-Code
7681 #% Do not delete the line below; configure depends on this
7684 \begin_layout LyX-Code
7689 DeclareLaTeXClass[article]{
7690 \change_deleted -712698321 1349766303
7692 \change_inserted -712698321 1349766303
7696 \change_deleted -712698321 1349766338
7698 \change_inserted -712698321 1349766338
7702 \change_deleted -712698321 1349766340
7704 \change_inserted -712698321 1349766340
7708 \change_deleted -712698321 1349766343
7710 \change_inserted -712698321 1349766343
7714 \change_inserted -712698321 1349767223
7718 \begin_layout LyX-Code
7720 \change_inserted -712698321 1349767223
7725 DeclareCategory{Articles}
7730 \begin_layout Standard
7731 This declares a text class
7732 \begin_inset Flex Code
7735 \begin_layout Plain Layout
7741 , associated with the LaTeX document class
7742 \begin_inset Flex Code
7745 \begin_layout Plain Layout
7752 \begin_inset Quotes eld
7756 \change_deleted -712698321 1349766329
7758 \change_inserted -712698321 1349766329
7762 \change_deleted -712698321 1349766347
7764 \change_inserted -712698321 1349766347
7768 \change_deleted -712698321 1349766350
7770 \change_inserted -712698321 1349766350
7774 \change_deleted -712698321 1349766352
7776 \change_inserted -712698321 1349766352
7780 \begin_inset Quotes erd
7784 If your text class depends on several packages, you can declare it as:
7787 \begin_layout LyX-Code
7790 #% Do not delete the line below; configure depends on this
7793 \begin_layout LyX-Code
7798 DeclareLaTeXClass[article,foo.sty]{
7799 \change_deleted -712698321 1349766366
7801 \change_inserted -712698321 1349766366
7805 \change_deleted -712698321 1349766369
7807 \change_inserted -712698321 1349766369
7811 \change_deleted -712698321 1349766371
7813 \change_inserted -712698321 1349766371
7817 \change_deleted -712698321 1349766374
7819 \change_inserted -712698321 1349766374
7823 \change_inserted -712698321 1349767240
7827 \begin_layout LyX-Code
7829 \change_inserted -712698321 1349767240
7834 DeclareCategory{Articles}
7839 \begin_layout Standard
7840 This indicates that your text class uses the
7841 \begin_inset Flex Code
7844 \begin_layout Plain Layout
7851 Finally, it is also possible to declare classes for DocBook code.
7852 Typical declarations will look like:
7855 \begin_layout LyX-Code
7858 #% Do not delete the line below; configure depends on this
7861 \begin_layout LyX-Code
7866 DeclareDocBookClass[article]{SGML (DocBook
7867 \change_deleted -712698321 1349766387
7869 \change_inserted -712698321 1349766387
7873 \change_inserted -712698321 1349767247
7877 \begin_layout LyX-Code
7879 \change_inserted -712698321 1349767302
7884 DeclareCategory{Articles (DocBook)}
7889 \begin_layout Standard
7890 Note that these declarations can also be given an optional parameter declaring
7891 the name of the document class (but not a list).
7894 \begin_layout Standard
7895 So, to be as explicit as possible, the form of the layout declaration is:
7898 \begin_layout LyX-Code
7903 DeclareLaTeXClass[class,package.sty]{layout description}
7904 \change_inserted -712698321 1349767329
7908 \begin_layout LyX-Code
7910 \change_inserted -712698321 1349767339
7915 DeclareCategory{category}
7920 \begin_layout Standard
7921 The class need only be specified if the name of the LaTeX class file and
7922 the name of the layout file are different or if there are packages to load.
7923 If the name of the class file is not specified, then LyX will simply assume
7924 that it is the same as the name of the layout file.
7927 \begin_layout Standard
7928 When the text class has been modified to your taste, all you have to do
7929 is to copy it either to
7930 \begin_inset Flex Code
7933 \begin_layout Plain Layout
7940 \begin_inset Flex Code
7943 \begin_layout Plain Layout
7950 \begin_inset Flex MenuItem
7953 \begin_layout Plain Layout
7954 Tools\SpecialChar \menuseparator
7960 , exit LyX and restart.
7961 Then your new text class should be available along with the others.
7964 \begin_layout Standard
7965 Once the layout file is installed, you can edit it and see your changes
7966 without having to reconfigure or to restart LyX.
7971 \begin_layout Plain Layout
7972 In versions of LyX prior to 1.6, this was not true.
7973 As a result, editing layout files was very time consuming, since you had
7974 constantly to restart LyX to see changes.
7979 You can force a reload of the current layout by using the LyX function
7981 \begin_inset Flex MenuItem
7984 \begin_layout Plain Layout
7991 There is no default binding for this function—though, of course, you can
7992 bind it to a key yourself.
7993 But you will normally use this function simply by entering it in the mini-buffe
7998 \begin_layout Standard
8004 \begin_inset Flex MenuItem
8007 \begin_layout Plain Layout
8013 is very much an `advanced feature'.
8018 recommended that you save your work before using this function.
8023 recommended that you not attempt to edit layout information while simultaneousl
8024 y working on a document that you care about.
8025 Use a test document.
8026 Syntax errors and the like in your layout file could cause peculiar behavior.
8027 In particular, such errors could cause LyX to regard the current layout
8028 as invalid and to attempt to switch to some other layout.
8032 \begin_layout Plain Layout
8033 Really bad syntax errors may even caused LyX to exit.
8034 This is because certain sorts of errors may make LyX unable to read
8044 The LyX team strives to keep LyX stable in such situations, but safe is
8049 \begin_layout Plain Layout
8050 While we're giving advice: make regular backups.
8051 And be nice to your mother.
8059 \begin_layout Subsection
8060 The Module declaration
8063 \begin_layout Standard
8064 A module must begin with a line like the following:
8067 \begin_layout LyX-Code
8070 DeclareLyXModule[endnotes.sty]{Endnotes}
8073 \begin_layout Standard
8074 The mandatory argument, in curly brackets, is the name of the module, as
8076 \begin_inset Flex MenuItem
8079 \begin_layout Plain Layout
8080 Document\SpecialChar \menuseparator
8081 Settings\SpecialChar \menuseparator
8088 The argument in square brackets is optional: It declares any LaTeX packages
8089 on which the module depends.
8090 It is also possible to use the form
8091 \begin_inset Flex MenuItem
8094 \begin_layout Plain Layout
8100 as an optional argument, which declares that the module can only be used
8101 when there exists a conversion chain between the formats `
8102 \begin_inset Flex Code
8105 \begin_layout Plain Layout
8112 \begin_inset Flex Code
8115 \begin_layout Plain Layout
8124 \begin_layout Standard
8125 The module declaration should then be followed by lines like the following
8129 \begin_layout Plain Layout
8130 Preferably in English if the module should be published with LyX.
8131 This description will appear in the list of messages to be translated and
8132 will be thus translated with the next interface update.
8140 \begin_layout LyX-Code
8144 \begin_layout LyX-Code
8145 #Adds an endnote command, in addition to footnotes.
8149 \begin_layout LyX-Code
8150 #You will need to add
8152 theendnotes in TeX code where you
8155 \begin_layout LyX-Code
8156 #want the endnotes to appear.
8160 \begin_layout LyX-Code
8164 \begin_layout LyX-Code
8165 #Requires: somemodule | othermodule
8168 \begin_layout LyX-Code
8169 #Excludes: badmodule
8172 \begin_layout Standard
8173 The description is used in
8174 \begin_inset Flex MenuItem
8177 \begin_layout Plain Layout
8178 Document\SpecialChar \menuseparator
8179 Settings\SpecialChar \menuseparator
8185 to provide the user with information about what the module does.
8187 \begin_inset Flex Code
8190 \begin_layout Plain Layout
8196 line is used to identify other modules with which this one must be used;
8198 \begin_inset Flex Code
8201 \begin_layout Plain Layout
8207 line is used to identify modules with which this one may not be used.
8208 Both are optional, and, as shown, multiple modules should be separated
8209 with the pipe symbol: |.
8210 Note that the required modules are treated disjunctively:
8214 of the required modules must be used.
8219 excluded module may be used.
8220 Note that modules are identified here by their filenames without the
8221 \begin_inset Flex Code
8224 \begin_layout Plain Layout
8232 \begin_inset Flex Code
8235 \begin_layout Plain Layout
8242 \begin_inset Flex Code
8245 \begin_layout Plain Layout
8254 \begin_layout Subsection
8258 \begin_layout Standard
8259 The first non-comment line of any layout file, included file, or module
8264 contain the file format number:
8267 \begin_layout Description
8268 \begin_inset Flex Code
8271 \begin_layout Plain Layout
8278 \begin_inset Flex Code
8281 \begin_layout Plain Layout
8287 ] The format number of the layout file.
8290 \begin_layout Standard
8291 This tag was introduced with LyX
8292 \begin_inset space ~
8296 Layout files from older LyX versions do not have an explicit file format
8297 and are considered to have
8298 \begin_inset Flex Code
8301 \begin_layout Plain Layout
8303 \begin_inset space ~
8312 The format for the present version of LyX is format 35.
8313 But each version of LyX is capable of reading earlier versions' layout
8314 files, just as they are capable of reading files produced by earlier versions
8316 There is, however, no provision for converting to earlier formats.
8319 \begin_layout Subsection
8320 \begin_inset CommandInset label
8322 name "sub:General-text-class"
8326 General text class parameters
8329 \begin_layout Standard
8330 These are general parameters that govern the behavior of an entire document
8336 mean that they must appear in
8337 \begin_inset Flex Code
8340 \begin_layout Plain Layout
8346 files rather than in modules.
8347 A module can contain any layout tag.)
8350 \begin_layout Description
8351 \begin_inset Flex Code
8354 \begin_layout Plain Layout
8360 Adds information that will be output in the
8361 \begin_inset Flex Code
8364 \begin_layout Plain Layout
8370 block when the document is output to XHTML.
8371 Typically, this would be used to output CSS style information, but it can
8372 be used for anything that can appear in
8373 \begin_inset Flex Code
8376 \begin_layout Plain Layout
8384 \begin_inset Quotes eld
8388 \begin_inset Flex Code
8391 \begin_layout Plain Layout
8398 \begin_inset Quotes erd
8404 \begin_layout Description
8405 \begin_inset Flex Code
8408 \begin_layout Plain Layout
8414 Adds information to the document preamble.
8416 \begin_inset Newline newline
8420 \begin_inset Quotes eld
8424 \begin_inset Flex Code
8427 \begin_layout Plain Layout
8434 \begin_inset Quotes erd
8440 \begin_layout Description
8441 \begin_inset Flex Code
8444 \begin_layout Plain Layout
8450 Defines formats for use in the display of bibliographic information.
8452 \begin_inset CommandInset ref
8454 reference "sub:Citation-format-description"
8460 \begin_inset Quotes eld
8464 \begin_inset Flex Code
8467 \begin_layout Plain Layout
8474 \begin_inset Quotes erd
8480 \begin_layout Description
8481 \begin_inset Flex Code
8484 \begin_layout Plain Layout
8490 Describes various global options supported by the document class.
8492 \begin_inset space ~
8496 \begin_inset CommandInset ref
8498 reference "sub:ClassOptions"
8504 \begin_inset Quotes eld
8508 \begin_inset Flex Code
8511 \begin_layout Plain Layout
8518 \begin_inset Quotes erd
8524 \begin_layout Description
8525 \begin_inset Flex Code
8528 \begin_layout Plain Layout
8535 \begin_inset Flex Code
8538 \begin_layout Plain Layout
8547 \begin_inset space \thinspace{}
8551 \begin_inset Flex Code
8554 \begin_layout Plain Layout
8560 ] Whether the class should
8564 to having one or two columns.
8565 Can be changed in the
8566 \begin_inset Flex MenuItem
8569 \begin_layout Plain Layout
8570 Document\SpecialChar \menuseparator
8579 \begin_layout Description
8580 \begin_inset Flex Code
8583 \begin_layout Plain Layout
8590 \begin_inset Flex Code
8593 \begin_layout Plain Layout
8599 ] This sequence defines the properties for a counter.
8600 If the counter does not yet exist, it is created; if it does exist, it
8603 \begin_inset Quotes eld
8607 \begin_inset Flex Code
8610 \begin_layout Plain Layout
8617 \begin_inset Quotes erd
8621 \begin_inset Newline newline
8625 \begin_inset space ~
8629 \begin_inset CommandInset ref
8631 reference "sub:Counters"
8635 for details on counters.
8638 \begin_layout Description
8639 \begin_inset Flex Code
8642 \begin_layout Plain Layout
8648 Sets the default font used to display the document.
8650 \begin_inset space ~
8654 \begin_inset CommandInset ref
8656 reference "sub:Font-description"
8660 for how to declare fonts.
8662 \begin_inset Quotes eld
8666 \begin_inset Flex Code
8669 \begin_layout Plain Layout
8676 \begin_inset Quotes erd
8682 \begin_layout Description
8683 \begin_inset Flex Code
8686 \begin_layout Plain Layout
8693 \begin_inset Flex Code
8696 \begin_layout Plain Layout
8702 ] Specifies a module to be included by default with this document class.
8703 The module is specified as filename without the
8704 \begin_inset Flex Code
8707 \begin_layout Plain Layout
8714 The user can still remove the module, but it will be active at the outset.
8715 (This applies only when new files are created, or when this class is chosen
8716 for an existing document.)
8719 \begin_layout Description
8720 \begin_inset Flex Code
8723 \begin_layout Plain Layout
8730 \begin_inset Flex Code
8733 \begin_layout Plain Layout
8739 ] This is the style that will be assigned to new paragraphs, usually
8740 \begin_inset Flex MenuItem
8743 \begin_layout Plain Layout
8750 This will default to the first defined style if not given, but you are
8751 encouraged to use this directive.
8754 \begin_layout Description
8755 \begin_inset Flex Code
8758 \begin_layout Plain Layout
8765 \begin_inset Flex Code
8768 \begin_layout Plain Layout
8774 ] This tag indicates that the module (which is specified by filename without
8776 \begin_inset Flex Code
8779 \begin_layout Plain Layout
8785 extension) cannot be used with this document class.
8786 This might be used in a journal-specific layout file to prevent, say, the
8788 \begin_inset Flex Code
8791 \begin_layout Plain Layout
8797 module that numbers theorems by section.
8802 be used in a module.
8803 Modules have their own way of excluding other modules (see section
8804 \begin_inset space ~
8808 \begin_inset CommandInset ref
8810 reference "sub:Layout-modules"
8817 \begin_layout Description
8818 \begin_inset Flex Code
8821 \begin_layout Plain Layout
8827 Defines a new float.
8829 \begin_inset space ~
8833 \begin_inset CommandInset ref
8835 reference "sub:Floats"
8841 \begin_inset Quotes eld
8845 \begin_inset Flex Code
8848 \begin_layout Plain Layout
8855 \begin_inset Quotes erd
8861 \begin_layout Description
8862 \begin_inset Flex Code
8865 \begin_layout Plain Layout
8871 Sets the information that will be output in the
8872 \begin_inset Flex Code
8875 \begin_layout Plain Layout
8881 block when this document class is output to XHTML.
8882 Note that this will completely override any prior
8883 \begin_inset Flex Code
8886 \begin_layout Plain Layout
8893 \begin_inset Flex Code
8896 \begin_layout Plain Layout
8904 \begin_inset Newline newline
8908 \begin_inset Flex Code
8911 \begin_layout Plain Layout
8917 if you just want to add material to the preamble.) Must end with
8918 \begin_inset Quotes eld
8922 \begin_inset Flex Code
8925 \begin_layout Plain Layout
8932 \begin_inset Quotes erd
8938 \begin_layout Description
8939 \begin_inset Flex Code
8942 \begin_layout Plain Layout
8949 \begin_inset Flex Code
8952 \begin_layout Plain Layout
8958 ] The style to use for the table of contents, bibliography, and so forth,
8959 when the document is output to HTML.
8960 For articles, this should normally be
8961 \begin_inset Flex Code
8964 \begin_layout Plain Layout
8971 \begin_inset Flex Code
8974 \begin_layout Plain Layout
8981 If it is not given, then LyX will attempt to figure out which layout to
8985 \begin_layout Description
8986 \begin_inset Flex Code
8989 \begin_layout Plain Layout
8996 \begin_inset Flex Code
8999 \begin_layout Plain Layout
9005 ] Modifies the properties of the given counter.
9006 If the counter does not exist, the statement is ignored.
9008 \begin_inset Quotes eld
9012 \begin_inset Flex Code
9015 \begin_layout Plain Layout
9022 \begin_inset Quotes erd
9026 \begin_inset Newline newline
9030 \begin_inset space ~
9034 \begin_inset CommandInset ref
9036 reference "sub:Counters"
9040 for details on counters.
9043 \begin_layout Description
9044 \begin_inset Flex Code
9047 \begin_layout Plain Layout
9054 \begin_inset Flex Code
9057 \begin_layout Plain Layout
9063 ] Modifies the properties of the given paragraph style.
9064 If the style does not exist, the statement is ignored.
9066 \begin_inset Quotes eld
9070 \begin_inset Flex Code
9073 \begin_layout Plain Layout
9080 \begin_inset Quotes erd
9086 \begin_layout Description
9087 \begin_inset Flex Code
9090 \begin_layout Plain Layout
9097 \begin_inset Flex Code
9100 \begin_layout Plain Layout
9106 ] This allows you to include another layout definition file within yours
9107 to avoid duplicating commands.
9108 Common examples are the standard layout files, for example,
9109 \begin_inset Flex Code
9112 \begin_layout Plain Layout
9118 , which contains most of the basic layouts.
9121 \begin_layout Description
9122 \begin_inset Flex Code
9125 \begin_layout Plain Layout
9132 \begin_inset Flex Code
9135 \begin_layout Plain Layout
9141 ] This section (re-)defines the layout of an inset.
9142 It can be applied to an existing inset or to a new, user-defined inset,
9143 e.g., a new character style.
9145 \begin_inset Quotes eld
9149 \begin_inset Flex Code
9152 \begin_layout Plain Layout
9159 \begin_inset Quotes erd
9163 \begin_inset Newline newline
9167 \begin_inset space ~
9171 \begin_inset CommandInset ref
9173 reference "sub:Flex-insets-and"
9177 for more information.
9181 \begin_layout Description
9182 \begin_inset Flex Code
9185 \begin_layout Plain Layout
9192 \begin_inset Flex Code
9195 \begin_layout Plain Layout
9201 ] A string that indicates the width of the left margin on the screen, for
9203 \begin_inset Quotes eld
9207 \begin_inset Flex Code
9210 \begin_layout Plain Layout
9217 \begin_inset Quotes erd
9221 (Note that this is not a `length', like
9222 \begin_inset Quotes eld
9226 \begin_inset Quotes erd
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 counter, usually one defined in an included file.
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 ] Deletes an existing float.
9276 This is particularly useful when you want to suppress a float that has
9277 been defined in an input file.
9280 \begin_layout Description
9281 \begin_inset Flex Code
9284 \begin_layout Plain Layout
9291 \begin_inset Flex Code
9294 \begin_layout Plain Layout
9300 ] Deletes an existing style.
9303 \begin_layout Description
9304 \begin_inset Flex Code
9307 \begin_layout Plain Layout
9314 \begin_inset Flex Code
9317 \begin_layout Plain Layout
9323 ] The file format (as defined in the LyX preferences) produced by this document
9325 It is mainly useful when
9326 \begin_inset Flex Code
9329 \begin_layout Plain Layout
9336 \begin_inset Flex Code
9339 \begin_layout Plain Layout
9345 and one wants to define a new type of literate document.
9346 The format is reset to
9347 \begin_inset Quotes eld
9351 \begin_inset Flex Code
9354 \begin_layout Plain Layout
9361 \begin_inset Quotes erd
9365 \begin_inset Quotes eld
9369 \begin_inset Flex Code
9372 \begin_layout Plain Layout
9379 \begin_inset Quotes erd
9382 when the corresponding
9383 \begin_inset Flex Code
9386 \begin_layout Plain Layout
9392 parameter is encountered.
9395 \begin_layout Description
9396 \begin_inset Flex Code
9399 \begin_layout Plain Layout
9406 \begin_inset Flex Code
9409 \begin_layout Plain Layout
9420 \begin_inset Flex Code
9423 \begin_layout Plain Layout
9430 \begin_inset Flex Code
9433 \begin_layout Plain Layout
9439 ] Specifies what sort of output documents using this class will produce.
9442 \begin_layout Description
9443 \begin_inset Flex Code
9446 \begin_layout Plain Layout
9453 \begin_inset Flex Code
9456 \begin_layout Plain Layout
9465 \begin_inset Flex Code
9468 \begin_layout Plain Layout
9475 \begin_inset Flex Code
9478 \begin_layout Plain Layout
9484 ] The default pagestyle.
9485 Can be changed in the
9486 \begin_inset Flex MenuItem
9489 \begin_layout Plain Layout
9490 Document\SpecialChar \menuseparator
9499 \begin_layout Description
9500 \begin_inset Flex Code
9503 \begin_layout Plain Layout
9509 Sets the preamble for the LaTeX document.
9510 Note that this will completely override any prior
9511 \begin_inset Flex Code
9514 \begin_layout Plain Layout
9521 \begin_inset Flex Code
9524 \begin_layout Plain Layout
9532 \begin_inset Flex Code
9535 \begin_layout Plain Layout
9541 if you just want to add material to the preamble.) Must end with
9542 \begin_inset Quotes eld
9546 \begin_inset Flex Code
9549 \begin_layout Plain Layout
9556 \begin_inset Quotes erd
9562 \begin_layout Description
9563 \begin_inset Flex Code
9566 \begin_layout Plain Layout
9573 \begin_inset Flex Code
9576 \begin_layout Plain Layout
9583 \begin_inset Flex Code
9586 \begin_layout Plain Layout
9595 \begin_inset space \thinspace{}
9599 \begin_inset Flex Code
9602 \begin_layout Plain Layout
9608 ] Whether the class already provides the feature
9609 \begin_inset Flex Code
9612 \begin_layout Plain Layout
9619 A feature is in general the name of a package (e.
9620 \begin_inset space \thinspace{}
9624 \begin_inset space \space{}
9628 \begin_inset Flex Code
9631 \begin_layout Plain Layout
9638 \begin_inset Flex Code
9641 \begin_layout Plain Layout
9648 \begin_inset space \thinspace{}
9652 \begin_inset space \space{}
9656 \begin_inset Flex Code
9659 \begin_layout Plain Layout
9666 \begin_inset Flex Code
9669 \begin_layout Plain Layout
9677 \begin_inset space ~
9681 \begin_inset CommandInset ref
9683 reference "chap:List-of-functions"
9687 for the list of features.
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 ] Indicates that this layout provides the functionality of the module mentioned,
9711 which should be specified by the filename without the
9712 \begin_inset Flex Code
9715 \begin_layout Plain Layout
9722 This will typically be used if the layout includes the module directly,
9723 rather than using the
9724 \begin_inset Flex Code
9727 \begin_layout Plain Layout
9733 tag to indicate that it ought to be used.
9734 It could also be used in a module that provided an alternate implementation
9735 of the same functionality.
9738 \begin_layout Description
9739 \begin_inset Flex Code
9742 \begin_layout Plain Layout
9749 \begin_inset Flex Code
9752 \begin_layout Plain Layout
9758 ] Whether the class requires the feature
9759 \begin_inset Flex Code
9762 \begin_layout Plain Layout
9769 Multiple features must be separated by commas.
9770 Note that you can only request supported features.
9772 \begin_inset space ~
9776 \begin_inset CommandInset ref
9778 reference "chap:List-of-functions"
9782 for the list of features.)
9785 \begin_layout Description
9786 \begin_inset Flex Code
9789 \begin_layout Plain Layout
9796 \begin_inset Flex Code
9799 \begin_layout Plain Layout
9805 ] A string that indicates the width of the right margin on the screen, for
9807 \begin_inset Quotes eld
9811 \begin_inset Flex Code
9814 \begin_layout Plain Layout
9821 \begin_inset Quotes erd
9827 \begin_layout Description
9828 \begin_inset Flex Code
9831 \begin_layout Plain Layout
9838 \begin_inset Flex Code
9841 \begin_layout Plain Layout
9847 ] Sets which divisions get numbered.
9849 \begin_inset Newline newline
9853 \begin_inset Flex Code
9856 \begin_layout Plain Layout
9865 \begin_layout Description
9866 \begin_inset Flex Code
9869 \begin_layout Plain Layout
9876 \begin_inset Flex Code
9879 \begin_layout Plain Layout
9888 \begin_inset space \thinspace{}
9892 \begin_inset Flex Code
9895 \begin_layout Plain Layout
9901 ] Whether the class-default should be printing on one or both sides of the
9903 Can be changed in the
9904 \begin_inset Flex MenuItem
9907 \begin_layout Plain Layout
9908 Document\SpecialChar \menuseparator
9917 \begin_layout Description
9918 \begin_inset Flex Code
9921 \begin_layout Plain Layout
9928 \begin_inset Flex Code
9931 \begin_layout Plain Layout
9937 ] This sequence defines a paragraph style.
9938 If the style does not yet exist, it is created; if it does exist, its parameter
9941 \begin_inset Quotes eld
9945 \begin_inset Flex Code
9948 \begin_layout Plain Layout
9955 \begin_inset Quotes erd
9959 \begin_inset Newline newline
9963 \begin_inset space ~
9967 \begin_inset CommandInset ref
9969 reference "sub:Paragraph-Styles"
9973 for details on paragraph styles.
9976 \begin_layout Description
9977 \begin_inset Flex Code
9980 \begin_layout Plain Layout
9987 \begin_inset Flex Code
9990 \begin_layout Plain Layout
9996 ] The name of the command or environment to be used with
9997 \begin_inset Flex Code
10000 \begin_layout Plain Layout
10009 \begin_layout Description
10010 \begin_inset Flex Code
10013 \begin_layout Plain Layout
10020 \begin_inset Flex Code
10023 \begin_layout Plain Layout
10032 \begin_inset Flex Code
10035 \begin_layout Plain Layout
10041 ] Indicates what kind of markup is used to define the title of a document.
10043 \begin_inset Flex Code
10046 \begin_layout Plain Layout
10052 means that the macro with name
10053 \begin_inset Flex Code
10056 \begin_layout Plain Layout
10062 will be inserted after the last layout which has
10063 \begin_inset Quotes eld
10067 \begin_inset Flex Code
10070 \begin_layout Plain Layout
10072 \begin_inset space ~
10081 \begin_inset Quotes erd
10086 \begin_inset Flex Code
10089 \begin_layout Plain Layout
10095 corresponds to the case where all layouts which have
10096 \begin_inset Quotes eld
10100 \begin_inset Flex Code
10103 \begin_layout Plain Layout
10105 \begin_inset space ~
10114 \begin_inset Quotes erd
10117 should be enclosed into the
10118 \begin_inset Flex Code
10121 \begin_layout Plain Layout
10130 \begin_layout Description
10131 \begin_inset Flex Code
10134 \begin_layout Plain Layout
10141 \begin_inset Flex Code
10144 \begin_layout Plain Layout
10150 ] Sets which divisions are included in the table of contents.
10152 \begin_inset Flex Code
10155 \begin_layout Plain Layout
10164 \begin_layout Subsection
10165 \begin_inset Flex Code
10168 \begin_layout Plain Layout
10175 \begin_inset CommandInset label
10177 name "sub:ClassOptions"
10184 \begin_layout Standard
10186 \begin_inset Flex Code
10189 \begin_layout Plain Layout
10195 section can contain the following entries:
10198 \begin_layout Description
10199 \begin_inset Flex Code
10202 \begin_layout Plain Layout
10209 \begin_inset Flex Code
10212 \begin_layout Plain Layout
10218 ] The list of available font sizes for the document's main font, separated
10220 \begin_inset Quotes eld
10224 \begin_inset Flex Code
10227 \begin_layout Plain Layout
10234 \begin_inset Quotes erd
10240 \begin_layout Description
10241 \begin_inset Flex Code
10244 \begin_layout Plain Layout
10250 Used to set the DTD line with XML-based output classes.
10252 \begin_inset space \thinspace{}
10256 \begin_inset Quotes eld
10259 -//OASIS//DTD DocBook V4.2//EN
10260 \begin_inset Quotes erd
10266 \begin_layout Description
10267 \begin_inset Flex Code
10270 \begin_layout Plain Layout
10277 \begin_inset Flex Code
10280 \begin_layout Plain Layout
10281 string="empty|plain|headings|fancy"
10286 ] The list of available page sty\SpecialChar \-
10288 \begin_inset Quotes eld
10292 \begin_inset Flex Code
10295 \begin_layout Plain Layout
10302 \begin_inset Quotes erd
10308 \begin_layout Description
10309 \begin_inset Flex Code
10312 \begin_layout Plain Layout
10319 \begin_inset Flex Code
10322 \begin_layout Plain Layout
10328 ] Some document class options, separated by a comma, that will be added
10329 to the optional part of the
10330 \begin_inset Flex Code
10333 \begin_layout Plain Layout
10344 \begin_layout Standard
10346 \begin_inset Flex Code
10349 \begin_layout Plain Layout
10355 section must end with
10356 \begin_inset Quotes eld
10360 \begin_inset Flex Code
10363 \begin_layout Plain Layout
10370 \begin_inset Quotes erd
10376 \begin_layout Subsection
10378 \begin_inset CommandInset label
10380 name "sub:Paragraph-Styles"
10387 \begin_layout Standard
10388 A paragraph style description looks like this:
10392 \begin_layout Plain Layout
10393 Note that this will either define a new style or modify an existing one.
10401 \begin_layout LyX-Code
10408 \begin_layout LyX-Code
10412 \begin_layout LyX-Code
10416 \begin_layout Standard
10417 where the following commands are allowed:
10420 \begin_layout Description
10421 \begin_inset Flex Code
10424 \begin_layout Plain Layout
10431 \begin_inset Flex Code
10434 \begin_layout Plain Layout
10439 , left, right, center
10444 ] Paragraph alignment.
10447 \begin_layout Description
10448 \begin_inset Flex Code
10451 \begin_layout Plain Layout
10458 \begin_inset Flex Code
10461 \begin_layout Plain Layout
10466 , left, right, center
10471 ] A comma separated list of permitted alignments.
10472 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10474 For example a right-aligned or centered enumeration isn't possible.)
10475 \change_inserted -712698321 1353679769
10479 \begin_layout Description
10481 \change_inserted -712698321 1353680268
10482 \begin_inset Flex Code
10485 \begin_layout Plain Layout
10487 \change_inserted -712698321 1353679781
10494 \begin_inset Flex Code
10497 \begin_layout Plain Layout
10499 \change_inserted -712698321 1353679772
10505 ] Defines argument number <int> of a command\SpecialChar \slash{}
10506 environment associated with
10508 This is useful for things like section headings, and only makes sense with
10510 Every (optional or required) argument of a command or environment -- except
10511 for the required argument that is associated with the content of the paragraph
10512 itself -- has a separate definition, where the number specifies the order
10514 The definition must end with
10515 \begin_inset Flex Code
10518 \begin_layout Plain Layout
10520 \change_inserted -712698321 1353680069
10527 So a command with two optional arguments has:
10531 \begin_layout Quote
10533 \change_inserted -712698321 1353680127
10539 \begin_layout Quote
10541 \change_inserted -712698321 1353680195
10547 \begin_layout Quote
10549 \change_inserted -712698321 1353680135
10555 \begin_layout Quote
10557 \change_inserted -712698321 1353680140
10563 \begin_layout Quote
10565 \change_inserted -712698321 1353680197
10571 \begin_layout Quote
10573 \change_inserted -712698321 1353680147
10579 \begin_layout Standard
10581 \change_inserted -712698321 1353680528
10583 \begin_inset Flex Code
10586 \begin_layout Plain Layout
10588 \change_inserted -712698321 1353680412
10594 definition, the following specifications are possible:
10597 \begin_layout Itemize
10599 \change_inserted -712698321 1355076779
10600 \begin_inset Flex Code
10603 \begin_layout Plain Layout
10605 \change_inserted -712698321 1353680543
10614 \begin_inset Flex Code
10617 \begin_layout Plain Layout
10619 \change_inserted -712698321 1353680567
10625 The string that will appear both in the menu (to insert this argument)
10626 and on the argument inset button (unless you also specify a separate
10627 \begin_inset Flex Code
10630 \begin_layout Plain Layout
10632 \change_inserted -712698321 1355076779
10639 For the menu, you can define an accelerator by appending the respective
10640 character to the string, divided by
10641 \begin_inset Quotes eld
10645 \begin_inset Quotes erd
10649 \begin_inset space \thinspace{}
10654 \begin_inset Flex Code
10657 \begin_layout Plain Layout
10659 \change_inserted -712698321 1353691482
10660 \begin_inset Quotes eld
10664 \begin_inset Quotes erd
10677 \begin_layout Itemize
10679 \change_inserted -712698321 1355076754
10680 \begin_inset Flex Code
10683 \begin_layout Plain Layout
10685 \change_inserted -712698321 1355076658
10692 \begin_inset Flex Code
10695 \begin_layout Plain Layout
10697 \change_inserted -712698321 1355076654
10703 A separate string for the menu.
10704 You can define an accelerator by appending the respective character to
10705 the string, divided by
10706 \begin_inset Quotes eld
10710 \begin_inset Quotes erd
10714 \begin_inset space \thinspace{}
10719 \begin_inset Flex Code
10722 \begin_layout Plain Layout
10724 \change_inserted -712698321 1355076654
10725 \begin_inset Quotes eld
10729 \begin_inset Quotes erd
10738 This specification is optional.
10739 If it is not given the
10740 \begin_inset Flex Code
10743 \begin_layout Plain Layout
10745 \change_inserted -712698321 1355076736
10753 will be used instead for the menu.
10756 \begin_layout Itemize
10758 \change_inserted -712698321 1353680665
10759 \begin_inset Flex Code
10762 \begin_layout Plain Layout
10764 \change_inserted -712698321 1353680616
10771 \begin_inset Flex Code
10774 \begin_layout Plain Layout
10776 \change_inserted -712698321 1353680623
10782 A longer explanatory text that appears in the tooltip when hovering over
10783 the argument inset.
10786 \begin_layout Itemize
10788 \change_inserted -712698321 1353680874
10789 \begin_inset Flex Code
10792 \begin_layout Plain Layout
10794 \change_inserted -712698321 1353680732
10801 \begin_inset Flex Code
10804 \begin_layout Plain Layout
10806 \change_inserted -712698321 1353680738
10812 Declare if this is a mandatory
10813 \change_inserted 2090807402 1353765594
10815 \change_inserted -712698321 1353680874
10817 \change_inserted 2090807402 1353765599
10819 \change_inserted -712698321 1353680874
10821 Mandatory arguments will be output empty if not given, while optional arguments
10822 will not be output at all.
10823 By default, mandatory arguments are delimited by
10824 \begin_inset Flex Code
10827 \begin_layout Plain Layout
10829 \change_inserted -712698321 1353680808
10837 , while optional arguments are delimited by
10838 \begin_inset Flex Code
10841 \begin_layout Plain Layout
10843 \change_inserted -712698321 1353680833
10852 \begin_layout Itemize
10854 \change_inserted -712698321 1353917199
10855 \begin_inset Flex Code
10858 \begin_layout Plain Layout
10860 \change_inserted -712698321 1353680879
10867 \begin_inset Flex Code
10870 \begin_layout Plain Layout
10872 \change_inserted -712698321 1353680874
10878 defines another argument (by its number) which this argument requires to
10879 be output if it is itself output.
10881 \begin_inset space \thinspace{}
10884 g., in LaTeX commands, optional arguments often require previous optional
10885 arguments to be output (at least empty), as in
10886 \begin_inset Flex Code
10889 \begin_layout Plain Layout
10891 \change_inserted -712698321 1353688183
10894 command[][arg]{text}
10902 This can be achieved by the statement
10903 \begin_inset Flex Code
10906 \begin_layout Plain Layout
10908 \change_inserted -712698321 1353681031
10917 \begin_inset Flex Code
10920 \begin_layout Plain Layout
10922 \change_inserted -712698321 1353681045
10933 \begin_layout Itemize
10935 \change_inserted -712698321 1354263104
10936 \begin_inset Flex Code
10939 \begin_layout Plain Layout
10941 \change_inserted -712698321 1353681072
10950 \begin_inset Flex Code
10953 \begin_layout Plain Layout
10955 \change_inserted -712698321 1353681067
10961 defines a custom left delimiter (instead of
10962 \begin_inset Flex Code
10965 \begin_layout Plain Layout
10967 \change_inserted -712698321 1353681127
10976 \begin_inset Flex Code
10979 \begin_layout Plain Layout
10981 \change_inserted -712698321 1353681133
10990 A line break in the output can be indicated by
10991 \begin_inset Flex Code
10994 \begin_layout Plain Layout
10996 \change_inserted -712698321 1354263104
11007 \begin_layout Itemize
11009 \change_inserted -712698321 1355144479
11010 \begin_inset Flex Code
11013 \begin_layout Plain Layout
11015 \change_inserted -712698321 1353681149
11022 \begin_inset Flex Code
11025 \begin_layout Plain Layout
11027 \change_inserted -712698321 1353681146
11033 defines a custom right delimiter (instead of
11034 \begin_inset Flex Code
11037 \begin_layout Plain Layout
11039 \change_inserted -712698321 1353681158
11046 \begin_inset Flex Code
11049 \begin_layout Plain Layout
11051 \change_inserted -712698321 1353681161
11058 A line break in the output can be indicated by
11059 \begin_inset Flex Code
11062 \begin_layout Plain Layout
11064 \change_inserted -712698321 1354263106
11073 \begin_layout Itemize
11075 \change_inserted -712698321 1361701444
11076 \begin_inset Flex Code
11079 \begin_layout Plain Layout
11081 \change_inserted -712698321 1361701356
11088 \begin_inset Flex Code
11091 \begin_layout Plain Layout
11093 \change_inserted -712698321 1361701356
11099 defines an argument that is inserted if and only if no user-specified arguments
11101 \begin_inset space \thinspace{}
11105 if no argument inset has been inserted (note that also an empty argument
11106 inset omits the DefaultArg).
11107 Multiple arguments need to be separated by comma.
11110 \begin_layout Itemize
11112 \change_inserted -712698321 1361701337
11113 \begin_inset Flex Code
11116 \begin_layout Plain Layout
11118 \change_inserted -712698321 1355144487
11127 \begin_inset Flex Code
11130 \begin_layout Plain Layout
11132 \change_inserted -712698321 1355144500
11138 defines an argument that is inserted in any case (alone or in addition
11139 to user-specified arguments).
11140 Multiple arguments need to be separated by comma.
11143 \begin_layout Itemize
11145 \change_inserted -712698321 1353917320
11146 \begin_inset Flex Code
11149 \begin_layout Plain Layout
11151 \change_inserted -712698321 1353917320
11157 The font used for the argument content.
11159 \begin_inset space ~
11163 \begin_inset CommandInset ref
11165 reference "sub:Font-description"
11172 \begin_layout Itemize
11174 \change_inserted -712698321 1353917320
11175 \begin_inset Flex Code
11178 \begin_layout Plain Layout
11180 \change_inserted -712698321 1353917320
11186 The font used for the label.
11188 \begin_inset space ~
11192 \begin_inset CommandInset ref
11194 reference "sub:Font-description"
11201 \begin_layout Itemize
11203 \change_inserted -712698321 1355661048
11204 \begin_inset Flex Code
11207 \begin_layout Plain Layout
11209 \change_inserted -712698321 1353917320
11216 \begin_inset Flex Code
11219 \begin_layout Plain Layout
11221 \change_inserted -712698321 1353917320
11228 \begin_inset Flex Code
11231 \begin_layout Plain Layout
11233 \change_inserted -712698321 1353917320
11240 \begin_inset Flex Code
11243 \begin_layout Plain Layout
11245 \change_inserted -712698321 1353917320
11251 , describing the rendering style used for the inset's frame and buttons.
11253 \begin_inset Flex Code
11256 \begin_layout Plain Layout
11258 \change_inserted -712698321 1353917320
11267 \begin_layout Itemize
11269 \change_inserted -712698321 1355747298
11270 \begin_inset Flex Code
11273 \begin_layout Plain Layout
11275 \change_inserted -712698321 1355661057
11282 \begin_inset Flex Code
11285 \begin_layout Plain Layout
11287 \change_inserted -712698321 1355661049
11294 \begin_inset Flex Code
11297 \begin_layout Plain Layout
11299 \change_inserted -712698321 1355661077
11307 , this argument is automatically inserted when the respective style is selected.
11308 Currently, only one argument per style\SpecialChar \slash{}
11309 layout can be automatically inserted.
11310 \change_inserted 155139281 1354198988
11314 \begin_layout Standard
11316 \change_inserted -712698321 1356689813
11317 By default, the text entered in the LyX workarea in the respective layout
11318 is the last (mandatory) argument of a command if the
11319 \begin_inset Flex Code
11322 \begin_layout Plain Layout
11324 \change_inserted -712698321 1356689619
11333 \begin_inset Flex Code
11336 \begin_layout Plain Layout
11338 \change_inserted -712698321 1356689629
11347 However, arguments with the prefix
11348 \begin_inset Flex Code
11351 \begin_layout Plain Layout
11353 \change_inserted -712698321 1356689679
11361 are output after this workarea argument.
11362 Note that post-argument numbering restarts at 1, so the first argument
11363 following the workarea argument is
11364 \begin_inset Flex Code
11367 \begin_layout Plain Layout
11369 \change_inserted -712698321 1356689813
11378 Post-arguments are ignored in any other
11379 \begin_inset Flex Code
11382 \begin_layout Plain Layout
11384 \change_inserted -712698321 1356689801
11391 \begin_inset Flex Code
11394 \begin_layout Plain Layout
11396 \change_inserted -712698321 1356689801
11407 \begin_layout Standard
11409 \change_inserted 155139281 1354199102
11411 \begin_inset Flex Code
11414 \begin_layout Plain Layout
11416 \change_inserted 155139281 1354199013
11427 \begin_inset Flex Code
11430 \begin_layout Plain Layout
11432 \change_inserted 155139281 1354199102
11443 \begin_inset Flex Code
11446 \begin_layout Plain Layout
11448 \change_inserted 155139281 1354199044
11456 followed by the number (e.
11457 \begin_inset space \thinspace{}
11462 \begin_inset Flex Code
11465 \begin_layout Plain Layout
11467 \change_inserted 155139281 1354199064
11481 \begin_layout Description
11482 \begin_inset Flex Code
11485 \begin_layout Plain Layout
11491 Note that this will completely override any prior
11492 \begin_inset Flex Code
11495 \begin_layout Plain Layout
11501 declaration for this style.
11503 \begin_inset Quotes eld
11507 \begin_inset Flex Code
11510 \begin_layout Plain Layout
11517 \begin_inset Quotes erd
11522 \begin_inset space ~
11526 \begin_inset CommandInset ref
11528 reference "sub:I18n"
11532 for details on its use.
11535 \begin_layout Description
11536 \begin_inset Flex Code
11539 \begin_layout Plain Layout
11546 \begin_inset Flex Code
11549 \begin_layout Plain Layout
11559 \begin_layout Plain Layout
11560 Note that a `float' here is a real number, such as: 1.5.
11565 The vertical space with which the last of a chain of paragraphs with this
11566 style is separated from the following paragraph.
11567 If the next paragraph has another style, the separations are not simply
11568 added, but the maximum is taken.
11571 \begin_layout Description
11572 \begin_inset Flex Code
11575 \begin_layout Plain Layout
11582 \begin_inset Flex Code
11585 \begin_layout Plain Layout
11591 ] The category for this style.
11592 This is used to group related styles in the style combobox on the toolbar.
11593 Any string can be used, but you may want to use existing categories with
11598 \begin_layout Description
11599 \begin_inset Flex Code
11602 \begin_layout Plain Layout
11608 Depth of XML command.
11609 Used only with XML-type formats.
11612 \begin_layout Description
11613 \begin_inset Flex Code
11616 \begin_layout Plain Layout
11623 \begin_inset Flex Code
11626 \begin_layout Plain Layout
11632 ] Copies all the features of an existing style into the current one.
11636 \begin_layout Description
11637 \begin_inset Flex Code
11640 \begin_layout Plain Layout
11647 \begin_inset Flex Code
11650 \begin_layout Plain Layout
11656 ] The name of a style whose preamble should be output
11661 This allows to ensure some ordering of the preamble snippets when macros
11662 definitions depend on one another.
11666 \begin_layout Plain Layout
11667 Note that, besides that functionality, there is no way to ensure any ordering
11669 The ordering that you see in a given version of LyX may change without
11670 warning in later versions.
11678 \begin_layout Description
11679 \begin_inset Flex Code
11682 \begin_layout Plain Layout
11689 \begin_inset Flex Code
11692 \begin_layout Plain Layout
11697 , Box, Filled_Box, Static
11702 ] The type of label that stands at the end of the paragraph (or sequence
11704 \begin_inset Flex Code
11707 \begin_layout Plain Layout
11714 \begin_inset Newline newline
11718 \begin_inset Flex Code
11721 \begin_layout Plain Layout
11728 \begin_inset Flex Code
11731 \begin_layout Plain Layout
11738 \begin_inset Flex Code
11741 \begin_layout Plain Layout
11749 \begin_inset Flex Code
11752 \begin_layout Plain Layout
11759 \begin_inset Quotes eld
11763 \begin_inset Quotes erd
11767 \begin_inset Flex Code
11770 \begin_layout Plain Layout
11777 \begin_inset space \space{}
11781 \begin_inset Flex Code
11784 \begin_layout Plain Layout
11790 ) is a white (resp.
11791 \begin_inset space ~
11794 black) square suitable for end of proof markers,
11795 \begin_inset Flex Code
11798 \begin_layout Plain Layout
11804 is an explicit text string.
11807 \begin_layout Description
11808 \begin_inset Flex Code
11811 \begin_layout Plain Layout
11818 \begin_inset Flex Code
11821 \begin_layout Plain Layout
11827 ] The string used for a label with a
11828 \begin_inset Flex Code
11831 \begin_layout Plain Layout
11838 \begin_inset Newline newline
11842 \begin_inset Flex Code
11845 \begin_layout Plain Layout
11855 \begin_layout Description
11856 \begin_inset Flex Code
11859 \begin_layout Plain Layout
11865 The font used for both the text body
11871 \begin_inset space ~
11875 \begin_inset CommandInset ref
11877 reference "sub:Font-description"
11882 Note that defining this font automatically defines the
11883 \begin_inset Flex Code
11886 \begin_layout Plain Layout
11893 So you should define this one first if you also want to define
11894 \begin_inset Flex Code
11897 \begin_layout Plain Layout
11906 \begin_layout Description
11907 \begin_inset Flex Code
11910 \begin_layout Plain Layout
11917 \begin_inset Flex Code
11920 \begin_layout Plain Layout
11929 \begin_inset space \thinspace{}
11933 \begin_inset Flex Code
11936 \begin_layout Plain Layout
11942 ] Usually LyX does not allow you to insert more than one space between words,
11943 since a space is considered as the separation between two words, not a
11944 character or symbol of its own.
11945 This is a very fine thing but sometimes annoying, for example, when typing
11946 program code or plain LaTeX code.
11948 \begin_inset Flex Code
11951 \begin_layout Plain Layout
11958 Note that LyX will create protected blanks for the additional blanks when
11959 in another mode than LaTeX-mode.
11962 \begin_layout Description
11963 \begin_inset Flex Code
11966 \begin_layout Plain Layout
11972 These tags are used with XHTML output.
11974 \begin_inset CommandInset ref
11976 reference "sub:Paragraph-Style-XHTML"
11983 \begin_layout Description
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11993 [FIXME] (Used only with XML-type formats.)
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 to be included in the document preamble and not in
12044 This is useful for document classes that want such information as the title
12045 and author to appear in the preamble.
12046 Note that this works only for styles for which the
12047 \begin_inset Flex Code
12050 \begin_layout Plain Layout
12057 \begin_inset Flex Code
12060 \begin_layout Plain Layout
12067 \begin_inset Flex Code
12070 \begin_layout Plain Layout
12079 \begin_layout Description
12080 \begin_inset Flex Code
12083 \begin_layout Plain Layout
12090 \begin_inset Flex Code
12093 \begin_layout Plain Layout
12102 \begin_inset space \thinspace{}
12106 \begin_inset Flex Code
12109 \begin_layout Plain Layout
12116 \begin_inset Flex Code
12119 \begin_layout Plain Layout
12125 , marks the style as being part of a title block (see also the
12126 \begin_inset Flex Code
12129 \begin_layout Plain Layout
12136 \begin_inset Flex Code
12139 \begin_layout Plain Layout
12148 \begin_layout Description
12150 \change_inserted -712698321 1355932296
12151 \begin_inset Flex Code
12154 \begin_layout Plain Layout
12156 \change_inserted -712698321 1355932178
12163 \begin_inset Flex Code
12166 \begin_layout Plain Layout
12168 \change_inserted -712698321 1355932181
12174 ] The LaTeX command sequence declaring an item in a list.
12175 The command is to be defined without the preceding backslash (the default
12177 \begin_inset Quotes eld
12181 \begin_inset Quotes erd
12185 \begin_inset Flex Code
12188 \begin_layout Plain Layout
12190 \change_inserted -712698321 1355932279
12200 in the LaTeX output).
12203 \begin_layout Description
12204 \begin_inset Flex Code
12207 \begin_layout Plain Layout
12214 \begin_inset Flex Code
12217 \begin_layout Plain Layout
12223 ] This provides extra space between paragraphs that have the same style.
12224 If you put other styles into an environment, each is separated with the
12226 \begin_inset Flex Code
12229 \begin_layout Plain Layout
12236 But the whole items of the environment are additionally separated with
12238 \begin_inset Flex Code
12241 \begin_layout Plain Layout
12248 Note that this is a
12253 \begin_layout Description
12254 \begin_inset Flex Code
12257 \begin_layout Plain Layout
12263 [FIXME] (Used only with XML-type formats.)
12266 \begin_layout Description
12267 \begin_inset Flex Code
12270 \begin_layout Plain Layout
12277 \begin_inset Flex Code
12280 \begin_layout Plain Layout
12289 \begin_inset space \thinspace{}
12293 \begin_inset Flex Code
12296 \begin_layout Plain Layout
12302 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12303 lead to empty LaTeX output.
12304 There are some cases where this could be desirable however: in a letter
12305 template, the required fields can be provided as empty fields, so that
12306 people do not forget them; in some special classes, a style can be used
12307 as some kind of break, which does not contain actual text.
12310 \begin_layout Description
12311 \begin_inset Flex Code
12314 \begin_layout Plain Layout
12321 \begin_inset Flex Code
12324 \begin_layout Plain Layout
12330 ] The vertical space between the label and the text body.
12331 Only used for labels that are above the text body (
12332 \begin_inset Flex Code
12335 \begin_layout Plain Layout
12342 \begin_inset Newline newline
12346 \begin_inset Flex Code
12349 \begin_layout Plain Layout
12350 Centered_Top_Environment
12358 \begin_layout Description
12359 \begin_inset Flex Code
12362 \begin_layout Plain Layout
12369 \begin_inset Flex Code
12372 \begin_layout Plain Layout
12378 ] The name of the counter for automatic numbering.
12380 \change_inserted 1414654397 1360434581
12381 In order to have the counter appear with your label, you will need to reference
12382 it in the LabelString.
12383 This will work with
12384 \begin_inset Flex Code
12387 \begin_layout Plain Layout
12389 \change_inserted 1414654397 1360434565
12398 \begin_inset Flex Code
12401 \begin_layout Plain Layout
12403 \change_inserted 1414654397 1360434569
12412 \begin_inset Flex Code
12415 \begin_layout Plain Layout
12417 \change_inserted 1414654397 1360434574
12426 \begin_inset Flex Code
12429 \begin_layout Plain Layout
12431 \change_inserted 1414654397 1360434578
12442 \begin_inset Newline newline
12446 \change_deleted 1414654397 1360434393
12452 \begin_inset Flex Code
12455 \begin_layout Plain Layout
12462 \begin_inset Flex Code
12465 \begin_layout Plain Layout
12472 In that case, the counter will be stepped each time the style appears.
12473 \begin_inset Newline newline
12483 \begin_inset Flex Code
12486 \begin_layout Plain Layout
12493 \begin_inset Flex Code
12496 \begin_layout Plain Layout
12502 , though this case is a bit complicated.
12503 Suppose you declare
12504 \begin_inset Quotes eld
12508 \begin_inset Flex Code
12511 \begin_layout Plain Layout
12512 LabelCounter myenum
12518 \begin_inset Quotes erd
12522 Then the actual counters used are
12523 \begin_inset Flex Code
12526 \begin_layout Plain Layout
12533 \begin_inset Flex Code
12536 \begin_layout Plain Layout
12543 \begin_inset Flex Code
12546 \begin_layout Plain Layout
12553 \begin_inset Flex Code
12556 \begin_layout Plain Layout
12562 , much as in LaTeX.
12563 These counters must all be declared separately.
12564 \begin_inset Newline newline
12568 \begin_inset CommandInset ref
12570 reference "sub:Counters"
12574 for details on counters.
12577 \begin_layout Description
12578 \begin_inset Flex Code
12581 \begin_layout Plain Layout
12587 The font used for the label.
12589 \begin_inset space ~
12593 \begin_inset CommandInset ref
12595 reference "sub:Font-description"
12602 \begin_layout Description
12603 \begin_inset Flex Code
12606 \begin_layout Plain Layout
12613 \begin_inset Flex Code
12616 \begin_layout Plain Layout
12622 ] Text that indicates how far a label should be indented.
12625 \begin_layout Description
12626 \begin_inset Flex Code
12629 \begin_layout Plain Layout
12636 \begin_inset Flex Code
12639 \begin_layout Plain Layout
12645 ] Text that indicates the amount of horizontal space between the label and
12647 Only used for labels that are not above the text body.
12650 \begin_layout Description
12651 \begin_inset Flex Code
12654 \begin_layout Plain Layout
12661 \begin_inset Flex Code
12664 \begin_layout Plain Layout
12670 ] The string used for
12671 \change_inserted 1414654397 1360434358
12673 \change_deleted 1414654397 1360434353
12678 \begin_inset Flex Code
12681 \begin_layout Plain Layout
12687 is set, this string can be contain the special formatting commands described
12689 \begin_inset CommandInset ref
12691 reference "sub:Counters"
12698 \begin_layout Description
12699 \begin_inset Flex Code
12702 \begin_layout Plain Layout
12703 LabelStringAppendix
12709 \begin_inset Flex Code
12712 \begin_layout Plain Layout
12718 ] This is used inside the appendix instead of
12719 \begin_inset Newline newline
12723 \begin_inset Flex Code
12726 \begin_layout Plain Layout
12734 \begin_inset Flex Code
12737 \begin_layout Plain Layout
12744 \begin_inset Newline newline
12748 \begin_inset Flex Code
12751 \begin_layout Plain Layout
12752 LabelStringAppendix
12760 \begin_layout Description
12761 \begin_inset Flex Code
12764 \begin_layout Plain Layout
12770 [FIXME] (Used only with XML-type formats.)
12773 \begin_layout Description
12774 \begin_inset Flex Code
12777 \begin_layout Plain Layout
12784 \begin_inset Flex Code
12787 \begin_layout Plain Layout
12793 \change_inserted 1414654397 1360434611
12795 \change_deleted 1414654397 1360434612
12799 \begin_inset Newline newline
12803 \change_inserted 1414654397 1360434627
12805 \change_deleted 1414654397 1360434623
12806 _Top_Environment, Counter,
12808 Sensitive, Enumerate,
12809 \begin_inset Newline newline
12812 Itemize, Bibliography
12821 \begin_layout Description
12822 \begin_inset Flex Code
12825 \begin_layout Plain Layout
12831 means the label is the very first word (up to the first real blank).
12832 Use protected spaces if you want more than one word as the label.
12836 \begin_layout Description
12837 \begin_inset Flex Code
12840 \begin_layout Plain Layout
12846 means the label is simply what is declared as
12847 \begin_inset Flex Code
12850 \begin_layout Plain Layout
12858 \change_deleted 1414654397 1360434660
12859 Note that this really is `static'.
12861 \change_inserted 1414654397 1360434794
12862 This will be displayed
12863 \begin_inset Quotes eld
12867 \begin_inset Quotes erd
12870 , at the beginning of the paragraph.
12872 \begin_inset Flex Code
12875 \begin_layout Plain Layout
12877 \change_inserted 1414654397 1360434743
12886 \begin_inset Flex Code
12889 \begin_layout Plain Layout
12891 \change_inserted 1414654397 1360434747
12899 , then it will be displayed only in the first paragraph in any sequence
12900 of paragraphs with the same
12901 \begin_inset Flex Code
12904 \begin_layout Plain Layout
12906 \change_inserted 1414654397 1360434794
12919 \begin_layout Description
12920 \begin_inset Flex Code
12923 \begin_layout Plain Layout
12925 \change_deleted 1414654397 1360434641
12927 \change_inserted 1414654397 1360434643
12936 \begin_inset space ~
12940 \begin_inset space ~
12944 \begin_inset Flex Code
12947 \begin_layout Plain Layout
12949 \change_deleted 1414654397 1360434649
12957 are special cases of
12958 \begin_inset Flex Code
12961 \begin_layout Plain Layout
12968 The label will be printed above the paragraph
12969 \change_inserted 1414654397 1360434839
12970 either at the beginning of the line or centered
12971 \change_deleted 1414654397 1360434813
12972 , but only at the top of an environment or the top of a chain of paragraphs
12974 This might be used with the
12975 \begin_inset Flex MenuItem
12978 \begin_layout Plain Layout
12989 \begin_layout Description
12990 \begin_inset Flex Code
12993 \begin_layout Plain Layout
12999 is a special case for the caption-labels
13000 \begin_inset Quotes eld
13004 \begin_inset Quotes erd
13008 \begin_inset Quotes eld
13012 \begin_inset Quotes erd
13016 \begin_inset Newline newline
13020 \begin_inset Flex Code
13023 \begin_layout Plain Layout
13029 means the (hardcoded) label string depends on the kind of float: It is
13030 hardcoded to be `FloatType N', where N is the value of the counter associated
13032 For the case that a caption is inserted outside of a float
13033 \change_inserted 1414654397 1360434861
13037 \begin_inset Flex Code
13040 \begin_layout Plain Layout
13047 \change_inserted 1414654397 1360434866
13049 \change_deleted 1414654397 1360434868
13050 should be set to e.
13051 \begin_inset space \thinspace{}
13055 \begin_inset space \space{}
13061 \begin_inset Quotes eld
13065 \begin_inset Quotes erd
13071 \begin_layout Description
13073 \change_deleted 1414654397 1360434875
13074 \begin_inset Flex Code
13077 \begin_layout Plain Layout
13083 defines automatically numbered labels.
13085 \begin_inset Flex Code
13088 \begin_layout Plain Layout
13094 will be expanded to contain any counters: So the result will for example
13096 \begin_inset Quotes eld
13100 \begin_inset Flex Code
13103 \begin_layout Plain Layout
13114 \begin_inset Quotes erd
13119 \begin_inset space ~
13123 \begin_inset CommandInset ref
13125 reference "sub:Counters"
13129 for more information on counters.
13132 \begin_layout Description
13133 \begin_inset Flex Code
13136 \begin_layout Plain Layout
13142 produces the usual sort of enumeration labels.
13143 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13144 small Roman numerals, and uppercase letters for the four possible depths.
13147 \begin_layout Description
13148 \begin_inset Flex Code
13151 \begin_layout Plain Layout
13157 produces various bullets at the different levels.
13158 It is also hardcoded.
13161 \begin_layout Description
13162 \begin_inset Flex Code
13165 \begin_layout Plain Layout
13172 \change_deleted 1414654397 1360434898
13173 is used internally by LyX and
13175 should be used only with
13176 \begin_inset Flex Code
13179 \begin_layout Plain Layout
13180 LatexType BibEnvironment
13189 \begin_layout Description
13190 \begin_inset Flex Code
13193 \begin_layout Plain Layout
13199 Note that this will completely override any prior
13200 \begin_inset Flex Code
13203 \begin_layout Plain Layout
13209 declaration for this style.
13211 \begin_inset Quotes eld
13215 \begin_inset Flex Code
13218 \begin_layout Plain Layout
13225 \begin_inset Quotes erd
13230 \begin_inset CommandInset ref
13232 reference "sub:I18n"
13236 for details on its use.
13239 \begin_layout Description
13240 \begin_inset Flex Code
13243 \begin_layout Plain Layout
13250 \begin_inset Flex Code
13253 \begin_layout Plain Layout
13259 ] The name of the corresponding LaTeX stuff.
13260 Either the environment or command name.
13263 \begin_layout Description
13264 \begin_inset Flex Code
13267 \begin_layout Plain Layout
13274 \begin_inset Flex Code
13277 \begin_layout Plain Layout
13283 ] An optional parameter for the corresponding
13284 \begin_inset Flex Code
13287 \begin_layout Plain Layout
13294 This parameter cannot be changed from within LyX
13295 \change_inserted -712698321 1355144804
13297 \begin_inset Flex Code
13300 \begin_layout Plain Layout
13302 \change_inserted -712698321 1355144804
13308 for customizable parameters)
13312 \change_inserted -712698321 1355144804
13313 This will be output as is after all LaTeX
13314 \begin_inset Flex Code
13317 \begin_layout Plain Layout
13319 \change_inserted -712698321 1355144658
13332 \begin_layout Description
13333 \begin_inset Flex Code
13336 \begin_layout Plain Layout
13343 \begin_inset Flex Code
13346 \begin_layout Plain Layout
13351 , Command, Environment, Item_Environment,
13352 \begin_inset Newline newline
13355 List_Environment, Bib_Environment
13360 ] How the style should be translated into LaTeX.
13364 \begin_layout Plain Layout
13365 \begin_inset Flex Code
13368 \begin_layout Plain Layout
13374 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13375 Visit the SGML class files for specific examples.
13384 \begin_layout Description
13385 \begin_inset Flex Code
13388 \begin_layout Plain Layout
13394 means nothing special.
13397 \begin_layout Description
13398 \begin_inset Flex Code
13401 \begin_layout Plain Layout
13408 \begin_inset Flex Code
13411 \begin_layout Plain Layout
13418 {\SpecialChar \ldots{}
13427 \begin_layout Description
13428 \begin_inset Flex Code
13431 \begin_layout Plain Layout
13438 \begin_inset Flex Code
13441 \begin_layout Plain Layout
13448 }\SpecialChar \ldots{}
13464 \begin_layout Description
13465 \begin_inset Flex Code
13468 \begin_layout Plain Layout
13475 \begin_inset Flex Code
13478 \begin_layout Plain Layout
13485 \begin_inset Flex Code
13488 \begin_layout Plain Layout
13496 is generated for each paragraph of this environment.
13500 \begin_layout Description
13501 \begin_inset Flex Code
13504 \begin_layout Plain Layout
13511 \begin_inset Flex Code
13514 \begin_layout Plain Layout
13521 \begin_inset Newline newline
13525 \begin_inset Flex Code
13528 \begin_layout Plain Layout
13534 is passed as an argument to the environment.
13535 \begin_inset Newline newline
13539 \begin_inset Flex Code
13542 \begin_layout Plain Layout
13548 can be defined in the
13549 \begin_inset Flex MenuItem
13552 \begin_layout Plain Layout
13553 Edit\SpecialChar \menuseparator
13555 \begin_inset space ~
13566 \begin_layout Description
13567 \begin_inset Flex Code
13570 \begin_layout Plain Layout
13577 \begin_inset Flex Code
13580 \begin_layout Plain Layout
13586 but adds additionally the necessary mandatory argument (the longest label)
13587 to the begin statement of the bibliography environment:
13588 \begin_inset Newline newline
13592 \begin_inset Flex Code
13595 \begin_layout Plain Layout
13598 begin{thebibliography}{99}
13603 It is therefore only useful for bibliography environments.
13604 The default longest label
13605 \begin_inset Quotes eld
13609 \begin_inset Quotes erd
13612 can be changed by the user in the paragraph settings of a bibliography
13616 \begin_layout Standard
13617 Putting the last few things together, the LaTeX output will be either:
13620 \begin_layout LyX-Code
13623 LatexName[LatexParam]{\SpecialChar \ldots{}
13627 \begin_layout Standard
13631 \begin_layout LyX-Code
13634 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13640 \begin_layout Standard
13641 depending upon the LaTeX type.
13645 \begin_layout Description
13647 \change_inserted -712698321 1354263086
13648 \begin_inset Flex Code
13651 \begin_layout Plain Layout
13653 \change_inserted -712698321 1353866852
13660 \begin_inset Flex Code
13663 \begin_layout Plain Layout
13665 \change_inserted -712698321 1353866852
13671 ] A string that is put at the beginning of the style content.
13672 A line break in the output can be indicated by
13673 \begin_inset Flex Code
13676 \begin_layout Plain Layout
13678 \change_inserted -712698321 1354263086
13689 \begin_layout Description
13690 \begin_inset Flex Code
13693 \begin_layout Plain Layout
13700 \begin_inset Flex Code
13703 \begin_layout Plain Layout
13709 ] If you put styles into environments, the different
13710 \begin_inset Flex Code
13713 \begin_layout Plain Layout
13719 are not simply added, but added with a factor
13720 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13724 Note that this parameter is also used when
13725 \begin_inset Flex Code
13728 \begin_layout Plain Layout
13735 \begin_inset Flex Code
13738 \begin_layout Plain Layout
13745 \begin_inset Flex Code
13748 \begin_layout Plain Layout
13755 Then it is added to the manual or dynamic margin.
13756 \begin_inset Newline newline
13760 \begin_inset Quotes eld
13764 \begin_inset Flex Code
13767 \begin_layout Plain Layout
13774 \begin_inset Quotes erd
13777 means that the paragraph is indented with the width of
13778 \begin_inset Quotes eld
13782 \begin_inset Flex Code
13785 \begin_layout Plain Layout
13792 \begin_inset Quotes erd
13795 in the normal font.
13796 You can get a negative width by prefixing the string with
13797 \begin_inset Quotes eld
13801 \begin_inset Flex Code
13804 \begin_layout Plain Layout
13811 \begin_inset Quotes erd
13815 This way was chosen so that the look is the same with each used screen
13819 \begin_layout Description
13820 \begin_inset Flex Code
13823 \begin_layout Plain Layout
13830 \begin_inset Flex Code
13833 \begin_layout Plain Layout
13838 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13844 \begin_inset Newline newline
13847 The kind of margin that the style has on the left side.
13851 \begin_layout Description
13852 \begin_inset Flex Code
13855 \begin_layout Plain Layout
13861 just means a fixed margin.
13864 \begin_layout Description
13865 \begin_inset Flex Code
13868 \begin_layout Plain Layout
13874 means that the left margin depends on the string entered in the
13875 \begin_inset Flex MenuItem
13878 \begin_layout Plain Layout
13879 Edit\SpecialChar \menuseparator
13881 \begin_inset space ~
13890 This is used to typeset nice lists without tabulators.
13893 \begin_layout Description
13894 \begin_inset Flex Code
13897 \begin_layout Plain Layout
13903 means that the margin depends on the size of the label.
13904 This is used for automatic enumerated headlines.
13905 It is obvious that the headline
13906 \begin_inset Quotes eld
13909 5.4.3.2.1 Very long headline
13910 \begin_inset Quotes erd
13913 must have a wider left margin (as wide as
13914 \begin_inset Quotes eld
13918 \begin_inset Quotes erd
13921 plus the space) than
13922 \begin_inset Quotes eld
13925 3.2 Very long headline
13926 \begin_inset Quotes erd
13930 \begin_inset Quotes eld
13934 \begin_inset Quotes erd
13937 are not able to do this.
13940 \begin_layout Description
13941 \begin_inset Flex Code
13944 \begin_layout Plain Layout
13950 is similar, but only the very first row of the paragraph is dynamic, while
13951 the others are static; this is used, for example, for descriptions.
13954 \begin_layout Description
13955 \begin_inset Flex Code
13958 \begin_layout Plain Layout
13964 means the margin is chosen in a way that the longest row of this paragraph
13965 fits to the right margin.
13966 This is used to typeset an address on the right edge of the page.
13970 \begin_layout Description
13971 \begin_inset Flex Code
13974 \begin_layout Plain Layout
13981 \begin_inset Flex Code
13984 \begin_layout Plain Layout
13993 \begin_inset space \thinspace{}
13997 \begin_inset Flex Code
14000 \begin_layout Plain Layout
14006 ] Whether fragile commands in this style should be
14007 \begin_inset Flex Code
14010 \begin_layout Plain Layout
14023 whether this command should itself be protected.)
14026 \begin_layout Description
14027 \begin_inset Flex Code
14030 \begin_layout Plain Layout
14037 \begin_inset Flex Code
14040 \begin_layout Plain Layout
14047 \begin_inset space \thinspace{}
14051 \begin_inset Flex Code
14054 \begin_layout Plain Layout
14062 ] Whether newlines are translated into LaTeX newlines (
14063 \begin_inset Flex Code
14066 \begin_layout Plain Layout
14077 The translation can be switched off to allow more comfortable LaTeX editing
14081 \begin_layout Description
14082 \begin_inset Flex Code
14085 \begin_layout Plain Layout
14092 \begin_inset Flex Code
14095 \begin_layout Plain Layout
14104 \begin_inset space \thinspace{}
14108 \begin_inset Flex Code
14111 \begin_layout Plain Layout
14117 ] If set to true, and if
14118 \begin_inset Flex Code
14121 \begin_layout Plain Layout
14128 \begin_inset Flex Code
14131 \begin_layout Plain Layout
14137 ) paragraphs are being indented, then the indentation of such a paragraph
14138 following one of this type will be suppressed.
14139 (So this will not affect the display of non-default paragraphs.)
14142 \begin_layout Description
14143 \begin_inset Flex Code
14146 \begin_layout Plain Layout
14153 \begin_inset Flex Code
14156 \begin_layout Plain Layout
14162 ] Name of a style that has replaced this style.
14163 This is used to rename a style, while keeping backward compatibility.
14166 \begin_layout Description
14168 \change_deleted -712698321 1353679722
14169 \begin_inset Flex Code
14172 \begin_layout Plain Layout
14179 \begin_inset Flex Code
14182 \begin_layout Plain Layout
14188 ] The number of optional arguments that can be used with this style.
14189 This is useful for things like section headings, and only makes sense with
14191 Note that, on output, the optional arguments will all precede any required
14192 arguments (see below).
14193 So one can have constructs like:
14197 \begin_layout LyX-Code
14199 \change_deleted -712698321 1353679722
14202 mycmd[opt1]{req1}{contents of paragraph}
14205 \begin_layout Standard
14207 \change_deleted -712698321 1353679722
14208 but one cannot have things like:
14211 \begin_layout LyX-Code
14213 \change_deleted -712698321 1353679722
14216 mycmd[opt1]{req1}[opt2]{contents of paragraph}
14219 \begin_layout Standard
14221 \change_deleted -712698321 1353679722
14222 at least, not without ERT (with which you can have anything).
14229 \begin_layout Description
14230 \begin_inset Flex Code
14233 \begin_layout Plain Layout
14240 \begin_inset Flex Code
14243 \begin_layout Plain Layout
14252 \begin_inset space \thinspace{}
14256 \begin_inset Flex Code
14259 \begin_layout Plain Layout
14265 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
14266 output, but only by a line break; together with
14267 \begin_inset Flex Code
14270 \begin_layout Plain Layout
14276 , this allows to emulate a plain text editor (like the ERT inset).
14279 \begin_layout Description
14280 \begin_inset Flex Code
14283 \begin_layout Plain Layout
14290 \begin_inset Flex Code
14293 \begin_layout Plain Layout
14299 ] The indent of the very first line of a paragraph.
14301 \begin_inset Newline newline
14305 \begin_inset Flex Code
14308 \begin_layout Plain Layout
14314 will be fixed for a certain style.
14315 The exception is the default style, since the indentation for these paragraphs
14316 can be prohibited with
14317 \begin_inset Flex Code
14320 \begin_layout Plain Layout
14328 \begin_inset Flex Code
14331 \begin_layout Plain Layout
14337 style paragraphs inside environments use the
14338 \begin_inset Flex Code
14341 \begin_layout Plain Layout
14347 of the environment, not their native one.
14349 \begin_inset Flex Code
14352 \begin_layout Plain Layout
14358 paragraphs inside an enumeration are not indented.
14361 \begin_layout Description
14362 \begin_inset Flex Code
14365 \begin_layout Plain Layout
14372 \begin_inset Flex Code
14375 \begin_layout Plain Layout
14381 ] The vertical space between two paragraphs of this style.
14384 \begin_layout Description
14385 \begin_inset Flex Code
14388 \begin_layout Plain Layout
14395 \begin_inset Flex Code
14398 \begin_layout Plain Layout
14404 ] LyX allows the user to choose either
14405 \begin_inset Quotes eld
14409 \begin_inset Quotes erd
14413 \begin_inset Quotes eld
14417 \begin_inset Quotes erd
14420 to separate paragraphs.
14422 \begin_inset Quotes eld
14426 \begin_inset Quotes erd
14430 \begin_inset Flex Code
14433 \begin_layout Plain Layout
14441 \begin_inset Quotes eld
14445 \begin_inset Quotes erd
14449 \begin_inset Flex Code
14452 \begin_layout Plain Layout
14458 is ignored and all paragraphs are separated by the
14459 \begin_inset Flex Code
14462 \begin_layout Plain Layout
14469 The vertical space is calculated with
14470 \begin_inset Flex Code
14473 \begin_layout Plain Layout
14475 \begin_inset space ~
14484 \begin_inset Flex Code
14487 \begin_layout Plain Layout
14493 is the height of a row with the normal font.
14494 This way, the look stays the same with different screen fonts.
14497 \begin_layout Description
14498 \begin_inset Flex Code
14501 \begin_layout Plain Layout
14508 \begin_inset Flex Code
14511 \begin_layout Plain Layout
14520 \begin_inset space \thinspace{}
14524 \begin_inset Flex Code
14527 \begin_layout Plain Layout
14533 ] Whether the contents of this paragraph should be output in raw form, meaning
14534 without special translations that LaTeX would require.
14537 \begin_layout Description
14538 \begin_inset Flex Code
14541 \begin_layout Plain Layout
14547 Information to be included in the LaTeX preamble when this style is used.
14548 Used to define macros, load packages, etc., required by this particular
14551 \begin_inset Quotes eld
14555 \begin_inset Flex Code
14558 \begin_layout Plain Layout
14565 \begin_inset Quotes erd
14571 \begin_layout Description
14572 \begin_inset Flex Code
14575 \begin_layout Plain Layout
14582 \begin_inset Flex Code
14585 \begin_layout Plain Layout
14591 ] The prefix to use when creating labels referring to paragraphs of this
14593 This allows the use of formatted references.
14596 \begin_layout Description
14598 \change_deleted -712698321 1353681258
14599 \begin_inset Flex Code
14602 \begin_layout Plain Layout
14609 \begin_inset Flex Code
14612 \begin_layout Plain Layout
14618 ] The number of required arguments that the LaTeX command or environment
14619 corresponding to this style expects.
14620 In the case of a command, these are required arguments
14624 that associated with the content of the paragraph itself.
14625 These do not actually have to be provided: LyX will output empty arguments
14627 Note that optional arguments will be output before required arguments.
14628 See the discussion of the
14629 \begin_inset Flex Code
14632 \begin_layout Plain Layout
14638 tag above for more information.
14643 \begin_layout Description
14644 \begin_inset Flex Code
14647 \begin_layout Plain Layout
14654 \begin_inset Flex Code
14657 \begin_layout Plain Layout
14663 ] Whether the style requires the feature
14664 \begin_inset Flex Code
14667 \begin_layout Plain Layout
14674 See the description of
14675 \begin_inset Flex Code
14678 \begin_layout Plain Layout
14685 \begin_inset space ~
14689 \begin_inset CommandInset ref
14691 reference "sub:General-text-class"
14695 ) for information on `features'.
14698 \begin_layout Description
14700 \change_inserted -712698321 1353693371
14701 \begin_inset Flex Code
14704 \begin_layout Plain Layout
14706 \change_inserted -712698321 1353693146
14715 \begin_inset Flex Code
14718 \begin_layout Plain Layout
14720 \change_inserted -712698321 1353693235
14729 \begin_inset Flex Code
14732 \begin_layout Plain Layout
14734 \change_inserted -712698321 1353693235
14740 ] Resets the LaTeX arguments of this style (as defined via the
14741 \begin_inset Flex Code
14744 \begin_layout Plain Layout
14746 \change_inserted -712698321 1353693371
14755 This is useful if you have copied a style via
14756 \begin_inset Flex Code
14759 \begin_layout Plain Layout
14761 \change_inserted -712698321 1353693302
14769 , but you do not want to inherit its (required and optional) arguments.
14774 \begin_layout Description
14776 \change_inserted -712698321 1354263074
14777 \begin_inset Flex Code
14780 \begin_layout Plain Layout
14782 \change_inserted -712698321 1353866876
14789 \begin_inset Flex Code
14792 \begin_layout Plain Layout
14794 \change_inserted -712698321 1353866873
14800 ] A string that is put at the end of the layout content.
14801 A line break in the output can be indicated by
14802 \begin_inset Flex Code
14805 \begin_layout Plain Layout
14807 \change_inserted -712698321 1354263069
14818 \begin_layout Description
14819 \begin_inset Flex Code
14822 \begin_layout Plain Layout
14829 \begin_inset Flex Code
14832 \begin_layout Plain Layout
14839 \begin_inset Flex Code
14842 \begin_layout Plain Layout
14851 \begin_layout Description
14852 \begin_inset Flex Code
14855 \begin_layout Plain Layout
14862 \begin_inset Flex Code
14865 \begin_layout Plain Layout
14874 \begin_inset Flex Code
14877 \begin_layout Plain Layout
14884 \begin_inset Flex Code
14887 \begin_layout Plain Layout
14894 \begin_inset Flex Code
14897 \begin_layout Plain Layout
14899 \begin_inset space ~
14907 ] This defines what the default spacing should be in the style.
14909 \begin_inset Flex Code
14912 \begin_layout Plain Layout
14919 \begin_inset Flex Code
14922 \begin_layout Plain Layout
14929 \begin_inset Flex Code
14932 \begin_layout Plain Layout
14938 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14939 If you specify the argument
14940 \begin_inset Flex Code
14943 \begin_layout Plain Layout
14949 , then you must also provide a value argument which will be the actual multiplie
14951 Note that, contrary to other parameters,
14952 \begin_inset Flex Code
14955 \begin_layout Plain Layout
14961 implies the generation of specific LaTeX code, using the LaTeX package
14965 \begin_inset Flex Code
14968 \begin_layout Plain Layout
14977 \begin_layout Description
14978 \begin_inset Flex Code
14981 \begin_layout Plain Layout
14988 \begin_inset Flex Code
14991 \begin_layout Plain Layout
14998 \begin_inset space \thinspace{}
15002 \begin_inset Flex Code
15005 \begin_layout Plain Layout
15013 ] Allow spell-checking paragraphs of this style.
15017 \begin_layout Description
15018 \begin_inset Flex Code
15021 \begin_layout Plain Layout
15027 The font used for the text body .
15029 \begin_inset CommandInset ref
15031 reference "sub:Font-description"
15038 \begin_layout Description
15039 \begin_inset Flex Code
15042 \begin_layout Plain Layout
15051 \begin_inset Flex Code
15054 \begin_layout Plain Layout
15064 The level of the style in the table of contents.
15065 This is used for automatic numbering of section headings.
15068 \begin_layout Description
15069 \begin_inset Flex Code
15072 \begin_layout Plain Layout
15079 \begin_inset Flex Code
15082 \begin_layout Plain Layout
15088 ] The vertical space with which the very first of a chain of paragraphs
15089 with this style is separated from the previous paragraph.
15090 If the previous paragraph has another style, the separations are not simply
15091 added, but the maximum is taken.
15094 \begin_layout Subsection
15095 \begin_inset CommandInset label
15101 Internationalization of Paragraph Styles
15104 \begin_layout Standard
15105 LyX has long supported internationalization of layout information, but,
15106 until version 2.0, this applied only to the user interface and not to, say,
15108 Thus, French authors were forced to resort to ugly hacks if they wanted
15113 1' instead of `Theorem 1'.
15114 Thanks to Georg Baum, that is no longer the case.
15117 \begin_layout Standard
15119 \begin_inset Flex Code
15122 \begin_layout Plain Layout
15128 defines text that is to appear in the typeset document, it may use
15129 \begin_inset Flex Code
15132 \begin_layout Plain Layout
15139 \begin_inset Flex Code
15142 \begin_layout Plain Layout
15148 to support non-English and even multi-language documents correctly.
15149 The following excerpt (from the
15150 \begin_inset Flex Code
15153 \begin_layout Plain Layout
15159 file) shows how this works:
15162 \begin_layout LyX-Code
15167 \begin_layout LyX-Code
15170 theoremstyle{remark}
15173 \begin_layout LyX-Code
15176 newtheorem{claim}[thm]{
15183 \begin_layout LyX-Code
15187 \begin_layout LyX-Code
15191 \begin_layout LyX-Code
15196 claimname}{_(Claim)}
15199 \begin_layout LyX-Code
15203 \begin_layout LyX-Code
15207 \begin_layout LyX-Code
15216 claimname}{_(Claim)}}
15219 \begin_layout LyX-Code
15224 \begin_layout Standard
15225 In principle, any legal LaTeX may appear in the
15226 \begin_inset Flex Code
15229 \begin_layout Plain Layout
15236 \begin_inset Flex Code
15239 \begin_layout Plain Layout
15245 tags, but in practice they will typically look as they do here.
15246 The key to correct translation of the typeset text is the definition of
15248 \begin_inset Flex Code
15251 \begin_layout Plain Layout
15260 \begin_inset Flex Code
15263 \begin_layout Plain Layout
15275 \begin_layout Standard
15277 \begin_inset Flex Code
15280 \begin_layout Plain Layout
15286 tag provides for internationalization based upon the overall language of
15288 The contents of the tag will be included in the preamble, just as with
15290 \begin_inset Flex Code
15293 \begin_layout Plain Layout
15300 What makes it special is the use of the
15301 \begin_inset Quotes eld
15305 \begin_inset Quotes erd
15309 \begin_inset Flex Code
15312 \begin_layout Plain Layout
15318 , which will be replaced, when LyX produces LaTeX output, with the translation
15319 of its argument into the document language.
15322 \begin_layout Standard
15324 \begin_inset Flex Code
15327 \begin_layout Plain Layout
15333 tag is more complex, since it is meant to provide support for multi-language
15334 documents and so offers an interface to the
15335 \begin_inset Flex Code
15338 \begin_layout Plain Layout
15345 Its contents will be added to the preamble once for each language that
15346 appears in the document.
15347 In this case, the argument to
15348 \begin_inset Flex Code
15351 \begin_layout Plain Layout
15357 will be replaced with its translation into the language in question; the
15359 \begin_inset Flex Code
15362 \begin_layout Plain Layout
15368 is replaced by the language name (as used by the babel package).
15371 \begin_layout Standard
15372 A German document that also included a French section would thus have the
15373 following in the preamble:
15376 \begin_layout LyX-Code
15385 claimname}{Affirmation}}
15386 \begin_inset Newline newline
15397 claimname}{Behauptung}}
15398 \begin_inset Newline newline
15405 claimname}{Behauptung}
15408 \begin_layout Standard
15410 \begin_inset Flex Code
15413 \begin_layout Plain Layout
15419 will then conspire to produce the correct text in the output.
15422 \begin_layout Standard
15423 One important point to note here is that the translations are provided by
15424 LyX itself, through the
15425 \change_inserted -195340706 1334775793
15427 \begin_inset Flex Code
15430 \begin_layout Plain Layout
15432 \change_inserted -195340706 1334775793
15439 \change_deleted -195340706 1334775793
15440 same mechanism it uses for internationalization of the user interface
15443 This means, in effect, that
15444 \begin_inset Flex Code
15447 \begin_layout Plain Layout
15454 \begin_inset Flex Code
15457 \begin_layout Plain Layout
15463 are really only of use in layout files that are provided with LyX, since
15464 text entered in user-created layout files will not be seen by LyX's internation
15466 \change_inserted -195340706 1334775793
15468 \begin_inset Flex Code
15471 \begin_layout Plain Layout
15473 \change_inserted -195340706 1334775793
15479 file is modified accordingly
15482 That said, however, any layout created with the intention that it will
15483 be included with LyX should use these tags where appropriate.
15485 \change_inserted -195340706 1334775793
15486 Please note that the paragraph style translations provided by LyX will
15487 never change with a minor update (e.g.
15488 from version 2.1.x to 2.1.y).
15489 It is however quite likely that a major update (e.g.
15490 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15495 \begin_layout Subsection
15497 \begin_inset CommandInset label
15506 \begin_layout Standard
15507 It is necessary to define the floats (
15508 \begin_inset Flex MenuItem
15511 \begin_layout Plain Layout
15518 \begin_inset Flex MenuItem
15521 \begin_layout Plain Layout
15527 , \SpecialChar \ldots{}
15528 ) in the text class itself.
15529 Standard floats are included in the file
15530 \begin_inset Flex Code
15533 \begin_layout Plain Layout
15539 , so you may have to do no more than add
15542 \begin_layout LyX-Code
15543 Input stdfloats.inc
15546 \begin_layout Standard
15547 to your layout file.
15548 If you want to implement a text class that proposes some other float types
15549 (like the AGU class bundled with LyX), the information below will hopefully
15553 \begin_layout Description
15554 \begin_inset Flex Code
15557 \begin_layout Plain Layout
15564 \begin_inset Flex Code
15567 \begin_layout Plain Layout
15574 \begin_inset Quotes erd
15578 \begin_inset Quotes erd
15581 ] The file name extension of an auxiliary file for the list of figures (or
15583 LaTeX writes the captions to this file.
15586 \begin_layout Description
15587 \begin_inset Flex Code
15590 \begin_layout Plain Layout
15597 \begin_inset Flex Code
15600 \begin_layout Plain Layout
15607 \begin_inset Quotes erd
15611 \begin_inset Quotes erd
15614 ] The string that will be used in the menus and also for the caption.
15615 This is translated to the current language if babel is used.
15618 \begin_layout Description
15619 \begin_inset Flex Code
15622 \begin_layout Plain Layout
15628 These tags control the XHTML output.
15630 \begin_inset space ~
15634 \begin_inset CommandInset ref
15636 reference "sec:Tags-for-XHTML"
15643 \begin_layout Description
15644 \begin_inset Flex Code
15647 \begin_layout Plain Layout
15656 \begin_inset Flex Code
15659 \begin_layout Plain Layout
15668 \begin_inset space \thinspace{}
15672 \begin_inset Flex Code
15675 \begin_layout Plain Layout
15681 ] Indicates whether the float is already defined in the document class or
15682 if instead the LaTeX package
15683 \begin_inset Flex Code
15686 \begin_layout Plain Layout
15692 needs to be loaded to define it on-the-fly.
15694 \begin_inset Flex Code
15697 \begin_layout Plain Layout
15704 \begin_inset Flex Code
15707 \begin_layout Plain Layout
15714 It should be set to
15715 \begin_inset Flex Code
15718 \begin_layout Plain Layout
15724 if the float is already defined by the LaTeX document class.
15727 \begin_layout Description
15728 \begin_inset Flex Code
15731 \begin_layout Plain Layout
15738 \begin_inset Flex Code
15741 \begin_layout Plain Layout
15748 \begin_inset Quotes erd
15752 \begin_inset Quotes erd
15755 ] The command used to generate a list of floats of this type; the leading
15764 \begin_inset Flex Code
15767 \begin_layout Plain Layout
15773 is false, since there is no standard way to generate this command.
15775 \begin_inset Flex Code
15778 \begin_layout Plain Layout
15784 is true, since in that case there is a standard way to define the command.
15787 \begin_layout Description
15788 \begin_inset Flex Code
15791 \begin_layout Plain Layout
15798 \begin_inset Flex Code
15801 \begin_layout Plain Layout
15808 \begin_inset Quotes erd
15812 \begin_inset Quotes erd
15815 ] A title for a list of floats of this kind (list of figures, tables, or
15817 It is used for the screen label within LyX, it is used by LaTeX for the
15818 title and it is used as the title in the XHTML output.
15819 It will be translated to the document language.
15822 \begin_layout Description
15823 \begin_inset Flex Code
15826 \begin_layout Plain Layout
15833 \begin_inset Flex Code
15836 \begin_layout Plain Layout
15843 \begin_inset Quotes erd
15847 \begin_inset Quotes erd
15850 ] This (optional) argument determines whether floats of this class will
15851 be numbered within some sectional unit of the document.
15853 \begin_inset Flex Code
15856 \begin_layout Plain Layout
15863 \begin_inset Quotes eld
15867 \begin_inset Flex Code
15870 \begin_layout Plain Layout
15877 \begin_inset Quotes erd
15880 , the floats will be numbered within chapters.
15884 \begin_layout Description
15885 \begin_inset Flex Code
15888 \begin_layout Plain Layout
15895 \begin_inset Flex Code
15898 \begin_layout Plain Layout
15905 \begin_inset Quotes erd
15909 \begin_inset Quotes erd
15912 ] The default placement for the given class of floats.
15913 The string should be as in standard LaTeX:
15914 \begin_inset Flex Code
15917 \begin_layout Plain Layout
15924 \begin_inset Flex Code
15927 \begin_layout Plain Layout
15934 \begin_inset Flex Code
15937 \begin_layout Plain Layout
15944 \begin_inset Flex Code
15947 \begin_layout Plain Layout
15953 for top, bottom, page, and here, respectively.
15957 \begin_layout Plain Layout
15958 Note that the order of these letters in the string is irrelevant, like in
15964 On top of that there is a new type,
15965 \begin_inset Flex Code
15968 \begin_layout Plain Layout
15974 , which does not really correspond to a float, since it means: put it
15975 \begin_inset Quotes eld
15979 \begin_inset Quotes erd
15983 Note however that the
15984 \begin_inset Flex Code
15987 \begin_layout Plain Layout
15993 specifier is special and, because of implementation details, cannot be
15994 used in non-built in float types.
15995 If you do not understand what this means, just use
15996 \begin_inset Quotes eld
16000 \begin_inset Flex Code
16003 \begin_layout Plain Layout
16010 \begin_inset Quotes erd
16016 \begin_layout Description
16017 \begin_inset Flex Code
16020 \begin_layout Plain Layout
16027 \begin_inset Flex Code
16030 \begin_layout Plain Layout
16036 ] The prefix to use when creating labels referring to floats of this type.
16037 This allows the use of formatted references.
16038 Note that you can remove any
16039 \begin_inset Flex Code
16042 \begin_layout Plain Layout
16048 set by a copied style by using the special value
16049 \begin_inset Quotes eld
16053 \begin_inset Quotes erd
16056 , which must be all caps.
16059 \begin_layout Description
16060 \begin_inset Flex Code
16063 \begin_layout Plain Layout
16070 \begin_inset Flex Code
16073 \begin_layout Plain Layout
16080 \begin_inset Quotes erd
16084 \begin_inset Quotes erd
16087 ] The style used when defining the float using
16088 \begin_inset Flex Code
16091 \begin_layout Plain Layout
16102 \begin_layout Description
16103 \begin_inset Flex Code
16106 \begin_layout Plain Layout
16113 \begin_inset Flex Code
16116 \begin_layout Plain Layout
16123 \begin_inset Quotes erd
16127 \begin_inset Quotes erd
16131 \begin_inset Quotes eld
16135 \begin_inset Quotes erd
16138 of the new class of floats, like program or algorithm.
16139 After the appropriate
16140 \begin_inset Flex Code
16143 \begin_layout Plain Layout
16152 \begin_inset Flex Code
16155 \begin_layout Plain Layout
16164 \begin_inset Flex Code
16167 \begin_layout Plain Layout
16178 \begin_layout Description
16179 \begin_inset Flex Code
16182 \begin_layout Plain Layout
16189 \begin_inset Flex Code
16192 \begin_layout Plain Layout
16199 \begin_inset space \thinspace{}
16203 \begin_inset Flex Code
16206 \begin_layout Plain Layout
16214 ] Specifies whether this float is defined using the LaTeX package
16215 \begin_inset Flex Code
16218 \begin_layout Plain Layout
16224 , either by the class file, another package or on-the-fly by LyX itself.
16227 \begin_layout Standard
16228 Note that defining a float with type
16229 \begin_inset Flex Code
16232 \begin_layout Plain Layout
16240 automatically defines the corresponding counter with name
16241 \begin_inset Flex Code
16244 \begin_layout Plain Layout
16255 \begin_layout Subsection
16256 Flex insets and InsetLayout
16257 \begin_inset CommandInset label
16259 name "sub:Flex-insets-and"
16266 \begin_layout Standard
16267 Flex insets come in three different kinds:
16270 \begin_layout Itemize
16272 \begin_inset Flex Code
16275 \begin_layout Plain Layout
16281 ): These define semantic markup corresponding to such LaTeX commands as
16283 \begin_inset Flex Code
16286 \begin_layout Plain Layout
16295 \begin_inset Flex Code
16298 \begin_layout Plain Layout
16309 \begin_layout Itemize
16311 \begin_inset Flex Code
16314 \begin_layout Plain Layout
16320 ): These can be used to define custom collapsible insets, similar to TeX
16321 code, footnote, and the like.
16322 An obvious example is an endnote inset, which is defined in the
16323 \begin_inset Flex Code
16326 \begin_layout Plain Layout
16335 \begin_layout Itemize
16337 \begin_inset Flex Code
16340 \begin_layout Plain Layout
16346 ): For use with DocBook classes.
16349 \begin_layout Standard
16350 Flex insets are defined using the
16351 \begin_inset Flex Code
16354 \begin_layout Plain Layout
16360 tag, which shall be explained in a moment.
16363 \begin_layout Standard
16365 \begin_inset Flex Code
16368 \begin_layout Plain Layout
16374 tag also serves another function: It can be used to customize the general
16375 layout of many different types of insets.
16377 \begin_inset Flex Code
16380 \begin_layout Plain Layout
16386 can be used to customize the layout parameters for footnotes, marginal
16387 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16388 boxes, tables, algorithms, URLs, and
16389 \change_deleted -712698321 1356964515
16391 \change_inserted -712698321 1356964516
16394 s, as well as to define Flex insets.
16397 \begin_layout Standard
16399 \begin_inset Flex Code
16402 \begin_layout Plain Layout
16408 definition must begin with a line of the form:
16411 \begin_layout LyX-Code
16415 \begin_layout Standard
16417 \begin_inset Flex Code
16420 \begin_layout Plain Layout
16426 indicates the inset whose layout is being defined, and here there are
16427 \change_deleted -712698321 1356964888
16429 \change_inserted -712698321 1356964888
16431 \change_deleted 5863208 1334489267
16437 \begin_layout Enumerate
16438 The layout for a pre-existing inset is being modified.
16439 In this case, can be
16440 \begin_inset Flex Code
16443 \begin_layout Plain Layout
16449 any one of the following:
16450 \begin_inset Flex Code
16453 \begin_layout Plain Layout
16460 \begin_inset Flex Code
16463 \begin_layout Plain Layout
16470 \begin_inset Flex Code
16473 \begin_layout Plain Layout
16480 \begin_inset Flex Code
16483 \begin_layout Plain Layout
16490 \change_inserted -712698321 1356964563
16492 \begin_inset Flex Code
16495 \begin_layout Plain Layout
16497 \change_inserted -712698321 1356964560
16508 \begin_inset Flex Code
16511 \begin_layout Plain Layout
16518 \begin_inset Flex Code
16521 \begin_layout Plain Layout
16528 \begin_inset Flex Code
16531 \begin_layout Plain Layout
16538 \begin_inset Flex Code
16541 \begin_layout Plain Layout
16548 \begin_inset Flex Code
16551 \begin_layout Plain Layout
16558 \begin_inset Flex Code
16561 \begin_layout Plain Layout
16568 \begin_inset Flex Code
16571 \begin_layout Plain Layout
16578 \begin_inset Flex Code
16581 \begin_layout Plain Layout
16588 \begin_inset Flex Code
16591 \begin_layout Plain Layout
16598 \begin_inset Flex Code
16601 \begin_layout Plain Layout
16608 \begin_inset Flex Code
16611 \begin_layout Plain Layout
16618 \begin_inset Flex Code
16621 \begin_layout Plain Layout
16628 \begin_inset Flex Code
16631 \begin_layout Plain Layout
16638 \change_deleted -712698321 1356964592
16640 \begin_inset Flex Code
16643 \begin_layout Plain Layout
16645 \change_deleted -712698321 1353866704
16649 \change_inserted -712698321 1353866707
16660 \begin_inset Flex Code
16663 \begin_layout Plain Layout
16670 \begin_inset Flex Code
16673 \begin_layout Plain Layout
16682 \begin_layout Enumerate
16683 The layout for a Flex inset is being defined.
16685 \begin_inset Flex Code
16688 \begin_layout Plain Layout
16694 must be of the form
16695 \begin_inset Quotes eld
16699 \begin_inset Flex Code
16702 \begin_layout Plain Layout
16709 \begin_inset Quotes erd
16713 \begin_inset Flex Code
16716 \begin_layout Plain Layout
16722 may be be any valid identifier not used by a pre-existing Flex inset.
16723 The identifier may include spaces, but in that case the whole thing must
16724 be wrapped in quotes.
16725 Note that the definition of a flex inset
16730 \begin_inset Flex Code
16733 \begin_layout Plain Layout
16739 entry, declaring which type of inset it defines.
16740 \change_inserted 5863208 1334489312
16744 \begin_layout Enumerate
16746 \change_inserted 5863208 1334492248
16747 The layout for user specific branch is being defined.
16749 \begin_inset Flex Code
16752 \begin_layout Plain Layout
16754 \change_inserted 5863208 1334489384
16760 must be of the form
16761 \begin_inset Quotes eld
16765 \begin_inset Flex Code
16768 \begin_layout Plain Layout
16770 \change_inserted 5863208 1334489392
16777 \begin_inset Quotes erd
16781 \begin_inset Flex Code
16784 \begin_layout Plain Layout
16786 \change_inserted 5863208 1334489384
16792 may be be any valid identifier of branch defined in user's document.
16793 The identifier may include spaces, but in that case the whole thing must
16794 be wrapped in quotes.
16795 The main purpose of this feature is to allow LaTeX wrapping around specific
16796 branches as user needs.
16797 \change_inserted -712698321 1356964893
16801 \begin_layout Enumerate
16803 \change_inserted -712698321 1356965125
16804 The layout of a user (or class) specific caption is being defined.
16806 \begin_inset Flex Code
16809 \begin_layout Plain Layout
16811 \change_inserted -712698321 1356964939
16817 must be of the form
16818 \begin_inset Quotes eld
16822 \begin_inset Flex Code
16825 \begin_layout Plain Layout
16827 \change_inserted -712698321 1356964943
16834 \begin_inset Quotes erd
16838 \begin_inset Flex Code
16841 \begin_layout Plain Layout
16843 \change_inserted -712698321 1356964939
16849 specifies the name of the caption as it appears in the menu.
16850 Have a look at the standard caption (
16851 \begin_inset Flex Code
16854 \begin_layout Plain Layout
16856 \change_inserted -712698321 1356964987
16862 ), the specific captions of the KOMA-Script classes (
16863 \begin_inset Flex Code
16866 \begin_layout Plain Layout
16868 \change_inserted -712698321 1356965018
16875 \begin_inset Flex Code
16878 \begin_layout Plain Layout
16880 \change_inserted -712698321 1356965021
16891 \begin_inset Flex Code
16894 \begin_layout Plain Layout
16896 \change_inserted -712698321 1356965045
16902 ) for applications.
16907 \begin_layout Standard
16909 \begin_inset Flex Code
16912 \begin_layout Plain Layout
16918 definition can contain the following entries:
16921 \begin_layout Description
16923 \change_inserted -712698321 1353681390
16924 \begin_inset Flex Code
16927 \begin_layout Plain Layout
16929 \change_inserted -712698321 1353681344
16936 \begin_inset Flex Code
16939 \begin_layout Plain Layout
16941 \change_inserted -712698321 1353681344
16947 ] Defines argument number <int> of a command\SpecialChar \slash{}
16948 environment associated with
16949 the current layout.
16950 The definition must end with
16951 \begin_inset Flex Code
16954 \begin_layout Plain Layout
16956 \change_inserted -712698321 1353681344
16964 \begin_inset space ~
16968 \begin_inset CommandInset ref
16970 reference "sub:Paragraph-Styles"
16977 \begin_layout Description
16979 \change_inserted -195340706 1333913893
16980 \begin_inset Flex Code
16983 \begin_layout Plain Layout
16989 Preamble for changing languages.
16991 \begin_inset space ~
16995 \begin_inset CommandInset ref
16997 reference "sub:I18n"
17004 \begin_layout Description
17005 \begin_inset Flex Code
17008 \begin_layout Plain Layout
17015 \begin_inset Flex Code
17018 \begin_layout Plain Layout
17024 ] The color for the inset's background.
17026 \begin_inset space ~
17030 \begin_inset CommandInset ref
17032 reference "chap:Names-of-colors"
17036 for a list of the available color names.
17039 \begin_layout Description
17040 \begin_inset Flex Code
17043 \begin_layout Plain Layout
17050 \begin_inset Flex Code
17053 \begin_layout Plain Layout
17062 \begin_inset space \thinspace{}
17066 \begin_inset Flex Code
17069 \begin_layout Plain Layout
17075 ] Whether to use the content of the inset as the label, when the inset is
17080 \begin_layout Description
17081 \begin_inset Flex Code
17084 \begin_layout Plain Layout
17091 \begin_inset Flex Code
17094 \begin_layout Plain Layout
17100 ] As with paragraph styles, see sec.
17101 \begin_inset space ~
17105 \begin_inset CommandInset ref
17107 reference "sub:Paragraph-Styles"
17112 Note that you need to specify the complete type, e.
17113 \begin_inset space \thinspace{}
17117 \begin_inset space ~
17121 \begin_inset Flex Code
17124 \begin_layout Plain Layout
17125 CopyStyle Flex:<name>
17133 \begin_layout Description
17134 \begin_inset Flex Code
17137 \begin_layout Plain Layout
17144 \begin_inset Flex Code
17147 \begin_layout Plain Layout
17156 \begin_inset space \thinspace{}
17160 \begin_inset Flex Code
17163 \begin_layout Plain Layout
17169 ] Indicates whether the user may employ the Paragraph Settings dialog to
17170 customize the paragraph.
17173 \begin_layout Description
17174 \begin_inset Flex Code
17177 \begin_layout Plain Layout
17184 \begin_inset Flex Code
17187 \begin_layout Plain Layout
17194 \begin_inset Flex Code
17197 \begin_layout Plain Layout
17204 \begin_inset Flex Code
17207 \begin_layout Plain Layout
17213 , describing the rendering style used for the inset's frame and buttons.
17214 Footnotes generally use
17215 \begin_inset Flex Code
17218 \begin_layout Plain Layout
17224 , ERT insets generally
17225 \begin_inset Flex Code
17228 \begin_layout Plain Layout
17234 , and character styles
17235 \begin_inset Flex Code
17238 \begin_layout Plain Layout
17247 \begin_layout Description
17248 \begin_inset Flex Code
17251 \begin_layout Plain Layout
17258 \begin_inset Flex Code
17261 \begin_layout Plain Layout
17270 \begin_inset space \thinspace{}
17276 \begin_inset Flex Code
17279 \begin_layout Plain Layout
17288 \begin_inset Flex Code
17291 \begin_layout Plain Layout
17298 \begin_inset Flex Code
17301 \begin_layout Plain Layout
17308 Indicates whether the environment will stand on its own in the output or
17309 will appear inline with the surrounding text.
17310 If set to false, it is supposed that the LaTeX environment ignores white
17311 space (including one newline character) after the
17312 \begin_inset Flex Code
17315 \begin_layout Plain Layout
17328 \begin_inset Flex Code
17331 \begin_layout Plain Layout
17347 \begin_layout Description
17348 \begin_inset Flex Code
17351 \begin_layout Plain Layout
17357 Required at the end of the
17358 \begin_inset Flex Code
17361 \begin_layout Plain Layout
17370 \begin_layout Description
17371 \begin_inset Flex Code
17374 \begin_layout Plain Layout
17380 The font used for both the text body
17386 \begin_inset space ~
17390 \begin_inset CommandInset ref
17392 reference "sub:Font-description"
17397 Note that defining this font automatically defines the
17398 \begin_inset Flex Code
17401 \begin_layout Plain Layout
17407 to the same value, so define this first and define
17408 \begin_inset Flex Code
17411 \begin_layout Plain Layout
17417 later if you want them to be different.
17418 \change_inserted 155139281 1354130923
17422 \begin_layout Description
17424 \change_inserted 155139281 1354130923
17425 \begin_inset Flex Code
17428 \begin_layout Plain Layout
17430 \change_inserted 155139281 1354130923
17431 ForceLocalFontSwitch
17437 \begin_inset Flex Code
17440 \begin_layout Plain Layout
17442 \change_inserted 155139281 1354130923
17451 \begin_inset Flex Code
17454 \begin_layout Plain Layout
17456 \change_inserted 155139281 1354130923
17462 ] When using babel, always use a local font switch (
17463 \begin_inset Flex Code
17466 \begin_layout Plain Layout
17468 \change_inserted 155139281 1354130923
17476 ), never a global one (such as
17477 \begin_inset Flex Code
17480 \begin_layout Plain Layout
17482 \change_inserted 155139281 1354130923
17495 \begin_layout Description
17496 \begin_inset Flex Code
17499 \begin_layout Plain Layout
17506 \begin_inset Flex Code
17509 \begin_layout Plain Layout
17518 \begin_inset space \thinspace{}
17522 \begin_inset Flex Code
17525 \begin_layout Plain Layout
17532 \begin_inset Quotes eld
17536 \begin_inset Quotes erd
17539 language, leading to Left-to-Right (Latin) output, e.
17540 \begin_inset space \thinspace{}
17544 \begin_inset space \space{}
17547 in TeX code or URL.
17551 \begin_layout Description
17552 \begin_inset Flex Code
17555 \begin_layout Plain Layout
17562 \begin_inset Flex Code
17565 \begin_layout Plain Layout
17574 \begin_inset space \thinspace{}
17578 \begin_inset Flex Code
17581 \begin_layout Plain Layout
17587 ] Indicates whether the
17588 \begin_inset Flex Code
17591 \begin_layout Plain Layout
17597 should be used or, instead, the user can change the paragraph style used
17602 \begin_layout Description
17603 \begin_inset Flex Code
17606 \begin_layout Plain Layout
17613 \begin_inset Flex Code
17616 \begin_layout Plain Layout
17625 \begin_inset space \thinspace{}
17629 \begin_inset Flex Code
17632 \begin_layout Plain Layout
17638 ] As with paragraph styles, see sec.
17639 \begin_inset space ~
17643 \begin_inset CommandInset ref
17645 reference "sub:Paragraph-Styles"
17652 \begin_layout Description
17653 \begin_inset Flex Code
17656 \begin_layout Plain Layout
17662 These tags control the XHTML output.
17664 \begin_inset space ~
17668 \begin_inset CommandInset ref
17670 reference "sec:Tags-for-XHTML"
17677 \begin_layout Description
17678 \begin_inset Flex Code
17681 \begin_layout Plain Layout
17688 \begin_inset Flex Code
17691 \begin_layout Plain Layout
17700 \begin_inset space \thinspace{}
17704 \begin_inset Flex Code
17707 \begin_layout Plain Layout
17713 ] Whether to include the contents of this inset in the strings generated
17714 for the `Outline' pane.
17715 One would not, for example, want the content of a footnote in a section
17716 header to be included in the TOC displayed in the outline, but one would
17717 normally want the content of a character style displayed.
17718 Default is false: not to include.
17721 \begin_layout Description
17722 \begin_inset Flex Code
17725 \begin_layout Plain Layout
17734 \begin_inset Flex Code
17737 \begin_layout Plain Layout
17746 \begin_inset space \thinspace{}
17750 \begin_inset Flex Code
17753 \begin_layout Plain Layout
17759 ] As with paragraph styles, see sec.
17760 \begin_inset space ~
17764 \begin_inset CommandInset ref
17766 reference "sub:Paragraph-Styles"
17773 \begin_layout Description
17774 \begin_inset Flex Code
17777 \begin_layout Plain Layout
17783 The font used for the label.
17785 \begin_inset space ~
17789 \begin_inset CommandInset ref
17791 reference "sub:Font-description"
17796 Note that this definition can never appear before
17797 \begin_inset Flex Code
17800 \begin_layout Plain Layout
17806 , lest it be ineffective.
17809 \begin_layout Description
17810 \begin_inset Flex Code
17813 \begin_layout Plain Layout
17820 \begin_inset Flex Code
17823 \begin_layout Plain Layout
17830 \begin_inset Quotes erd
17834 \begin_inset Quotes erd
17837 ] What will be displayed on the button or elsewhere as the inset label.
17839 \begin_inset Flex Code
17842 \begin_layout Plain Layout
17849 \begin_inset Flex Code
17852 \begin_layout Plain Layout
17858 ) modify this label on the fly.
17861 \begin_layout Description
17863 \change_inserted -195340706 1333913893
17864 \begin_inset Flex Code
17867 \begin_layout Plain Layout
17873 Language dependent preamble.
17875 \begin_inset space ~
17879 \begin_inset CommandInset ref
17881 reference "sub:I18n"
17888 \begin_layout Description
17889 \begin_inset Flex Code
17892 \begin_layout Plain Layout
17899 \begin_inset Flex Code
17902 \begin_layout Plain Layout
17908 ] The name of the corresponding LaTeX stuff.
17909 Either the environment or command name.
17912 \begin_layout Description
17913 \begin_inset Flex Code
17916 \begin_layout Plain Layout
17923 \begin_inset Flex Code
17926 \begin_layout Plain Layout
17932 ] The optional parameter for the corresponding
17933 \begin_inset Flex Code
17936 \begin_layout Plain Layout
17942 stuff, including possible bracket pairs like
17943 \begin_inset Flex Code
17946 \begin_layout Plain Layout
17954 \change_inserted -712698321 1355144715
17955 This will be output as is after all LaTeX
17956 \begin_inset Flex Code
17959 \begin_layout Plain Layout
17961 \change_inserted -712698321 1355144713
17970 This parameter cannot be changed from within LyX
17971 \change_inserted -712698321 1355144775
17973 \begin_inset Flex Code
17976 \begin_layout Plain Layout
17978 \change_inserted -712698321 1355144747
17984 for customizable parameters)
17989 \begin_layout Description
17990 \begin_inset Flex Code
17993 \begin_layout Plain Layout
18000 \begin_inset Flex Code
18003 \begin_layout Plain Layout
18005 \change_deleted -712698321 1353867544
18012 Command, Environment,
18013 \change_inserted -712698321 1353867573
18015 \change_deleted -712698321 1353867557
18024 \begin_inset Flex Code
18027 \begin_layout Plain Layout
18029 \change_deleted -712698321 1353867564
18033 \change_deleted -712698321 1353867569
18041 ] How the style should be translated into LaTeX.
18045 \begin_layout Plain Layout
18046 \begin_inset Flex Code
18049 \begin_layout Plain Layout
18055 is perhaps a bit misleading, since these rules apply to SGML classes, too.
18056 Visit the SGML class files for specific examples.
18065 \begin_layout Description
18066 \begin_inset Flex Code
18069 \begin_layout Plain Layout
18071 \change_deleted -712698321 1353867582
18073 \change_inserted -712698321 1353867583
18081 means nothing special.
18085 \begin_layout Description
18086 \begin_inset Flex Code
18089 \begin_layout Plain Layout
18096 \begin_inset Flex Code
18099 \begin_layout Plain Layout
18106 {\SpecialChar \ldots{}
18115 \begin_layout Description
18116 \begin_inset Flex Code
18119 \begin_layout Plain Layout
18126 \begin_inset Flex Code
18129 \begin_layout Plain Layout
18136 }\SpecialChar \ldots{}
18152 \begin_layout Description
18154 \change_deleted -712698321 1353867600
18155 \begin_inset Flex Code
18158 \begin_layout Plain Layout
18165 \begin_inset Flex Code
18168 \begin_layout Plain Layout
18175 \begin_inset Flex Code
18178 \begin_layout Plain Layout
18186 is generated for each paragraph of this environment.
18190 \begin_layout Description
18192 \change_deleted -712698321 1353867600
18193 \begin_inset Flex Code
18196 \begin_layout Plain Layout
18203 \begin_inset Flex Code
18206 \begin_layout Plain Layout
18213 \begin_inset Flex Code
18216 \begin_layout Plain Layout
18222 is passed as an argument to the environment.
18224 \begin_inset Flex Code
18227 \begin_layout Plain Layout
18233 can be defined in the
18234 \begin_inset Flex MenuItem
18237 \begin_layout Plain Layout
18242 \SpecialChar \menuseparator
18248 \begin_inset space ~
18262 \begin_layout Standard
18263 Putting the last few things together, the LaTeX output will be either:
18266 \begin_layout LyX-Code
18270 \change_deleted 2090807402 1356919073
18272 \change_inserted 2090807402 1356919073
18276 \change_deleted 2090807402 1356919073
18278 \change_inserted 2090807402 1356919002
18281 ]{\SpecialChar \ldots{}
18285 \begin_layout Standard
18289 \begin_layout LyX-Code
18293 \change_deleted 2090807402 1356919013
18295 \change_inserted 2090807402 1356919014
18299 \change_deleted 2090807402 1356919013
18301 \change_inserted 2090807402 1356919008
18304 ] \SpecialChar \ldots{}
18308 \change_deleted 2090807402 1356919016
18310 \change_inserted 2090807402 1356919016
18316 \begin_layout Standard
18317 depending upon the LaTeX type.
18321 \begin_layout Description
18323 \change_inserted -712698321 1354263128
18324 \begin_inset Flex Code
18327 \begin_layout Plain Layout
18329 \change_inserted -712698321 1353866742
18338 \begin_inset Flex Code
18341 \begin_layout Plain Layout
18343 \change_inserted -712698321 1353866752
18349 ] A string that is put at the beginning of the layout content.
18350 A line break in the output can be indicated by
18351 \begin_inset Flex Code
18354 \begin_layout Plain Layout
18356 \change_inserted -712698321 1354263128
18367 \begin_layout Description
18368 \begin_inset Flex Code
18371 \begin_layout Plain Layout
18378 \begin_inset Flex Code
18381 \begin_layout Plain Layout
18388 \begin_inset Flex Code
18391 \begin_layout Plain Layout
18398 \begin_inset Flex Code
18401 \begin_layout Plain Layout
18408 \begin_inset Flex Code
18411 \begin_layout Plain Layout
18417 (indicating a dummy definition ending definitions of charstyles, etc).
18418 This entry is required in and is only meaningful for Flex insets.
18419 Among other things, it determines on which menu this inset will appear.
18421 \begin_inset Flex Code
18424 \begin_layout Plain Layout
18431 \begin_inset Flex Code
18434 \begin_layout Plain Layout
18440 will automatically set
18441 \begin_inset Flex Code
18444 \begin_layout Plain Layout
18452 \begin_inset Flex Code
18455 \begin_layout Plain Layout
18461 can be set to true for
18462 \begin_inset Flex Code
18465 \begin_layout Plain Layout
18471 insets by setting it
18476 \begin_inset Flex Code
18479 \begin_layout Plain Layout
18488 \begin_layout Description
18489 \begin_inset Flex Code
18492 \begin_layout Plain Layout
18499 \begin_inset Flex Code
18502 \begin_layout Plain Layout
18511 \begin_inset space \thinspace{}
18515 \begin_inset Flex Code
18518 \begin_layout Plain Layout
18524 ] Whether multiple paragraphs are permitted in this inset.
18526 \begin_inset Flex Code
18529 \begin_layout Plain Layout
18535 to the same value and
18536 \begin_inset Flex Code
18539 \begin_layout Plain Layout
18545 to the opposite value.
18546 These can be reset to other values, if they are used
18551 \begin_inset Flex Code
18554 \begin_layout Plain Layout
18564 \begin_layout Description
18565 \begin_inset Flex Code
18568 \begin_layout Plain Layout
18575 \begin_inset Flex Code
18578 \begin_layout Plain Layout
18587 \begin_inset space \thinspace{}
18591 \begin_inset Flex Code
18594 \begin_layout Plain Layout
18600 ] Whether fragile commands in this inset should be
18601 \begin_inset Flex Code
18604 \begin_layout Plain Layout
18617 whether the command should itself be protected.) Default is false.
18618 \change_inserted 1414654397 1360681873
18622 \begin_layout Description
18624 \change_inserted 1414654397 1360681892
18625 \begin_inset Flex Code
18628 \begin_layout Plain Layout
18630 \change_inserted 1414654397 1360681880
18637 \begin_inset Flex Code
18640 \begin_layout Plain Layout
18642 \change_inserted 1414654397 1360681883
18648 ] Deletes an existing
18649 \begin_inset Flex Code
18652 \begin_layout Plain Layout
18654 \change_inserted 1414654397 1360681892
18665 \begin_layout Description
18666 \begin_inset Flex Code
18669 \begin_layout Plain Layout
18676 \begin_inset Flex Code
18679 \begin_layout Plain Layout
18688 \begin_inset space \thinspace{}
18692 \begin_inset Flex Code
18695 \begin_layout Plain Layout
18701 ] As with paragraph styles, see sec.
18702 \begin_inset space ~
18706 \begin_inset CommandInset ref
18708 reference "sub:Paragraph-Styles"
18716 \begin_layout Description
18717 \begin_inset Flex Code
18720 \begin_layout Plain Layout
18727 \begin_inset Flex Code
18730 \begin_layout Plain Layout
18739 \begin_inset space \thinspace{}
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"
18767 \begin_layout Description
18768 \begin_inset Flex Code
18771 \begin_layout Plain Layout
18777 As with paragraph styles, see sec.
18778 \begin_inset space ~
18782 \begin_inset CommandInset ref
18784 reference "sub:Paragraph-Styles"
18791 \begin_layout Description
18792 \begin_inset Flex Code
18795 \begin_layout Plain Layout
18802 \begin_inset Flex Code
18805 \begin_layout Plain Layout
18811 ] The prefix to use when creating labels referring to insets of this type.
18812 This allows the use of formatted references.
18815 \begin_layout Description
18816 \begin_inset Flex Code
18819 \begin_layout Plain Layout
18826 \begin_inset Flex Code
18829 \begin_layout Plain Layout
18835 ] As with paragraph styles, see sec.
18836 \begin_inset space ~
18840 \begin_inset CommandInset ref
18842 reference "sub:Paragraph-Styles"
18847 \change_inserted -712698321 1354439699
18851 \begin_layout Description
18853 \change_inserted -712698321 1354439705
18854 \begin_inset Flex Code
18857 \begin_layout Plain Layout
18859 \change_inserted -712698321 1354439699
18866 \begin_inset Flex Code
18869 \begin_layout Plain Layout
18871 \change_inserted -712698321 1354439699
18880 \begin_inset Flex Code
18883 \begin_layout Plain Layout
18885 \change_inserted -712698321 1354439699
18891 ] Resets the LaTeX arguments of this layout (as defined via the
18892 \begin_inset Flex Code
18895 \begin_layout Plain Layout
18897 \change_inserted -712698321 1354439699
18904 This is useful if you have copied a style via
18905 \begin_inset Flex Code
18908 \begin_layout Plain Layout
18910 \change_inserted -712698321 1354439699
18916 , but you do not want to inherit its (required and optional) arguments.
18918 \change_deleted -712698321 1354439698
18924 \begin_layout Description
18925 \begin_inset Flex Code
18928 \begin_layout Plain Layout
18935 \begin_inset Flex Code
18938 \begin_layout Plain Layout
18945 \begin_inset space \thinspace{}
18949 \begin_inset Flex Code
18952 \begin_layout Plain Layout
18960 ] Whether this inset should use the font of its surrounding environment
18962 Default is true: uses its own.
18965 \begin_layout Description
18967 \change_inserted -712698321 1354263134
18968 \begin_inset Flex Code
18971 \begin_layout Plain Layout
18973 \change_inserted -712698321 1353866810
18980 \begin_inset Flex Code
18983 \begin_layout Plain Layout
18985 \change_inserted -712698321 1353866806
18991 ] A string that is put at the end of the layout content.
18992 A line break in the output can be indicated by
18993 \begin_inset Flex Code
18996 \begin_layout Plain Layout
18998 \change_inserted -712698321 1354263134
19009 \begin_layout Description
19010 \begin_inset Flex Code
19013 \begin_layout Plain Layout
19020 \begin_inset Flex Code
19023 \begin_layout Plain Layout
19030 \begin_inset space \thinspace{}
19034 \begin_inset Flex Code
19037 \begin_layout Plain Layout
19045 ] Allow spell-checking the contents of this inset.
19049 \begin_layout Subsection
19051 \begin_inset CommandInset label
19053 name "sub:Counters"
19060 \begin_layout Standard
19061 It is necessary to define the counters (
19062 \begin_inset Flex MenuItem
19065 \begin_layout Plain Layout
19072 \begin_inset Flex MenuItem
19075 \begin_layout Plain Layout
19081 , \SpecialChar \ldots{}
19082 ) in the text class itself.
19083 The standard counters are defined in the file
19084 \begin_inset Flex Code
19087 \begin_layout Plain Layout
19093 , so you may have to do no more than add
19096 \begin_layout LyX-Code
19097 Input stdcounters.inc
19100 \begin_layout Standard
19101 to your layout file to get them to work.
19102 But if you want to define custom counters, then you can do so.
19103 The counter declaration must begin with:
19106 \begin_layout LyX-Code
19107 Counter CounterName
19110 \begin_layout Standard
19112 \begin_inset Flex Code
19115 \begin_layout Plain Layout
19121 ' is replaced by the name of the counter.
19122 And it must end with
19123 \begin_inset Quotes eld
19127 \begin_inset Flex Code
19130 \begin_layout Plain Layout
19137 \begin_inset Quotes erd
19141 The following parameters can also be used:
19144 \begin_layout Description
19145 \begin_inset Flex Code
19148 \begin_layout Plain Layout
19155 \begin_inset Flex Code
19158 \begin_layout Plain Layout
19165 \begin_inset Quotes erd
19169 \begin_inset Quotes erd
19172 ] When defined, this string defines how the counter is displayed.
19173 Setting this value sets
19174 \begin_inset Flex Code
19177 \begin_layout Plain Layout
19178 LabelStringAppendix
19184 The following special constructs can be used in the string:
19188 \begin_layout Itemize
19189 \begin_inset Flex Code
19192 \begin_layout Plain Layout
19200 will be replaced by the expansion of the
19201 \begin_inset Flex Code
19204 \begin_layout Plain Layout
19211 \begin_inset Flex Code
19214 \begin_layout Plain Layout
19215 LabelStringAppendix
19221 \begin_inset Flex Code
19224 \begin_layout Plain Layout
19234 \begin_layout Itemize
19235 counter values can be expressed using LaTeX-like macros
19236 \begin_inset Newline newline
19240 \begin_inset Flex Code
19243 \begin_layout Plain Layout
19260 \begin_inset Flex Code
19263 \begin_layout Plain Layout
19275 \begin_layout Plain Layout
19285 Actually, the situation is a bit more complicated: any
19304 other than those described below will produce arabic numerals.
19305 It would not be surprising to see this change in the future.
19311 \begin_inset Flex Code
19314 \begin_layout Plain Layout
19320 : 1, 2, 3,\SpecialChar \ldots{}
19322 \begin_inset Flex Code
19325 \begin_layout Plain Layout
19331 for lower-case letters: a, b, c, \SpecialChar \ldots{}
19333 \begin_inset Flex Code
19336 \begin_layout Plain Layout
19342 for upper-case letters: A, B, C, \SpecialChar \ldots{}
19344 \begin_inset Flex Code
19347 \begin_layout Plain Layout
19353 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
19355 \begin_inset Flex Code
19358 \begin_layout Plain Layout
19364 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
19366 \begin_inset Flex Code
19369 \begin_layout Plain Layout
19375 for hebrew numerals.
19379 \begin_layout Standard
19380 If LabelString is not defined, a default value is constructed as follows:
19381 if the counter has a master counter
19382 \begin_inset Flex Code
19385 \begin_layout Plain Layout
19392 \begin_inset Flex Code
19395 \begin_layout Plain Layout
19402 \begin_inset Newline newline
19406 \begin_inset Flex Code
19409 \begin_layout Plain Layout
19419 is used; otherwise the string
19420 \begin_inset Flex Code
19423 \begin_layout Plain Layout
19434 \begin_layout Description
19435 \begin_inset Flex Code
19438 \begin_layout Plain Layout
19439 LabelStringAppendix
19445 \begin_inset Flex Code
19448 \begin_layout Plain Layout
19455 \begin_inset Quotes erd
19459 \begin_inset Quotes erd
19463 \begin_inset Flex Code
19466 \begin_layout Plain Layout
19472 , but for use in the Appendix.
19475 \begin_layout Description
19476 \begin_inset Flex Code
19479 \begin_layout Plain Layout
19486 \begin_inset Flex Code
19489 \begin_layout Plain Layout
19496 \begin_inset Quotes erd
19500 \begin_inset Quotes erd
19503 ] A format for use with formatted references to this counter.
19504 For example, one might want to have references to section numbers appear
19506 \begin_inset Quotes eld
19510 \begin_inset Quotes erd
19514 The string should contain
19515 \begin_inset Quotes eld
19519 \begin_inset Quotes erd
19523 This will be replaced by the counter number itself.
19524 So, for sections, it would be: Section ##.
19527 \begin_layout Description
19528 \begin_inset Flex Code
19531 \begin_layout Plain Layout
19538 \begin_inset Flex Code
19541 \begin_layout Plain Layout
19548 \begin_inset Quotes erd
19552 \begin_inset Quotes erd
19555 ] If this is set to the name of another counter, the present counter will
19556 be reset every time the other one is increased.
19558 \begin_inset Flex Code
19561 \begin_layout Plain Layout
19568 \begin_inset Flex Code
19571 \begin_layout Plain Layout
19580 \begin_layout Subsection
19582 \begin_inset CommandInset label
19584 name "sub:Font-description"
19591 \begin_layout Standard
19592 A font description looks like this:
19595 \begin_layout LyX-Code
19609 \begin_layout LyX-Code
19613 \begin_layout LyX-Code
19617 \begin_layout Standard
19618 The following commands are available:
19621 \begin_layout Description
19622 \begin_inset Flex Code
19625 \begin_layout Plain Layout
19632 \begin_inset Flex Code
19635 \begin_layout Plain Layout
19644 \begin_inset Flex Code
19647 \begin_layout Plain Layout
19654 \begin_inset Flex Code
19657 \begin_layout Plain Layout
19664 \begin_inset Flex Code
19667 \begin_layout Plain Layout
19674 \begin_inset Flex Code
19677 \begin_layout Plain Layout
19684 \begin_inset Flex Code
19687 \begin_layout Plain Layout
19694 \begin_inset Flex Code
19697 \begin_layout Plain Layout
19704 \begin_inset Flex Code
19707 \begin_layout Plain Layout
19714 \begin_inset Flex Code
19717 \begin_layout Plain Layout
19726 \begin_layout Description
19727 \begin_inset Flex Code
19730 \begin_layout Plain Layout
19737 \begin_inset Flex Code
19740 \begin_layout Plain Layout
19749 \begin_inset Flex Code
19752 \begin_layout Plain Layout
19759 \begin_inset Flex Code
19762 \begin_layout Plain Layout
19771 \begin_layout Description
19772 \begin_inset Flex Code
19775 \begin_layout Plain Layout
19782 \begin_inset Flex Code
19785 \begin_layout Plain Layout
19791 ] Valid arguments are:
19792 \begin_inset Flex Code
19795 \begin_layout Plain Layout
19802 \begin_inset Flex Code
19805 \begin_layout Plain Layout
19812 \begin_inset Flex Code
19815 \begin_layout Plain Layout
19822 \begin_inset Flex Code
19825 \begin_layout Plain Layout
19832 \begin_inset Flex Code
19835 \begin_layout Plain Layout
19842 \begin_inset Flex Code
19845 \begin_layout Plain Layout
19852 \begin_inset Flex Code
19855 \begin_layout Plain Layout
19862 \begin_inset Flex Code
19865 \begin_layout Plain Layout
19872 \begin_inset Flex Code
19875 \begin_layout Plain Layout
19882 \begin_inset Flex Code
19885 \begin_layout Plain Layout
19892 \begin_inset Flex Code
19895 \begin_layout Plain Layout
19902 \begin_inset Flex Code
19905 \begin_layout Plain Layout
19912 Each of these turns on or off the corresponding attribute.
19914 \begin_inset Flex Code
19917 \begin_layout Plain Layout
19923 turns on emphasis, and
19924 \begin_inset Flex Code
19927 \begin_layout Plain Layout
19935 \begin_inset Newline newline
19938 If the latter seems puzzling, remember that the font settings for the present
19939 context are generally inherited from the surrounding context.
19941 \begin_inset Flex Code
19944 \begin_layout Plain Layout
19950 would turn off the emphasis that was anyway in effect, say, in a theorem
19954 \begin_layout Description
19955 \begin_inset Flex Code
19958 \begin_layout Plain Layout
19965 \begin_inset Flex Code
19968 \begin_layout Plain Layout
19977 \begin_inset Flex Code
19980 \begin_layout Plain Layout
19989 \begin_layout Description
19990 \begin_inset Flex Code
19993 \begin_layout Plain Layout
20000 \begin_inset Flex Code
20003 \begin_layout Plain Layout
20012 \begin_inset Flex Code
20015 \begin_layout Plain Layout
20022 \begin_inset Flex Code
20025 \begin_layout Plain Layout
20032 \begin_inset Flex Code
20035 \begin_layout Plain Layout
20044 \begin_layout Description
20045 \begin_inset Flex Code
20048 \begin_layout Plain Layout
20055 \begin_inset Flex Code
20058 \begin_layout Plain Layout
20065 \begin_inset Flex Code
20068 \begin_layout Plain Layout
20075 \begin_inset Flex Code
20078 \begin_layout Plain Layout
20087 \begin_inset Flex Code
20090 \begin_layout Plain Layout
20097 \begin_inset Flex Code
20100 \begin_layout Plain Layout
20107 \begin_inset Flex Code
20110 \begin_layout Plain Layout
20117 \begin_inset Flex Code
20120 \begin_layout Plain Layout
20127 \begin_inset Flex Code
20130 \begin_layout Plain Layout
20139 \begin_layout Subsection
20140 \begin_inset CommandInset label
20142 name "sub:Citation-format-description"
20146 Citation format description
20149 \begin_layout Standard
20151 \begin_inset Flex Code
20154 \begin_layout Plain Layout
20160 blocks are used to describe how bibliographic information should be displayed,
20161 both within LyX itself (in the citation dialog and in tooltips, for example)
20162 and in XHTML output.
20163 Such a block might look like this:
20166 \begin_layout LyX-Code
20170 \begin_layout LyX-Code
20174 \begin_layout LyX-Code
20178 \begin_layout LyX-Code
20182 \begin_layout Standard
20183 The individual lines define how the bibliographic information associated
20184 with an article or book, respectively, is to be displayed, and such a definitio
20185 n can be given for any `entry type' that might be present in a BibTeX file.
20186 LyX defines a default format in the source code that will be used if no
20187 specific definition has been given.
20188 LyX predefines several formats in the file
20189 \begin_inset Flex Code
20192 \begin_layout Plain Layout
20198 , which is included in most of LyX's document classes.
20201 \begin_layout Standard
20202 The definitions use a simple language that allows BibTeX keys to be replaced
20204 Keys should be enclosed in
20205 \begin_inset Flex Code
20208 \begin_layout Plain Layout
20215 \begin_inset Flex Code
20218 \begin_layout Plain Layout
20225 So a simple definition might look like this:
20228 \begin_layout LyX-Code
20230 \begin_inset Quotes eld
20234 \begin_inset Quotes erd
20240 \begin_layout Standard
20241 This would print the author, followed by a comma, followed by the title,
20242 in quotes, followed by a period.
20245 \begin_layout Standard
20246 Of course, sometimes you may want to print a key only if it exists.
20247 This can be done by using a conditional construction, such as:
20248 \begin_inset Flex Code
20251 \begin_layout Plain Layout
20253 \begin_inset space ~
20263 \begin_inset Flex Code
20266 \begin_layout Plain Layout
20272 key exists, then print
20273 \begin_inset Quotes eld
20277 \begin_inset space ~
20281 \begin_inset Quotes erd
20284 followed by the volume key.
20285 It is also possible to have an else clause in the conditional, such as:
20286 \begin_inset Newline newline
20290 \begin_inset Flex Code
20293 \begin_layout Plain Layout
20294 {%author%[[%author%]][[%editor%, ed.]]}
20300 \begin_inset Newline newline
20304 \begin_inset Flex Code
20307 \begin_layout Plain Layout
20313 key is printed if it exists; otherwise, the editor key is printed, followed
20315 \begin_inset Quotes eld
20319 \begin_inset space ~
20323 \begin_inset Quotes erd
20326 Note that the key is again enclosed in
20327 \begin_inset Flex Code
20330 \begin_layout Plain Layout
20336 signs; the entire conditional is enclosed in braces; and the if and else
20337 clauses are enclosed in double brackets,
20338 \begin_inset Quotes eld
20342 \begin_inset Flex Code
20345 \begin_layout Plain Layout
20352 \begin_inset Quotes eld
20356 \begin_inset Quotes eld
20360 \begin_inset Flex Code
20363 \begin_layout Plain Layout
20370 \begin_inset Quotes erd
20374 There must be no space between any of these.
20377 \begin_layout Standard
20378 There is one other piece of syntax available in definitions, which looks
20380 \begin_inset Flex Code
20383 \begin_layout Plain Layout
20390 This defines a piece of formatting information that is to be used when
20392 \begin_inset Quotes eld
20396 \begin_inset Quotes erd
20400 Obviously, we do not want to output HTML tags when writing plain text,
20401 so they should be wrapped in
20402 \begin_inset Quotes eld
20406 \begin_inset Quotes erd
20410 \begin_inset Quotes eld
20414 \begin_inset Quotes erd
20420 \begin_layout Standard
20421 Two special sorts of definitions are also possible in a
20422 \begin_inset Flex Code
20425 \begin_layout Plain Layout
20432 An example of the first would be:
20435 \begin_layout LyX-Code
20437 \begin_inset Quotes eld
20441 \begin_inset Quotes erd
20447 \begin_layout Standard
20448 This is an abbreviation, or macro, and it can be used by treating it as
20450 \begin_inset Flex Code
20453 \begin_layout Plain Layout
20461 \begin_inset Flex Code
20464 \begin_layout Plain Layout
20470 exactly as it would treat its definition.
20471 So, let us issue the obvious
20479 \begin_layout LyX-Code
20483 \begin_layout Standard
20484 or anything like it.
20485 LyX shouldn't go into an infinite loop, but it may go into a long one before
20489 \begin_layout Standard
20490 The second sort of special definition might look like this:
20493 \begin_layout LyX-Code
20497 \begin_layout Standard
20498 This defines a translatable piece of text, which allows relevant parts of
20499 the bibliography to be translated.
20500 It can be included in a definition by treating it as a key:
20501 \begin_inset Flex Code
20504 \begin_layout Plain Layout
20511 Several of these are predefined in
20512 \begin_inset Flex Code
20515 \begin_layout Plain Layout
20522 Note that these are not macros, in the sense just defined.
20523 They will not be expanded.
20526 \begin_layout Standard
20527 So here then is an example that use all these features:
20528 \begin_inset VSpace defskip
20534 \begin_layout Standard
20538 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20541 \begin_layout Standard
20542 \begin_inset VSpace defskip
20545 This defines a macro that prints the author, followed by a comma, if the
20547 \begin_inset Flex Code
20550 \begin_layout Plain Layout
20556 key is defined, or else prints the name of the editor, followed by the
20558 \begin_inset Flex Code
20561 \begin_layout Plain Layout
20567 or its translation (it is by default
20568 \begin_inset Quotes eld
20572 \begin_inset Quotes erd
20576 \begin_inset Flex Code
20579 \begin_layout Plain Layout
20586 Note that this is in fact defined in
20587 \begin_inset Flex Code
20590 \begin_layout Plain Layout
20596 , so you can use it in your own definitions, or re-definitions, if you load
20600 \begin_layout Section
20601 \begin_inset CommandInset label
20603 name "sec:Tags-for-XHTML"
20607 Tags for XHTML output
20610 \begin_layout Standard
20611 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20612 by layout information.
20613 In general, LyX provides sensible defaults and, as mentioned earlier, it
20614 will even construct default CSS style rules from the other layout tags.
20615 For example, LyX will attempt to use the information provided in the
20616 \begin_inset Flex Code
20619 \begin_layout Plain Layout
20625 declaration for the Chapter style to write CSS that will appropriately
20626 format chapter headings.
20629 \begin_layout Standard
20630 In many cases, then, you may not have to do anything at all to get acceptable
20631 XHTML output for your own environments, custom insets, and so forth.
20632 But in some cases you will, and so LyX provides a number of layout tags
20633 that can be used to customize the XHTML and CSS that are generated.
20636 \begin_layout Standard
20637 Note that there are two tags,
20638 \begin_inset Flex Code
20641 \begin_layout Plain Layout
20648 \begin_inset Flex Code
20651 \begin_layout Plain Layout
20657 that may appear outside style and inset declarations.
20659 \begin_inset CommandInset ref
20661 reference "sub:General-text-class"
20665 for details on these.
20668 \begin_layout Subsection
20669 \begin_inset CommandInset label
20671 name "sub:Paragraph-Style-XHTML"
20678 \begin_layout Standard
20679 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20680 dealing with a normal paragraph, a command, or an environment, where this
20681 is itself determined by the contents of the corresponding
20682 \begin_inset Flex Code
20685 \begin_layout Plain Layout
20695 \begin_layout Standard
20696 For a command or normal paragraph, the output XHTML has the following form:
20699 \begin_layout LyX-Code
20701 \begin_inset Quotes erd
20705 \begin_inset Quotes erd
20711 \begin_layout LyX-Code
20713 \begin_inset Quotes erd
20717 \begin_inset Quotes erd
20723 \begin_layout LyX-Code
20724 Contents of the paragraph.
20727 \begin_layout LyX-Code
20731 \begin_layout Standard
20732 The label tags are of course omitted if the paragraph does not have a label.
20735 \begin_layout Standard
20736 For an environment that is not some sort of list, the XHTML takes this form:
20739 \begin_layout LyX-Code
20741 \begin_inset Quotes erd
20745 \begin_inset Quotes erd
20751 \begin_layout LyX-Code
20753 \begin_inset Quotes erd
20757 \begin_inset Quotes erd
20761 \begin_inset Quotes erd
20765 \begin_inset Quotes erd
20768 >Environment Label</labeltag>First paragraph.</itemtag>
20771 \begin_layout LyX-Code
20772 <itemtag>Second paragraph.</itemtag>
20775 \begin_layout LyX-Code
20779 \begin_layout Standard
20780 Note that the label is output only for the first paragraph, as it should
20781 be for a theorem, for example.
20785 \begin_layout Standard
20786 For a list, we have one of these forms:
20789 \begin_layout LyX-Code
20791 \begin_inset Quotes erd
20795 \begin_inset Quotes erd
20801 \begin_layout LyX-Code
20803 \begin_inset Quotes erd
20807 \begin_inset Quotes erd
20811 \begin_inset Quotes erd
20815 \begin_inset Quotes erd
20818 >List Label</labeltag>First item.</itemtag>
20821 \begin_layout LyX-Code
20823 \begin_inset Quotes erd
20827 \begin_inset Quotes erd
20831 \begin_inset Quotes erd
20835 \begin_inset Quotes erd
20838 >List Label</labeltag>Second item.</itemtag>
20841 \begin_layout LyX-Code
20845 \begin_layout LyX-Code
20849 \begin_layout LyX-Code
20851 \begin_inset Quotes erd
20855 \begin_inset Quotes erd
20861 \begin_layout LyX-Code
20863 \begin_inset Quotes erd
20867 \begin_inset Quotes erd
20870 >List Label</labeltag><itemtag attr=
20871 \begin_inset Quotes erd
20875 \begin_inset Quotes erd
20878 >First item.</itemtag>
20881 \begin_layout LyX-Code
20883 \begin_inset Quotes erd
20887 \begin_inset Quotes erd
20890 >List Label</labeltag><itemtag attr=
20891 \begin_inset Quotes erd
20895 \begin_inset Quotes erd
20898 >Second item.</itemtag>
20901 \begin_layout LyX-Code
20905 \begin_layout Standard
20906 Note the different orders of
20907 \begin_inset Flex Code
20910 \begin_layout Plain Layout
20917 \begin_inset Flex Code
20920 \begin_layout Plain Layout
20927 Which order we get depends upon the setting of
20928 \begin_inset Flex Code
20931 \begin_layout Plain Layout
20938 \begin_inset Flex Code
20941 \begin_layout Plain Layout
20947 is false (the default), you get the first of these, with the label within
20948 the item; if true, you get the second, with the label outside the item.
20951 \begin_layout Standard
20952 The specific tags and attributes output for each paragraph type can be controlle
20953 d by means of the layout tags we are about to describe.
20954 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20955 so you often may not need to do very much to get good XHTML output.
20956 Think of the available tags as there so you can tweak things to your liking.
20959 \begin_layout Description
20960 \begin_inset Flex Code
20963 \begin_layout Plain Layout
20970 \begin_inset Flex Code
20973 \begin_layout Plain Layout
20979 ] Specifies attribute information to be output with the main tag.
20981 \begin_inset Quotes eld
20985 \begin_inset Flex Code
20988 \begin_layout Plain Layout
20995 \begin_inset Quotes erd
20999 By default, LyX will output
21000 \begin_inset Quotes eld
21004 \begin_inset Flex Code
21007 \begin_layout Plain Layout
21014 \begin_inset Quotes erd
21018 \begin_inset Flex Code
21021 \begin_layout Plain Layout
21027 is the LyX name of the layout, made lowercase, for example: chapter.
21032 contain any style information.
21034 \begin_inset Flex Code
21037 \begin_layout Plain Layout
21046 \begin_layout Description
21047 \begin_inset Flex Code
21050 \begin_layout Plain Layout
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21070 ] Whether to output the default CSS information LyX generates for this layout,
21071 even if additional information is explicitly provided via
21072 \begin_inset Flex Code
21075 \begin_layout Plain Layout
21083 \begin_inset Flex Code
21086 \begin_layout Plain Layout
21092 allows you to alter or augment the generated CSS, rather than to override
21095 \begin_inset Flex Code
21098 \begin_layout Plain Layout
21107 \begin_layout Description
21108 \begin_inset Flex Code
21111 \begin_layout Plain Layout
21118 \begin_inset Flex Code
21121 \begin_layout Plain Layout
21127 ] The tag to be used for individual paragraphs of environments, replacing
21129 \begin_inset Flex Code
21132 \begin_layout Plain Layout
21138 in the examples above.
21140 \begin_inset Flex Code
21143 \begin_layout Plain Layout
21152 \begin_layout Description
21153 \begin_inset Flex Code
21156 \begin_layout Plain Layout
21163 \begin_inset Flex Code
21166 \begin_layout Plain Layout
21172 ] Attributes for the item tag.
21174 \begin_inset Quotes eld
21178 \begin_inset Flex Code
21181 \begin_layout Plain Layout
21182 class=`layoutname_item'
21188 \begin_inset Quotes erd
21196 contain any style information.
21198 \begin_inset Flex Code
21201 \begin_layout Plain Layout
21210 \begin_layout Description
21211 \begin_inset Flex Code
21214 \begin_layout Plain Layout
21221 \begin_inset Flex Code
21224 \begin_layout Plain Layout
21230 ] The tag to be used for paragraph and item labels, replacing
21231 \begin_inset Flex Code
21234 \begin_layout Plain Layout
21240 in the examples above.
21242 \begin_inset Flex Code
21245 \begin_layout Plain Layout
21252 \begin_inset Flex Code
21255 \begin_layout Plain Layout
21262 \begin_inset Flex Code
21265 \begin_layout Plain Layout
21272 \begin_inset Flex Code
21275 \begin_layout Plain Layout
21276 Centered_Top_Environment
21281 , in which case it defaults to
21282 \begin_inset Flex Code
21285 \begin_layout Plain Layout
21294 \begin_layout Description
21295 \begin_inset Flex Code
21298 \begin_layout Plain Layout
21305 \begin_inset Flex Code
21308 \begin_layout Plain Layout
21314 ] Attributes for the label tag.
21316 \begin_inset Quotes eld
21320 \begin_inset Flex Code
21323 \begin_layout Plain Layout
21324 class=`layoutname_label'
21330 \begin_inset Quotes erd
21338 contain any style information.
21340 \begin_inset Flex Code
21343 \begin_layout Plain Layout
21352 \begin_layout Description
21353 \begin_inset Flex Code
21356 \begin_layout Plain Layout
21363 \begin_inset Flex Code
21366 \begin_layout Plain Layout
21376 ] Meaningful only for list-like environments, this tag controls whether
21377 the label tag is output before or inside the item tag.
21378 This is used, for example, in the description environment, where we want
21380 \begin_inset Flex Code
21383 \begin_layout Plain Layout
21384 <dt>\SpecialChar \ldots{}
21385 </dt><dd>\SpecialChar \ldots{}
21393 \begin_inset Flex Code
21396 \begin_layout Plain Layout
21402 : The label tag is output inside the item tag.
21405 \begin_layout Description
21406 \begin_inset Flex Code
21409 \begin_layout Plain Layout
21415 Information to be output in the
21416 \begin_inset Flex Code
21419 \begin_layout Plain Layout
21425 section when this style is used.
21426 This might, for example, be used to include a
21427 \begin_inset Flex Code
21430 \begin_layout Plain Layout
21437 \begin_inset Flex Code
21440 \begin_layout Plain Layout
21449 \begin_layout Description
21450 \begin_inset Flex Code
21453 \begin_layout Plain Layout
21459 CSS style information to be included when this style is used.
21460 Note that this will automatically be wrapped in a layout-generated
21461 \begin_inset Flex Code
21464 \begin_layout Plain Layout
21470 block, so only the CSS itself need be included.
21473 \begin_layout Description
21474 \begin_inset Flex Code
21477 \begin_layout Plain Layout
21484 \begin_inset Flex Code
21487 \begin_layout Plain Layout
21493 ] The tag to be used for the main label, replacing
21494 \begin_inset Flex Code
21497 \begin_layout Plain Layout
21503 in the examples above.
21505 \begin_inset Flex Code
21508 \begin_layout Plain Layout
21517 \begin_layout Description
21518 \begin_inset Flex Code
21521 \begin_layout Plain Layout
21528 \begin_inset Flex Code
21531 \begin_layout Plain Layout
21541 ] Marks this style as the one to be used to generate the
21542 \begin_inset Flex Code
21545 \begin_layout Plain Layout
21551 tag for the XHTML file.
21552 By default, it is false.
21554 \begin_inset Flex Code
21557 \begin_layout Plain Layout
21563 file sets it to true for the
21564 \begin_inset Flex Code
21567 \begin_layout Plain Layout
21577 \begin_layout Subsection
21581 \begin_layout Standard
21582 The XHTML output of insets can also be controlled by information in layout
21587 \begin_layout Plain Layout
21588 At present, this is true only for
21589 \begin_inset Quotes eld
21593 \begin_inset Quotes erd
21596 insets (insets you can type into) and is not true for
21597 \begin_inset Quotes eld
21601 \begin_inset Quotes erd
21604 insets (insets that are associated with dialog boxes).
21609 Here, too, LyX tries to provide sensible defaults, and it constructs default
21611 But everything can be customized.
21614 \begin_layout Standard
21615 The XHTML LyX outputs for an inset has the following form:
21618 \begin_layout LyX-Code
21620 \begin_inset Quotes erd
21624 \begin_inset Quotes erd
21630 \begin_layout LyX-Code
21631 <labeltag>Label</labeltag>
21634 \begin_layout LyX-Code
21636 \begin_inset Quotes erd
21640 \begin_inset Quotes erd
21643 >Contents of the inset.</innertag>
21646 \begin_layout LyX-Code
21650 \begin_layout Standard
21651 If the inset permits multiple paragraphs---that is, if
21652 \begin_inset Flex Code
21655 \begin_layout Plain Layout
21661 is true---then the contents of the inset will itself be output as paragraphs
21662 formatted according to the styles used for those paragraphs (standard,
21663 quote, and the like).
21664 The label tag is of course omitted if the paragraph does not have a label
21665 and, at present, is always
21666 \begin_inset Flex Code
21669 \begin_layout Plain Layout
21676 The inner tag is optional and, by default, does not appear.
21679 \begin_layout Standard
21680 The specific tags and attributes output for each inset can be controlled
21681 by means of the following layout tags.
21684 \begin_layout Description
21685 \begin_inset Flex Code
21688 \begin_layout Plain Layout
21695 \begin_inset Flex Code
21698 \begin_layout Plain Layout
21704 ] Specifies attribute information to be output with the main tag.
21706 \begin_inset Quotes eld
21710 \begin_inset Flex Code
21713 \begin_layout Plain Layout
21714 class=`myinset' onclick=`\SpecialChar \ldots{}
21721 \begin_inset Quotes erd
21725 By default, LyX will output
21726 \begin_inset Quotes eld
21730 \begin_inset Flex Code
21733 \begin_layout Plain Layout
21740 \begin_inset Quotes erd
21744 \begin_inset Flex Code
21747 \begin_layout Plain Layout
21753 is the LyX name of the inset, made lowercase and with non-alphanumeric
21754 characters converted to underscores, for example: footnote.
21757 \begin_layout Description
21758 \begin_inset Flex Code
21761 \begin_layout Plain Layout
21768 \begin_inset Flex Code
21771 \begin_layout Plain Layout
21781 ] Whether to output the default CSS information LyX generates for this layout,
21782 even if additional information is explicitly provided via
21783 \begin_inset Flex Code
21786 \begin_layout Plain Layout
21794 \begin_inset Flex Code
21797 \begin_layout Plain Layout
21803 allows you to alter or augment the generated CSS, rather than to override
21808 \begin_layout Description
21809 \begin_inset Flex Code
21812 \begin_layout Plain Layout
21819 \begin_inset Flex Code
21822 \begin_layout Plain Layout
21828 ] Attributes for the inner tag.
21830 \begin_inset Quotes eld
21834 \begin_inset Flex Code
21837 \begin_layout Plain Layout
21838 class=`insetname_inner'
21844 \begin_inset Quotes erd
21850 \begin_layout Description
21851 \begin_inset Flex Code
21854 \begin_layout Plain Layout
21861 \begin_inset Flex Code
21864 \begin_layout Plain Layout
21870 ] The inner tag, replacing
21871 \begin_inset Flex Code
21874 \begin_layout Plain Layout
21880 in the examples above.
21881 By default, there is none.
21884 \begin_layout Description
21885 \begin_inset Flex Code
21888 \begin_layout Plain Layout
21895 \begin_inset Flex Code
21898 \begin_layout Plain Layout
21906 ] Whether this inset represents a standalone block of text (such as a footnote)
21907 or instead represents material that is included in the surrounding text
21908 (such as a branch).
21912 \begin_layout Description
21913 \begin_inset Flex Code
21916 \begin_layout Plain Layout
21923 \begin_inset Flex Code
21926 \begin_layout Plain Layout
21932 ] A label for this inset, possibly including a reference to a counter.
21933 For example, for footnote, it might be:
21934 \begin_inset Flex Code
21937 \begin_layout Plain Layout
21946 This is optional, and there is no default.
21949 \begin_layout Description
21950 \begin_inset Flex Code
21953 \begin_layout Plain Layout
21959 Information to be output in the
21960 \begin_inset Flex Code
21963 \begin_layout Plain Layout
21969 section when this style is used.
21970 This might, for example, be used to include a
21971 \begin_inset Flex Code
21974 \begin_layout Plain Layout
21981 \begin_inset Flex Code
21984 \begin_layout Plain Layout
21993 \begin_layout Description
21994 \begin_inset Flex Code
21997 \begin_layout Plain Layout
22003 CSS style information to be included when this style is used.
22004 Note that this will automatically be wrapped in a layout-generated
22005 \begin_inset Flex Code
22008 \begin_layout Plain Layout
22014 block, so only the CSS itself need be included.
22017 \begin_layout Description
22018 \begin_inset Flex Code
22021 \begin_layout Plain Layout
22028 \begin_inset Flex Code
22031 \begin_layout Plain Layout
22037 ] The tag to be used for the main label, replacing
22038 \begin_inset Flex Code
22041 \begin_layout Plain Layout
22047 in the examples above.
22048 The default depends upon the setting of
22049 \begin_inset Flex Code
22052 \begin_layout Plain Layout
22059 \begin_inset Flex Code
22062 \begin_layout Plain Layout
22068 is true, the default is
22069 \begin_inset Flex Code
22072 \begin_layout Plain Layout
22078 ; if it is false, the default is
22079 \begin_inset Flex Code
22082 \begin_layout Plain Layout
22091 \begin_layout Subsection
22095 \begin_layout Standard
22096 The XHTML output for floats too can be controlled by layout information.
22097 The output has the following form:
22100 \begin_layout LyX-Code
22102 \begin_inset Quotes erd
22106 \begin_inset Quotes erd
22112 \begin_layout LyX-Code
22113 Contents of the float.
22116 \begin_layout LyX-Code
22120 \begin_layout Standard
22121 The caption, if there is one, is a separate inset and will be output as
22123 Its appearance can be controlled via the InsetLayout for caption insets.
22127 \begin_layout Description
22128 \begin_inset Flex Code
22131 \begin_layout Plain Layout
22138 \begin_inset Flex Code
22141 \begin_layout Plain Layout
22147 ] Specifies attribute information to be output with the main tag.
22149 \begin_inset Quotes eld
22153 \begin_inset Flex Code
22156 \begin_layout Plain Layout
22157 class=`myfloat' onclick=`\SpecialChar \ldots{}
22164 \begin_inset Quotes erd
22168 By default, LyX will output
22169 \begin_inset Quotes eld
22173 \begin_inset Flex Code
22176 \begin_layout Plain Layout
22177 class=`float float-floattype'
22183 \begin_inset Quotes erd
22187 \begin_inset Flex Code
22190 \begin_layout Plain Layout
22196 is LyX's name for this type of float, as determined by the float declaration
22198 \begin_inset CommandInset ref
22200 reference "sub:Floats"
22204 ), though made lowercase and with non-alphanumeric characters converted
22205 to underscores, for example: float-table.
22208 \begin_layout Description
22209 \begin_inset Flex Code
22212 \begin_layout Plain Layout
22218 CSS style information to be included when this float is used.
22219 Note that this will automatically be wrapped in a layout-generated
22220 \begin_inset Flex Code
22223 \begin_layout Plain Layout
22229 block, so only the CSS itself need be included.
22232 \begin_layout Description
22233 \begin_inset Flex Code
22236 \begin_layout Plain Layout
22243 \begin_inset Flex Code
22246 \begin_layout Plain Layout
22252 ] The tag to be used for this float, replacing
22253 \begin_inset Quotes eld
22257 \begin_inset Flex Code
22260 \begin_layout Plain Layout
22267 \begin_inset Quotes erd
22270 in the example above.
22272 \begin_inset Flex Code
22275 \begin_layout Plain Layout
22281 and will rarely need changing.
22284 \begin_layout Subsection
22285 Bibliography formatting
22288 \begin_layout Standard
22289 The bibliography can be formatted using
22290 \begin_inset Flex Code
22293 \begin_layout Plain Layout
22301 \begin_inset CommandInset ref
22303 reference "sub:Citation-format-description"
22310 \begin_layout Subsection
22314 \begin_layout Standard
22315 We have several times mentioned that LyX will generate default CSS style
22316 rules for both insets and paragraph styles, based upon the other layout
22317 information that is provided.
22318 In this section, we shall say a word about which layout information LyX
22322 \begin_layout Standard
22323 At present, LyX auto-generates CSS only for font information, making use
22325 \begin_inset Flex Code
22328 \begin_layout Plain Layout
22335 \begin_inset Flex Code
22338 \begin_layout Plain Layout
22345 \begin_inset Flex Code
22348 \begin_layout Plain Layout
22355 \begin_inset Flex Code
22358 \begin_layout Plain Layout
22365 \begin_inset Flex Code
22368 \begin_layout Plain Layout
22376 \begin_inset CommandInset ref
22378 reference "sub:Font-description"
22382 .) The translation is mostly straightforward and obvious.
22384 \begin_inset Quotes eld
22388 \begin_inset Flex Code
22391 \begin_layout Plain Layout
22398 \begin_inset Quotes erd
22402 \begin_inset Quotes eld
22406 \begin_inset Flex Code
22409 \begin_layout Plain Layout
22410 font-family: sans-serif;
22416 \begin_inset Quotes erd
22420 The correspondence of LyX sizes and CSS sizes is a little less obvious
22421 but nonetheless intuitive.
22423 \begin_inset Flex Code
22426 \begin_layout Plain Layout
22433 \begin_inset Flex URL
22436 \begin_layout Plain Layout
22446 \begin_layout Chapter
22447 Including External Material
22450 \begin_layout Standard
22451 \begin_inset Box Shadowbox
22461 height_special "totalheight"
22464 \begin_layout Plain Layout
22465 WARNING: This portion of the documentation has not been updated for some
22467 We certainly hope that it is still accurate, but there are no guarantees.
22475 \begin_layout Standard
22476 The use of material from sources external to LyX is covered in detail in
22482 This part of the manual covers what needs to happen behind the scenes for
22483 new sorts of material to be included.
22486 \begin_layout Section
22490 \begin_layout Standard
22491 The external material feature is based on the concept of a
22496 A template is a specification of how LyX should interface with a certain
22498 As bundled, LyX comes with predefined templates for Xfig figures, various
22499 raster format images, chess diagrams, and LilyPond music notation.
22500 You can check the actual list by using the menu
22501 \begin_inset Flex MenuItem
22504 \begin_layout Plain Layout
22505 Insert\SpecialChar \menuseparator
22506 File\SpecialChar \menuseparator
22513 Furthermore, it is possible to roll your own template to support a specific
22515 Later we'll describe in more detail what is involved, and hopefully you
22516 will submit all the templates you create so we can include them in a later
22520 \begin_layout Standard
22521 Another basic idea of the external material feature is to distinguish between
22522 the original file that serves as a base for final material and the produced
22523 file that is included in your exported or printed document.
22524 For example, consider the case of a figure produced with
22525 \begin_inset Flex Code
22528 \begin_layout Plain Layout
22535 The Xfig application itself works on an original file with the
22536 \begin_inset Flex Code
22539 \begin_layout Plain Layout
22546 Within Xfig, you create and change your figure, and when you are done,
22548 \begin_inset Flex Code
22551 \begin_layout Plain Layout
22558 When you want to include the figure in your document, you invoke
22559 \begin_inset Flex Code
22562 \begin_layout Plain Layout
22568 in order to create a PostScript file that can readily be included in your
22571 \begin_inset Flex Code
22574 \begin_layout Plain Layout
22580 file is the original file, and the PostScript file is the produced file.
22583 \begin_layout Standard
22584 This distinction is important in order to allow updating of the material
22585 while you are in the process of writing the document.
22586 Furthermore, it provides us with the flexibility that is needed to support
22587 multiple export formats.
22588 For instance, in the case of a plain text file, it is not exactly an award-winn
22589 ing idea to include the figure as raw PostScript.
22590 Instead, you would either prefer to just include a reference to the figure
22591 or try to invoke some graphics to ASCII converter to make the final result
22592 look similar to the real graphics.
22593 The external material management allows you to do this, because it is parametri
22594 zed on the different export formats that LyX supports.
22597 \begin_layout Standard
22598 Besides supporting the production of different products according to the
22599 exported format, it supports tight integration with editing and viewing
22601 In the case of an Xfig figure, you are able to invoke Xfig on the original
22602 file with a single click from within the external material dialog in LyX,
22603 and also preview the produced PostScript file with Ghostview with another
22605 No more fiddling around with the command line and/or file browsers to locate
22606 and manipulate the original or produced files.
22607 In this way, you are finally able to take full advantage of the many different
22608 applications that are relevant to use when you write your documents, and
22609 ultimately be more productive.
22612 \begin_layout Section
22613 The external template configuration file
22616 \begin_layout Standard
22617 It is relatively easy to add custom external template definitions to LyX.
22618 However, be aware that doing this in an careless manner most probably
22622 introduce an easily exploitable security hole.
22623 So before you do this, please read the discussion about security in section
22625 \begin_inset CommandInset ref
22627 reference "sec:Security-discussion"
22634 \begin_layout Standard
22635 Having said that, we encourage you to submit any interesting templates that
22640 \begin_layout Standard
22641 The external templates are defined in the
22642 \begin_inset Flex Code
22645 \begin_layout Plain Layout
22646 LyXDir/lib/external_templates
22652 You can place your own version in
22653 \begin_inset Flex Code
22656 \begin_layout Plain Layout
22657 UserDir/external_templates
22665 \begin_layout Standard
22666 A typical template looks like this:
22669 \begin_layout LyX-Code
22673 \begin_layout LyX-Code
22674 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22677 \begin_layout LyX-Code
22681 \begin_layout LyX-Code
22685 \begin_layout LyX-Code
22689 \begin_layout LyX-Code
22693 \begin_layout LyX-Code
22697 \begin_layout LyX-Code
22698 AutomaticProduction true
22701 \begin_layout LyX-Code
22705 \begin_layout LyX-Code
22709 \begin_layout LyX-Code
22713 \begin_layout LyX-Code
22714 TransformCommand Rotate RotationLatexCommand
22717 \begin_layout LyX-Code
22718 TransformCommand Resize ResizeLatexCommand
22721 \begin_layout LyX-Code
22722 Product "$$RotateFront$$ResizeFront
22725 \begin_layout LyX-Code
22730 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22733 \begin_layout LyX-Code
22734 $$ResizeBack$$RotateBack"
22737 \begin_layout LyX-Code
22741 \begin_layout LyX-Code
22742 UpdateResult "$$AbsPath$$Basename.pstex_t"
22745 \begin_layout LyX-Code
22746 Requirement "graphicx"
22749 \begin_layout LyX-Code
22750 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22753 \begin_layout LyX-Code
22754 ReferencedFile latex "$$AbsPath$$Basename.eps"
22757 \begin_layout LyX-Code
22758 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22761 \begin_layout LyX-Code
22765 \begin_layout LyX-Code
22769 \begin_layout LyX-Code
22770 TransformCommand Rotate RotationLatexCommand
22773 \begin_layout LyX-Code
22774 TransformCommand Resize ResizeLatexCommand
22777 \begin_layout LyX-Code
22778 Product "$$RotateFront$$ResizeFront
22781 \begin_layout LyX-Code
22786 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22789 \begin_layout LyX-Code
22790 $$ResizeBack$$RotateBack"
22793 \begin_layout LyX-Code
22794 UpdateFormat pdftex
22797 \begin_layout LyX-Code
22798 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22801 \begin_layout LyX-Code
22802 Requirement "graphicx"
22805 \begin_layout LyX-Code
22806 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22809 \begin_layout LyX-Code
22810 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22813 \begin_layout LyX-Code
22817 \begin_layout LyX-Code
22821 \begin_layout LyX-Code
22822 Product "$$Contents(
22824 "$$AbsPath$$Basename.asc
22829 \begin_layout LyX-Code
22830 UpdateFormat asciixfig
22833 \begin_layout LyX-Code
22834 UpdateResult "$$AbsPath$$Basename.asc"
22837 \begin_layout LyX-Code
22841 \begin_layout LyX-Code
22845 \begin_layout LyX-Code
22846 Product "<graphic fileref=
22848 "$$AbsOrRelPathMaster$$Basename.eps
22853 \begin_layout LyX-Code
22857 \begin_layout LyX-Code
22861 \begin_layout LyX-Code
22862 UpdateResult "$$AbsPath$$Basename.eps"
22865 \begin_layout LyX-Code
22866 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22869 \begin_layout LyX-Code
22870 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22873 \begin_layout LyX-Code
22877 \begin_layout LyX-Code
22878 Product "[XFig: $$FName]"
22881 \begin_layout LyX-Code
22885 \begin_layout LyX-Code
22889 \begin_layout Standard
22890 As you can see, the template is enclosed in
22891 \begin_inset Flex Code
22894 \begin_layout Plain Layout
22900 \SpecialChar \ldots{}
22902 \begin_inset Flex Code
22905 \begin_layout Plain Layout
22912 It contains a header specifying some general settings and, for each supported
22913 primary document file format, a section
22914 \begin_inset Flex Code
22917 \begin_layout Plain Layout
22923 \SpecialChar \ldots{}
22925 \begin_inset Flex Code
22928 \begin_layout Plain Layout
22937 \begin_layout Subsection
22938 The template header
22941 \begin_layout Description
22942 \begin_inset Flex Code
22945 \begin_layout Plain Layout
22946 AutomaticProduction
22947 \begin_inset space ~
22955 Whether the file represented by the template must be generated by LyX.
22956 This command must occur exactly once.
22959 \begin_layout Description
22960 \begin_inset Flex Code
22963 \begin_layout Plain Layout
22965 \begin_inset space ~
22973 A glob pattern that is used in the file dialog to filter out the desired
22975 If there is more than one possible file extension (e.
22976 \begin_inset space \thinspace{}
22980 \begin_inset space \space{}
22984 \begin_inset Flex Code
22987 \begin_layout Plain Layout
22994 \begin_inset Flex Code
22997 \begin_layout Plain Layout
23003 ), use something like
23004 \begin_inset Flex Code
23007 \begin_layout Plain Layout
23014 This command must occur exactly once.
23017 \begin_layout Description
23018 \begin_inset Flex Code
23021 \begin_layout Plain Layout
23023 \begin_inset space ~
23031 The text that is displayed on the button.
23032 This command must occur exactly once.
23035 \begin_layout Description
23036 \begin_inset Flex Code
23039 \begin_layout Plain Layout
23041 \begin_inset space ~
23045 \begin_inset space ~
23053 The help text that is used in the External dialog.
23054 Provide enough information to explain to the user just what the template
23055 can provide him with.
23056 This command must occur exactly once.
23059 \begin_layout Description
23060 \begin_inset Flex Code
23063 \begin_layout Plain Layout
23065 \begin_inset space ~
23073 The file format of the original file.
23074 This must be the name of a format that is known to LyX (see section
23075 \begin_inset space ~
23079 \begin_inset CommandInset ref
23081 reference "sec:Formats"
23087 \begin_inset Quotes eld
23091 \begin_inset Flex Code
23094 \begin_layout Plain Layout
23101 \begin_inset Quotes erd
23104 if the template can handle original files of more than one format.
23105 LyX will attempt to interrogate the file itself in order to deduce its
23106 format in this case.
23107 This command must occur exactly once.
23110 \begin_layout Description
23111 \begin_inset Flex Code
23114 \begin_layout Plain Layout
23116 \begin_inset space ~
23124 A unique name for the template.
23125 It must not contain substitution macros (see below).
23128 \begin_layout Description
23129 \begin_inset Flex Code
23132 \begin_layout Plain Layout
23134 \begin_inset space ~
23137 Rotate|Resize|Clip|Extra
23142 This command specifies which transformations are supported by this template.
23143 It may occur zero or more times.
23144 This command enables the corresponding tabs in the external dialog.
23146 \begin_inset Flex Code
23149 \begin_layout Plain Layout
23155 command must have either a corresponding
23156 \begin_inset Flex Code
23159 \begin_layout Plain Layout
23166 \begin_inset Flex Code
23169 \begin_layout Plain Layout
23176 \begin_inset Flex Code
23179 \begin_layout Plain Layout
23186 Otherwise the transformation will not be supported by that format.
23189 \begin_layout Subsection
23193 \begin_layout Description
23194 \begin_inset Flex Code
23197 \begin_layout Plain Layout
23199 \begin_inset space ~
23202 LaTeX|PDFLaTeX|PlainText|DocBook
23207 The primary document file format that this format definition is for.
23208 Not every template has a sensible representation in all document file formats.
23209 Please define nevertheless a
23210 \begin_inset Flex Code
23213 \begin_layout Plain Layout
23219 section for all templates.
23220 Use a dummy text when no representation is available.
23221 Then you can at least see a reference to the external material in the exported
23225 \begin_layout Description
23226 \begin_inset Flex Code
23229 \begin_layout Plain Layout
23231 \begin_inset space ~
23235 \begin_inset space ~
23243 This command defines an additional macro
23244 \begin_inset Flex Code
23247 \begin_layout Plain Layout
23253 for substitution in
23254 \begin_inset Flex Code
23257 \begin_layout Plain Layout
23265 \begin_inset Flex Code
23268 \begin_layout Plain Layout
23274 itself may contain substitution macros.
23275 The advantage over using
23276 \begin_inset Flex Code
23279 \begin_layout Plain Layout
23286 \begin_inset Flex Code
23289 \begin_layout Plain Layout
23295 is that the substituted value of
23296 \begin_inset Flex Code
23299 \begin_layout Plain Layout
23305 is sanitized so that it is a valid optional argument in the document format.
23306 This command may occur zero or more times.
23309 \begin_layout Description
23310 \begin_inset Flex Code
23313 \begin_layout Plain Layout
23315 \begin_inset space ~
23323 The text that is inserted in the exported document.
23324 This is actually the most important command and can be quite complex.
23325 This command must occur exactly once.
23328 \begin_layout Description
23329 \begin_inset Flex Code
23332 \begin_layout Plain Layout
23334 \begin_inset space ~
23342 This command specifies a preamble snippet that will be included in the
23344 It has to be defined using
23345 \begin_inset Flex Code
23348 \begin_layout Plain Layout
23354 \SpecialChar \ldots{}
23356 \begin_inset Flex Code
23359 \begin_layout Plain Layout
23366 This command may occur zero or more times.
23369 \begin_layout Description
23370 \begin_inset Flex Code
23373 \begin_layout Plain Layout
23375 \begin_inset space ~
23379 \begin_inset space ~
23387 This command denotes files that are created by the conversion process and
23388 are needed for a particular export format.
23389 If the filename is relative, it is interpreted relative to the master document.
23390 This command may be given zero or more times.
23393 \begin_layout Description
23394 \begin_inset Flex Code
23397 \begin_layout Plain Layout
23399 \begin_inset space ~
23407 The name of a required LaTeX package.
23408 The package is included via
23409 \begin_inset Flex Code
23412 \begin_layout Plain Layout
23420 in the LaTeX preamble.
23421 This command may occur zero or more times.
23424 \begin_layout Description
23425 \begin_inset Flex Code
23428 \begin_layout Plain Layout
23430 \begin_inset space ~
23434 \begin_inset space ~
23437 RotationLatexCommand
23442 This command specifies that the built in LaTeX command should be used for
23444 This command may occur once or not at all.
23447 \begin_layout Description
23448 \begin_inset Flex Code
23451 \begin_layout Plain Layout
23453 \begin_inset space ~
23457 \begin_inset space ~
23465 This command specifies that the built in LaTeX command should be used for
23467 This command may occur once or not at all.
23470 \begin_layout Description
23471 \begin_inset Flex Code
23474 \begin_layout Plain Layout
23476 \begin_inset space ~
23480 \begin_inset space ~
23483 RotationLatexOption
23488 This command specifies that rotation is done via an optional argument.
23489 This command may occur once or not at all.
23492 \begin_layout Description
23493 \begin_inset Flex Code
23496 \begin_layout Plain Layout
23498 \begin_inset space ~
23502 \begin_inset space ~
23510 This command specifies that resizing is done via an optional argument.
23511 This command may occur once or not at all.
23514 \begin_layout Description
23515 \begin_inset Flex Code
23518 \begin_layout Plain Layout
23520 \begin_inset space ~
23524 \begin_inset space ~
23532 This command specifies that clipping is done via an optional argument.
23533 This command may occur once or not at all.
23536 \begin_layout Description
23537 \begin_inset Flex Code
23540 \begin_layout Plain Layout
23542 \begin_inset space ~
23546 \begin_inset space ~
23554 This command specifies that an extra optional argument is used.
23555 This command may occur once or not at all.
23558 \begin_layout Description
23559 \begin_inset Flex Code
23562 \begin_layout Plain Layout
23564 \begin_inset space ~
23572 The file format of the converted file.
23573 This must be the name of a format that is known to LyX (see the
23574 \begin_inset Flex MenuItem
23577 \begin_layout Plain Layout
23582 ools\SpecialChar \menuseparator
23587 references\SpecialChar \menuseparator
23588 File Handling\SpecialChar \menuseparator
23595 This command must occur exactly once.
23597 \change_inserted -195340706 1363813305
23598 If the resulting file format is PDF, you need to specify the format
23599 \begin_inset Flex Code
23602 \begin_layout Plain Layout
23604 \change_inserted -195340706 1363813269
23611 This is the PDF format used for including graphics.
23612 The other defined PDF formats are for document export.
23617 \begin_layout Description
23618 \begin_inset Flex Code
23621 \begin_layout Plain Layout
23623 \begin_inset space ~
23631 The file name of the converted file.
23632 The file name must be absolute.
23633 This command must occur exactly once.
23636 \begin_layout Subsection
23637 Preamble definitions
23640 \begin_layout Standard
23641 The external template configuration file may contain additional preamble
23642 definitions enclosed by
23643 \begin_inset Flex Code
23646 \begin_layout Plain Layout
23652 \SpecialChar \ldots{}
23654 \begin_inset Flex Code
23657 \begin_layout Plain Layout
23664 They can be used by the templates in the
23665 \begin_inset Flex Code
23668 \begin_layout Plain Layout
23677 \begin_layout Section
23678 The substitution mechanism
23681 \begin_layout Standard
23682 When the external material facility invokes an external program, it is done
23683 on the basis of a command defined in the template configuration file.
23684 These commands can contain various macros that are expanded before execution.
23685 Execution always take place in the directory of the containing document.
23688 \begin_layout Standard
23689 Also, whenever external material is to be displayed, the name will be produced
23690 by the substitution mechanism, and most other commands in the template
23691 definition support substitution as well.
23694 \begin_layout Standard
23695 The available macros are the following:
23698 \begin_layout Description
23699 \begin_inset Flex Code
23702 \begin_layout Plain Layout
23703 $$AbsOrRelPathMaster
23708 The file path, absolute or relative to the master LyX document.
23711 \begin_layout Description
23712 \begin_inset Flex Code
23715 \begin_layout Plain Layout
23716 $$AbsOrRelPathParent
23721 The file path, absolute or relative to the LyX document.
23724 \begin_layout Description
23725 \begin_inset Flex Code
23728 \begin_layout Plain Layout
23734 The absolute file path.
23737 \begin_layout Description
23738 \begin_inset Flex Code
23741 \begin_layout Plain Layout
23747 The filename without path and without the extension.
23750 \begin_layout Description
23751 \begin_inset Flex Code
23754 \begin_layout Plain Layout
23756 \begin_inset Quotes eld
23760 \begin_inset Quotes erd
23768 This macro will expand to the contents of the file with the name
23769 \begin_inset Flex Code
23772 \begin_layout Plain Layout
23781 \begin_layout Description
23782 \begin_inset Flex Code
23785 \begin_layout Plain Layout
23791 The file extension (including the dot).
23794 \begin_layout Description
23795 \begin_inset Flex Code
23798 \begin_layout Plain Layout
23804 The filename of the file specified in the external material dialog.
23805 This is either an absolute name, or it is relative to the LyX document.
23808 \begin_layout Description
23809 \begin_inset Flex Code
23812 \begin_layout Plain Layout
23819 \begin_inset Flex Code
23822 \begin_layout Plain Layout
23828 (absolute name or relative to the LyX document).
23831 \begin_layout Description
23832 \begin_inset Flex Code
23835 \begin_layout Plain Layout
23841 The file path, relative to the master LyX document.
23844 \begin_layout Description
23845 \begin_inset Flex Code
23848 \begin_layout Plain Layout
23854 The file path, relative to the LyX document.
23857 \begin_layout Description
23858 \begin_inset Flex Code
23861 \begin_layout Plain Layout
23867 This macro will expand to the absolute path of the system directory.
23868 This is typically used to point to the various helper scripts that are
23872 \begin_layout Description
23873 \begin_inset Flex Code
23876 \begin_layout Plain Layout
23882 A name and full path to a temporary file which will be automatically deleted
23883 whenever the containing document is closed, or the external material insertion
23887 \begin_layout Standard
23888 All path macros contain a trailing directory separator, so you can construct
23890 \begin_inset space \thinspace{}
23894 \begin_inset space \space{}
23897 the absolute filename with
23898 \begin_inset Flex Code
23901 \begin_layout Plain Layout
23902 $$AbsPath$$Basename$$Extension
23910 \begin_layout Standard
23911 The macros above are substituted in all commands unless otherwise noted.
23913 \begin_inset Flex Code
23916 \begin_layout Plain Layout
23922 supports additionally the following substitutions if they are enabled by
23924 \begin_inset Flex Code
23927 \begin_layout Plain Layout
23934 \begin_inset Flex Code
23937 \begin_layout Plain Layout
23946 \begin_layout Description
23947 \begin_inset Flex Code
23950 \begin_layout Plain Layout
23956 The front part of the resize command.
23959 \begin_layout Description
23960 \begin_inset Flex Code
23963 \begin_layout Plain Layout
23969 The back part of the resize command.
23972 \begin_layout Description
23973 \begin_inset Flex Code
23976 \begin_layout Plain Layout
23982 The front part of the rotation command.
23985 \begin_layout Description
23986 \begin_inset Flex Code
23989 \begin_layout Plain Layout
23995 The back part of the rotation command.
23998 \begin_layout Standard
23999 The value string of the
24000 \begin_inset Flex Code
24003 \begin_layout Plain Layout
24009 command supports additionally the following substitutions if they are enabled
24011 \begin_inset Flex Code
24014 \begin_layout Plain Layout
24021 \begin_inset Flex Code
24024 \begin_layout Plain Layout
24033 \begin_layout Description
24034 \begin_inset Flex Code
24037 \begin_layout Plain Layout
24046 \begin_layout Description
24047 \begin_inset Flex Code
24050 \begin_layout Plain Layout
24059 \begin_layout Description
24060 \begin_inset Flex Code
24063 \begin_layout Plain Layout
24072 \begin_layout Description
24073 \begin_inset Flex Code
24076 \begin_layout Plain Layout
24082 The rotation option.
24085 \begin_layout Standard
24086 You may ask why there are so many path macros.
24087 There are mainly two reasons:
24090 \begin_layout Enumerate
24091 Relative and absolute file names should remain relative or absolute, respectivel
24093 Users may have reasons to prefer either form.
24094 Relative names are useful for portable documents that should work on different
24095 machines, for example.
24096 Absolute names may be required by some programs.
24099 \begin_layout Enumerate
24100 LaTeX treats relative file names differently than LyX and other programs
24101 in nested included files.
24102 For LyX, a relative file name is always relative to the document that contains
24104 For LaTeX, it is always relative to the master document.
24105 These two definitions are identical if you have only one document, but
24106 differ if you have a master document that includes part documents.
24107 That means that relative filenames must be transformed when presented to
24109 Fortunately LyX does this automatically for you if you choose the right
24113 \begin_layout Standard
24114 So which path macro should be used in new template definitions? The rule
24118 \begin_layout Itemize
24120 \begin_inset Flex Code
24123 \begin_layout Plain Layout
24129 if an absolute path is required.
24132 \begin_layout Itemize
24134 \begin_inset Flex Code
24137 \begin_layout Plain Layout
24138 $$AbsOrRelPathMaster
24143 if the substituted string is some kind of LaTeX input.
24146 \begin_layout Itemize
24148 \begin_inset Flex Code
24151 \begin_layout Plain Layout
24152 $$AbsOrRelPathParent
24157 in order to preserve the user's choice.
24160 \begin_layout Standard
24161 There are special cases where this rule does not work and e.
24162 \begin_inset space \thinspace{}
24166 \begin_inset space \space{}
24169 relative names are needed, but normally it will work just fine.
24170 One example for such a case is the command
24171 \begin_inset Flex Code
24174 \begin_layout Plain Layout
24175 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24180 in the XFig template above: We can't use the absolute name because the
24182 \begin_inset Flex Code
24185 \begin_layout Plain Layout
24191 files needs the relative name in order to rewrite the file content.
24194 \begin_layout Section
24195 Security discussion
24196 \begin_inset CommandInset label
24198 name "sec:Security-discussion"
24205 \begin_layout Standard
24206 The external material feature interfaces with a lot of external programs
24207 and does so automatically, so we have to consider the security implications
24209 In particular, since you have the option of including your own filenames
24210 and/or parameter strings and those are expanded into a command, it seems
24211 that it would be possible to create a malicious document which executes
24212 arbitrary commands when a user views or prints the document.
24213 This is something we definitely want to avoid.
24216 \begin_layout Standard
24217 However, since the external program commands are specified in the template
24218 configuration file only, there are no security issues if LyX is properly
24219 configured with safe templates only.
24220 This is so because the external programs are invoked with the
24221 \begin_inset Flex Code
24224 \begin_layout Plain Layout
24230 -system call rather than the
24231 \begin_inset Flex Code
24234 \begin_layout Plain Layout
24240 system-call, so it's not possible to execute arbitrary commands from the
24241 filename or parameter section via the shell.
24244 \begin_layout Standard
24245 This also implies that you are restricted in what command strings you can
24246 use in the external material templates.
24247 In particular, pipes and redirection are not readily available.
24248 This has to be so if LyX should remain safe.
24249 If you want to use some of the shell features, you should write a safe
24250 script to do this in a controlled manner, and then invoke the script from
24251 the command string.
24255 \begin_layout Standard
24256 It is possible to design a template that interacts directly with the shell,
24257 but since this would allow a malicious user to execute arbitrary commands
24258 by writing clever filenames and/or parameters, we generally recommend that
24259 you only use safe scripts that work with the
24260 \begin_inset Flex Code
24263 \begin_layout Plain Layout
24269 system call in a controlled manner.
24270 Of course, for use in a controlled environment, it can be tempting to just
24271 fall back to use ordinary shell scripts.
24272 If you do so, be aware that you
24276 provide an easily exploitable security hole in your system.
24277 Of course it stands to reason that such unsafe templates will never be
24278 included in the standard LyX distribution, although we do encourage people
24279 to submit new templates in the open source tradition.
24280 But LyX as shipped from the official distribution channels will never have
24284 \begin_layout Standard
24285 Including external material provides a lot of power, and you have to be
24286 careful not to introduce security hazards with this power.
24287 A subtle error in a single line in an innocent looking script can open
24288 the door to huge security problems.
24289 So if you do not fully understand the issues, we recommend that you consult
24290 a knowledgeable security professional or the LyX development team if you
24291 have any questions about whether a given template is safe or not.
24292 And do this before you use it in an uncontrolled environment.
24295 \begin_layout Chapter
24297 List of functions to be used in layouts
24298 \begin_inset CommandInset label
24300 name "chap:List-of-functions"
24307 \begin_layout Standard
24309 \begin_inset Tabular
24310 <lyxtabular version="3" rows="10" columns="6">
24311 <features rotate="0" tabularvalignment="middle">
24312 <column alignment="left" valignment="top" width="14col%">
24313 <column alignment="left" valignment="top" width="14col%">
24314 <column alignment="left" valignment="top" width="14col%">
24315 <column alignment="left" valignment="top" width="14col%">
24316 <column alignment="left" valignment="top" width="14col%">
24317 <column alignment="left" valignment="top" width="14col%">
24319 <cell alignment="left" valignment="top" usebox="none">
24322 \begin_layout Plain Layout
24328 <cell alignment="left" valignment="top" usebox="none">
24331 \begin_layout Plain Layout
24337 <cell alignment="left" valignment="top" usebox="none">
24340 \begin_layout Plain Layout
24346 <cell alignment="left" valignment="top" usebox="none">
24349 \begin_layout Plain Layout
24355 <cell alignment="left" valignment="top" usebox="none">
24358 \begin_layout Plain Layout
24364 <cell alignment="left" valignment="top" usebox="none">
24367 \begin_layout Plain Layout
24375 <cell alignment="left" valignment="top" usebox="none">
24378 \begin_layout Plain Layout
24384 <cell alignment="left" valignment="top" usebox="none">
24387 \begin_layout Plain Layout
24393 <cell alignment="left" valignment="top" usebox="none">
24396 \begin_layout Plain Layout
24402 <cell alignment="left" valignment="top" usebox="none">
24405 \begin_layout Plain Layout
24411 <cell alignment="left" valignment="top" usebox="none">
24414 \begin_layout Plain Layout
24420 <cell alignment="left" valignment="top" usebox="none">
24423 \begin_layout Plain Layout
24431 <cell alignment="left" valignment="top" usebox="none">
24434 \begin_layout Plain Layout
24440 <cell alignment="left" valignment="top" usebox="none">
24443 \begin_layout Plain Layout
24449 <cell alignment="left" valignment="top" usebox="none">
24452 \begin_layout Plain Layout
24458 <cell alignment="left" valignment="top" usebox="none">
24461 \begin_layout Plain Layout
24467 <cell alignment="left" valignment="top" usebox="none">
24470 \begin_layout Plain Layout
24476 <cell alignment="left" valignment="top" usebox="none">
24479 \begin_layout Plain Layout
24487 <cell alignment="left" valignment="top" usebox="none">
24490 \begin_layout Plain Layout
24496 <cell alignment="left" valignment="top" usebox="none">
24499 \begin_layout Plain Layout
24505 <cell alignment="left" valignment="top" usebox="none">
24508 \begin_layout Plain Layout
24514 <cell alignment="left" valignment="top" usebox="none">
24517 \begin_layout Plain Layout
24523 <cell alignment="left" valignment="top" usebox="none">
24526 \begin_layout Plain Layout
24532 <cell alignment="left" valignment="top" usebox="none">
24535 \begin_layout Plain Layout
24543 <cell alignment="left" valignment="top" usebox="none">
24546 \begin_layout Plain Layout
24552 <cell alignment="left" valignment="top" usebox="none">
24555 \begin_layout Plain Layout
24561 <cell alignment="left" valignment="top" usebox="none">
24564 \begin_layout Plain Layout
24570 <cell alignment="left" valignment="top" usebox="none">
24573 \begin_layout Plain Layout
24579 <cell alignment="left" valignment="top" usebox="none">
24582 \begin_layout Plain Layout
24588 <cell alignment="left" valignment="top" usebox="none">
24591 \begin_layout Plain Layout
24599 <cell alignment="left" valignment="top" usebox="none">
24602 \begin_layout Plain Layout
24608 <cell alignment="left" valignment="top" usebox="none">
24611 \begin_layout Plain Layout
24617 <cell alignment="left" valignment="top" usebox="none">
24620 \begin_layout Plain Layout
24626 <cell alignment="left" valignment="top" usebox="none">
24629 \begin_layout Plain Layout
24635 <cell alignment="left" valignment="top" usebox="none">
24638 \begin_layout Plain Layout
24644 <cell alignment="left" valignment="top" usebox="none">
24647 \begin_layout Plain Layout
24655 <cell alignment="left" valignment="top" usebox="none">
24658 \begin_layout Plain Layout
24664 <cell alignment="left" valignment="top" usebox="none">
24667 \begin_layout Plain Layout
24673 <cell alignment="left" valignment="top" usebox="none">
24676 \begin_layout Plain Layout
24682 <cell alignment="left" valignment="top" usebox="none">
24685 \begin_layout Plain Layout
24691 <cell alignment="left" valignment="top" usebox="none">
24694 \begin_layout Plain Layout
24700 <cell alignment="left" valignment="top" usebox="none">
24703 \begin_layout Plain Layout
24711 <cell alignment="left" valignment="top" usebox="none">
24714 \begin_layout Plain Layout
24720 <cell alignment="left" valignment="top" usebox="none">
24723 \begin_layout Plain Layout
24729 <cell alignment="left" valignment="top" usebox="none">
24732 \begin_layout Plain Layout
24738 <cell alignment="left" valignment="top" usebox="none">
24741 \begin_layout Plain Layout
24747 <cell alignment="left" valignment="top" usebox="none">
24750 \begin_layout Plain Layout
24756 <cell alignment="left" valignment="top" usebox="none">
24759 \begin_layout Plain Layout
24767 <cell alignment="left" valignment="top" usebox="none">
24770 \begin_layout Plain Layout
24776 <cell alignment="left" valignment="top" usebox="none">
24779 \begin_layout Plain Layout
24785 <cell alignment="left" valignment="top" usebox="none">
24788 \begin_layout Plain Layout
24794 <cell alignment="left" valignment="top" usebox="none">
24797 \begin_layout Plain Layout
24803 <cell alignment="left" valignment="top" usebox="none">
24806 \begin_layout Plain Layout
24812 <cell alignment="left" valignment="top" usebox="none">
24815 \begin_layout Plain Layout
24823 <cell alignment="left" valignment="top" usebox="none">
24826 \begin_layout Plain Layout
24832 <cell alignment="left" valignment="top" usebox="none">
24835 \begin_layout Plain Layout
24841 <cell alignment="left" valignment="top" usebox="none">
24844 \begin_layout Plain Layout
24850 <cell alignment="left" valignment="top" usebox="none">
24853 \begin_layout Plain Layout
24859 <cell alignment="left" valignment="top" usebox="none">
24862 \begin_layout Plain Layout
24868 <cell alignment="left" valignment="top" usebox="none">
24871 \begin_layout Plain Layout
24885 \begin_layout Standard
24887 \begin_inset Tabular
24888 <lyxtabular version="3" rows="10" columns="6">
24889 <features rotate="0" tabularvalignment="middle">
24890 <column alignment="left" valignment="top" width="14col%">
24891 <column alignment="left" valignment="top" width="14col%">
24892 <column alignment="left" valignment="top" width="14col%">
24893 <column alignment="left" valignment="top" width="14col%">
24894 <column alignment="left" valignment="top" width="14col%">
24895 <column alignment="left" valignment="top" width="14col%">
24897 <cell alignment="left" valignment="top" usebox="none">
24900 \begin_layout Plain Layout
24906 <cell alignment="left" valignment="top" usebox="none">
24909 \begin_layout Plain Layout
24915 <cell alignment="left" valignment="top" usebox="none">
24918 \begin_layout Plain Layout
24924 <cell alignment="left" valignment="top" usebox="none">
24927 \begin_layout Plain Layout
24933 <cell alignment="left" valignment="top" usebox="none">
24936 \begin_layout Plain Layout
24942 <cell alignment="left" valignment="top" usebox="none">
24945 \begin_layout Plain Layout
24953 <cell alignment="left" valignment="top" usebox="none">
24956 \begin_layout Plain Layout
24962 <cell alignment="left" valignment="top" usebox="none">
24965 \begin_layout Plain Layout
24971 <cell alignment="left" valignment="top" usebox="none">
24974 \begin_layout Plain Layout
24980 <cell alignment="left" valignment="top" usebox="none">
24983 \begin_layout Plain Layout
24989 <cell alignment="left" valignment="top" usebox="none">
24992 \begin_layout Plain Layout
24998 <cell alignment="left" valignment="top" usebox="none">
25001 \begin_layout Plain Layout
25009 <cell alignment="left" valignment="top" usebox="none">
25012 \begin_layout Plain Layout
25018 <cell alignment="left" valignment="top" usebox="none">
25021 \begin_layout Plain Layout
25027 <cell alignment="left" valignment="top" usebox="none">
25030 \begin_layout Plain Layout
25036 <cell alignment="left" valignment="top" usebox="none">
25039 \begin_layout Plain Layout
25045 <cell alignment="left" valignment="top" usebox="none">
25048 \begin_layout Plain Layout
25054 <cell alignment="left" valignment="top" usebox="none">
25057 \begin_layout Plain Layout
25065 <cell alignment="left" valignment="top" usebox="none">
25068 \begin_layout Plain Layout
25074 <cell alignment="left" valignment="top" usebox="none">
25077 \begin_layout Plain Layout
25083 <cell alignment="left" valignment="top" usebox="none">
25086 \begin_layout Plain Layout
25092 <cell alignment="left" valignment="top" usebox="none">
25095 \begin_layout Plain Layout
25101 <cell alignment="left" valignment="top" usebox="none">
25104 \begin_layout Plain Layout
25110 <cell alignment="left" valignment="top" usebox="none">
25113 \begin_layout Plain Layout
25121 <cell alignment="left" valignment="top" usebox="none">
25124 \begin_layout Plain Layout
25130 <cell alignment="left" valignment="top" usebox="none">
25133 \begin_layout Plain Layout
25139 <cell alignment="left" valignment="top" usebox="none">
25142 \begin_layout Plain Layout
25148 <cell alignment="left" valignment="top" usebox="none">
25151 \begin_layout Plain Layout
25157 <cell alignment="left" valignment="top" usebox="none">
25160 \begin_layout Plain Layout
25166 <cell alignment="left" valignment="top" usebox="none">
25169 \begin_layout Plain Layout
25177 <cell alignment="left" valignment="top" usebox="none">
25180 \begin_layout Plain Layout
25186 <cell alignment="left" valignment="top" usebox="none">
25189 \begin_layout Plain Layout
25195 <cell alignment="left" valignment="top" usebox="none">
25198 \begin_layout Plain Layout
25204 <cell alignment="left" valignment="top" usebox="none">
25207 \begin_layout Plain Layout
25213 <cell alignment="left" valignment="top" usebox="none">
25216 \begin_layout Plain Layout
25222 <cell alignment="left" valignment="top" usebox="none">
25225 \begin_layout Plain Layout
25233 <cell alignment="left" valignment="top" usebox="none">
25236 \begin_layout Plain Layout
25242 <cell alignment="left" valignment="top" usebox="none">
25245 \begin_layout Plain Layout
25251 <cell alignment="left" valignment="top" usebox="none">
25254 \begin_layout Plain Layout
25260 <cell alignment="left" valignment="top" usebox="none">
25263 \begin_layout Plain Layout
25269 <cell alignment="left" valignment="top" usebox="none">
25272 \begin_layout Plain Layout
25278 <cell alignment="left" valignment="top" usebox="none">
25281 \begin_layout Plain Layout
25289 <cell alignment="left" valignment="top" usebox="none">
25292 \begin_layout Plain Layout
25298 <cell alignment="left" valignment="top" usebox="none">
25301 \begin_layout Plain Layout
25307 <cell alignment="left" valignment="top" usebox="none">
25310 \begin_layout Plain Layout
25316 <cell alignment="left" valignment="top" usebox="none">
25319 \begin_layout Plain Layout
25325 <cell alignment="left" valignment="top" usebox="none">
25328 \begin_layout Plain Layout
25334 <cell alignment="left" valignment="top" usebox="none">
25337 \begin_layout Plain Layout
25345 <cell alignment="left" valignment="top" usebox="none">
25348 \begin_layout Plain Layout
25354 <cell alignment="left" valignment="top" usebox="none">
25357 \begin_layout Plain Layout
25363 <cell alignment="left" valignment="top" usebox="none">
25366 \begin_layout Plain Layout
25372 <cell alignment="left" valignment="top" usebox="none">
25375 \begin_layout Plain Layout
25381 <cell alignment="left" valignment="top" usebox="none">
25384 \begin_layout Plain Layout
25390 <cell alignment="left" valignment="top" usebox="none">
25393 \begin_layout Plain Layout
25401 <cell alignment="left" valignment="top" usebox="none">
25404 \begin_layout Plain Layout
25410 <cell alignment="left" valignment="top" usebox="none">
25413 \begin_layout Plain Layout
25419 <cell alignment="left" valignment="top" usebox="none">
25422 \begin_layout Plain Layout
25428 <cell alignment="left" valignment="top" usebox="none">
25431 \begin_layout Plain Layout
25437 <cell alignment="left" valignment="top" usebox="none">
25440 \begin_layout Plain Layout
25446 <cell alignment="left" valignment="top" usebox="none">
25449 \begin_layout Plain Layout
25463 \begin_layout Chapter
25464 List of supported LyX functions to be used in layouts
25467 \begin_layout Standard
25469 \begin_inset Tabular
25470 <lyxtabular version="3" rows="10" columns="8">
25471 <features rotate="0" tabularvalignment="middle">
25472 <column alignment="left" valignment="top" width="0">
25473 <column alignment="left" valignment="top" width="0">
25474 <column alignment="left" valignment="top" width="0">
25475 <column alignment="left" valignment="top" width="0">
25476 <column alignment="left" valignment="top" width="0">
25477 <column alignment="left" valignment="top" width="0">
25478 <column alignment="left" valignment="top" width="0">
25479 <column alignment="left" valignment="top" width="0">
25481 <cell alignment="left" valignment="top" usebox="none">
25484 \begin_layout Plain Layout
25490 <cell alignment="left" valignment="top" usebox="none">
25493 \begin_layout Plain Layout
25499 <cell alignment="left" valignment="top" usebox="none">
25502 \begin_layout Plain Layout
25508 <cell alignment="left" valignment="top" usebox="none">
25511 \begin_layout Plain Layout
25517 <cell alignment="center" valignment="top" usebox="none">
25520 \begin_layout Plain Layout
25526 <cell alignment="center" valignment="top" usebox="none">
25529 \begin_layout Plain Layout
25535 <cell alignment="center" valignment="top" usebox="none">
25538 \begin_layout Plain Layout
25544 <cell alignment="center" valignment="top" usebox="none">
25547 \begin_layout Plain Layout
25555 <cell alignment="left" valignment="top" usebox="none">
25558 \begin_layout Plain Layout
25564 <cell alignment="left" valignment="top" usebox="none">
25567 \begin_layout Plain Layout
25573 <cell alignment="left" valignment="top" usebox="none">
25576 \begin_layout Plain Layout
25582 <cell alignment="left" valignment="top" usebox="none">
25585 \begin_layout Plain Layout
25591 <cell alignment="center" valignment="top" usebox="none">
25594 \begin_layout Plain Layout
25600 <cell alignment="center" valignment="top" usebox="none">
25603 \begin_layout Plain Layout
25609 <cell alignment="center" valignment="top" usebox="none">
25612 \begin_layout Plain Layout
25618 <cell alignment="center" valignment="top" usebox="none">
25621 \begin_layout Plain Layout
25629 <cell alignment="left" valignment="top" usebox="none">
25632 \begin_layout Plain Layout
25638 <cell alignment="left" valignment="top" usebox="none">
25641 \begin_layout Plain Layout
25647 <cell alignment="left" valignment="top" usebox="none">
25650 \begin_layout Plain Layout
25656 <cell alignment="left" valignment="top" usebox="none">
25659 \begin_layout Plain Layout
25665 <cell alignment="center" valignment="top" usebox="none">
25668 \begin_layout Plain Layout
25674 <cell alignment="center" valignment="top" usebox="none">
25677 \begin_layout Plain Layout
25683 <cell alignment="center" valignment="top" usebox="none">
25686 \begin_layout Plain Layout
25692 <cell alignment="center" valignment="top" usebox="none">
25695 \begin_layout Plain Layout
25703 <cell alignment="left" valignment="top" usebox="none">
25706 \begin_layout Plain Layout
25712 <cell alignment="left" valignment="top" usebox="none">
25715 \begin_layout Plain Layout
25721 <cell alignment="left" valignment="top" usebox="none">
25724 \begin_layout Plain Layout
25730 <cell alignment="left" valignment="top" usebox="none">
25733 \begin_layout Plain Layout
25739 <cell alignment="center" valignment="top" usebox="none">
25742 \begin_layout Plain Layout
25748 <cell alignment="center" valignment="top" usebox="none">
25751 \begin_layout Plain Layout
25757 <cell alignment="center" valignment="top" usebox="none">
25760 \begin_layout Plain Layout
25766 <cell alignment="center" valignment="top" usebox="none">
25769 \begin_layout Plain Layout
25777 <cell alignment="left" valignment="top" usebox="none">
25780 \begin_layout Plain Layout
25786 <cell alignment="left" valignment="top" usebox="none">
25789 \begin_layout Plain Layout
25795 <cell alignment="left" valignment="top" usebox="none">
25798 \begin_layout Plain Layout
25804 <cell alignment="left" valignment="top" usebox="none">
25807 \begin_layout Plain Layout
25813 <cell alignment="center" valignment="top" usebox="none">
25816 \begin_layout Plain Layout
25822 <cell alignment="center" valignment="top" usebox="none">
25825 \begin_layout Plain Layout
25831 <cell alignment="center" valignment="top" usebox="none">
25834 \begin_layout Plain Layout
25840 <cell alignment="center" valignment="top" usebox="none">
25843 \begin_layout Plain Layout
25851 <cell alignment="left" valignment="top" usebox="none">
25854 \begin_layout Plain Layout
25860 <cell alignment="left" valignment="top" usebox="none">
25863 \begin_layout Plain Layout
25869 <cell alignment="left" valignment="top" usebox="none">
25872 \begin_layout Plain Layout
25878 <cell alignment="left" valignment="top" usebox="none">
25881 \begin_layout Plain Layout
25887 <cell alignment="center" valignment="top" usebox="none">
25890 \begin_layout Plain Layout
25896 <cell alignment="center" valignment="top" usebox="none">
25899 \begin_layout Plain Layout
25905 <cell alignment="center" valignment="top" usebox="none">
25908 \begin_layout Plain Layout
25914 <cell alignment="center" valignment="top" usebox="none">
25917 \begin_layout Plain Layout
25925 <cell alignment="left" valignment="top" usebox="none">
25928 \begin_layout Plain Layout
25934 <cell alignment="left" valignment="top" usebox="none">
25937 \begin_layout Plain Layout
25943 <cell alignment="left" valignment="top" usebox="none">
25946 \begin_layout Plain Layout
25952 <cell alignment="left" valignment="top" usebox="none">
25955 \begin_layout Plain Layout
25961 <cell alignment="center" valignment="top" usebox="none">
25964 \begin_layout Plain Layout
25970 <cell alignment="center" valignment="top" usebox="none">
25973 \begin_layout Plain Layout
25979 <cell alignment="center" valignment="top" usebox="none">
25982 \begin_layout Plain Layout
25988 <cell alignment="center" valignment="top" usebox="none">
25991 \begin_layout Plain Layout
25999 <cell alignment="left" valignment="top" usebox="none">
26002 \begin_layout Plain Layout
26008 <cell alignment="left" valignment="top" usebox="none">
26011 \begin_layout Plain Layout
26017 <cell alignment="left" valignment="top" usebox="none">
26020 \begin_layout Plain Layout
26026 <cell alignment="left" valignment="top" usebox="none">
26029 \begin_layout Plain Layout
26035 <cell alignment="center" valignment="top" usebox="none">
26038 \begin_layout Plain Layout
26044 <cell alignment="center" valignment="top" usebox="none">
26047 \begin_layout Plain Layout
26053 <cell alignment="center" valignment="top" usebox="none">
26056 \begin_layout Plain Layout
26062 <cell alignment="center" valignment="top" usebox="none">
26065 \begin_layout Plain Layout
26073 <cell alignment="left" valignment="top" usebox="none">
26076 \begin_layout Plain Layout
26082 <cell alignment="left" valignment="top" usebox="none">
26085 \begin_layout Plain Layout
26091 <cell alignment="left" valignment="top" usebox="none">
26094 \begin_layout Plain Layout
26100 <cell alignment="left" valignment="top" usebox="none">
26103 \begin_layout Plain Layout
26109 <cell alignment="center" valignment="top" usebox="none">
26112 \begin_layout Plain Layout
26118 <cell alignment="center" valignment="top" usebox="none">
26121 \begin_layout Plain Layout
26127 <cell alignment="center" valignment="top" usebox="none">
26130 \begin_layout Plain Layout
26136 <cell alignment="center" valignment="top" usebox="none">
26139 \begin_layout Plain Layout
26147 <cell alignment="left" valignment="top" usebox="none">
26150 \begin_layout Plain Layout
26156 <cell alignment="left" valignment="top" usebox="none">
26159 \begin_layout Plain Layout
26165 <cell alignment="left" valignment="top" usebox="none">
26168 \begin_layout Plain Layout
26174 <cell alignment="left" valignment="top" usebox="none">
26177 \begin_layout Plain Layout
26183 <cell alignment="center" valignment="top" usebox="none">
26186 \begin_layout Plain Layout
26192 <cell alignment="center" valignment="top" usebox="none">
26195 \begin_layout Plain Layout
26201 <cell alignment="center" valignment="top" usebox="none">
26204 \begin_layout Plain Layout
26210 <cell alignment="center" valignment="top" usebox="none">
26213 \begin_layout Plain Layout
26227 \begin_layout Standard
26228 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
26229 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
26230 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
26231 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
26232 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
26233 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
26234 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
26235 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
26236 xargs xcolor xy yhmath
26239 \begin_layout Chapter
26240 Names of available colors to be used in layouts
26241 \begin_inset CommandInset label
26243 name "chap:Names-of-colors"
26250 \begin_layout Standard
26251 The colors listed here are the standard colors and the those that you can
26252 adjust in the LyX preferences.
26255 \begin_layout Description
26268 No particular color -- clear or default
26271 \begin_layout Description
26275 \begin_layout Description
26279 \begin_layout Description
26283 \begin_layout Description
26287 \begin_layout Description
26291 \begin_layout Description
26295 \begin_layout Description
26299 \begin_layout Description
26303 \begin_layout Description
26304 cursor Cursor color
26307 \begin_layout Description
26308 background Background color
26311 \begin_layout Description
26312 foreground Foreground color
26315 \begin_layout Description
26316 selection Background color of selected text
26319 \begin_layout Description
26320 selectiontext Foreground color of selected text
26323 \begin_layout Description
26324 latex Text color in LaTeX mode
26327 \begin_layout Description
26328 preview The color used for previews
26331 \begin_layout Description
26332 inlinecompletion Inline completion color
26335 \begin_layout Description
26336 nonunique_inlinecompletion Inline completion color for the non-unique part
26339 \begin_layout Description
26340 notelabel Label color for notes
26343 \begin_layout Description
26344 notebg Background color of notes
26347 \begin_layout Description
26348 commentlabel Label color for comments
26351 \begin_layout Description
26352 commentbg Background color of comments
26355 \begin_layout Description
26356 greyedoutlabel Label color for greyedout insets
26359 \begin_layout Description
26360 greyedouttext Color for greyedout inset text
26363 \begin_layout Description
26364 greyedoutbg Background color of greyedout inset
26367 \begin_layout Description
26368 shadedbg Background color of shaded box
26371 \begin_layout Description
26372 listingsbg Background color of listings inset
26375 \begin_layout Description
26376 branchlabel Label color for branches
26379 \begin_layout Description
26380 footlabel Label color for footnotes
26383 \begin_layout Description
26384 indexlabel Label color for index insets
26387 \begin_layout Description
26388 marginlabel Label color for margin notes
26391 \begin_layout Description
26392 phantomtext Text color for phantom insets
26395 \begin_layout Description
26396 urllabel Label color for URL insets
26399 \begin_layout Description
26400 urltext Color for URL inset text
26403 \begin_layout Description
26404 depthbar Color for the depth bars in the margin
26407 \begin_layout Description
26408 language Color for marking foreign language words
26411 \begin_layout Description
26412 command Text color for command insets
26415 \begin_layout Description
26416 commandbg Background color for command insets
26419 \begin_layout Description
26420 commandframe Frame color for command insets
26423 \begin_layout Description
26424 special Special chars text color
26427 \begin_layout Description
26428 graphicsbg Graphics inset background color
26431 \begin_layout Description
26432 math Math inset text color
26435 \begin_layout Description
26436 mathbg Math inset background color
26439 \begin_layout Description
26440 mathmacrobg Macro math inset background color
26443 \begin_layout Description
26444 mathmacrohoverbg Macro math inset background color hovered
26447 \begin_layout Description
26448 mathmacrolabel Macro math label color
26451 \begin_layout Description
26452 mathmacroframe Macro math frame color
26455 \begin_layout Description
26456 mathmacroblend Macro math blended color
26459 \begin_layout Description
26460 mathmacrooldarg Macro template color for old parameters
26463 \begin_layout Description
26464 mathmacronewarg Macro template color for new parameters
26467 \begin_layout Description
26468 mathframe Math inset frame color under focus
26471 \begin_layout Description
26472 mathcorners Math inset frame color not under focus
26475 \begin_layout Description
26476 mathline Math line color
26479 \begin_layout Description
26480 collapsable Collapsable insets text
26483 \begin_layout Description
26484 collapsableframe Collapsable insets frame
26487 \begin_layout Description
26488 insetbg Inset marker background color
26491 \begin_layout Description
26492 insetframe Inset marker frame color
26495 \begin_layout Description
26496 error Error box text color
26499 \begin_layout Description
26500 eolmarker End of line marker color
26503 \begin_layout Description
26504 added_space Added space colour
26507 \begin_layout Description
26508 appendix Appendix marker color
26511 \begin_layout Description
26512 changebar Changebar color
26515 \begin_layout Description
26516 deletedtext Deleted text color
26519 \begin_layout Description
26520 addedtext Added text color
26523 \begin_layout Description
26524 changedtextauthor1 Changed text color author 1
26527 \begin_layout Description
26528 changedtextauthor2 Changed text color author 2
26531 \begin_layout Description
26532 changedtextauthor3 Changed text color author 3
26535 \begin_layout Description
26536 changedtextauthor4 Changed text color author 4
26539 \begin_layout Description
26540 changedtextauthor5 Changed text color author 5
26543 \begin_layout Description
26544 deletedtextmodifier Deleted text modifying color
26547 \begin_layout Description
26548 tabularline Table line color
26551 \begin_layout Description
26552 tabularonoffline Table line color
26555 \begin_layout Description
26556 bottomarea Bottom area color
26559 \begin_layout Description
26560 newpage New page color
26563 \begin_layout Description
26564 pagebreak Page break color
26567 \begin_layout Description
26568 buttonframe Color used for button frame
26571 \begin_layout Description
26572 buttonbg Color used for bottom background
26575 \begin_layout Description
26576 buttonhoverbg Color used for buttom under focus
26579 \begin_layout Description
26580 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
26584 \begin_layout Description
26585 previewframe Preview frame color
26588 \begin_layout Description
26589 inherit Color is inherited
26592 \begin_layout Description
26593 regexpframe Color for regexp frame
26596 \begin_layout Description
26597 ignore For ignoring updates of a color