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 default
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.
9440 \change_inserted 1414654397 1369315909
9444 \begin_layout Description
9446 \change_inserted 1414654397 1369316059
9447 \begin_inset Flex Code
9450 \begin_layout Plain Layout
9452 \change_inserted 1414654397 1369315915
9459 \begin_inset Flex Code
9462 \begin_layout Plain Layout
9464 \change_inserted 1414654397 1369315909
9471 \begin_inset Flex Code
9474 \begin_layout Plain Layout
9476 \change_inserted 1414654397 1369315919
9482 ] Specifies options, given in the second string, for the package named by
9485 \begin_inset Quotes eld
9489 \begin_inset Flex Code
9492 \begin_layout Plain Layout
9494 \change_inserted 1414654397 1369315957
9495 PackageOptions natbib square
9503 \begin_inset Quotes erd
9507 \begin_inset Flex Code
9510 \begin_layout Plain Layout
9512 \change_inserted 1414654397 1369315966
9520 to be loaded with the
9521 \begin_inset Flex Code
9524 \begin_layout Plain Layout
9526 \change_inserted 1414654397 1369315985
9535 (For TeXperts, this causes LyX to output:
9536 \begin_inset Flex Code
9539 \begin_layout Plain Layout
9541 \change_inserted 1414654397 1369316019
9544 PassOptionsToPackage{natbib}{square}
9552 \begin_inset Flex Code
9555 \begin_layout Plain Layout
9557 \change_inserted 1414654397 1369316061
9570 \begin_layout Description
9571 \begin_inset Flex Code
9574 \begin_layout Plain Layout
9581 \begin_inset Flex Code
9584 \begin_layout Plain Layout
9593 \begin_inset Flex Code
9596 \begin_layout Plain Layout
9603 \begin_inset Flex Code
9606 \begin_layout Plain Layout
9612 ] The default pagestyle.
9613 Can be changed in the
9614 \begin_inset Flex MenuItem
9617 \begin_layout Plain Layout
9618 Document\SpecialChar \menuseparator
9627 \begin_layout Description
9628 \begin_inset Flex Code
9631 \begin_layout Plain Layout
9637 Sets the preamble for the LaTeX document.
9638 Note that this will completely override any prior
9639 \begin_inset Flex Code
9642 \begin_layout Plain Layout
9649 \begin_inset Flex Code
9652 \begin_layout Plain Layout
9660 \begin_inset Flex Code
9663 \begin_layout Plain Layout
9669 if you just want to add material to the preamble.) Must end with
9670 \begin_inset Quotes eld
9674 \begin_inset Flex Code
9677 \begin_layout Plain Layout
9684 \begin_inset Quotes erd
9690 \begin_layout Description
9691 \begin_inset Flex Code
9694 \begin_layout Plain Layout
9701 \begin_inset Flex Code
9704 \begin_layout Plain Layout
9711 \begin_inset Flex Code
9714 \begin_layout Plain Layout
9723 \begin_inset space \thinspace{}
9727 \begin_inset Flex Code
9730 \begin_layout Plain Layout
9736 ] Whether the class already provides the feature
9737 \begin_inset Flex Code
9740 \begin_layout Plain Layout
9747 A feature is in general the name of a package (e.
9748 \begin_inset space \thinspace{}
9752 \begin_inset space \space{}
9756 \begin_inset Flex Code
9759 \begin_layout Plain Layout
9766 \begin_inset Flex Code
9769 \begin_layout Plain Layout
9776 \begin_inset space \thinspace{}
9780 \begin_inset space \space{}
9784 \begin_inset Flex Code
9787 \begin_layout Plain Layout
9794 \begin_inset Flex Code
9797 \begin_layout Plain Layout
9805 \begin_inset space ~
9809 \begin_inset CommandInset ref
9811 reference "chap:List-of-functions"
9815 for the list of features.
9818 \begin_layout Description
9819 \begin_inset Flex Code
9822 \begin_layout Plain Layout
9829 \begin_inset Flex Code
9832 \begin_layout Plain Layout
9838 ] Indicates that this layout provides the functionality of the module mentioned,
9839 which should be specified by the filename without the
9840 \begin_inset Flex Code
9843 \begin_layout Plain Layout
9850 This will typically be used if the layout includes the module directly,
9851 rather than using the
9852 \begin_inset Flex Code
9855 \begin_layout Plain Layout
9861 tag to indicate that it ought to be used.
9862 It could also be used in a module that provided an alternate implementation
9863 of the same functionality.
9866 \begin_layout Description
9867 \begin_inset Flex Code
9870 \begin_layout Plain Layout
9877 \begin_inset Flex Code
9880 \begin_layout Plain Layout
9886 ] Whether the class requires the feature
9887 \begin_inset Flex Code
9890 \begin_layout Plain Layout
9897 Multiple features must be separated by commas.
9898 Note that you can only request supported features.
9900 \begin_inset space ~
9904 \begin_inset CommandInset ref
9906 reference "chap:List-of-functions"
9910 for the list of features.)
9913 \begin_layout Description
9914 \begin_inset Flex Code
9917 \begin_layout Plain Layout
9924 \begin_inset Flex Code
9927 \begin_layout Plain Layout
9933 ] A string that indicates the width of the right margin on the screen, for
9935 \begin_inset Quotes eld
9939 \begin_inset Flex Code
9942 \begin_layout Plain Layout
9949 \begin_inset Quotes erd
9955 \begin_layout Description
9956 \begin_inset Flex Code
9959 \begin_layout Plain Layout
9966 \begin_inset Flex Code
9969 \begin_layout Plain Layout
9975 ] Sets which divisions get numbered.
9977 \begin_inset Newline newline
9981 \begin_inset Flex Code
9984 \begin_layout Plain Layout
9993 \begin_layout Description
9994 \begin_inset Flex Code
9997 \begin_layout Plain Layout
10004 \begin_inset Flex Code
10007 \begin_layout Plain Layout
10016 \begin_inset space \thinspace{}
10020 \begin_inset Flex Code
10023 \begin_layout Plain Layout
10029 ] Whether the class-default should be printing on one or both sides of the
10031 Can be changed in the
10032 \begin_inset Flex MenuItem
10035 \begin_layout Plain Layout
10036 Document\SpecialChar \menuseparator
10045 \begin_layout Description
10046 \begin_inset Flex Code
10049 \begin_layout Plain Layout
10056 \begin_inset Flex Code
10059 \begin_layout Plain Layout
10065 ] This sequence defines a paragraph style.
10066 If the style does not yet exist, it is created; if it does exist, its parameter
10069 \begin_inset Quotes eld
10073 \begin_inset Flex Code
10076 \begin_layout Plain Layout
10083 \begin_inset Quotes erd
10087 \begin_inset Newline newline
10091 \begin_inset space ~
10095 \begin_inset CommandInset ref
10097 reference "sub:Paragraph-Styles"
10101 for details on paragraph styles.
10104 \begin_layout Description
10105 \begin_inset Flex Code
10108 \begin_layout Plain Layout
10115 \begin_inset Flex Code
10118 \begin_layout Plain Layout
10124 ] The name of the command or environment to be used with
10125 \begin_inset Flex Code
10128 \begin_layout Plain Layout
10137 \begin_layout Description
10138 \begin_inset Flex Code
10141 \begin_layout Plain Layout
10148 \begin_inset Flex Code
10151 \begin_layout Plain Layout
10160 \begin_inset Flex Code
10163 \begin_layout Plain Layout
10169 ] Indicates what kind of markup is used to define the title of a document.
10171 \begin_inset Flex Code
10174 \begin_layout Plain Layout
10180 means that the macro with name
10181 \begin_inset Flex Code
10184 \begin_layout Plain Layout
10190 will be inserted after the last layout which has
10191 \begin_inset Quotes eld
10195 \begin_inset Flex Code
10198 \begin_layout Plain Layout
10200 \begin_inset space ~
10209 \begin_inset Quotes erd
10214 \begin_inset Flex Code
10217 \begin_layout Plain Layout
10223 corresponds to the case where all layouts which have
10224 \begin_inset Quotes eld
10228 \begin_inset Flex Code
10231 \begin_layout Plain Layout
10233 \begin_inset space ~
10242 \begin_inset Quotes erd
10245 should be enclosed into the
10246 \begin_inset Flex Code
10249 \begin_layout Plain Layout
10258 \begin_layout Description
10259 \begin_inset Flex Code
10262 \begin_layout Plain Layout
10269 \begin_inset Flex Code
10272 \begin_layout Plain Layout
10278 ] Sets which divisions are included in the table of contents.
10280 \begin_inset Flex Code
10283 \begin_layout Plain Layout
10292 \begin_layout Subsection
10293 \begin_inset Flex Code
10296 \begin_layout Plain Layout
10303 \begin_inset CommandInset label
10305 name "sub:ClassOptions"
10312 \begin_layout Standard
10314 \begin_inset Flex Code
10317 \begin_layout Plain Layout
10323 section can contain the following entries:
10326 \begin_layout Description
10327 \begin_inset Flex Code
10330 \begin_layout Plain Layout
10337 \begin_inset Flex Code
10340 \begin_layout Plain Layout
10346 ] The list of available font sizes for the document's main font, separated
10348 \begin_inset Quotes eld
10352 \begin_inset Flex Code
10355 \begin_layout Plain Layout
10362 \begin_inset Quotes erd
10368 \begin_layout Description
10369 \begin_inset Flex Code
10372 \begin_layout Plain Layout
10378 Used to set the DTD line with XML-based output classes.
10380 \begin_inset space \thinspace{}
10384 \begin_inset Quotes eld
10387 -//OASIS//DTD DocBook V4.2//EN
10388 \begin_inset Quotes erd
10394 \begin_layout Description
10395 \begin_inset Flex Code
10398 \begin_layout Plain Layout
10405 \begin_inset Flex Code
10408 \begin_layout Plain Layout
10409 string="empty|plain|headings|fancy"
10414 ] The list of available page sty\SpecialChar \-
10416 \begin_inset Quotes eld
10420 \begin_inset Flex Code
10423 \begin_layout Plain Layout
10430 \begin_inset Quotes erd
10436 \begin_layout Description
10437 \begin_inset Flex Code
10440 \begin_layout Plain Layout
10447 \begin_inset Flex Code
10450 \begin_layout Plain Layout
10456 ] Some document class options, separated by a comma, that will be added
10457 to the optional part of the
10458 \begin_inset Flex Code
10461 \begin_layout Plain Layout
10472 \begin_layout Standard
10474 \begin_inset Flex Code
10477 \begin_layout Plain Layout
10483 section must end with
10484 \begin_inset Quotes eld
10488 \begin_inset Flex Code
10491 \begin_layout Plain Layout
10498 \begin_inset Quotes erd
10504 \begin_layout Subsection
10506 \begin_inset CommandInset label
10508 name "sub:Paragraph-Styles"
10515 \begin_layout Standard
10516 A paragraph style description looks like this:
10520 \begin_layout Plain Layout
10521 Note that this will either define a new style or modify an existing one.
10529 \begin_layout LyX-Code
10536 \begin_layout LyX-Code
10540 \begin_layout LyX-Code
10544 \begin_layout Standard
10545 where the following commands are allowed:
10548 \begin_layout Description
10549 \begin_inset Flex Code
10552 \begin_layout Plain Layout
10559 \begin_inset Flex Code
10562 \begin_layout Plain Layout
10567 , left, right, center
10572 ] Paragraph alignment.
10575 \begin_layout Description
10576 \begin_inset Flex Code
10579 \begin_layout Plain Layout
10586 \begin_inset Flex Code
10589 \begin_layout Plain Layout
10594 , left, right, center
10599 ] A comma separated list of permitted alignments.
10600 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10602 For example a right-aligned or centered enumeration isn't possible.)
10603 \change_inserted -712698321 1353679769
10607 \begin_layout Description
10609 \change_inserted -712698321 1353680268
10610 \begin_inset Flex Code
10613 \begin_layout Plain Layout
10615 \change_inserted -712698321 1353679781
10622 \begin_inset Flex Code
10625 \begin_layout Plain Layout
10627 \change_inserted -712698321 1353679772
10633 ] Defines argument number <int> of a command\SpecialChar \slash{}
10634 environment associated with
10636 This is useful for things like section headings, and only makes sense with
10638 Every (optional or required) argument of a command or environment -- except
10639 for the required argument that is associated with the content of the paragraph
10640 itself -- has a separate definition, where the number specifies the order
10642 The definition must end with
10643 \begin_inset Flex Code
10646 \begin_layout Plain Layout
10648 \change_inserted -712698321 1353680069
10655 So a command with two optional arguments has:
10659 \begin_layout Quote
10661 \change_inserted -712698321 1353680127
10667 \begin_layout Quote
10669 \change_inserted -712698321 1353680195
10675 \begin_layout Quote
10677 \change_inserted -712698321 1353680135
10683 \begin_layout Quote
10685 \change_inserted -712698321 1353680140
10691 \begin_layout Quote
10693 \change_inserted -712698321 1353680197
10699 \begin_layout Quote
10701 \change_inserted -712698321 1353680147
10707 \begin_layout Standard
10709 \change_inserted -712698321 1353680528
10711 \begin_inset Flex Code
10714 \begin_layout Plain Layout
10716 \change_inserted -712698321 1353680412
10722 definition, the following specifications are possible:
10725 \begin_layout Itemize
10727 \change_inserted -712698321 1355076779
10728 \begin_inset Flex Code
10731 \begin_layout Plain Layout
10733 \change_inserted -712698321 1353680543
10742 \begin_inset Flex Code
10745 \begin_layout Plain Layout
10747 \change_inserted -712698321 1353680567
10753 The string that will appear both in the menu (to insert this argument)
10754 and on the argument inset button (unless you also specify a separate
10755 \begin_inset Flex Code
10758 \begin_layout Plain Layout
10760 \change_inserted -712698321 1355076779
10767 For the menu, you can define an accelerator by appending the respective
10768 character to the string, divided by
10769 \begin_inset Quotes eld
10773 \begin_inset Quotes erd
10777 \begin_inset space \thinspace{}
10782 \begin_inset Flex Code
10785 \begin_layout Plain Layout
10787 \change_inserted -712698321 1353691482
10788 \begin_inset Quotes eld
10792 \begin_inset Quotes erd
10805 \begin_layout Itemize
10807 \change_inserted -712698321 1355076754
10808 \begin_inset Flex Code
10811 \begin_layout Plain Layout
10813 \change_inserted -712698321 1355076658
10820 \begin_inset Flex Code
10823 \begin_layout Plain Layout
10825 \change_inserted -712698321 1355076654
10831 A separate string for the menu.
10832 You can define an accelerator by appending the respective character to
10833 the string, divided by
10834 \begin_inset Quotes eld
10838 \begin_inset Quotes erd
10842 \begin_inset space \thinspace{}
10847 \begin_inset Flex Code
10850 \begin_layout Plain Layout
10852 \change_inserted -712698321 1355076654
10853 \begin_inset Quotes eld
10857 \begin_inset Quotes erd
10866 This specification is optional.
10867 If it is not given the
10868 \begin_inset Flex Code
10871 \begin_layout Plain Layout
10873 \change_inserted -712698321 1355076736
10881 will be used instead for the menu.
10884 \begin_layout Itemize
10886 \change_inserted -712698321 1353680665
10887 \begin_inset Flex Code
10890 \begin_layout Plain Layout
10892 \change_inserted -712698321 1353680616
10899 \begin_inset Flex Code
10902 \begin_layout Plain Layout
10904 \change_inserted -712698321 1353680623
10910 A longer explanatory text that appears in the tooltip when hovering over
10911 the argument inset.
10914 \begin_layout Itemize
10916 \change_inserted -712698321 1353680874
10917 \begin_inset Flex Code
10920 \begin_layout Plain Layout
10922 \change_inserted -712698321 1353680732
10929 \begin_inset Flex Code
10932 \begin_layout Plain Layout
10934 \change_inserted -712698321 1353680738
10940 Declare if this is a mandatory
10941 \change_inserted 2090807402 1353765594
10943 \change_inserted -712698321 1353680874
10945 \change_inserted 2090807402 1353765599
10947 \change_inserted -712698321 1353680874
10949 Mandatory arguments will be output empty if not given, while optional arguments
10950 will not be output at all.
10951 By default, mandatory arguments are delimited by
10952 \begin_inset Flex Code
10955 \begin_layout Plain Layout
10957 \change_inserted -712698321 1353680808
10965 , while optional arguments are delimited by
10966 \begin_inset Flex Code
10969 \begin_layout Plain Layout
10971 \change_inserted -712698321 1353680833
10980 \begin_layout Itemize
10982 \change_inserted -712698321 1353917199
10983 \begin_inset Flex Code
10986 \begin_layout Plain Layout
10988 \change_inserted -712698321 1353680879
10995 \begin_inset Flex Code
10998 \begin_layout Plain Layout
11000 \change_inserted -712698321 1353680874
11006 defines another argument (by its number) which this argument requires to
11007 be output if it is itself output.
11009 \begin_inset space \thinspace{}
11012 g., in LaTeX commands, optional arguments often require previous optional
11013 arguments to be output (at least empty), as in
11014 \begin_inset Flex Code
11017 \begin_layout Plain Layout
11019 \change_inserted -712698321 1353688183
11022 command[][arg]{text}
11030 This can be achieved by the statement
11031 \begin_inset Flex Code
11034 \begin_layout Plain Layout
11036 \change_inserted -712698321 1353681031
11045 \begin_inset Flex Code
11048 \begin_layout Plain Layout
11050 \change_inserted -712698321 1353681045
11061 \begin_layout Itemize
11063 \change_inserted -712698321 1354263104
11064 \begin_inset Flex Code
11067 \begin_layout Plain Layout
11069 \change_inserted -712698321 1353681072
11078 \begin_inset Flex Code
11081 \begin_layout Plain Layout
11083 \change_inserted -712698321 1353681067
11089 defines a custom left delimiter (instead of
11090 \begin_inset Flex Code
11093 \begin_layout Plain Layout
11095 \change_inserted -712698321 1353681127
11104 \begin_inset Flex Code
11107 \begin_layout Plain Layout
11109 \change_inserted -712698321 1353681133
11118 A line break in the output can be indicated by
11119 \begin_inset Flex Code
11122 \begin_layout Plain Layout
11124 \change_inserted -712698321 1354263104
11135 \begin_layout Itemize
11137 \change_inserted -712698321 1355144479
11138 \begin_inset Flex Code
11141 \begin_layout Plain Layout
11143 \change_inserted -712698321 1353681149
11150 \begin_inset Flex Code
11153 \begin_layout Plain Layout
11155 \change_inserted -712698321 1353681146
11161 defines a custom right delimiter (instead of
11162 \begin_inset Flex Code
11165 \begin_layout Plain Layout
11167 \change_inserted -712698321 1353681158
11174 \begin_inset Flex Code
11177 \begin_layout Plain Layout
11179 \change_inserted -712698321 1353681161
11186 A line break in the output can be indicated by
11187 \begin_inset Flex Code
11190 \begin_layout Plain Layout
11192 \change_inserted -712698321 1354263106
11201 \begin_layout Itemize
11203 \change_inserted -712698321 1361701444
11204 \begin_inset Flex Code
11207 \begin_layout Plain Layout
11209 \change_inserted -712698321 1361701356
11216 \begin_inset Flex Code
11219 \begin_layout Plain Layout
11221 \change_inserted -712698321 1361701356
11227 defines an argument that is inserted if and only if no user-specified arguments
11229 \begin_inset space \thinspace{}
11233 if no argument inset has been inserted (note that also an empty argument
11234 inset omits the DefaultArg).
11235 Multiple arguments need to be separated by comma.
11238 \begin_layout Itemize
11240 \change_inserted -712698321 1361701337
11241 \begin_inset Flex Code
11244 \begin_layout Plain Layout
11246 \change_inserted -712698321 1355144487
11255 \begin_inset Flex Code
11258 \begin_layout Plain Layout
11260 \change_inserted -712698321 1355144500
11266 defines an argument that is inserted in any case (alone or in addition
11267 to user-specified arguments).
11268 Multiple arguments need to be separated by comma.
11271 \begin_layout Itemize
11273 \change_inserted -712698321 1353917320
11274 \begin_inset Flex Code
11277 \begin_layout Plain Layout
11279 \change_inserted -712698321 1353917320
11285 The font used for the argument content.
11287 \begin_inset space ~
11291 \begin_inset CommandInset ref
11293 reference "sub:Font-description"
11300 \begin_layout Itemize
11302 \change_inserted -712698321 1353917320
11303 \begin_inset Flex Code
11306 \begin_layout Plain Layout
11308 \change_inserted -712698321 1353917320
11314 The font used for the label.
11316 \begin_inset space ~
11320 \begin_inset CommandInset ref
11322 reference "sub:Font-description"
11329 \begin_layout Itemize
11331 \change_inserted -712698321 1355661048
11332 \begin_inset Flex Code
11335 \begin_layout Plain Layout
11337 \change_inserted -712698321 1353917320
11344 \begin_inset Flex Code
11347 \begin_layout Plain Layout
11349 \change_inserted -712698321 1353917320
11356 \begin_inset Flex Code
11359 \begin_layout Plain Layout
11361 \change_inserted -712698321 1353917320
11368 \begin_inset Flex Code
11371 \begin_layout Plain Layout
11373 \change_inserted -712698321 1353917320
11379 , describing the rendering style used for the inset's frame and buttons.
11381 \begin_inset Flex Code
11384 \begin_layout Plain Layout
11386 \change_inserted -712698321 1353917320
11395 \begin_layout Itemize
11397 \change_inserted -712698321 1355747298
11398 \begin_inset Flex Code
11401 \begin_layout Plain Layout
11403 \change_inserted -712698321 1355661057
11410 \begin_inset Flex Code
11413 \begin_layout Plain Layout
11415 \change_inserted -712698321 1355661049
11422 \begin_inset Flex Code
11425 \begin_layout Plain Layout
11427 \change_inserted -712698321 1355661077
11435 , this argument is automatically inserted when the respective style is selected.
11436 Currently, only one argument per style\SpecialChar \slash{}
11437 layout can be automatically inserted.
11438 \change_inserted 155139281 1354198988
11442 \begin_layout Standard
11444 \change_inserted -712698321 1356689813
11445 By default, the text entered in the LyX workarea in the respective layout
11446 is the last (mandatory) argument of a command if the
11447 \begin_inset Flex Code
11450 \begin_layout Plain Layout
11452 \change_inserted -712698321 1356689619
11461 \begin_inset Flex Code
11464 \begin_layout Plain Layout
11466 \change_inserted -712698321 1356689629
11475 However, arguments with the prefix
11476 \begin_inset Flex Code
11479 \begin_layout Plain Layout
11481 \change_inserted -712698321 1356689679
11489 are output after this workarea argument.
11490 Note that post-argument numbering restarts at 1, so the first argument
11491 following the workarea argument is
11492 \begin_inset Flex Code
11495 \begin_layout Plain Layout
11497 \change_inserted -712698321 1356689813
11506 Post-arguments are ignored in any other
11507 \begin_inset Flex Code
11510 \begin_layout Plain Layout
11512 \change_inserted -712698321 1356689801
11519 \begin_inset Flex Code
11522 \begin_layout Plain Layout
11524 \change_inserted -712698321 1356689801
11535 \begin_layout Standard
11537 \change_inserted 155139281 1354199102
11539 \begin_inset Flex Code
11542 \begin_layout Plain Layout
11544 \change_inserted 155139281 1354199013
11555 \begin_inset Flex Code
11558 \begin_layout Plain Layout
11560 \change_inserted 155139281 1354199102
11571 \begin_inset Flex Code
11574 \begin_layout Plain Layout
11576 \change_inserted 155139281 1354199044
11584 followed by the number (e.
11585 \begin_inset space \thinspace{}
11590 \begin_inset Flex Code
11593 \begin_layout Plain Layout
11595 \change_inserted 155139281 1354199064
11609 \begin_layout Description
11610 \begin_inset Flex Code
11613 \begin_layout Plain Layout
11619 Note that this will completely override any prior
11620 \begin_inset Flex Code
11623 \begin_layout Plain Layout
11629 declaration for this style.
11631 \begin_inset Quotes eld
11635 \begin_inset Flex Code
11638 \begin_layout Plain Layout
11645 \begin_inset Quotes erd
11650 \begin_inset space ~
11654 \begin_inset CommandInset ref
11656 reference "sub:I18n"
11660 for details on its use.
11663 \begin_layout Description
11664 \begin_inset Flex Code
11667 \begin_layout Plain Layout
11674 \begin_inset Flex Code
11677 \begin_layout Plain Layout
11687 \begin_layout Plain Layout
11688 Note that a `float' here is a real number, such as: 1.5.
11693 The vertical space with which the last of a chain of paragraphs with this
11694 style is separated from the following paragraph.
11695 If the next paragraph has another style, the separations are not simply
11696 added, but the maximum is taken.
11699 \begin_layout Description
11700 \begin_inset Flex Code
11703 \begin_layout Plain Layout
11710 \begin_inset Flex Code
11713 \begin_layout Plain Layout
11719 ] The category for this style.
11720 This is used to group related styles in the style combobox on the toolbar.
11721 Any string can be used, but you may want to use existing categories with
11726 \begin_layout Description
11727 \begin_inset Flex Code
11730 \begin_layout Plain Layout
11736 Depth of XML command.
11737 Used only with XML-type formats.
11740 \begin_layout Description
11741 \begin_inset Flex Code
11744 \begin_layout Plain Layout
11751 \begin_inset Flex Code
11754 \begin_layout Plain Layout
11760 ] Copies all the features of an existing style into the current one.
11764 \begin_layout Description
11765 \begin_inset Flex Code
11768 \begin_layout Plain Layout
11775 \begin_inset Flex Code
11778 \begin_layout Plain Layout
11784 ] The name of a style whose preamble should be output
11789 This allows to ensure some ordering of the preamble snippets when macros
11790 definitions depend on one another.
11794 \begin_layout Plain Layout
11795 Note that, besides that functionality, there is no way to ensure any ordering
11797 The ordering that you see in a given version of LyX may change without
11798 warning in later versions.
11806 \begin_layout Description
11807 \begin_inset Flex Code
11810 \begin_layout Plain Layout
11817 \begin_inset Flex Code
11820 \begin_layout Plain Layout
11825 , Box, Filled_Box, Static
11830 ] The type of label that stands at the end of the paragraph (or sequence
11832 \begin_inset Flex Code
11835 \begin_layout Plain Layout
11842 \begin_inset Newline newline
11846 \begin_inset Flex Code
11849 \begin_layout Plain Layout
11856 \begin_inset Flex Code
11859 \begin_layout Plain Layout
11866 \begin_inset Flex Code
11869 \begin_layout Plain Layout
11877 \begin_inset Flex Code
11880 \begin_layout Plain Layout
11887 \begin_inset Quotes eld
11891 \begin_inset Quotes erd
11895 \begin_inset Flex Code
11898 \begin_layout Plain Layout
11905 \begin_inset space \space{}
11909 \begin_inset Flex Code
11912 \begin_layout Plain Layout
11918 ) is a white (resp.
11919 \begin_inset space ~
11922 black) square suitable for end of proof markers,
11923 \begin_inset Flex Code
11926 \begin_layout Plain Layout
11932 is an explicit text string.
11935 \begin_layout Description
11936 \begin_inset Flex Code
11939 \begin_layout Plain Layout
11946 \begin_inset Flex Code
11949 \begin_layout Plain Layout
11955 ] The string used for a label with a
11956 \begin_inset Flex Code
11959 \begin_layout Plain Layout
11966 \begin_inset Newline newline
11970 \begin_inset Flex Code
11973 \begin_layout Plain Layout
11983 \begin_layout Description
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11993 The font used for both the text body
11999 \begin_inset space ~
12003 \begin_inset CommandInset ref
12005 reference "sub:Font-description"
12010 Note that defining this font automatically defines the
12011 \begin_inset Flex Code
12014 \begin_layout Plain Layout
12021 So you should define this one first if you also want to define
12022 \begin_inset Flex Code
12025 \begin_layout Plain Layout
12032 \change_inserted -195340706 1364753581
12036 \begin_layout Description
12038 \change_inserted -195340706 1364753581
12039 \begin_inset Flex Code
12042 \begin_layout Plain Layout
12044 \change_inserted -195340706 1364753581
12050 Used for backporting new styles to stable LyX versions.
12051 The first stable version that supports this tag is LyX 2.1.0.
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12058 \change_inserted -195340706 1364753581
12064 is a number which may either be 0 (this is the default if the tag is not
12065 given), -1 or any value greater than zero.
12067 \begin_inset Flex Code
12070 \begin_layout Plain Layout
12072 \change_inserted -195340706 1364753581
12078 flag of a style is greater than zero, it will always be written to the
12080 If a .lyx file is read, the style definitions from the document header are
12081 added to the document class.
12082 Therefore even older versions can handle the style.
12084 \begin_inset Flex Code
12087 \begin_layout Plain Layout
12089 \change_inserted -195340706 1364753581
12095 is a version number: If such a style is read, and the version number is
12096 less than the version number of the already existing style in the document
12097 class, the new style is ignored.
12098 If the version number is higher, the new style replaces the existing style.
12099 A value of -1 means an infinite version number, i.e.
12105 \begin_layout Description
12106 \begin_inset Flex Code
12109 \begin_layout Plain Layout
12116 \begin_inset Flex Code
12119 \begin_layout Plain Layout
12128 \begin_inset space \thinspace{}
12132 \begin_inset Flex Code
12135 \begin_layout Plain Layout
12141 ] Usually LyX does not allow you to insert more than one space between words,
12142 since a space is considered as the separation between two words, not a
12143 character or symbol of its own.
12144 This is a very fine thing but sometimes annoying, for example, when typing
12145 program code or plain LaTeX code.
12147 \begin_inset Flex Code
12150 \begin_layout Plain Layout
12157 Note that LyX will create protected blanks for the additional blanks when
12158 in another mode than LaTeX-mode.
12161 \begin_layout Description
12162 \begin_inset Flex Code
12165 \begin_layout Plain Layout
12171 These tags are used with XHTML output.
12173 \begin_inset CommandInset ref
12175 reference "sub:Paragraph-Style-XHTML"
12182 \begin_layout Description
12183 \begin_inset Flex Code
12186 \begin_layout Plain Layout
12192 [FIXME] (Used only with XML-type formats.)
12195 \begin_layout Description
12196 \begin_inset Flex Code
12199 \begin_layout Plain Layout
12206 \begin_inset Flex Code
12209 \begin_layout Plain Layout
12218 \begin_inset space \thinspace{}
12222 \begin_inset Flex Code
12225 \begin_layout Plain Layout
12232 \begin_inset Flex Code
12235 \begin_layout Plain Layout
12241 , marks the style as to be included in the document preamble and not in
12243 This is useful for document classes that want such information as the title
12244 and author to appear in the preamble.
12245 Note that this works only for styles for which the
12246 \begin_inset Flex Code
12249 \begin_layout Plain Layout
12256 \begin_inset Flex Code
12259 \begin_layout Plain Layout
12266 \begin_inset Flex Code
12269 \begin_layout Plain Layout
12278 \begin_layout Description
12279 \begin_inset Flex Code
12282 \begin_layout Plain Layout
12289 \begin_inset Flex Code
12292 \begin_layout Plain Layout
12301 \begin_inset space \thinspace{}
12305 \begin_inset Flex Code
12308 \begin_layout Plain Layout
12315 \begin_inset Flex Code
12318 \begin_layout Plain Layout
12324 , marks the style as being part of a title block (see also the
12325 \begin_inset Flex Code
12328 \begin_layout Plain Layout
12335 \begin_inset Flex Code
12338 \begin_layout Plain Layout
12347 \begin_layout Description
12349 \change_inserted -712698321 1355932296
12350 \begin_inset Flex Code
12353 \begin_layout Plain Layout
12355 \change_inserted -712698321 1355932178
12362 \begin_inset Flex Code
12365 \begin_layout Plain Layout
12367 \change_inserted -712698321 1355932181
12373 ] The LaTeX command sequence declaring an item in a list.
12374 The command is to be defined without the preceding backslash (the default
12376 \begin_inset Quotes eld
12380 \begin_inset Quotes erd
12384 \begin_inset Flex Code
12387 \begin_layout Plain Layout
12389 \change_inserted -712698321 1355932279
12399 in the LaTeX output).
12402 \begin_layout Description
12403 \begin_inset Flex Code
12406 \begin_layout Plain Layout
12413 \begin_inset Flex Code
12416 \begin_layout Plain Layout
12422 ] This provides extra space between paragraphs that have the same style.
12423 If you put other styles into an environment, each is separated with the
12425 \begin_inset Flex Code
12428 \begin_layout Plain Layout
12435 But the whole items of the environment are additionally separated with
12437 \begin_inset Flex Code
12440 \begin_layout Plain Layout
12447 Note that this is a
12452 \begin_layout Description
12453 \begin_inset Flex Code
12456 \begin_layout Plain Layout
12462 [FIXME] (Used only with XML-type formats.)
12465 \begin_layout Description
12466 \begin_inset Flex Code
12469 \begin_layout Plain Layout
12476 \begin_inset Flex Code
12479 \begin_layout Plain Layout
12488 \begin_inset space \thinspace{}
12492 \begin_inset Flex Code
12495 \begin_layout Plain Layout
12501 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12502 lead to empty LaTeX output.
12503 There are some cases where this could be desirable however: in a letter
12504 template, the required fields can be provided as empty fields, so that
12505 people do not forget them; in some special classes, a style can be used
12506 as some kind of break, which does not contain actual text.
12509 \begin_layout Description
12510 \begin_inset Flex Code
12513 \begin_layout Plain Layout
12520 \begin_inset Flex Code
12523 \begin_layout Plain Layout
12529 ] The vertical space between the label and the text body.
12530 Only used for labels that are above the text body (
12531 \begin_inset Flex Code
12534 \begin_layout Plain Layout
12541 \begin_inset Newline newline
12545 \begin_inset Flex Code
12548 \begin_layout Plain Layout
12549 Centered_Top_Environment
12557 \begin_layout Description
12558 \begin_inset Flex Code
12561 \begin_layout Plain Layout
12568 \begin_inset Flex Code
12571 \begin_layout Plain Layout
12577 ] The name of the counter for automatic numbering.
12579 \change_inserted 1414654397 1360434581
12580 In order to have the counter appear with your label, you will need to reference
12581 it in the LabelString.
12582 This will work with
12583 \begin_inset Flex Code
12586 \begin_layout Plain Layout
12588 \change_inserted 1414654397 1360434565
12597 \begin_inset Flex Code
12600 \begin_layout Plain Layout
12602 \change_inserted 1414654397 1360434569
12611 \begin_inset Flex Code
12614 \begin_layout Plain Layout
12616 \change_inserted 1414654397 1360434574
12625 \begin_inset Flex Code
12628 \begin_layout Plain Layout
12630 \change_inserted 1414654397 1360434578
12641 \begin_inset Newline newline
12645 \change_deleted 1414654397 1360434393
12651 \begin_inset Flex Code
12654 \begin_layout Plain Layout
12661 \begin_inset Flex Code
12664 \begin_layout Plain Layout
12671 In that case, the counter will be stepped each time the style appears.
12672 \begin_inset Newline newline
12682 \begin_inset Flex Code
12685 \begin_layout Plain Layout
12692 \begin_inset Flex Code
12695 \begin_layout Plain Layout
12701 , though this case is a bit complicated.
12702 Suppose you declare
12703 \begin_inset Quotes eld
12707 \begin_inset Flex Code
12710 \begin_layout Plain Layout
12711 LabelCounter myenum
12717 \begin_inset Quotes erd
12721 Then the actual counters used are
12722 \begin_inset Flex Code
12725 \begin_layout Plain Layout
12732 \begin_inset Flex Code
12735 \begin_layout Plain Layout
12742 \begin_inset Flex Code
12745 \begin_layout Plain Layout
12752 \begin_inset Flex Code
12755 \begin_layout Plain Layout
12761 , much as in LaTeX.
12762 These counters must all be declared separately.
12763 \begin_inset Newline newline
12767 \begin_inset CommandInset ref
12769 reference "sub:Counters"
12773 for details on counters.
12776 \begin_layout Description
12777 \begin_inset Flex Code
12780 \begin_layout Plain Layout
12786 The font used for the label.
12788 \begin_inset space ~
12792 \begin_inset CommandInset ref
12794 reference "sub:Font-description"
12801 \begin_layout Description
12802 \begin_inset Flex Code
12805 \begin_layout Plain Layout
12812 \begin_inset Flex Code
12815 \begin_layout Plain Layout
12821 ] Text that indicates how far a label should be indented.
12824 \begin_layout Description
12825 \begin_inset Flex Code
12828 \begin_layout Plain Layout
12835 \begin_inset Flex Code
12838 \begin_layout Plain Layout
12844 ] Text that indicates the amount of horizontal space between the label and
12846 Only used for labels that are not above the text body.
12849 \begin_layout Description
12850 \begin_inset Flex Code
12853 \begin_layout Plain Layout
12860 \begin_inset Flex Code
12863 \begin_layout Plain Layout
12869 ] The string used for
12870 \change_inserted 1414654397 1360434358
12872 \change_deleted 1414654397 1360434353
12877 \begin_inset Flex Code
12880 \begin_layout Plain Layout
12886 is set, this string can be contain the special formatting commands described
12888 \begin_inset CommandInset ref
12890 reference "sub:Counters"
12897 \begin_layout Description
12898 \begin_inset Flex Code
12901 \begin_layout Plain Layout
12902 LabelStringAppendix
12908 \begin_inset Flex Code
12911 \begin_layout Plain Layout
12917 ] This is used inside the appendix instead of
12918 \begin_inset Newline newline
12922 \begin_inset Flex Code
12925 \begin_layout Plain Layout
12933 \begin_inset Flex Code
12936 \begin_layout Plain Layout
12943 \begin_inset Newline newline
12947 \begin_inset Flex Code
12950 \begin_layout Plain Layout
12951 LabelStringAppendix
12959 \begin_layout Description
12960 \begin_inset Flex Code
12963 \begin_layout Plain Layout
12969 [FIXME] (Used only with XML-type formats.)
12972 \begin_layout Description
12973 \begin_inset Flex Code
12976 \begin_layout Plain Layout
12983 \begin_inset Flex Code
12986 \begin_layout Plain Layout
12992 \change_inserted 1414654397 1360434611
12994 \change_deleted 1414654397 1360434612
12998 \begin_inset Newline newline
13002 \change_inserted 1414654397 1360434627
13004 \change_deleted 1414654397 1360434623
13005 _Top_Environment, Counter,
13007 Sensitive, Enumerate,
13008 \begin_inset Newline newline
13011 Itemize, Bibliography
13020 \begin_layout Description
13021 \begin_inset Flex Code
13024 \begin_layout Plain Layout
13030 means the label is the very first word (up to the first real blank).
13031 Use protected spaces if you want more than one word as the label.
13035 \begin_layout Description
13036 \begin_inset Flex Code
13039 \begin_layout Plain Layout
13045 means the label is simply what is declared as
13046 \begin_inset Flex Code
13049 \begin_layout Plain Layout
13057 \change_deleted 1414654397 1360434660
13058 Note that this really is `static'.
13060 \change_inserted 1414654397 1360434794
13061 This will be displayed
13062 \begin_inset Quotes eld
13066 \begin_inset Quotes erd
13069 , at the beginning of the paragraph.
13071 \begin_inset Flex Code
13074 \begin_layout Plain Layout
13076 \change_inserted 1414654397 1360434743
13085 \begin_inset Flex Code
13088 \begin_layout Plain Layout
13090 \change_inserted 1414654397 1360434747
13098 , then it will be displayed only in the first paragraph in any sequence
13099 of paragraphs with the same
13100 \begin_inset Flex Code
13103 \begin_layout Plain Layout
13105 \change_inserted 1414654397 1360434794
13118 \begin_layout Description
13119 \begin_inset Flex Code
13122 \begin_layout Plain Layout
13124 \change_deleted 1414654397 1360434641
13126 \change_inserted 1414654397 1360434643
13135 \begin_inset space ~
13139 \begin_inset space ~
13143 \begin_inset Flex Code
13146 \begin_layout Plain Layout
13148 \change_deleted 1414654397 1360434649
13156 are special cases of
13157 \begin_inset Flex Code
13160 \begin_layout Plain Layout
13167 The label will be printed above the paragraph
13168 \change_inserted 1414654397 1360434839
13169 either at the beginning of the line or centered
13170 \change_deleted 1414654397 1360434813
13171 , but only at the top of an environment or the top of a chain of paragraphs
13173 This might be used with the
13174 \begin_inset Flex MenuItem
13177 \begin_layout Plain Layout
13188 \begin_layout Description
13189 \begin_inset Flex Code
13192 \begin_layout Plain Layout
13198 is a special case for the caption-labels
13199 \begin_inset Quotes eld
13203 \begin_inset Quotes erd
13207 \begin_inset Quotes eld
13211 \begin_inset Quotes erd
13215 \begin_inset Newline newline
13219 \begin_inset Flex Code
13222 \begin_layout Plain Layout
13228 means the (hardcoded) label string depends on the kind of float: It is
13229 hardcoded to be `FloatType N', where N is the value of the counter associated
13231 For the case that a caption is inserted outside of a float
13232 \change_inserted 1414654397 1360434861
13236 \begin_inset Flex Code
13239 \begin_layout Plain Layout
13246 \change_inserted 1414654397 1360434866
13248 \change_deleted 1414654397 1360434868
13249 should be set to e.
13250 \begin_inset space \thinspace{}
13254 \begin_inset space \space{}
13260 \begin_inset Quotes eld
13264 \begin_inset Quotes erd
13270 \begin_layout Description
13272 \change_deleted 1414654397 1360434875
13273 \begin_inset Flex Code
13276 \begin_layout Plain Layout
13282 defines automatically numbered labels.
13284 \begin_inset Flex Code
13287 \begin_layout Plain Layout
13293 will be expanded to contain any counters: So the result will for example
13295 \begin_inset Quotes eld
13299 \begin_inset Flex Code
13302 \begin_layout Plain Layout
13313 \begin_inset Quotes erd
13318 \begin_inset space ~
13322 \begin_inset CommandInset ref
13324 reference "sub:Counters"
13328 for more information on counters.
13331 \begin_layout Description
13332 \begin_inset Flex Code
13335 \begin_layout Plain Layout
13341 produces the usual sort of enumeration labels.
13342 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13343 small Roman numerals, and uppercase letters for the four possible depths.
13346 \begin_layout Description
13347 \begin_inset Flex Code
13350 \begin_layout Plain Layout
13356 produces various bullets at the different levels.
13357 It is also hardcoded.
13360 \begin_layout Description
13361 \begin_inset Flex Code
13364 \begin_layout Plain Layout
13371 \change_deleted 1414654397 1360434898
13372 is used internally by LyX and
13374 should be used only with
13375 \begin_inset Flex Code
13378 \begin_layout Plain Layout
13379 LatexType BibEnvironment
13388 \begin_layout Description
13389 \begin_inset Flex Code
13392 \begin_layout Plain Layout
13398 Note that this will completely override any prior
13399 \begin_inset Flex Code
13402 \begin_layout Plain Layout
13408 declaration for this style.
13410 \begin_inset Quotes eld
13414 \begin_inset Flex Code
13417 \begin_layout Plain Layout
13424 \begin_inset Quotes erd
13429 \begin_inset CommandInset ref
13431 reference "sub:I18n"
13435 for details on its use.
13438 \begin_layout Description
13439 \begin_inset Flex Code
13442 \begin_layout Plain Layout
13449 \begin_inset Flex Code
13452 \begin_layout Plain Layout
13458 ] The name of the corresponding LaTeX stuff.
13459 Either the environment or command name.
13462 \begin_layout Description
13463 \begin_inset Flex Code
13466 \begin_layout Plain Layout
13473 \begin_inset Flex Code
13476 \begin_layout Plain Layout
13482 ] An optional parameter for the corresponding
13483 \begin_inset Flex Code
13486 \begin_layout Plain Layout
13493 This parameter cannot be changed from within LyX
13494 \change_inserted -712698321 1355144804
13496 \begin_inset Flex Code
13499 \begin_layout Plain Layout
13501 \change_inserted -712698321 1355144804
13507 for customizable parameters)
13511 \change_inserted -712698321 1355144804
13512 This will be output as is after all LaTeX
13513 \begin_inset Flex Code
13516 \begin_layout Plain Layout
13518 \change_inserted -712698321 1355144658
13531 \begin_layout Description
13532 \begin_inset Flex Code
13535 \begin_layout Plain Layout
13542 \begin_inset Flex Code
13545 \begin_layout Plain Layout
13550 , Command, Environment, Item_Environment,
13551 \begin_inset Newline newline
13554 List_Environment, Bib_Environment
13559 ] How the style should be translated into LaTeX.
13563 \begin_layout Plain Layout
13564 \begin_inset Flex Code
13567 \begin_layout Plain Layout
13573 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13574 Visit the SGML class files for specific examples.
13583 \begin_layout Description
13584 \begin_inset Flex Code
13587 \begin_layout Plain Layout
13593 means nothing special.
13596 \begin_layout Description
13597 \begin_inset Flex Code
13600 \begin_layout Plain Layout
13607 \begin_inset Flex Code
13610 \begin_layout Plain Layout
13617 {\SpecialChar \ldots{}
13626 \begin_layout Description
13627 \begin_inset Flex Code
13630 \begin_layout Plain Layout
13637 \begin_inset Flex Code
13640 \begin_layout Plain Layout
13647 }\SpecialChar \ldots{}
13663 \begin_layout Description
13664 \begin_inset Flex Code
13667 \begin_layout Plain Layout
13674 \begin_inset Flex Code
13677 \begin_layout Plain Layout
13684 \begin_inset Flex Code
13687 \begin_layout Plain Layout
13695 is generated for each paragraph of this environment.
13699 \begin_layout Description
13700 \begin_inset Flex Code
13703 \begin_layout Plain Layout
13710 \begin_inset Flex Code
13713 \begin_layout Plain Layout
13720 \begin_inset Newline newline
13724 \begin_inset Flex Code
13727 \begin_layout Plain Layout
13733 is passed as an argument to the environment.
13734 \begin_inset Newline newline
13738 \begin_inset Flex Code
13741 \begin_layout Plain Layout
13747 can be defined in the
13748 \begin_inset Flex MenuItem
13751 \begin_layout Plain Layout
13752 Edit\SpecialChar \menuseparator
13754 \begin_inset space ~
13765 \begin_layout Description
13766 \begin_inset Flex Code
13769 \begin_layout Plain Layout
13776 \begin_inset Flex Code
13779 \begin_layout Plain Layout
13785 but adds additionally the necessary mandatory argument (the longest label)
13786 to the begin statement of the bibliography environment:
13787 \begin_inset Newline newline
13791 \begin_inset Flex Code
13794 \begin_layout Plain Layout
13797 begin{thebibliography}{99}
13802 It is therefore only useful for bibliography environments.
13803 The default longest label
13804 \begin_inset Quotes eld
13808 \begin_inset Quotes erd
13811 can be changed by the user in the paragraph settings of a bibliography
13815 \begin_layout Standard
13816 Putting the last few things together, the LaTeX output will be either:
13819 \begin_layout LyX-Code
13822 LatexName[LatexParam]{\SpecialChar \ldots{}
13826 \begin_layout Standard
13830 \begin_layout LyX-Code
13833 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13839 \begin_layout Standard
13840 depending upon the LaTeX type.
13844 \begin_layout Description
13846 \change_inserted -712698321 1354263086
13847 \begin_inset Flex Code
13850 \begin_layout Plain Layout
13852 \change_inserted -712698321 1353866852
13859 \begin_inset Flex Code
13862 \begin_layout Plain Layout
13864 \change_inserted -712698321 1353866852
13870 ] A string that is put at the beginning of the style content.
13871 A line break in the output can be indicated by
13872 \begin_inset Flex Code
13875 \begin_layout Plain Layout
13877 \change_inserted -712698321 1354263086
13888 \begin_layout Description
13889 \begin_inset Flex Code
13892 \begin_layout Plain Layout
13899 \begin_inset Flex Code
13902 \begin_layout Plain Layout
13908 ] If you put styles into environments, the different
13909 \begin_inset Flex Code
13912 \begin_layout Plain Layout
13918 are not simply added, but added with a factor
13919 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13923 Note that this parameter is also used when
13924 \begin_inset Flex Code
13927 \begin_layout Plain Layout
13934 \begin_inset Flex Code
13937 \begin_layout Plain Layout
13944 \begin_inset Flex Code
13947 \begin_layout Plain Layout
13954 Then it is added to the manual or dynamic margin.
13955 \begin_inset Newline newline
13959 \begin_inset Quotes eld
13963 \begin_inset Flex Code
13966 \begin_layout Plain Layout
13973 \begin_inset Quotes erd
13976 means that the paragraph is indented with the width of
13977 \begin_inset Quotes eld
13981 \begin_inset Flex Code
13984 \begin_layout Plain Layout
13991 \begin_inset Quotes erd
13994 in the normal font.
13995 You can get a negative width by prefixing the string with
13996 \begin_inset Quotes eld
14000 \begin_inset Flex Code
14003 \begin_layout Plain Layout
14010 \begin_inset Quotes erd
14014 This way was chosen so that the look is the same with each used screen
14018 \begin_layout Description
14019 \begin_inset Flex Code
14022 \begin_layout Plain Layout
14029 \begin_inset Flex Code
14032 \begin_layout Plain Layout
14037 , Manual, Dynamic, First_Dynamic, Right_Address_Box
14043 \begin_inset Newline newline
14046 The kind of margin that the style has on the left side.
14050 \begin_layout Description
14051 \begin_inset Flex Code
14054 \begin_layout Plain Layout
14060 just means a fixed margin.
14063 \begin_layout Description
14064 \begin_inset Flex Code
14067 \begin_layout Plain Layout
14073 means that the left margin depends on the string entered in the
14074 \begin_inset Flex MenuItem
14077 \begin_layout Plain Layout
14078 Edit\SpecialChar \menuseparator
14080 \begin_inset space ~
14089 This is used to typeset nice lists without tabulators.
14092 \begin_layout Description
14093 \begin_inset Flex Code
14096 \begin_layout Plain Layout
14102 means that the margin depends on the size of the label.
14103 This is used for automatic enumerated headlines.
14104 It is obvious that the headline
14105 \begin_inset Quotes eld
14108 5.4.3.2.1 Very long headline
14109 \begin_inset Quotes erd
14112 must have a wider left margin (as wide as
14113 \begin_inset Quotes eld
14117 \begin_inset Quotes erd
14120 plus the space) than
14121 \begin_inset Quotes eld
14124 3.2 Very long headline
14125 \begin_inset Quotes erd
14129 \begin_inset Quotes eld
14133 \begin_inset Quotes erd
14136 are not able to do this.
14139 \begin_layout Description
14140 \begin_inset Flex Code
14143 \begin_layout Plain Layout
14149 is similar, but only the very first row of the paragraph is dynamic, while
14150 the others are static; this is used, for example, for descriptions.
14153 \begin_layout Description
14154 \begin_inset Flex Code
14157 \begin_layout Plain Layout
14163 means the margin is chosen in a way that the longest row of this paragraph
14164 fits to the right margin.
14165 This is used to typeset an address on the right edge of the page.
14169 \begin_layout Description
14170 \begin_inset Flex Code
14173 \begin_layout Plain Layout
14180 \begin_inset Flex Code
14183 \begin_layout Plain Layout
14192 \begin_inset space \thinspace{}
14196 \begin_inset Flex Code
14199 \begin_layout Plain Layout
14205 ] Whether fragile commands in this style should be
14206 \begin_inset Flex Code
14209 \begin_layout Plain Layout
14222 whether this command should itself be protected.)
14225 \begin_layout Description
14226 \begin_inset Flex Code
14229 \begin_layout Plain Layout
14236 \begin_inset Flex Code
14239 \begin_layout Plain Layout
14246 \begin_inset space \thinspace{}
14250 \begin_inset Flex Code
14253 \begin_layout Plain Layout
14261 ] Whether newlines are translated into LaTeX newlines (
14262 \begin_inset Flex Code
14265 \begin_layout Plain Layout
14276 The translation can be switched off to allow more comfortable LaTeX editing
14280 \begin_layout Description
14281 \begin_inset Flex Code
14284 \begin_layout Plain Layout
14291 \begin_inset Flex Code
14294 \begin_layout Plain Layout
14303 \begin_inset space \thinspace{}
14307 \begin_inset Flex Code
14310 \begin_layout Plain Layout
14316 ] If set to true, and if
14317 \begin_inset Flex Code
14320 \begin_layout Plain Layout
14327 \begin_inset Flex Code
14330 \begin_layout Plain Layout
14336 ) paragraphs are being indented, then the indentation of such a paragraph
14337 following one of this type will be suppressed.
14338 (So this will not affect the display of non-default paragraphs.)
14341 \begin_layout Description
14342 \begin_inset Flex Code
14345 \begin_layout Plain Layout
14352 \begin_inset Flex Code
14355 \begin_layout Plain Layout
14361 ] Name of a style that has replaced this style.
14362 This is used to rename a style, while keeping backward compatibility.
14365 \begin_layout Description
14367 \change_deleted -712698321 1353679722
14368 \begin_inset Flex Code
14371 \begin_layout Plain Layout
14378 \begin_inset Flex Code
14381 \begin_layout Plain Layout
14387 ] The number of optional arguments that can be used with this style.
14388 This is useful for things like section headings, and only makes sense with
14390 Note that, on output, the optional arguments will all precede any required
14391 arguments (see below).
14392 So one can have constructs like:
14396 \begin_layout LyX-Code
14398 \change_deleted -712698321 1353679722
14401 mycmd[opt1]{req1}{contents of paragraph}
14404 \begin_layout Standard
14406 \change_deleted -712698321 1353679722
14407 but one cannot have things like:
14410 \begin_layout LyX-Code
14412 \change_deleted -712698321 1353679722
14415 mycmd[opt1]{req1}[opt2]{contents of paragraph}
14418 \begin_layout Standard
14420 \change_deleted -712698321 1353679722
14421 at least, not without ERT (with which you can have anything).
14428 \begin_layout Description
14429 \begin_inset Flex Code
14432 \begin_layout Plain Layout
14439 \begin_inset Flex Code
14442 \begin_layout Plain Layout
14451 \begin_inset space \thinspace{}
14455 \begin_inset Flex Code
14458 \begin_layout Plain Layout
14464 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
14465 output, but only by a line break; together with
14466 \begin_inset Flex Code
14469 \begin_layout Plain Layout
14475 , this allows to emulate a plain text editor (like the ERT inset).
14478 \begin_layout Description
14479 \begin_inset Flex Code
14482 \begin_layout Plain Layout
14489 \begin_inset Flex Code
14492 \begin_layout Plain Layout
14498 ] The indent of the very first line of a paragraph.
14500 \begin_inset Newline newline
14504 \begin_inset Flex Code
14507 \begin_layout Plain Layout
14513 will be fixed for a certain style.
14514 The exception is the default style, since the indentation for these paragraphs
14515 can be prohibited with
14516 \begin_inset Flex Code
14519 \begin_layout Plain Layout
14527 \begin_inset Flex Code
14530 \begin_layout Plain Layout
14536 style paragraphs inside environments use the
14537 \begin_inset Flex Code
14540 \begin_layout Plain Layout
14546 of the environment, not their native one.
14548 \begin_inset Flex Code
14551 \begin_layout Plain Layout
14557 paragraphs inside an enumeration are not indented.
14560 \begin_layout Description
14561 \begin_inset Flex Code
14564 \begin_layout Plain Layout
14571 \begin_inset Flex Code
14574 \begin_layout Plain Layout
14580 ] The vertical space between two paragraphs of this style.
14583 \begin_layout Description
14584 \begin_inset Flex Code
14587 \begin_layout Plain Layout
14594 \begin_inset Flex Code
14597 \begin_layout Plain Layout
14603 ] LyX allows the user to choose either
14604 \begin_inset Quotes eld
14608 \begin_inset Quotes erd
14612 \begin_inset Quotes eld
14616 \begin_inset Quotes erd
14619 to separate paragraphs.
14621 \begin_inset Quotes eld
14625 \begin_inset Quotes erd
14629 \begin_inset Flex Code
14632 \begin_layout Plain Layout
14640 \begin_inset Quotes eld
14644 \begin_inset Quotes erd
14648 \begin_inset Flex Code
14651 \begin_layout Plain Layout
14657 is ignored and all paragraphs are separated by the
14658 \begin_inset Flex Code
14661 \begin_layout Plain Layout
14668 The vertical space is calculated with
14669 \begin_inset Flex Code
14672 \begin_layout Plain Layout
14674 \begin_inset space ~
14683 \begin_inset Flex Code
14686 \begin_layout Plain Layout
14692 is the height of a row with the normal font.
14693 This way, the look stays the same with different screen fonts.
14696 \begin_layout Description
14697 \begin_inset Flex Code
14700 \begin_layout Plain Layout
14707 \begin_inset Flex Code
14710 \begin_layout Plain Layout
14719 \begin_inset space \thinspace{}
14723 \begin_inset Flex Code
14726 \begin_layout Plain Layout
14732 ] Whether the contents of this paragraph should be output in raw form, meaning
14733 without special translations that LaTeX would require.
14736 \begin_layout Description
14737 \begin_inset Flex Code
14740 \begin_layout Plain Layout
14746 Information to be included in the LaTeX preamble when this style is used.
14747 Used to define macros, load packages, etc., required by this particular
14750 \begin_inset Quotes eld
14754 \begin_inset Flex Code
14757 \begin_layout Plain Layout
14764 \begin_inset Quotes erd
14770 \begin_layout Description
14771 \begin_inset Flex Code
14774 \begin_layout Plain Layout
14781 \begin_inset Flex Code
14784 \begin_layout Plain Layout
14790 ] The prefix to use when creating labels referring to paragraphs of this
14792 This allows the use of formatted references.
14795 \begin_layout Description
14797 \change_deleted -712698321 1353681258
14798 \begin_inset Flex Code
14801 \begin_layout Plain Layout
14808 \begin_inset Flex Code
14811 \begin_layout Plain Layout
14817 ] The number of required arguments that the LaTeX command or environment
14818 corresponding to this style expects.
14819 In the case of a command, these are required arguments
14823 that associated with the content of the paragraph itself.
14824 These do not actually have to be provided: LyX will output empty arguments
14826 Note that optional arguments will be output before required arguments.
14827 See the discussion of the
14828 \begin_inset Flex Code
14831 \begin_layout Plain Layout
14837 tag above for more information.
14842 \begin_layout Description
14843 \begin_inset Flex Code
14846 \begin_layout Plain Layout
14853 \begin_inset Flex Code
14856 \begin_layout Plain Layout
14862 ] Whether the style requires the feature
14863 \begin_inset Flex Code
14866 \begin_layout Plain Layout
14873 See the description of
14874 \begin_inset Flex Code
14877 \begin_layout Plain Layout
14884 \begin_inset space ~
14888 \begin_inset CommandInset ref
14890 reference "sub:General-text-class"
14894 ) for information on `features'.
14897 \begin_layout Description
14899 \change_inserted -712698321 1353693371
14900 \begin_inset Flex Code
14903 \begin_layout Plain Layout
14905 \change_inserted -712698321 1353693146
14914 \begin_inset Flex Code
14917 \begin_layout Plain Layout
14919 \change_inserted -712698321 1353693235
14928 \begin_inset Flex Code
14931 \begin_layout Plain Layout
14933 \change_inserted -712698321 1353693235
14939 ] Resets the LaTeX arguments of this style (as defined via the
14940 \begin_inset Flex Code
14943 \begin_layout Plain Layout
14945 \change_inserted -712698321 1353693371
14954 This is useful if you have copied a style via
14955 \begin_inset Flex Code
14958 \begin_layout Plain Layout
14960 \change_inserted -712698321 1353693302
14968 , but you do not want to inherit its (required and optional) arguments.
14973 \begin_layout Description
14975 \change_inserted -712698321 1354263074
14976 \begin_inset Flex Code
14979 \begin_layout Plain Layout
14981 \change_inserted -712698321 1353866876
14988 \begin_inset Flex Code
14991 \begin_layout Plain Layout
14993 \change_inserted -712698321 1353866873
14999 ] A string that is put at the end of the layout content.
15000 A line break in the output can be indicated by
15001 \begin_inset Flex Code
15004 \begin_layout Plain Layout
15006 \change_inserted -712698321 1354263069
15017 \begin_layout Description
15018 \begin_inset Flex Code
15021 \begin_layout Plain Layout
15028 \begin_inset Flex Code
15031 \begin_layout Plain Layout
15038 \begin_inset Flex Code
15041 \begin_layout Plain Layout
15050 \begin_layout Description
15051 \begin_inset Flex Code
15054 \begin_layout Plain Layout
15061 \begin_inset Flex Code
15064 \begin_layout Plain Layout
15073 \begin_inset Flex Code
15076 \begin_layout Plain Layout
15083 \begin_inset Flex Code
15086 \begin_layout Plain Layout
15093 \begin_inset Flex Code
15096 \begin_layout Plain Layout
15098 \begin_inset space ~
15106 ] This defines what the default spacing should be in the style.
15108 \begin_inset Flex Code
15111 \begin_layout Plain Layout
15118 \begin_inset Flex Code
15121 \begin_layout Plain Layout
15128 \begin_inset Flex Code
15131 \begin_layout Plain Layout
15137 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
15138 If you specify the argument
15139 \begin_inset Flex Code
15142 \begin_layout Plain Layout
15148 , then you must also provide a value argument which will be the actual multiplie
15150 Note that, contrary to other parameters,
15151 \begin_inset Flex Code
15154 \begin_layout Plain Layout
15160 implies the generation of specific LaTeX code, using the LaTeX package
15164 \begin_inset Flex Code
15167 \begin_layout Plain Layout
15176 \begin_layout Description
15177 \begin_inset Flex Code
15180 \begin_layout Plain Layout
15187 \begin_inset Flex Code
15190 \begin_layout Plain Layout
15197 \begin_inset space \thinspace{}
15201 \begin_inset Flex Code
15204 \begin_layout Plain Layout
15212 ] Allow spell-checking paragraphs of this style.
15216 \begin_layout Description
15217 \begin_inset Flex Code
15220 \begin_layout Plain Layout
15226 The font used for the text body .
15228 \begin_inset CommandInset ref
15230 reference "sub:Font-description"
15237 \begin_layout Description
15238 \begin_inset Flex Code
15241 \begin_layout Plain Layout
15250 \begin_inset Flex Code
15253 \begin_layout Plain Layout
15263 The level of the style in the table of contents.
15264 This is used for automatic numbering of section headings.
15267 \begin_layout Description
15268 \begin_inset Flex Code
15271 \begin_layout Plain Layout
15278 \begin_inset Flex Code
15281 \begin_layout Plain Layout
15287 ] The vertical space with which the very first of a chain of paragraphs
15288 with this style is separated from the previous paragraph.
15289 If the previous paragraph has another style, the separations are not simply
15290 added, but the maximum is taken.
15293 \begin_layout Subsection
15294 \begin_inset CommandInset label
15300 Internationalization of Paragraph Styles
15303 \begin_layout Standard
15304 LyX has long supported internationalization of layout information, but,
15305 until version 2.0, this applied only to the user interface and not to, say,
15307 Thus, French authors were forced to resort to ugly hacks if they wanted
15312 1' instead of `Theorem 1'.
15313 Thanks to Georg Baum, that is no longer the case.
15316 \begin_layout Standard
15318 \begin_inset Flex Code
15321 \begin_layout Plain Layout
15327 defines text that is to appear in the typeset document, it may use
15328 \begin_inset Flex Code
15331 \begin_layout Plain Layout
15338 \begin_inset Flex Code
15341 \begin_layout Plain Layout
15347 to support non-English and even multi-language documents correctly.
15348 The following excerpt (from the
15349 \begin_inset Flex Code
15352 \begin_layout Plain Layout
15358 file) shows how this works:
15361 \begin_layout LyX-Code
15366 \begin_layout LyX-Code
15369 theoremstyle{remark}
15372 \begin_layout LyX-Code
15375 newtheorem{claim}[thm]{
15382 \begin_layout LyX-Code
15386 \begin_layout LyX-Code
15390 \begin_layout LyX-Code
15395 claimname}{_(Claim)}
15398 \begin_layout LyX-Code
15402 \begin_layout LyX-Code
15406 \begin_layout LyX-Code
15415 claimname}{_(Claim)}}
15418 \begin_layout LyX-Code
15423 \begin_layout Standard
15424 In principle, any legal LaTeX may appear in the
15425 \begin_inset Flex Code
15428 \begin_layout Plain Layout
15435 \begin_inset Flex Code
15438 \begin_layout Plain Layout
15444 tags, but in practice they will typically look as they do here.
15445 The key to correct translation of the typeset text is the definition of
15447 \begin_inset Flex Code
15450 \begin_layout Plain Layout
15459 \begin_inset Flex Code
15462 \begin_layout Plain Layout
15474 \begin_layout Standard
15476 \begin_inset Flex Code
15479 \begin_layout Plain Layout
15485 tag provides for internationalization based upon the overall language of
15487 The contents of the tag will be included in the preamble, just as with
15489 \begin_inset Flex Code
15492 \begin_layout Plain Layout
15499 What makes it special is the use of the
15500 \begin_inset Quotes eld
15504 \begin_inset Quotes erd
15508 \begin_inset Flex Code
15511 \begin_layout Plain Layout
15517 , which will be replaced, when LyX produces LaTeX output, with the translation
15518 of its argument into the document language.
15521 \begin_layout Standard
15523 \begin_inset Flex Code
15526 \begin_layout Plain Layout
15532 tag is more complex, since it is meant to provide support for multi-language
15533 documents and so offers an interface to the
15534 \begin_inset Flex Code
15537 \begin_layout Plain Layout
15544 Its contents will be added to the preamble once for each language that
15545 appears in the document.
15546 In this case, the argument to
15547 \begin_inset Flex Code
15550 \begin_layout Plain Layout
15556 will be replaced with its translation into the language in question; the
15558 \begin_inset Flex Code
15561 \begin_layout Plain Layout
15567 is replaced by the language name (as used by the babel package).
15570 \begin_layout Standard
15571 A German document that also included a French section would thus have the
15572 following in the preamble:
15575 \begin_layout LyX-Code
15584 claimname}{Affirmation}}
15585 \begin_inset Newline newline
15596 claimname}{Behauptung}}
15597 \begin_inset Newline newline
15604 claimname}{Behauptung}
15607 \begin_layout Standard
15609 \begin_inset Flex Code
15612 \begin_layout Plain Layout
15618 will then conspire to produce the correct text in the output.
15621 \begin_layout Standard
15622 One important point to note here is that the translations are provided by
15623 LyX itself, through the
15624 \change_inserted -195340706 1334775793
15626 \begin_inset Flex Code
15629 \begin_layout Plain Layout
15631 \change_inserted -195340706 1334775793
15638 \change_deleted -195340706 1334775793
15639 same mechanism it uses for internationalization of the user interface
15642 This means, in effect, that
15643 \begin_inset Flex Code
15646 \begin_layout Plain Layout
15653 \begin_inset Flex Code
15656 \begin_layout Plain Layout
15662 are really only of use in layout files that are provided with LyX, since
15663 text entered in user-created layout files will not be seen by LyX's internation
15665 \change_inserted -195340706 1334775793
15667 \begin_inset Flex Code
15670 \begin_layout Plain Layout
15672 \change_inserted -195340706 1334775793
15678 file is modified accordingly
15681 That said, however, any layout created with the intention that it will
15682 be included with LyX should use these tags where appropriate.
15684 \change_inserted -195340706 1334775793
15685 Please note that the paragraph style translations provided by LyX will
15686 never change with a minor update (e.g.
15687 from version 2.1.x to 2.1.y).
15688 It is however quite likely that a major update (e.g.
15689 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15694 \begin_layout Subsection
15696 \begin_inset CommandInset label
15705 \begin_layout Standard
15706 It is necessary to define the floats (
15707 \begin_inset Flex MenuItem
15710 \begin_layout Plain Layout
15717 \begin_inset Flex MenuItem
15720 \begin_layout Plain Layout
15726 , \SpecialChar \ldots{}
15727 ) in the text class itself.
15728 Standard floats are included in the file
15729 \begin_inset Flex Code
15732 \begin_layout Plain Layout
15738 , so you may have to do no more than add
15741 \begin_layout LyX-Code
15742 Input stdfloats.inc
15745 \begin_layout Standard
15746 to your layout file.
15747 If you want to implement a text class that proposes some other float types
15748 (like the AGU class bundled with LyX), the information below will hopefully
15752 \begin_layout Description
15753 \begin_inset Flex Code
15756 \begin_layout Plain Layout
15763 \begin_inset Flex Code
15766 \begin_layout Plain Layout
15773 \begin_inset Quotes erd
15777 \begin_inset Quotes erd
15780 ] The file name extension of an auxiliary file for the list of figures (or
15782 LaTeX writes the captions to this file.
15785 \begin_layout Description
15786 \begin_inset Flex Code
15789 \begin_layout Plain Layout
15796 \begin_inset Flex Code
15799 \begin_layout Plain Layout
15806 \begin_inset Quotes erd
15810 \begin_inset Quotes erd
15813 ] The string that will be used in the menus and also for the caption.
15814 This is translated to the current language if babel is used.
15817 \begin_layout Description
15818 \begin_inset Flex Code
15821 \begin_layout Plain Layout
15827 These tags control the XHTML output.
15829 \begin_inset space ~
15833 \begin_inset CommandInset ref
15835 reference "sec:Tags-for-XHTML"
15842 \begin_layout Description
15843 \begin_inset Flex Code
15846 \begin_layout Plain Layout
15855 \begin_inset Flex Code
15858 \begin_layout Plain Layout
15867 \begin_inset space \thinspace{}
15871 \begin_inset Flex Code
15874 \begin_layout Plain Layout
15880 ] Indicates whether the float is already defined in the document class or
15881 if instead the LaTeX package
15882 \begin_inset Flex Code
15885 \begin_layout Plain Layout
15891 needs to be loaded to define it on-the-fly.
15893 \begin_inset Flex Code
15896 \begin_layout Plain Layout
15903 \begin_inset Flex Code
15906 \begin_layout Plain Layout
15913 It should be set to
15914 \begin_inset Flex Code
15917 \begin_layout Plain Layout
15923 if the float is already defined by the LaTeX document class.
15926 \begin_layout Description
15927 \begin_inset Flex Code
15930 \begin_layout Plain Layout
15937 \begin_inset Flex Code
15940 \begin_layout Plain Layout
15947 \begin_inset Quotes erd
15951 \begin_inset Quotes erd
15954 ] The command used to generate a list of floats of this type; the leading
15963 \begin_inset Flex Code
15966 \begin_layout Plain Layout
15972 is false, since there is no standard way to generate this command.
15974 \begin_inset Flex Code
15977 \begin_layout Plain Layout
15983 is true, since in that case there is a standard way to define the command.
15986 \begin_layout Description
15987 \begin_inset Flex Code
15990 \begin_layout Plain Layout
15997 \begin_inset Flex Code
16000 \begin_layout Plain Layout
16007 \begin_inset Quotes erd
16011 \begin_inset Quotes erd
16014 ] A title for a list of floats of this kind (list of figures, tables, or
16016 It is used for the screen label within LyX, it is used by LaTeX for the
16017 title and it is used as the title in the XHTML output.
16018 It will be translated to the document language.
16021 \begin_layout Description
16022 \begin_inset Flex Code
16025 \begin_layout Plain Layout
16032 \begin_inset Flex Code
16035 \begin_layout Plain Layout
16042 \begin_inset Quotes erd
16046 \begin_inset Quotes erd
16049 ] This (optional) argument determines whether floats of this class will
16050 be numbered within some sectional unit of the document.
16052 \begin_inset Flex Code
16055 \begin_layout Plain Layout
16062 \begin_inset Quotes eld
16066 \begin_inset Flex Code
16069 \begin_layout Plain Layout
16076 \begin_inset Quotes erd
16079 , the floats will be numbered within chapters.
16083 \begin_layout Description
16084 \begin_inset Flex Code
16087 \begin_layout Plain Layout
16094 \begin_inset Flex Code
16097 \begin_layout Plain Layout
16104 \begin_inset Quotes erd
16108 \begin_inset Quotes erd
16111 ] The default placement for the given class of floats.
16112 The string should be as in standard LaTeX:
16113 \begin_inset Flex Code
16116 \begin_layout Plain Layout
16123 \begin_inset Flex Code
16126 \begin_layout Plain Layout
16133 \begin_inset Flex Code
16136 \begin_layout Plain Layout
16143 \begin_inset Flex Code
16146 \begin_layout Plain Layout
16152 for top, bottom, page, and here, respectively.
16156 \begin_layout Plain Layout
16157 Note that the order of these letters in the string is irrelevant, like in
16163 On top of that there is a new type,
16164 \begin_inset Flex Code
16167 \begin_layout Plain Layout
16173 , which does not really correspond to a float, since it means: put it
16174 \begin_inset Quotes eld
16178 \begin_inset Quotes erd
16182 Note however that the
16183 \begin_inset Flex Code
16186 \begin_layout Plain Layout
16192 specifier is special and, because of implementation details, cannot be
16193 used in non-built in float types.
16194 If you do not understand what this means, just use
16195 \begin_inset Quotes eld
16199 \begin_inset Flex Code
16202 \begin_layout Plain Layout
16209 \begin_inset Quotes erd
16215 \begin_layout Description
16216 \begin_inset Flex Code
16219 \begin_layout Plain Layout
16226 \begin_inset Flex Code
16229 \begin_layout Plain Layout
16235 ] The prefix to use when creating labels referring to floats of this type.
16236 This allows the use of formatted references.
16237 Note that you can remove any
16238 \begin_inset Flex Code
16241 \begin_layout Plain Layout
16247 set by a copied style by using the special value
16248 \begin_inset Quotes eld
16252 \begin_inset Quotes erd
16255 , which must be all caps.
16258 \begin_layout Description
16259 \begin_inset Flex Code
16262 \begin_layout Plain Layout
16269 \begin_inset Flex Code
16272 \begin_layout Plain Layout
16279 \begin_inset Quotes erd
16283 \begin_inset Quotes erd
16286 ] The style used when defining the float using
16287 \begin_inset Flex Code
16290 \begin_layout Plain Layout
16301 \begin_layout Description
16302 \begin_inset Flex Code
16305 \begin_layout Plain Layout
16312 \begin_inset Flex Code
16315 \begin_layout Plain Layout
16322 \begin_inset Quotes erd
16326 \begin_inset Quotes erd
16330 \begin_inset Quotes eld
16334 \begin_inset Quotes erd
16337 of the new class of floats, like program or algorithm.
16338 After the appropriate
16339 \begin_inset Flex Code
16342 \begin_layout Plain Layout
16351 \begin_inset Flex Code
16354 \begin_layout Plain Layout
16363 \begin_inset Flex Code
16366 \begin_layout Plain Layout
16377 \begin_layout Description
16378 \begin_inset Flex Code
16381 \begin_layout Plain Layout
16388 \begin_inset Flex Code
16391 \begin_layout Plain Layout
16398 \begin_inset space \thinspace{}
16402 \begin_inset Flex Code
16405 \begin_layout Plain Layout
16413 ] Specifies whether this float is defined using the LaTeX package
16414 \begin_inset Flex Code
16417 \begin_layout Plain Layout
16423 , either by the class file, another package or on-the-fly by LyX itself.
16426 \begin_layout Standard
16427 Note that defining a float with type
16428 \begin_inset Flex Code
16431 \begin_layout Plain Layout
16439 automatically defines the corresponding counter with name
16440 \begin_inset Flex Code
16443 \begin_layout Plain Layout
16454 \begin_layout Subsection
16455 Flex insets and InsetLayout
16456 \begin_inset CommandInset label
16458 name "sub:Flex-insets-and"
16465 \begin_layout Standard
16466 Flex insets come in three different kinds:
16469 \begin_layout Itemize
16471 \begin_inset Flex Code
16474 \begin_layout Plain Layout
16480 ): These define semantic markup corresponding to such LaTeX commands as
16482 \begin_inset Flex Code
16485 \begin_layout Plain Layout
16494 \begin_inset Flex Code
16497 \begin_layout Plain Layout
16508 \begin_layout Itemize
16510 \begin_inset Flex Code
16513 \begin_layout Plain Layout
16519 ): These can be used to define custom collapsible insets, similar to TeX
16520 code, footnote, and the like.
16521 An obvious example is an endnote inset, which is defined in the
16522 \begin_inset Flex Code
16525 \begin_layout Plain Layout
16534 \begin_layout Itemize
16536 \begin_inset Flex Code
16539 \begin_layout Plain Layout
16545 ): For use with DocBook classes.
16548 \begin_layout Standard
16549 Flex insets are defined using the
16550 \begin_inset Flex Code
16553 \begin_layout Plain Layout
16559 tag, which shall be explained in a moment.
16562 \begin_layout Standard
16564 \begin_inset Flex Code
16567 \begin_layout Plain Layout
16573 tag also serves another function: It can be used to customize the general
16574 layout of many different types of insets.
16576 \begin_inset Flex Code
16579 \begin_layout Plain Layout
16585 can be used to customize the layout parameters for footnotes, marginal
16586 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16587 boxes, tables, algorithms, URLs, and
16588 \change_deleted -712698321 1356964515
16590 \change_inserted -712698321 1356964516
16593 s, as well as to define Flex insets.
16596 \begin_layout Standard
16598 \begin_inset Flex Code
16601 \begin_layout Plain Layout
16607 definition must begin with a line of the form:
16610 \begin_layout LyX-Code
16614 \begin_layout Standard
16616 \begin_inset Flex Code
16619 \begin_layout Plain Layout
16625 indicates the inset whose layout is being defined, and here there are
16626 \change_deleted -712698321 1356964888
16628 \change_inserted -712698321 1356964888
16630 \change_deleted 5863208 1334489267
16636 \begin_layout Enumerate
16637 The layout for a pre-existing inset is being modified.
16638 In this case, can be
16639 \begin_inset Flex Code
16642 \begin_layout Plain Layout
16648 any one of the following:
16649 \begin_inset Flex Code
16652 \begin_layout Plain Layout
16659 \begin_inset Flex Code
16662 \begin_layout Plain Layout
16669 \begin_inset Flex Code
16672 \begin_layout Plain Layout
16679 \begin_inset Flex Code
16682 \begin_layout Plain Layout
16689 \change_inserted -712698321 1356964563
16691 \begin_inset Flex Code
16694 \begin_layout Plain Layout
16696 \change_inserted -712698321 1356964560
16707 \begin_inset Flex Code
16710 \begin_layout Plain Layout
16717 \begin_inset Flex Code
16720 \begin_layout Plain Layout
16727 \begin_inset Flex Code
16730 \begin_layout Plain Layout
16737 \begin_inset Flex Code
16740 \begin_layout Plain Layout
16747 \begin_inset Flex Code
16750 \begin_layout Plain Layout
16757 \begin_inset Flex Code
16760 \begin_layout Plain Layout
16767 \begin_inset Flex Code
16770 \begin_layout Plain Layout
16777 \begin_inset Flex Code
16780 \begin_layout Plain Layout
16787 \begin_inset Flex Code
16790 \begin_layout Plain Layout
16797 \begin_inset Flex Code
16800 \begin_layout Plain Layout
16807 \begin_inset Flex Code
16810 \begin_layout Plain Layout
16817 \begin_inset Flex Code
16820 \begin_layout Plain Layout
16827 \begin_inset Flex Code
16830 \begin_layout Plain Layout
16837 \change_deleted -712698321 1356964592
16839 \begin_inset Flex Code
16842 \begin_layout Plain Layout
16844 \change_deleted -712698321 1353866704
16848 \change_inserted -712698321 1353866707
16859 \begin_inset Flex Code
16862 \begin_layout Plain Layout
16869 \begin_inset Flex Code
16872 \begin_layout Plain Layout
16881 \begin_layout Enumerate
16882 The layout for a Flex inset is being defined.
16884 \begin_inset Flex Code
16887 \begin_layout Plain Layout
16893 must be of the form
16894 \begin_inset Quotes eld
16898 \begin_inset Flex Code
16901 \begin_layout Plain Layout
16908 \begin_inset Quotes erd
16912 \begin_inset Flex Code
16915 \begin_layout Plain Layout
16921 may be be any valid identifier not used by a pre-existing Flex inset.
16922 The identifier may include spaces, but in that case the whole thing must
16923 be wrapped in quotes.
16924 Note that the definition of a flex inset
16929 \begin_inset Flex Code
16932 \begin_layout Plain Layout
16938 entry, declaring which type of inset it defines.
16939 \change_inserted 5863208 1334489312
16943 \begin_layout Enumerate
16945 \change_inserted 5863208 1334492248
16946 The layout for user specific branch is being defined.
16948 \begin_inset Flex Code
16951 \begin_layout Plain Layout
16953 \change_inserted 5863208 1334489384
16959 must be of the form
16960 \begin_inset Quotes eld
16964 \begin_inset Flex Code
16967 \begin_layout Plain Layout
16969 \change_inserted 5863208 1334489392
16976 \begin_inset Quotes erd
16980 \begin_inset Flex Code
16983 \begin_layout Plain Layout
16985 \change_inserted 5863208 1334489384
16991 may be be any valid identifier of branch defined in user's document.
16992 The identifier may include spaces, but in that case the whole thing must
16993 be wrapped in quotes.
16994 The main purpose of this feature is to allow LaTeX wrapping around specific
16995 branches as user needs.
16996 \change_inserted -712698321 1356964893
17000 \begin_layout Enumerate
17002 \change_inserted -712698321 1356965125
17003 The layout of a user (or class) specific caption is being defined.
17005 \begin_inset Flex Code
17008 \begin_layout Plain Layout
17010 \change_inserted -712698321 1356964939
17016 must be of the form
17017 \begin_inset Quotes eld
17021 \begin_inset Flex Code
17024 \begin_layout Plain Layout
17026 \change_inserted -712698321 1356964943
17033 \begin_inset Quotes erd
17037 \begin_inset Flex Code
17040 \begin_layout Plain Layout
17042 \change_inserted -712698321 1356964939
17048 specifies the name of the caption as it appears in the menu.
17049 Have a look at the standard caption (
17050 \begin_inset Flex Code
17053 \begin_layout Plain Layout
17055 \change_inserted -712698321 1356964987
17061 ), the specific captions of the KOMA-Script classes (
17062 \begin_inset Flex Code
17065 \begin_layout Plain Layout
17067 \change_inserted -712698321 1356965018
17074 \begin_inset Flex Code
17077 \begin_layout Plain Layout
17079 \change_inserted -712698321 1356965021
17090 \begin_inset Flex Code
17093 \begin_layout Plain Layout
17095 \change_inserted -712698321 1356965045
17101 ) for applications.
17106 \begin_layout Standard
17108 \begin_inset Flex Code
17111 \begin_layout Plain Layout
17117 definition can contain the following entries:
17120 \begin_layout Description
17122 \change_inserted -712698321 1353681390
17123 \begin_inset Flex Code
17126 \begin_layout Plain Layout
17128 \change_inserted -712698321 1353681344
17135 \begin_inset Flex Code
17138 \begin_layout Plain Layout
17140 \change_inserted -712698321 1353681344
17146 ] Defines argument number <int> of a command\SpecialChar \slash{}
17147 environment associated with
17148 the current layout.
17149 The definition must end with
17150 \begin_inset Flex Code
17153 \begin_layout Plain Layout
17155 \change_inserted -712698321 1353681344
17163 \begin_inset space ~
17167 \begin_inset CommandInset ref
17169 reference "sub:Paragraph-Styles"
17176 \begin_layout Description
17178 \change_inserted -195340706 1333913893
17179 \begin_inset Flex Code
17182 \begin_layout Plain Layout
17188 Preamble for changing languages.
17190 \begin_inset space ~
17194 \begin_inset CommandInset ref
17196 reference "sub:I18n"
17203 \begin_layout Description
17204 \begin_inset Flex Code
17207 \begin_layout Plain Layout
17214 \begin_inset Flex Code
17217 \begin_layout Plain Layout
17223 ] The color for the inset's background.
17225 \begin_inset space ~
17229 \begin_inset CommandInset ref
17231 reference "chap:Names-of-colors"
17235 for a list of the available color names.
17238 \begin_layout Description
17239 \begin_inset Flex Code
17242 \begin_layout Plain Layout
17249 \begin_inset Flex Code
17252 \begin_layout Plain Layout
17261 \begin_inset space \thinspace{}
17265 \begin_inset Flex Code
17268 \begin_layout Plain Layout
17274 ] Whether to use the content of the inset as the label, when the inset is
17279 \begin_layout Description
17280 \begin_inset Flex Code
17283 \begin_layout Plain Layout
17290 \begin_inset Flex Code
17293 \begin_layout Plain Layout
17299 ] As with paragraph styles, see sec.
17300 \begin_inset space ~
17304 \begin_inset CommandInset ref
17306 reference "sub:Paragraph-Styles"
17311 Note that you need to specify the complete type, e.
17312 \begin_inset space \thinspace{}
17316 \begin_inset space ~
17320 \begin_inset Flex Code
17323 \begin_layout Plain Layout
17324 CopyStyle Flex:<name>
17332 \begin_layout Description
17333 \begin_inset Flex Code
17336 \begin_layout Plain Layout
17343 \begin_inset Flex Code
17346 \begin_layout Plain Layout
17355 \begin_inset space \thinspace{}
17359 \begin_inset Flex Code
17362 \begin_layout Plain Layout
17368 ] Indicates whether the user may employ the Paragraph Settings dialog to
17369 customize the paragraph.
17372 \begin_layout Description
17373 \begin_inset Flex Code
17376 \begin_layout Plain Layout
17383 \begin_inset Flex Code
17386 \begin_layout Plain Layout
17393 \begin_inset Flex Code
17396 \begin_layout Plain Layout
17403 \begin_inset Flex Code
17406 \begin_layout Plain Layout
17412 , describing the rendering style used for the inset's frame and buttons.
17413 Footnotes generally use
17414 \begin_inset Flex Code
17417 \begin_layout Plain Layout
17423 , ERT insets generally
17424 \begin_inset Flex Code
17427 \begin_layout Plain Layout
17433 , and character styles
17434 \begin_inset Flex Code
17437 \begin_layout Plain Layout
17446 \begin_layout Description
17447 \begin_inset Flex Code
17450 \begin_layout Plain Layout
17457 \begin_inset Flex Code
17460 \begin_layout Plain Layout
17469 \begin_inset space \thinspace{}
17475 \begin_inset Flex Code
17478 \begin_layout Plain Layout
17487 \begin_inset Flex Code
17490 \begin_layout Plain Layout
17497 \begin_inset Flex Code
17500 \begin_layout Plain Layout
17507 Indicates whether the environment will stand on its own in the output or
17508 will appear inline with the surrounding text.
17509 If set to false, it is supposed that the LaTeX environment ignores white
17510 space (including one newline character) after the
17511 \begin_inset Flex Code
17514 \begin_layout Plain Layout
17527 \begin_inset Flex Code
17530 \begin_layout Plain Layout
17546 \begin_layout Description
17547 \begin_inset Flex Code
17550 \begin_layout Plain Layout
17556 Required at the end of the
17557 \begin_inset Flex Code
17560 \begin_layout Plain Layout
17569 \begin_layout Description
17570 \begin_inset Flex Code
17573 \begin_layout Plain Layout
17579 The font used for both the text body
17585 \begin_inset space ~
17589 \begin_inset CommandInset ref
17591 reference "sub:Font-description"
17596 Note that defining this font automatically defines the
17597 \begin_inset Flex Code
17600 \begin_layout Plain Layout
17606 to the same value, so define this first and define
17607 \begin_inset Flex Code
17610 \begin_layout Plain Layout
17616 later if you want them to be different.
17617 \change_inserted 155139281 1354130923
17621 \begin_layout Description
17623 \change_inserted 155139281 1354130923
17624 \begin_inset Flex Code
17627 \begin_layout Plain Layout
17629 \change_inserted 155139281 1354130923
17630 ForceLocalFontSwitch
17636 \begin_inset Flex Code
17639 \begin_layout Plain Layout
17641 \change_inserted 155139281 1354130923
17650 \begin_inset Flex Code
17653 \begin_layout Plain Layout
17655 \change_inserted 155139281 1354130923
17661 ] When using babel, always use a local font switch (
17662 \begin_inset Flex Code
17665 \begin_layout Plain Layout
17667 \change_inserted 155139281 1354130923
17675 ), never a global one (such as
17676 \begin_inset Flex Code
17679 \begin_layout Plain Layout
17681 \change_inserted 155139281 1354130923
17694 \begin_layout Description
17695 \begin_inset Flex Code
17698 \begin_layout Plain Layout
17705 \begin_inset Flex Code
17708 \begin_layout Plain Layout
17717 \begin_inset space \thinspace{}
17721 \begin_inset Flex Code
17724 \begin_layout Plain Layout
17731 \begin_inset Quotes eld
17735 \begin_inset Quotes erd
17738 language, leading to Left-to-Right (Latin) output, e.
17739 \begin_inset space \thinspace{}
17743 \begin_inset space \space{}
17746 in TeX code or URL.
17750 \begin_layout Description
17751 \begin_inset Flex Code
17754 \begin_layout Plain Layout
17761 \begin_inset Flex Code
17764 \begin_layout Plain Layout
17773 \begin_inset space \thinspace{}
17777 \begin_inset Flex Code
17780 \begin_layout Plain Layout
17786 ] Indicates whether the
17787 \begin_inset Flex Code
17790 \begin_layout Plain Layout
17796 should be used or, instead, the user can change the paragraph style used
17801 \begin_layout Description
17802 \begin_inset Flex Code
17805 \begin_layout Plain Layout
17812 \begin_inset Flex Code
17815 \begin_layout Plain Layout
17824 \begin_inset space \thinspace{}
17828 \begin_inset Flex Code
17831 \begin_layout Plain Layout
17837 ] As with paragraph styles, see sec.
17838 \begin_inset space ~
17842 \begin_inset CommandInset ref
17844 reference "sub:Paragraph-Styles"
17851 \begin_layout Description
17852 \begin_inset Flex Code
17855 \begin_layout Plain Layout
17861 These tags control the XHTML output.
17863 \begin_inset space ~
17867 \begin_inset CommandInset ref
17869 reference "sec:Tags-for-XHTML"
17876 \begin_layout Description
17877 \begin_inset Flex Code
17880 \begin_layout Plain Layout
17887 \begin_inset Flex Code
17890 \begin_layout Plain Layout
17899 \begin_inset space \thinspace{}
17903 \begin_inset Flex Code
17906 \begin_layout Plain Layout
17912 ] Whether to include the contents of this inset in the strings generated
17913 for the `Outline' pane.
17914 One would not, for example, want the content of a footnote in a section
17915 header to be included in the TOC displayed in the outline, but one would
17916 normally want the content of a character style displayed.
17917 Default is false: not to include.
17920 \begin_layout Description
17921 \begin_inset Flex Code
17924 \begin_layout Plain Layout
17933 \begin_inset Flex Code
17936 \begin_layout Plain Layout
17945 \begin_inset space \thinspace{}
17949 \begin_inset Flex Code
17952 \begin_layout Plain Layout
17958 ] As with paragraph styles, see sec.
17959 \begin_inset space ~
17963 \begin_inset CommandInset ref
17965 reference "sub:Paragraph-Styles"
17972 \begin_layout Description
17973 \begin_inset Flex Code
17976 \begin_layout Plain Layout
17982 The font used for the label.
17984 \begin_inset space ~
17988 \begin_inset CommandInset ref
17990 reference "sub:Font-description"
17995 Note that this definition can never appear before
17996 \begin_inset Flex Code
17999 \begin_layout Plain Layout
18005 , lest it be ineffective.
18008 \begin_layout Description
18009 \begin_inset Flex Code
18012 \begin_layout Plain Layout
18019 \begin_inset Flex Code
18022 \begin_layout Plain Layout
18029 \begin_inset Quotes erd
18033 \begin_inset Quotes erd
18036 ] What will be displayed on the button or elsewhere as the inset label.
18038 \begin_inset Flex Code
18041 \begin_layout Plain Layout
18048 \begin_inset Flex Code
18051 \begin_layout Plain Layout
18057 ) modify this label on the fly.
18060 \begin_layout Description
18062 \change_inserted -195340706 1333913893
18063 \begin_inset Flex Code
18066 \begin_layout Plain Layout
18072 Language dependent preamble.
18074 \begin_inset space ~
18078 \begin_inset CommandInset ref
18080 reference "sub:I18n"
18087 \begin_layout Description
18088 \begin_inset Flex Code
18091 \begin_layout Plain Layout
18098 \begin_inset Flex Code
18101 \begin_layout Plain Layout
18107 ] The name of the corresponding LaTeX stuff.
18108 Either the environment or command name.
18111 \begin_layout Description
18112 \begin_inset Flex Code
18115 \begin_layout Plain Layout
18122 \begin_inset Flex Code
18125 \begin_layout Plain Layout
18131 ] The optional parameter for the corresponding
18132 \begin_inset Flex Code
18135 \begin_layout Plain Layout
18141 stuff, including possible bracket pairs like
18142 \begin_inset Flex Code
18145 \begin_layout Plain Layout
18153 \change_inserted -712698321 1355144715
18154 This will be output as is after all LaTeX
18155 \begin_inset Flex Code
18158 \begin_layout Plain Layout
18160 \change_inserted -712698321 1355144713
18169 This parameter cannot be changed from within LyX
18170 \change_inserted -712698321 1355144775
18172 \begin_inset Flex Code
18175 \begin_layout Plain Layout
18177 \change_inserted -712698321 1355144747
18183 for customizable parameters)
18188 \begin_layout Description
18189 \begin_inset Flex Code
18192 \begin_layout Plain Layout
18199 \begin_inset Flex Code
18202 \begin_layout Plain Layout
18204 \change_deleted -712698321 1353867544
18211 Command, Environment,
18212 \change_inserted -712698321 1353867573
18214 \change_deleted -712698321 1353867557
18223 \begin_inset Flex Code
18226 \begin_layout Plain Layout
18228 \change_deleted -712698321 1353867564
18232 \change_deleted -712698321 1353867569
18240 ] How the style should be translated into LaTeX.
18244 \begin_layout Plain Layout
18245 \begin_inset Flex Code
18248 \begin_layout Plain Layout
18254 is perhaps a bit misleading, since these rules apply to SGML classes, too.
18255 Visit the SGML class files for specific examples.
18264 \begin_layout Description
18265 \begin_inset Flex Code
18268 \begin_layout Plain Layout
18270 \change_deleted -712698321 1353867582
18272 \change_inserted -712698321 1353867583
18280 means nothing special.
18284 \begin_layout Description
18285 \begin_inset Flex Code
18288 \begin_layout Plain Layout
18295 \begin_inset Flex Code
18298 \begin_layout Plain Layout
18305 {\SpecialChar \ldots{}
18314 \begin_layout Description
18315 \begin_inset Flex Code
18318 \begin_layout Plain Layout
18325 \begin_inset Flex Code
18328 \begin_layout Plain Layout
18335 }\SpecialChar \ldots{}
18351 \begin_layout Description
18353 \change_deleted -712698321 1353867600
18354 \begin_inset Flex Code
18357 \begin_layout Plain Layout
18364 \begin_inset Flex Code
18367 \begin_layout Plain Layout
18374 \begin_inset Flex Code
18377 \begin_layout Plain Layout
18385 is generated for each paragraph of this environment.
18389 \begin_layout Description
18391 \change_deleted -712698321 1353867600
18392 \begin_inset Flex Code
18395 \begin_layout Plain Layout
18402 \begin_inset Flex Code
18405 \begin_layout Plain Layout
18412 \begin_inset Flex Code
18415 \begin_layout Plain Layout
18421 is passed as an argument to the environment.
18423 \begin_inset Flex Code
18426 \begin_layout Plain Layout
18432 can be defined in the
18433 \begin_inset Flex MenuItem
18436 \begin_layout Plain Layout
18441 \SpecialChar \menuseparator
18447 \begin_inset space ~
18461 \begin_layout Standard
18462 Putting the last few things together, the LaTeX output will be either:
18465 \begin_layout LyX-Code
18469 \change_deleted 2090807402 1356919073
18471 \change_inserted 2090807402 1356919073
18475 \change_deleted 2090807402 1356919073
18477 \change_inserted 2090807402 1356919002
18480 ]{\SpecialChar \ldots{}
18484 \begin_layout Standard
18488 \begin_layout LyX-Code
18492 \change_deleted 2090807402 1356919013
18494 \change_inserted 2090807402 1356919014
18498 \change_deleted 2090807402 1356919013
18500 \change_inserted 2090807402 1356919008
18503 ] \SpecialChar \ldots{}
18507 \change_deleted 2090807402 1356919016
18509 \change_inserted 2090807402 1356919016
18515 \begin_layout Standard
18516 depending upon the LaTeX type.
18520 \begin_layout Description
18522 \change_inserted -712698321 1354263128
18523 \begin_inset Flex Code
18526 \begin_layout Plain Layout
18528 \change_inserted -712698321 1353866742
18537 \begin_inset Flex Code
18540 \begin_layout Plain Layout
18542 \change_inserted -712698321 1353866752
18548 ] A string that is put at the beginning of the layout content.
18549 A line break in the output can be indicated by
18550 \begin_inset Flex Code
18553 \begin_layout Plain Layout
18555 \change_inserted -712698321 1354263128
18566 \begin_layout Description
18567 \begin_inset Flex Code
18570 \begin_layout Plain Layout
18577 \begin_inset Flex Code
18580 \begin_layout Plain Layout
18587 \begin_inset Flex Code
18590 \begin_layout Plain Layout
18597 \begin_inset Flex Code
18600 \begin_layout Plain Layout
18607 \begin_inset Flex Code
18610 \begin_layout Plain Layout
18616 (indicating a dummy definition ending definitions of charstyles, etc).
18617 This entry is required in and is only meaningful for Flex insets.
18618 Among other things, it determines on which menu this inset will appear.
18620 \begin_inset Flex Code
18623 \begin_layout Plain Layout
18630 \begin_inset Flex Code
18633 \begin_layout Plain Layout
18639 will automatically set
18640 \begin_inset Flex Code
18643 \begin_layout Plain Layout
18651 \begin_inset Flex Code
18654 \begin_layout Plain Layout
18660 can be set to true for
18661 \begin_inset Flex Code
18664 \begin_layout Plain Layout
18670 insets by setting it
18675 \begin_inset Flex Code
18678 \begin_layout Plain Layout
18687 \begin_layout Description
18688 \begin_inset Flex Code
18691 \begin_layout Plain Layout
18698 \begin_inset Flex Code
18701 \begin_layout Plain Layout
18710 \begin_inset space \thinspace{}
18714 \begin_inset Flex Code
18717 \begin_layout Plain Layout
18723 ] Whether multiple paragraphs are permitted in this inset.
18725 \begin_inset Flex Code
18728 \begin_layout Plain Layout
18734 to the same value and
18735 \begin_inset Flex Code
18738 \begin_layout Plain Layout
18744 to the opposite value.
18745 These can be reset to other values, if they are used
18750 \begin_inset Flex Code
18753 \begin_layout Plain Layout
18763 \begin_layout Description
18764 \begin_inset Flex Code
18767 \begin_layout Plain Layout
18774 \begin_inset Flex Code
18777 \begin_layout Plain Layout
18786 \begin_inset space \thinspace{}
18790 \begin_inset Flex Code
18793 \begin_layout Plain Layout
18799 ] Whether fragile commands in this inset should be
18800 \begin_inset Flex Code
18803 \begin_layout Plain Layout
18816 whether the command should itself be protected.) Default is false.
18817 \change_inserted 1414654397 1360681873
18821 \begin_layout Description
18823 \change_inserted 1414654397 1360681892
18824 \begin_inset Flex Code
18827 \begin_layout Plain Layout
18829 \change_inserted 1414654397 1360681880
18836 \begin_inset Flex Code
18839 \begin_layout Plain Layout
18841 \change_inserted 1414654397 1360681883
18847 ] Deletes an existing
18848 \begin_inset Flex Code
18851 \begin_layout Plain Layout
18853 \change_inserted 1414654397 1360681892
18864 \begin_layout Description
18865 \begin_inset Flex Code
18868 \begin_layout Plain Layout
18875 \begin_inset Flex Code
18878 \begin_layout Plain Layout
18887 \begin_inset space \thinspace{}
18891 \begin_inset Flex Code
18894 \begin_layout Plain Layout
18900 ] As with paragraph styles, see sec.
18901 \begin_inset space ~
18905 \begin_inset CommandInset ref
18907 reference "sub:Paragraph-Styles"
18915 \begin_layout Description
18916 \begin_inset Flex Code
18919 \begin_layout Plain Layout
18926 \begin_inset Flex Code
18929 \begin_layout Plain Layout
18938 \begin_inset space \thinspace{}
18942 \begin_inset Flex Code
18945 \begin_layout Plain Layout
18951 ] As with paragraph styles, see sec.
18952 \begin_inset space ~
18956 \begin_inset CommandInset ref
18958 reference "sub:Paragraph-Styles"
18966 \begin_layout Description
18967 \begin_inset Flex Code
18970 \begin_layout Plain Layout
18976 As with paragraph styles, see sec.
18977 \begin_inset space ~
18981 \begin_inset CommandInset ref
18983 reference "sub:Paragraph-Styles"
18990 \begin_layout Description
18991 \begin_inset Flex Code
18994 \begin_layout Plain Layout
19001 \begin_inset Flex Code
19004 \begin_layout Plain Layout
19010 ] The prefix to use when creating labels referring to insets of this type.
19011 This allows the use of formatted references.
19014 \begin_layout Description
19015 \begin_inset Flex Code
19018 \begin_layout Plain Layout
19025 \begin_inset Flex Code
19028 \begin_layout Plain Layout
19034 ] As with paragraph styles, see sec.
19035 \begin_inset space ~
19039 \begin_inset CommandInset ref
19041 reference "sub:Paragraph-Styles"
19046 \change_inserted -712698321 1354439699
19050 \begin_layout Description
19052 \change_inserted -712698321 1354439705
19053 \begin_inset Flex Code
19056 \begin_layout Plain Layout
19058 \change_inserted -712698321 1354439699
19065 \begin_inset Flex Code
19068 \begin_layout Plain Layout
19070 \change_inserted -712698321 1354439699
19079 \begin_inset Flex Code
19082 \begin_layout Plain Layout
19084 \change_inserted -712698321 1354439699
19090 ] Resets the LaTeX arguments of this layout (as defined via the
19091 \begin_inset Flex Code
19094 \begin_layout Plain Layout
19096 \change_inserted -712698321 1354439699
19103 This is useful if you have copied a style via
19104 \begin_inset Flex Code
19107 \begin_layout Plain Layout
19109 \change_inserted -712698321 1354439699
19115 , but you do not want to inherit its (required and optional) arguments.
19117 \change_deleted -712698321 1354439698
19123 \begin_layout Description
19124 \begin_inset Flex Code
19127 \begin_layout Plain Layout
19134 \begin_inset Flex Code
19137 \begin_layout Plain Layout
19144 \begin_inset space \thinspace{}
19148 \begin_inset Flex Code
19151 \begin_layout Plain Layout
19159 ] Whether this inset should use the font of its surrounding environment
19161 Default is true: uses its own.
19164 \begin_layout Description
19166 \change_inserted -712698321 1354263134
19167 \begin_inset Flex Code
19170 \begin_layout Plain Layout
19172 \change_inserted -712698321 1353866810
19179 \begin_inset Flex Code
19182 \begin_layout Plain Layout
19184 \change_inserted -712698321 1353866806
19190 ] A string that is put at the end of the layout content.
19191 A line break in the output can be indicated by
19192 \begin_inset Flex Code
19195 \begin_layout Plain Layout
19197 \change_inserted -712698321 1354263134
19208 \begin_layout Description
19209 \begin_inset Flex Code
19212 \begin_layout Plain Layout
19219 \begin_inset Flex Code
19222 \begin_layout Plain Layout
19229 \begin_inset space \thinspace{}
19233 \begin_inset Flex Code
19236 \begin_layout Plain Layout
19244 ] Allow spell-checking the contents of this inset.
19248 \begin_layout Subsection
19250 \begin_inset CommandInset label
19252 name "sub:Counters"
19259 \begin_layout Standard
19260 It is necessary to define the counters (
19261 \begin_inset Flex MenuItem
19264 \begin_layout Plain Layout
19271 \begin_inset Flex MenuItem
19274 \begin_layout Plain Layout
19280 , \SpecialChar \ldots{}
19281 ) in the text class itself.
19282 The standard counters are defined in the file
19283 \begin_inset Flex Code
19286 \begin_layout Plain Layout
19292 , so you may have to do no more than add
19295 \begin_layout LyX-Code
19296 Input stdcounters.inc
19299 \begin_layout Standard
19300 to your layout file to get them to work.
19301 But if you want to define custom counters, then you can do so.
19302 The counter declaration must begin with:
19305 \begin_layout LyX-Code
19306 Counter CounterName
19309 \begin_layout Standard
19311 \begin_inset Flex Code
19314 \begin_layout Plain Layout
19320 ' is replaced by the name of the counter.
19321 And it must end with
19322 \begin_inset Quotes eld
19326 \begin_inset Flex Code
19329 \begin_layout Plain Layout
19336 \begin_inset Quotes erd
19340 The following parameters can also be used:
19343 \begin_layout Description
19344 \begin_inset Flex Code
19347 \begin_layout Plain Layout
19354 \begin_inset Flex Code
19357 \begin_layout Plain Layout
19364 \begin_inset Quotes erd
19368 \begin_inset Quotes erd
19371 ] When defined, this string defines how the counter is displayed.
19372 Setting this value sets
19373 \begin_inset Flex Code
19376 \begin_layout Plain Layout
19377 LabelStringAppendix
19383 The following special constructs can be used in the string:
19387 \begin_layout Itemize
19388 \begin_inset Flex Code
19391 \begin_layout Plain Layout
19399 will be replaced by the expansion of the
19400 \begin_inset Flex Code
19403 \begin_layout Plain Layout
19410 \begin_inset Flex Code
19413 \begin_layout Plain Layout
19414 LabelStringAppendix
19420 \begin_inset Flex Code
19423 \begin_layout Plain Layout
19433 \begin_layout Itemize
19434 counter values can be expressed using LaTeX-like macros
19435 \begin_inset Newline newline
19439 \begin_inset Flex Code
19442 \begin_layout Plain Layout
19459 \begin_inset Flex Code
19462 \begin_layout Plain Layout
19474 \begin_layout Plain Layout
19484 Actually, the situation is a bit more complicated: any
19503 other than those described below will produce arabic numerals.
19504 It would not be surprising to see this change in the future.
19510 \begin_inset Flex Code
19513 \begin_layout Plain Layout
19519 : 1, 2, 3,\SpecialChar \ldots{}
19521 \begin_inset Flex Code
19524 \begin_layout Plain Layout
19530 for lower-case letters: a, b, c, \SpecialChar \ldots{}
19532 \begin_inset Flex Code
19535 \begin_layout Plain Layout
19541 for upper-case letters: A, B, C, \SpecialChar \ldots{}
19543 \begin_inset Flex Code
19546 \begin_layout Plain Layout
19552 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
19554 \begin_inset Flex Code
19557 \begin_layout Plain Layout
19563 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
19565 \begin_inset Flex Code
19568 \begin_layout Plain Layout
19574 for hebrew numerals.
19578 \begin_layout Standard
19579 If LabelString is not defined, a default value is constructed as follows:
19580 if the counter has a master counter
19581 \begin_inset Flex Code
19584 \begin_layout Plain Layout
19591 \begin_inset Flex Code
19594 \begin_layout Plain Layout
19601 \begin_inset Newline newline
19605 \begin_inset Flex Code
19608 \begin_layout Plain Layout
19618 is used; otherwise the string
19619 \begin_inset Flex Code
19622 \begin_layout Plain Layout
19633 \begin_layout Description
19634 \begin_inset Flex Code
19637 \begin_layout Plain Layout
19638 LabelStringAppendix
19644 \begin_inset Flex Code
19647 \begin_layout Plain Layout
19654 \begin_inset Quotes erd
19658 \begin_inset Quotes erd
19662 \begin_inset Flex Code
19665 \begin_layout Plain Layout
19671 , but for use in the Appendix.
19674 \begin_layout Description
19675 \begin_inset Flex Code
19678 \begin_layout Plain Layout
19685 \begin_inset Flex Code
19688 \begin_layout Plain Layout
19695 \begin_inset Quotes erd
19699 \begin_inset Quotes erd
19702 ] A format for use with formatted references to this counter.
19703 For example, one might want to have references to section numbers appear
19705 \begin_inset Quotes eld
19709 \begin_inset Quotes erd
19713 The string should contain
19714 \begin_inset Quotes eld
19718 \begin_inset Quotes erd
19722 This will be replaced by the counter number itself.
19723 So, for sections, it would be: Section ##.
19726 \begin_layout Description
19727 \begin_inset Flex Code
19730 \begin_layout Plain Layout
19737 \begin_inset Flex Code
19740 \begin_layout Plain Layout
19747 \begin_inset Quotes erd
19751 \begin_inset Quotes erd
19754 ] If this is set to the name of another counter, the present counter will
19755 be reset every time the other one is increased.
19757 \begin_inset Flex Code
19760 \begin_layout Plain Layout
19767 \begin_inset Flex Code
19770 \begin_layout Plain Layout
19779 \begin_layout Subsection
19781 \begin_inset CommandInset label
19783 name "sub:Font-description"
19790 \begin_layout Standard
19791 A font description looks like this:
19794 \begin_layout LyX-Code
19808 \begin_layout LyX-Code
19812 \begin_layout LyX-Code
19816 \begin_layout Standard
19817 The following commands are available:
19820 \begin_layout Description
19821 \begin_inset Flex Code
19824 \begin_layout Plain Layout
19831 \begin_inset Flex Code
19834 \begin_layout Plain Layout
19843 \begin_inset Flex Code
19846 \begin_layout Plain Layout
19853 \begin_inset Flex Code
19856 \begin_layout Plain Layout
19863 \begin_inset Flex Code
19866 \begin_layout Plain Layout
19873 \begin_inset Flex Code
19876 \begin_layout Plain Layout
19883 \begin_inset Flex Code
19886 \begin_layout Plain Layout
19893 \begin_inset Flex Code
19896 \begin_layout Plain Layout
19903 \begin_inset Flex Code
19906 \begin_layout Plain Layout
19913 \begin_inset Flex Code
19916 \begin_layout Plain Layout
19925 \begin_layout Description
19926 \begin_inset Flex Code
19929 \begin_layout Plain Layout
19936 \begin_inset Flex Code
19939 \begin_layout Plain Layout
19948 \begin_inset Flex Code
19951 \begin_layout Plain Layout
19958 \begin_inset Flex Code
19961 \begin_layout Plain Layout
19970 \begin_layout Description
19971 \begin_inset Flex Code
19974 \begin_layout Plain Layout
19981 \begin_inset Flex Code
19984 \begin_layout Plain Layout
19990 ] Valid arguments are:
19991 \begin_inset Flex Code
19994 \begin_layout Plain Layout
20001 \begin_inset Flex Code
20004 \begin_layout Plain Layout
20011 \begin_inset Flex Code
20014 \begin_layout Plain Layout
20021 \begin_inset Flex Code
20024 \begin_layout Plain Layout
20031 \begin_inset Flex Code
20034 \begin_layout Plain Layout
20041 \begin_inset Flex Code
20044 \begin_layout Plain Layout
20051 \begin_inset Flex Code
20054 \begin_layout Plain Layout
20061 \begin_inset Flex Code
20064 \begin_layout Plain Layout
20071 \begin_inset Flex Code
20074 \begin_layout Plain Layout
20081 \begin_inset Flex Code
20084 \begin_layout Plain Layout
20091 \begin_inset Flex Code
20094 \begin_layout Plain Layout
20101 \begin_inset Flex Code
20104 \begin_layout Plain Layout
20111 Each of these turns on or off the corresponding attribute.
20113 \begin_inset Flex Code
20116 \begin_layout Plain Layout
20122 turns on emphasis, and
20123 \begin_inset Flex Code
20126 \begin_layout Plain Layout
20134 \begin_inset Newline newline
20137 If the latter seems puzzling, remember that the font settings for the present
20138 context are generally inherited from the surrounding context.
20140 \begin_inset Flex Code
20143 \begin_layout Plain Layout
20149 would turn off the emphasis that was anyway in effect, say, in a theorem
20153 \begin_layout Description
20154 \begin_inset Flex Code
20157 \begin_layout Plain Layout
20164 \begin_inset Flex Code
20167 \begin_layout Plain Layout
20176 \begin_inset Flex Code
20179 \begin_layout Plain Layout
20188 \begin_layout Description
20189 \begin_inset Flex Code
20192 \begin_layout Plain Layout
20199 \begin_inset Flex Code
20202 \begin_layout Plain Layout
20211 \begin_inset Flex Code
20214 \begin_layout Plain Layout
20221 \begin_inset Flex Code
20224 \begin_layout Plain Layout
20231 \begin_inset Flex Code
20234 \begin_layout Plain Layout
20243 \begin_layout Description
20244 \begin_inset Flex Code
20247 \begin_layout Plain Layout
20254 \begin_inset Flex Code
20257 \begin_layout Plain Layout
20264 \begin_inset Flex Code
20267 \begin_layout Plain Layout
20274 \begin_inset Flex Code
20277 \begin_layout Plain Layout
20286 \begin_inset Flex Code
20289 \begin_layout Plain Layout
20296 \begin_inset Flex Code
20299 \begin_layout Plain Layout
20306 \begin_inset Flex Code
20309 \begin_layout Plain Layout
20316 \begin_inset Flex Code
20319 \begin_layout Plain Layout
20326 \begin_inset Flex Code
20329 \begin_layout Plain Layout
20338 \begin_layout Subsection
20339 \begin_inset CommandInset label
20341 name "sub:Citation-format-description"
20345 Citation format description
20348 \begin_layout Standard
20350 \begin_inset Flex Code
20353 \begin_layout Plain Layout
20359 blocks are used to describe how bibliographic information should be displayed,
20360 both within LyX itself (in the citation dialog and in tooltips, for example)
20361 and in XHTML output.
20362 Such a block might look like this:
20365 \begin_layout LyX-Code
20369 \begin_layout LyX-Code
20373 \begin_layout LyX-Code
20377 \begin_layout LyX-Code
20381 \begin_layout Standard
20382 The individual lines define how the bibliographic information associated
20383 with an article or book, respectively, is to be displayed, and such a definitio
20384 n can be given for any `entry type' that might be present in a BibTeX file.
20385 LyX defines a default format in the source code that will be used if no
20386 specific definition has been given.
20387 LyX predefines several formats in the file
20388 \begin_inset Flex Code
20391 \begin_layout Plain Layout
20397 , which is included in most of LyX's document classes.
20400 \begin_layout Standard
20401 The definitions use a simple language that allows BibTeX keys to be replaced
20403 Keys should be enclosed in
20404 \begin_inset Flex Code
20407 \begin_layout Plain Layout
20414 \begin_inset Flex Code
20417 \begin_layout Plain Layout
20424 So a simple definition might look like this:
20427 \begin_layout LyX-Code
20429 \begin_inset Quotes eld
20433 \begin_inset Quotes erd
20439 \begin_layout Standard
20440 This would print the author, followed by a comma, followed by the title,
20441 in quotes, followed by a period.
20444 \begin_layout Standard
20445 Of course, sometimes you may want to print a key only if it exists.
20446 This can be done by using a conditional construction, such as:
20447 \begin_inset Flex Code
20450 \begin_layout Plain Layout
20452 \begin_inset space ~
20462 \begin_inset Flex Code
20465 \begin_layout Plain Layout
20471 key exists, then print
20472 \begin_inset Quotes eld
20476 \begin_inset space ~
20480 \begin_inset Quotes erd
20483 followed by the volume key.
20484 It is also possible to have an else clause in the conditional, such as:
20485 \begin_inset Newline newline
20489 \begin_inset Flex Code
20492 \begin_layout Plain Layout
20493 {%author%[[%author%]][[%editor%, ed.]]}
20499 \begin_inset Newline newline
20503 \begin_inset Flex Code
20506 \begin_layout Plain Layout
20512 key is printed if it exists; otherwise, the editor key is printed, followed
20514 \begin_inset Quotes eld
20518 \begin_inset space ~
20522 \begin_inset Quotes erd
20525 Note that the key is again enclosed in
20526 \begin_inset Flex Code
20529 \begin_layout Plain Layout
20535 signs; the entire conditional is enclosed in braces; and the if and else
20536 clauses are enclosed in double brackets,
20537 \begin_inset Quotes eld
20541 \begin_inset Flex Code
20544 \begin_layout Plain Layout
20551 \begin_inset Quotes eld
20555 \begin_inset Quotes eld
20559 \begin_inset Flex Code
20562 \begin_layout Plain Layout
20569 \begin_inset Quotes erd
20573 There must be no space between any of these.
20576 \begin_layout Standard
20577 There is one other piece of syntax available in definitions, which looks
20579 \begin_inset Flex Code
20582 \begin_layout Plain Layout
20589 This defines a piece of formatting information that is to be used when
20591 \begin_inset Quotes eld
20595 \begin_inset Quotes erd
20599 Obviously, we do not want to output HTML tags when writing plain text,
20600 so they should be wrapped in
20601 \begin_inset Quotes eld
20605 \begin_inset Quotes erd
20609 \begin_inset Quotes eld
20613 \begin_inset Quotes erd
20619 \begin_layout Standard
20620 Two special sorts of definitions are also possible in a
20621 \begin_inset Flex Code
20624 \begin_layout Plain Layout
20631 An example of the first would be:
20634 \begin_layout LyX-Code
20636 \begin_inset Quotes eld
20640 \begin_inset Quotes erd
20646 \begin_layout Standard
20647 This is an abbreviation, or macro, and it can be used by treating it as
20649 \begin_inset Flex Code
20652 \begin_layout Plain Layout
20660 \begin_inset Flex Code
20663 \begin_layout Plain Layout
20669 exactly as it would treat its definition.
20670 So, let us issue the obvious
20678 \begin_layout LyX-Code
20682 \begin_layout Standard
20683 or anything like it.
20684 LyX shouldn't go into an infinite loop, but it may go into a long one before
20688 \begin_layout Standard
20689 The second sort of special definition might look like this:
20692 \begin_layout LyX-Code
20696 \begin_layout Standard
20697 This defines a translatable piece of text, which allows relevant parts of
20698 the bibliography to be translated.
20699 It can be included in a definition by treating it as a key:
20700 \begin_inset Flex Code
20703 \begin_layout Plain Layout
20710 Several of these are predefined in
20711 \begin_inset Flex Code
20714 \begin_layout Plain Layout
20721 Note that these are not macros, in the sense just defined.
20722 They will not be expanded.
20725 \begin_layout Standard
20726 So here then is an example that use all these features:
20727 \begin_inset VSpace defskip
20733 \begin_layout Standard
20737 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20740 \begin_layout Standard
20741 \begin_inset VSpace defskip
20744 This defines a macro that prints the author, followed by a comma, if the
20746 \begin_inset Flex Code
20749 \begin_layout Plain Layout
20755 key is defined, or else prints the name of the editor, followed by the
20757 \begin_inset Flex Code
20760 \begin_layout Plain Layout
20766 or its translation (it is by default
20767 \begin_inset Quotes eld
20771 \begin_inset Quotes erd
20775 \begin_inset Flex Code
20778 \begin_layout Plain Layout
20785 Note that this is in fact defined in
20786 \begin_inset Flex Code
20789 \begin_layout Plain Layout
20795 , so you can use it in your own definitions, or re-definitions, if you load
20799 \begin_layout Section
20800 \begin_inset CommandInset label
20802 name "sec:Tags-for-XHTML"
20806 Tags for XHTML output
20809 \begin_layout Standard
20810 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20811 by layout information.
20812 In general, LyX provides sensible defaults and, as mentioned earlier, it
20813 will even construct default CSS style rules from the other layout tags.
20814 For example, LyX will attempt to use the information provided in the
20815 \begin_inset Flex Code
20818 \begin_layout Plain Layout
20824 declaration for the Chapter style to write CSS that will appropriately
20825 format chapter headings.
20828 \begin_layout Standard
20829 In many cases, then, you may not have to do anything at all to get acceptable
20830 XHTML output for your own environments, custom insets, and so forth.
20831 But in some cases you will, and so LyX provides a number of layout tags
20832 that can be used to customize the XHTML and CSS that are generated.
20835 \begin_layout Standard
20836 Note that there are two tags,
20837 \begin_inset Flex Code
20840 \begin_layout Plain Layout
20847 \begin_inset Flex Code
20850 \begin_layout Plain Layout
20856 that may appear outside style and inset declarations.
20858 \begin_inset CommandInset ref
20860 reference "sub:General-text-class"
20864 for details on these.
20867 \begin_layout Subsection
20868 \begin_inset CommandInset label
20870 name "sub:Paragraph-Style-XHTML"
20877 \begin_layout Standard
20878 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20879 dealing with a normal paragraph, a command, or an environment, where this
20880 is itself determined by the contents of the corresponding
20881 \begin_inset Flex Code
20884 \begin_layout Plain Layout
20894 \begin_layout Standard
20895 For a command or normal paragraph, the output XHTML has the following form:
20898 \begin_layout LyX-Code
20900 \begin_inset Quotes erd
20904 \begin_inset Quotes erd
20910 \begin_layout LyX-Code
20912 \begin_inset Quotes erd
20916 \begin_inset Quotes erd
20922 \begin_layout LyX-Code
20923 Contents of the paragraph.
20926 \begin_layout LyX-Code
20930 \begin_layout Standard
20931 The label tags are of course omitted if the paragraph does not have a label.
20934 \begin_layout Standard
20935 For an environment that is not some sort of list, the XHTML takes this form:
20938 \begin_layout LyX-Code
20940 \begin_inset Quotes erd
20944 \begin_inset Quotes erd
20950 \begin_layout LyX-Code
20952 \begin_inset Quotes erd
20956 \begin_inset Quotes erd
20960 \begin_inset Quotes erd
20964 \begin_inset Quotes erd
20967 >Environment Label</labeltag>First paragraph.</itemtag>
20970 \begin_layout LyX-Code
20971 <itemtag>Second paragraph.</itemtag>
20974 \begin_layout LyX-Code
20978 \begin_layout Standard
20979 Note that the label is output only for the first paragraph, as it should
20980 be for a theorem, for example.
20984 \begin_layout Standard
20985 For a list, we have one of these forms:
20988 \begin_layout LyX-Code
20990 \begin_inset Quotes erd
20994 \begin_inset Quotes erd
21000 \begin_layout LyX-Code
21002 \begin_inset Quotes erd
21006 \begin_inset Quotes erd
21010 \begin_inset Quotes erd
21014 \begin_inset Quotes erd
21017 >List Label</labeltag>First item.</itemtag>
21020 \begin_layout LyX-Code
21022 \begin_inset Quotes erd
21026 \begin_inset Quotes erd
21030 \begin_inset Quotes erd
21034 \begin_inset Quotes erd
21037 >List Label</labeltag>Second item.</itemtag>
21040 \begin_layout LyX-Code
21044 \begin_layout LyX-Code
21048 \begin_layout LyX-Code
21050 \begin_inset Quotes erd
21054 \begin_inset Quotes erd
21060 \begin_layout LyX-Code
21062 \begin_inset Quotes erd
21066 \begin_inset Quotes erd
21069 >List Label</labeltag><itemtag attr=
21070 \begin_inset Quotes erd
21074 \begin_inset Quotes erd
21077 >First item.</itemtag>
21080 \begin_layout LyX-Code
21082 \begin_inset Quotes erd
21086 \begin_inset Quotes erd
21089 >List Label</labeltag><itemtag attr=
21090 \begin_inset Quotes erd
21094 \begin_inset Quotes erd
21097 >Second item.</itemtag>
21100 \begin_layout LyX-Code
21104 \begin_layout Standard
21105 Note the different orders of
21106 \begin_inset Flex Code
21109 \begin_layout Plain Layout
21116 \begin_inset Flex Code
21119 \begin_layout Plain Layout
21126 Which order we get depends upon the setting of
21127 \begin_inset Flex Code
21130 \begin_layout Plain Layout
21137 \begin_inset Flex Code
21140 \begin_layout Plain Layout
21146 is false (the default), you get the first of these, with the label within
21147 the item; if true, you get the second, with the label outside the item.
21150 \begin_layout Standard
21151 The specific tags and attributes output for each paragraph type can be controlle
21152 d by means of the layout tags we are about to describe.
21153 As mentioned earlier, however, LyX uses sensible defaults for many of these,
21154 so you often may not need to do very much to get good XHTML output.
21155 Think of the available tags as there so you can tweak things to your liking.
21158 \begin_layout Description
21159 \begin_inset Flex Code
21162 \begin_layout Plain Layout
21169 \begin_inset Flex Code
21172 \begin_layout Plain Layout
21178 ] Specifies attribute information to be output with the main tag.
21180 \begin_inset Quotes eld
21184 \begin_inset Flex Code
21187 \begin_layout Plain Layout
21194 \begin_inset Quotes erd
21198 By default, LyX will output
21199 \begin_inset Quotes eld
21203 \begin_inset Flex Code
21206 \begin_layout Plain Layout
21213 \begin_inset Quotes erd
21217 \begin_inset Flex Code
21220 \begin_layout Plain Layout
21226 is the LyX name of the layout, made lowercase, for example: chapter.
21231 contain any style information.
21233 \begin_inset Flex Code
21236 \begin_layout Plain Layout
21245 \begin_layout Description
21246 \begin_inset Flex Code
21249 \begin_layout Plain Layout
21256 \begin_inset Flex Code
21259 \begin_layout Plain Layout
21269 ] Whether to output the default CSS information LyX generates for this layout,
21270 even if additional information is explicitly provided via
21271 \begin_inset Flex Code
21274 \begin_layout Plain Layout
21282 \begin_inset Flex Code
21285 \begin_layout Plain Layout
21291 allows you to alter or augment the generated CSS, rather than to override
21294 \begin_inset Flex Code
21297 \begin_layout Plain Layout
21306 \begin_layout Description
21307 \begin_inset Flex Code
21310 \begin_layout Plain Layout
21317 \begin_inset Flex Code
21320 \begin_layout Plain Layout
21326 ] The tag to be used for individual paragraphs of environments, replacing
21328 \begin_inset Flex Code
21331 \begin_layout Plain Layout
21337 in the examples above.
21339 \begin_inset Flex Code
21342 \begin_layout Plain Layout
21351 \begin_layout Description
21352 \begin_inset Flex Code
21355 \begin_layout Plain Layout
21362 \begin_inset Flex Code
21365 \begin_layout Plain Layout
21371 ] Attributes for the item tag.
21373 \begin_inset Quotes eld
21377 \begin_inset Flex Code
21380 \begin_layout Plain Layout
21381 class=`layoutname_item'
21387 \begin_inset Quotes erd
21395 contain any style information.
21397 \begin_inset Flex Code
21400 \begin_layout Plain Layout
21409 \begin_layout Description
21410 \begin_inset Flex Code
21413 \begin_layout Plain Layout
21420 \begin_inset Flex Code
21423 \begin_layout Plain Layout
21429 ] The tag to be used for paragraph and item labels, replacing
21430 \begin_inset Flex Code
21433 \begin_layout Plain Layout
21439 in the examples above.
21441 \begin_inset Flex Code
21444 \begin_layout Plain Layout
21451 \begin_inset Flex Code
21454 \begin_layout Plain Layout
21461 \begin_inset Flex Code
21464 \begin_layout Plain Layout
21471 \begin_inset Flex Code
21474 \begin_layout Plain Layout
21475 Centered_Top_Environment
21480 , in which case it defaults to
21481 \begin_inset Flex Code
21484 \begin_layout Plain Layout
21493 \begin_layout Description
21494 \begin_inset Flex Code
21497 \begin_layout Plain Layout
21504 \begin_inset Flex Code
21507 \begin_layout Plain Layout
21513 ] Attributes for the label tag.
21515 \begin_inset Quotes eld
21519 \begin_inset Flex Code
21522 \begin_layout Plain Layout
21523 class=`layoutname_label'
21529 \begin_inset Quotes erd
21537 contain any style information.
21539 \begin_inset Flex Code
21542 \begin_layout Plain Layout
21551 \begin_layout Description
21552 \begin_inset Flex Code
21555 \begin_layout Plain Layout
21562 \begin_inset Flex Code
21565 \begin_layout Plain Layout
21575 ] Meaningful only for list-like environments, this tag controls whether
21576 the label tag is output before or inside the item tag.
21577 This is used, for example, in the description environment, where we want
21579 \begin_inset Flex Code
21582 \begin_layout Plain Layout
21583 <dt>\SpecialChar \ldots{}
21584 </dt><dd>\SpecialChar \ldots{}
21592 \begin_inset Flex Code
21595 \begin_layout Plain Layout
21601 : The label tag is output inside the item tag.
21604 \begin_layout Description
21605 \begin_inset Flex Code
21608 \begin_layout Plain Layout
21614 Information to be output in the
21615 \begin_inset Flex Code
21618 \begin_layout Plain Layout
21624 section when this style is used.
21625 This might, for example, be used to include a
21626 \begin_inset Flex Code
21629 \begin_layout Plain Layout
21636 \begin_inset Flex Code
21639 \begin_layout Plain Layout
21648 \begin_layout Description
21649 \begin_inset Flex Code
21652 \begin_layout Plain Layout
21658 CSS style information to be included when this style is used.
21659 Note that this will automatically be wrapped in a layout-generated
21660 \begin_inset Flex Code
21663 \begin_layout Plain Layout
21669 block, so only the CSS itself need be included.
21671 \change_inserted 1414654397 1364133464
21673 \begin_inset Flex Code
21676 \begin_layout Plain Layout
21678 \change_inserted 1414654397 1364133462
21691 \begin_layout Description
21692 \begin_inset Flex Code
21695 \begin_layout Plain Layout
21702 \begin_inset Flex Code
21705 \begin_layout Plain Layout
21711 ] The tag to be used for the main label, replacing
21712 \begin_inset Flex Code
21715 \begin_layout Plain Layout
21721 in the examples above.
21723 \begin_inset Flex Code
21726 \begin_layout Plain Layout
21735 \begin_layout Description
21736 \begin_inset Flex Code
21739 \begin_layout Plain Layout
21746 \begin_inset Flex Code
21749 \begin_layout Plain Layout
21759 ] Marks this style as the one to be used to generate the
21760 \begin_inset Flex Code
21763 \begin_layout Plain Layout
21769 tag for the XHTML file.
21770 By default, it is false.
21772 \begin_inset Flex Code
21775 \begin_layout Plain Layout
21781 file sets it to true for the
21782 \begin_inset Flex Code
21785 \begin_layout Plain Layout
21795 \begin_layout Subsection
21799 \begin_layout Standard
21800 The XHTML output of insets can also be controlled by information in layout
21805 \begin_layout Plain Layout
21806 At present, this is true only for
21807 \begin_inset Quotes eld
21811 \begin_inset Quotes erd
21814 insets (insets you can type into) and is not true for
21815 \begin_inset Quotes eld
21819 \begin_inset Quotes erd
21822 insets (insets that are associated with dialog boxes).
21827 Here, too, LyX tries to provide sensible defaults, and it constructs default
21829 But everything can be customized.
21832 \begin_layout Standard
21833 The XHTML LyX outputs for an inset has the following form:
21836 \begin_layout LyX-Code
21838 \begin_inset Quotes erd
21842 \begin_inset Quotes erd
21848 \begin_layout LyX-Code
21849 <labeltag>Label</labeltag>
21852 \begin_layout LyX-Code
21854 \begin_inset Quotes erd
21858 \begin_inset Quotes erd
21861 >Contents of the inset.</innertag>
21864 \begin_layout LyX-Code
21868 \begin_layout Standard
21869 If the inset permits multiple paragraphs---that is, if
21870 \begin_inset Flex Code
21873 \begin_layout Plain Layout
21879 is true---then the contents of the inset will itself be output as paragraphs
21880 formatted according to the styles used for those paragraphs (standard,
21881 quote, and the like).
21882 The label tag is of course omitted if the paragraph does not have a label
21883 and, at present, is always
21884 \begin_inset Flex Code
21887 \begin_layout Plain Layout
21894 The inner tag is optional and, by default, does not appear.
21897 \begin_layout Standard
21898 The specific tags and attributes output for each inset can be controlled
21899 by means of the following layout tags.
21902 \begin_layout Description
21903 \begin_inset Flex Code
21906 \begin_layout Plain Layout
21913 \begin_inset Flex Code
21916 \begin_layout Plain Layout
21922 ] Specifies attribute information to be output with the main tag.
21924 \begin_inset Quotes eld
21928 \begin_inset Flex Code
21931 \begin_layout Plain Layout
21932 class=`myinset' onclick=`\SpecialChar \ldots{}
21939 \begin_inset Quotes erd
21943 By default, LyX will output
21944 \begin_inset Quotes eld
21948 \begin_inset Flex Code
21951 \begin_layout Plain Layout
21958 \begin_inset Quotes erd
21962 \begin_inset Flex Code
21965 \begin_layout Plain Layout
21971 is the LyX name of the inset, made lowercase and with non-alphanumeric
21972 characters converted to underscores, for example: footnote.
21975 \begin_layout Description
21976 \begin_inset Flex Code
21979 \begin_layout Plain Layout
21986 \begin_inset Flex Code
21989 \begin_layout Plain Layout
21999 ] Whether to output the default CSS information LyX generates for this layout,
22000 even if additional information is explicitly provided via
22001 \begin_inset Flex Code
22004 \begin_layout Plain Layout
22012 \begin_inset Flex Code
22015 \begin_layout Plain Layout
22021 allows you to alter or augment the generated CSS, rather than to override
22026 \begin_layout Description
22027 \begin_inset Flex Code
22030 \begin_layout Plain Layout
22037 \begin_inset Flex Code
22040 \begin_layout Plain Layout
22046 ] Attributes for the inner tag.
22048 \begin_inset Quotes eld
22052 \begin_inset Flex Code
22055 \begin_layout Plain Layout
22056 class=`insetname_inner'
22062 \begin_inset Quotes erd
22068 \begin_layout Description
22069 \begin_inset Flex Code
22072 \begin_layout Plain Layout
22079 \begin_inset Flex Code
22082 \begin_layout Plain Layout
22088 ] The inner tag, replacing
22089 \begin_inset Flex Code
22092 \begin_layout Plain Layout
22098 in the examples above.
22099 By default, there is none.
22102 \begin_layout Description
22103 \begin_inset Flex Code
22106 \begin_layout Plain Layout
22113 \begin_inset Flex Code
22116 \begin_layout Plain Layout
22124 ] Whether this inset represents a standalone block of text (such as a footnote)
22125 or instead represents material that is included in the surrounding text
22126 (such as a branch).
22130 \begin_layout Description
22131 \begin_inset Flex Code
22134 \begin_layout Plain Layout
22141 \begin_inset Flex Code
22144 \begin_layout Plain Layout
22150 ] A label for this inset, possibly including a reference to a counter.
22151 For example, for footnote, it might be:
22152 \begin_inset Flex Code
22155 \begin_layout Plain Layout
22164 This is optional, and there is no default.
22167 \begin_layout Description
22168 \begin_inset Flex Code
22171 \begin_layout Plain Layout
22177 Information to be output in the
22178 \begin_inset Flex Code
22181 \begin_layout Plain Layout
22187 section when this style is used.
22188 This might, for example, be used to include a
22189 \begin_inset Flex Code
22192 \begin_layout Plain Layout
22199 \begin_inset Flex Code
22202 \begin_layout Plain Layout
22211 \begin_layout Description
22212 \begin_inset Flex Code
22215 \begin_layout Plain Layout
22221 CSS style information to be included when this style is used.
22222 Note that this will automatically be wrapped in a layout-generated
22223 \begin_inset Flex Code
22226 \begin_layout Plain Layout
22232 block, so only the CSS itself need be included.
22235 \begin_layout Description
22236 \begin_inset Flex Code
22239 \begin_layout Plain Layout
22246 \begin_inset Flex Code
22249 \begin_layout Plain Layout
22255 ] The tag to be used for the main label, replacing
22256 \begin_inset Flex Code
22259 \begin_layout Plain Layout
22265 in the examples above.
22266 The default depends upon the setting of
22267 \begin_inset Flex Code
22270 \begin_layout Plain Layout
22277 \begin_inset Flex Code
22280 \begin_layout Plain Layout
22286 is true, the default is
22287 \begin_inset Flex Code
22290 \begin_layout Plain Layout
22296 ; if it is false, the default is
22297 \begin_inset Flex Code
22300 \begin_layout Plain Layout
22309 \begin_layout Subsection
22313 \begin_layout Standard
22314 The XHTML output for floats too can be controlled by layout information.
22315 The output has the following form:
22318 \begin_layout LyX-Code
22320 \begin_inset Quotes erd
22324 \begin_inset Quotes erd
22330 \begin_layout LyX-Code
22331 Contents of the float.
22334 \begin_layout LyX-Code
22338 \begin_layout Standard
22339 The caption, if there is one, is a separate inset and will be output as
22341 Its appearance can be controlled via the InsetLayout for caption insets.
22345 \begin_layout Description
22346 \begin_inset Flex Code
22349 \begin_layout Plain Layout
22356 \begin_inset Flex Code
22359 \begin_layout Plain Layout
22365 ] Specifies attribute information to be output with the main tag.
22367 \begin_inset Quotes eld
22371 \begin_inset Flex Code
22374 \begin_layout Plain Layout
22375 class=`myfloat' onclick=`\SpecialChar \ldots{}
22382 \begin_inset Quotes erd
22386 By default, LyX will output
22387 \begin_inset Quotes eld
22391 \begin_inset Flex Code
22394 \begin_layout Plain Layout
22395 class=`float float-floattype'
22401 \begin_inset Quotes erd
22405 \begin_inset Flex Code
22408 \begin_layout Plain Layout
22414 is LyX's name for this type of float, as determined by the float declaration
22416 \begin_inset CommandInset ref
22418 reference "sub:Floats"
22422 ), though made lowercase and with non-alphanumeric characters converted
22423 to underscores, for example: float-table.
22426 \begin_layout Description
22427 \begin_inset Flex Code
22430 \begin_layout Plain Layout
22436 CSS style information to be included when this float is used.
22437 Note that this will automatically be wrapped in a layout-generated
22438 \begin_inset Flex Code
22441 \begin_layout Plain Layout
22447 block, so only the CSS itself need be included.
22450 \begin_layout Description
22451 \begin_inset Flex Code
22454 \begin_layout Plain Layout
22461 \begin_inset Flex Code
22464 \begin_layout Plain Layout
22470 ] The tag to be used for this float, replacing
22471 \begin_inset Quotes eld
22475 \begin_inset Flex Code
22478 \begin_layout Plain Layout
22485 \begin_inset Quotes erd
22488 in the example above.
22490 \begin_inset Flex Code
22493 \begin_layout Plain Layout
22499 and will rarely need changing.
22502 \begin_layout Subsection
22503 Bibliography formatting
22506 \begin_layout Standard
22507 The bibliography can be formatted using
22508 \begin_inset Flex Code
22511 \begin_layout Plain Layout
22519 \begin_inset CommandInset ref
22521 reference "sub:Citation-format-description"
22528 \begin_layout Subsection
22532 \begin_layout Standard
22533 We have several times mentioned that LyX will generate default CSS style
22534 rules for both insets and paragraph styles, based upon the other layout
22535 information that is provided.
22536 In this section, we shall say a word about which layout information LyX
22540 \begin_layout Standard
22541 At present, LyX auto-generates CSS only for font information, making use
22543 \begin_inset Flex Code
22546 \begin_layout Plain Layout
22553 \begin_inset Flex Code
22556 \begin_layout Plain Layout
22563 \begin_inset Flex Code
22566 \begin_layout Plain Layout
22573 \begin_inset Flex Code
22576 \begin_layout Plain Layout
22583 \begin_inset Flex Code
22586 \begin_layout Plain Layout
22594 \begin_inset CommandInset ref
22596 reference "sub:Font-description"
22600 .) The translation is mostly straightforward and obvious.
22602 \begin_inset Quotes eld
22606 \begin_inset Flex Code
22609 \begin_layout Plain Layout
22616 \begin_inset Quotes erd
22620 \begin_inset Quotes eld
22624 \begin_inset Flex Code
22627 \begin_layout Plain Layout
22628 font-family: sans-serif;
22634 \begin_inset Quotes erd
22638 The correspondence of LyX sizes and CSS sizes is a little less obvious
22639 but nonetheless intuitive.
22641 \begin_inset Flex Code
22644 \begin_layout Plain Layout
22651 \begin_inset Flex URL
22654 \begin_layout Plain Layout
22664 \begin_layout Chapter
22665 Including External Material
22668 \begin_layout Standard
22669 \begin_inset Box Shadowbox
22679 height_special "totalheight"
22682 \begin_layout Plain Layout
22683 WARNING: This portion of the documentation has not been updated for some
22685 We certainly hope that it is still accurate, but there are no guarantees.
22693 \begin_layout Standard
22694 The use of material from sources external to LyX is covered in detail in
22700 This part of the manual covers what needs to happen behind the scenes for
22701 new sorts of material to be included.
22704 \begin_layout Section
22708 \begin_layout Standard
22709 The external material feature is based on the concept of a
22714 A template is a specification of how LyX should interface with a certain
22716 As bundled, LyX comes with predefined templates for Xfig figures, various
22717 raster format images, chess diagrams, and LilyPond music notation.
22718 You can check the actual list by using the menu
22719 \begin_inset Flex MenuItem
22722 \begin_layout Plain Layout
22723 Insert\SpecialChar \menuseparator
22724 File\SpecialChar \menuseparator
22731 Furthermore, it is possible to roll your own template to support a specific
22733 Later we'll describe in more detail what is involved, and hopefully you
22734 will submit all the templates you create so we can include them in a later
22738 \begin_layout Standard
22739 Another basic idea of the external material feature is to distinguish between
22740 the original file that serves as a base for final material and the produced
22741 file that is included in your exported or printed document.
22742 For example, consider the case of a figure produced with
22743 \begin_inset Flex Code
22746 \begin_layout Plain Layout
22753 The Xfig application itself works on an original file with the
22754 \begin_inset Flex Code
22757 \begin_layout Plain Layout
22764 Within Xfig, you create and change your figure, and when you are done,
22766 \begin_inset Flex Code
22769 \begin_layout Plain Layout
22776 When you want to include the figure in your document, you invoke
22777 \begin_inset Flex Code
22780 \begin_layout Plain Layout
22786 in order to create a PostScript file that can readily be included in your
22789 \begin_inset Flex Code
22792 \begin_layout Plain Layout
22798 file is the original file, and the PostScript file is the produced file.
22801 \begin_layout Standard
22802 This distinction is important in order to allow updating of the material
22803 while you are in the process of writing the document.
22804 Furthermore, it provides us with the flexibility that is needed to support
22805 multiple export formats.
22806 For instance, in the case of a plain text file, it is not exactly an award-winn
22807 ing idea to include the figure as raw PostScript.
22808 Instead, you would either prefer to just include a reference to the figure
22809 or try to invoke some graphics to ASCII converter to make the final result
22810 look similar to the real graphics.
22811 The external material management allows you to do this, because it is parametri
22812 zed on the different export formats that LyX supports.
22815 \begin_layout Standard
22816 Besides supporting the production of different products according to the
22817 exported format, it supports tight integration with editing and viewing
22819 In the case of an Xfig figure, you are able to invoke Xfig on the original
22820 file with a single click from within the external material dialog in LyX,
22821 and also preview the produced PostScript file with Ghostview with another
22823 No more fiddling around with the command line and/or file browsers to locate
22824 and manipulate the original or produced files.
22825 In this way, you are finally able to take full advantage of the many different
22826 applications that are relevant to use when you write your documents, and
22827 ultimately be more productive.
22830 \begin_layout Section
22831 The external template configuration file
22834 \begin_layout Standard
22835 It is relatively easy to add custom external template definitions to LyX.
22836 However, be aware that doing this in an careless manner most probably
22840 introduce an easily exploitable security hole.
22841 So before you do this, please read the discussion about security in section
22843 \begin_inset CommandInset ref
22845 reference "sec:Security-discussion"
22852 \begin_layout Standard
22853 Having said that, we encourage you to submit any interesting templates that
22858 \begin_layout Standard
22859 The external templates are defined in the
22860 \begin_inset Flex Code
22863 \begin_layout Plain Layout
22864 LyXDir/lib/external_templates
22870 You can place your own version in
22871 \begin_inset Flex Code
22874 \begin_layout Plain Layout
22875 UserDir/external_templates
22883 \begin_layout Standard
22884 A typical template looks like this:
22887 \begin_layout LyX-Code
22891 \begin_layout LyX-Code
22892 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22895 \begin_layout LyX-Code
22899 \begin_layout LyX-Code
22903 \begin_layout LyX-Code
22907 \begin_layout LyX-Code
22911 \begin_layout LyX-Code
22915 \begin_layout LyX-Code
22916 AutomaticProduction true
22919 \begin_layout LyX-Code
22923 \begin_layout LyX-Code
22927 \begin_layout LyX-Code
22931 \begin_layout LyX-Code
22932 TransformCommand Rotate RotationLatexCommand
22935 \begin_layout LyX-Code
22936 TransformCommand Resize ResizeLatexCommand
22939 \begin_layout LyX-Code
22940 Product "$$RotateFront$$ResizeFront
22943 \begin_layout LyX-Code
22948 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22951 \begin_layout LyX-Code
22952 $$ResizeBack$$RotateBack"
22955 \begin_layout LyX-Code
22959 \begin_layout LyX-Code
22960 UpdateResult "$$AbsPath$$Basename.pstex_t"
22963 \begin_layout LyX-Code
22964 Requirement "graphicx"
22967 \begin_layout LyX-Code
22968 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22971 \begin_layout LyX-Code
22972 ReferencedFile latex "$$AbsPath$$Basename.eps"
22975 \begin_layout LyX-Code
22976 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22979 \begin_layout LyX-Code
22983 \begin_layout LyX-Code
22987 \begin_layout LyX-Code
22988 TransformCommand Rotate RotationLatexCommand
22991 \begin_layout LyX-Code
22992 TransformCommand Resize ResizeLatexCommand
22995 \begin_layout LyX-Code
22996 Product "$$RotateFront$$ResizeFront
22999 \begin_layout LyX-Code
23004 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
23007 \begin_layout LyX-Code
23008 $$ResizeBack$$RotateBack"
23011 \begin_layout LyX-Code
23012 UpdateFormat pdftex
23015 \begin_layout LyX-Code
23016 UpdateResult "$$AbsPath$$Basename.pdftex_t"
23019 \begin_layout LyX-Code
23020 Requirement "graphicx"
23023 \begin_layout LyX-Code
23024 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
23027 \begin_layout LyX-Code
23028 ReferencedFile latex "$$AbsPath$$Basename.pdf"
23031 \begin_layout LyX-Code
23035 \begin_layout LyX-Code
23039 \begin_layout LyX-Code
23040 Product "$$Contents(
23042 "$$AbsPath$$Basename.asc
23047 \begin_layout LyX-Code
23048 UpdateFormat asciixfig
23051 \begin_layout LyX-Code
23052 UpdateResult "$$AbsPath$$Basename.asc"
23055 \begin_layout LyX-Code
23059 \begin_layout LyX-Code
23063 \begin_layout LyX-Code
23064 Product "<graphic fileref=
23066 "$$AbsOrRelPathMaster$$Basename.eps
23071 \begin_layout LyX-Code
23075 \begin_layout LyX-Code
23079 \begin_layout LyX-Code
23080 UpdateResult "$$AbsPath$$Basename.eps"
23083 \begin_layout LyX-Code
23084 ReferencedFile docbook "$$AbsPath$$Basename.eps"
23087 \begin_layout LyX-Code
23088 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
23091 \begin_layout LyX-Code
23095 \begin_layout LyX-Code
23096 Product "[XFig: $$FName]"
23099 \begin_layout LyX-Code
23103 \begin_layout LyX-Code
23107 \begin_layout Standard
23108 As you can see, the template is enclosed in
23109 \begin_inset Flex Code
23112 \begin_layout Plain Layout
23118 \SpecialChar \ldots{}
23120 \begin_inset Flex Code
23123 \begin_layout Plain Layout
23130 It contains a header specifying some general settings and, for each supported
23131 primary document file format, a section
23132 \begin_inset Flex Code
23135 \begin_layout Plain Layout
23141 \SpecialChar \ldots{}
23143 \begin_inset Flex Code
23146 \begin_layout Plain Layout
23155 \begin_layout Subsection
23156 The template header
23159 \begin_layout Description
23160 \begin_inset Flex Code
23163 \begin_layout Plain Layout
23164 AutomaticProduction
23165 \begin_inset space ~
23173 Whether the file represented by the template must be generated by LyX.
23174 This command must occur exactly once.
23177 \begin_layout Description
23178 \begin_inset Flex Code
23181 \begin_layout Plain Layout
23183 \begin_inset space ~
23191 A glob pattern that is used in the file dialog to filter out the desired
23193 If there is more than one possible file extension (e.
23194 \begin_inset space \thinspace{}
23198 \begin_inset space \space{}
23202 \begin_inset Flex Code
23205 \begin_layout Plain Layout
23212 \begin_inset Flex Code
23215 \begin_layout Plain Layout
23221 ), use something like
23222 \begin_inset Flex Code
23225 \begin_layout Plain Layout
23232 This command must occur exactly once.
23235 \begin_layout Description
23236 \begin_inset Flex Code
23239 \begin_layout Plain Layout
23241 \begin_inset space ~
23249 The text that is displayed on the button.
23250 This command must occur exactly once.
23253 \begin_layout Description
23254 \begin_inset Flex Code
23257 \begin_layout Plain Layout
23259 \begin_inset space ~
23263 \begin_inset space ~
23271 The help text that is used in the External dialog.
23272 Provide enough information to explain to the user just what the template
23273 can provide him with.
23274 This command must occur exactly once.
23277 \begin_layout Description
23278 \begin_inset Flex Code
23281 \begin_layout Plain Layout
23283 \begin_inset space ~
23291 The file format of the original file.
23292 This must be the name of a format that is known to LyX (see section
23293 \begin_inset space ~
23297 \begin_inset CommandInset ref
23299 reference "sec:Formats"
23305 \begin_inset Quotes eld
23309 \begin_inset Flex Code
23312 \begin_layout Plain Layout
23319 \begin_inset Quotes erd
23322 if the template can handle original files of more than one format.
23323 LyX will attempt to interrogate the file itself in order to deduce its
23324 format in this case.
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 A unique name for the template.
23343 It must not contain substitution macros (see below).
23346 \begin_layout Description
23347 \begin_inset Flex Code
23350 \begin_layout Plain Layout
23352 \begin_inset space ~
23355 Rotate|Resize|Clip|Extra
23360 This command specifies which transformations are supported by this template.
23361 It may occur zero or more times.
23362 This command enables the corresponding tabs in the external dialog.
23364 \begin_inset Flex Code
23367 \begin_layout Plain Layout
23373 command must have either a corresponding
23374 \begin_inset Flex Code
23377 \begin_layout Plain Layout
23384 \begin_inset Flex Code
23387 \begin_layout Plain Layout
23394 \begin_inset Flex Code
23397 \begin_layout Plain Layout
23404 Otherwise the transformation will not be supported by that format.
23407 \begin_layout Subsection
23411 \begin_layout Description
23412 \begin_inset Flex Code
23415 \begin_layout Plain Layout
23417 \begin_inset space ~
23420 LaTeX|PDFLaTeX|PlainText|DocBook
23425 The primary document file format that this format definition is for.
23426 Not every template has a sensible representation in all document file formats.
23427 Please define nevertheless a
23428 \begin_inset Flex Code
23431 \begin_layout Plain Layout
23437 section for all templates.
23438 Use a dummy text when no representation is available.
23439 Then you can at least see a reference to the external material in the exported
23443 \begin_layout Description
23444 \begin_inset Flex Code
23447 \begin_layout Plain Layout
23449 \begin_inset space ~
23453 \begin_inset space ~
23461 This command defines an additional macro
23462 \begin_inset Flex Code
23465 \begin_layout Plain Layout
23471 for substitution in
23472 \begin_inset Flex Code
23475 \begin_layout Plain Layout
23483 \begin_inset Flex Code
23486 \begin_layout Plain Layout
23492 itself may contain substitution macros.
23493 The advantage over using
23494 \begin_inset Flex Code
23497 \begin_layout Plain Layout
23504 \begin_inset Flex Code
23507 \begin_layout Plain Layout
23513 is that the substituted value of
23514 \begin_inset Flex Code
23517 \begin_layout Plain Layout
23523 is sanitized so that it is a valid optional argument in the document format.
23524 This command may occur zero or more times.
23527 \begin_layout Description
23528 \begin_inset Flex Code
23531 \begin_layout Plain Layout
23533 \begin_inset space ~
23541 The text that is inserted in the exported document.
23542 This is actually the most important command and can be quite complex.
23543 This command must occur exactly once.
23546 \begin_layout Description
23547 \begin_inset Flex Code
23550 \begin_layout Plain Layout
23552 \begin_inset space ~
23560 This command specifies a preamble snippet that will be included in the
23562 It has to be defined using
23563 \begin_inset Flex Code
23566 \begin_layout Plain Layout
23572 \SpecialChar \ldots{}
23574 \begin_inset Flex Code
23577 \begin_layout Plain Layout
23584 This command may occur zero or more times.
23587 \begin_layout Description
23588 \begin_inset Flex Code
23591 \begin_layout Plain Layout
23593 \begin_inset space ~
23597 \begin_inset space ~
23605 This command denotes files that are created by the conversion process and
23606 are needed for a particular export format.
23607 If the filename is relative, it is interpreted relative to the master document.
23608 This command may be given zero or more times.
23611 \begin_layout Description
23612 \begin_inset Flex Code
23615 \begin_layout Plain Layout
23617 \begin_inset space ~
23625 The name of a required LaTeX package.
23626 The package is included via
23627 \begin_inset Flex Code
23630 \begin_layout Plain Layout
23638 in the LaTeX preamble.
23639 This command may occur zero or more times.
23642 \begin_layout Description
23643 \begin_inset Flex Code
23646 \begin_layout Plain Layout
23648 \begin_inset space ~
23652 \begin_inset space ~
23655 RotationLatexCommand
23660 This command specifies that the built in LaTeX command should be used for
23662 This command may occur once or not at all.
23665 \begin_layout Description
23666 \begin_inset Flex Code
23669 \begin_layout Plain Layout
23671 \begin_inset space ~
23675 \begin_inset space ~
23683 This command specifies that the built in LaTeX command should be used for
23685 This command may occur once or not at all.
23688 \begin_layout Description
23689 \begin_inset Flex Code
23692 \begin_layout Plain Layout
23694 \begin_inset space ~
23698 \begin_inset space ~
23701 RotationLatexOption
23706 This command specifies that rotation is done via an optional argument.
23707 This command may occur once or not at all.
23710 \begin_layout Description
23711 \begin_inset Flex Code
23714 \begin_layout Plain Layout
23716 \begin_inset space ~
23720 \begin_inset space ~
23728 This command specifies that resizing is done via an optional argument.
23729 This command may occur once or not at all.
23732 \begin_layout Description
23733 \begin_inset Flex Code
23736 \begin_layout Plain Layout
23738 \begin_inset space ~
23742 \begin_inset space ~
23750 This command specifies that clipping is done via an optional argument.
23751 This command may occur once or not at all.
23754 \begin_layout Description
23755 \begin_inset Flex Code
23758 \begin_layout Plain Layout
23760 \begin_inset space ~
23764 \begin_inset space ~
23772 This command specifies that an extra optional argument is used.
23773 This command may occur once or not at all.
23776 \begin_layout Description
23777 \begin_inset Flex Code
23780 \begin_layout Plain Layout
23782 \begin_inset space ~
23790 The file format of the converted file.
23791 This must be the name of a format that is known to LyX (see the
23792 \begin_inset Flex MenuItem
23795 \begin_layout Plain Layout
23800 ools\SpecialChar \menuseparator
23805 references\SpecialChar \menuseparator
23806 File Handling\SpecialChar \menuseparator
23813 This command must occur exactly once.
23815 \change_inserted -195340706 1363813305
23816 If the resulting file format is PDF, you need to specify the format
23817 \begin_inset Flex Code
23820 \begin_layout Plain Layout
23822 \change_inserted -195340706 1363813269
23829 This is the PDF format used for including graphics.
23830 The other defined PDF formats are for document export.
23835 \begin_layout Description
23836 \begin_inset Flex Code
23839 \begin_layout Plain Layout
23841 \begin_inset space ~
23849 The file name of the converted file.
23850 The file name must be absolute.
23851 This command must occur exactly once.
23854 \begin_layout Subsection
23855 Preamble definitions
23858 \begin_layout Standard
23859 The external template configuration file may contain additional preamble
23860 definitions enclosed by
23861 \begin_inset Flex Code
23864 \begin_layout Plain Layout
23870 \SpecialChar \ldots{}
23872 \begin_inset Flex Code
23875 \begin_layout Plain Layout
23882 They can be used by the templates in the
23883 \begin_inset Flex Code
23886 \begin_layout Plain Layout
23895 \begin_layout Section
23896 The substitution mechanism
23899 \begin_layout Standard
23900 When the external material facility invokes an external program, it is done
23901 on the basis of a command defined in the template configuration file.
23902 These commands can contain various macros that are expanded before execution.
23903 Execution always take place in the directory of the containing document.
23906 \begin_layout Standard
23907 Also, whenever external material is to be displayed, the name will be produced
23908 by the substitution mechanism, and most other commands in the template
23909 definition support substitution as well.
23912 \begin_layout Standard
23913 The available macros are the following:
23916 \begin_layout Description
23917 \begin_inset Flex Code
23920 \begin_layout Plain Layout
23921 $$AbsOrRelPathMaster
23926 The file path, absolute or relative to the master LyX document.
23929 \begin_layout Description
23930 \begin_inset Flex Code
23933 \begin_layout Plain Layout
23934 $$AbsOrRelPathParent
23939 The file path, absolute or relative to the LyX document.
23942 \begin_layout Description
23943 \begin_inset Flex Code
23946 \begin_layout Plain Layout
23952 The absolute file path.
23955 \begin_layout Description
23956 \begin_inset Flex Code
23959 \begin_layout Plain Layout
23965 The filename without path and without the extension.
23968 \begin_layout Description
23969 \begin_inset Flex Code
23972 \begin_layout Plain Layout
23974 \begin_inset Quotes eld
23978 \begin_inset Quotes erd
23986 This macro will expand to the contents of the file with the name
23987 \begin_inset Flex Code
23990 \begin_layout Plain Layout
23999 \begin_layout Description
24000 \begin_inset Flex Code
24003 \begin_layout Plain Layout
24009 The file extension (including the dot).
24012 \begin_layout Description
24013 \begin_inset Flex Code
24016 \begin_layout Plain Layout
24022 The filename of the file specified in the external material dialog.
24023 This is either an absolute name, or it is relative to the LyX document.
24026 \begin_layout Description
24027 \begin_inset Flex Code
24030 \begin_layout Plain Layout
24037 \begin_inset Flex Code
24040 \begin_layout Plain Layout
24046 (absolute name or relative to the LyX document).
24049 \begin_layout Description
24050 \begin_inset Flex Code
24053 \begin_layout Plain Layout
24059 The file path, relative to the master LyX document.
24062 \begin_layout Description
24063 \begin_inset Flex Code
24066 \begin_layout Plain Layout
24072 The file path, relative to the LyX document.
24075 \begin_layout Description
24076 \begin_inset Flex Code
24079 \begin_layout Plain Layout
24085 This macro will expand to the absolute path of the system directory.
24086 This is typically used to point to the various helper scripts that are
24090 \begin_layout Description
24091 \begin_inset Flex Code
24094 \begin_layout Plain Layout
24100 A name and full path to a temporary file which will be automatically deleted
24101 whenever the containing document is closed, or the external material insertion
24105 \begin_layout Standard
24106 All path macros contain a trailing directory separator, so you can construct
24108 \begin_inset space \thinspace{}
24112 \begin_inset space \space{}
24115 the absolute filename with
24116 \begin_inset Flex Code
24119 \begin_layout Plain Layout
24120 $$AbsPath$$Basename$$Extension
24128 \begin_layout Standard
24129 The macros above are substituted in all commands unless otherwise noted.
24131 \begin_inset Flex Code
24134 \begin_layout Plain Layout
24140 supports additionally the following substitutions if they are enabled by
24142 \begin_inset Flex Code
24145 \begin_layout Plain Layout
24152 \begin_inset Flex Code
24155 \begin_layout Plain Layout
24164 \begin_layout Description
24165 \begin_inset Flex Code
24168 \begin_layout Plain Layout
24174 The front part of the resize command.
24177 \begin_layout Description
24178 \begin_inset Flex Code
24181 \begin_layout Plain Layout
24187 The back part of the resize command.
24190 \begin_layout Description
24191 \begin_inset Flex Code
24194 \begin_layout Plain Layout
24200 The front part of the rotation command.
24203 \begin_layout Description
24204 \begin_inset Flex Code
24207 \begin_layout Plain Layout
24213 The back part of the rotation command.
24216 \begin_layout Standard
24217 The value string of the
24218 \begin_inset Flex Code
24221 \begin_layout Plain Layout
24227 command supports additionally the following substitutions if they are enabled
24229 \begin_inset Flex Code
24232 \begin_layout Plain Layout
24239 \begin_inset Flex Code
24242 \begin_layout Plain Layout
24251 \begin_layout Description
24252 \begin_inset Flex Code
24255 \begin_layout Plain Layout
24264 \begin_layout Description
24265 \begin_inset Flex Code
24268 \begin_layout Plain Layout
24277 \begin_layout Description
24278 \begin_inset Flex Code
24281 \begin_layout Plain Layout
24290 \begin_layout Description
24291 \begin_inset Flex Code
24294 \begin_layout Plain Layout
24300 The rotation option.
24303 \begin_layout Standard
24304 You may ask why there are so many path macros.
24305 There are mainly two reasons:
24308 \begin_layout Enumerate
24309 Relative and absolute file names should remain relative or absolute, respectivel
24311 Users may have reasons to prefer either form.
24312 Relative names are useful for portable documents that should work on different
24313 machines, for example.
24314 Absolute names may be required by some programs.
24317 \begin_layout Enumerate
24318 LaTeX treats relative file names differently than LyX and other programs
24319 in nested included files.
24320 For LyX, a relative file name is always relative to the document that contains
24322 For LaTeX, it is always relative to the master document.
24323 These two definitions are identical if you have only one document, but
24324 differ if you have a master document that includes part documents.
24325 That means that relative filenames must be transformed when presented to
24327 Fortunately LyX does this automatically for you if you choose the right
24331 \begin_layout Standard
24332 So which path macro should be used in new template definitions? The rule
24336 \begin_layout Itemize
24338 \begin_inset Flex Code
24341 \begin_layout Plain Layout
24347 if an absolute path is required.
24350 \begin_layout Itemize
24352 \begin_inset Flex Code
24355 \begin_layout Plain Layout
24356 $$AbsOrRelPathMaster
24361 if the substituted string is some kind of LaTeX input.
24364 \begin_layout Itemize
24366 \begin_inset Flex Code
24369 \begin_layout Plain Layout
24370 $$AbsOrRelPathParent
24375 in order to preserve the user's choice.
24378 \begin_layout Standard
24379 There are special cases where this rule does not work and e.
24380 \begin_inset space \thinspace{}
24384 \begin_inset space \space{}
24387 relative names are needed, but normally it will work just fine.
24388 One example for such a case is the command
24389 \begin_inset Flex Code
24392 \begin_layout Plain Layout
24393 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24398 in the XFig template above: We can't use the absolute name because the
24400 \begin_inset Flex Code
24403 \begin_layout Plain Layout
24409 files needs the relative name in order to rewrite the file content.
24412 \begin_layout Section
24413 Security discussion
24414 \begin_inset CommandInset label
24416 name "sec:Security-discussion"
24423 \begin_layout Standard
24424 The external material feature interfaces with a lot of external programs
24425 and does so automatically, so we have to consider the security implications
24427 In particular, since you have the option of including your own filenames
24428 and/or parameter strings and those are expanded into a command, it seems
24429 that it would be possible to create a malicious document which executes
24430 arbitrary commands when a user views or prints the document.
24431 This is something we definitely want to avoid.
24434 \begin_layout Standard
24435 However, since the external program commands are specified in the template
24436 configuration file only, there are no security issues if LyX is properly
24437 configured with safe templates only.
24438 This is so because the external programs are invoked with the
24439 \begin_inset Flex Code
24442 \begin_layout Plain Layout
24448 -system call rather than the
24449 \begin_inset Flex Code
24452 \begin_layout Plain Layout
24458 system-call, so it's not possible to execute arbitrary commands from the
24459 filename or parameter section via the shell.
24462 \begin_layout Standard
24463 This also implies that you are restricted in what command strings you can
24464 use in the external material templates.
24465 In particular, pipes and redirection are not readily available.
24466 This has to be so if LyX should remain safe.
24467 If you want to use some of the shell features, you should write a safe
24468 script to do this in a controlled manner, and then invoke the script from
24469 the command string.
24473 \begin_layout Standard
24474 It is possible to design a template that interacts directly with the shell,
24475 but since this would allow a malicious user to execute arbitrary commands
24476 by writing clever filenames and/or parameters, we generally recommend that
24477 you only use safe scripts that work with the
24478 \begin_inset Flex Code
24481 \begin_layout Plain Layout
24487 system call in a controlled manner.
24488 Of course, for use in a controlled environment, it can be tempting to just
24489 fall back to use ordinary shell scripts.
24490 If you do so, be aware that you
24494 provide an easily exploitable security hole in your system.
24495 Of course it stands to reason that such unsafe templates will never be
24496 included in the standard LyX distribution, although we do encourage people
24497 to submit new templates in the open source tradition.
24498 But LyX as shipped from the official distribution channels will never have
24502 \begin_layout Standard
24503 Including external material provides a lot of power, and you have to be
24504 careful not to introduce security hazards with this power.
24505 A subtle error in a single line in an innocent looking script can open
24506 the door to huge security problems.
24507 So if you do not fully understand the issues, we recommend that you consult
24508 a knowledgeable security professional or the LyX development team if you
24509 have any questions about whether a given template is safe or not.
24510 And do this before you use it in an uncontrolled environment.
24513 \begin_layout Chapter
24515 List of functions to be used in layouts
24516 \begin_inset CommandInset label
24518 name "chap:List-of-functions"
24525 \begin_layout Standard
24527 \begin_inset Tabular
24528 <lyxtabular version="3" rows="10" columns="6">
24529 <features rotate="0" tabularvalignment="middle">
24530 <column alignment="left" valignment="top" width="14col%">
24531 <column alignment="left" valignment="top" width="14col%">
24532 <column alignment="left" valignment="top" width="14col%">
24533 <column alignment="left" valignment="top" width="14col%">
24534 <column alignment="left" valignment="top" width="14col%">
24535 <column alignment="left" valignment="top" width="14col%">
24537 <cell alignment="left" valignment="top" usebox="none">
24540 \begin_layout Plain Layout
24546 <cell alignment="left" valignment="top" usebox="none">
24549 \begin_layout Plain Layout
24555 <cell alignment="left" valignment="top" usebox="none">
24558 \begin_layout Plain Layout
24564 <cell alignment="left" valignment="top" usebox="none">
24567 \begin_layout Plain Layout
24573 <cell alignment="left" valignment="top" usebox="none">
24576 \begin_layout Plain Layout
24582 <cell alignment="left" valignment="top" usebox="none">
24585 \begin_layout Plain Layout
24593 <cell alignment="left" valignment="top" usebox="none">
24596 \begin_layout Plain Layout
24602 <cell alignment="left" valignment="top" usebox="none">
24605 \begin_layout Plain Layout
24611 <cell alignment="left" valignment="top" usebox="none">
24614 \begin_layout Plain Layout
24620 <cell alignment="left" valignment="top" usebox="none">
24623 \begin_layout Plain Layout
24629 <cell alignment="left" valignment="top" usebox="none">
24632 \begin_layout Plain Layout
24638 <cell alignment="left" valignment="top" usebox="none">
24641 \begin_layout Plain Layout
24649 <cell alignment="left" valignment="top" usebox="none">
24652 \begin_layout Plain Layout
24658 <cell alignment="left" valignment="top" usebox="none">
24661 \begin_layout Plain Layout
24667 <cell alignment="left" valignment="top" usebox="none">
24670 \begin_layout Plain Layout
24676 <cell alignment="left" valignment="top" usebox="none">
24679 \begin_layout Plain Layout
24685 <cell alignment="left" valignment="top" usebox="none">
24688 \begin_layout Plain Layout
24694 <cell alignment="left" valignment="top" usebox="none">
24697 \begin_layout Plain Layout
24705 <cell alignment="left" valignment="top" usebox="none">
24708 \begin_layout Plain Layout
24714 <cell alignment="left" valignment="top" usebox="none">
24717 \begin_layout Plain Layout
24723 <cell alignment="left" valignment="top" usebox="none">
24726 \begin_layout Plain Layout
24732 <cell alignment="left" valignment="top" usebox="none">
24735 \begin_layout Plain Layout
24741 <cell alignment="left" valignment="top" usebox="none">
24744 \begin_layout Plain Layout
24750 <cell alignment="left" valignment="top" usebox="none">
24753 \begin_layout Plain Layout
24761 <cell alignment="left" valignment="top" usebox="none">
24764 \begin_layout Plain Layout
24770 <cell alignment="left" valignment="top" usebox="none">
24773 \begin_layout Plain Layout
24779 <cell alignment="left" valignment="top" usebox="none">
24782 \begin_layout Plain Layout
24788 <cell alignment="left" valignment="top" usebox="none">
24791 \begin_layout Plain Layout
24797 <cell alignment="left" valignment="top" usebox="none">
24800 \begin_layout Plain Layout
24806 <cell alignment="left" valignment="top" usebox="none">
24809 \begin_layout Plain Layout
24817 <cell alignment="left" valignment="top" usebox="none">
24820 \begin_layout Plain Layout
24826 <cell alignment="left" valignment="top" usebox="none">
24829 \begin_layout Plain Layout
24835 <cell alignment="left" valignment="top" usebox="none">
24838 \begin_layout Plain Layout
24844 <cell alignment="left" valignment="top" usebox="none">
24847 \begin_layout Plain Layout
24853 <cell alignment="left" valignment="top" usebox="none">
24856 \begin_layout Plain Layout
24862 <cell alignment="left" valignment="top" usebox="none">
24865 \begin_layout Plain Layout
24873 <cell alignment="left" valignment="top" usebox="none">
24876 \begin_layout Plain Layout
24882 <cell alignment="left" valignment="top" usebox="none">
24885 \begin_layout Plain Layout
24891 <cell alignment="left" valignment="top" usebox="none">
24894 \begin_layout Plain Layout
24900 <cell alignment="left" valignment="top" usebox="none">
24903 \begin_layout Plain Layout
24909 <cell alignment="left" valignment="top" usebox="none">
24912 \begin_layout Plain Layout
24918 <cell alignment="left" valignment="top" usebox="none">
24921 \begin_layout Plain Layout
24929 <cell alignment="left" valignment="top" usebox="none">
24932 \begin_layout Plain Layout
24938 <cell alignment="left" valignment="top" usebox="none">
24941 \begin_layout Plain Layout
24947 <cell alignment="left" valignment="top" usebox="none">
24950 \begin_layout Plain Layout
24956 <cell alignment="left" valignment="top" usebox="none">
24959 \begin_layout Plain Layout
24965 <cell alignment="left" valignment="top" usebox="none">
24968 \begin_layout Plain Layout
24974 <cell alignment="left" valignment="top" usebox="none">
24977 \begin_layout Plain Layout
24985 <cell alignment="left" valignment="top" usebox="none">
24988 \begin_layout Plain Layout
24994 <cell alignment="left" valignment="top" usebox="none">
24997 \begin_layout Plain Layout
25003 <cell alignment="left" valignment="top" usebox="none">
25006 \begin_layout Plain Layout
25012 <cell alignment="left" valignment="top" usebox="none">
25015 \begin_layout Plain Layout
25021 <cell alignment="left" valignment="top" usebox="none">
25024 \begin_layout Plain Layout
25030 <cell alignment="left" valignment="top" usebox="none">
25033 \begin_layout Plain Layout
25041 <cell alignment="left" valignment="top" usebox="none">
25044 \begin_layout Plain Layout
25050 <cell alignment="left" valignment="top" usebox="none">
25053 \begin_layout Plain Layout
25059 <cell alignment="left" valignment="top" usebox="none">
25062 \begin_layout Plain Layout
25068 <cell alignment="left" valignment="top" usebox="none">
25071 \begin_layout Plain Layout
25077 <cell alignment="left" valignment="top" usebox="none">
25080 \begin_layout Plain Layout
25086 <cell alignment="left" valignment="top" usebox="none">
25089 \begin_layout Plain Layout
25103 \begin_layout Standard
25105 \begin_inset Tabular
25106 <lyxtabular version="3" rows="10" columns="6">
25107 <features rotate="0" tabularvalignment="middle">
25108 <column alignment="left" valignment="top" width="14col%">
25109 <column alignment="left" valignment="top" width="14col%">
25110 <column alignment="left" valignment="top" width="14col%">
25111 <column alignment="left" valignment="top" width="14col%">
25112 <column alignment="left" valignment="top" width="14col%">
25113 <column alignment="left" valignment="top" width="14col%">
25115 <cell alignment="left" valignment="top" usebox="none">
25118 \begin_layout Plain Layout
25124 <cell alignment="left" valignment="top" usebox="none">
25127 \begin_layout Plain Layout
25133 <cell alignment="left" valignment="top" usebox="none">
25136 \begin_layout Plain Layout
25142 <cell alignment="left" valignment="top" usebox="none">
25145 \begin_layout Plain Layout
25151 <cell alignment="left" valignment="top" usebox="none">
25154 \begin_layout Plain Layout
25160 <cell alignment="left" valignment="top" usebox="none">
25163 \begin_layout Plain Layout
25171 <cell alignment="left" valignment="top" usebox="none">
25174 \begin_layout Plain Layout
25180 <cell alignment="left" valignment="top" usebox="none">
25183 \begin_layout Plain Layout
25189 <cell alignment="left" valignment="top" usebox="none">
25192 \begin_layout Plain Layout
25198 <cell alignment="left" valignment="top" usebox="none">
25201 \begin_layout Plain Layout
25207 <cell alignment="left" valignment="top" usebox="none">
25210 \begin_layout Plain Layout
25216 <cell alignment="left" valignment="top" usebox="none">
25219 \begin_layout Plain Layout
25227 <cell alignment="left" valignment="top" usebox="none">
25230 \begin_layout Plain Layout
25236 <cell alignment="left" valignment="top" usebox="none">
25239 \begin_layout Plain Layout
25245 <cell alignment="left" valignment="top" usebox="none">
25248 \begin_layout Plain Layout
25254 <cell alignment="left" valignment="top" usebox="none">
25257 \begin_layout Plain Layout
25263 <cell alignment="left" valignment="top" usebox="none">
25266 \begin_layout Plain Layout
25272 <cell alignment="left" valignment="top" usebox="none">
25275 \begin_layout Plain Layout
25283 <cell alignment="left" valignment="top" usebox="none">
25286 \begin_layout Plain Layout
25292 <cell alignment="left" valignment="top" usebox="none">
25295 \begin_layout Plain Layout
25301 <cell alignment="left" valignment="top" usebox="none">
25304 \begin_layout Plain Layout
25310 <cell alignment="left" valignment="top" usebox="none">
25313 \begin_layout Plain Layout
25319 <cell alignment="left" valignment="top" usebox="none">
25322 \begin_layout Plain Layout
25328 <cell alignment="left" valignment="top" usebox="none">
25331 \begin_layout Plain Layout
25339 <cell alignment="left" valignment="top" usebox="none">
25342 \begin_layout Plain Layout
25348 <cell alignment="left" valignment="top" usebox="none">
25351 \begin_layout Plain Layout
25357 <cell alignment="left" valignment="top" usebox="none">
25360 \begin_layout Plain Layout
25366 <cell alignment="left" valignment="top" usebox="none">
25369 \begin_layout Plain Layout
25375 <cell alignment="left" valignment="top" usebox="none">
25378 \begin_layout Plain Layout
25384 <cell alignment="left" valignment="top" usebox="none">
25387 \begin_layout Plain Layout
25395 <cell alignment="left" valignment="top" usebox="none">
25398 \begin_layout Plain Layout
25404 <cell alignment="left" valignment="top" usebox="none">
25407 \begin_layout Plain Layout
25413 <cell alignment="left" valignment="top" usebox="none">
25416 \begin_layout Plain Layout
25422 <cell alignment="left" valignment="top" usebox="none">
25425 \begin_layout Plain Layout
25431 <cell alignment="left" valignment="top" usebox="none">
25434 \begin_layout Plain Layout
25440 <cell alignment="left" valignment="top" usebox="none">
25443 \begin_layout Plain Layout
25451 <cell alignment="left" valignment="top" usebox="none">
25454 \begin_layout Plain Layout
25460 <cell alignment="left" valignment="top" usebox="none">
25463 \begin_layout Plain Layout
25469 <cell alignment="left" valignment="top" usebox="none">
25472 \begin_layout Plain Layout
25478 <cell alignment="left" valignment="top" usebox="none">
25481 \begin_layout Plain Layout
25487 <cell alignment="left" valignment="top" usebox="none">
25490 \begin_layout Plain Layout
25496 <cell alignment="left" valignment="top" usebox="none">
25499 \begin_layout Plain Layout
25507 <cell alignment="left" valignment="top" usebox="none">
25510 \begin_layout Plain Layout
25516 <cell alignment="left" valignment="top" usebox="none">
25519 \begin_layout Plain Layout
25525 <cell alignment="left" valignment="top" usebox="none">
25528 \begin_layout Plain Layout
25534 <cell alignment="left" valignment="top" usebox="none">
25537 \begin_layout Plain Layout
25543 <cell alignment="left" valignment="top" usebox="none">
25546 \begin_layout Plain Layout
25552 <cell alignment="left" valignment="top" usebox="none">
25555 \begin_layout Plain Layout
25563 <cell alignment="left" valignment="top" usebox="none">
25566 \begin_layout Plain Layout
25572 <cell alignment="left" valignment="top" usebox="none">
25575 \begin_layout Plain Layout
25581 <cell alignment="left" valignment="top" usebox="none">
25584 \begin_layout Plain Layout
25590 <cell alignment="left" valignment="top" usebox="none">
25593 \begin_layout Plain Layout
25599 <cell alignment="left" valignment="top" usebox="none">
25602 \begin_layout Plain Layout
25608 <cell alignment="left" valignment="top" usebox="none">
25611 \begin_layout Plain Layout
25619 <cell alignment="left" valignment="top" usebox="none">
25622 \begin_layout Plain Layout
25628 <cell alignment="left" valignment="top" usebox="none">
25631 \begin_layout Plain Layout
25637 <cell alignment="left" valignment="top" usebox="none">
25640 \begin_layout Plain Layout
25646 <cell alignment="left" valignment="top" usebox="none">
25649 \begin_layout Plain Layout
25655 <cell alignment="left" valignment="top" usebox="none">
25658 \begin_layout Plain Layout
25664 <cell alignment="left" valignment="top" usebox="none">
25667 \begin_layout Plain Layout
25681 \begin_layout Chapter
25682 List of supported LyX functions to be used in layouts
25685 \begin_layout Standard
25687 \begin_inset Tabular
25688 <lyxtabular version="3" rows="10" columns="8">
25689 <features rotate="0" tabularvalignment="middle">
25690 <column alignment="left" valignment="top" width="0">
25691 <column alignment="left" valignment="top" width="0">
25692 <column alignment="left" valignment="top" width="0">
25693 <column alignment="left" valignment="top" width="0">
25694 <column alignment="left" valignment="top" width="0">
25695 <column alignment="left" valignment="top" width="0">
25696 <column alignment="left" valignment="top" width="0">
25697 <column alignment="left" valignment="top" width="0">
25699 <cell alignment="left" valignment="top" usebox="none">
25702 \begin_layout Plain Layout
25708 <cell alignment="left" valignment="top" usebox="none">
25711 \begin_layout Plain Layout
25717 <cell alignment="left" valignment="top" usebox="none">
25720 \begin_layout Plain Layout
25726 <cell alignment="left" valignment="top" usebox="none">
25729 \begin_layout Plain Layout
25735 <cell alignment="center" valignment="top" usebox="none">
25738 \begin_layout Plain Layout
25744 <cell alignment="center" valignment="top" usebox="none">
25747 \begin_layout Plain Layout
25753 <cell alignment="center" valignment="top" usebox="none">
25756 \begin_layout Plain Layout
25762 <cell alignment="center" valignment="top" usebox="none">
25765 \begin_layout Plain Layout
25773 <cell alignment="left" valignment="top" usebox="none">
25776 \begin_layout Plain Layout
25782 <cell alignment="left" valignment="top" usebox="none">
25785 \begin_layout Plain Layout
25791 <cell alignment="left" valignment="top" usebox="none">
25794 \begin_layout Plain Layout
25800 <cell alignment="left" valignment="top" usebox="none">
25803 \begin_layout Plain Layout
25809 <cell alignment="center" valignment="top" usebox="none">
25812 \begin_layout Plain Layout
25818 <cell alignment="center" valignment="top" usebox="none">
25821 \begin_layout Plain Layout
25827 <cell alignment="center" valignment="top" usebox="none">
25830 \begin_layout Plain Layout
25836 <cell alignment="center" valignment="top" usebox="none">
25839 \begin_layout Plain Layout
25847 <cell alignment="left" valignment="top" usebox="none">
25850 \begin_layout Plain Layout
25856 <cell alignment="left" valignment="top" usebox="none">
25859 \begin_layout Plain Layout
25865 <cell alignment="left" valignment="top" usebox="none">
25868 \begin_layout Plain Layout
25874 <cell alignment="left" valignment="top" usebox="none">
25877 \begin_layout Plain Layout
25883 <cell alignment="center" valignment="top" usebox="none">
25886 \begin_layout Plain Layout
25892 <cell alignment="center" valignment="top" usebox="none">
25895 \begin_layout Plain Layout
25901 <cell alignment="center" valignment="top" usebox="none">
25904 \begin_layout Plain Layout
25910 <cell alignment="center" valignment="top" usebox="none">
25913 \begin_layout Plain Layout
25921 <cell alignment="left" valignment="top" usebox="none">
25924 \begin_layout Plain Layout
25930 <cell alignment="left" valignment="top" usebox="none">
25933 \begin_layout Plain Layout
25939 <cell alignment="left" valignment="top" usebox="none">
25942 \begin_layout Plain Layout
25948 <cell alignment="left" valignment="top" usebox="none">
25951 \begin_layout Plain Layout
25957 <cell alignment="center" valignment="top" usebox="none">
25960 \begin_layout Plain Layout
25966 <cell alignment="center" valignment="top" usebox="none">
25969 \begin_layout Plain Layout
25975 <cell alignment="center" valignment="top" usebox="none">
25978 \begin_layout Plain Layout
25984 <cell alignment="center" valignment="top" usebox="none">
25987 \begin_layout Plain Layout
25995 <cell alignment="left" valignment="top" usebox="none">
25998 \begin_layout Plain Layout
26004 <cell alignment="left" valignment="top" usebox="none">
26007 \begin_layout Plain Layout
26013 <cell alignment="left" valignment="top" usebox="none">
26016 \begin_layout Plain Layout
26022 <cell alignment="left" valignment="top" usebox="none">
26025 \begin_layout Plain Layout
26031 <cell alignment="center" valignment="top" usebox="none">
26034 \begin_layout Plain Layout
26040 <cell alignment="center" valignment="top" usebox="none">
26043 \begin_layout Plain Layout
26049 <cell alignment="center" valignment="top" usebox="none">
26052 \begin_layout Plain Layout
26058 <cell alignment="center" valignment="top" usebox="none">
26061 \begin_layout Plain Layout
26069 <cell alignment="left" valignment="top" usebox="none">
26072 \begin_layout Plain Layout
26078 <cell alignment="left" valignment="top" usebox="none">
26081 \begin_layout Plain Layout
26087 <cell alignment="left" valignment="top" usebox="none">
26090 \begin_layout Plain Layout
26096 <cell alignment="left" valignment="top" usebox="none">
26099 \begin_layout Plain Layout
26105 <cell alignment="center" valignment="top" usebox="none">
26108 \begin_layout Plain Layout
26114 <cell alignment="center" valignment="top" usebox="none">
26117 \begin_layout Plain Layout
26123 <cell alignment="center" valignment="top" usebox="none">
26126 \begin_layout Plain Layout
26132 <cell alignment="center" valignment="top" usebox="none">
26135 \begin_layout Plain Layout
26143 <cell alignment="left" valignment="top" usebox="none">
26146 \begin_layout Plain Layout
26152 <cell alignment="left" valignment="top" usebox="none">
26155 \begin_layout Plain Layout
26161 <cell alignment="left" valignment="top" usebox="none">
26164 \begin_layout Plain Layout
26170 <cell alignment="left" valignment="top" usebox="none">
26173 \begin_layout Plain Layout
26179 <cell alignment="center" valignment="top" usebox="none">
26182 \begin_layout Plain Layout
26188 <cell alignment="center" valignment="top" usebox="none">
26191 \begin_layout Plain Layout
26197 <cell alignment="center" valignment="top" usebox="none">
26200 \begin_layout Plain Layout
26206 <cell alignment="center" valignment="top" usebox="none">
26209 \begin_layout Plain Layout
26217 <cell alignment="left" valignment="top" usebox="none">
26220 \begin_layout Plain Layout
26226 <cell alignment="left" valignment="top" usebox="none">
26229 \begin_layout Plain Layout
26235 <cell alignment="left" valignment="top" usebox="none">
26238 \begin_layout Plain Layout
26244 <cell alignment="left" valignment="top" usebox="none">
26247 \begin_layout Plain Layout
26253 <cell alignment="center" valignment="top" usebox="none">
26256 \begin_layout Plain Layout
26262 <cell alignment="center" valignment="top" usebox="none">
26265 \begin_layout Plain Layout
26271 <cell alignment="center" valignment="top" usebox="none">
26274 \begin_layout Plain Layout
26280 <cell alignment="center" valignment="top" usebox="none">
26283 \begin_layout Plain Layout
26291 <cell alignment="left" valignment="top" usebox="none">
26294 \begin_layout Plain Layout
26300 <cell alignment="left" valignment="top" usebox="none">
26303 \begin_layout Plain Layout
26309 <cell alignment="left" valignment="top" usebox="none">
26312 \begin_layout Plain Layout
26318 <cell alignment="left" valignment="top" usebox="none">
26321 \begin_layout Plain Layout
26327 <cell alignment="center" valignment="top" usebox="none">
26330 \begin_layout Plain Layout
26336 <cell alignment="center" valignment="top" usebox="none">
26339 \begin_layout Plain Layout
26345 <cell alignment="center" valignment="top" usebox="none">
26348 \begin_layout Plain Layout
26354 <cell alignment="center" valignment="top" usebox="none">
26357 \begin_layout Plain Layout
26365 <cell alignment="left" valignment="top" usebox="none">
26368 \begin_layout Plain Layout
26374 <cell alignment="left" valignment="top" usebox="none">
26377 \begin_layout Plain Layout
26383 <cell alignment="left" valignment="top" usebox="none">
26386 \begin_layout Plain Layout
26392 <cell alignment="left" valignment="top" usebox="none">
26395 \begin_layout Plain Layout
26401 <cell alignment="center" valignment="top" usebox="none">
26404 \begin_layout Plain Layout
26410 <cell alignment="center" valignment="top" usebox="none">
26413 \begin_layout Plain Layout
26419 <cell alignment="center" valignment="top" usebox="none">
26422 \begin_layout Plain Layout
26428 <cell alignment="center" valignment="top" usebox="none">
26431 \begin_layout Plain Layout
26445 \begin_layout Standard
26446 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
26447 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
26448 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
26449 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
26450 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
26451 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
26452 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
26453 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
26454 xargs xcolor xy yhmath
26457 \begin_layout Chapter
26458 Names of available colors to be used in layouts
26459 \begin_inset CommandInset label
26461 name "chap:Names-of-colors"
26468 \begin_layout Standard
26469 The colors listed here are the standard colors and the those that you can
26470 adjust in the LyX preferences.
26473 \begin_layout Description
26486 No particular color -- clear or default
26489 \begin_layout Description
26493 \begin_layout Description
26497 \begin_layout Description
26501 \begin_layout Description
26505 \begin_layout Description
26509 \begin_layout Description
26513 \begin_layout Description
26517 \begin_layout Description
26521 \begin_layout Description
26522 cursor Cursor color
26525 \begin_layout Description
26526 background Background color
26529 \begin_layout Description
26530 foreground Foreground color
26533 \begin_layout Description
26534 selection Background color of selected text
26537 \begin_layout Description
26538 selectiontext Foreground color of selected text
26541 \begin_layout Description
26542 latex Text color in LaTeX mode
26545 \begin_layout Description
26546 preview The color used for previews
26549 \begin_layout Description
26550 inlinecompletion Inline completion color
26553 \begin_layout Description
26554 nonunique_inlinecompletion Inline completion color for the non-unique part
26557 \begin_layout Description
26558 notelabel Label color for notes
26561 \begin_layout Description
26562 notebg Background color of notes
26565 \begin_layout Description
26566 commentlabel Label color for comments
26569 \begin_layout Description
26570 commentbg Background color of comments
26573 \begin_layout Description
26574 greyedoutlabel Label color for greyedout insets
26577 \begin_layout Description
26578 greyedouttext Color for greyedout inset text
26581 \begin_layout Description
26582 greyedoutbg Background color of greyedout inset
26585 \begin_layout Description
26586 shadedbg Background color of shaded box
26589 \begin_layout Description
26590 listingsbg Background color of listings inset
26593 \begin_layout Description
26594 branchlabel Label color for branches
26597 \begin_layout Description
26598 footlabel Label color for footnotes
26601 \begin_layout Description
26602 indexlabel Label color for index insets
26605 \begin_layout Description
26606 marginlabel Label color for margin notes
26609 \begin_layout Description
26610 phantomtext Text color for phantom insets
26613 \begin_layout Description
26614 urllabel Label color for URL insets
26617 \begin_layout Description
26618 urltext Color for URL inset text
26621 \begin_layout Description
26622 depthbar Color for the depth bars in the margin
26625 \begin_layout Description
26626 language Color for marking foreign language words
26629 \begin_layout Description
26630 command Text color for command insets
26633 \begin_layout Description
26634 commandbg Background color for command insets
26637 \begin_layout Description
26638 commandframe Frame color for command insets
26641 \begin_layout Description
26642 special Special chars text color
26645 \begin_layout Description
26646 graphicsbg Graphics inset background color
26649 \begin_layout Description
26650 math Math inset text color
26653 \begin_layout Description
26654 mathbg Math inset background color
26657 \begin_layout Description
26658 mathmacrobg Macro math inset background color
26661 \begin_layout Description
26662 mathmacrohoverbg Macro math inset background color hovered
26665 \begin_layout Description
26666 mathmacrolabel Macro math label color
26669 \begin_layout Description
26670 mathmacroframe Macro math frame color
26673 \begin_layout Description
26674 mathmacroblend Macro math blended color
26677 \begin_layout Description
26678 mathmacrooldarg Macro template color for old parameters
26681 \begin_layout Description
26682 mathmacronewarg Macro template color for new parameters
26685 \begin_layout Description
26686 mathframe Math inset frame color under focus
26689 \begin_layout Description
26690 mathcorners Math inset frame color not under focus
26693 \begin_layout Description
26694 mathline Math line color
26697 \begin_layout Description
26698 collapsable Collapsable insets text
26701 \begin_layout Description
26702 collapsableframe Collapsable insets frame
26705 \begin_layout Description
26706 insetbg Inset marker background color
26709 \begin_layout Description
26710 insetframe Inset marker frame color
26713 \begin_layout Description
26714 error Error box text color
26717 \begin_layout Description
26718 eolmarker End of line marker color
26721 \begin_layout Description
26722 added_space Added space colour
26725 \begin_layout Description
26726 appendix Appendix marker color
26729 \begin_layout Description
26730 changebar Changebar color
26733 \begin_layout Description
26734 deletedtext Deleted text color
26737 \begin_layout Description
26738 addedtext Added text color
26741 \begin_layout Description
26742 changedtextauthor1 Changed text color author 1
26745 \begin_layout Description
26746 changedtextauthor2 Changed text color author 2
26749 \begin_layout Description
26750 changedtextauthor3 Changed text color author 3
26753 \begin_layout Description
26754 changedtextauthor4 Changed text color author 4
26757 \begin_layout Description
26758 changedtextauthor5 Changed text color author 5
26761 \begin_layout Description
26762 deletedtextmodifier Deleted text modifying color
26765 \begin_layout Description
26766 tabularline Table line color
26769 \begin_layout Description
26770 tabularonoffline Table line color
26773 \begin_layout Description
26774 bottomarea Bottom area color
26777 \begin_layout Description
26778 newpage New page color
26781 \begin_layout Description
26782 pagebreak Page break color
26785 \begin_layout Description
26786 buttonframe Color used for button frame
26789 \begin_layout Description
26790 buttonbg Color used for bottom background
26793 \begin_layout Description
26794 buttonhoverbg Color used for buttom under focus
26797 \begin_layout Description
26798 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
26802 \begin_layout Description
26803 previewframe Preview frame color
26806 \begin_layout Description
26807 inherit Color is inherited
26810 \begin_layout Description
26811 regexpframe Color for regexp frame
26814 \begin_layout Description
26815 ignore For ignoring updates of a color