1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
8 % DO NOT ALTER THIS PREAMBLE!!!
10 % This preamble is designed to ensure that this document prints
11 % out as advertised. If you mess with this preamble,
12 % parts of this document may not print out as expected. If you
13 % have problems LaTeXing this file, please contact
14 % the documentation team
15 % email: lyx-docs@lists.lyx.org
17 % the pages of the TOC is numbered roman
18 % and a pdf-bookmark for the TOC is added
19 \let\myTOC\tableofcontents
20 \renewcommand\tableofcontents{%
22 \pdfbookmark[1]{\contentsname}{}
26 % increase link area for cross-references and autoname them,
27 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
28 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
29 \@ifpackageloaded{babel}{
30 \addto\extrasenglish{%
31 \renewcommand*{\equationautorefname}[1]{}%
32 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
33 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
34 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
38 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
39 \use_default_options false
43 \maintain_unincluded_children false
45 \language_package default
48 \font_roman "lmodern" "default"
49 \font_sans "lmss" "default"
50 \font_typewriter "lmtt" "default"
51 \font_math "auto" "auto"
52 \font_default_family default
53 \use_non_tex_fonts false
56 \font_sf_scale 100 100
57 \font_tt_scale 100 100
59 \default_output_format pdf2
61 \bibtex_command default
62 \index_command default
66 \pdf_title "LyX Configuration Manual"
67 \pdf_author "LyX Team"
68 \pdf_subject "LyX-documentation Customization"
69 \pdf_keywords "LyX, documentation, customization"
71 \pdf_bookmarksnumbered true
72 \pdf_bookmarksopen true
73 \pdf_bookmarksopenlevel 1
78 \pdf_pdfusetitle false
79 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
82 \use_package amsmath 0
83 \use_package amssymb 0
86 \use_package mathdots 1
87 \use_package mathtools 0
89 \use_package stackrel 0
90 \use_package stmaryrd 0
91 \use_package undertilde 0
93 \cite_engine_type default
97 \paperorientation portrait
112 \paragraph_separation indent
113 \paragraph_indentation default
114 \quotes_language english
117 \paperpagestyle headings
118 \tracking_changes false
119 \output_changes false
128 Customizing \SpecialChar LyX
129 : Features for the Advanced User
133 by the \SpecialChar LyX
138 \begin_layout Plain Layout
140 If you have comments or error corrections, please send them to the \SpecialChar LyX
143 \begin_inset CommandInset href
145 target "lyx-docs@lists.lyx.org"
152 \begin_inset Quotes eld
156 \begin_inset Quotes erd
159 in the subject header, and please cc the current maintainer of this file,
160 Richard Heck <rgheck@comcast.net>.
166 \begin_inset Newline newline
170 \begin_inset Newline newline
176 \begin_layout Standard
177 \begin_inset CommandInset toc
178 LatexCommand tableofcontents
185 \begin_layout Standard
186 \begin_inset Note Note
189 \begin_layout Plain Layout
190 Please use change tracking when modifying this document.
191 This makes it easier for our translators to recognize things that have
192 been changed, and it helps the maintainer keep up-to-date with what's been
201 \begin_layout Chapter
205 \begin_layout Standard
206 This manual covers the customization features present in \SpecialChar LyX
208 In it, we discuss issues like keyboard shortcuts, screen previewing options,
209 printer options, sending commands to \SpecialChar LyX
210 via the \SpecialChar LyX
211 Server, internationalization,
212 installing new \SpecialChar LaTeX
213 classes and \SpecialChar LyX
215 We can't possibly hope to touch on everything you can change—our developers
216 add new features faster than we can document them—but we will explain the
217 most common customizations and hopefully point you in the right direction
218 for some of the more obscure ones.
221 \begin_layout Standard
222 \begin_inset Branch OutDated
225 \begin_layout Standard
226 Information from previous versions of this document that now seems to be
227 outdated is contained in the OutDated branch of this document.
228 By default, this information will not appear in the \SpecialChar LaTeX
237 \begin_layout Chapter
242 \begin_layout Standard
243 This chapter aims to help you to find your way through the \SpecialChar LyX
246 Before continuing to read this chapter, you should find out where your
248 library and user directories are by using
249 \begin_inset Flex Noun
252 \begin_layout Plain Layout
253 Help\SpecialChar menuseparator
264 The library directory is the place where \SpecialChar LyX
265 places its system-wide configuration
266 files; the user directory is where you can place your modified versions.
267 We will call the former
268 \begin_inset Flex Code
271 \begin_layout Plain Layout
278 \begin_inset Flex Noun
281 \begin_layout Plain Layout
287 in the remainder of this document.
291 \begin_layout Section
293 \begin_inset Flex Code
296 \begin_layout Plain Layout
305 \begin_layout Standard
306 \begin_inset Flex Code
309 \begin_layout Plain Layout
315 and its sub-directories contain a number of files and that can be used
316 to customize \SpecialChar LyX
318 You can change many of these files from within \SpecialChar LyX
320 \begin_inset Flex Noun
323 \begin_layout Plain Layout
324 Tools\SpecialChar menuseparator
331 Most customization that you will want to do in \SpecialChar LyX
332 is possible through this
334 However, many other inner aspects of \SpecialChar LyX
335 can be customized by modifying the
337 \begin_inset Flex Code
340 \begin_layout Plain Layout
347 These files fall in different categories, described in the following subsection
351 \begin_layout Subsection
352 Automatically generated files
355 \begin_layout Standard
356 The files, which are to be found in
357 \begin_inset Flex Noun
360 \begin_layout Plain Layout
366 , are generated when you configure \SpecialChar LyX
368 They contain various default values that are guessed by inspection.
369 In general, it is not a good idea to modify them, since they might be overwritt
373 \begin_layout Labeling
374 \labelwidthstring 00.00.0000
375 \begin_inset Flex Code
378 \begin_layout Plain Layout
384 contains defaults for various commands.
387 \begin_layout Labeling
388 \labelwidthstring 00.00.0000
389 \begin_inset Flex Code
392 \begin_layout Plain Layout
398 contains the list of packages that have been recognized by \SpecialChar LyX
400 It is currently unused by the \SpecialChar LyX
401 program itself, but the information extracted,
402 and more, is made available with
403 \begin_inset Flex Noun
406 \begin_layout Plain Layout
407 Help\SpecialChar menuseparator
421 \begin_layout Labeling
422 \labelwidthstring 00.00.0000
423 \begin_inset Flex Code
426 \begin_layout Plain Layout
432 the list of text classes that have been found in your
433 \begin_inset Flex Code
436 \begin_layout Plain Layout
442 directories, along with the associated \SpecialChar LaTeX
443 document class and their description.
446 \begin_layout Labeling
447 \labelwidthstring 00.00.0000
448 \begin_inset Flex Code
451 \begin_layout Plain Layout
457 the list of layout modules found in your
458 \begin_inset Flex Code
461 \begin_layout Plain Layout
470 \begin_layout Labeling
471 \labelwidthstring 00.00.0000
472 \begin_inset Flex Code
475 \begin_layout Plain Layout
481 lists of various sorts of \SpecialChar LaTeX
482 -related files found on your system
485 \begin_layout Labeling
486 \labelwidthstring 00.00.0000
487 \begin_inset Flex Code
490 \begin_layout Plain Layout
491 doc/\SpecialChar LaTeX
497 is automatically generated during configuration from the file
498 \begin_inset Flex Code
501 \begin_layout Plain Layout
509 It contains information on your \SpecialChar LaTeX
513 \begin_layout Subsection
517 \begin_layout Standard
518 These directories are duplicated between
519 \begin_inset Flex Code
522 \begin_layout Plain Layout
529 \begin_inset Flex Code
532 \begin_layout Plain Layout
539 If a particular files exists in both places, the one in
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
552 \begin_layout Labeling
553 \labelwidthstring 00.00.0000
554 \begin_inset Flex Code
557 \begin_layout Plain Layout
563 this directory contains files with the extension
564 \begin_inset Flex Code
567 \begin_layout Plain Layout
573 that define the keybindings used in \SpecialChar LyX
575 If there exists an internationalized version of the bind file named
576 \begin_inset Flex Code
579 \begin_layout Plain Layout
585 , that will be used first.
588 \begin_layout Labeling
589 \labelwidthstring 00.00.0000
590 \begin_inset Flex Code
593 \begin_layout Plain Layout
599 contains graphics files that can be included in documents.
603 \begin_layout Labeling
604 \labelwidthstring 00.00.0000
605 \begin_inset Flex Code
608 \begin_layout Plain Layout
614 contains \SpecialChar LyX
615 documentation files (including the one you are currently reading).
617 \begin_inset Flex Code
620 \begin_layout Plain Layout
627 deserves special attention, as noted above.
628 The internationalized help docs are in subdirectories
629 \begin_inset Flex Code
632 \begin_layout Plain Layout
639 \begin_inset Quotes eld
643 \begin_inset Quotes erd
646 is the ISO language code.
648 \begin_inset CommandInset ref
650 reference "cha:Internationalizing-LyX"
657 \begin_layout Labeling
658 \labelwidthstring 00.00.0000
659 \begin_inset Flex Code
662 \begin_layout Plain Layout
668 contains example files that explain how to use some features.
669 In the file browser, press the
670 \begin_inset Flex Noun
673 \begin_layout Plain Layout
682 \begin_layout Labeling
683 \labelwidthstring 00.00.0000
684 \begin_inset Flex Code
687 \begin_layout Plain Layout
693 contains image files that are used by the
694 \begin_inset Flex Noun
697 \begin_layout Plain Layout
704 In addition, it also contains the individual icons used in the toolbar
705 and the banners that can be shown when \SpecialChar LyX
709 \begin_layout Labeling
710 \labelwidthstring 00.00.0000
711 \begin_inset Flex Code
714 \begin_layout Plain Layout
720 contains keyboard keymapping files.
722 \begin_inset CommandInset ref
724 reference "sec:International-Keymap-Stuff"
731 \begin_layout Labeling
732 \labelwidthstring 00.00.0000
733 \begin_inset Flex Code
736 \begin_layout Plain Layout
742 contains the text class and module files described in
743 \begin_inset CommandInset ref
745 reference "cha:Installing-New-Document"
752 \begin_layout Labeling
753 \labelwidthstring 00.00.0000
754 \begin_inset Flex Code
757 \begin_layout Plain Layout
764 \begin_inset Flex Code
767 \begin_layout Plain Layout
773 Python scripts used to convert between \SpecialChar LyX
775 These can be run from the command line if, say, you want to batch-convert
779 \begin_layout Labeling
780 \labelwidthstring 00.00.0000
781 \begin_inset Flex Code
784 \begin_layout Plain Layout
790 contains some files that demonstrate the capabilities of the
791 \begin_inset Flex Noun
794 \begin_layout Plain Layout
805 Also contains some scripts used by \SpecialChar LyX
809 \begin_layout Labeling
810 \labelwidthstring 00.00.0000
811 \begin_inset Flex Code
814 \begin_layout Plain Layout
820 contains the standard \SpecialChar LyX
821 template files described in
822 \begin_inset CommandInset ref
824 reference "subsec:Creating-Templates"
831 \begin_layout Labeling
832 \labelwidthstring 00.00.0000
833 \begin_inset Flex Code
836 \begin_layout Plain Layout
842 contains files with the extension
843 \begin_inset Flex Code
846 \begin_layout Plain Layout
852 that define the user interface to \SpecialChar LyX
854 That is, the files define which items appear in which menus and the items
855 appearing on the toolbar.
858 \begin_layout Subsection
859 Files you don't want to modify
862 \begin_layout Standard
863 These files are used internally by \SpecialChar LyX
864 and you generally do not need to modify
865 them unless you are a developer.
868 \begin_layout Labeling
869 \labelwidthstring 00.00.0000
870 \begin_inset Flex Code
873 \begin_layout Plain Layout
879 this file contains the list of \SpecialChar LyX
881 The contents are displayed with the menu entry
882 \begin_inset Flex Noun
885 \begin_layout Plain Layout
886 Help\SpecialChar menuseparator
899 \begin_layout Labeling
900 \labelwidthstring 00.00.0000
901 \begin_inset Flex Code
904 \begin_layout Plain Layout
910 this is a \SpecialChar LaTeX
911 script used during the configuration process.
915 \begin_layout Labeling
916 \labelwidthstring 00.00.0000
917 \begin_inset Flex Code
920 \begin_layout Plain Layout
926 this is a Python script that is used to re-configure \SpecialChar LyX
928 It creates configuration files in the directory it was run from.
931 \begin_layout Subsection
932 Other files needing a line or two
935 \begin_layout Labeling
936 \labelwidthstring 00.00.0000
937 \begin_inset Flex Code
940 \begin_layout Plain Layout
946 this contains tables describing how different character encodings can be
950 \begin_layout Labeling
951 \labelwidthstring 00.00.0000
952 \begin_inset Flex Code
955 \begin_layout Plain Layout
961 this file contains the templates available to the new
962 \begin_inset Flex Noun
965 \begin_layout Plain Layout
976 \begin_inset CommandInset ref
978 reference "chap:Including-External-Material"
985 \begin_layout Labeling
986 \labelwidthstring 00.00.0000
987 \begin_inset Flex Code
990 \begin_layout Plain Layout
996 this file contains a list of all the languages currently supported by \SpecialChar LyX
1000 \begin_layout Labeling
1001 \labelwidthstring 00.00.0000
1002 \begin_inset Flex Code
1005 \begin_layout Plain Layout
1011 contains information about the supported fonts.
1014 \begin_layout Labeling
1015 \labelwidthstring 00.00.0000
1016 \begin_inset Flex Code
1019 \begin_layout Plain Layout
1025 this file contains translations for internationalized paragraph styles
1027 \begin_inset CommandInset ref
1029 reference "subsec:I18n"
1036 \begin_layout Labeling
1037 \labelwidthstring 00.00.0000
1038 \begin_inset Flex Code
1041 \begin_layout Plain Layout
1047 this file contains information about unicode-encoded glyphs and the way
1048 they are supported by \SpecialChar LyX
1049 via \SpecialChar LaTeX
1053 \begin_layout Section
1054 Your local configuration directory
1057 \begin_layout Standard
1058 Even if you are using \SpecialChar LyX
1059 as an unprivileged user, you might want to change
1061 configuration for your own use.
1063 \begin_inset Flex Code
1066 \begin_layout Plain Layout
1072 directory contains all your personal configuration files.
1073 This is the directory described as
1074 \begin_inset Quotes eld
1078 \begin_inset Quotes erd
1082 \begin_inset Flex Noun
1085 \begin_layout Plain Layout
1086 Help\SpecialChar menuseparator
1088 \begin_inset space ~
1097 This directory is used as a mirror of
1098 \begin_inset Flex Code
1101 \begin_layout Plain Layout
1107 , which means that every file in
1108 \begin_inset Flex Code
1111 \begin_layout Plain Layout
1117 is a replacement for the corresponding file in
1118 \begin_inset Flex Code
1121 \begin_layout Plain Layout
1128 Any configuration file described in the above sections can be placed either
1129 in the system-wide directory, in which case it will affect all users, or
1130 in your local directory for your own use.
1133 \begin_layout Standard
1134 To make things clearer, let's provide a few examples:
1137 \begin_layout Itemize
1138 The preferences set in the
1139 \begin_inset Flex Noun
1142 \begin_layout Plain Layout
1143 Tools\SpecialChar menuseparator
1149 dialog are saved to a file
1150 \begin_inset Flex Code
1153 \begin_layout Plain Layout
1160 \begin_inset Flex Code
1163 \begin_layout Plain Layout
1172 \begin_layout Itemize
1173 When you reconfigure using
1174 \begin_inset Flex Noun
1177 \begin_layout Plain Layout
1178 Tools\SpecialChar menuseparator
1186 \begin_inset Flex Code
1189 \begin_layout Plain Layout
1195 script, and the resulting files are written in your local configuration
1197 This means that any additional text class file that you might have added
1199 \begin_inset Flex Code
1202 \begin_layout Plain Layout
1208 will be added to the list of classes in the
1209 \begin_inset Flex Noun
1212 \begin_layout Plain Layout
1213 Document\SpecialChar menuseparator
1222 \begin_layout Itemize
1223 If you get some updated documentation from \SpecialChar LyX
1224 ftp site and cannot install
1225 it because you do not have sysadmin rights on your system, you can just
1227 \begin_inset Flex Code
1230 \begin_layout Plain Layout
1236 and the items in the
1237 \begin_inset Flex Noun
1240 \begin_layout Plain Layout
1246 menu will open them!
1249 \begin_layout Section
1250 Running \SpecialChar LyX
1251 with multiple configurations
1254 \begin_layout Standard
1255 The configuration freedom of the local configuration directory may not suffice
1256 if you want to have more than one configuration at your disposal.
1257 For example, you may want to be use different key bindings or printer settings
1259 You can achieve this by having several such directories.
1260 You then specify which directory to use at run-time.
1263 \begin_layout Standard
1264 Invoking \SpecialChar LyX
1265 with the command line switch
1266 \begin_inset Flex Code
1269 \begin_layout Plain Layout
1279 instructs the program to read the configuration from that directory, and
1280 not from the default directory.
1281 (You can determine the default directory by running \SpecialChar LyX
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1292 switch.) If the specified directory does not exist, \SpecialChar LyX
1294 for you, just like it does for the default directory on the first time
1295 you run the program.
1296 You can modify the configuration options in this additional user directory
1297 exactly as you would for the default directory.
1298 These directories are completely independent (but read on).
1299 Note that setting the environment variable
1300 \begin_inset Flex Code
1303 \begin_layout Plain Layout
1309 to some value has exactly the same effect.
1312 \begin_layout Standard
1313 Having several configurations also requires more maintenance: if you want
1314 to add a new layout to
1315 \begin_inset Flex Code
1318 \begin_layout Plain Layout
1324 which you want available from all your configurations, you must add it
1325 to each directory separately.
1326 You can avoid this with the following trick: after \SpecialChar LyX
1327 creates the additional
1328 directory, most of the subdirectories (see above) are empty.
1329 If you want the new configuration to mirror an existing one, replace the
1330 empty subdirectory with a symbolic link to the matching subdirectory in
1331 the existing configuration.
1333 \begin_inset Flex Code
1336 \begin_layout Plain Layout
1342 subdirectory, however, since it contains a file written by the configuration
1343 script (also accessible through
1344 \begin_inset Flex Noun
1347 \begin_layout Plain Layout
1348 Tools\SpecialChar menuseparator
1354 ) which is configuration-specific.
1357 \begin_layout Chapter
1358 The Preferences dialog
1361 \begin_layout Standard
1362 All options of the preferences dialog are described in the Appendix
1364 The Preferences Dialog
1371 For some options you might find here more details.
1374 \begin_layout Section
1376 \begin_inset CommandInset label
1385 \begin_layout Standard
1386 The first step is to define your file formats if they are not already defined.
1388 \begin_inset Flex Noun
1391 \begin_layout Plain Layout
1392 Tools\SpecialChar menuseparator
1400 \begin_inset Flex Noun
1403 \begin_layout Plain Layout
1404 File Handling\SpecialChar menuseparator
1411 \begin_inset Flex Noun
1414 \begin_layout Plain Layout
1420 button to define your new format.
1422 \begin_inset Flex Noun
1425 \begin_layout Plain Layout
1431 field contains the name used to identify the format in the GUI.
1433 \begin_inset Flex Noun
1436 \begin_layout Plain Layout
1442 is used to identify the format internally.
1443 You will also need to enter a file extension.
1444 These are all required.
1446 \begin_inset Flex Noun
1449 \begin_layout Plain Layout
1455 field is used to provide a keyboard shortcut on the menus.
1456 (For example, pressing
1457 \begin_inset Flex Noun
1460 \begin_layout Plain Layout
1467 \begin_inset Flex Noun
1470 \begin_layout Plain Layout
1471 Document\SpecialChar menuseparator
1472 View (Other Formats)\SpecialChar menuseparator
1481 \begin_layout Standard
1483 \begin_inset Flex Noun
1486 \begin_layout Plain Layout
1493 \begin_inset Flex Noun
1496 \begin_layout Plain Layout
1503 For example, you might want to use
1504 \begin_inset Flex Noun
1507 \begin_layout Plain Layout
1513 to view PostScript files.
1514 You can enter the command needed to start the program in the corresponding
1516 In defining this command, you can use the four variables listed in the
1518 The viewer is launched when you view an image in \SpecialChar LyX
1520 \begin_inset Flex Noun
1523 \begin_layout Plain Layout
1524 Document\SpecialChar menuseparator
1531 The editor is for example launched when you right-click on an image and
1533 \begin_inset Flex Noun
1536 \begin_layout Plain Layout
1542 in the appearing context menu.
1545 \begin_layout Standard
1547 \begin_inset Flex Noun
1550 \begin_layout Plain Layout
1556 type of a format is optional, but if it is specified, it must be unique
1558 It is used to detect files of this format from the file contents.
1559 For some important file formats there is no MIME type officially registered
1561 \begin_inset CommandInset href
1564 target "http://www.iana.org/assignments/media-types/"
1569 Therefore \SpecialChar LyX
1570 uses the extended list of MIME types as specified by
1571 \begin_inset CommandInset href
1573 name "freedesktop.org"
1574 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1581 \begin_layout Standard
1583 \begin_inset Flex Noun
1586 \begin_layout Plain Layout
1592 option tells \SpecialChar LyX
1593 that a format is suitable for document export.
1594 If this is set and if a suitable conversion route exists (see
1595 \begin_inset CommandInset ref
1597 reference "sec:Converters"
1601 ), the format will appear in the
1602 \begin_inset Flex Noun
1605 \begin_layout Plain Layout
1606 File\SpecialChar menuseparator
1613 The format will also appear in the
1614 \begin_inset Flex Noun
1617 \begin_layout Plain Layout
1618 Document\SpecialChar menuseparator
1624 menu if a viewer is specified for the format.
1625 Pure image formats, such as
1626 \begin_inset Flex Code
1629 \begin_layout Plain Layout
1635 , should not use this option.
1636 Formats that can both represent vector graphics and documents like
1637 \begin_inset Flex Code
1640 \begin_layout Plain Layout
1649 \begin_layout Standard
1651 \begin_inset Flex Noun
1654 \begin_layout Plain Layout
1655 Vector graphics format
1660 tells \SpecialChar LyX
1661 that a format can contain vector graphics.
1662 This information is used to determine the target format of included graphics
1664 \begin_inset Flex Noun
1667 \begin_layout Plain Layout
1674 Included graphics may need to be converted to either
1675 \begin_inset Flex Noun
1678 \begin_layout Plain Layout
1685 \begin_inset Flex Noun
1688 \begin_layout Plain Layout
1695 \begin_inset Flex Noun
1698 \begin_layout Plain Layout
1705 \begin_inset Flex Noun
1708 \begin_layout Plain Layout
1714 cannot handle other image formats.
1715 If an included graphic is not already in
1716 \begin_inset Flex Noun
1719 \begin_layout Plain Layout
1726 \begin_inset Flex Noun
1729 \begin_layout Plain Layout
1736 \begin_inset Flex Noun
1739 \begin_layout Plain Layout
1745 format, it is converted to
1746 \begin_inset Flex Noun
1749 \begin_layout Plain Layout
1755 if the vector format option is set, and otherwise to
1756 \begin_inset Flex Noun
1759 \begin_layout Plain Layout
1768 \begin_layout Section
1772 \begin_layout Standard
1773 Since all conversions from one format to another take place in \SpecialChar LyX
1775 directory, it is sometimes necessary to modify a file before copying it
1776 to the temporary directory in order that the conversion may be performed.
1780 \begin_layout Plain Layout
1781 For example, the file may refer to other files—images, for example—using
1782 relative file names, and these may become invalid when the file is copied
1783 to the temporary directory.
1788 This is done by a Copier: It copies a file to (or from) the temporary directory
1789 and may modify it in the process.
1792 \begin_layout Standard
1793 The definitions of the copiers may use four variables:
1796 \begin_layout Labeling
1797 \labelwidthstring 00.00.0000
1798 \begin_inset Flex Code
1801 \begin_layout Plain Layout
1807 The \SpecialChar LyX
1808 system directory (e.
1809 \begin_inset space \thinspace{}
1813 \begin_inset space \space{}
1817 \begin_inset Flex Noun
1820 \begin_layout Plain Layout
1829 \begin_layout Labeling
1830 \labelwidthstring 00.00.0000
1831 \begin_inset Flex Code
1834 \begin_layout Plain Layout
1843 \begin_layout Labeling
1844 \labelwidthstring 00.00.0000
1845 \begin_inset Flex Code
1848 \begin_layout Plain Layout
1857 \begin_layout Labeling
1858 \labelwidthstring 00.00.0000
1859 \begin_inset Flex Code
1862 \begin_layout Plain Layout
1868 The base name (without filename extension) in the \SpecialChar LyX
1872 \begin_layout Labeling
1873 \labelwidthstring 00.00.0000
1874 \begin_inset Flex Code
1877 \begin_layout Plain Layout
1883 The full directory path of the \SpecialChar LyX
1887 \begin_layout Labeling
1888 \labelwidthstring 00.00.0000
1889 \begin_inset Flex Code
1892 \begin_layout Plain Layout
1898 The full pathname to the original \SpecialChar LyX
1899 file being processed
1902 \begin_layout Labeling
1903 \labelwidthstring 00.00.0000
1904 \begin_inset Flex Code
1907 \begin_layout Plain Layout
1913 The filename (without any directory path) of the \SpecialChar LyX
1917 \begin_layout Labeling
1918 \labelwidthstring 00.00.0000
1919 \begin_inset Flex Code
1922 \begin_layout Plain Layout
1928 The `\SpecialChar LaTeX
1932 \begin_layout Standard
1933 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1941 It is relevant only when exporting files suitable for such inclusion.
1944 \begin_layout Standard
1945 Copiers can be used to do almost anything with output files.
1946 For example, suppose you want generated pdf files to be copied to a special
1948 \begin_inset Flex Code
1951 \begin_layout Plain Layout
1958 Then you could write a shell script such as this one:
1961 \begin_layout Standard
1962 \begin_inset listings
1966 \begin_layout Plain Layout
1971 \begin_layout Plain Layout
1976 \begin_layout Plain Layout
1978 TOFILE=`basename $2`
1981 \begin_layout Plain Layout
1983 cp $FROMFILE /home/you/pdf/$TOFILE
1988 Save it in your local \SpecialChar LyX
1990 \begin_inset Flex Code
1993 \begin_layout Plain Layout
1994 /home/you/.lyx/scripts/pdfcopier.sh
1999 —and make it executable, if you need to do so on your platform.
2001 \begin_inset Flex Noun
2004 \begin_layout Plain Layout
2005 Tools\SpecialChar menuseparator
2011 dialog, select under
2012 \begin_inset Flex Noun
2015 \begin_layout Plain Layout
2016 File Handling\SpecialChar menuseparator
2023 \begin_inset Flex Noun
2026 \begin_layout Plain Layout
2032 format—or one of the other pdf formats—and enter
2033 \begin_inset Flex Code
2036 \begin_layout Plain Layout
2037 pdfcopier.sh $$i $$o
2043 \begin_inset Flex Noun
2046 \begin_layout Plain Layout
2056 \begin_layout Standard
2057 Copiers are used by \SpecialChar LyX
2058 in various of its own conversions.
2059 For example, if appropriate programs are found, \SpecialChar LyX
2060 will automatically install
2062 \begin_inset Flex Noun
2065 \begin_layout Plain Layout
2072 \begin_inset Flex Noun
2075 \begin_layout Plain Layout
2077 \begin_inset space ~
2086 When these formats are exported, the copier sees that not just the main
2087 HTML file but various associated files (style files, images, etc.) are also
2089 All these files are written to a subdirectory of the directory in which
2090 the original \SpecialChar LyX
2095 \begin_layout Plain Layout
2096 This copier can be customized.
2098 \begin_inset Quotes eld
2102 \begin_inset Quotes erd
2105 argument takes a comma-separated list of extensions to be copied; if it
2106 is omitted, all files will be copied.
2108 \begin_inset Quotes eld
2112 \begin_inset Quotes erd
2115 argument determines the extension added to the generated directory.
2117 \begin_inset Quotes eld
2121 \begin_inset Flex Noun
2124 \begin_layout Plain Layout
2131 \begin_inset Quotes erd
2134 , so HTML generated from
2135 \begin_inset Flex Noun
2138 \begin_layout Plain Layout
2139 /path/to/filename.lyx
2145 \begin_inset Flex Noun
2148 \begin_layout Plain Layout
2149 /path/to/filename.html.LyXconv
2163 \begin_layout Section
2165 \begin_inset CommandInset label
2167 name "sec:Converters"
2174 \begin_layout Standard
2175 You can define your own Converters to convert files between different formats.
2177 \begin_inset Flex Noun
2180 \begin_layout Plain Layout
2181 Tools\SpecialChar menuseparator
2182 Preferences\SpecialChar menuseparator
2183 File Handling\SpecialChar menuseparator
2192 \begin_layout Standard
2193 To define a new converter, select the
2194 \begin_inset Flex Noun
2197 \begin_layout Plain Layout
2199 \begin_inset space ~
2208 \begin_inset Flex Noun
2211 \begin_layout Plain Layout
2213 \begin_inset space ~
2221 from the drop-down lists, enter the command needed for the conversion,
2223 \begin_inset Flex Noun
2226 \begin_layout Plain Layout
2233 Several variables can be used in the definition of converters:
2236 \begin_layout Labeling
2237 \labelwidthstring 00.00.0000
2238 \begin_inset Flex Code
2241 \begin_layout Plain Layout
2247 The \SpecialChar LyX
2251 \begin_layout Labeling
2252 \labelwidthstring 00.00.0000
2253 \begin_inset Flex Code
2256 \begin_layout Plain Layout
2265 \begin_layout Labeling
2266 \labelwidthstring 00.00.0000
2267 \begin_inset Flex Code
2270 \begin_layout Plain Layout
2279 \begin_layout Labeling
2280 \labelwidthstring 00.00.0000
2281 \begin_inset Flex Code
2284 \begin_layout Plain Layout
2290 The base filename of the input file (i.
2291 \begin_inset space \thinspace{}
2294 g., without the extension)
2297 \begin_layout Labeling
2298 \labelwidthstring 00.00.0000
2299 \begin_inset Flex Code
2302 \begin_layout Plain Layout
2308 The path to the input file
2311 \begin_layout Labeling
2312 \labelwidthstring 00.00.0000
2313 \begin_inset Flex Code
2316 \begin_layout Plain Layout
2322 The path to the original input file (this is different from $$p when a
2323 chain of converters is called)
2326 \begin_layout Labeling
2327 \labelwidthstring 00.00.0000
2328 \begin_inset Flex Code
2331 \begin_layout Plain Layout
2337 The iconv name for the encoding of the document.
2340 \begin_layout Standard
2342 \begin_inset Flex Noun
2345 \begin_layout Plain Layout
2347 \begin_inset space ~
2355 field you can enter the following flags, separated by commas:
2358 \begin_layout Labeling
2359 \labelwidthstring 00.00.0000
2360 \begin_inset Flex Code
2363 \begin_layout Plain Layout
2369 This converter runs some form of \SpecialChar LaTeX
2371 This will make \SpecialChar LyX
2372 's \SpecialChar LaTeX
2373 error logs available.
2376 \begin_layout Labeling
2377 \labelwidthstring 00.00.0000
2378 \begin_inset Flex Code
2381 \begin_layout Plain Layout
2387 Needs the \SpecialChar LaTeX
2389 \begin_inset Flex Noun
2392 \begin_layout Plain Layout
2398 file for the conversion.
2401 \begin_layout Labeling
2402 \labelwidthstring 00.00.0000
2403 \begin_inset Flex Code
2406 \begin_layout Plain Layout
2413 \begin_inset Quotes eld
2417 \begin_inset Quotes erd
2420 file from the backend, which in practice means a \SpecialChar LaTeX
2421 file like the one we
2422 would export, without
2423 \begin_inset Flex Code
2426 \begin_layout Plain Layout
2435 \begin_layout Labeling
2436 \labelwidthstring 00.00.0000
2437 \begin_inset Flex Code
2440 \begin_layout Plain Layout
2449 \begin_layout Standard
2450 The following three flags are not really flags at all because they take
2452 \begin_inset Flex Noun
2455 \begin_layout Plain Layout
2457 \begin_inset space ~
2461 \begin_inset space ~
2472 \begin_layout Labeling
2473 \labelwidthstring 00.00.0000
2474 \begin_inset Flex Code
2477 \begin_layout Plain Layout
2483 If set, the converter's standard error will be redirected to a file
2484 \begin_inset Flex Code
2487 \begin_layout Plain Layout
2493 , and the script given as argument will be run as:
2494 \begin_inset Flex Code
2497 \begin_layout Plain Layout
2498 script < infile.out > infile.log
2504 The argument may contain
2505 \begin_inset Flex Code
2508 \begin_layout Plain Layout
2517 \begin_layout Labeling
2518 \labelwidthstring 00.00.0000
2519 \begin_inset Flex Code
2522 \begin_layout Plain Layout
2528 The name of the directory in which the converter will dump the generated
2531 will not create this directory, and it does not copy anything into it,
2532 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 \SpecialChar LyX
2585 \begin_layout Standard
2586 You do not have to define converters for all formats between which you want
2588 For example, you will note that there is no `\SpecialChar LyX
2589 to PostScript' converter,
2590 but \SpecialChar LyX
2591 will export PostScript.
2592 It does so by first creating a \SpecialChar LaTeX
2593 file (no converter needs to be defined
2594 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2596 and finally converting the resulting DVI file to PostScript.
2598 finds such `chains' of converters automatically, and it will always choose
2599 the shortest possible chain.
2600 You can, though, still define multiple conversion methods between file
2602 For example, the standard \SpecialChar LyX
2603 configuration provides five ways to convert
2608 \begin_layout Enumerate
2610 \begin_inset Flex Noun
2613 \begin_layout Plain Layout
2622 \begin_layout Enumerate
2623 via (DVI and) PostScript, using
2624 \begin_inset Flex Noun
2627 \begin_layout Plain Layout
2636 \begin_layout Enumerate
2638 \begin_inset Flex Noun
2641 \begin_layout Plain Layout
2650 \begin_layout Enumerate
2652 \begin_inset Flex Noun
2655 \begin_layout Plain Layout
2665 \begin_layout Enumerate
2667 \begin_inset Flex Noun
2670 \begin_layout Plain Layout
2680 \begin_layout Standard
2681 To define such alternate chains, you must define multiple target `file formats',
2683 \begin_inset CommandInset ref
2685 reference "sec:Formats"
2690 For example, in the standard configuration, the formats named
2691 \begin_inset Flex Noun
2694 \begin_layout Plain Layout
2701 \begin_inset Flex Noun
2704 \begin_layout Plain Layout
2711 \begin_inset Flex Noun
2714 \begin_layout Plain Layout
2721 \begin_inset Flex Noun
2724 \begin_layout Plain Layout
2731 \begin_inset Flex Noun
2734 \begin_layout Plain Layout
2741 \begin_inset Flex Noun
2744 \begin_layout Plain Layout
2751 \begin_inset Flex Noun
2754 \begin_layout Plain Layout
2761 \begin_inset Flex Noun
2764 \begin_layout Plain Layout
2772 \begin_inset Flex Noun
2775 \begin_layout Plain Layout
2782 \begin_inset Flex Noun
2785 \begin_layout Plain Layout
2792 ) are defined, all of which share the extension
2793 \begin_inset Flex Noun
2796 \begin_layout Plain Layout
2802 , and which correspond to the conversion methods just mentioned.
2805 \begin_layout Chapter
2806 Internationalizing \SpecialChar LyX
2808 \begin_inset CommandInset label
2810 name "cha:Internationalizing-LyX"
2817 \begin_layout Standard
2819 supports using a translated interface.
2820 Last time we checked, \SpecialChar LyX
2821 provided text in thirty languages.
2822 The language of choice is called your
2827 (For further reading on locale settings, see also the documentation for
2828 locale that comes with your operating system.
2829 For Linux, the manual page for
2830 \begin_inset Flex Code
2833 \begin_layout Plain Layout
2839 could be a good place to start).
2842 \begin_layout Standard
2843 Notice that these translations will work, but do contain a few flaws.
2844 In particular, all dialogs have been designed with the English text in
2845 mind, which means that some of the translated text will be too large to
2846 fit within the space allocated.
2847 This is only a display problem and will not cause any harm.
2848 Also, you will find that some of the translations do not define shortcut
2849 keys for everything.
2850 Sometimes, there are simply not enough free letters to do it.
2851 Other times, the translator just hasn't got around to doing it yet.
2852 Our localization team, which you may wish to join,
2856 \begin_layout Plain Layout
2857 If you are a fluent speaker of a language other than English, joining these
2858 teams is a great way to give back to the \SpecialChar LyX
2864 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2868 \begin_layout Section
2869 Translating \SpecialChar LyX
2873 \begin_layout Subsection
2874 Translating the graphical user interface (text messages).
2877 \begin_layout Standard
2880 \begin_inset Flex Code
2883 \begin_layout Plain Layout
2889 library to handle the internationalization of the interface.
2890 To have \SpecialChar LyX
2891 speak your favorite language in all menus and dialogs, you need
2893 \begin_inset Flex Code
2896 \begin_layout Plain Layout
2902 -file for that language.
2903 When this is available, you'll have to generate a
2904 \begin_inset Flex Code
2907 \begin_layout Plain Layout
2913 -file from it and install the
2914 \begin_inset Flex Code
2917 \begin_layout Plain Layout
2924 The process of doing all of this is explained in the documentation for
2926 \begin_inset Flex Code
2929 \begin_layout Plain Layout
2936 It is possible to do this just for yourself, but if you're going to do
2937 it, you might as well share the results of your labors with the rest of
2938 the \SpecialChar LyX
2940 Send a message to the \SpecialChar LyX
2941 developers' list for more information about how
2945 \begin_layout Standard
2946 In short, this is what you should do (xx denotes the language code):
2949 \begin_layout Itemize
2950 Check out the \SpecialChar LyX
2953 \begin_inset CommandInset href
2955 name "information on the web"
2956 target "http://www.lyx.org/HowToUseSVN"
2963 \begin_layout Itemize
2965 \begin_inset Flex Code
2968 \begin_layout Plain Layout
2974 to the folder of the
2975 \begin_inset Flex Code
2978 \begin_layout Plain Layout
2986 \begin_inset Flex Code
2989 \begin_layout Plain Layout
2997 \begin_inset Flex Code
3000 \begin_layout Plain Layout
3006 doesn't exist anywhere, it can be remade with the console command
3007 \begin_inset Flex Code
3010 \begin_layout Plain Layout
3016 in that directory, or you can use an existing po-file for some other language
3020 \begin_layout Itemize
3022 \begin_inset Flex Code
3025 \begin_layout Plain Layout
3035 \begin_layout Plain Layout
3036 This is just a text file, so it can be edited in any text editor.
3037 But there are also specialized programs that support such editing, such
3042 (for all platforms) or
3051 contains a `mode' for editing
3052 \begin_inset Flex Code
3055 \begin_layout Plain Layout
3066 For some menu- and widget-labels, there are also shortcut keys that should
3068 Those keys are marked after a `|', and should be translated according to
3069 the words and phrases of the language.
3070 You should also fill also out the information at the beginning of the new
3072 \begin_inset Flex Code
3075 \begin_layout Plain Layout
3081 -file with your email-address, etc., so people know where to reach you with
3082 suggestions and entertaining flames.
3085 \begin_layout Standard
3086 If you are just doing this on your own, then:
3089 \begin_layout Itemize
3091 \begin_inset Flex Code
3094 \begin_layout Plain Layout
3101 This can be done with
3102 \begin_inset Flex Code
3105 \begin_layout Plain Layout
3106 msgfmt -o xx.mo < xx.po
3114 \begin_layout Itemize
3116 \begin_inset Flex Code
3119 \begin_layout Plain Layout
3125 -file to your locale-tree, at the correct directory for application messages
3130 xx, and under the name
3131 \begin_inset Flex Code
3134 \begin_layout Plain Layout
3141 \begin_inset space \thinspace{}
3145 \begin_inset space \space{}
3149 \begin_inset Flex Code
3152 \begin_layout Plain Layout
3153 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3163 \begin_layout Standard
3164 As said, however, it would be best if the new
3165 \begin_inset Flex Code
3168 \begin_layout Plain Layout
3174 file could be added to the \SpecialChar LyX
3175 distribution, so others can use it.
3176 Adding it involves making additional changes to \SpecialChar LyX
3178 So send an email to the developers' mailing list if you're interested in
3182 \begin_layout Subsubsection
3186 \begin_layout Standard
3187 Sometimes it turns out that one English message needs to be translated into
3188 different messages in the target language.
3189 One example is the message
3190 \begin_inset Flex Code
3193 \begin_layout Plain Layout
3199 which has the German translation
3207 , depending upon exactly what the English
3208 \begin_inset Quotes eld
3212 \begin_inset Quotes erd
3217 \begin_inset Flex Code
3220 \begin_layout Plain Layout
3226 does not handle such ambiguous translations.
3227 Therefore you have to add some context information to the message: Instead
3229 \begin_inset Flex Code
3232 \begin_layout Plain Layout
3239 \begin_inset Flex Code
3242 \begin_layout Plain Layout
3243 To[[as in 'From format x to format y']]
3249 \begin_inset Flex Code
3252 \begin_layout Plain Layout
3253 To[[as in 'From page x to page y']].
3258 Now the two occurrences of
3259 \begin_inset Flex Code
3262 \begin_layout Plain Layout
3269 \begin_inset Flex Code
3272 \begin_layout Plain Layout
3278 and can be translated correctly to
3289 \begin_layout Standard
3290 Of course the context information needs to be stripped off the original
3291 message when no translation is used.
3292 Therefore you have to put it in double square brackets at the end of the
3293 message (see the example above).
3294 The translation mechanism of \SpecialChar LyX
3295 ensures that everything in double square
3296 brackets at the end of messages is removed before displaying the message.
3299 \begin_layout Subsection
3300 Translating the documentation.
3303 \begin_layout Standard
3304 The online documentation (in the
3305 \begin_inset Flex Noun
3308 \begin_layout Plain Layout
3314 -menu) can (and should!) be translated.
3315 If there are translated versions of the documentation available
3319 \begin_layout Plain Layout
3320 As of March 2008, at least some of the documents have been translated into
3321 fourteen languages, with the Tutorial available in a few more.
3326 and the locale is set accordingly, these will be used automagically by
3330 looks for translated versions as
3331 \begin_inset Flex Code
3334 \begin_layout Plain Layout
3335 LyXDir/doc/xx/DocName.lyx
3341 \begin_inset Flex Code
3344 \begin_layout Plain Layout
3350 is the code for the language currently in use.
3351 If there are no translated documents, the default English versions will
3353 Note that the translated versions must have the same filenames (
3354 \begin_inset Flex Code
3357 \begin_layout Plain Layout
3363 above) as the original.
3364 If you feel up to translating the documentation (an excellent way to proof-read
3365 the original documentation by the way!), there are a few things you should
3369 \begin_layout Itemize
3370 Check out the documentation translation web page at
3371 \begin_inset CommandInset href
3373 name "http://www.lyx.org/Translation"
3374 target "http://www.lyx.org/Translation"
3379 That way, you can find out which (if any) documents have already been translate
3380 d into your language.
3381 You can also find out who (if anyone) is organizing the effort to translate
3382 the documentation into your language.
3383 If no one is organizing the effort, please let us know that you're interested.
3386 \begin_layout Standard
3387 Once you get to actually translating, here's a few hints for you that may
3391 \begin_layout Itemize
3392 Join the documentation team! There is information on how to do that in
3393 \begin_inset Flex Code
3396 \begin_layout Plain Layout
3403 \begin_inset Flex Noun
3406 \begin_layout Plain Layout
3407 Help\SpecialChar menuseparator
3413 ), which by the way is the first document you should translate.
3416 \begin_layout Itemize
3417 Learn the typographic conventions for the language you are translating to.
3418 Typography is an ancient art and over the centuries, a great variety of
3419 conventions have developed throughout different parts of the world.
3420 Also study the professional terminology amongst typographers in your country.
3421 Inventing your own terminology will only confuse the users.
3424 (Warning! Typography is addictive!)
3427 \begin_layout Itemize
3428 Make a copy of the document.
3429 This will be your working copy.
3430 You can use this as your personal translated help-file by placing it in
3432 \begin_inset Flex Code
3435 \begin_layout Plain Layout
3444 \begin_layout Itemize
3445 Sometimes the original document (from the \SpecialChar LyX
3446 team) will be updated.
3447 Use the source viewer at
3448 \begin_inset CommandInset href
3450 name "http://www.lyx.org/trac/timeline"
3451 target "http://www.lyx.org/trac/timeline"
3455 to see what has been changed.
3456 That way you can easily see which parts of the translated document need
3460 \begin_layout Standard
3461 If you ever find an error in the original document, fix it and notify the
3462 rest of the documentation team of the changes! (You didn't forget to join
3463 the documentation team, did you?)
3466 \begin_layout Standard
3467 \begin_inset Branch OutDated
3470 \begin_layout Section
3471 International Keyboard Support
3474 \begin_layout Standard
3477 [Editor's Note: The following section is by
3485 It needs to be fixed to conform to the new Documentation Style sheet and
3486 to make use of the new v1.0 features.
3487 The whole thing also needs to be merged with the section following it.-jw
3488 It may also be badly out of date.-rh (2008)]
3491 \begin_layout Subsection
3492 Defining Own Keymaps: Keymap File Format
3495 \begin_layout Standard
3496 Let's look at a keyboard definition file a little closer.
3497 It is a plain text file defining
3500 \begin_layout Itemize
3501 key-to-key or key-to-string translations
3504 \begin_layout Itemize
3508 \begin_layout Itemize
3509 dead keys exceptions
3512 \begin_layout Standard
3513 To define key-to-key or key-to-string translation, use this command:
3516 \begin_layout Quotation
3517 \begin_inset Flex Code
3520 \begin_layout Plain Layout
3529 \begin_inset Flex Code
3532 \begin_layout Plain Layout
3541 \begin_layout Standard
3543 \begin_inset Flex Code
3546 \begin_layout Plain Layout
3552 is the key to be translated and
3553 \begin_inset Flex Code
3556 \begin_layout Plain Layout
3562 is the string to be inserted into the document.
3563 To define dead keys, use:
3566 \begin_layout Quotation
3567 \begin_inset Flex Code
3570 \begin_layout Plain Layout
3579 \begin_inset Flex Code
3582 \begin_layout Plain Layout
3591 \begin_layout Standard
3593 \begin_inset Flex Code
3596 \begin_layout Plain Layout
3602 is a keyboard key and
3603 \begin_inset Flex Code
3606 \begin_layout Plain Layout
3613 The following dead keys are supported (shortcut name is in parentheses):
3616 \begin_layout Quotation
3620 \begin_inset space \hfill{}
3626 \begin_layout Quotation
3628 \begin_inset space \hfill{}
3634 \begin_layout Quotation
3636 \begin_inset space \hfill{}
3642 \begin_layout Quotation
3644 \begin_inset space \hfill{}
3650 \begin_layout Quotation
3652 \begin_inset space \hfill{}
3658 \begin_layout Quotation
3660 \begin_inset space \hfill{}
3667 \begin_layout Plain Layout
3679 \begin_layout Quotation
3681 \begin_inset space \hfill{}
3687 \begin_layout Quotation
3689 \begin_inset space \hfill{}
3696 \begin_layout Plain Layout
3708 \begin_layout Quotation
3710 \begin_inset space \hfill{}
3716 \begin_layout Quotation
3718 \begin_inset space \hfill{}
3724 \begin_layout Quotation
3726 \begin_inset space \hfill{}
3733 \begin_layout Plain Layout
3745 \begin_layout Quotation
3747 \begin_inset space \hfill{}
3754 \begin_layout Plain Layout
3766 \begin_layout Quotation
3768 \begin_inset space \hfill{}
3774 \begin_layout Quotation
3775 hungarian umlaut (hug)
3776 \begin_inset space \hfill{}
3782 \begin_layout Quotation
3784 \begin_inset space \hfill{}
3790 \begin_layout Quotation
3792 \begin_inset space \hfill{}
3799 \begin_layout Plain Layout
3811 \begin_layout Standard
3812 Since in many international keyboards there are exceptions to what some
3813 dead keys should do, you can define them using
3816 \begin_layout Quotation
3817 \begin_inset Flex Code
3820 \begin_layout Plain Layout
3828 deadkey key outstring
3831 \begin_layout Standard
3832 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3836 \begin_layout Quotation
3837 \begin_inset Flex Code
3840 \begin_layout Plain Layout
3853 \begin_layout Standard
3854 to make it work correctly.
3855 Also, you have to define as exceptions dead keys over i and j, to remove
3856 the dot from them before inserting an accent mark.
3857 I will change this when the time comes, but so far I haven't had time.
3860 \begin_layout Standard
3861 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3864 \begin_inset Flex Code
3867 \begin_layout Plain Layout
3873 have different meaning.
3875 \begin_inset Flex Code
3878 \begin_layout Plain Layout
3884 marks comments, quotes start and end \SpecialChar LaTeX
3886 To enter quote, you'll need to use
3887 \begin_inset Flex Code
3890 \begin_layout Plain Layout
3899 \begin_inset Flex Code
3902 \begin_layout Plain Layout
3909 \begin_inset Flex Code
3912 \begin_layout Plain Layout
3923 \begin_layout Standard
3924 If you make a keyboard description file that works for your language, please
3925 mail it to me, so I can include it in the next keymap distribution.
3928 \begin_layout Standard
3929 More keywords will be supported in keymap configuration file in future,
3933 \begin_layout Itemize
3934 \begin_inset Flex Code
3937 \begin_layout Plain Layout
3948 \begin_inset space \hfill{}
3952 \begin_inset Flex Code
3955 \begin_layout Plain Layout
3964 \begin_layout Itemize
3965 \begin_inset Flex Code
3968 \begin_layout Plain Layout
3979 \begin_inset space \hfill{}
3983 \begin_inset Flex Code
3986 \begin_layout Plain Layout
3992 an external keymap translation program
3995 \begin_layout Standard
3996 Also, it should look into
3997 \begin_inset Flex Code
4000 \begin_layout Plain Layout
4006 file for defaults, too (for example, a
4007 \begin_inset Flex Code
4010 \begin_layout Plain Layout
4018 option to include default keyboard).
4026 \begin_layout Section
4027 International Keymap Stuff
4028 \begin_inset CommandInset label
4030 name "sec:International-Keymap-Stuff"
4037 \begin_layout Standard
4038 \begin_inset Note Note
4041 \begin_layout Plain Layout
4042 In doing the revisions on this document in March 2008, I did not look over
4043 this stuff, as I do not understand it.
4044 It would be good if someone else could do so.
4053 \begin_layout Standard
4054 The next two sections describe the
4055 \begin_inset Flex Code
4058 \begin_layout Plain Layout
4067 \begin_inset Flex Code
4070 \begin_layout Plain Layout
4078 file syntax in detail.
4079 These sections should help you design your own key map if the ones provided
4080 do not meet your needs.
4083 \begin_layout Subsection
4087 \begin_layout Standard
4091 \begin_inset Flex Code
4094 \begin_layout Plain Layout
4100 file maps keystrokes to characters or strings.
4101 As the name suggests, it sets a keyboard mapping.
4103 \begin_inset Flex Code
4106 \begin_layout Plain Layout
4117 \begin_inset Flex Code
4120 \begin_layout Plain Layout
4135 \begin_inset Flex Code
4138 \begin_layout Plain Layout
4151 \begin_inset Flex Code
4154 \begin_layout Plain Layout
4163 \begin_inset Flex Code
4166 \begin_layout Plain Layout
4174 are described in this section.
4177 \begin_layout Labeling
4178 \labelwidthstring 00.00.0000
4179 \begin_inset Flex Code
4182 \begin_layout Plain Layout
4190 Map a character to a string
4193 \begin_layout LyX-Code
4208 \begin_layout Standard
4241 the double-quote (")
4258 must be escaped with a preceding backslash (
4269 \begin_layout Standard
4271 \begin_inset Flex Noun
4274 \begin_layout Plain Layout
4282 statement to cause the symbol
4283 \begin_inset Flex Noun
4286 \begin_layout Plain Layout
4294 to be output for the keystroke
4295 \begin_inset Flex Noun
4298 \begin_layout Plain Layout
4309 \begin_layout LyX-Code
4315 \begin_layout Labeling
4316 \labelwidthstring 00.00.0000
4317 \begin_inset Flex Code
4320 \begin_layout Plain Layout
4328 Specify an accent character
4331 \begin_layout LyX-Code
4340 \begin_layout Standard
4341 This will make the cha
4379 This is the dead key
4383 \begin_layout Plain Layout
4390 refers to a key that does not produce a character by itself, but when followed
4391 with another key, produces the desired accent character.
4392 For example, a German characte
4394 r with an umlaut like
4404 can be produced in this manner.
4413 \begin_layout Standard
4426 and then another key not in
4443 followed by the other, not allowed key, as output.
4447 \begin_inset Flex Noun
4450 \begin_layout Plain Layout
4458 cancels a dead key, so if
4469 \begin_inset Flex Noun
4472 \begin_layout Plain Layout
4481 , the cursor will not go one position backwards but will instead cancel
4497 might have had on the next keystroke.
4501 \begin_layout Standard
4502 The following example specifies that the character ' is to be an acute accent,
4503 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4506 \begin_layout LyX-Code
4509 kmod ' acute aeiouAEIOU
4512 \begin_layout Labeling
4513 \labelwidthstring 00.00.0000
4514 \begin_inset Flex Code
4517 \begin_layout Plain Layout
4523 Specify an exception to the accent character
4526 \begin_layout LyX-Code
4535 \begin_layout Standard
4536 This defines an exce
4577 have been assigned a keystroke with a previous
4580 \begin_inset Flex Code
4583 \begin_layout Plain Layout
4607 must not belong in the
4654 If such a declaration does not exist in
4662 \begin_inset Flex Code
4665 \begin_layout Plain Layout
4699 \begin_inset Flex Code
4702 \begin_layout Plain Layout
4716 \begin_layout Standard
4717 The following command produces causes äi to be produced when you enter acute-i
4721 \begin_layout LyX-Code
4735 \begin_layout Labeling
4736 \labelwidthstring 00.00.0000
4737 \begin_inset Flex Code
4740 \begin_layout Plain Layout
4746 Combine two accent characters
4749 \begin_layout LyX-Code
4755 accent1 accent2 allowed
4758 \begin_layout Standard
4759 This one is getting pretty esoteric.
4760 It allows you to combine the effect
4816 \begin_inset Flex Code
4819 \begin_layout Plain Layout
4847 \begin_layout Standard
4848 Consider this example from the
4849 \begin_inset Flex Code
4852 \begin_layout Plain Layout
4863 \begin_layout LyX-Code
4866 kmod ; acute aeioyvhAEIOYVH
4870 kcomb acute umlaut iyIY
4873 \begin_layout Standard
4874 This allows you to press
4875 \begin_inset Flex Noun
4878 \begin_layout Plain Layout
4886 and get the effect of
4887 \begin_inset Flex Code
4890 \begin_layout Plain Layout
4909 in this case cancels the last dead key, so if you press
4910 \begin_inset Flex Noun
4913 \begin_layout Plain Layout
4922 \begin_inset Flex Code
4925 \begin_layout Plain Layout
4938 \begin_layout Subsection
4942 \begin_layout Standard
4944 \begin_inset Flex Code
4947 \begin_layout Plain Layout
4955 mapping is performed, a
4956 \begin_inset Flex Code
4959 \begin_layout Plain Layout
4969 file maps the strings that the symbols generate to characters in the current
4971 The \SpecialChar LyX
4972 distribution currently includes at least the
4973 \begin_inset Flex Code
4976 \begin_layout Plain Layout
4985 \begin_inset Flex Code
4988 \begin_layout Plain Layout
4999 \begin_layout Standard
5001 \begin_inset Flex Code
5004 \begin_layout Plain Layout
5012 file is a sequence of declarations of the form
5015 \begin_layout LyX-Code
5028 \begin_layout Standard
5029 For example, in order to map
5030 \begin_inset Flex Noun
5033 \begin_layout Plain Layout
5043 to the corresponding character in the iso-8859-1 set (233), the following
5047 \begin_layout LyX-Code
5055 \begin_layout Standard
5057 \begin_inset Flex Code
5060 \begin_layout Plain Layout
5069 \begin_inset Flex Code
5072 \begin_layout Plain Layout
5090 the same character can apply to more than one string.
5092 \begin_inset Flex Code
5095 \begin_layout Plain Layout
5106 \begin_layout LyX-Code
5118 \begin_inset Newline newline
5134 \begin_layout Standard
5136 cannot find a mapping for the string produced by the keystroke or a
5137 deadkey sequence, it will check if it looks like an accented char and try
5138 to draw an accent over the character on screen.
5141 \begin_layout Subsection
5145 \begin_layout Standard
5146 There is a second way to add support for international characters through
5147 so-called dead-keys.
5148 A dead-key works in combination with a letter to produce an accented character.
5149 Here, we'll explain how to create a really simple dead-key to illustrate
5153 \begin_layout Standard
5154 Suppose you happen to need the circumflex character,
5155 \begin_inset Quotes eld
5159 \begin_inset Quotes erd
5164 \begin_inset Flex Noun
5167 \begin_layout Plain Layout
5174 \begin_inset space ~
5178 \begin_inset Flex Noun
5181 \begin_layout Plain Layout
5187 ] to the \SpecialChar LyX
5189 \begin_inset Flex Code
5192 \begin_layout Plain Layout
5199 \begin_inset Flex Code
5202 \begin_layout Plain Layout
5209 Now, whenever you type the
5210 \begin_inset Flex Noun
5213 \begin_layout Plain Layout
5219 -key followed by a letter, that letter will have a circumflex accent on
5221 For example, the sequence
5222 \begin_inset Quotes eld
5226 \begin_inset Flex Noun
5229 \begin_layout Plain Layout
5236 \begin_inset Quotes erd
5239 produces the letter:
5240 \begin_inset Quotes eld
5244 \begin_inset Quotes erd
5248 If you tried to type
5249 \begin_inset Quotes eld
5253 \begin_inset Flex Noun
5256 \begin_layout Plain Layout
5263 \begin_inset Quotes erd
5266 , however, \SpecialChar LyX
5267 will complain with a beep, since a
5268 \begin_inset Quotes eld
5272 \begin_inset Flex Noun
5275 \begin_layout Plain Layout
5282 \begin_inset Quotes erd
5285 never takes a circumflex accent.
5287 \begin_inset Flex Noun
5290 \begin_layout Plain Layout
5296 after a dead-key produces the bare-accent.
5297 Please note this last point! If you bind a key to a dead-key, you'll need
5298 to rebind the character on that key to yet another key.
5300 \begin_inset Flex Noun
5303 \begin_layout Plain Layout
5309 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5312 \begin_layout Standard
5313 One common way to bind dead-keys is to use
5314 \begin_inset Flex Noun
5317 \begin_layout Plain Layout
5324 \begin_inset Flex Noun
5327 \begin_layout Plain Layout
5334 \begin_inset Flex Noun
5337 \begin_layout Plain Layout
5343 in combination with an accent, like
5344 \begin_inset Quotes eld
5348 \begin_inset Flex Noun
5351 \begin_layout Plain Layout
5358 \begin_inset Quotes erd
5362 \begin_inset Quotes eld
5366 \begin_inset Flex Noun
5369 \begin_layout Plain Layout
5376 \begin_inset Quotes erd
5380 \begin_inset Quotes eld
5384 \begin_inset Flex Noun
5387 \begin_layout Plain Layout
5394 \begin_inset Quotes erd
5398 Another way involves using
5399 \begin_inset Flex Code
5402 \begin_layout Plain Layout
5409 \begin_inset Flex Code
5412 \begin_layout Plain Layout
5418 to set up the special
5419 \begin_inset Flex Code
5422 \begin_layout Plain Layout
5430 \begin_inset Flex Code
5433 \begin_layout Plain Layout
5439 acts in some ways just like
5440 \begin_inset Flex Noun
5443 \begin_layout Plain Layout
5449 and permits you to bind keys to accented characters.
5450 You can also turn keys into dead-keys by binding them to something like
5452 \begin_inset Flex Code
5455 \begin_layout Plain Layout
5461 and then binding this symbolic key to the corresponding \SpecialChar LyX
5466 \begin_layout Plain Layout
5471 : This is exactly what I do in my
5472 \begin_inset Flex Code
5475 \begin_layout Plain Layout
5482 \begin_inset Flex Code
5485 \begin_layout Plain Layout
5493 \begin_inset Flex Noun
5496 \begin_layout Plain Layout
5498 \begin_inset space ~
5507 \begin_inset Flex Code
5510 \begin_layout Plain Layout
5516 and a bunch of these
5517 \begin_inset Quotes eld
5521 \begin_inset Flex Code
5524 \begin_layout Plain Layout
5531 \begin_inset Quotes erd
5534 symbolic keys bound such things as
5535 \begin_inset Flex Noun
5538 \begin_layout Plain Layout
5540 \begin_inset space ~
5549 \begin_inset Flex Noun
5552 \begin_layout Plain Layout
5554 \begin_inset space ~
5563 This is how I produce my accented characters.
5568 You can make just about anything into the
5569 \begin_inset Flex Code
5572 \begin_layout Plain Layout
5579 \begin_inset Flex Noun
5582 \begin_layout Plain Layout
5588 keys, a spare function key, etc.
5589 As for the \SpecialChar LyX
5590 commands that produce accents, check the entry for
5591 \begin_inset Flex Code
5594 \begin_layout Plain Layout
5605 You'll find the complete list there.
5608 \begin_layout Subsection
5609 Saving your Language Configuration
5612 \begin_layout Standard
5613 You can edit your preferences so that your desired language environment
5614 is automatically configured when \SpecialChar LyX
5616 \begin_inset Flex Noun
5619 \begin_layout Plain Layout
5620 Edit\SpecialChar menuseparator
5629 \begin_layout Chapter
5630 Installing New Document Classes, Layouts, and Templates
5631 \begin_inset CommandInset label
5633 name "cha:Installing-New-Document"
5638 \begin_inset Argument 1
5641 \begin_layout Plain Layout
5642 Installing New Document Classes
5650 \begin_layout Standard
5651 In this chapter, we describe the procedures for creating and installing
5652 new \SpecialChar LyX
5653 layout and template files, as well as offer a refresher on correctly
5654 installing new \SpecialChar LaTeX
5659 \begin_layout Standard
5660 First, let us a say a few words about how one ought to think about the relation
5661 between \SpecialChar LyX
5662 and \SpecialChar LaTeX
5664 The thing to understand is that, in a certain sense, \SpecialChar LyX
5665 doesn't know anything
5666 about \SpecialChar LaTeX
5668 Indeed, from \SpecialChar LyX
5669 's point of view, \SpecialChar LaTeX
5670 is just one of several
5671 \begin_inset Quotes eld
5675 \begin_inset Quotes erd
5678 in which it is capable of producing output.
5679 Other such formats are DocBook, plaintext, and XHTML.
5681 is, of course, a particularly important format, but very little of the
5682 information \SpecialChar LyX
5683 has about \SpecialChar LaTeX
5684 is actually contained in the program itself.
5688 \begin_layout Plain Layout
5689 Some commands are sufficiently complex that they are
5690 \begin_inset Quotes eld
5694 \begin_inset Quotes erd
5697 into \SpecialChar LyX
5699 But the developers generally regard this as a Bad Thing.
5704 Rather, that information, even for the standard classes like
5705 \begin_inset Flex Code
5708 \begin_layout Plain Layout
5714 , is contained in `layout files'.
5715 Similarly, \SpecialChar LyX
5716 itself does not know much about DocBook or XHTML.
5717 What it knows is contained in layout files.
5720 \begin_layout Standard
5721 You can think of the layout file for a given document class as a translation
5722 manual between \SpecialChar LyX
5723 constructs—paragraphs with their corresponding styles,
5724 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5727 Almost everything \SpecialChar LyX
5729 \begin_inset Flex Code
5732 \begin_layout Plain Layout
5738 , for example, is contained in the file
5739 \begin_inset Flex Code
5742 \begin_layout Plain Layout
5748 and in various other files it includes.
5749 For this reason, anyone intending to write layout files should plan to
5750 study the existing files.
5751 A good place to start is with
5752 \begin_inset Flex Code
5755 \begin_layout Plain Layout
5761 , which is included in
5762 \begin_inset Flex Code
5765 \begin_layout Plain Layout
5772 \begin_inset Flex Code
5775 \begin_layout Plain Layout
5781 , and many of the other layout files for document classes.
5782 This file is where sections and the like are defined:
5783 \begin_inset Flex Code
5786 \begin_layout Plain Layout
5792 tells \SpecialChar LyX
5793 how paragraphs that are marked with the Section, Subsection, etc,
5794 styles can be translated into corresponding \SpecialChar LaTeX
5795 , DocBook, and XHTML commands
5798 \begin_inset Flex Code
5801 \begin_layout Plain Layout
5807 file basically just includes several of these
5808 \begin_inset Flex Code
5811 \begin_layout Plain Layout
5820 \begin_layout Standard
5821 Defining the \SpecialChar LyX
5823 correspondence is not the only thing layout files do, though.
5824 Their other job is to define how the \SpecialChar LyX
5825 constructs themselves will appear
5827 The fact that layout files have these two jobs is often a source of confusion,
5828 because they are completely separate.
5829 Telling \SpecialChar LyX
5830 how to translate a certain paragraph style into \SpecialChar LaTeX
5833 how to display it; conversely, telling \SpecialChar LyX
5834 how to display a certain paragraph
5835 style does not tell \SpecialChar LyX
5836 how to translate it into \SpecialChar LaTeX
5837 (let alone tell \SpecialChar LaTeX
5840 So, in general, when you define a new \SpecialChar LyX
5841 construct, you must always do two
5842 quite separate things: (i)
5843 \begin_inset space ~
5846 tell \SpecialChar LyX
5847 how to translate it into \SpecialChar LaTeX
5849 \begin_inset space ~
5852 tell \SpecialChar LyX
5856 \begin_layout Standard
5857 Much the same is true, of course, as regards \SpecialChar LyX
5858 's other backend formats, though
5859 XHTML is in some ways different, because in that case \SpecialChar LyX
5864 able, to some extent, to use information about how it should display a
5865 paragraph on the screen to output information (in the form of CSS) about
5866 how the paragraph should be displayed in a browser.
5867 Even in this case, however, the distinction between what \SpecialChar LyX
5869 and how things are rendered externally remains in force, and the two can
5870 be controlled separately.
5872 \begin_inset CommandInset ref
5874 reference "sec:Tags-for-XHTML"
5881 \begin_layout Section
5882 Installing new \SpecialChar LaTeX
5886 \begin_layout Standard
5887 Some installations may not include a \SpecialChar LaTeX
5888 package or class file that you would
5889 like to use within \SpecialChar LyX
5891 For example, you might need Foil\SpecialChar TeX
5892 , a package for preparing slides for overhead
5894 Modern \SpecialChar LaTeX
5895 distributions like \SpecialChar TeX
5896 Live (2008 or newer) or MiK\SpecialChar TeX
5897 provide a user interface
5898 for installing such packages.
5899 For example, with MiK\SpecialChar TeX
5900 , you start the program
5901 \begin_inset Quotes eld
5905 \begin_inset space ~
5909 \begin_inset Quotes erd
5912 to get a list of available packages.
5913 To install one of them, right click on it or use the corresponding toolbar
5917 \begin_layout Standard
5918 If your \SpecialChar LaTeX
5919 distribution does not provide such a `package manager', or if the
5920 package is not available from your distribution, then follow these steps
5921 to install it manually:
5924 \begin_layout Enumerate
5925 Get the package from
5926 \begin_inset CommandInset href
5929 target "http://www.ctan.org/"
5936 \begin_layout Enumerate
5937 If the package contains a file with the ending
5938 \begin_inset Quotes eld
5942 \begin_inset Flex Code
5945 \begin_layout Plain Layout
5952 \begin_inset Quotes erd
5955 (is the case for Foil\SpecialChar TeX
5956 ) then open a console, change to the folder of this
5957 file and execute the command
5958 \begin_inset Flex Code
5961 \begin_layout Plain Layout
5968 You have now unpacked the package and have all files to install it.
5969 Most \SpecialChar LaTeX
5970 -packages are not packed and you can skip this step.
5973 \begin_layout Enumerate
5974 Now you need to decide if the package should be available for all users
5976 \begin_inset Separator parbreak
5983 \begin_layout Enumerate
5984 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5985 for all users on your system, then install it in your `local' \SpecialChar TeX
5987 install it in your own `user' \SpecialChar TeX
5989 Where these trees should be created, if they do not already exist, depends
5991 To find this out, look in the file
5992 \begin_inset Flex Code
5995 \begin_layout Plain Layout
6005 \begin_layout Plain Layout
6006 This is usually in the directory
6007 \begin_inset Flex Code
6010 \begin_layout Plain Layout
6016 , though you can execute the command
6017 \begin_inset Flex Code
6020 \begin_layout Plain Layout
6031 The location of the `local' \SpecialChar TeX
6032 tree is defined by the
6033 \begin_inset Flex Code
6036 \begin_layout Plain Layout
6042 variable; this is usually somewhere like
6043 \begin_inset Flex Code
6046 \begin_layout Plain Layout
6047 /usr/local/share/texmf
6053 The location of the `user' \SpecialChar TeX
6055 \begin_inset Flex Code
6058 \begin_layout Plain Layout
6065 \begin_inset Flex Code
6068 \begin_layout Plain Layout
6075 (If these variables are not predefined, you have to define them.) You'll
6076 probably need root permissions to create or modify the `local' tree, but
6077 not for your `user' tree.
6078 \begin_inset Newline newline
6081 In general, it is recommended to install in the user tree because your user
6082 will not be modified or even overwritten when you upgrade your system.
6083 It will typically also be backed up together with everything else when
6084 you backup your home directory (which, of course, you do on a regular basis).
6087 \begin_layout Enumerate
6088 On Windows, if you want the new package to be available for all users on
6089 your system, change to the folder where \SpecialChar LaTeX
6090 is installed and then change to
6092 \begin_inset Flex Code
6095 \begin_layout Plain Layout
6106 (For MiK\SpecialChar TeX
6107 , this would be by default the folder
6108 \begin_inset Flex Code
6111 \begin_layout Plain Layout
6129 \begin_layout Plain Layout
6130 Note that this will be the correct path only on English installations.
6131 On a German one, it would be
6132 \begin_inset Flex Code
6135 \begin_layout Plain Layout
6149 , and similarly for other languages.
6154 Create there a new folder
6155 \begin_inset Flex Code
6158 \begin_layout Plain Layout
6164 and copy all files of the package into it.
6166 \begin_inset Newline newline
6169 If the package should only available for you or you don't have admin permissions
6170 , do the same, but in the local \SpecialChar LaTeX
6173 \begin_inset space \thinspace{}
6176 g., for MiK\SpecialChar TeX
6178 \begin_inset space ~
6181 2.8 under Windows XP, this would be the folder:
6182 \begin_inset Newline newline
6188 \begin_inset Flex Code
6191 \begin_layout Plain Layout
6194 Documents and Settings
6206 \begin_inset Newline newline
6212 \begin_inset Phantom HPhantom
6215 \begin_layout Plain Layout
6226 \begin_inset Flex Code
6229 \begin_layout Plain Layout
6242 \begin_inset Newline newline
6245 On Vista, it would be:
6246 \begin_inset Newline newline
6250 \begin_inset Flex Code
6253 \begin_layout Plain Layout
6279 \begin_layout Enumerate
6280 Now one only need to tell \SpecialChar LaTeX
6281 that there are new files.
6282 This depends on the used \SpecialChar LaTeX
6284 \begin_inset Separator parbreak
6291 \begin_layout Enumerate
6292 For \SpecialChar TeX
6293 Live execute the command
6294 \begin_inset Flex Code
6297 \begin_layout Plain Layout
6304 If you installed the package for all users, then you will probably need
6305 to have root permissions for that.
6308 \begin_layout Enumerate
6309 For MiK\SpecialChar TeX
6310 , if you have installed the package for all users, start the program
6312 \begin_inset Quotes eld
6316 \begin_inset space ~
6320 \begin_inset Quotes erd
6323 and press the button marked
6324 \begin_inset Quotes eld
6328 \begin_inset Quotes erd
6332 Otherwise start the program
6333 \begin_inset Quotes eld
6337 \begin_inset Quotes erd
6344 \begin_layout Enumerate
6345 Finally, you need to tell \SpecialChar LyX
6346 that there are new packages available.
6347 So, in \SpecialChar LyX
6349 \begin_inset Flex Noun
6352 \begin_layout Plain Layout
6355 \SpecialChar menuseparator
6361 and then restart \SpecialChar LyX
6365 \begin_layout Standard
6366 Now the package is installed.
6367 In our example, the document class
6368 \begin_inset Flex Code
6371 \begin_layout Plain Layout
6373 \begin_inset space ~
6381 will now be available under
6382 \begin_inset Flex Noun
6385 \begin_layout Plain Layout
6386 Document\SpecialChar menuseparator
6387 Settings\SpecialChar menuseparator
6397 \begin_layout Standard
6398 If you would like to use a \SpecialChar LaTeX
6399 document class that is not even listed in the
6401 \begin_inset Flex Noun
6404 \begin_layout Plain Layout
6405 Document\SpecialChar menuseparator
6406 Settings\SpecialChar menuseparator
6412 , then you need to create a `layout' file for it.
6413 That is the topic of the next section.
6416 \begin_layout Section
6417 Types of layout files
6420 \begin_layout Standard
6421 This section describes the various sorts of \SpecialChar LyX
6422 files that contain layout informati
6424 These files describe various paragraph and character styles, determining
6425 how \SpecialChar LyX
6426 should display them and how they should be translated into \SpecialChar LaTeX
6428 XHTML, or whatever output format is being used.
6432 \begin_layout Standard
6433 We shall try to provide a thorough description of the process of writing
6435 However, there are so many different types of documents supported even
6436 by just \SpecialChar LaTeX
6437 that we can't hope to cover every different possibility or problem
6438 you might encounter.
6439 The \SpecialChar LyX
6440 users' list is frequented by people with lots of experience with layout
6441 design who are willing to share what they've learned, so please feel free
6442 to ask questions there.
6445 \begin_layout Standard
6446 As you prepare to write a new layout, it is extremely helpful to look at
6447 the layouts distributed with \SpecialChar LyX
6449 If you write a \SpecialChar LyX
6450 layout for a \SpecialChar LaTeX
6451 document class that might also be used by
6452 others, or write a module that might be useful to others, then you should
6453 consider posting your layout to the
6454 \begin_inset CommandInset href
6456 name "layout section on the LyX wiki"
6457 target "http://wiki.lyx.org/Layouts/Layouts"
6461 or even to the \SpecialChar LyX
6462 developers' list, so that it might be included in \SpecialChar LyX
6467 \begin_layout Plain Layout
6468 Note that \SpecialChar LyX
6469 is licensed under the General Public License, so any material
6470 that is contributed to \SpecialChar LyX
6471 must be similarly licensed.
6479 \begin_layout Subsection
6481 \begin_inset CommandInset label
6483 name "subsec:Layout-modules"
6490 \begin_layout Standard
6491 We have spoken to this point about `layout files'.
6492 But there are different sorts of files that contain layout information.
6493 Layout files, strictly so called, have the
6494 \begin_inset Flex Code
6497 \begin_layout Plain Layout
6503 extension and provide \SpecialChar LyX
6504 with information about document classes.
6505 Since \SpecialChar LyX
6506 1.6 layout information can also be contained in layout
6511 \begin_inset Flex Code
6514 \begin_layout Plain Layout
6521 Modules are to \SpecialChar LaTeX
6522 packages much as layouts are to \SpecialChar LaTeX
6523 classes, and some modules—such
6525 \begin_inset Flex Code
6528 \begin_layout Plain Layout
6534 module—specifically provide support for one package.
6535 In a sense, layout modules are similar to included
6539 \begin_layout Plain Layout
6540 These can have any extension, but by convention have the
6541 \begin_inset Flex Code
6544 \begin_layout Plain Layout
6556 \begin_inset Flex Code
6559 \begin_layout Plain Layout
6565 —in that modules are not specific to a given document class but may be used
6566 with many different classes.
6567 The difference is that using an included file with
6568 \begin_inset Flex Code
6571 \begin_layout Plain Layout
6577 requires editing that file.
6578 Modules, by contrast, are selected in the
6579 \begin_inset Flex Noun
6582 \begin_layout Plain Layout
6583 Document\SpecialChar menuseparator
6592 \begin_layout Standard
6593 Building modules is the easiest way to get started with layout editing,
6594 since it can be as simple as adding a single new paragraph style or flex
6596 But modules may, in principle, contain anything a layout file can contain.
6599 \begin_layout Standard
6600 After creating a new module and copying it to the
6601 \begin_inset Flex Code
6604 \begin_layout Plain Layout
6610 folder, you will need to reconfigure and then restart \SpecialChar LyX
6613 However, changes you make to the module will be seen immediately, if you
6615 \begin_inset Flex Noun
6618 \begin_layout Plain Layout
6619 Document\SpecialChar menuseparator
6625 , highlight something, and then hit
6626 \begin_inset Quotes eld
6630 \begin_inset Quotes erd
6636 It is strongly recommended that you save your work before doing this
6641 it is strongly recommended that you not attempt to edit modules while simultaneo
6642 usly working on actual documents
6645 Though of course the developers strive to keep \SpecialChar LyX
6646 stable in such situations,
6647 syntax errors and the like in your module file could cause strange behavior.
6650 \begin_layout Subsubsection
6654 \begin_layout Standard
6655 Modules are to \SpecialChar LyX
6656 as packages are to \SpecialChar LaTeX
6658 Sometimes, however, you find yourself wanting a specific inset or character
6659 style just for one document and writing a module that will also be available
6660 to other documents makes little sense.
6661 What you need is \SpecialChar LyX
6663 \begin_inset Quotes eld
6667 \begin_inset Quotes erd
6673 \begin_layout Standard
6674 You will find it under
6676 Document\SpecialChar menuseparator
6677 Settings\SpecialChar menuseparator
6681 The large text box allows you to enter anything that you might enter in
6682 a layout file or module.
6683 You can think of a document's local layout, in fact, as a module that belongs
6685 So, in particular, you must enter a
6686 \begin_inset Flex Code
6689 \begin_layout Plain Layout
6696 Any format is acceptable, but one would normally use the format current
6698 (In \SpecialChar LyX
6699 2.1, the current layout format is 48.) You should be aware that local
6700 layout is not supported by versions of \SpecialChar LyX
6701 prior to 1.6, so you should not
6702 use it if you want to be able to export your document to \SpecialChar LyX
6704 (without, that is, losing the local layout information).
6705 If you wish to be able to export to 1.6—local layout is supported in 1.6,
6706 though there is no UI for it—then you should use format 11 and, of course,
6707 use only layout constructs that were available in \SpecialChar LyX
6711 \begin_layout Standard
6712 When you have entered something in the
6713 \begin_inset Flex Code
6716 \begin_layout Plain Layout
6722 pane, \SpecialChar LyX
6724 \begin_inset Quotes eld
6728 \begin_inset Quotes erd
6731 button at the bottom.
6732 Clicking this button will cause \SpecialChar LyX
6733 to determine whether what you have entered
6734 is valid layout information for the chosen format.
6736 will report the result but, unfortunately, will not tell you what errors
6737 there might have been.
6738 These will be written to the terminal, however, if \SpecialChar LyX
6739 is started from a terminal.
6740 You will not be permitted to save your local layout until you have entered
6744 \begin_layout Standard
6745 The warnings at the end of the previous section apply here, too.
6746 Do not play with local layout while you are actually working, especially
6747 if you have not saved your document.
6748 That said, using local layout with a test document can be a very convenient
6749 way to try out layout ideas, or even to start developing a module.
6752 \begin_layout Subsection
6754 \begin_inset Flex Noun
6757 \begin_layout Plain Layout
6766 \begin_layout Standard
6767 There are two situations you are likely to encounter when wanting to support
6768 a new \SpecialChar LaTeX
6769 document class, involving style (
6770 \begin_inset Flex Code
6773 \begin_layout Plain Layout
6779 ) files and \SpecialChar LaTeX2e
6781 \begin_inset Flex Code
6784 \begin_layout Plain Layout
6791 Supporting a style file is usually fairly easy.
6792 Supporting a new class file is a bit harder.
6793 We'll discuss the former in this section and the latter in the next.
6794 Similar remarks apply, of course, if you want to support a new DocBook
6798 \begin_layout Standard
6799 The easier case is the one in which your new document class is provided
6800 as a style file that is to be used in conjunction with an already supported
6802 For the sake of the example, we'll assume that the style file is called
6804 \begin_inset Flex Noun
6807 \begin_layout Plain Layout
6813 and that it is meant to be used with
6814 \begin_inset Flex Noun
6817 \begin_layout Plain Layout
6823 , which is a standard class.
6827 \begin_layout Standard
6828 Start by copying the existing class's layout file into your local directory:
6832 \begin_layout Plain Layout
6833 Of course, which directory is your local directory will vary by platform,
6834 and \SpecialChar LyX
6835 allows you to specify your local directory on startup, too, using
6837 \begin_inset Flex Code
6840 \begin_layout Plain Layout
6854 \begin_layout LyX-Code
6855 cp report.layout ~/.lyx/layouts/myclass.layout
6858 \begin_layout Standard
6860 \begin_inset Flex Code
6863 \begin_layout Plain Layout
6869 and change the line:
6872 \begin_layout LyX-Code
6875 Declare\SpecialChar LaTeX
6879 \begin_layout Standard
6883 \begin_layout LyX-Code
6886 Declare\SpecialChar LaTeX
6887 Class[report, myclass.sty]{report (myclass)}
6890 \begin_layout Standard
6894 \begin_layout LyX-Code
6896 \begin_inset Newline newline
6902 \begin_inset Newline newline
6908 \begin_layout Standard
6909 near the top of the file.
6912 \begin_layout Standard
6913 Start \SpecialChar LyX
6915 \begin_inset Flex Noun
6918 \begin_layout Plain Layout
6919 Tools\SpecialChar menuseparator
6926 Then restart \SpecialChar LyX
6927 and try creating a new document.
6929 \begin_inset Flex Noun
6932 \begin_layout Plain Layout
6938 " as a document class option in the
6939 \begin_inset Flex Noun
6942 \begin_layout Plain Layout
6943 Document\SpecialChar menuseparator
6950 It is likely that some of the sectioning commands and such in your new
6951 class will work differently from how they worked in the base class—
6952 \begin_inset Flex Code
6955 \begin_layout Plain Layout
6961 in this example—so you can fiddle around with the settings for the different
6962 sections if you wish.
6963 The layout information for sections is contained in
6964 \begin_inset Flex Code
6967 \begin_layout Plain Layout
6973 , but you do not need to copy and change this file.
6974 Instead, you can simply add your changes to your layout file, after the
6976 \begin_inset Flex Code
6979 \begin_layout Plain Layout
6985 , which itself includes
6986 \begin_inset Flex Code
6989 \begin_layout Plain Layout
6996 For example, you might add these lines:
6999 \begin_layout LyX-Code
7003 \begin_layout LyX-Code
7007 \begin_layout LyX-Code
7011 \begin_layout LyX-Code
7015 \begin_layout LyX-Code
7019 \begin_layout Standard
7020 to change the font for chapter headings to sans-serif.
7021 This will override (or, in this case, add to) the existing declaration
7022 for the Chapter style.
7026 \begin_layout Standard
7027 Your new package may also provide commands or environments not present in
7029 In this case, you will want to add these to the layout file.
7031 \begin_inset CommandInset ref
7033 reference "sec:TextClass"
7037 for information on how to do so.
7040 \begin_layout Standard
7042 \begin_inset Flex Noun
7045 \begin_layout Plain Layout
7051 can be used with several different document classes, and even if it cannot,
7052 you might find it easiest just to write a module that you can load with
7054 The simplest possible such module would be:
7057 \begin_layout LyX-Code
7060 DeclareLyXModule{My Package}
7063 \begin_layout LyX-Code
7067 \begin_layout LyX-Code
7068 #Support for mypkg.sty.
7071 \begin_layout LyX-Code
7073 \begin_inset Newline newline
7079 \begin_layout LyX-Code
7081 \begin_inset Newline newline
7087 \begin_layout LyX-Code
7089 \begin_inset Newline newline
7095 \begin_inset Newline newline
7101 \begin_layout Standard
7102 A more complex module might modify the behavior of some existing constructs
7103 or define some new ones.
7105 \begin_inset CommandInset ref
7107 reference "sec:TextClass"
7114 \begin_layout Subsection
7116 \begin_inset Flex Noun
7119 \begin_layout Plain Layout
7128 \begin_layout Standard
7129 There are two possibilities here.
7130 One is that the class file is itself based upon an existing document class.
7131 For example, many thesis classes are based upon
7132 \begin_inset Flex Noun
7135 \begin_layout Plain Layout
7142 To see whether yours is, look for a line like
7145 \begin_layout LyX-Code
7151 \begin_layout Standard
7153 If so, then you may proceed largely as in the previous section, though
7155 \begin_inset Flex Code
7158 \begin_layout Plain Layout
7159 Declare\SpecialChar LaTeX
7165 line will be different.
7166 If your new class is
7167 \begin_inset Flex Code
7170 \begin_layout Plain Layout
7176 and it is based upon
7177 \begin_inset Flex Code
7180 \begin_layout Plain Layout
7186 , then the line should read:
7190 \begin_layout Plain Layout
7191 And it will be easiest if you save the file to
7192 \begin_inset Flex Code
7195 \begin_layout Plain Layout
7202 assumes that the document class has the same name as the layout file.
7211 \begin_layout LyX-Code
7214 Declare\SpecialChar LaTeX
7215 Class[thesis,book]{thesis}
7218 \begin_layout Standard
7219 If, on the other hand, the new class is not based upon an existing class,
7220 you will probably have to
7221 \begin_inset Quotes eld
7225 \begin_inset Quotes erd
7229 We strongly suggest copying an existing layout file which uses a similar
7231 class and then modifying it, if you can do so.
7232 At least use an existing file as a starting point so you can find out what
7233 items you need to worry about.
7234 Again, the specifics are covered below.
7237 \begin_layout Subsection
7239 \begin_inset CommandInset label
7241 name "subsec:Creating-Templates"
7248 \begin_layout Standard
7249 Once you have written a layout file for a new document class, you might
7250 want to consider writing a
7255 A template acts as a kind of tutorial for your layout, showing how it might
7256 be used, though containing dummy content.
7257 You can of course look at the various templates included with \SpecialChar LyX
7261 \begin_layout Standard
7262 Templates are created just like usual documents: using \SpecialChar LyX
7264 The only difference is that usual documents contain all possible settings,
7265 including the font scheme and the paper size.
7266 Usually a user doesn't want a template to overwrite his preferred settings
7267 for such parameters.
7268 For that reason, the designer of a template should remove the corresponding
7270 \begin_inset Flex Code
7273 \begin_layout Plain Layout
7282 \begin_inset Flex Code
7285 \begin_layout Plain Layout
7293 from the template \SpecialChar LyX
7295 This can be done with any simple text-editor, for example
7296 \begin_inset Flex Code
7299 \begin_layout Plain Layout
7306 \begin_inset Flex Code
7309 \begin_layout Plain Layout
7318 \begin_layout Standard
7319 Put the edited template files you create in
7320 \begin_inset Flex Code
7323 \begin_layout Plain Layout
7329 , copy the ones you use from the global template directory in
7330 \begin_inset Flex Code
7333 \begin_layout Plain Layout
7339 to the same place, and redefine the template path in the
7340 \begin_inset Flex Noun
7343 \begin_layout Plain Layout
7344 Tools\SpecialChar menuseparator
7345 Preferences\SpecialChar menuseparator
7354 \begin_layout Standard
7355 Note, by the way, that there is a template which has a particular meaning:
7357 \begin_inset Flex Code
7360 \begin_layout Plain Layout
7367 This template is loaded every time you create a new document with
7368 \begin_inset Flex Noun
7371 \begin_layout Plain Layout
7372 File\SpecialChar menuseparator
7378 in order to provide useful defaults.
7379 To create this template from inside \SpecialChar LyX
7380 , all you have to do is to open a document
7381 with the correct settings, and use the
7382 \begin_inset Flex Noun
7385 \begin_layout Plain Layout
7386 Save as Document Defaults
7394 \begin_layout Subsection
7395 Upgrading old layout files
7398 \begin_layout Standard
7399 The format of layout files changes with each \SpecialChar LyX
7400 release, so old layout files
7401 need to be converted to the new format.
7403 reads a layout file in an older format, it automatically calls the
7405 \begin_inset Flex Code
7408 \begin_layout Plain Layout
7414 to convert it to a temporary file in current format.
7415 The original file is left untouched.
7416 If you use the layout file often, then, you may want to convert it permanently,
7417 so that \SpecialChar LyX
7418 does not have to do so itself every time.
7419 To do this, you can call the converter manually:
7422 \begin_layout Enumerate
7424 \begin_inset Flex Code
7427 \begin_layout Plain Layout
7434 \begin_inset Flex Code
7437 \begin_layout Plain Layout
7446 \begin_layout Enumerate
7448 \begin_inset Newline newline
7452 \begin_inset Flex Code
7455 \begin_layout Plain Layout
7456 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7462 \begin_inset Newline newline
7466 \begin_inset Flex Code
7469 \begin_layout Plain Layout
7475 is the name of your \SpecialChar LyX
7479 \begin_layout Standard
7480 Note that manual conversion does not affect included files, so these will
7481 have to be converted separately.
7484 \begin_layout Section
7485 \begin_inset CommandInset label
7487 name "sec:TextClass"
7491 The layout file format
7494 \begin_layout Standard
7495 The following sections describe how layout files are structured and written.
7496 Our advice is to go slowly, save and test often.
7497 It is really not that hard, except that the multitude of options can become
7498 overwhelming, especially if you try to check out too many at once.
7499 It becomes easier if you use existing layouts of \SpecialChar LyX
7500 as examples/reference
7501 or if you modify an existing layout to your needs.
7504 \begin_layout Standard
7505 Note that all the tags used in layout files are case-insensitive.
7507 \begin_inset Flex Code
7510 \begin_layout Plain Layout
7517 \begin_inset Flex Code
7520 \begin_layout Plain Layout
7527 \begin_inset Flex Code
7530 \begin_layout Plain Layout
7536 are really the same tag.
7537 The possible arguments are printed in brackets after the tag's name.
7538 The default argument is typeset
7539 \begin_inset Flex Code
7542 \begin_layout Plain Layout
7551 If the argument has a data type like
7552 \begin_inset Quotes eld
7556 \begin_inset Quotes erd
7560 \begin_inset Quotes eld
7564 \begin_inset Quotes erd
7567 , the default is shown like this:
7568 \begin_inset Flex Code
7571 \begin_layout Plain Layout
7582 \begin_layout Subsection
7583 The document class declaration and classification
7586 \begin_layout Standard
7587 Lines in a layout file which begin with
7588 \begin_inset Flex Code
7591 \begin_layout Plain Layout
7598 There is one exception to this rule.
7600 \begin_inset Flex Code
7603 \begin_layout Plain Layout
7609 files should begin with lines like:
7612 \begin_layout LyX-Code
7615 #% Do not delete the line below; configure depends on this
7618 \begin_layout LyX-Code
7623 DeclareLaTeXClass{Article (Standard Class)}
7626 \begin_layout LyX-Code
7631 DeclareCategory{Articles}
7634 \begin_layout Standard
7635 The second and third lines are used when you (re)configure \SpecialChar LyX
7637 The layout file is read by the \SpecialChar LaTeX
7639 \begin_inset Flex Code
7642 \begin_layout Plain Layout
7648 , in a special mode where
7649 \begin_inset Flex Code
7652 \begin_layout Plain Layout
7659 The first line is just a \SpecialChar LaTeX
7660 comment, the second one contains the mandatory
7661 declaration of the text class and the third line contains the optional
7662 classification of the class.
7663 If these lines appear in a file named
7664 \begin_inset Flex Code
7667 \begin_layout Plain Layout
7673 , then they define a text class of name
7674 \begin_inset Flex Code
7677 \begin_layout Plain Layout
7683 (the name of the layout file) which uses the \SpecialChar LaTeX
7685 \begin_inset Flex Code
7688 \begin_layout Plain Layout
7694 (the default is to use the same name as the layout).
7696 \begin_inset Quotes eld
7699 Article (Standard Class)
7700 \begin_inset Quotes erd
7703 that appears above is used as a description of the text class in the
7704 \begin_inset Flex Noun
7707 \begin_layout Plain Layout
7708 Document\SpecialChar menuseparator
7716 \begin_inset Quotes eld
7720 \begin_inset Quotes erd
7723 in the example) is also used in the
7724 \begin_inset Flex Noun
7727 \begin_layout Plain Layout
7728 Document\SpecialChar menuseparator
7734 dialog: the text classes are grouped by these categories (which are usually
7735 genres, so typical categories are
7736 \begin_inset Quotes eld
7740 \begin_inset Quotes erd
7744 \begin_inset Quotes eld
7748 \begin_inset Quotes erd
7752 \begin_inset Quotes eld
7756 \begin_inset Quotes erd
7760 \begin_inset Quotes eld
7764 \begin_inset Quotes erd
7768 \begin_inset Quotes eld
7772 \begin_inset Quotes erd
7776 \begin_inset Quotes eld
7780 \begin_inset Quotes erd
7784 If no category has been declared, the class will be put in the
7785 \begin_inset Quotes eld
7789 \begin_inset Quotes erd
7795 \begin_layout Standard
7796 Let's assume that you wrote your own text class that uses the
7797 \begin_inset Flex Code
7800 \begin_layout Plain Layout
7806 document class, but where you changed the appearance of the section headings.
7807 If you put it in a file
7808 \begin_inset Flex Code
7811 \begin_layout Plain Layout
7817 , the header of this file should be:
7820 \begin_layout LyX-Code
7823 #% Do not delete the line below; configure depends on this
7826 \begin_layout LyX-Code
7831 DeclareLaTeXClass[article]{Article (with My Own Headings)}
7834 \begin_layout LyX-Code
7839 DeclareCategory{Articles}
7842 \begin_layout Standard
7843 This declares a text class
7844 \begin_inset Flex Code
7847 \begin_layout Plain Layout
7853 , associated with the \SpecialChar LaTeX
7855 \begin_inset Flex Code
7858 \begin_layout Plain Layout
7865 \begin_inset Quotes eld
7868 Article (with My Own Headings)
7869 \begin_inset Quotes erd
7873 If your text class depends on several packages, you can declare it as:
7876 \begin_layout LyX-Code
7879 #% Do not delete the line below; configure depends on this
7882 \begin_layout LyX-Code
7887 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
7890 \begin_layout LyX-Code
7895 DeclareCategory{Articles}
7898 \begin_layout Standard
7899 This indicates that your text class uses the
7900 \begin_inset Flex Code
7903 \begin_layout Plain Layout
7910 Finally, it is also possible to declare classes for DocBook code.
7911 Typical declarations will look like:
7914 \begin_layout LyX-Code
7917 #% Do not delete the line below; configure depends on this
7920 \begin_layout LyX-Code
7925 DeclareDocBookClass[article]{SGML (DocBook Article)}
7928 \begin_layout LyX-Code
7933 DeclareCategory{Articles (DocBook)}
7936 \begin_layout Standard
7937 Note that these declarations can also be given an optional parameter declaring
7938 the name of the document class (but not a list).
7941 \begin_layout Standard
7942 So, to be as explicit as possible, the form of the layout declaration is:
7945 \begin_layout LyX-Code
7950 DeclareLaTeXClass[class,package.sty]{layout description}
7953 \begin_layout LyX-Code
7958 DeclareCategory{category}
7961 \begin_layout Standard
7962 The class need only be specified if the name of the \SpecialChar LaTeX
7964 name of the layout file are different or if there are packages to load.
7965 If the name of the class file is not specified, then \SpecialChar LyX
7967 that it is the same as the name of the layout file.
7970 \begin_layout Standard
7971 When the text class has been modified to your taste, all you have to do
7972 is to copy it either to
7973 \begin_inset Flex Code
7976 \begin_layout Plain Layout
7983 \begin_inset Flex Code
7986 \begin_layout Plain Layout
7993 \begin_inset Flex Noun
7996 \begin_layout Plain Layout
7997 Tools\SpecialChar menuseparator
8003 , exit \SpecialChar LyX
8005 Then your new text class should be available along with the others.
8008 \begin_layout Standard
8009 Once the layout file is installed, you can edit it and see your changes
8010 without having to reconfigure or to restart \SpecialChar LyX
8016 \begin_layout Plain Layout
8017 In versions of \SpecialChar LyX
8018 prior to 1.6, this was not true.
8019 As a result, editing layout files was very time consuming, since you had
8020 constantly to restart \SpecialChar LyX
8026 You can force a reload of the current layout by using the \SpecialChar LyX
8028 \begin_inset Flex Noun
8031 \begin_layout Plain Layout
8038 There is no default binding for this function—though, of course, you can
8039 bind it to a key yourself.
8040 But you will normally use this function simply by entering it in the mini-buffe
8045 \begin_layout Standard
8051 \begin_inset Flex Noun
8054 \begin_layout Plain Layout
8060 is very much an `advanced feature'.
8065 recommended that you save your work before using this function.
8070 recommended that you not attempt to edit layout information while simultaneousl
8071 y working on a document that you care about.
8072 Use a test document.
8073 Syntax errors and the like in your layout file could cause peculiar behavior.
8074 In particular, such errors could cause \SpecialChar LyX
8075 to regard the current layout as
8076 invalid and to attempt to switch to some other layout.
8080 \begin_layout Plain Layout
8081 Really bad syntax errors may even caused \SpecialChar LyX
8083 This is because certain sorts of errors may make \SpecialChar LyX
8094 The \SpecialChar LyX
8095 team strives to keep \SpecialChar LyX
8096 stable in such situations, but safe is better
8101 \begin_layout Plain Layout
8102 While we're giving advice: make regular backups.
8103 And be nice to your mother.
8111 \begin_layout Subsection
8112 The Module declaration
8115 \begin_layout Standard
8116 A module must begin with a line like the following:
8119 \begin_layout LyX-Code
8122 DeclareLyXModule[endnotes.sty]{Endnotes}
8125 \begin_layout Standard
8126 The mandatory argument, in curly brackets, is the name of the module, as
8128 \begin_inset Flex Noun
8131 \begin_layout Plain Layout
8132 Document\SpecialChar menuseparator
8133 Settings\SpecialChar menuseparator
8140 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8142 on which the module depends.
8143 It is also possible to use the form
8144 \begin_inset Flex Noun
8147 \begin_layout Plain Layout
8153 as an optional argument, which declares that the module can only be used
8154 when there exists a conversion chain between the formats `
8155 \begin_inset Flex Code
8158 \begin_layout Plain Layout
8165 \begin_inset Flex Code
8168 \begin_layout Plain Layout
8177 \begin_layout Standard
8178 The module declaration should then be followed by lines like the following
8182 \begin_layout Plain Layout
8183 Preferably in English if the module should be published with \SpecialChar LyX
8185 This description will appear in the list of messages to be translated and
8186 will be thus translated with the next interface update.
8194 \begin_layout LyX-Code
8198 \begin_layout LyX-Code
8199 #Adds an endnote command, in addition to footnotes.
8203 \begin_layout LyX-Code
8204 #You will need to add
8206 theendnotes in TeX code where you
8209 \begin_layout LyX-Code
8210 #want the endnotes to appear.
8214 \begin_layout LyX-Code
8218 \begin_layout LyX-Code
8219 #Requires: somemodule | othermodule
8222 \begin_layout LyX-Code
8223 #Excludes: badmodule
8226 \begin_layout Standard
8227 The description is used in
8228 \begin_inset Flex Noun
8231 \begin_layout Plain Layout
8232 Document\SpecialChar menuseparator
8233 Settings\SpecialChar menuseparator
8239 to provide the user with information about what the module does.
8241 \begin_inset Flex Code
8244 \begin_layout Plain Layout
8250 line is used to identify other modules with which this one must be used;
8252 \begin_inset Flex Code
8255 \begin_layout Plain Layout
8261 line is used to identify modules with which this one may not be used.
8262 Both are optional, and, as shown, multiple modules should be separated
8263 with the pipe symbol: |.
8264 Note that the required modules are treated disjunctively:
8268 of the required modules must be used.
8273 excluded module may be used.
8274 Note that modules are identified here by their filenames without the
8275 \begin_inset Flex Code
8278 \begin_layout Plain Layout
8286 \begin_inset Flex Code
8289 \begin_layout Plain Layout
8296 \begin_inset Flex Code
8299 \begin_layout Plain Layout
8308 \begin_layout Subsection
8312 \begin_layout Standard
8313 The first non-comment line of any layout file, included file, or module
8318 contain the file format number:
8321 \begin_layout Description
8322 \begin_inset Flex Code
8325 \begin_layout Plain Layout
8332 \begin_inset Flex Code
8335 \begin_layout Plain Layout
8341 ] The format number of the layout file.
8344 \begin_layout Standard
8345 This tag was introduced with \SpecialChar LyX
8347 \begin_inset space ~
8351 Layout files from older \SpecialChar LyX
8352 versions do not have an explicit file format and
8353 are considered to have
8354 \begin_inset Flex Code
8357 \begin_layout Plain Layout
8359 \begin_inset space ~
8368 The format for the present version of \SpecialChar LyX
8370 But each version of \SpecialChar LyX
8371 is capable of reading earlier versions' layout files,
8372 just as they are capable of reading files produced by earlier versions
8375 There is, however, no provision for converting to earlier formats.
8378 \begin_layout Subsection
8379 \begin_inset CommandInset label
8381 name "subsec:General-text-class"
8385 General text class parameters
8388 \begin_layout Standard
8389 These are general parameters that govern the behavior of an entire document
8395 mean that they must appear in
8396 \begin_inset Flex Code
8399 \begin_layout Plain Layout
8405 files rather than in modules.
8406 A module can contain any layout tag.)
8409 \begin_layout Description
8410 \begin_inset Flex Code
8413 \begin_layout Plain Layout
8419 Adds information that will be output in the
8420 \begin_inset Flex Code
8423 \begin_layout Plain Layout
8429 block when the document is output to XHTML.
8430 Typically, this would be used to output CSS style information, but it can
8431 be used for anything that can appear in
8432 \begin_inset Flex Code
8435 \begin_layout Plain Layout
8443 \begin_inset Quotes eld
8447 \begin_inset Flex Code
8450 \begin_layout Plain Layout
8457 \begin_inset Quotes erd
8463 \begin_layout Description
8464 \begin_inset Flex Code
8467 \begin_layout Plain Layout
8473 Adds information to the document preamble.
8475 \begin_inset Newline newline
8479 \begin_inset Quotes eld
8483 \begin_inset Flex Code
8486 \begin_layout Plain Layout
8493 \begin_inset Quotes erd
8499 \begin_layout Description
8500 \begin_inset Flex Code
8503 \begin_layout Plain Layout
8509 Defines formats for use in the display of bibliographic information.
8511 \begin_inset CommandInset ref
8513 reference "subsec:Citation-format-description"
8519 \begin_inset Quotes eld
8523 \begin_inset Flex Code
8526 \begin_layout Plain Layout
8533 \begin_inset Quotes erd
8539 \begin_layout Description
8540 \begin_inset Flex Code
8543 \begin_layout Plain Layout
8549 Describes various global options supported by the document class.
8551 \begin_inset CommandInset ref
8553 reference "subsec:ClassOptions"
8559 \begin_inset Quotes eld
8563 \begin_inset Flex Code
8566 \begin_layout Plain Layout
8573 \begin_inset Quotes erd
8579 \begin_layout Description
8580 \begin_inset Flex Code
8583 \begin_layout Plain Layout
8590 \begin_inset Flex Code
8593 \begin_layout Plain Layout
8602 \begin_inset space \thinspace{}
8606 \begin_inset Flex Code
8609 \begin_layout Plain Layout
8615 ] Whether the class should
8619 to having one or two columns.
8620 Can be changed in the
8621 \begin_inset Flex Noun
8624 \begin_layout Plain Layout
8625 Document\SpecialChar menuseparator
8634 \begin_layout Description
8635 \begin_inset Flex Code
8638 \begin_layout Plain Layout
8645 \begin_inset Flex Code
8648 \begin_layout Plain Layout
8654 ] This sequence defines the properties for a counter.
8655 If the counter does not yet exist, it is created; if it does exist, it
8658 \begin_inset Quotes eld
8662 \begin_inset Flex Code
8665 \begin_layout Plain Layout
8672 \begin_inset Quotes erd
8676 \begin_inset Newline newline
8680 \begin_inset CommandInset ref
8682 reference "subsec:Counters"
8686 for details on counters.
8689 \begin_layout Description
8690 \begin_inset Flex Code
8693 \begin_layout Plain Layout
8699 Sets the default font used to display the document.
8701 \begin_inset CommandInset ref
8703 reference "subsec:Font-description"
8707 for how to declare fonts.
8709 \begin_inset Quotes eld
8713 \begin_inset Flex Code
8716 \begin_layout Plain Layout
8723 \begin_inset Quotes erd
8729 \begin_layout Description
8730 \begin_inset Flex Code
8733 \begin_layout Plain Layout
8740 \begin_inset Flex Code
8743 \begin_layout Plain Layout
8749 ] Specifies a module to be included by default with this document class.
8750 The module is specified as filename without the
8751 \begin_inset Flex Code
8754 \begin_layout Plain Layout
8761 The user can still remove the module, but it will be active at the outset.
8762 (This applies only when new files are created, or when this class is chosen
8763 for an existing document.)
8766 \begin_layout Description
8767 \begin_inset Flex Code
8770 \begin_layout Plain Layout
8777 \begin_inset Flex Code
8780 \begin_layout Plain Layout
8786 ] This is the style that will be assigned to new paragraphs, usually
8787 \begin_inset Flex Noun
8790 \begin_layout Plain Layout
8797 This will default to the first defined style if not given, but you are
8798 encouraged to use this directive.
8801 \begin_layout Description
8802 \begin_inset Flex Code
8805 \begin_layout Plain Layout
8812 \begin_inset Flex Code
8815 \begin_layout Plain Layout
8821 ] This tag indicates that the module (which is specified by filename without
8823 \begin_inset Flex Code
8826 \begin_layout Plain Layout
8832 extension) cannot be used with this document class.
8833 This might be used in a journal-specific layout file to prevent, say, the
8835 \begin_inset Flex Code
8838 \begin_layout Plain Layout
8844 module that numbers theorems by section.
8849 be used in a module.
8850 Modules have their own way of excluding other modules (see
8851 \begin_inset CommandInset ref
8853 reference "subsec:Layout-modules"
8860 \begin_layout Description
8861 \begin_inset Flex Code
8864 \begin_layout Plain Layout
8870 Defines a new float.
8872 \begin_inset CommandInset ref
8874 reference "subsec:Floats"
8880 \begin_inset Quotes eld
8884 \begin_inset Flex Code
8887 \begin_layout Plain Layout
8894 \begin_inset Quotes erd
8900 \begin_layout Description
8901 \begin_inset Flex Code
8904 \begin_layout Plain Layout
8910 Sets the information that will be output in the
8911 \begin_inset Flex Code
8914 \begin_layout Plain Layout
8920 block when this document class is output to XHTML.
8921 Note that this will completely override any prior
8922 \begin_inset Flex Code
8925 \begin_layout Plain Layout
8932 \begin_inset Flex Code
8935 \begin_layout Plain Layout
8943 \begin_inset Newline newline
8947 \begin_inset Flex Code
8950 \begin_layout Plain Layout
8956 if you just want to add material to the preamble.) Must end with
8957 \begin_inset Quotes eld
8961 \begin_inset Flex Code
8964 \begin_layout Plain Layout
8971 \begin_inset Quotes erd
8977 \begin_layout Description
8978 \begin_inset Flex Code
8981 \begin_layout Plain Layout
8988 \begin_inset Flex Code
8991 \begin_layout Plain Layout
8997 ] The style to use for the table of contents, bibliography, and so forth,
8998 when the document is output to HTML.
8999 For articles, this should normally be
9000 \begin_inset Flex Code
9003 \begin_layout Plain Layout
9010 \begin_inset Flex Code
9013 \begin_layout Plain Layout
9020 If it is not given, then \SpecialChar LyX
9021 will attempt to figure out which layout to use.
9024 \begin_layout Description
9025 \begin_inset Flex Code
9028 \begin_layout Plain Layout
9035 \begin_inset Flex Code
9038 \begin_layout Plain Layout
9044 ] Modifies the properties of the given counter.
9045 If the counter does not exist, the statement is ignored.
9047 \begin_inset Quotes eld
9051 \begin_inset Flex Code
9054 \begin_layout Plain Layout
9061 \begin_inset Quotes erd
9065 \begin_inset Newline newline
9069 \begin_inset CommandInset ref
9071 reference "subsec:Counters"
9075 for details on counters.
9078 \begin_layout Description
9079 \begin_inset Flex Code
9082 \begin_layout Plain Layout
9089 \begin_inset Flex Code
9092 \begin_layout Plain Layout
9098 ] This allows you to include another layout definition file within yours
9099 to avoid duplicating commands.
9100 Common examples are the standard layout files, for example,
9101 \begin_inset Flex Code
9104 \begin_layout Plain Layout
9110 , which contains most of the basic layouts.
9113 \begin_layout Description
9114 \begin_inset Flex Code
9117 \begin_layout Plain Layout
9124 \begin_inset Flex Code
9127 \begin_layout Plain Layout
9133 ] This section (re-)defines the layout of an inset.
9134 It can be applied to an existing inset or to a new, user-defined inset,
9135 e.g., a new character style.
9137 \begin_inset Quotes eld
9141 \begin_inset Flex Code
9144 \begin_layout Plain Layout
9151 \begin_inset Quotes erd
9155 \begin_inset Newline newline
9159 \begin_inset CommandInset ref
9161 reference "subsec:Flex-insets-and"
9165 for more information.
9169 \begin_layout Description
9170 \begin_inset Flex Code
9173 \begin_layout Plain Layout
9180 \begin_inset Flex Code
9183 \begin_layout Plain Layout
9189 ] A string that indicates the width of the left margin on the screen, for
9191 \begin_inset Quotes eld
9195 \begin_inset Flex Code
9198 \begin_layout Plain Layout
9205 \begin_inset Quotes erd
9209 (Note that this is not a `length', like
9210 \begin_inset Quotes eld
9214 \begin_inset Quotes erd
9220 \begin_layout Description
9221 \begin_inset Flex Code
9224 \begin_layout Plain Layout
9231 \begin_inset Flex Code
9234 \begin_layout Plain Layout
9240 ] Modifies the properties of the given paragraph style.
9241 If the style does not exist, this section is ignored.
9243 \begin_inset Quotes eld
9247 \begin_inset Flex Code
9250 \begin_layout Plain Layout
9257 \begin_inset Quotes erd
9263 \begin_layout Description
9264 \begin_inset Flex Code
9267 \begin_layout Plain Layout
9274 \begin_inset Flex Code
9277 \begin_layout Plain Layout
9283 ] Deletes an existing counter, usually one defined in an included file.
9286 \begin_layout Description
9287 \begin_inset Flex Code
9290 \begin_layout Plain Layout
9297 \begin_inset Flex Code
9300 \begin_layout Plain Layout
9306 ] Deletes an existing float.
9307 This is particularly useful when you want to suppress a float that has
9308 been defined in an input file.
9311 \begin_layout Description
9312 \begin_inset Flex Code
9315 \begin_layout Plain Layout
9322 \begin_inset Flex Code
9325 \begin_layout Plain Layout
9331 ] Deletes an existing style.
9334 \begin_layout Description
9335 \begin_inset Flex Code
9338 \begin_layout Plain Layout
9345 \begin_inset Flex Code
9348 \begin_layout Plain Layout
9354 ] The file format (as defined in the \SpecialChar LyX
9355 preferences) produced by this document
9357 It is mainly useful when
9358 \begin_inset Flex Code
9361 \begin_layout Plain Layout
9368 \begin_inset Flex Code
9371 \begin_layout Plain Layout
9377 and one wants to define a new type of literate document.
9378 The format is reset to
9379 \begin_inset Quotes eld
9383 \begin_inset Flex Code
9386 \begin_layout Plain Layout
9393 \begin_inset Quotes erd
9397 \begin_inset Quotes eld
9401 \begin_inset Flex Code
9404 \begin_layout Plain Layout
9411 \begin_inset Quotes erd
9414 when the corresponding
9415 \begin_inset Flex Code
9418 \begin_layout Plain Layout
9424 parameter is encountered.
9427 \begin_layout Description
9428 \begin_inset Flex Code
9431 \begin_layout Plain Layout
9438 \begin_inset Flex Code
9441 \begin_layout Plain Layout
9452 \begin_inset Flex Code
9455 \begin_layout Plain Layout
9462 \begin_inset Flex Code
9465 \begin_layout Plain Layout
9471 ] Specifies what sort of output documents using this class will produce.
9474 \begin_layout Description
9475 \begin_inset Flex Code
9478 \begin_layout Plain Layout
9485 \begin_inset Flex Code
9488 \begin_layout Plain Layout
9495 \begin_inset Flex Code
9498 \begin_layout Plain Layout
9504 ] Specifies options, given in the second string, for the package named by
9507 \begin_inset Quotes eld
9511 \begin_inset Flex Code
9514 \begin_layout Plain Layout
9515 PackageOptions natbib square
9521 \begin_inset Quotes erd
9525 \begin_inset Flex Code
9528 \begin_layout Plain Layout
9534 to be loaded with the
9535 \begin_inset Flex Code
9538 \begin_layout Plain Layout
9545 (For \SpecialChar TeX
9546 perts, this causes \SpecialChar LyX
9548 \begin_inset Flex Code
9551 \begin_layout Plain Layout
9554 PassOptionsToPackage{natbib}{square}
9560 \begin_inset Flex Code
9563 \begin_layout Plain Layout
9572 \begin_layout Description
9573 \begin_inset Flex Code
9576 \begin_layout Plain Layout
9583 \begin_inset Flex Code
9586 \begin_layout Plain Layout
9595 \begin_inset Flex Code
9598 \begin_layout Plain Layout
9605 \begin_inset Flex Code
9608 \begin_layout Plain Layout
9614 ] The default pagestyle.
9615 Can be changed in the
9616 \begin_inset Flex Noun
9619 \begin_layout Plain Layout
9620 Document\SpecialChar menuseparator
9629 \begin_layout Description
9630 \begin_inset Flex Code
9633 \begin_layout Plain Layout
9639 Sets the preamble for the \SpecialChar LaTeX
9641 Note that this will completely override any prior
9642 \begin_inset Flex Code
9645 \begin_layout Plain Layout
9652 \begin_inset Flex Code
9655 \begin_layout Plain Layout
9663 \begin_inset Flex Code
9666 \begin_layout Plain Layout
9672 if you just want to add material to the preamble.) Must end with
9673 \begin_inset Quotes eld
9677 \begin_inset Flex Code
9680 \begin_layout Plain Layout
9687 \begin_inset Quotes erd
9693 \begin_layout Description
9694 \begin_inset Flex Code
9697 \begin_layout Plain Layout
9704 \begin_inset Flex Code
9707 \begin_layout Plain Layout
9714 \begin_inset Flex Code
9717 \begin_layout Plain Layout
9726 \begin_inset space \thinspace{}
9730 \begin_inset Flex Code
9733 \begin_layout Plain Layout
9739 ] Whether the class already provides the feature
9740 \begin_inset Flex Code
9743 \begin_layout Plain Layout
9750 A feature is in general the name of a package (e.
9751 \begin_inset space \thinspace{}
9755 \begin_inset space \space{}
9759 \begin_inset Flex Code
9762 \begin_layout Plain Layout
9769 \begin_inset Flex Code
9772 \begin_layout Plain Layout
9779 \begin_inset space \thinspace{}
9783 \begin_inset space \space{}
9787 \begin_inset Flex Code
9790 \begin_layout Plain Layout
9797 \begin_inset Flex Code
9800 \begin_layout Plain Layout
9808 \begin_inset CommandInset ref
9810 reference "chap:List-of-functions"
9814 for the list of features.
9817 \begin_layout Description
9818 \begin_inset Flex Code
9821 \begin_layout Plain Layout
9828 \begin_inset Flex Code
9831 \begin_layout Plain Layout
9837 ] Indicates that this layout provides the functionality of the module mentioned,
9838 which should be specified by the filename without the
9839 \begin_inset Flex Code
9842 \begin_layout Plain Layout
9849 This will typically be used if the layout includes the module directly,
9850 rather than using the
9851 \begin_inset Flex Code
9854 \begin_layout Plain Layout
9860 tag to indicate that it ought to be used.
9861 It could also be used in a module that provided an alternate implementation
9862 of the same functionality.
9865 \begin_layout Description
9866 \begin_inset Flex Code
9869 \begin_layout Plain Layout
9876 \begin_inset Flex Code
9879 \begin_layout Plain Layout
9885 ] Creates a new paragraph style if it does not already exist.
9886 If the style does exist, this section is ignored.
9888 \begin_inset Quotes eld
9892 \begin_inset Flex Code
9895 \begin_layout Plain Layout
9902 \begin_inset Quotes erd
9908 \begin_layout Description
9909 \begin_inset Flex Code
9912 \begin_layout Plain Layout
9919 \begin_inset Flex Code
9922 \begin_layout Plain Layout
9928 ] Whether the class requires the feature
9929 \begin_inset Flex Code
9932 \begin_layout Plain Layout
9939 Multiple features must be separated by commas.
9940 Note that you can only request supported features.
9942 \begin_inset CommandInset ref
9944 reference "chap:List-of-functions"
9948 for the list of features.).
9949 If you require a package with specific options, you can additionally use
9951 \begin_inset Flex Code
9954 \begin_layout Plain Layout
9963 \begin_layout Description
9964 \begin_inset Flex Code
9967 \begin_layout Plain Layout
9974 \begin_inset Flex Code
9977 \begin_layout Plain Layout
9983 ] A string that indicates the width of the right margin on the screen, for
9985 \begin_inset Quotes eld
9989 \begin_inset Flex Code
9992 \begin_layout Plain Layout
9999 \begin_inset Quotes erd
10005 \begin_layout Description
10006 \begin_inset Flex Code
10009 \begin_layout Plain Layout
10016 \begin_inset Flex Code
10019 \begin_layout Plain Layout
10025 ] Sets which divisions get numbered.
10027 \begin_inset Newline newline
10031 \begin_inset Flex Code
10034 \begin_layout Plain Layout
10040 counter in \SpecialChar LaTeX
10044 \begin_layout Description
10045 \begin_inset Flex Code
10048 \begin_layout Plain Layout
10055 \begin_inset Flex Code
10058 \begin_layout Plain Layout
10067 \begin_inset space \thinspace{}
10071 \begin_inset Flex Code
10074 \begin_layout Plain Layout
10080 ] Whether the class-default should be printing on one or both sides of the
10082 Can be changed in the
10083 \begin_inset Flex Noun
10086 \begin_layout Plain Layout
10087 Document\SpecialChar menuseparator
10096 \begin_layout Description
10097 \begin_inset Flex Code
10100 \begin_layout Plain Layout
10107 \begin_inset Flex Code
10110 \begin_layout Plain Layout
10116 ] This sequence defines a paragraph style.
10117 If the style does not yet exist, it is created; if it does exist, its parameter
10120 \begin_inset Quotes eld
10124 \begin_inset Flex Code
10127 \begin_layout Plain Layout
10134 \begin_inset Quotes erd
10138 \begin_inset Newline newline
10142 \begin_inset CommandInset ref
10144 reference "subsec:Paragraph-Styles"
10148 for details on paragraph styles.
10151 \begin_layout Description
10152 \begin_inset Flex Code
10155 \begin_layout Plain Layout
10162 \begin_inset Flex Code
10165 \begin_layout Plain Layout
10171 ] The name of the command or environment to be used with
10172 \begin_inset Flex Code
10175 \begin_layout Plain Layout
10184 \begin_layout Description
10185 \begin_inset Flex Code
10188 \begin_layout Plain Layout
10195 \begin_inset Flex Code
10198 \begin_layout Plain Layout
10207 \begin_inset Flex Code
10210 \begin_layout Plain Layout
10216 ] Indicates what kind of markup is used to define the title of a document.
10218 \begin_inset Flex Code
10221 \begin_layout Plain Layout
10227 means that the macro with name
10228 \begin_inset Flex Code
10231 \begin_layout Plain Layout
10237 will be inserted after the last layout which has
10238 \begin_inset Quotes eld
10242 \begin_inset Flex Code
10245 \begin_layout Plain Layout
10247 \begin_inset space ~
10256 \begin_inset Quotes erd
10261 \begin_inset Flex Code
10264 \begin_layout Plain Layout
10270 corresponds to the case where all layouts which have
10271 \begin_inset Quotes eld
10275 \begin_inset Flex Code
10278 \begin_layout Plain Layout
10280 \begin_inset space ~
10289 \begin_inset Quotes erd
10292 should be enclosed into the
10293 \begin_inset Flex Code
10296 \begin_layout Plain Layout
10305 \begin_layout Description
10306 \begin_inset Flex Code
10309 \begin_layout Plain Layout
10316 \begin_inset Flex Code
10319 \begin_layout Plain Layout
10325 ] Sets which divisions are included in the table of contents.
10327 \begin_inset Flex Code
10330 \begin_layout Plain Layout
10336 counter in \SpecialChar LaTeX
10340 \begin_layout Subsection
10341 \begin_inset Flex Code
10344 \begin_layout Plain Layout
10351 \begin_inset CommandInset label
10353 name "subsec:ClassOptions"
10360 \begin_layout Standard
10362 \begin_inset Flex Code
10365 \begin_layout Plain Layout
10371 section can contain the following entries:
10374 \begin_layout Description
10375 \begin_inset Flex Code
10378 \begin_layout Plain Layout
10385 \begin_inset Flex Code
10388 \begin_layout Plain Layout
10394 ] The list of available font sizes for the document's main font, separated
10396 \begin_inset Quotes eld
10400 \begin_inset Flex Code
10403 \begin_layout Plain Layout
10410 \begin_inset Quotes erd
10416 \begin_layout Description
10417 \begin_inset Flex Code
10420 \begin_layout Plain Layout
10426 Used to set the DTD line with XML-based output classes.
10428 \begin_inset space \thinspace{}
10432 \begin_inset Quotes eld
10435 -//OASIS//DTD DocBook V4.2//EN
10436 \begin_inset Quotes erd
10442 \begin_layout Description
10443 \begin_inset Flex Code
10446 \begin_layout Plain Layout
10453 \begin_inset Flex Code
10456 \begin_layout Plain Layout
10457 string="empty|plain|headings|fancy"
10462 ] The list of available page sty\SpecialChar softhyphen
10464 \begin_inset Quotes eld
10468 \begin_inset Flex Code
10471 \begin_layout Plain Layout
10478 \begin_inset Quotes erd
10484 \begin_layout Description
10485 \begin_inset Flex Code
10488 \begin_layout Plain Layout
10495 \begin_inset Flex Code
10498 \begin_layout Plain Layout
10504 ] Some document class options, separated by a comma, that will be added
10505 to the optional part of the
10506 \begin_inset Flex Code
10509 \begin_layout Plain Layout
10520 \begin_layout Standard
10522 \begin_inset Flex Code
10525 \begin_layout Plain Layout
10531 section must end with
10532 \begin_inset Quotes eld
10536 \begin_inset Flex Code
10539 \begin_layout Plain Layout
10546 \begin_inset Quotes erd
10552 \begin_layout Subsection
10554 \begin_inset CommandInset label
10556 name "subsec:Paragraph-Styles"
10563 \begin_layout Standard
10564 A paragraph style description looks like this:
10568 \begin_layout Plain Layout
10569 Note that this will either define a new style or modify an existing one.
10577 \begin_layout LyX-Code
10584 \begin_layout LyX-Code
10588 \begin_layout LyX-Code
10592 \begin_layout Standard
10593 where the following commands are allowed:
10596 \begin_layout Description
10597 \begin_inset Flex Code
10600 \begin_layout Plain Layout
10607 \begin_inset Flex Code
10610 \begin_layout Plain Layout
10615 , left, right, center
10620 ] Paragraph alignment.
10623 \begin_layout Description
10624 \begin_inset Flex Code
10627 \begin_layout Plain Layout
10634 \begin_inset Flex Code
10637 \begin_layout Plain Layout
10642 , left, right, center
10647 ] A comma separated list of permitted alignments.
10648 (Some \SpecialChar LaTeX
10649 styles prohibit certain alignments, since those wouldn't make sense.
10650 For example a right-aligned or centered enumeration isn't possible.)
10653 \begin_layout Description
10654 \begin_inset Flex Code
10657 \begin_layout Plain Layout
10664 \begin_inset Flex Code
10667 \begin_layout Plain Layout
10673 ] Defines argument number <int> of a command\SpecialChar breakableslash
10674 environment associated with
10676 This is useful for things like section headings, and only makes sense with
10679 Every (optional or required) argument of a command or environment – except
10680 for the required argument that is associated with the content of the paragraph
10681 itself – has a separate definition, where the number specifies the order
10683 The definition must end with
10684 \begin_inset Flex Code
10687 \begin_layout Plain Layout
10694 So a command with two optional arguments has:
10695 \begin_inset Separator parbreak
10702 \begin_layout Quote
10708 \begin_layout Quote
10714 \begin_layout Quote
10720 \begin_layout Quote
10726 \begin_layout Quote
10732 \begin_layout Quote
10738 \begin_layout Standard
10740 \begin_inset Flex Code
10743 \begin_layout Plain Layout
10749 definition, the following specifications are possible:
10752 \begin_layout Itemize
10753 \begin_inset Flex Code
10756 \begin_layout Plain Layout
10763 \begin_inset Flex Code
10766 \begin_layout Plain Layout
10772 The string that will appear both in the menu (to insert this argument)
10773 and on the argument inset button (unless you also specify a separate
10774 \begin_inset Flex Code
10777 \begin_layout Plain Layout
10784 For the menu, you can define an accelerator by appending the respective
10785 character to the string, divided by
10786 \begin_inset Quotes eld
10790 \begin_inset Quotes erd
10794 \begin_inset space \thinspace{}
10798 \begin_inset space \space{}
10802 \begin_inset Quotes eld
10806 \begin_inset Flex Code
10809 \begin_layout Plain Layout
10816 \begin_inset Quotes erd
10822 \begin_layout Itemize
10823 \begin_inset Flex Code
10826 \begin_layout Plain Layout
10833 \begin_inset Flex Code
10836 \begin_layout Plain Layout
10842 A separate string for the menu.
10843 You can define an accelerator by appending the respective character to
10844 the string, divided by
10845 \begin_inset Quotes eld
10849 \begin_inset Quotes erd
10853 \begin_inset space \thinspace{}
10857 \begin_inset space \space{}
10861 \begin_inset Quotes eld
10865 \begin_inset Flex Code
10868 \begin_layout Plain Layout
10875 \begin_inset Quotes erd
10879 This specification is optional.
10880 If it is not given the
10881 \begin_inset Flex Code
10884 \begin_layout Plain Layout
10890 will be used instead for the menu.
10893 \begin_layout Itemize
10894 \begin_inset Flex Code
10897 \begin_layout Plain Layout
10904 \begin_inset Flex Code
10907 \begin_layout Plain Layout
10913 A longer explanatory text that appears in the tooltip when hovering over
10914 the argument inset.
10917 \begin_layout Itemize
10918 \begin_inset Flex Code
10921 \begin_layout Plain Layout
10928 \begin_inset Flex Code
10931 \begin_layout Plain Layout
10940 \begin_inset space \thinspace{}
10944 \begin_inset Flex Code
10947 \begin_layout Plain Layout
10953 ] Declare if this is a mandatory (1) or an optional (0) argument.
10954 Mandatory arguments will be output empty if not given, while optional arguments
10955 will not be output at all.
10956 By default, mandatory arguments are delimited by
10957 \begin_inset Flex Code
10960 \begin_layout Plain Layout
10966 , while optional arguments are delimited by
10967 \begin_inset Flex Code
10970 \begin_layout Plain Layout
10979 \begin_layout Itemize
10980 \begin_inset Flex Code
10983 \begin_layout Plain Layout
10990 \begin_inset Flex Code
10993 \begin_layout Plain Layout
10999 defines another argument (by its number) which this argument requires to
11000 be output if it is itself output.
11002 \begin_inset space \thinspace{}
11005 g., in \SpecialChar LaTeX
11006 commands, optional arguments often require previous optional arguments
11007 to be output (at least empty), as in
11008 \begin_inset Flex Code
11011 \begin_layout Plain Layout
11014 command[][argument]{text}
11020 This can be achieved by the statement
11021 \begin_inset Flex Code
11024 \begin_layout Plain Layout
11031 \begin_inset Flex Code
11034 \begin_layout Plain Layout
11043 \begin_layout Itemize
11044 \begin_inset Flex Code
11047 \begin_layout Plain Layout
11054 \begin_inset Flex Code
11057 \begin_layout Plain Layout
11063 defines a custom left delimiter (instead of
11064 \begin_inset Flex Code
11067 \begin_layout Plain Layout
11074 \begin_inset Flex Code
11077 \begin_layout Plain Layout
11084 A line break in the output can be indicated by
11085 \begin_inset Flex Code
11088 \begin_layout Plain Layout
11097 \begin_layout Itemize
11098 \begin_inset Flex Code
11101 \begin_layout Plain Layout
11108 \begin_inset Flex Code
11111 \begin_layout Plain Layout
11117 defines a custom right delimiter (instead of
11118 \begin_inset Flex Code
11121 \begin_layout Plain Layout
11128 \begin_inset Flex Code
11131 \begin_layout Plain Layout
11138 A line break in the output can be indicated by
11139 \begin_inset Flex Code
11142 \begin_layout Plain Layout
11151 \begin_layout Itemize
11152 \begin_inset Flex Code
11155 \begin_layout Plain Layout
11162 \begin_inset Flex Code
11165 \begin_layout Plain Layout
11171 defines an argument that is inserted if and only if no user-specified arguments
11173 \begin_inset space \thinspace{}
11177 \begin_inset space \space{}
11180 if no argument inset has been inserted (note that also an empty argument
11181 inset omits the DefaultArg).
11182 Multiple arguments need to be separated by comma.
11185 \begin_layout Itemize
11186 \begin_inset Flex Code
11189 \begin_layout Plain Layout
11196 \begin_inset Flex Code
11199 \begin_layout Plain Layout
11205 defines an argument that is inserted in any case (alone or in addition
11206 to user-specified arguments).
11207 Multiple arguments need to be separated by comma.
11210 \begin_layout Itemize
11211 \begin_inset Flex Code
11214 \begin_layout Plain Layout
11220 The font used for the argument content, see
11221 \begin_inset CommandInset ref
11223 reference "subsec:Font-description"
11230 \begin_layout Itemize
11231 \begin_inset Flex Code
11234 \begin_layout Plain Layout
11240 The font used for the label; see
11241 \begin_inset CommandInset ref
11243 reference "subsec:Font-description"
11250 \begin_layout Itemize
11251 \begin_inset Flex Code
11254 \begin_layout Plain Layout
11261 \begin_inset Flex Code
11264 \begin_layout Plain Layout
11269 , Minimalistic, Conglomerate
11274 ] describes the rendering style used for the inset's frame and buttons.
11277 \begin_layout Itemize
11278 \begin_inset Flex Code
11281 \begin_layout Plain Layout
11288 \begin_inset Flex Code
11291 \begin_layout Plain Layout
11298 \begin_inset Flex Code
11301 \begin_layout Plain Layout
11307 , this argument is automatically inserted when the respective style is selected.
11308 Currently, only one argument per style\SpecialChar breakableslash
11309 layout can be automatically inserted.
11312 \begin_layout Itemize
11313 \begin_inset Flex Code
11316 \begin_layout Plain Layout
11323 \begin_inset Flex Code
11326 \begin_layout Plain Layout
11333 \begin_inset Flex Code
11336 \begin_layout Plain Layout
11342 , this argument will be inserted with a copy of the co-text (either selected
11343 text or the whole paragraph) as content.
11346 \begin_layout Itemize
11347 \begin_inset Flex Code
11350 \begin_layout Plain Layout
11357 \begin_inset Flex Code
11360 \begin_layout Plain Layout
11361 string of characters
11370 Defines individual characters that should be output in raw form, meaning
11371 without special translations that \SpecialChar LaTeX
11373 Note that, contrary to PassThru, this needs to be explicitly defined for
11375 That is, arguments do not inherit PassThruChars from their parent inset
11379 \begin_layout Standard
11380 By default, the text entered in the \SpecialChar LyX
11381 workarea in the respective layout is
11382 the last (mandatory) argument of a command if the
11383 \begin_inset Flex Code
11386 \begin_layout Plain Layout
11393 \begin_inset Flex Code
11396 \begin_layout Plain Layout
11403 However, arguments with the prefix
11404 \begin_inset Flex Code
11407 \begin_layout Plain Layout
11413 are output after this workarea argument.
11414 Note that post-argument numbering restarts at 1, so the first argument
11415 following the workarea argument is
11416 \begin_inset Flex Code
11419 \begin_layout Plain Layout
11426 Post-arguments are ignored in any other
11427 \begin_inset Flex Code
11430 \begin_layout Plain Layout
11437 \begin_inset Flex Code
11440 \begin_layout Plain Layout
11449 \begin_layout Standard
11451 \begin_inset Flex Code
11454 \begin_layout Plain Layout
11463 \begin_inset Flex Code
11466 \begin_layout Plain Layout
11475 \begin_inset Flex Code
11478 \begin_layout Plain Layout
11484 followed by the number (e.
11485 \begin_inset space \thinspace{}
11489 \begin_inset space \space{}
11493 \begin_inset Flex Code
11496 \begin_layout Plain Layout
11506 \begin_layout Description
11507 \begin_inset Flex Code
11510 \begin_layout Plain Layout
11516 Note that this will completely override any prior
11517 \begin_inset Flex Code
11520 \begin_layout Plain Layout
11526 declaration for this style.
11528 \begin_inset Quotes eld
11532 \begin_inset Flex Code
11535 \begin_layout Plain Layout
11542 \begin_inset Quotes erd
11547 \begin_inset CommandInset ref
11549 reference "subsec:I18n"
11553 for details on its use.
11556 \begin_layout Description
11557 \begin_inset Flex Code
11560 \begin_layout Plain Layout
11567 \begin_inset Flex Code
11570 \begin_layout Plain Layout
11580 \begin_layout Plain Layout
11581 Note that a `float' here is a real number, such as: 1.5.
11586 The vertical space with which the last of a chain of paragraphs with this
11587 style is separated from the following paragraph.
11588 If the next paragraph has another style, the separations are not simply
11589 added, but the maximum is taken.
11592 \begin_layout Description
11593 \begin_inset Flex Code
11596 \begin_layout Plain Layout
11603 \begin_inset Flex Code
11606 \begin_layout Plain Layout
11612 ] The category for this style.
11613 This is used to group related styles in the style combobox on the toolbar.
11614 Any string can be used, but you may want to use existing categories with
11619 \begin_layout Description
11620 \begin_inset Flex Code
11623 \begin_layout Plain Layout
11629 Depth of XML command.
11630 Used only with XML-type formats.
11633 \begin_layout Description
11634 \begin_inset Flex Code
11637 \begin_layout Plain Layout
11644 \begin_inset Flex Code
11647 \begin_layout Plain Layout
11653 ] Copies all the features of an existing style into the current one.
11657 \begin_layout Description
11658 \begin_inset Flex Code
11661 \begin_layout Plain Layout
11668 \begin_inset Flex Code
11671 \begin_layout Plain Layout
11677 ] The name of a style whose preamble should be output
11682 This allows to ensure some ordering of the preamble snippets when macros
11683 definitions depend on one another.
11687 \begin_layout Plain Layout
11688 Note that, besides that functionality, there is no way to ensure any ordering
11690 The ordering that you see in a given version of \SpecialChar LyX
11691 may change without warning
11700 \begin_layout Description
11701 \begin_inset Flex Code
11704 \begin_layout Plain Layout
11711 \begin_inset Flex Code
11714 \begin_layout Plain Layout
11719 , Box, Filled_Box, Static
11724 ] The type of label that stands at the end of the paragraph (or sequence
11726 \begin_inset Flex Code
11729 \begin_layout Plain Layout
11736 \begin_inset Newline newline
11740 \begin_inset Flex Code
11743 \begin_layout Plain Layout
11750 \begin_inset Flex Code
11753 \begin_layout Plain Layout
11760 \begin_inset Flex Code
11763 \begin_layout Plain Layout
11771 \begin_inset Flex Code
11774 \begin_layout Plain Layout
11781 \begin_inset Quotes eld
11785 \begin_inset Quotes erd
11789 \begin_inset Flex Code
11792 \begin_layout Plain Layout
11799 \begin_inset space \space{}
11803 \begin_inset Flex Code
11806 \begin_layout Plain Layout
11812 ) is a white (resp.
11813 \begin_inset space ~
11816 black) square suitable for end of proof markers,
11817 \begin_inset Flex Code
11820 \begin_layout Plain Layout
11826 is an explicit text string.
11829 \begin_layout Description
11830 \begin_inset Flex Code
11833 \begin_layout Plain Layout
11840 \begin_inset Flex Code
11843 \begin_layout Plain Layout
11849 ] The string used for a label with a
11850 \begin_inset Flex Code
11853 \begin_layout Plain Layout
11860 \begin_inset Newline newline
11864 \begin_inset Flex Code
11867 \begin_layout Plain Layout
11877 \begin_layout Description
11878 \begin_inset Flex Code
11881 \begin_layout Plain Layout
11887 The font used for both the text body
11893 \begin_inset CommandInset ref
11895 reference "subsec:Font-description"
11900 Note that defining this font automatically defines the
11901 \begin_inset Flex Code
11904 \begin_layout Plain Layout
11911 So you should define this one first if you also want to define
11912 \begin_inset Flex Code
11915 \begin_layout Plain Layout
11924 \begin_layout Description
11925 \begin_inset Flex Code
11928 \begin_layout Plain Layout
11935 \begin_inset Flex Code
11938 \begin_layout Plain Layout
11944 ] Used for backporting new styles to stable \SpecialChar LyX
11946 The first stable version that supports this tag is \SpecialChar LyX
11948 The argument is a number which may either be 0, -1 or any value greater
11951 \begin_inset Flex Code
11954 \begin_layout Plain Layout
11960 flag of a style is greater than zero, it will always be written to the
11962 If a .lyx file is read, the style definitions from the document header are
11963 added to the document class.
11964 Therefore even older \SpecialChar LyX
11965 versions can handle the style.
11967 \begin_inset Flex Code
11970 \begin_layout Plain Layout
11976 is a version number: If the style is read, and the version number is less
11977 than the version number of the already existing style in the document class,
11978 the new style is ignored.
11979 If the version number is greater, the new style replaces the existing style.
11980 A value of -1 means an infinite version number, i.
11981 \begin_inset space \thinspace{}
11985 \begin_inset space \space{}
11988 the style is always used.
11991 \begin_layout Description
11992 \begin_inset Flex Code
11995 \begin_layout Plain Layout
12002 \begin_inset Flex Code
12005 \begin_layout Plain Layout
12014 \begin_inset space \thinspace{}
12018 \begin_inset Flex Code
12021 \begin_layout Plain Layout
12027 ] Usually \SpecialChar LyX
12028 does not allow you to insert more than one space between words,
12029 since a space is considered as the separation between two words, not a
12030 character or symbol of its own.
12031 This is a very fine thing but sometimes annoying, for example, when typing
12032 program code or plain \SpecialChar LaTeX
12035 \begin_inset Flex Code
12038 \begin_layout Plain Layout
12045 Note that \SpecialChar LyX
12046 will create protected blanks for the additional blanks when
12047 in another mode than \SpecialChar LaTeX
12051 \begin_layout Description
12052 \begin_inset Flex Code
12055 \begin_layout Plain Layout
12061 These tags are used with XHTML output.
12063 \begin_inset CommandInset ref
12065 reference "subsec:Paragraph-Style-XHTML"
12072 \begin_layout Description
12073 \begin_inset Flex Code
12076 \begin_layout Plain Layout
12082 [FIXME] (Used only with XML-type formats.)
12085 \begin_layout Description
12086 \begin_inset Flex Code
12089 \begin_layout Plain Layout
12096 \begin_inset Flex Code
12099 \begin_layout Plain Layout
12108 \begin_inset space \thinspace{}
12112 \begin_inset Flex Code
12115 \begin_layout Plain Layout
12122 \begin_inset Flex Code
12125 \begin_layout Plain Layout
12131 , marks the style as to be included in the document preamble and not in
12133 This is useful for document classes that want such information as the title
12134 and author to appear in the preamble.
12135 Note that this works only for styles for which the
12136 \begin_inset Flex Code
12139 \begin_layout Plain Layout
12146 \begin_inset Flex Code
12149 \begin_layout Plain Layout
12156 \begin_inset Flex Code
12159 \begin_layout Plain Layout
12168 \begin_layout Description
12169 \begin_inset Flex Code
12172 \begin_layout Plain Layout
12179 \begin_inset Flex Code
12182 \begin_layout Plain Layout
12191 \begin_inset space \thinspace{}
12195 \begin_inset Flex Code
12198 \begin_layout Plain Layout
12205 \begin_inset Flex Code
12208 \begin_layout Plain Layout
12214 , marks the style as being part of a title block (see also the
12215 \begin_inset Flex Code
12218 \begin_layout Plain Layout
12225 \begin_inset Flex Code
12228 \begin_layout Plain Layout
12237 \begin_layout Description
12238 \begin_inset Flex Code
12241 \begin_layout Plain Layout
12248 \begin_inset Flex Code
12251 \begin_layout Plain Layout
12257 ] The \SpecialChar LaTeX
12258 command sequence declaring an item in a list.
12259 The command is to be defined without the preceding backslash (the default
12261 \begin_inset Quotes eld
12265 \begin_inset Quotes erd
12269 \begin_inset Flex Code
12272 \begin_layout Plain Layout
12280 in the \SpecialChar LaTeX
12284 \begin_layout Description
12285 \begin_inset Flex Code
12288 \begin_layout Plain Layout
12295 \begin_inset Flex Code
12298 \begin_layout Plain Layout
12304 ] This provides extra space between paragraphs that have the same style.
12305 If you put other styles into an environment, each is separated with the
12307 \begin_inset Flex Code
12310 \begin_layout Plain Layout
12317 But the whole items of the environment are additionally separated with
12319 \begin_inset Flex Code
12322 \begin_layout Plain Layout
12329 Note that this is a
12334 \begin_layout Description
12335 \begin_inset Flex Code
12338 \begin_layout Plain Layout
12344 [FIXME] (Used only with XML-type formats.)
12347 \begin_layout Description
12348 \begin_inset Flex Code
12351 \begin_layout Plain Layout
12358 \begin_inset Flex Code
12361 \begin_layout Plain Layout
12370 \begin_inset space \thinspace{}
12374 \begin_inset Flex Code
12377 \begin_layout Plain Layout
12383 ] Usually \SpecialChar LyX
12384 does not allow you to leave a paragraph empty, since it would
12385 lead to empty \SpecialChar LaTeX
12387 There are some cases where this could be desirable however: in a letter
12388 template, the required fields can be provided as empty fields, so that
12389 people do not forget them; in some special classes, a style can be used
12390 as some kind of break, which does not contain actual text.
12393 \begin_layout Description
12394 \begin_inset Flex Code
12397 \begin_layout Plain Layout
12404 \begin_inset Flex Code
12407 \begin_layout Plain Layout
12413 ] The vertical space between the label and the text body.
12414 Only used for labels that are above the text body (
12415 \begin_inset Flex Code
12418 \begin_layout Plain Layout
12425 \begin_inset Newline newline
12429 \begin_inset Flex Code
12432 \begin_layout Plain Layout
12433 Centered_Top_Environment
12441 \begin_layout Description
12442 \begin_inset Flex Code
12445 \begin_layout Plain Layout
12452 \begin_inset Flex Code
12455 \begin_layout Plain Layout
12461 ] The name of the counter for automatic numbering.
12462 In order to have the counter appear with your label, you will need to reference
12464 \begin_inset Flex Code
12467 \begin_layout Plain Layout
12476 This will work with
12477 \begin_inset Flex Code
12480 \begin_layout Plain Layout
12487 \begin_inset Flex Code
12490 \begin_layout Plain Layout
12497 \begin_inset Flex Code
12500 \begin_layout Plain Layout
12507 \begin_inset Flex Code
12510 \begin_layout Plain Layout
12517 \begin_inset Newline newline
12525 \begin_inset Flex Code
12528 \begin_layout Plain Layout
12535 \begin_inset Flex Code
12538 \begin_layout Plain Layout
12544 , though this case is a bit complicated.
12545 Suppose you declare
12546 \begin_inset Quotes eld
12550 \begin_inset Flex Code
12553 \begin_layout Plain Layout
12554 LabelCounter myenum
12560 \begin_inset Quotes erd
12564 Then the actual counters used are
12565 \begin_inset Flex Code
12568 \begin_layout Plain Layout
12575 \begin_inset Flex Code
12578 \begin_layout Plain Layout
12585 \begin_inset Flex Code
12588 \begin_layout Plain Layout
12595 \begin_inset Flex Code
12598 \begin_layout Plain Layout
12604 , much as in \SpecialChar LaTeX
12606 These counters must all be declared separately.
12607 \begin_inset Newline newline
12611 \begin_inset CommandInset ref
12613 reference "subsec:Counters"
12617 for details on counters.
12620 \begin_layout Description
12621 \begin_inset Flex Code
12624 \begin_layout Plain Layout
12630 The font used for the label.
12632 \begin_inset CommandInset ref
12634 reference "subsec:Font-description"
12641 \begin_layout Description
12642 \begin_inset Flex Code
12645 \begin_layout Plain Layout
12652 \begin_inset Flex Code
12655 \begin_layout Plain Layout
12661 ] Text that indicates how far a label should be indented.
12664 \begin_layout Description
12665 \begin_inset Flex Code
12668 \begin_layout Plain Layout
12675 \begin_inset Flex Code
12678 \begin_layout Plain Layout
12684 ] Text that indicates the amount of horizontal space between the label and
12686 Only used for labels that are not above the text body.
12689 \begin_layout Description
12690 \begin_inset Flex Code
12693 \begin_layout Plain Layout
12700 \begin_inset Flex Code
12703 \begin_layout Plain Layout
12709 ] The string used for the label.
12711 \begin_inset Flex Code
12714 \begin_layout Plain Layout
12720 is set, this string can be contain the special formatting commands described
12722 \begin_inset CommandInset ref
12724 reference "subsec:Counters"
12731 \begin_layout Description
12732 \begin_inset Flex Code
12735 \begin_layout Plain Layout
12736 LabelStringAppendix
12742 \begin_inset Flex Code
12745 \begin_layout Plain Layout
12751 ] This is used inside the appendix instead of
12752 \begin_inset Newline newline
12756 \begin_inset Flex Code
12759 \begin_layout Plain Layout
12767 \begin_inset Flex Code
12770 \begin_layout Plain Layout
12777 \begin_inset Newline newline
12781 \begin_inset Flex Code
12784 \begin_layout Plain Layout
12785 LabelStringAppendix
12793 \begin_layout Description
12794 \begin_inset Flex Code
12797 \begin_layout Plain Layout
12803 [FIXME] (Used only with XML-type formats.)
12806 \begin_layout Description
12807 \begin_inset Flex Code
12810 \begin_layout Plain Layout
12817 \begin_inset Flex Code
12820 \begin_layout Plain Layout
12825 , Manual, Static, Above,
12826 \begin_inset Newline newline
12829 Centered, Sensitive, Enumerate,
12830 \begin_inset Newline newline
12833 Itemize, Bibliography
12839 \begin_inset Separator parbreak
12846 \begin_layout Description
12847 \begin_inset Flex Code
12850 \begin_layout Plain Layout
12856 means the label is the very first word (up to the first real blank).
12857 Use protected spaces if you want more than one word as the label.
12861 \begin_layout Description
12862 \begin_inset Flex Code
12865 \begin_layout Plain Layout
12871 means the label is simply what is declared as
12872 \begin_inset Flex Code
12875 \begin_layout Plain Layout
12882 This will be displayed
12883 \begin_inset Quotes eld
12887 \begin_inset Quotes erd
12890 , at the beginning of the paragraph.
12892 \begin_inset Flex Code
12895 \begin_layout Plain Layout
12902 \begin_inset Flex Code
12905 \begin_layout Plain Layout
12911 , then it will be displayed only in the first paragraph of any sequence
12912 of paragraphs with the same
12913 \begin_inset Flex Code
12916 \begin_layout Plain Layout
12925 \begin_layout Description
12926 \begin_inset Flex Code
12929 \begin_layout Plain Layout
12936 \begin_inset space ~
12940 \begin_inset space ~
12944 \begin_inset Flex Code
12947 \begin_layout Plain Layout
12953 are special cases of
12954 \begin_inset Flex Code
12957 \begin_layout Plain Layout
12964 The label will be printed above the paragraph either at the beginning of
12965 the line or centered.
12968 \begin_layout Description
12969 \begin_inset Flex Code
12972 \begin_layout Plain Layout
12978 is a special case for the caption-labels
12979 \begin_inset Quotes eld
12983 \begin_inset Quotes erd
12987 \begin_inset Quotes eld
12991 \begin_inset Quotes erd
12995 \begin_inset Newline newline
12999 \begin_inset Flex Code
13002 \begin_layout Plain Layout
13008 means the (hardcoded) label string depends on the kind of float: It is
13009 hardcoded to be `FloatType N', where N is the value of the counter associated
13011 For the case that a caption is inserted outside of a float the
13012 \begin_inset Flex Code
13015 \begin_layout Plain Layout
13022 \begin_inset Quotes eld
13026 \begin_inset Quotes erd
13032 \begin_layout Description
13033 \begin_inset Flex Code
13036 \begin_layout Plain Layout
13042 produces the usual sort of enumeration labels.
13043 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13044 small Roman numerals, and uppercase letters for the four possible depths.
13047 \begin_layout Description
13048 \begin_inset Flex Code
13051 \begin_layout Plain Layout
13057 produces various bullets at the different levels.
13058 It is also hardcoded.
13061 \begin_layout Description
13062 \begin_inset Flex Code
13065 \begin_layout Plain Layout
13071 should be used only with
13072 \begin_inset Flex Code
13075 \begin_layout Plain Layout
13076 LatexType BibEnvironment
13085 \begin_layout Description
13086 \begin_inset Flex Code
13089 \begin_layout Plain Layout
13095 Note that this will completely override any prior
13096 \begin_inset Flex Code
13099 \begin_layout Plain Layout
13105 declaration for this style.
13107 \begin_inset Quotes eld
13111 \begin_inset Flex Code
13114 \begin_layout Plain Layout
13121 \begin_inset Quotes erd
13126 \begin_inset CommandInset ref
13128 reference "subsec:I18n"
13132 for details on its use.
13135 \begin_layout Description
13136 \begin_inset Flex Code
13139 \begin_layout Plain Layout
13146 \begin_inset Flex Code
13149 \begin_layout Plain Layout
13155 ] The name of the corresponding \SpecialChar LaTeX
13157 Either the environment or command name.
13160 \begin_layout Description
13161 \begin_inset Flex Code
13164 \begin_layout Plain Layout
13171 \begin_inset Flex Code
13174 \begin_layout Plain Layout
13180 ] An optional parameter for the corresponding
13181 \begin_inset Flex Code
13184 \begin_layout Plain Layout
13191 This parameter cannot be changed from within \SpecialChar LyX
13193 \begin_inset Flex Code
13196 \begin_layout Plain Layout
13202 for customizable parameters).
13203 This will be output as is after all \SpecialChar LaTeX
13205 \begin_inset Flex Code
13208 \begin_layout Plain Layout
13217 \begin_layout Description
13218 \begin_inset Flex Code
13221 \begin_layout Plain Layout
13228 \begin_inset Flex Code
13231 \begin_layout Plain Layout
13236 , Command, Environment, Item_Environment,
13237 \begin_inset Newline newline
13240 List_Environment, Bib_Environment
13245 ] How the style should be translated into \SpecialChar LaTeX
13250 \begin_layout Plain Layout
13251 \begin_inset Flex Code
13254 \begin_layout Plain Layout
13260 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13261 Visit the SGML class files for specific examples.
13267 \begin_inset Separator parbreak
13274 \begin_layout Description
13275 \begin_inset Flex Code
13278 \begin_layout Plain Layout
13284 means nothing special.
13287 \begin_layout Description
13288 \begin_inset Flex Code
13291 \begin_layout Plain Layout
13298 \begin_inset Flex Code
13301 \begin_layout Plain Layout
13308 {\SpecialChar ldots
13317 \begin_layout Description
13318 \begin_inset Flex Code
13321 \begin_layout Plain Layout
13328 \begin_inset Flex Code
13331 \begin_layout Plain Layout
13338 }\SpecialChar ldots
13354 \begin_layout Description
13355 \begin_inset Flex Code
13358 \begin_layout Plain Layout
13365 \begin_inset Flex Code
13368 \begin_layout Plain Layout
13375 \begin_inset Flex Code
13378 \begin_layout Plain Layout
13386 is generated for each paragraph of this environment.
13390 \begin_layout Description
13391 \begin_inset Flex Code
13394 \begin_layout Plain Layout
13401 \begin_inset Flex Code
13404 \begin_layout Plain Layout
13411 \begin_inset Newline newline
13415 \begin_inset Flex Code
13418 \begin_layout Plain Layout
13424 is passed as an argument to the environment.
13425 \begin_inset Newline newline
13429 \begin_inset Flex Code
13432 \begin_layout Plain Layout
13438 can be defined in the
13439 \begin_inset Flex Noun
13442 \begin_layout Plain Layout
13443 Edit\SpecialChar menuseparator
13445 \begin_inset space ~
13456 \begin_layout Description
13457 \begin_inset Flex Code
13460 \begin_layout Plain Layout
13467 \begin_inset Flex Code
13470 \begin_layout Plain Layout
13476 but adds additionally the necessary mandatory argument (the longest label)
13477 to the begin statement of the bibliography environment:
13478 \begin_inset Newline newline
13482 \begin_inset Flex Code
13485 \begin_layout Plain Layout
13488 begin{thebibliography}{99}
13493 It is therefore only useful for bibliography environments.
13494 The default longest label
13495 \begin_inset Quotes eld
13499 \begin_inset Quotes erd
13502 can be changed by the user in the paragraph settings of a bibliography
13506 \begin_layout Standard
13507 Putting the last few things together, the \SpecialChar LaTeX
13508 output will be either:
13511 \begin_layout LyX-Code
13514 LatexName[LatexParam]{\SpecialChar ldots
13518 \begin_layout Standard
13522 \begin_layout LyX-Code
13525 begin{LatexName}[LatexParam] \SpecialChar ldots
13531 \begin_layout Standard
13532 depending upon the \SpecialChar LaTeX
13537 \begin_layout Description
13538 \begin_inset Flex Code
13541 \begin_layout Plain Layout
13548 \begin_inset Flex Code
13551 \begin_layout Plain Layout
13557 ] A string that is put at the beginning of the style content.
13558 A line break in the output can be indicated by
13559 \begin_inset Flex Code
13562 \begin_layout Plain Layout
13571 \begin_layout Description
13572 \begin_inset Flex Code
13575 \begin_layout Plain Layout
13582 \begin_inset Flex Code
13585 \begin_layout Plain Layout
13591 ] If you put styles into environments, the different
13592 \begin_inset Flex Code
13595 \begin_layout Plain Layout
13601 are not simply added, but added with a factor
13602 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13606 Note that this parameter is also used when
13607 \begin_inset Flex Code
13610 \begin_layout Plain Layout
13617 \begin_inset Flex Code
13620 \begin_layout Plain Layout
13627 \begin_inset Flex Code
13630 \begin_layout Plain Layout
13637 Then it is added to the manual or dynamic margin.
13638 \begin_inset Newline newline
13642 \begin_inset Quotes eld
13646 \begin_inset Flex Code
13649 \begin_layout Plain Layout
13656 \begin_inset Quotes erd
13659 means that the paragraph is indented with the width of
13660 \begin_inset Quotes eld
13664 \begin_inset Flex Code
13667 \begin_layout Plain Layout
13674 \begin_inset Quotes erd
13677 in the normal font.
13678 You can get a negative width by prefixing the string with
13679 \begin_inset Quotes eld
13683 \begin_inset Flex Code
13686 \begin_layout Plain Layout
13693 \begin_inset Quotes erd
13697 This way was chosen so that the look is the same with each used screen
13701 \begin_layout Description
13702 \begin_inset Flex Code
13705 \begin_layout Plain Layout
13712 \begin_inset Flex Code
13715 \begin_layout Plain Layout
13720 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13726 \begin_inset Newline newline
13729 The kind of margin that the style has on the left side.
13730 \begin_inset Separator parbreak
13737 \begin_layout Description
13738 \begin_inset Flex Code
13741 \begin_layout Plain Layout
13747 just means a fixed margin.
13750 \begin_layout Description
13751 \begin_inset Flex Code
13754 \begin_layout Plain Layout
13760 means that the left margin depends on the string entered in the
13761 \begin_inset Flex Noun
13764 \begin_layout Plain Layout
13765 Edit\SpecialChar menuseparator
13767 \begin_inset space ~
13776 This is used to typeset nice lists without tabulators.
13779 \begin_layout Description
13780 \begin_inset Flex Code
13783 \begin_layout Plain Layout
13789 means that the margin depends on the size of the label.
13790 This is used for automatic enumerated headlines.
13791 It is obvious that the headline
13792 \begin_inset Quotes eld
13795 5.4.3.2.1 Very long headline
13796 \begin_inset Quotes erd
13799 must have a wider left margin (as wide as
13800 \begin_inset Quotes eld
13804 \begin_inset Quotes erd
13807 plus the space) than
13808 \begin_inset Quotes eld
13811 3.2 Very long headline
13812 \begin_inset Quotes erd
13816 \begin_inset Quotes eld
13820 \begin_inset Quotes erd
13823 are not able to do this.
13826 \begin_layout Description
13827 \begin_inset Flex Code
13830 \begin_layout Plain Layout
13836 is similar, but only the very first row of the paragraph is dynamic, while
13837 the others are static; this is used, for example, for descriptions.
13840 \begin_layout Description
13841 \begin_inset Flex Code
13844 \begin_layout Plain Layout
13850 means the margin is chosen in a way that the longest row of this paragraph
13851 fits to the right margin.
13852 This is used to typeset an address on the right edge of the page.
13856 \begin_layout Description
13857 \begin_inset Flex Code
13860 \begin_layout Plain Layout
13867 \begin_inset Flex Code
13870 \begin_layout Plain Layout
13879 \begin_inset space \thinspace{}
13883 \begin_inset Flex Code
13886 \begin_layout Plain Layout
13892 ] Whether fragile commands in this style should be
13893 \begin_inset Flex Code
13896 \begin_layout Plain Layout
13909 whether this command should itself be protected.)
13912 \begin_layout Description
13913 \begin_inset Flex Code
13916 \begin_layout Plain Layout
13923 \begin_inset Flex Code
13926 \begin_layout Plain Layout
13933 \begin_inset space \thinspace{}
13937 \begin_inset Flex Code
13940 \begin_layout Plain Layout
13948 ] Whether newlines are translated into \SpecialChar LaTeX
13950 \begin_inset Flex Code
13953 \begin_layout Plain Layout
13964 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
13966 inside \SpecialChar LyX
13970 \begin_layout Description
13971 \begin_inset Flex Code
13974 \begin_layout Plain Layout
13981 \begin_inset Flex Code
13984 \begin_layout Plain Layout
13993 \begin_inset space \thinspace{}
13997 \begin_inset Flex Code
14000 \begin_layout Plain Layout
14006 ] If set to true, and if
14007 \begin_inset Flex Code
14010 \begin_layout Plain Layout
14017 \begin_inset Flex Code
14020 \begin_layout Plain Layout
14026 ) paragraphs are being indented, then the indentation of such a paragraph
14027 following one of this type will be suppressed.
14028 (So this will not affect the display of non-default paragraphs.)
14031 \begin_layout Description
14032 \begin_inset Flex Code
14035 \begin_layout Plain Layout
14042 \begin_inset Flex Code
14045 \begin_layout Plain Layout
14051 ] Name of a style that has replaced this style.
14052 This is used to rename a style, while keeping backward compatibility.
14055 \begin_layout Description
14056 \begin_inset Flex Code
14059 \begin_layout Plain Layout
14066 \begin_inset Flex Code
14069 \begin_layout Plain Layout
14076 \begin_inset space \thinspace{}
14080 \begin_inset Flex Code
14083 \begin_layout Plain Layout
14089 ] Determines whether consecutive pragraphs of the same type are treated
14090 as belonging together.
14091 This has the effect that the
14092 \begin_inset Flex Code
14095 \begin_layout Plain Layout
14101 is only printed once before such a group.
14102 By default, this is true for
14103 \begin_inset Flex Code
14106 \begin_layout Plain Layout
14113 \begin_inset Flex Code
14116 \begin_layout Plain Layout
14123 \begin_inset Flex Code
14126 \begin_layout Plain Layout
14132 and false for all other types.
14135 \begin_layout Description
14136 \begin_inset Flex Code
14139 \begin_layout Plain Layout
14146 \begin_inset Flex Code
14149 \begin_layout Plain Layout
14158 \begin_inset space \thinspace{}
14162 \begin_inset Flex Code
14165 \begin_layout Plain Layout
14171 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14173 but only by a line break; together with
14174 \begin_inset Flex Code
14177 \begin_layout Plain Layout
14183 , this allows to emulate a plain text editor (like the ERT inset).
14186 \begin_layout Description
14187 \begin_inset Flex Code
14190 \begin_layout Plain Layout
14197 \begin_inset Flex Code
14200 \begin_layout Plain Layout
14206 ] The indent of the very first line of a paragraph.
14208 \begin_inset Newline newline
14212 \begin_inset Flex Code
14215 \begin_layout Plain Layout
14221 will be fixed for a certain style.
14222 The exception is the default style, since the indentation for these paragraphs
14223 can be prohibited with
14224 \begin_inset Flex Code
14227 \begin_layout Plain Layout
14235 \begin_inset Flex Code
14238 \begin_layout Plain Layout
14244 style paragraphs inside environments use the
14245 \begin_inset Flex Code
14248 \begin_layout Plain Layout
14254 of the environment, not their native one.
14256 \begin_inset Flex Code
14259 \begin_layout Plain Layout
14265 paragraphs inside an enumeration are not indented.
14268 \begin_layout Description
14269 \begin_inset Flex Code
14272 \begin_layout Plain Layout
14279 \begin_inset Flex Code
14282 \begin_layout Plain Layout
14288 ] The vertical space between two paragraphs of this style.
14291 \begin_layout Description
14292 \begin_inset Flex Code
14295 \begin_layout Plain Layout
14302 \begin_inset Flex Code
14305 \begin_layout Plain Layout
14312 allows the user to choose either
14313 \begin_inset Quotes eld
14317 \begin_inset Quotes erd
14321 \begin_inset Quotes eld
14325 \begin_inset Quotes erd
14328 to separate paragraphs.
14330 \begin_inset Quotes eld
14334 \begin_inset Quotes erd
14338 \begin_inset Flex Code
14341 \begin_layout Plain Layout
14349 \begin_inset Quotes eld
14353 \begin_inset Quotes erd
14357 \begin_inset Flex Code
14360 \begin_layout Plain Layout
14366 is ignored and all paragraphs are separated by the
14367 \begin_inset Flex Code
14370 \begin_layout Plain Layout
14377 The vertical space is calculated with
14378 \begin_inset Flex Code
14381 \begin_layout Plain Layout
14383 \begin_inset space ~
14392 \begin_inset Flex Code
14395 \begin_layout Plain Layout
14401 is the height of a row with the normal font.
14402 This way, the look stays the same with different screen fonts.
14405 \begin_layout Description
14406 \begin_inset Flex Code
14409 \begin_layout Plain Layout
14416 \begin_inset Flex Code
14419 \begin_layout Plain Layout
14428 \begin_inset space \thinspace{}
14432 \begin_inset Flex Code
14435 \begin_layout Plain Layout
14441 ] Whether the contents of this paragraph should be output in raw form, meaning
14442 without special translations that \SpecialChar LaTeX
14446 \begin_layout Description
14447 \begin_inset Flex Code
14450 \begin_layout Plain Layout
14457 \begin_inset Flex Code
14460 \begin_layout Plain Layout
14470 Defines individual characters that should be output in raw form, meaning
14471 without special translations that \SpecialChar LaTeX
14475 \begin_layout Description
14476 \begin_inset Flex Code
14479 \begin_layout Plain Layout
14485 Information to be included in the \SpecialChar LaTeX
14486 preamble when this style is used.
14487 Used to define macros, load packages, etc., required by this particular
14490 \begin_inset Quotes eld
14494 \begin_inset Flex Code
14497 \begin_layout Plain Layout
14504 \begin_inset Quotes erd
14510 \begin_layout Description
14511 \begin_inset Flex Code
14514 \begin_layout Plain Layout
14521 \begin_inset Flex Code
14524 \begin_layout Plain Layout
14530 ] The prefix to use when creating labels referring to paragraphs of this
14532 This allows the use of formatted references.
14535 \begin_layout Description
14536 \begin_inset Flex Code
14539 \begin_layout Plain Layout
14546 \begin_inset Flex Code
14549 \begin_layout Plain Layout
14555 ] Whether the style requires the feature
14556 \begin_inset Flex Code
14559 \begin_layout Plain Layout
14566 \begin_inset CommandInset ref
14568 reference "chap:List-of-functions"
14572 for the list of features).
14573 If you require a package with specific options, you can additionally use
14575 \begin_inset Flex Code
14578 \begin_layout Plain Layout
14584 as a general text class parameter (see
14585 \begin_inset CommandInset ref
14587 reference "subsec:General-text-class"
14594 \begin_layout Description
14595 \begin_inset Flex Code
14598 \begin_layout Plain Layout
14605 \begin_inset Flex Code
14608 \begin_layout Plain Layout
14617 \begin_inset Flex Code
14620 \begin_layout Plain Layout
14626 ] Resets the \SpecialChar LaTeX
14627 arguments of this style (as defined via the
14628 \begin_inset Flex Code
14631 \begin_layout Plain Layout
14638 This is useful if you have copied a style via
14639 \begin_inset Flex Code
14642 \begin_layout Plain Layout
14648 , but you do not want to inherit its (required and optional) arguments.
14651 \begin_layout Description
14652 \begin_inset Flex Code
14655 \begin_layout Plain Layout
14662 \begin_inset Flex Code
14665 \begin_layout Plain Layout
14671 ] A string that is put at the end of the layout content.
14672 A line break in the output can be indicated by
14673 \begin_inset Flex Code
14676 \begin_layout Plain Layout
14685 \begin_layout Description
14686 \begin_inset Flex Code
14689 \begin_layout Plain Layout
14696 \begin_inset Flex Code
14699 \begin_layout Plain Layout
14706 \begin_inset Flex Code
14709 \begin_layout Plain Layout
14718 \begin_layout Description
14719 \begin_inset Flex Code
14722 \begin_layout Plain Layout
14729 \begin_inset Flex Code
14732 \begin_layout Plain Layout
14741 \begin_inset Flex Code
14744 \begin_layout Plain Layout
14751 \begin_inset Flex Code
14754 \begin_layout Plain Layout
14761 \begin_inset Flex Code
14764 \begin_layout Plain Layout
14766 \begin_inset space ~
14774 ] This defines what the default spacing should be in the style.
14776 \begin_inset Flex Code
14779 \begin_layout Plain Layout
14786 \begin_inset Flex Code
14789 \begin_layout Plain Layout
14796 \begin_inset Flex Code
14799 \begin_layout Plain Layout
14805 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14806 If you specify the argument
14807 \begin_inset Flex Code
14810 \begin_layout Plain Layout
14816 , then you must also provide a value argument which will be the actual multiplie
14818 Note that, contrary to other parameters,
14819 \begin_inset Flex Code
14822 \begin_layout Plain Layout
14828 implies the generation of specific \SpecialChar LaTeX
14829 code, using the \SpecialChar LaTeX
14833 \begin_inset Flex Code
14836 \begin_layout Plain Layout
14845 \begin_layout Description
14846 \begin_inset Flex Code
14849 \begin_layout Plain Layout
14856 \begin_inset Flex Code
14859 \begin_layout Plain Layout
14866 \begin_inset space \thinspace{}
14870 \begin_inset Flex Code
14873 \begin_layout Plain Layout
14881 ] Allow spell-checking paragraphs of this style.
14885 \begin_layout Description
14886 \begin_inset Flex Code
14889 \begin_layout Plain Layout
14895 The font used for the text body .
14897 \begin_inset CommandInset ref
14899 reference "subsec:Font-description"
14906 \begin_layout Description
14907 \begin_inset Flex Code
14910 \begin_layout Plain Layout
14919 \begin_inset Flex Code
14922 \begin_layout Plain Layout
14932 The level of the style in the table of contents.
14933 This is used for automatic numbering of section headings.
14936 \begin_layout Description
14937 \begin_inset Flex Code
14940 \begin_layout Plain Layout
14949 \begin_inset Flex Code
14952 \begin_layout Plain Layout
14963 \begin_inset Flex Code
14966 \begin_layout Plain Layout
14973 \begin_inset Flex Code
14976 \begin_layout Plain Layout
14982 ] This tag determines whether the first line indentation of this paragraph
14983 can be toggled via the Paragraph settings dialog.
14987 \begin_inset Flex Code
14990 \begin_layout Plain Layout
15000 is set, indentation can be toggled if the document settings use
15001 \begin_inset Quotes eld
15005 \begin_inset Quotes erd
15008 paragraph style, with
15009 \begin_inset Flex Code
15012 \begin_layout Plain Layout
15018 , indentation can always be toggled, notwithstanding the document settings,
15020 \begin_inset Flex Code
15023 \begin_layout Plain Layout
15029 , indentation can never be toggled.
15032 \begin_layout Description
15033 \begin_inset Flex Code
15036 \begin_layout Plain Layout
15043 \begin_inset Flex Code
15046 \begin_layout Plain Layout
15052 ] The vertical space with which the very first of a chain of paragraphs
15053 with this style is separated from the previous paragraph.
15054 If the previous paragraph has another style, the separations are not simply
15055 added, but the maximum is taken.
15058 \begin_layout Subsection
15059 \begin_inset CommandInset label
15065 Internationalization of Paragraph Styles
15068 \begin_layout Standard
15070 has long supported internationalization of layout information, but, until
15071 version 2.0, this applied only to the user interface and not to, say, PDF
15073 Thus, French authors were forced to resort to ugly hacks if they wanted
15078 1' instead of `Theorem 1'.
15079 Thanks to Georg Baum, that is no longer the case.
15082 \begin_layout Standard
15084 \begin_inset Flex Code
15087 \begin_layout Plain Layout
15093 defines text that is to appear in the typeset document, it may use
15094 \begin_inset Flex Code
15097 \begin_layout Plain Layout
15104 \begin_inset Flex Code
15107 \begin_layout Plain Layout
15113 to support non-English and even multi-language documents correctly.
15114 The following excerpt (from the
15115 \begin_inset Flex Code
15118 \begin_layout Plain Layout
15124 file) shows how this works:
15127 \begin_layout LyX-Code
15129 \begin_inset Separator parbreak
15136 \begin_layout LyX-Code
15139 theoremstyle{remark}
15142 \begin_layout LyX-Code
15145 newtheorem{claim}[thm]{
15152 \begin_layout LyX-Code
15156 \begin_layout LyX-Code
15160 \begin_layout LyX-Code
15165 claimname}{_(Claim)}
15168 \begin_layout LyX-Code
15172 \begin_layout LyX-Code
15176 \begin_layout LyX-Code
15185 claimname}{_(Claim)}}
15188 \begin_layout LyX-Code
15193 \begin_layout Standard
15194 In principle, any legal \SpecialChar LaTeX
15196 \begin_inset Flex Code
15199 \begin_layout Plain Layout
15206 \begin_inset Flex Code
15209 \begin_layout Plain Layout
15215 tags, but in practice they will typically look as they do here.
15216 The key to correct translation of the typeset text is the definition of
15217 the \SpecialChar LaTeX
15219 \begin_inset Flex Code
15222 \begin_layout Plain Layout
15231 \begin_inset Flex Code
15234 \begin_layout Plain Layout
15246 \begin_layout Standard
15248 \begin_inset Flex Code
15251 \begin_layout Plain Layout
15257 tag provides for internationalization based upon the overall language of
15259 The contents of the tag will be included in the preamble, just as with
15261 \begin_inset Flex Code
15264 \begin_layout Plain Layout
15271 What makes it special is the use of the
15272 \begin_inset Quotes eld
15276 \begin_inset Quotes erd
15280 \begin_inset Flex Code
15283 \begin_layout Plain Layout
15289 , which will be replaced, when \SpecialChar LyX
15290 produces \SpecialChar LaTeX
15291 output, with the translation of
15292 its argument into the document language.
15295 \begin_layout Standard
15297 \begin_inset Flex Code
15300 \begin_layout Plain Layout
15306 tag is more complex, since it is meant to provide support for multi-language
15307 documents and so offers an interface to the
15308 \begin_inset Flex Code
15311 \begin_layout Plain Layout
15318 Its contents will be added to the preamble once for each language that
15319 appears in the document.
15320 In this case, the argument to
15321 \begin_inset Flex Code
15324 \begin_layout Plain Layout
15330 will be replaced with its translation into the language in question; the
15332 \begin_inset Flex Code
15335 \begin_layout Plain Layout
15341 is replaced by the language name (as used by the babel package).
15344 \begin_layout Standard
15345 A German document that also included a French section would thus have the
15346 following in the preamble:
15349 \begin_layout LyX-Code
15358 claimname}{Affirmation}}
15359 \begin_inset Newline newline
15370 claimname}{Behauptung}}
15371 \begin_inset Newline newline
15378 claimname}{Behauptung}
15381 \begin_layout Standard
15384 \begin_inset Flex Code
15387 \begin_layout Plain Layout
15393 will then conspire to produce the correct text in the output.
15396 \begin_layout Standard
15397 One important point to note here is that the translations are provided by
15399 itself, through the file
15400 \begin_inset Flex Code
15403 \begin_layout Plain Layout
15410 This means, in effect, that
15411 \begin_inset Flex Code
15414 \begin_layout Plain Layout
15421 \begin_inset Flex Code
15424 \begin_layout Plain Layout
15430 are really only of use in layout files that are provided with \SpecialChar LyX
15432 entered in user-created layout files will not be seen by \SpecialChar LyX
15433 's internationalizatio
15434 n routines unless the
15435 \begin_inset Flex Code
15438 \begin_layout Plain Layout
15444 file is modified accordingly.
15445 That said, however, any layout created with the intention that it will
15446 be included with \SpecialChar LyX
15447 should use these tags where appropriate.
15448 Please note that the paragraph style translations provided by \SpecialChar LyX
15450 change with a minor update (e.
15451 \begin_inset space \thinspace{}
15455 \begin_inset space \space{}
15458 from version 2.1.x to 2.1.y).
15459 It is however quite likely that a major update (e.
15460 \begin_inset space \thinspace{}
15464 \begin_inset space \space{}
15467 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15470 \begin_layout Subsection
15472 \begin_inset CommandInset label
15474 name "subsec:Floats"
15481 \begin_layout Standard
15482 It is necessary to define the floats (
15483 \begin_inset Flex Noun
15486 \begin_layout Plain Layout
15493 \begin_inset Flex Noun
15496 \begin_layout Plain Layout
15502 , \SpecialChar ldots
15503 ) in the text class itself.
15504 Standard floats are included in the file
15505 \begin_inset Flex Code
15508 \begin_layout Plain Layout
15514 , so you may have to do no more than add
15517 \begin_layout LyX-Code
15518 Input stdfloats.inc
15521 \begin_layout Standard
15522 to your layout file.
15523 If you want to implement a text class that proposes some other float types
15524 (like the AGU class bundled with \SpecialChar LyX
15525 ), the information below will hopefully
15529 \begin_layout Description
15530 \begin_inset Flex Code
15533 \begin_layout Plain Layout
15540 \begin_inset Flex Code
15543 \begin_layout Plain Layout
15549 =!htbpH] Allowed placement options for this float type.
15550 The value is a string of placement characters.
15551 Possible characters include:
15556 \begin_inset Quotes eld
15560 \begin_inset Quotes erd
15568 \begin_inset Quotes eld
15572 \begin_inset Quotes erd
15580 \begin_inset Quotes eld
15584 \begin_inset Quotes erd
15592 \begin_inset Quotes eld
15596 \begin_inset Quotes erd
15604 \begin_inset Quotes eld
15608 \begin_inset Quotes erd
15616 \begin_inset Quotes eld
15620 \begin_inset Quotes erd
15624 The order of the characters in the string does not matter.
15625 If no placement options are allowed, use the string
15632 \begin_layout Description
15633 \begin_inset Flex Code
15636 \begin_layout Plain Layout
15643 \begin_inset Flex Code
15646 \begin_layout Plain Layout
15655 \begin_inset space \thinspace{}
15661 \begin_inset Flex Code
15664 \begin_layout Plain Layout
15674 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15681 \begin_inset Flex Code
15684 \begin_layout Plain Layout
15690 if the float does not support this feature.
15693 \begin_layout Description
15694 \begin_inset Flex Code
15697 \begin_layout Plain Layout
15704 \begin_inset Flex Code
15707 \begin_layout Plain Layout
15716 \begin_inset space \thinspace{}
15722 \begin_inset Flex Code
15725 \begin_layout Plain Layout
15735 ] Defines whether the float has a starred variant that spans columns in
15736 a two column paragraph.
15738 \begin_inset Flex Code
15741 \begin_layout Plain Layout
15747 if the float does not support this feature.
15750 \begin_layout Description
15751 \begin_inset Flex Code
15754 \begin_layout Plain Layout
15761 \begin_inset Flex Code
15764 \begin_layout Plain Layout
15771 \begin_inset Quotes erd
15775 \begin_inset Quotes erd
15778 ] The file name extension of an auxiliary file for the list of figures (or
15781 writes the captions to this file.
15784 \begin_layout Description
15785 \begin_inset Flex Code
15788 \begin_layout Plain Layout
15795 \begin_inset Flex Code
15798 \begin_layout Plain Layout
15805 \begin_inset Quotes erd
15809 \begin_inset Quotes erd
15812 ] The string that will be used in the menus and also for the caption.
15813 This is translated to the current language if babel is used.
15816 \begin_layout Description
15817 \begin_inset Flex Code
15820 \begin_layout Plain Layout
15826 These tags control the XHTML output.
15828 \begin_inset CommandInset ref
15830 reference "sec:Tags-for-XHTML"
15837 \begin_layout Description
15838 \begin_inset Flex Code
15841 \begin_layout Plain Layout
15850 \begin_inset Flex Code
15853 \begin_layout Plain Layout
15862 \begin_inset space \thinspace{}
15866 \begin_inset Flex Code
15869 \begin_layout Plain Layout
15875 ] Indicates whether the float is already defined in the document class or
15876 if instead the \SpecialChar LaTeX
15878 \begin_inset Flex Code
15881 \begin_layout Plain Layout
15887 needs to be loaded to define it on-the-fly.
15889 \begin_inset Flex Code
15892 \begin_layout Plain Layout
15899 \begin_inset Flex Code
15902 \begin_layout Plain Layout
15909 It should be set to
15910 \begin_inset Flex Code
15913 \begin_layout Plain Layout
15919 if the float is already defined by the \SpecialChar LaTeX
15923 \begin_layout Description
15924 \begin_inset Flex Code
15927 \begin_layout Plain Layout
15934 \begin_inset Flex Code
15937 \begin_layout Plain Layout
15944 \begin_inset Quotes erd
15948 \begin_inset Quotes erd
15951 ] The command used to generate a list of floats of this type; the leading
15960 \begin_inset Flex Code
15963 \begin_layout Plain Layout
15969 is false, since there is no standard way to generate this command.
15971 \begin_inset Flex Code
15974 \begin_layout Plain Layout
15980 is true, since in that case there is a standard way to define the command.
15983 \begin_layout Description
15984 \begin_inset Flex Code
15987 \begin_layout Plain Layout
15994 \begin_inset Flex Code
15997 \begin_layout Plain Layout
16004 \begin_inset Quotes erd
16008 \begin_inset Quotes erd
16011 ] A title for a list of floats of this kind (list of figures, tables, or
16013 It is used for the screen label within \SpecialChar LyX
16014 , it is used by \SpecialChar LaTeX
16016 it is used as the title in the XHTML output.
16017 It will be translated to the document language.
16020 \begin_layout Description
16021 \begin_inset Flex Code
16024 \begin_layout Plain Layout
16031 \begin_inset Flex Code
16034 \begin_layout Plain Layout
16041 \begin_inset Quotes erd
16045 \begin_inset Quotes erd
16048 ] This (optional) argument determines whether floats of this class will
16049 be numbered within some sectional unit of the document.
16051 \begin_inset Flex Code
16054 \begin_layout Plain Layout
16061 \begin_inset Quotes eld
16065 \begin_inset Flex Code
16068 \begin_layout Plain Layout
16075 \begin_inset Quotes erd
16078 , the floats will be numbered within chapters.
16082 \begin_layout Description
16083 \begin_inset Flex Code
16086 \begin_layout Plain Layout
16093 \begin_inset Flex Code
16096 \begin_layout Plain Layout
16103 \begin_inset Quotes erd
16107 \begin_inset Quotes erd
16110 ] The default placement for the given class of floats.
16111 The string should be as in standard \SpecialChar 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
16164 On top of that there is a new type,
16165 \begin_inset Flex Code
16168 \begin_layout Plain Layout
16174 , which does not really correspond to a float, since it means: put it
16175 \begin_inset Quotes eld
16179 \begin_inset Quotes erd
16183 Note however that the
16184 \begin_inset Flex Code
16187 \begin_layout Plain Layout
16193 specifier is special and, because of implementation details, cannot be
16194 used in non-built in float types.
16195 If you do not understand what this means, just use
16196 \begin_inset Quotes eld
16200 \begin_inset Flex Code
16203 \begin_layout Plain Layout
16210 \begin_inset Quotes erd
16216 \begin_layout Description
16217 \begin_inset Flex Code
16220 \begin_layout Plain Layout
16227 \begin_inset Flex Code
16230 \begin_layout Plain Layout
16236 ] The prefix to use when creating labels referring to floats of this type.
16237 This allows the use of formatted references.
16238 Note that you can remove any
16239 \begin_inset Flex Code
16242 \begin_layout Plain Layout
16248 set by a copied style by using the special value
16249 \begin_inset Quotes eld
16253 \begin_inset Quotes erd
16256 , which must be all caps.
16259 \begin_layout Description
16260 \begin_inset Flex Code
16263 \begin_layout Plain Layout
16270 \begin_inset Flex Code
16273 \begin_layout Plain Layout
16280 \begin_inset Quotes erd
16284 \begin_inset Quotes erd
16287 ] The style used when defining the float using
16288 \begin_inset Flex Code
16291 \begin_layout Plain Layout
16302 \begin_layout Description
16303 \begin_inset Flex Code
16306 \begin_layout Plain Layout
16313 \begin_inset Flex Code
16316 \begin_layout Plain Layout
16323 \begin_inset Quotes erd
16327 \begin_inset Quotes erd
16331 \begin_inset Quotes eld
16335 \begin_inset Quotes erd
16338 of the new class of floats, like program or algorithm.
16339 After the appropriate
16340 \begin_inset Flex Code
16343 \begin_layout Plain Layout
16352 \begin_inset Flex Code
16355 \begin_layout Plain Layout
16364 \begin_inset Flex Code
16367 \begin_layout Plain Layout
16378 \begin_layout Description
16379 \begin_inset Flex Code
16382 \begin_layout Plain Layout
16389 \begin_inset Flex Code
16392 \begin_layout Plain Layout
16399 \begin_inset space \thinspace{}
16403 \begin_inset Flex Code
16406 \begin_layout Plain Layout
16414 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16416 \begin_inset Flex Code
16419 \begin_layout Plain Layout
16425 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16429 \begin_layout Standard
16430 Note that defining a float with type
16431 \begin_inset Flex Code
16434 \begin_layout Plain Layout
16442 automatically defines the corresponding counter with name
16443 \begin_inset Flex Code
16446 \begin_layout Plain Layout
16457 \begin_layout Subsection
16458 Flex insets and InsetLayout
16459 \begin_inset CommandInset label
16461 name "subsec:Flex-insets-and"
16468 \begin_layout Standard
16469 Flex insets come in three different kinds:
16472 \begin_layout Itemize
16474 \begin_inset Flex Code
16477 \begin_layout Plain Layout
16483 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16485 \begin_inset Flex Code
16488 \begin_layout Plain Layout
16497 \begin_inset Flex Code
16500 \begin_layout Plain Layout
16511 \begin_layout Itemize
16513 \begin_inset Flex Code
16516 \begin_layout Plain Layout
16522 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16524 footnote, and the like.
16525 An obvious example is an endnote inset, which is defined in the
16526 \begin_inset Flex Code
16529 \begin_layout Plain Layout
16538 \begin_layout Itemize
16540 \begin_inset Flex Code
16543 \begin_layout Plain Layout
16549 ): For use with DocBook classes.
16552 \begin_layout Standard
16553 Flex insets are defined using the
16554 \begin_inset Flex Code
16557 \begin_layout Plain Layout
16563 tag, which shall be explained in a moment.
16566 \begin_layout Standard
16568 \begin_inset Flex Code
16571 \begin_layout Plain Layout
16577 tag also serves another function: It can be used to customize the general
16578 layout of many different types of insets.
16580 \begin_inset Flex Code
16583 \begin_layout Plain Layout
16589 can be used to customize the layout parameters for footnotes, marginal
16590 notes, note insets, \SpecialChar TeX
16591 code (ERT) insets, branches, listings, indexes, boxes,
16592 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16595 \begin_layout Standard
16597 \begin_inset Flex Code
16600 \begin_layout Plain Layout
16606 definition must begin with a line of the form:
16609 \begin_layout LyX-Code
16613 \begin_layout Standard
16615 \begin_inset Flex Code
16618 \begin_layout Plain Layout
16624 indicates the inset whose layout is being defined, and here there are four
16628 \begin_layout Enumerate
16629 The layout for a pre-existing inset is being modified.
16630 In this case, can be
16631 \begin_inset Flex Code
16634 \begin_layout Plain Layout
16640 any one of the following:
16641 \begin_inset Flex Code
16644 \begin_layout Plain Layout
16651 \begin_inset Flex Code
16654 \begin_layout Plain Layout
16661 \begin_inset Flex Code
16664 \begin_layout Plain Layout
16671 \begin_inset Flex Code
16674 \begin_layout Plain Layout
16681 \begin_inset Flex Code
16684 \begin_layout Plain Layout
16691 \begin_inset Flex Code
16694 \begin_layout Plain Layout
16701 \begin_inset Flex Code
16704 \begin_layout Plain Layout
16711 \begin_inset Flex Code
16714 \begin_layout Plain Layout
16721 \begin_inset Flex Code
16724 \begin_layout Plain Layout
16731 \begin_inset Flex Code
16734 \begin_layout Plain Layout
16741 \begin_inset Flex Code
16744 \begin_layout Plain Layout
16751 \begin_inset Flex Code
16754 \begin_layout Plain Layout
16761 \begin_inset Flex Code
16764 \begin_layout Plain Layout
16771 \begin_inset Flex Code
16774 \begin_layout Plain Layout
16781 \begin_inset Flex Code
16784 \begin_layout Plain Layout
16791 \begin_inset Flex Code
16794 \begin_layout Plain Layout
16801 \begin_inset Flex Code
16804 \begin_layout Plain Layout
16811 \begin_inset Flex Code
16814 \begin_layout Plain Layout
16821 \begin_inset Flex Code
16824 \begin_layout Plain Layout
16831 \begin_inset Flex Code
16834 \begin_layout Plain Layout
16843 \begin_layout Enumerate
16844 The layout for a Flex inset is being defined.
16846 \begin_inset Flex Code
16849 \begin_layout Plain Layout
16855 must be of the form
16856 \begin_inset Quotes eld
16860 \begin_inset Flex Code
16863 \begin_layout Plain Layout
16870 \begin_inset Quotes erd
16874 \begin_inset Flex Code
16877 \begin_layout Plain Layout
16883 may be be any valid identifier not used by a pre-existing Flex inset.
16884 The identifier may include spaces, but in that case the whole thing must
16885 be wrapped in quotes.
16886 Note that the definition of a flex inset
16891 \begin_inset Flex Code
16894 \begin_layout Plain Layout
16900 entry, declaring which type of inset it defines.
16903 \begin_layout Enumerate
16904 The layout for user specific branch is being defined.
16906 \begin_inset Flex Code
16909 \begin_layout Plain Layout
16915 must be of the form
16916 \begin_inset Quotes eld
16920 \begin_inset Flex Code
16923 \begin_layout Plain Layout
16930 \begin_inset Quotes erd
16934 \begin_inset Flex Code
16937 \begin_layout Plain Layout
16943 may be be any valid identifier of branch defined in user's document.
16944 The identifier may include spaces, but in that case the whole thing must
16945 be wrapped in quotes.
16946 The main purpose of this feature is to allow \SpecialChar LaTeX
16947 wrapping around specific
16948 branches as user needs.
16951 \begin_layout Enumerate
16952 The layout of a user (or class) specific caption is being defined.
16954 \begin_inset Flex Code
16957 \begin_layout Plain Layout
16963 must be of the form
16964 \begin_inset Quotes eld
16968 \begin_inset Flex Code
16971 \begin_layout Plain Layout
16978 \begin_inset Quotes erd
16982 \begin_inset Flex Code
16985 \begin_layout Plain Layout
16991 specifies the name of the caption as it appears in the menu.
16992 Have a look at the standard caption (
16993 \begin_inset Flex Code
16996 \begin_layout Plain Layout
17002 ), the specific captions of the KOMA-Script classes (
17003 \begin_inset Flex Code
17006 \begin_layout Plain Layout
17013 \begin_inset Flex Code
17016 \begin_layout Plain Layout
17025 \begin_inset space ~
17031 \begin_inset Flex Code
17034 \begin_layout Plain Layout
17040 ) for applications.
17043 \begin_layout Standard
17045 \begin_inset Flex Code
17048 \begin_layout Plain Layout
17054 definition can contain the following entries:
17057 \begin_layout Description
17058 \begin_inset Flex Code
17061 \begin_layout Plain Layout
17068 \begin_inset Flex Code
17071 \begin_layout Plain Layout
17077 ] Defines argument number of a command\SpecialChar breakableslash
17078 environment associated with the current
17080 The definition must end with
17081 \begin_inset Flex Code
17084 \begin_layout Plain Layout
17092 \begin_inset CommandInset ref
17094 reference "subsec:Paragraph-Styles"
17101 \begin_layout Description
17102 \begin_inset Flex Code
17105 \begin_layout Plain Layout
17111 Preamble for changing language commands; see
17112 \begin_inset CommandInset ref
17114 reference "subsec:I18n"
17121 \begin_layout Description
17122 \begin_inset Flex Code
17125 \begin_layout Plain Layout
17132 \begin_inset Flex Code
17135 \begin_layout Plain Layout
17141 ] The color for the inset's background.
17143 \begin_inset CommandInset ref
17145 reference "chap:Names-of-colors"
17149 for a list of the available color names.
17152 \begin_layout Description
17153 \begin_inset Flex Code
17156 \begin_layout Plain Layout
17163 \begin_inset Flex Code
17166 \begin_layout Plain Layout
17175 \begin_inset space \thinspace{}
17179 \begin_inset Flex Code
17182 \begin_layout Plain Layout
17188 ] Whether to use the content of the inset as the label, when the inset is
17193 \begin_layout Description
17194 \begin_inset Flex Code
17197 \begin_layout Plain Layout
17204 \begin_inset Flex Code
17207 \begin_layout Plain Layout
17213 ] As with paragraph styles, see
17214 \begin_inset CommandInset ref
17216 reference "subsec:Paragraph-Styles"
17221 Note that you need to specify the complete type, e.
17222 \begin_inset space \thinspace{}
17226 \begin_inset space ~
17230 \begin_inset Flex Code
17233 \begin_layout Plain Layout
17234 CopyStyle Flex:<name>
17242 \begin_layout Description
17243 \begin_inset Flex Code
17246 \begin_layout Plain Layout
17253 \begin_inset Flex Code
17256 \begin_layout Plain Layout
17265 \begin_inset space \thinspace{}
17269 \begin_inset Flex Code
17272 \begin_layout Plain Layout
17278 ] Indicates whether the user may employ the Paragraph Settings dialog to
17279 customize the paragraph.
17282 \begin_layout Description
17283 \begin_inset Flex Code
17286 \begin_layout Plain Layout
17293 \begin_inset Flex Code
17296 \begin_layout Plain Layout
17303 \begin_inset Flex Code
17306 \begin_layout Plain Layout
17313 \begin_inset Flex Code
17316 \begin_layout Plain Layout
17322 , describing the rendering style used for the inset's frame and buttons.
17323 Footnotes generally use
17324 \begin_inset Flex Code
17327 \begin_layout Plain Layout
17333 , ERT insets generally
17334 \begin_inset Flex Code
17337 \begin_layout Plain Layout
17343 , and character styles
17344 \begin_inset Flex Code
17347 \begin_layout Plain Layout
17356 \begin_layout Description
17357 \begin_inset Flex Code
17360 \begin_layout Plain Layout
17367 \begin_inset Flex Code
17370 \begin_layout Plain Layout
17379 \begin_inset space \thinspace{}
17385 \begin_inset Flex Code
17388 \begin_layout Plain Layout
17397 \begin_inset Flex Code
17400 \begin_layout Plain Layout
17407 \begin_inset Flex Code
17410 \begin_layout Plain Layout
17417 Indicates whether the environment will stand on its own in the output or
17418 will appear inline with the surrounding text.
17419 If set to false, it is supposed that the \SpecialChar LaTeX
17420 environment ignores white space
17421 (including one newline character) after the
17422 \begin_inset Flex Code
17425 \begin_layout Plain Layout
17438 \begin_inset Flex Code
17441 \begin_layout Plain Layout
17457 \begin_layout Description
17458 \begin_inset Flex Code
17461 \begin_layout Plain Layout
17467 Required at the end of the
17468 \begin_inset Flex Code
17471 \begin_layout Plain Layout
17480 \begin_layout Description
17481 \begin_inset Flex Code
17484 \begin_layout Plain Layout
17490 The font used for both the text body
17496 \begin_inset CommandInset ref
17498 reference "subsec:Font-description"
17503 Note that defining this font automatically defines the
17504 \begin_inset Flex Code
17507 \begin_layout Plain Layout
17513 to the same value, so define this first and define
17514 \begin_inset Flex Code
17517 \begin_layout Plain Layout
17523 later if you want them to be different.
17526 \begin_layout Description
17527 \begin_inset Flex Code
17530 \begin_layout Plain Layout
17531 FixedWidthPreambleEncoding
17537 \begin_inset Flex Code
17540 \begin_layout Plain Layout
17549 \begin_inset space \thinspace{}
17553 \begin_inset Flex Code
17556 \begin_layout Plain Layout
17562 ] Force a fixed width encoding for the translated contents of
17563 \begin_inset Flex Code
17566 \begin_layout Plain Layout
17573 \begin_inset Flex Code
17576 \begin_layout Plain Layout
17582 code generated by this layout.
17583 This is needed for special \SpecialChar LaTeX
17588 that do not work with variable width encodings such as
17593 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17594 backends such as Xe\SpecialChar TeX
17596 Lua\SpecialChar TeX
17600 \begin_layout Description
17601 \begin_inset Flex Code
17604 \begin_layout Plain Layout
17605 ForceLocalFontSwitch
17611 \begin_inset Flex Code
17614 \begin_layout Plain Layout
17623 \begin_inset space \thinspace{}
17627 \begin_inset Flex Code
17630 \begin_layout Plain Layout
17636 ] When using babel, always use a local font switch (
17637 \begin_inset Flex Code
17640 \begin_layout Plain Layout
17648 ), never a global one (such as
17649 \begin_inset Flex Code
17652 \begin_layout Plain Layout
17663 \begin_layout Description
17664 \begin_inset Flex Code
17667 \begin_layout Plain Layout
17674 \begin_inset Flex Code
17677 \begin_layout Plain Layout
17686 \begin_inset space \thinspace{}
17690 \begin_inset Flex Code
17693 \begin_layout Plain Layout
17700 \begin_inset Quotes eld
17704 \begin_inset Quotes erd
17707 language, leading to Left-to-Right (Latin) output, e.
17708 \begin_inset space \thinspace{}
17712 \begin_inset space \space{}
17715 in \SpecialChar TeX
17720 \begin_layout Description
17721 \begin_inset Flex Code
17724 \begin_layout Plain Layout
17731 \begin_inset Flex Code
17734 \begin_layout Plain Layout
17743 \begin_inset space \thinspace{}
17747 \begin_inset Flex Code
17750 \begin_layout Plain Layout
17756 ] Force a a line break in the \SpecialChar LaTeX
17757 output before the inset starts and after
17759 This assures the inset itself is output on its own lines, for parsing purposes.
17762 \begin_layout Description
17763 \begin_inset Flex Code
17766 \begin_layout Plain Layout
17773 \begin_inset Flex Code
17776 \begin_layout Plain Layout
17785 \begin_inset space \thinspace{}
17789 \begin_inset Flex Code
17792 \begin_layout Plain Layout
17798 ] Indicates whether the
17799 \begin_inset Flex Code
17802 \begin_layout Plain Layout
17808 should be used or, instead, the user can change the paragraph style used
17813 \begin_layout Description
17814 \begin_inset Flex Code
17817 \begin_layout Plain Layout
17824 \begin_inset Flex Code
17827 \begin_layout Plain Layout
17836 \begin_inset space \thinspace{}
17840 \begin_inset Flex Code
17843 \begin_layout Plain Layout
17849 ] As with paragraph styles, see
17850 \begin_inset CommandInset ref
17852 reference "subsec:Paragraph-Styles"
17859 \begin_layout Description
17860 \begin_inset Flex Code
17863 \begin_layout Plain Layout
17869 These tags control the XHTML output.
17871 \begin_inset CommandInset ref
17873 reference "sec:Tags-for-XHTML"
17880 \begin_layout Description
17881 \begin_inset Flex Code
17884 \begin_layout Plain Layout
17891 \begin_inset Flex Code
17894 \begin_layout Plain Layout
17903 \begin_inset space \thinspace{}
17907 \begin_inset Flex Code
17910 \begin_layout Plain Layout
17916 ] Whether to include the contents of this inset in the strings generated
17917 for the `Outline' pane.
17918 One would not, for example, want the content of a footnote in a section
17919 header to be included in the TOC displayed in the outline, but one would
17920 normally want the content of a character style displayed.
17921 Default is false: not to include.
17924 \begin_layout Description
17925 \begin_inset Flex Code
17928 \begin_layout Plain Layout
17937 \begin_inset Flex Code
17940 \begin_layout Plain Layout
17949 \begin_inset space \thinspace{}
17953 \begin_inset Flex Code
17956 \begin_layout Plain Layout
17962 ] As with paragraph styles, see
17963 \begin_inset CommandInset ref
17965 reference "subsec: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 CommandInset ref
17986 reference "subsec:Font-description"
17991 Note that this definition can never appear before
17992 \begin_inset Flex Code
17995 \begin_layout Plain Layout
18001 , lest it be ineffective.
18004 \begin_layout Description
18005 \begin_inset Flex Code
18008 \begin_layout Plain Layout
18015 \begin_inset Flex Code
18018 \begin_layout Plain Layout
18025 \begin_inset Quotes erd
18029 \begin_inset Quotes erd
18032 ] What will be displayed on the button or elsewhere as the inset label.
18034 \begin_inset Flex Code
18037 \begin_layout Plain Layout
18045 \begin_inset Flex Code
18048 \begin_layout Plain Layout
18054 ) modify this label on the fly.
18057 \begin_layout Description
18058 \begin_inset Flex Code
18061 \begin_layout Plain Layout
18067 Language dependent preamble; see
18068 \begin_inset CommandInset ref
18070 reference "subsec:I18n"
18077 \begin_layout Description
18078 \begin_inset Flex Code
18081 \begin_layout Plain Layout
18088 \begin_inset Flex Code
18091 \begin_layout Plain Layout
18097 ] The name of the corresponding \SpecialChar LaTeX
18099 Either the environment or command name.
18102 \begin_layout Description
18103 \begin_inset Flex Code
18106 \begin_layout Plain Layout
18113 \begin_inset Flex Code
18116 \begin_layout Plain Layout
18122 ] The optional parameter for the corresponding
18123 \begin_inset Flex Code
18126 \begin_layout Plain Layout
18132 stuff, including possible bracket pairs like
18133 \begin_inset Flex Code
18136 \begin_layout Plain Layout
18143 This parameter cannot be changed from within \SpecialChar LyX
18145 \begin_inset Flex Code
18148 \begin_layout Plain Layout
18154 for customizable parameters).
18155 It will be output as is after all \SpecialChar LaTeX
18157 \begin_inset Flex Code
18160 \begin_layout Plain Layout
18169 \begin_layout Description
18170 \begin_inset Flex Code
18173 \begin_layout Plain Layout
18180 \begin_inset Flex Code
18183 \begin_layout Plain Layout
18184 Command, Environment, None
18189 ] How the style should be translated into \SpecialChar LaTeX
18194 \begin_layout Plain Layout
18195 \begin_inset Flex Code
18198 \begin_layout Plain Layout
18204 is perhaps a bit misleading, since these rules apply to SGML classes too.
18205 Visit the SGML class files for specific examples.
18211 \begin_inset Separator parbreak
18218 \begin_layout Description
18219 \begin_inset Flex Code
18222 \begin_layout Plain Layout
18228 means nothing special
18231 \begin_layout Description
18232 \begin_inset Flex Code
18235 \begin_layout Plain Layout
18242 \begin_inset Flex Code
18245 \begin_layout Plain Layout
18252 {\SpecialChar ldots
18261 \begin_layout Description
18262 \begin_inset Flex Code
18265 \begin_layout Plain Layout
18272 \begin_inset Flex Code
18275 \begin_layout Plain Layout
18282 }\SpecialChar ldots
18297 \begin_layout Standard
18298 Putting the last few things together, the \SpecialChar LaTeX
18299 output will be either:
18302 \begin_layout LyX-Code
18305 LatexName[LatexParam]{\SpecialChar ldots
18309 \begin_layout Standard
18313 \begin_layout LyX-Code
18316 begin{LatexName}[LatexParam] \SpecialChar ldots
18322 \begin_layout Standard
18323 depending upon the \SpecialChar LaTeX
18328 \begin_layout Description
18329 \begin_inset Flex Code
18332 \begin_layout Plain Layout
18339 \begin_inset Flex Code
18342 \begin_layout Plain Layout
18348 ] A string that is put at the beginning of the layout content.
18349 A line break in the output can be indicated by
18350 \begin_inset Flex Code
18353 \begin_layout Plain Layout
18362 \begin_layout Description
18363 \begin_inset Flex Code
18366 \begin_layout Plain Layout
18373 \begin_inset Flex Code
18376 \begin_layout Plain Layout
18383 \begin_inset Flex Code
18386 \begin_layout Plain Layout
18393 \begin_inset Flex Code
18396 \begin_layout Plain Layout
18403 \begin_inset Flex Code
18406 \begin_layout Plain Layout
18412 (indicating a dummy definition ending definitions of charstyles, etc).
18413 This entry is required in and is only meaningful for Flex insets.
18414 Among other things, it determines on which menu this inset will appear.
18416 \begin_inset Flex Code
18419 \begin_layout Plain Layout
18426 \begin_inset Flex Code
18429 \begin_layout Plain Layout
18435 will automatically set
18436 \begin_inset Flex Code
18439 \begin_layout Plain Layout
18447 \begin_inset Flex Code
18450 \begin_layout Plain Layout
18456 can be set to true for
18457 \begin_inset Flex Code
18460 \begin_layout Plain Layout
18466 insets by setting it
18471 \begin_inset Flex Code
18474 \begin_layout Plain Layout
18483 \begin_layout Description
18484 \begin_inset Flex Code
18487 \begin_layout Plain Layout
18494 \begin_inset Flex Code
18497 \begin_layout Plain Layout
18506 \begin_inset space \thinspace{}
18510 \begin_inset Flex Code
18513 \begin_layout Plain Layout
18519 ] Whether multiple paragraphs are permitted in this inset.
18521 \begin_inset Flex Code
18524 \begin_layout Plain Layout
18530 to the same value and
18531 \begin_inset Flex Code
18534 \begin_layout Plain Layout
18540 to the opposite value.
18541 These can be reset to other values, if they are used
18546 \begin_inset Flex Code
18549 \begin_layout Plain Layout
18559 \begin_layout Description
18560 \begin_inset Flex Code
18563 \begin_layout Plain Layout
18570 \begin_inset Flex Code
18573 \begin_layout Plain Layout
18582 \begin_inset space \thinspace{}
18586 \begin_inset Flex Code
18589 \begin_layout Plain Layout
18595 ] Whether fragile commands in this inset should be
18596 \begin_inset Flex Code
18599 \begin_layout Plain Layout
18612 whether the command should itself be protected.) Default is false.
18615 \begin_layout Description
18616 \begin_inset Flex Code
18619 \begin_layout Plain Layout
18626 \begin_inset Flex Code
18629 \begin_layout Plain Layout
18635 ] Deletes an existing
18636 \begin_inset Flex Code
18639 \begin_layout Plain Layout
18648 \begin_layout Description
18649 \begin_inset Flex Code
18652 \begin_layout Plain Layout
18659 \begin_inset Flex Code
18662 \begin_layout Plain Layout
18669 \begin_inset Flex Code
18672 \begin_layout Plain Layout
18678 that has replaced this
18679 \begin_inset Flex Code
18682 \begin_layout Plain Layout
18689 This is used to rename an
18690 \begin_inset Flex Code
18693 \begin_layout Plain Layout
18699 , while keeping backward compatibility.
18702 \begin_layout Description
18703 \begin_inset Flex Code
18706 \begin_layout Plain Layout
18713 \begin_inset Flex Code
18716 \begin_layout Plain Layout
18725 \begin_inset space \thinspace{}
18729 \begin_inset Flex Code
18732 \begin_layout Plain Layout
18738 ] As with paragraph styles, see
18739 \begin_inset CommandInset ref
18741 reference "subsec:Paragraph-Styles"
18749 \begin_layout Description
18750 \begin_inset Flex Code
18753 \begin_layout Plain Layout
18760 \begin_inset Flex Code
18763 \begin_layout Plain Layout
18772 \begin_inset space \thinspace{}
18776 \begin_inset Flex Code
18779 \begin_layout Plain Layout
18785 ] As with paragraph styles, see
18786 \begin_inset CommandInset ref
18788 reference "subsec:Paragraph-Styles"
18796 \begin_layout Description
18797 \begin_inset Flex Code
18800 \begin_layout Plain Layout
18806 As with paragraph styles, see
18807 \begin_inset CommandInset ref
18809 reference "subsec:Paragraph-Styles"
18816 \begin_layout Description
18817 \begin_inset Flex Code
18820 \begin_layout Plain Layout
18827 \begin_inset Flex Code
18830 \begin_layout Plain Layout
18836 ] The prefix to use when creating labels referring to insets of this type.
18837 This allows the use of formatted references.
18840 \begin_layout Description
18841 \begin_inset Flex Code
18844 \begin_layout Plain Layout
18851 \begin_inset Flex Code
18854 \begin_layout Plain Layout
18860 ] As with paragraph styles, see
18861 \begin_inset CommandInset ref
18863 reference "subsec:Paragraph-Styles"
18870 \begin_layout Description
18871 \begin_inset Flex Code
18874 \begin_layout Plain Layout
18881 \begin_inset Flex Code
18884 \begin_layout Plain Layout
18893 \begin_inset space \thinspace{}
18897 \begin_inset Flex Code
18900 \begin_layout Plain Layout
18906 ] Resets the \SpecialChar LaTeX
18907 arguments of this layout (as defined via the
18908 \begin_inset Flex Code
18911 \begin_layout Plain Layout
18918 This is useful if you have copied a style via
18919 \begin_inset Flex Code
18922 \begin_layout Plain Layout
18928 , but you do not want to inherit its (required and optional) arguments.
18931 \begin_layout Description
18932 \begin_inset Flex Code
18935 \begin_layout Plain Layout
18942 \begin_inset Flex Code
18945 \begin_layout Plain Layout
18952 \begin_inset space \thinspace{}
18956 \begin_inset Flex Code
18959 \begin_layout Plain Layout
18967 ] Whether this inset should use the font of its surrounding environment
18969 Default is false: use the font of the surrounding environment.
18972 \begin_layout Description
18973 \begin_inset Flex Code
18976 \begin_layout Plain Layout
18983 \begin_inset Flex Code
18986 \begin_layout Plain Layout
18992 ] A string that is put at the end of the layout content.
18993 A line break in the output can be indicated by
18994 \begin_inset Flex Code
18997 \begin_layout Plain Layout
19006 \begin_layout Description
19007 \begin_inset Flex Code
19010 \begin_layout Plain Layout
19017 \begin_inset Flex Code
19020 \begin_layout Plain Layout
19027 \begin_inset space \thinspace{}
19031 \begin_inset Flex Code
19034 \begin_layout Plain Layout
19042 ] Allow spell-checking the contents of this inset.
19046 \begin_layout Subsection
19048 \begin_inset CommandInset label
19050 name "subsec:Counters"
19057 \begin_layout Standard
19058 It is necessary to define the counters (
19059 \begin_inset Flex Noun
19062 \begin_layout Plain Layout
19069 \begin_inset Flex Noun
19072 \begin_layout Plain Layout
19078 , \SpecialChar ldots
19079 ) in the text class itself.
19080 The standard counters are defined in the file
19081 \begin_inset Flex Code
19084 \begin_layout Plain Layout
19090 , so you may have to do no more than add
19093 \begin_layout LyX-Code
19094 Input stdcounters.inc
19097 \begin_layout Standard
19098 to your layout file to get them to work.
19099 But if you want to define custom counters, then you can do so.
19100 The counter declaration must begin with:
19103 \begin_layout LyX-Code
19104 Counter CounterName
19107 \begin_layout Standard
19109 \begin_inset Flex Code
19112 \begin_layout Plain Layout
19118 ' is replaced by the name of the counter.
19119 And it must end with
19120 \begin_inset Quotes eld
19124 \begin_inset Flex Code
19127 \begin_layout Plain Layout
19134 \begin_inset Quotes erd
19138 The following parameters can also be used:
19141 \begin_layout Description
19142 \begin_inset Flex Code
19145 \begin_layout Plain Layout
19152 \begin_inset Flex Code
19155 \begin_layout Plain Layout
19161 ] Sets the initial value for the counter, to which it will be reset whenever
19163 Normally, one will want the default, 1.
19166 \begin_layout Description
19167 \begin_inset Flex Code
19170 \begin_layout Plain Layout
19177 \begin_inset Flex Code
19180 \begin_layout Plain Layout
19187 \begin_inset Quotes erd
19191 \begin_inset Quotes erd
19194 ] When defined, this string defines how the counter is displayed.
19195 Setting this value sets
19196 \begin_inset Flex Code
19199 \begin_layout Plain Layout
19200 LabelStringAppendix
19206 The following special constructs can be used in the string:
19207 \begin_inset Separator parbreak
19214 \begin_layout Itemize
19215 \begin_inset Flex Code
19218 \begin_layout Plain Layout
19226 will be replaced by the expansion of the
19227 \begin_inset Flex Code
19230 \begin_layout Plain Layout
19237 \begin_inset Flex Code
19240 \begin_layout Plain Layout
19241 LabelStringAppendix
19247 \begin_inset Flex Code
19250 \begin_layout Plain Layout
19260 \begin_layout Itemize
19261 counter values can be expressed using \SpecialChar LaTeX
19263 \begin_inset Newline newline
19267 \begin_inset Flex Code
19270 \begin_layout Plain Layout
19287 \begin_inset Flex Code
19290 \begin_layout Plain Layout
19302 \begin_layout Plain Layout
19312 Actually, the situation is a bit more complicated: any
19331 other than those described below will produce arabic numerals.
19332 It would not be surprising to see this change in the future.
19338 \begin_inset Flex Code
19341 \begin_layout Plain Layout
19347 : 1, 2, 3,\SpecialChar ldots
19349 \begin_inset Flex Code
19352 \begin_layout Plain Layout
19358 for lower-case letters: a, b, c, \SpecialChar ldots
19360 \begin_inset Flex Code
19363 \begin_layout Plain Layout
19369 for upper-case letters: A, B, C, \SpecialChar ldots
19371 \begin_inset Flex Code
19374 \begin_layout Plain Layout
19380 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19382 \begin_inset Flex Code
19385 \begin_layout Plain Layout
19391 for upper-case roman numerals: I, II, III\SpecialChar ldots
19393 \begin_inset Flex Code
19396 \begin_layout Plain Layout
19402 for hebrew numerals.
19406 \begin_layout Standard
19407 If LabelString is not defined, a default value is constructed as follows:
19408 if the counter has a master counter
19409 \begin_inset Flex Code
19412 \begin_layout Plain Layout
19419 \begin_inset Flex Code
19422 \begin_layout Plain Layout
19429 \begin_inset Newline newline
19433 \begin_inset Flex Code
19436 \begin_layout Plain Layout
19446 is used; otherwise the string
19447 \begin_inset Flex Code
19450 \begin_layout Plain Layout
19461 \begin_layout Description
19462 \begin_inset Flex Code
19465 \begin_layout Plain Layout
19466 LabelStringAppendix
19472 \begin_inset Flex Code
19475 \begin_layout Plain Layout
19482 \begin_inset Quotes erd
19486 \begin_inset Quotes erd
19490 \begin_inset Flex Code
19493 \begin_layout Plain Layout
19499 , but for use in the Appendix.
19502 \begin_layout Description
19503 \begin_inset Flex Code
19506 \begin_layout Plain Layout
19513 \begin_inset Flex Code
19516 \begin_layout Plain Layout
19523 \begin_inset Quotes erd
19527 \begin_inset Quotes erd
19530 ] A format for use with formatted references to this counter.
19531 For example, one might want to have references to section numbers appear
19533 \begin_inset Quotes eld
19537 \begin_inset Quotes erd
19541 The string should contain
19542 \begin_inset Quotes eld
19546 \begin_inset Quotes erd
19550 This will be replaced by the counter number itself.
19551 So, for sections, it would be: Section ##.
19554 \begin_layout Description
19555 \begin_inset Flex Code
19558 \begin_layout Plain Layout
19565 \begin_inset Flex Code
19568 \begin_layout Plain Layout
19575 \begin_inset Quotes erd
19579 \begin_inset Quotes erd
19582 ] If this is set to the name of another counter, the present counter will
19583 be reset every time the other one is increased.
19585 \begin_inset Flex Code
19588 \begin_layout Plain Layout
19595 \begin_inset Flex Code
19598 \begin_layout Plain Layout
19607 \begin_layout Subsection
19609 \begin_inset CommandInset label
19611 name "subsec:Font-description"
19618 \begin_layout Standard
19619 A font description looks like this:
19622 \begin_layout LyX-Code
19636 \begin_layout LyX-Code
19640 \begin_layout LyX-Code
19644 \begin_layout Standard
19645 The following commands are available:
19648 \begin_layout Description
19649 \begin_inset Flex Code
19652 \begin_layout Plain Layout
19659 \begin_inset Flex Code
19662 \begin_layout Plain Layout
19671 \begin_inset Flex Code
19674 \begin_layout Plain Layout
19681 \begin_inset Flex Code
19684 \begin_layout Plain Layout
19691 \begin_inset Flex Code
19694 \begin_layout Plain Layout
19701 \begin_inset Flex Code
19704 \begin_layout Plain Layout
19711 \begin_inset Flex Code
19714 \begin_layout Plain Layout
19721 \begin_inset Flex Code
19724 \begin_layout Plain Layout
19731 \begin_inset Flex Code
19734 \begin_layout Plain Layout
19741 \begin_inset Flex Code
19744 \begin_layout Plain Layout
19753 \begin_layout Description
19754 \begin_inset Flex Code
19757 \begin_layout Plain Layout
19764 \begin_inset Flex Code
19767 \begin_layout Plain Layout
19776 \begin_inset Flex Code
19779 \begin_layout Plain Layout
19786 \begin_inset Flex Code
19789 \begin_layout Plain Layout
19798 \begin_layout Description
19799 \begin_inset Flex Code
19802 \begin_layout Plain Layout
19809 \begin_inset Flex Code
19812 \begin_layout Plain Layout
19818 ] Valid arguments are:
19819 \begin_inset Flex Code
19822 \begin_layout Plain Layout
19829 \begin_inset Flex Code
19832 \begin_layout Plain Layout
19839 \begin_inset Flex Code
19842 \begin_layout Plain Layout
19849 \begin_inset Flex Code
19852 \begin_layout Plain Layout
19859 \begin_inset Flex Code
19862 \begin_layout Plain Layout
19869 \begin_inset Flex Code
19872 \begin_layout Plain Layout
19879 \begin_inset Flex Code
19882 \begin_layout Plain Layout
19889 \begin_inset Flex Code
19892 \begin_layout Plain Layout
19899 \begin_inset Flex Code
19902 \begin_layout Plain Layout
19909 \begin_inset Flex Code
19912 \begin_layout Plain Layout
19919 \begin_inset Flex Code
19922 \begin_layout Plain Layout
19929 \begin_inset Flex Code
19932 \begin_layout Plain Layout
19939 Each of these turns on or off the corresponding attribute.
19941 \begin_inset Flex Code
19944 \begin_layout Plain Layout
19950 turns on emphasis, and
19951 \begin_inset Flex Code
19954 \begin_layout Plain Layout
19962 \begin_inset Newline newline
19965 If the latter seems puzzling, remember that the font settings for the present
19966 context are generally inherited from the surrounding context.
19968 \begin_inset Flex Code
19971 \begin_layout Plain Layout
19977 would turn off the emphasis that was anyway in effect, say, in a theorem
19981 \begin_layout Description
19982 \begin_inset Flex Code
19985 \begin_layout Plain Layout
19992 \begin_inset Flex Code
19995 \begin_layout Plain Layout
20004 \begin_inset Flex Code
20007 \begin_layout Plain Layout
20016 \begin_layout Description
20017 \begin_inset Flex Code
20020 \begin_layout Plain Layout
20027 \begin_inset Flex Code
20030 \begin_layout Plain Layout
20039 \begin_inset Flex Code
20042 \begin_layout Plain Layout
20049 \begin_inset Flex Code
20052 \begin_layout Plain Layout
20059 \begin_inset Flex Code
20062 \begin_layout Plain Layout
20071 \begin_layout Description
20072 \begin_inset Flex Code
20075 \begin_layout Plain Layout
20082 \begin_inset Flex Code
20085 \begin_layout Plain Layout
20092 \begin_inset Flex Code
20095 \begin_layout Plain Layout
20102 \begin_inset Flex Code
20105 \begin_layout Plain Layout
20114 \begin_inset Flex Code
20117 \begin_layout Plain Layout
20124 \begin_inset Flex Code
20127 \begin_layout Plain Layout
20134 \begin_inset Flex Code
20137 \begin_layout Plain Layout
20144 \begin_inset Flex Code
20147 \begin_layout Plain Layout
20154 \begin_inset Flex Code
20157 \begin_layout Plain Layout
20166 \begin_layout Subsection
20167 \begin_inset CommandInset label
20169 name "subsec:Citation-format-description"
20173 Citation format description
20176 \begin_layout Standard
20178 \begin_inset Flex Code
20181 \begin_layout Plain Layout
20187 blocks are used to describe how bibliographic information should be displayed,
20188 both within \SpecialChar LyX
20189 itself (in the citation dialog and in tooltips, for example)
20190 and in XHTML output.
20191 Such a block might look like this:
20194 \begin_layout LyX-Code
20198 \begin_layout LyX-Code
20202 \begin_layout LyX-Code
20206 \begin_layout LyX-Code
20210 \begin_layout Standard
20211 The individual lines define how the bibliographic information associated
20212 with an article or book, respectively, is to be displayed, and such a definitio
20213 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20216 defines a default format in the source code that will be used if no specific
20217 definition has been given.
20219 predefines several formats in the file
20220 \begin_inset Flex Code
20223 \begin_layout Plain Layout
20229 , which is included in most of \SpecialChar LyX
20230 's document classes.
20233 \begin_layout Standard
20234 The definitions use a simple language that allows Bib\SpecialChar TeX
20235 keys to be replaced
20237 Keys should be enclosed in
20238 \begin_inset Flex Code
20241 \begin_layout Plain Layout
20248 \begin_inset Flex Code
20251 \begin_layout Plain Layout
20258 So a simple definition might look like this:
20261 \begin_layout LyX-Code
20263 \begin_inset Quotes eld
20267 \begin_inset Quotes erd
20273 \begin_layout Standard
20274 This would print the author, followed by a comma, followed by the title,
20275 in quotes, followed by a period.
20278 \begin_layout Standard
20279 Of course, sometimes you may want to print a key only if it exists.
20280 This can be done by using a conditional construction, such as:
20281 \begin_inset Flex Code
20284 \begin_layout Plain Layout
20286 \begin_inset space ~
20296 \begin_inset Flex Code
20299 \begin_layout Plain Layout
20305 key exists, then print
20306 \begin_inset Quotes eld
20310 \begin_inset space ~
20314 \begin_inset Quotes erd
20317 followed by the volume key.
20318 It is also possible to have an else clause in the conditional, such as:
20319 \begin_inset Newline newline
20323 \begin_inset Flex Code
20326 \begin_layout Plain Layout
20327 {%author%[[%author%]][[%editor%, ed.]]}
20333 \begin_inset Newline newline
20337 \begin_inset Flex Code
20340 \begin_layout Plain Layout
20346 key is printed if it exists; otherwise, the editor key is printed, followed
20348 \begin_inset Quotes eld
20352 \begin_inset space ~
20356 \begin_inset Quotes erd
20359 Note that the key is again enclosed in
20360 \begin_inset Flex Code
20363 \begin_layout Plain Layout
20369 signs; the entire conditional is enclosed in braces; and the if and else
20370 clauses are enclosed in double brackets,
20371 \begin_inset Quotes eld
20375 \begin_inset Flex Code
20378 \begin_layout Plain Layout
20385 \begin_inset Quotes eld
20389 \begin_inset Quotes eld
20393 \begin_inset Flex Code
20396 \begin_layout Plain Layout
20403 \begin_inset Quotes erd
20407 There must be no space between any of these.
20410 \begin_layout Standard
20411 There is one other piece of syntax available in definitions, which looks
20413 \begin_inset Flex Code
20416 \begin_layout Plain Layout
20423 This defines a piece of formatting information that is to be used when
20425 \begin_inset Quotes eld
20429 \begin_inset Quotes erd
20433 Obviously, we do not want to output HTML tags when writing plain text,
20434 so they should be wrapped in
20435 \begin_inset Quotes eld
20439 \begin_inset Quotes erd
20443 \begin_inset Quotes eld
20447 \begin_inset Quotes erd
20453 \begin_layout Standard
20454 Two special sorts of definitions are also possible in a
20455 \begin_inset Flex Code
20458 \begin_layout Plain Layout
20465 An example of the first would be:
20468 \begin_layout LyX-Code
20470 \begin_inset Quotes eld
20474 \begin_inset Quotes erd
20480 \begin_layout Standard
20481 This is an abbreviation, or macro, and it can be used by treating it as
20483 \begin_inset Flex Code
20486 \begin_layout Plain Layout
20495 \begin_inset Flex Code
20498 \begin_layout Plain Layout
20504 exactly as it would treat its definition.
20505 So, let us issue the obvious
20513 \begin_layout LyX-Code
20517 \begin_layout Standard
20518 or anything like it.
20520 shouldn't go into an infinite loop, but it may go into a long one before
20524 \begin_layout Standard
20525 The second sort of special definition might look like this:
20528 \begin_layout LyX-Code
20532 \begin_layout Standard
20533 This defines a translatable piece of text, which allows relevant parts of
20534 the bibliography to be translated.
20535 It can be included in a definition by treating it as a key:
20536 \begin_inset Flex Code
20539 \begin_layout Plain Layout
20546 Several of these are predefined in
20547 \begin_inset Flex Code
20550 \begin_layout Plain Layout
20557 Note that these are not macros, in the sense just defined.
20558 They will not be expanded.
20561 \begin_layout Standard
20562 So here then is an example that use all these features:
20563 \begin_inset VSpace defskip
20569 \begin_layout Standard
20573 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20576 \begin_layout Standard
20577 \begin_inset VSpace defskip
20580 This defines a macro that prints the author, followed by a comma, if the
20582 \begin_inset Flex Code
20585 \begin_layout Plain Layout
20591 key is defined, or else prints the name of the editor, followed by the
20593 \begin_inset Flex Code
20596 \begin_layout Plain Layout
20602 or its translation (it is by default
20603 \begin_inset Quotes eld
20607 \begin_inset Quotes erd
20611 \begin_inset Flex Code
20614 \begin_layout Plain Layout
20621 Note that this is in fact defined in
20622 \begin_inset Flex Code
20625 \begin_layout Plain Layout
20631 , so you can use it in your own definitions, or re-definitions, if you load
20635 \begin_layout Section
20636 \begin_inset CommandInset label
20638 name "sec:Tags-for-XHTML"
20642 Tags for XHTML output
20645 \begin_layout Standard
20646 As with \SpecialChar LaTeX
20647 or DocBook, the format of \SpecialChar LyX
20648 's XHTML output is also controlled by
20649 layout information.
20650 In general, \SpecialChar LyX
20651 provides sensible defaults and, as mentioned earlier, it will
20652 even construct default CSS style rules from the other layout tags.
20653 For example, \SpecialChar LyX
20654 will attempt to use the information provided in the
20655 \begin_inset Flex Code
20658 \begin_layout Plain Layout
20664 declaration for the Chapter style to write CSS that will appropriately
20665 format chapter headings.
20668 \begin_layout Standard
20669 In many cases, then, you may not have to do anything at all to get acceptable
20670 XHTML output for your own environments, custom insets, and so forth.
20671 But in some cases you will, and so \SpecialChar LyX
20672 provides a number of layout tags that
20673 can be used to customize the XHTML and CSS that are generated.
20676 \begin_layout Standard
20677 Note that there are two tags,
20678 \begin_inset Flex Code
20681 \begin_layout Plain Layout
20688 \begin_inset Flex Code
20691 \begin_layout Plain Layout
20697 that may appear outside style and inset declarations.
20699 \begin_inset CommandInset ref
20701 reference "subsec:General-text-class"
20705 for details on these.
20708 \begin_layout Subsection
20709 \begin_inset CommandInset label
20711 name "subsec:Paragraph-Style-XHTML"
20718 \begin_layout Standard
20719 The sort of XHTML \SpecialChar LyX
20720 outputs for a paragraph depends upon whether we are dealing
20721 with a normal paragraph, a command, or an environment, where this is itself
20722 determined by the contents of the corresponding
20723 \begin_inset Flex Code
20726 \begin_layout Plain Layout
20737 \begin_layout Standard
20738 For a command or normal paragraph, the output XHTML has the following form:
20741 \begin_layout LyX-Code
20743 \begin_inset Quotes erd
20747 \begin_inset Quotes erd
20753 \begin_layout LyX-Code
20755 \begin_inset Quotes erd
20759 \begin_inset Quotes erd
20765 \begin_layout LyX-Code
20766 Contents of the paragraph.
20769 \begin_layout LyX-Code
20773 \begin_layout Standard
20774 The label tags are of course omitted if the paragraph does not have a label.
20777 \begin_layout Standard
20778 For an environment that is not some sort of list, the XHTML takes this form:
20781 \begin_layout LyX-Code
20783 \begin_inset Quotes erd
20787 \begin_inset Quotes erd
20793 \begin_layout LyX-Code
20795 \begin_inset Quotes erd
20799 \begin_inset Quotes erd
20803 \begin_inset Quotes erd
20807 \begin_inset Quotes erd
20810 >Environment Label</labeltag>First paragraph.</itemtag>
20813 \begin_layout LyX-Code
20814 <itemtag>Second paragraph.</itemtag>
20817 \begin_layout LyX-Code
20821 \begin_layout Standard
20822 Note that the label is output only for the first paragraph, as it should
20823 be for a theorem, for example.
20827 \begin_layout Standard
20828 For a list, we have one of these forms:
20831 \begin_layout LyX-Code
20833 \begin_inset Quotes erd
20837 \begin_inset Quotes erd
20843 \begin_layout LyX-Code
20845 \begin_inset Quotes erd
20849 \begin_inset Quotes erd
20853 \begin_inset Quotes erd
20857 \begin_inset Quotes erd
20860 >List Label</labeltag>First item.</itemtag>
20863 \begin_layout LyX-Code
20865 \begin_inset Quotes erd
20869 \begin_inset Quotes erd
20873 \begin_inset Quotes erd
20877 \begin_inset Quotes erd
20880 >List Label</labeltag>Second item.</itemtag>
20883 \begin_layout LyX-Code
20887 \begin_layout LyX-Code
20891 \begin_layout LyX-Code
20893 \begin_inset Quotes erd
20897 \begin_inset Quotes erd
20903 \begin_layout LyX-Code
20905 \begin_inset Quotes erd
20909 \begin_inset Quotes erd
20912 >List Label</labeltag><itemtag attr=
20913 \begin_inset Quotes erd
20917 \begin_inset Quotes erd
20920 >First item.</itemtag>
20923 \begin_layout LyX-Code
20925 \begin_inset Quotes erd
20929 \begin_inset Quotes erd
20932 >List Label</labeltag><itemtag attr=
20933 \begin_inset Quotes erd
20937 \begin_inset Quotes erd
20940 >Second item.</itemtag>
20943 \begin_layout LyX-Code
20947 \begin_layout Standard
20948 Note the different orders of
20949 \begin_inset Flex Code
20952 \begin_layout Plain Layout
20959 \begin_inset Flex Code
20962 \begin_layout Plain Layout
20969 Which order we get depends upon the setting of
20970 \begin_inset Flex Code
20973 \begin_layout Plain Layout
20980 \begin_inset Flex Code
20983 \begin_layout Plain Layout
20989 is false (the default), you get the first of these, with the label within
20990 the item; if true, you get the second, with the label outside the item.
20993 \begin_layout Standard
20994 The specific tags and attributes output for each paragraph type can be controlle
20995 d by means of the layout tags we are about to describe.
20996 As mentioned earlier, however, \SpecialChar LyX
20997 uses sensible defaults for many of these,
20998 so you often may not need to do very much to get good XHTML output.
20999 Think of the available tags as there so you can tweak things to your liking.
21002 \begin_layout Description
21003 \begin_inset Flex Code
21006 \begin_layout Plain Layout
21013 \begin_inset Flex Code
21016 \begin_layout Plain Layout
21022 ] Specifies attribute information to be output with the main tag.
21024 \begin_inset Quotes eld
21028 \begin_inset Flex Code
21031 \begin_layout Plain Layout
21038 \begin_inset Quotes erd
21042 By default, \SpecialChar LyX
21044 \begin_inset Quotes eld
21048 \begin_inset Flex Code
21051 \begin_layout Plain Layout
21058 \begin_inset Quotes erd
21062 \begin_inset Flex Code
21065 \begin_layout Plain Layout
21071 is the \SpecialChar LyX
21072 name of the layout, made lowercase, for example: chapter.
21077 contain any style information.
21079 \begin_inset Flex Code
21082 \begin_layout Plain Layout
21091 \begin_layout Description
21092 \begin_inset Flex Code
21095 \begin_layout Plain Layout
21102 \begin_inset Flex Code
21105 \begin_layout Plain Layout
21115 ] Whether to output the default CSS information \SpecialChar LyX
21116 generates for this layout,
21117 even if additional information is explicitly provided via
21118 \begin_inset Flex Code
21121 \begin_layout Plain Layout
21129 \begin_inset Flex Code
21132 \begin_layout Plain Layout
21138 allows you to alter or augment the generated CSS, rather than to override
21141 \begin_inset Flex Code
21144 \begin_layout Plain Layout
21153 \begin_layout Description
21154 \begin_inset Flex Code
21157 \begin_layout Plain Layout
21164 \begin_inset Flex Code
21167 \begin_layout Plain Layout
21173 ] The tag to be used for individual paragraphs of environments, replacing
21175 \begin_inset Flex Code
21178 \begin_layout Plain Layout
21184 in the examples above.
21186 \begin_inset Flex Code
21189 \begin_layout Plain Layout
21198 \begin_layout Description
21199 \begin_inset Flex Code
21202 \begin_layout Plain Layout
21209 \begin_inset Flex Code
21212 \begin_layout Plain Layout
21218 ] Attributes for the item tag.
21220 \begin_inset Quotes eld
21224 \begin_inset Flex Code
21227 \begin_layout Plain Layout
21228 class=`layoutname_item'
21234 \begin_inset Quotes erd
21242 contain any style information.
21244 \begin_inset Flex Code
21247 \begin_layout Plain Layout
21256 \begin_layout Description
21257 \begin_inset Flex Code
21260 \begin_layout Plain Layout
21267 \begin_inset Flex Code
21270 \begin_layout Plain Layout
21276 ] The tag to be used for paragraph and item labels, replacing
21277 \begin_inset Flex Code
21280 \begin_layout Plain Layout
21286 in the examples above.
21288 \begin_inset Flex Code
21291 \begin_layout Plain Layout
21298 \begin_inset Flex Code
21301 \begin_layout Plain Layout
21308 \begin_inset Flex Code
21311 \begin_layout Plain Layout
21318 \begin_inset Flex Code
21321 \begin_layout Plain Layout
21322 Centered_Top_Environment
21327 , in which case it defaults to
21328 \begin_inset Flex Code
21331 \begin_layout Plain Layout
21340 \begin_layout Description
21341 \begin_inset Flex Code
21344 \begin_layout Plain Layout
21351 \begin_inset Flex Code
21354 \begin_layout Plain Layout
21360 ] Attributes for the label tag.
21362 \begin_inset Quotes eld
21366 \begin_inset Flex Code
21369 \begin_layout Plain Layout
21370 class=`layoutname_label'
21376 \begin_inset Quotes erd
21384 contain any style information.
21386 \begin_inset Flex Code
21389 \begin_layout Plain Layout
21398 \begin_layout Description
21399 \begin_inset Flex Code
21402 \begin_layout Plain Layout
21409 \begin_inset Flex Code
21412 \begin_layout Plain Layout
21422 ] Meaningful only for list-like environments, this tag controls whether
21423 the label tag is output before or inside the item tag.
21424 This is used, for example, in the description environment, where we want
21426 \begin_inset Flex Code
21429 \begin_layout Plain Layout
21430 <dt>\SpecialChar ldots
21431 </dt><dd>\SpecialChar ldots
21439 \begin_inset Flex Code
21442 \begin_layout Plain Layout
21448 : The label tag is output inside the item tag.
21451 \begin_layout Description
21452 \begin_inset Flex Code
21455 \begin_layout Plain Layout
21461 Information to be output in the
21462 \begin_inset Flex Code
21465 \begin_layout Plain Layout
21471 section when this style is used.
21472 This might, for example, be used to include a
21473 \begin_inset Flex Code
21476 \begin_layout Plain Layout
21483 \begin_inset Flex Code
21486 \begin_layout Plain Layout
21495 \begin_layout Description
21496 \begin_inset Flex Code
21499 \begin_layout Plain Layout
21505 CSS style information to be included when this style is used.
21506 Note that this will automatically be wrapped in a layout-generated
21507 \begin_inset Flex Code
21510 \begin_layout Plain Layout
21516 block, so only the CSS itself need be included.
21518 \begin_inset Flex Code
21521 \begin_layout Plain Layout
21530 \begin_layout Description
21531 \begin_inset Flex Code
21534 \begin_layout Plain Layout
21541 \begin_inset Flex Code
21544 \begin_layout Plain Layout
21550 ] The tag to be used for the main label, replacing
21551 \begin_inset Flex Code
21554 \begin_layout Plain Layout
21560 in the examples above.
21562 \begin_inset Flex Code
21565 \begin_layout Plain Layout
21574 \begin_layout Description
21575 \begin_inset Flex Code
21578 \begin_layout Plain Layout
21585 \begin_inset Flex Code
21588 \begin_layout Plain Layout
21598 ] Marks this style as the one to be used to generate the
21599 \begin_inset Flex Code
21602 \begin_layout Plain Layout
21608 tag for the XHTML file.
21609 By default, it is false.
21611 \begin_inset Flex Code
21614 \begin_layout Plain Layout
21620 file sets it to true for the
21621 \begin_inset Flex Code
21624 \begin_layout Plain Layout
21634 \begin_layout Subsection
21638 \begin_layout Standard
21639 The XHTML output of insets can also be controlled by information in layout
21644 \begin_layout Plain Layout
21645 At present, this is true only for
21646 \begin_inset Quotes eld
21650 \begin_inset Quotes erd
21653 insets (insets you can type into) and is not true for
21654 \begin_inset Quotes eld
21658 \begin_inset Quotes erd
21661 insets (insets that are associated with dialog boxes).
21666 Here, too, \SpecialChar LyX
21667 tries to provide sensible defaults, and it constructs default
21669 But everything can be customized.
21672 \begin_layout Standard
21673 The XHTML \SpecialChar LyX
21674 outputs for an inset has the following form:
21677 \begin_layout LyX-Code
21679 \begin_inset Quotes erd
21683 \begin_inset Quotes erd
21689 \begin_layout LyX-Code
21690 <labeltag>Label</labeltag>
21693 \begin_layout LyX-Code
21695 \begin_inset Quotes erd
21699 \begin_inset Quotes erd
21702 >Contents of the inset.</innertag>
21705 \begin_layout LyX-Code
21709 \begin_layout Standard
21710 If the inset permits multiple paragraphs—that is, if
21711 \begin_inset Flex Code
21714 \begin_layout Plain Layout
21720 is true—then the contents of the inset will itself be output as paragraphs
21721 formatted according to the styles used for those paragraphs (standard,
21722 quote, and the like).
21723 The label tag is of course omitted if the paragraph does not have a label
21724 and, at present, is always
21725 \begin_inset Flex Code
21728 \begin_layout Plain Layout
21735 The inner tag is optional and, by default, does not appear.
21738 \begin_layout Standard
21739 The specific tags and attributes output for each inset can be controlled
21740 by means of the following layout tags.
21743 \begin_layout Description
21744 \begin_inset Flex Code
21747 \begin_layout Plain Layout
21754 \begin_inset Flex Code
21757 \begin_layout Plain Layout
21763 ] Specifies attribute information to be output with the main tag.
21765 \begin_inset Quotes eld
21769 \begin_inset Flex Code
21772 \begin_layout Plain Layout
21773 class=`myinset' onclick=`\SpecialChar ldots
21780 \begin_inset Quotes erd
21784 By default, \SpecialChar LyX
21786 \begin_inset Quotes eld
21790 \begin_inset Flex Code
21793 \begin_layout Plain Layout
21800 \begin_inset Quotes erd
21804 \begin_inset Flex Code
21807 \begin_layout Plain Layout
21813 is the \SpecialChar LyX
21814 name of the inset, made lowercase and with non-alphanumeric characters
21815 converted to underscores, for example: footnote.
21818 \begin_layout Description
21819 \begin_inset Flex Code
21822 \begin_layout Plain Layout
21829 \begin_inset Flex Code
21832 \begin_layout Plain Layout
21842 ] Whether to output the default CSS information \SpecialChar LyX
21843 generates for this layout,
21844 even if additional information is explicitly provided via
21845 \begin_inset Flex Code
21848 \begin_layout Plain Layout
21856 \begin_inset Flex Code
21859 \begin_layout Plain Layout
21865 allows you to alter or augment the generated CSS, rather than to override
21870 \begin_layout Description
21871 \begin_inset Flex Code
21874 \begin_layout Plain Layout
21881 \begin_inset Flex Code
21884 \begin_layout Plain Layout
21890 ] Attributes for the inner tag.
21892 \begin_inset Quotes eld
21896 \begin_inset Flex Code
21899 \begin_layout Plain Layout
21900 class=`insetname_inner'
21906 \begin_inset Quotes erd
21912 \begin_layout Description
21913 \begin_inset Flex Code
21916 \begin_layout Plain Layout
21923 \begin_inset Flex Code
21926 \begin_layout Plain Layout
21932 ] The inner tag, replacing
21933 \begin_inset Flex Code
21936 \begin_layout Plain Layout
21942 in the examples above.
21943 By default, there is none.
21946 \begin_layout Description
21947 \begin_inset Flex Code
21950 \begin_layout Plain Layout
21957 \begin_inset Flex Code
21960 \begin_layout Plain Layout
21968 ] Whether this inset represents a standalone block of text (such as a footnote)
21969 or instead represents material that is included in the surrounding text
21970 (such as a branch).
21974 \begin_layout Description
21975 \begin_inset Flex Code
21978 \begin_layout Plain Layout
21985 \begin_inset Flex Code
21988 \begin_layout Plain Layout
21994 ] A label for this inset, possibly including a reference to a counter.
21995 For example, for footnote, it might be:
21996 \begin_inset Flex Code
21999 \begin_layout Plain Layout
22008 This is optional, and there is no default.
22011 \begin_layout Description
22012 \begin_inset Flex Code
22015 \begin_layout Plain Layout
22021 Information to be output in the
22022 \begin_inset Flex Code
22025 \begin_layout Plain Layout
22031 section when this style is used.
22032 This might, for example, be used to include a
22033 \begin_inset Flex Code
22036 \begin_layout Plain Layout
22043 \begin_inset Flex Code
22046 \begin_layout Plain Layout
22055 \begin_layout Description
22056 \begin_inset Flex Code
22059 \begin_layout Plain Layout
22065 CSS style information to be included when this style is used.
22066 Note that this will automatically be wrapped in a layout-generated
22067 \begin_inset Flex Code
22070 \begin_layout Plain Layout
22076 block, so only the CSS itself need be included.
22079 \begin_layout Description
22080 \begin_inset Flex Code
22083 \begin_layout Plain Layout
22090 \begin_inset Flex Code
22093 \begin_layout Plain Layout
22099 ] The tag to be used for the main label, replacing
22100 \begin_inset Flex Code
22103 \begin_layout Plain Layout
22109 in the examples above.
22110 The default depends upon the setting of
22111 \begin_inset Flex Code
22114 \begin_layout Plain Layout
22121 \begin_inset Flex Code
22124 \begin_layout Plain Layout
22130 is true, the default is
22131 \begin_inset Flex Code
22134 \begin_layout Plain Layout
22140 ; if it is false, the default is
22141 \begin_inset Flex Code
22144 \begin_layout Plain Layout
22153 \begin_layout Subsection
22157 \begin_layout Standard
22158 The XHTML output for floats too can be controlled by layout information.
22159 The output has the following form:
22162 \begin_layout LyX-Code
22164 \begin_inset Quotes erd
22168 \begin_inset Quotes erd
22174 \begin_layout LyX-Code
22175 Contents of the float.
22178 \begin_layout LyX-Code
22182 \begin_layout Standard
22183 The caption, if there is one, is a separate inset and will be output as
22185 Its appearance can be controlled via the InsetLayout for caption insets.
22189 \begin_layout Description
22190 \begin_inset Flex Code
22193 \begin_layout Plain Layout
22200 \begin_inset Flex Code
22203 \begin_layout Plain Layout
22209 ] Specifies attribute information to be output with the main tag.
22211 \begin_inset Quotes eld
22215 \begin_inset Flex Code
22218 \begin_layout Plain Layout
22219 class=`myfloat' onclick=`\SpecialChar ldots
22226 \begin_inset Quotes erd
22230 By default, \SpecialChar LyX
22232 \begin_inset Quotes eld
22236 \begin_inset Flex Code
22239 \begin_layout Plain Layout
22240 class=`float float-floattype'
22246 \begin_inset Quotes erd
22250 \begin_inset Flex Code
22253 \begin_layout Plain Layout
22259 is \SpecialChar LyX
22260 's name for this type of float, as determined by the float declaration
22262 \begin_inset CommandInset ref
22264 reference "subsec:Floats"
22268 ), though made lowercase and with non-alphanumeric characters converted
22269 to underscores, for example: float-table.
22272 \begin_layout Description
22273 \begin_inset Flex Code
22276 \begin_layout Plain Layout
22282 CSS style information to be included when this float is used.
22283 Note that this will automatically be wrapped in a layout-generated
22284 \begin_inset Flex Code
22287 \begin_layout Plain Layout
22293 block, so only the CSS itself need be included.
22296 \begin_layout Description
22297 \begin_inset Flex Code
22300 \begin_layout Plain Layout
22307 \begin_inset Flex Code
22310 \begin_layout Plain Layout
22316 ] The tag to be used for this float, replacing
22317 \begin_inset Quotes eld
22321 \begin_inset Flex Code
22324 \begin_layout Plain Layout
22331 \begin_inset Quotes erd
22334 in the example above.
22336 \begin_inset Flex Code
22339 \begin_layout Plain Layout
22345 and will rarely need changing.
22348 \begin_layout Subsection
22349 Bibliography formatting
22352 \begin_layout Standard
22353 The bibliography can be formatted using
22354 \begin_inset Flex Code
22357 \begin_layout Plain Layout
22365 \begin_inset CommandInset ref
22367 reference "subsec:Citation-format-description"
22374 \begin_layout Subsection
22379 \begin_layout Standard
22380 We have several times mentioned that \SpecialChar LyX
22381 will generate default CSS style rules
22382 for both insets and paragraph styles, based upon the other layout information
22384 In this section, we shall say a word about which layout information \SpecialChar LyX
22389 \begin_layout Standard
22390 At present, \SpecialChar LyX
22391 auto-generates CSS only for font information, making use of
22393 \begin_inset Flex Code
22396 \begin_layout Plain Layout
22403 \begin_inset Flex Code
22406 \begin_layout Plain Layout
22413 \begin_inset Flex Code
22416 \begin_layout Plain Layout
22423 \begin_inset Flex Code
22426 \begin_layout Plain Layout
22433 \begin_inset Flex Code
22436 \begin_layout Plain Layout
22443 \begin_inset CommandInset ref
22445 reference "subsec:Font-description"
22450 The translation is mostly straightforward and obvious.
22452 \begin_inset Quotes eld
22456 \begin_inset Flex Code
22459 \begin_layout Plain Layout
22466 \begin_inset Quotes erd
22470 \begin_inset Quotes eld
22474 \begin_inset Flex Code
22477 \begin_layout Plain Layout
22478 font-family: sans-serif;
22484 \begin_inset Quotes erd
22488 The correspondence of \SpecialChar LyX
22489 sizes and CSS sizes is a little less obvious but
22490 nonetheless intuitive.
22492 \begin_inset Flex Code
22495 \begin_layout Plain Layout
22502 \begin_inset Flex URL
22505 \begin_layout Plain Layout
22515 \begin_layout Chapter
22516 Including External Material
22517 \begin_inset CommandInset label
22519 name "chap:Including-External-Material"
22526 \begin_layout Standard
22527 \begin_inset Box Shadowbox
22537 height_special "totalheight"
22542 backgroundcolor "none"
22545 \begin_layout Plain Layout
22546 WARNING: This portion of the documentation has not been updated for some
22548 We certainly hope that it is still accurate, but there are no guarantees.
22556 \begin_layout Standard
22557 The use of material from sources external to \SpecialChar LyX
22558 is covered in detail in the
22564 This part of the manual covers what needs to happen behind the scenes for
22565 new sorts of material to be included.
22568 \begin_layout Section
22572 \begin_layout Standard
22573 The external material feature is based on the concept of a
22578 A template is a specification of how \SpecialChar LyX
22579 should interface with a certain kind
22581 As bundled, \SpecialChar LyX
22582 comes with predefined templates for Xfig figures, various
22583 raster format images, chess diagrams, and LilyPond music notation.
22584 You can check the actual list by using the menu
22585 \begin_inset Flex Noun
22588 \begin_layout Plain Layout
22589 Insert\SpecialChar menuseparator
22590 File\SpecialChar menuseparator
22597 Furthermore, it is possible to roll your own template to support a specific
22599 Later we'll describe in more detail what is involved, and hopefully you
22600 will submit all the templates you create so we can include them in a later
22605 \begin_layout Standard
22606 Another basic idea of the external material feature is to distinguish between
22607 the original file that serves as a base for final material and the produced
22608 file that is included in your exported or printed document.
22609 For example, consider the case of a figure produced with
22610 \begin_inset Flex Code
22613 \begin_layout Plain Layout
22620 The Xfig application itself works on an original file with the
22621 \begin_inset Flex Code
22624 \begin_layout Plain Layout
22631 Within Xfig, you create and change your figure, and when you are done,
22633 \begin_inset Flex Code
22636 \begin_layout Plain Layout
22643 When you want to include the figure in your document, you invoke
22644 \begin_inset Flex Code
22647 \begin_layout Plain Layout
22653 in order to create a PostScript file that can readily be included in your
22657 \begin_inset Flex Code
22660 \begin_layout Plain Layout
22666 file is the original file, and the PostScript file is the produced file.
22669 \begin_layout Standard
22670 This distinction is important in order to allow updating of the material
22671 while you are in the process of writing the document.
22672 Furthermore, it provides us with the flexibility that is needed to support
22673 multiple export formats.
22674 For instance, in the case of a plain text file, it is not exactly an award-winn
22675 ing idea to include the figure as raw PostScript.
22676 Instead, you would either prefer to just include a reference to the figure
22677 or try to invoke some graphics to ASCII converter to make the final result
22678 look similar to the real graphics.
22679 The external material management allows you to do this, because it is parametri
22680 zed on the different export formats that \SpecialChar LyX
22684 \begin_layout Standard
22685 Besides supporting the production of different products according to the
22686 exported format, it supports tight integration with editing and viewing
22688 In the case of an Xfig figure, you are able to invoke Xfig on the original
22689 file with a single click from within the external material dialog in \SpecialChar LyX
22691 and also preview the produced PostScript file with Ghostview with another
22693 No more fiddling around with the command line and/or file browsers to locate
22694 and manipulate the original or produced files.
22695 In this way, you are finally able to take full advantage of the many different
22696 applications that are relevant to use when you write your documents, and
22697 ultimately be more productive.
22700 \begin_layout Section
22701 The external template configuration file
22704 \begin_layout Standard
22705 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22707 However, be aware that doing this in an careless manner most probably
22711 introduce an easily exploitable security hole.
22712 So before you do this, please read the discussion about security in
22713 \begin_inset CommandInset ref
22715 reference "sec:Security-discussion"
22722 \begin_layout Standard
22723 Having said that, we encourage you to submit any interesting templates that
22728 \begin_layout Standard
22729 The external templates are defined in the
22730 \begin_inset Flex Code
22733 \begin_layout Plain Layout
22734 LyXDir/lib/external_templates
22740 You can place your own version in
22741 \begin_inset Flex Code
22744 \begin_layout Plain Layout
22745 UserDir/external_templates
22753 \begin_layout Standard
22754 A typical template looks like this:
22757 \begin_layout LyX-Code
22761 \begin_layout LyX-Code
22762 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22765 \begin_layout LyX-Code
22769 \begin_layout LyX-Code
22773 \begin_layout LyX-Code
22777 \begin_layout LyX-Code
22781 \begin_layout LyX-Code
22785 \begin_layout LyX-Code
22786 AutomaticProduction true
22789 \begin_layout LyX-Code
22793 \begin_layout LyX-Code
22797 \begin_layout LyX-Code
22798 Format \SpecialChar LaTeX
22802 \begin_layout LyX-Code
22803 TransformCommand Rotate RotationLatexCommand
22806 \begin_layout LyX-Code
22807 TransformCommand Resize ResizeLatexCommand
22810 \begin_layout LyX-Code
22811 Product "$$RotateFront$$ResizeFront
22814 \begin_layout LyX-Code
22819 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22822 \begin_layout LyX-Code
22823 $$ResizeBack$$RotateBack"
22826 \begin_layout LyX-Code
22830 \begin_layout LyX-Code
22831 UpdateResult "$$AbsPath$$Basename.pstex_t"
22834 \begin_layout LyX-Code
22835 Requirement "graphicx"
22838 \begin_layout LyX-Code
22839 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22842 \begin_layout LyX-Code
22843 ReferencedFile latex "$$AbsPath$$Basename.eps"
22846 \begin_layout LyX-Code
22847 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22850 \begin_layout LyX-Code
22854 \begin_layout LyX-Code
22855 Format PDF\SpecialChar LaTeX
22859 \begin_layout LyX-Code
22860 TransformCommand Rotate RotationLatexCommand
22863 \begin_layout LyX-Code
22864 TransformCommand Resize ResizeLatexCommand
22867 \begin_layout LyX-Code
22868 Product "$$RotateFront$$ResizeFront
22871 \begin_layout LyX-Code
22876 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22879 \begin_layout LyX-Code
22880 $$ResizeBack$$RotateBack"
22883 \begin_layout LyX-Code
22884 UpdateFormat pdftex
22887 \begin_layout LyX-Code
22888 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22891 \begin_layout LyX-Code
22892 Requirement "graphicx"
22895 \begin_layout LyX-Code
22896 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22899 \begin_layout LyX-Code
22900 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22903 \begin_layout LyX-Code
22907 \begin_layout LyX-Code
22911 \begin_layout LyX-Code
22912 Product "$$Contents(
22914 "$$AbsPath$$Basename.asc
22919 \begin_layout LyX-Code
22920 UpdateFormat asciixfig
22923 \begin_layout LyX-Code
22924 UpdateResult "$$AbsPath$$Basename.asc"
22927 \begin_layout LyX-Code
22931 \begin_layout LyX-Code
22935 \begin_layout LyX-Code
22936 Product "<graphic fileref=
22938 "$$AbsOrRelPathMaster$$Basename.eps
22943 \begin_layout LyX-Code
22947 \begin_layout LyX-Code
22951 \begin_layout LyX-Code
22952 UpdateResult "$$AbsPath$$Basename.eps"
22955 \begin_layout LyX-Code
22956 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22959 \begin_layout LyX-Code
22960 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22963 \begin_layout LyX-Code
22967 \begin_layout LyX-Code
22968 Product "[XFig: $$FName]"
22971 \begin_layout LyX-Code
22975 \begin_layout LyX-Code
22979 \begin_layout Standard
22980 As you can see, the template is enclosed in
22981 \begin_inset Flex Code
22984 \begin_layout Plain Layout
22992 \begin_inset Flex Code
22995 \begin_layout Plain Layout
23002 It contains a header specifying some general settings and, for each supported
23003 primary document file format, a section
23004 \begin_inset Flex Code
23007 \begin_layout Plain Layout
23015 \begin_inset Flex Code
23018 \begin_layout Plain Layout
23027 \begin_layout Subsection
23028 The template header
23031 \begin_layout Description
23032 \begin_inset Flex Code
23035 \begin_layout Plain Layout
23036 AutomaticProduction
23037 \begin_inset space ~
23045 Whether the file represented by the template must be generated by \SpecialChar LyX
23047 This command must occur exactly once.
23050 \begin_layout Description
23051 \begin_inset Flex Code
23054 \begin_layout Plain Layout
23056 \begin_inset space ~
23064 A glob pattern that is used in the file dialog to filter out the desired
23066 If there is more than one possible file extension (e.
23067 \begin_inset space \thinspace{}
23071 \begin_inset space \space{}
23075 \begin_inset Flex Code
23078 \begin_layout Plain Layout
23085 \begin_inset Flex Code
23088 \begin_layout Plain Layout
23094 ), use something like
23095 \begin_inset Flex Code
23098 \begin_layout Plain Layout
23105 This command must occur exactly once.
23108 \begin_layout Description
23109 \begin_inset Flex Code
23112 \begin_layout Plain Layout
23114 \begin_inset space ~
23122 The text that is displayed on the button.
23123 This command must occur exactly once.
23126 \begin_layout Description
23127 \begin_inset Flex Code
23130 \begin_layout Plain Layout
23132 \begin_inset space ~
23136 \begin_inset space ~
23144 The help text that is used in the External dialog.
23145 Provide enough information to explain to the user just what the template
23146 can provide him with.
23147 This command must occur exactly once.
23150 \begin_layout Description
23151 \begin_inset Flex Code
23154 \begin_layout Plain Layout
23156 \begin_inset space ~
23164 The file format of the original file.
23165 This must be the name of a format that is known to \SpecialChar LyX
23167 \begin_inset CommandInset ref
23169 reference "sec:Formats"
23175 \begin_inset Quotes eld
23179 \begin_inset Flex Code
23182 \begin_layout Plain Layout
23189 \begin_inset Quotes erd
23192 if the template can handle original files of more than one format.
23194 will attempt to interrogate the file itself in order to deduce its format
23196 This command must occur exactly once.
23199 \begin_layout Description
23200 \begin_inset Flex Code
23203 \begin_layout Plain Layout
23205 \begin_inset space ~
23213 A unique name for the template.
23214 It must not contain substitution macros (see below).
23217 \begin_layout Description
23218 \begin_inset Flex Code
23221 \begin_layout Plain Layout
23223 \begin_inset space ~
23226 Rotate|Resize|Clip|Extra
23231 This command specifies which transformations are supported by this template.
23232 It may occur zero or more times.
23233 This command enables the corresponding tabs in the external dialog.
23235 \begin_inset Flex Code
23238 \begin_layout Plain Layout
23244 command must have either a corresponding
23245 \begin_inset Flex Code
23248 \begin_layout Plain Layout
23255 \begin_inset Flex Code
23258 \begin_layout Plain Layout
23265 \begin_inset Flex Code
23268 \begin_layout Plain Layout
23275 Otherwise the transformation will not be supported by that format.
23278 \begin_layout Subsection
23282 \begin_layout Description
23283 \begin_inset Flex Code
23286 \begin_layout Plain Layout
23288 \begin_inset space ~
23291 LaTeX|PDFLaTeX|PlainText|DocBook
23296 The primary document file format that this format definition is for.
23297 Not every template has a sensible representation in all document file formats.
23298 Please define nevertheless a
23299 \begin_inset Flex Code
23302 \begin_layout Plain Layout
23308 section for all templates.
23309 Use a dummy text when no representation is available.
23310 Then you can at least see a reference to the external material in the exported
23314 \begin_layout Description
23315 \begin_inset Flex Code
23318 \begin_layout Plain Layout
23320 \begin_inset space ~
23324 \begin_inset space ~
23332 This command defines an additional macro
23333 \begin_inset Flex Code
23336 \begin_layout Plain Layout
23342 for substitution in
23343 \begin_inset Flex Code
23346 \begin_layout Plain Layout
23354 \begin_inset Flex Code
23357 \begin_layout Plain Layout
23363 itself may contain substitution macros.
23364 The advantage over using
23365 \begin_inset Flex Code
23368 \begin_layout Plain Layout
23375 \begin_inset Flex Code
23378 \begin_layout Plain Layout
23384 is that the substituted value of
23385 \begin_inset Flex Code
23388 \begin_layout Plain Layout
23394 is sanitized so that it is a valid optional argument in the document format.
23395 This command may occur zero or more times.
23398 \begin_layout Description
23399 \begin_inset Flex Code
23402 \begin_layout Plain Layout
23404 \begin_inset space ~
23412 The text that is inserted in the exported document.
23413 This is actually the most important command and can be quite complex.
23414 This command must occur exactly once.
23417 \begin_layout Description
23418 \begin_inset Flex Code
23421 \begin_layout Plain Layout
23423 \begin_inset space ~
23431 This command specifies a preamble snippet that will be included in the
23434 It has to be defined using
23435 \begin_inset Flex Code
23438 \begin_layout Plain Layout
23446 \begin_inset Flex Code
23449 \begin_layout Plain Layout
23456 This command may occur zero or more times.
23459 \begin_layout Description
23460 \begin_inset Flex Code
23463 \begin_layout Plain Layout
23465 \begin_inset space ~
23469 \begin_inset space ~
23477 This command denotes files that are created by the conversion process and
23478 are needed for a particular export format.
23479 If the filename is relative, it is interpreted relative to the master document.
23480 This command may be given zero or more times.
23483 \begin_layout Description
23484 \begin_inset Flex Code
23487 \begin_layout Plain Layout
23489 \begin_inset space ~
23497 The name of a required \SpecialChar LaTeX
23499 The package is included via
23500 \begin_inset Flex Code
23503 \begin_layout Plain Layout
23511 in the \SpecialChar LaTeX
23513 This command may occur zero or more times.
23516 \begin_layout Description
23517 \begin_inset Flex Code
23520 \begin_layout Plain Layout
23522 \begin_inset space ~
23526 \begin_inset space ~
23529 RotationLatexCommand
23534 This command specifies that the built in \SpecialChar LaTeX
23535 command should be used for rotation.
23536 This command may occur once or not at all.
23539 \begin_layout Description
23540 \begin_inset Flex Code
23543 \begin_layout Plain Layout
23545 \begin_inset space ~
23549 \begin_inset space ~
23557 This command specifies that the built in \SpecialChar LaTeX
23558 command should be used for resizing.
23559 This command may occur once or not at all.
23562 \begin_layout Description
23563 \begin_inset Flex Code
23566 \begin_layout Plain Layout
23568 \begin_inset space ~
23572 \begin_inset space ~
23575 RotationLatexOption
23580 This command specifies that rotation is done via an optional argument.
23581 This command may occur once or not at all.
23584 \begin_layout Description
23585 \begin_inset Flex Code
23588 \begin_layout Plain Layout
23590 \begin_inset space ~
23594 \begin_inset space ~
23602 This command specifies that resizing is done via an optional argument.
23603 This command may occur once or not at all.
23606 \begin_layout Description
23607 \begin_inset Flex Code
23610 \begin_layout Plain Layout
23612 \begin_inset space ~
23616 \begin_inset space ~
23624 This command specifies that clipping is done via an optional argument.
23625 This command may occur once or not at all.
23628 \begin_layout Description
23629 \begin_inset Flex Code
23632 \begin_layout Plain Layout
23634 \begin_inset space ~
23638 \begin_inset space ~
23646 This command specifies that an extra optional argument is used.
23647 This command may occur once or not at all.
23650 \begin_layout Description
23651 \begin_inset Flex Code
23654 \begin_layout Plain Layout
23656 \begin_inset space ~
23664 The file format of the converted file.
23665 This must be the name of a format that is known to \SpecialChar LyX
23667 \begin_inset Flex Noun
23670 \begin_layout Plain Layout
23671 Tools\SpecialChar menuseparator
23672 Preferences\SpecialChar menuseparator
23673 File Handling\SpecialChar menuseparator
23680 This command must occur exactly once.
23681 If the resulting file format is PDF, you need to specify the format
23682 \begin_inset Flex Code
23685 \begin_layout Plain Layout
23692 This is the PDF format used for including graphics.
23693 The other defined PDF formats are for document export.
23696 \begin_layout Description
23697 \begin_inset Flex Code
23700 \begin_layout Plain Layout
23702 \begin_inset space ~
23710 The file name of the converted file.
23711 The file name must be absolute.
23712 This command must occur exactly once.
23715 \begin_layout Subsection
23716 Preamble definitions
23719 \begin_layout Standard
23720 The external template configuration file may contain additional preamble
23721 definitions enclosed by
23722 \begin_inset Flex Code
23725 \begin_layout Plain Layout
23733 \begin_inset Flex Code
23736 \begin_layout Plain Layout
23743 They can be used by the templates in the
23744 \begin_inset Flex Code
23747 \begin_layout Plain Layout
23756 \begin_layout Section
23757 The substitution mechanism
23760 \begin_layout Standard
23761 When the external material facility invokes an external program, it is done
23762 on the basis of a command defined in the template configuration file.
23763 These commands can contain various macros that are expanded before execution.
23764 Execution always take place in the directory of the containing document.
23767 \begin_layout Standard
23768 Also, whenever external material is to be displayed, the name will be produced
23769 by the substitution mechanism, and most other commands in the template
23770 definition support substitution as well.
23773 \begin_layout Standard
23774 The available macros are the following:
23777 \begin_layout Description
23778 \begin_inset Flex Code
23781 \begin_layout Plain Layout
23782 $$AbsOrRelPathMaster
23787 The file path, absolute or relative to the master \SpecialChar LyX
23791 \begin_layout Description
23792 \begin_inset Flex Code
23795 \begin_layout Plain Layout
23796 $$AbsOrRelPathParent
23801 The file path, absolute or relative to the \SpecialChar LyX
23805 \begin_layout Description
23806 \begin_inset Flex Code
23809 \begin_layout Plain Layout
23815 The absolute file path.
23818 \begin_layout Description
23819 \begin_inset Flex Code
23822 \begin_layout Plain Layout
23828 The filename without path and without the extension.
23831 \begin_layout Description
23832 \begin_inset Flex Code
23835 \begin_layout Plain Layout
23837 \begin_inset Quotes eld
23841 \begin_inset Quotes erd
23849 This macro will expand to the contents of the file with the name
23850 \begin_inset Flex Code
23853 \begin_layout Plain Layout
23862 \begin_layout Description
23863 \begin_inset Flex Code
23866 \begin_layout Plain Layout
23872 The file extension (including the dot).
23875 \begin_layout Description
23876 \begin_inset Flex Code
23879 \begin_layout Plain Layout
23885 This will be the string
23886 \begin_inset Quotes eld
23890 \begin_inset Quotes erd
23893 if the file is in JPEG format, otherwise it will be the string
23894 \begin_inset Quotes eld
23898 \begin_inset Quotes erd
23902 This is useful to avoid uneeded conversions for output formats that support
23903 both PNG and JPEG fomats.
23904 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
23909 \begin_layout Description
23910 \begin_inset Flex Code
23913 \begin_layout Plain Layout
23919 The filename of the file specified in the external material dialog.
23920 This is either an absolute name, or it is relative to the \SpecialChar LyX
23924 \begin_layout Description
23925 \begin_inset Flex Code
23928 \begin_layout Plain Layout
23935 \begin_inset Flex Code
23938 \begin_layout Plain Layout
23944 (absolute name or relative to the \SpecialChar LyX
23948 \begin_layout Description
23949 \begin_inset Flex Code
23952 \begin_layout Plain Layout
23958 The file path, relative to the master \SpecialChar LyX
23962 \begin_layout Description
23963 \begin_inset Flex Code
23966 \begin_layout Plain Layout
23972 The file path, relative to the \SpecialChar LyX
23976 \begin_layout Description
23977 \begin_inset Flex Code
23980 \begin_layout Plain Layout
23986 This macro will expand to the absolute path of the system directory.
23987 This is typically used to point to the various helper scripts that are
23988 bundled with \SpecialChar LyX
23992 \begin_layout Description
23993 \begin_inset Flex Code
23996 \begin_layout Plain Layout
24002 A name and full path to a temporary file which will be automatically deleted
24003 whenever the containing document is closed, or the external material insertion
24007 \begin_layout Standard
24008 All path macros contain a trailing directory separator, so you can construct
24010 \begin_inset space \thinspace{}
24014 \begin_inset space \space{}
24017 the absolute filename with
24018 \begin_inset Flex Code
24021 \begin_layout Plain Layout
24022 $$AbsPath$$Basename$$Extension
24030 \begin_layout Standard
24031 The macros above are substituted in all commands unless otherwise noted.
24033 \begin_inset Flex Code
24036 \begin_layout Plain Layout
24042 supports additionally the following substitutions if they are enabled by
24044 \begin_inset Flex Code
24047 \begin_layout Plain Layout
24054 \begin_inset Flex Code
24057 \begin_layout Plain Layout
24066 \begin_layout Description
24067 \begin_inset Flex Code
24070 \begin_layout Plain Layout
24076 The front part of the resize command.
24079 \begin_layout Description
24080 \begin_inset Flex Code
24083 \begin_layout Plain Layout
24089 The back part of the resize command.
24092 \begin_layout Description
24093 \begin_inset Flex Code
24096 \begin_layout Plain Layout
24102 The front part of the rotation command.
24105 \begin_layout Description
24106 \begin_inset Flex Code
24109 \begin_layout Plain Layout
24115 The back part of the rotation command.
24118 \begin_layout Standard
24119 The value string of the
24120 \begin_inset Flex Code
24123 \begin_layout Plain Layout
24129 command supports additionally the following substitutions if they are enabled
24131 \begin_inset Flex Code
24134 \begin_layout Plain Layout
24141 \begin_inset Flex Code
24144 \begin_layout Plain Layout
24153 \begin_layout Description
24154 \begin_inset Flex Code
24157 \begin_layout Plain Layout
24166 \begin_layout Description
24167 \begin_inset Flex Code
24170 \begin_layout Plain Layout
24179 \begin_layout Description
24180 \begin_inset Flex Code
24183 \begin_layout Plain Layout
24192 \begin_layout Description
24193 \begin_inset Flex Code
24196 \begin_layout Plain Layout
24202 The rotation option.
24205 \begin_layout Standard
24206 You may ask why there are so many path macros.
24207 There are mainly two reasons:
24210 \begin_layout Enumerate
24211 Relative and absolute file names should remain relative or absolute, respectivel
24213 Users may have reasons to prefer either form.
24214 Relative names are useful for portable documents that should work on different
24215 machines, for example.
24216 Absolute names may be required by some programs.
24219 \begin_layout Enumerate
24221 treats relative file names differently than \SpecialChar LyX
24222 and other programs in nested
24224 For \SpecialChar LyX
24225 , a relative file name is always relative to the document that contains
24227 For \SpecialChar LaTeX
24228 , it is always relative to the master document.
24229 These two definitions are identical if you have only one document, but
24230 differ if you have a master document that includes part documents.
24231 That means that relative filenames must be transformed when presented to
24234 Fortunately \SpecialChar LyX
24235 does this automatically for you if you choose the right macros.
24238 \begin_layout Standard
24239 So which path macro should be used in new template definitions? The rule
24243 \begin_layout Itemize
24245 \begin_inset Flex Code
24248 \begin_layout Plain Layout
24254 if an absolute path is required.
24257 \begin_layout Itemize
24259 \begin_inset Flex Code
24262 \begin_layout Plain Layout
24263 $$AbsOrRelPathMaster
24268 if the substituted string is some kind of \SpecialChar LaTeX
24272 \begin_layout Itemize
24274 \begin_inset Flex Code
24277 \begin_layout Plain Layout
24278 $$AbsOrRelPathParent
24283 in order to preserve the user's choice.
24286 \begin_layout Standard
24287 There are special cases where this rule does not work and e.
24288 \begin_inset space \thinspace{}
24292 \begin_inset space \space{}
24295 relative names are needed, but normally it will work just fine.
24296 One example for such a case is the command
24297 \begin_inset Flex Code
24300 \begin_layout Plain Layout
24301 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24306 in the XFig template above: We can't use the absolute name because the
24308 \begin_inset Flex Code
24311 \begin_layout Plain Layout
24317 files needs the relative name in order to rewrite the file content.
24320 \begin_layout Section
24321 Security discussion
24322 \begin_inset CommandInset label
24324 name "sec:Security-discussion"
24331 \begin_layout Standard
24332 The external material feature interfaces with a lot of external programs
24333 and does so automatically, so we have to consider the security implications
24335 In particular, since you have the option of including your own filenames
24336 and/or parameter strings and those are expanded into a command, it seems
24337 that it would be possible to create a malicious document which executes
24338 arbitrary commands when a user views or prints the document.
24339 This is something we definitely want to avoid.
24342 \begin_layout Standard
24343 However, since the external program commands are specified in the template
24344 configuration file only, there are no security issues if \SpecialChar LyX
24345 is properly configure
24346 d with safe templates only.
24347 This is so because the external programs are invoked with the
24348 \begin_inset Flex Code
24351 \begin_layout Plain Layout
24357 -system call rather than the
24358 \begin_inset Flex Code
24361 \begin_layout Plain Layout
24367 system-call, so it's not possible to execute arbitrary commands from the
24368 filename or parameter section via the shell.
24371 \begin_layout Standard
24372 This also implies that you are restricted in what command strings you can
24373 use in the external material templates.
24374 In particular, pipes and redirection are not readily available.
24375 This has to be so if \SpecialChar LyX
24376 should remain safe.
24377 If you want to use some of the shell features, you should write a safe
24378 script to do this in a controlled manner, and then invoke the script from
24379 the command string.
24383 \begin_layout Standard
24384 It is possible to design a template that interacts directly with the shell,
24385 but since this would allow a malicious user to execute arbitrary commands
24386 by writing clever filenames and/or parameters, we generally recommend that
24387 you only use safe scripts that work with the
24388 \begin_inset Flex Code
24391 \begin_layout Plain Layout
24397 system call in a controlled manner.
24398 Of course, for use in a controlled environment, it can be tempting to just
24399 fall back to use ordinary shell scripts.
24400 If you do so, be aware that you
24404 provide an easily exploitable security hole in your system.
24405 Of course it stands to reason that such unsafe templates will never be
24406 included in the standard \SpecialChar LyX
24407 distribution, although we do encourage people
24408 to submit new templates in the open source tradition.
24409 But \SpecialChar LyX
24410 as shipped from the official distribution channels will never have
24414 \begin_layout Standard
24415 Including external material provides a lot of power, and you have to be
24416 careful not to introduce security hazards with this power.
24417 A subtle error in a single line in an innocent looking script can open
24418 the door to huge security problems.
24419 So if you do not fully understand the issues, we recommend that you consult
24420 a knowledgeable security professional or the \SpecialChar LyX
24421 development team if you have
24422 any questions about whether a given template is safe or not.
24423 And do this before you use it in an uncontrolled environment.
24426 \begin_layout Chapter
24428 List of supported \SpecialChar LyX
24429 functions to be used in layouts
24430 \begin_inset CommandInset label
24432 name "chap:List-of-functions"
24439 \begin_layout Standard
24441 \begin_inset Tabular
24442 <lyxtabular version="3" rows="11" columns="8">
24443 <features tabularvalignment="middle">
24444 <column alignment="left" valignment="top">
24445 <column alignment="left" valignment="top">
24446 <column alignment="left" valignment="top">
24447 <column alignment="left" valignment="top">
24448 <column alignment="left" valignment="top">
24449 <column alignment="left" valignment="top">
24450 <column alignment="left" valignment="top">
24451 <column alignment="left" valignment="top">
24453 <cell alignment="left" valignment="top" usebox="none">
24456 \begin_layout Plain Layout
24462 <cell alignment="left" valignment="top" usebox="none">
24465 \begin_layout Plain Layout
24471 <cell alignment="left" valignment="top" usebox="none">
24474 \begin_layout Plain Layout
24480 <cell alignment="left" valignment="top" usebox="none">
24483 \begin_layout Plain Layout
24489 <cell alignment="center" valignment="top" usebox="none">
24492 \begin_layout Plain Layout
24498 <cell alignment="center" valignment="top" usebox="none">
24501 \begin_layout Plain Layout
24507 <cell alignment="center" valignment="top" usebox="none">
24510 \begin_layout Plain Layout
24516 <cell alignment="center" valignment="top" usebox="none">
24519 \begin_layout Plain Layout
24527 <cell alignment="left" valignment="top" usebox="none">
24530 \begin_layout Plain Layout
24536 <cell alignment="left" valignment="top" usebox="none">
24539 \begin_layout Plain Layout
24545 <cell alignment="left" valignment="top" usebox="none">
24548 \begin_layout Plain Layout
24554 <cell alignment="left" valignment="top" usebox="none">
24557 \begin_layout Plain Layout
24563 <cell alignment="center" valignment="top" usebox="none">
24566 \begin_layout Plain Layout
24572 <cell alignment="center" valignment="top" usebox="none">
24575 \begin_layout Plain Layout
24581 <cell alignment="center" valignment="top" usebox="none">
24584 \begin_layout Plain Layout
24590 <cell alignment="center" valignment="top" usebox="none">
24593 \begin_layout Plain Layout
24601 <cell alignment="left" valignment="top" usebox="none">
24604 \begin_layout Plain Layout
24610 <cell alignment="left" valignment="top" usebox="none">
24613 \begin_layout Plain Layout
24619 <cell alignment="left" valignment="top" usebox="none">
24622 \begin_layout Plain Layout
24628 <cell alignment="left" valignment="top" usebox="none">
24631 \begin_layout Plain Layout
24637 <cell alignment="center" valignment="top" usebox="none">
24640 \begin_layout Plain Layout
24646 <cell alignment="center" valignment="top" usebox="none">
24649 \begin_layout Plain Layout
24655 <cell alignment="center" valignment="top" usebox="none">
24658 \begin_layout Plain Layout
24664 <cell alignment="center" valignment="top" usebox="none">
24667 \begin_layout Plain Layout
24675 <cell alignment="left" valignment="top" usebox="none">
24678 \begin_layout Plain Layout
24684 <cell alignment="left" valignment="top" usebox="none">
24687 \begin_layout Plain Layout
24693 <cell alignment="left" valignment="top" usebox="none">
24696 \begin_layout Plain Layout
24702 <cell alignment="left" valignment="top" usebox="none">
24705 \begin_layout Plain Layout
24711 <cell alignment="center" valignment="top" usebox="none">
24714 \begin_layout Plain Layout
24720 <cell alignment="center" valignment="top" usebox="none">
24723 \begin_layout Plain Layout
24729 <cell alignment="center" valignment="top" usebox="none">
24732 \begin_layout Plain Layout
24738 <cell alignment="center" valignment="top" usebox="none">
24741 \begin_layout Plain Layout
24749 <cell alignment="left" valignment="top" usebox="none">
24752 \begin_layout Plain Layout
24758 <cell alignment="left" valignment="top" usebox="none">
24761 \begin_layout Plain Layout
24767 <cell alignment="left" valignment="top" usebox="none">
24770 \begin_layout Plain Layout
24776 <cell alignment="left" valignment="top" usebox="none">
24779 \begin_layout Plain Layout
24785 <cell alignment="center" valignment="top" usebox="none">
24788 \begin_layout Plain Layout
24794 <cell alignment="center" valignment="top" usebox="none">
24797 \begin_layout Plain Layout
24803 <cell alignment="center" valignment="top" usebox="none">
24806 \begin_layout Plain Layout
24812 <cell alignment="center" valignment="top" usebox="none">
24815 \begin_layout Plain Layout
24823 <cell alignment="left" valignment="top" usebox="none">
24826 \begin_layout Plain Layout
24832 <cell alignment="left" valignment="top" usebox="none">
24835 \begin_layout Plain Layout
24841 <cell alignment="left" valignment="top" usebox="none">
24844 \begin_layout Plain Layout
24850 <cell alignment="left" valignment="top" usebox="none">
24853 \begin_layout Plain Layout
24859 <cell alignment="center" valignment="top" usebox="none">
24862 \begin_layout Plain Layout
24868 <cell alignment="center" valignment="top" usebox="none">
24871 \begin_layout Plain Layout
24877 <cell alignment="center" valignment="top" usebox="none">
24880 \begin_layout Plain Layout
24886 <cell alignment="center" valignment="top" usebox="none">
24889 \begin_layout Plain Layout
24897 <cell alignment="left" valignment="top" usebox="none">
24900 \begin_layout Plain Layout
24906 <cell alignment="left" valignment="top" usebox="none">
24909 \begin_layout Plain Layout
24915 <cell alignment="left" valignment="top" usebox="none">
24918 \begin_layout Plain Layout
24924 <cell alignment="left" valignment="top" usebox="none">
24927 \begin_layout Plain Layout
24933 <cell alignment="center" valignment="top" usebox="none">
24936 \begin_layout Plain Layout
24942 <cell alignment="center" valignment="top" usebox="none">
24945 \begin_layout Plain Layout
24951 <cell alignment="center" valignment="top" usebox="none">
24954 \begin_layout Plain Layout
24960 <cell alignment="center" valignment="top" usebox="none">
24963 \begin_layout Plain Layout
24971 <cell alignment="left" valignment="top" usebox="none">
24974 \begin_layout Plain Layout
24980 <cell alignment="left" valignment="top" usebox="none">
24983 \begin_layout Plain Layout
24989 <cell alignment="left" valignment="top" usebox="none">
24992 \begin_layout Plain Layout
24998 <cell alignment="left" valignment="top" usebox="none">
25001 \begin_layout Plain Layout
25007 <cell alignment="center" valignment="top" usebox="none">
25010 \begin_layout Plain Layout
25016 <cell alignment="center" valignment="top" usebox="none">
25019 \begin_layout Plain Layout
25025 <cell alignment="center" valignment="top" usebox="none">
25028 \begin_layout Plain Layout
25034 <cell alignment="center" valignment="top" usebox="none">
25037 \begin_layout Plain Layout
25045 <cell alignment="left" valignment="top" usebox="none">
25048 \begin_layout Plain Layout
25054 <cell alignment="left" valignment="top" usebox="none">
25057 \begin_layout Plain Layout
25063 <cell alignment="left" valignment="top" usebox="none">
25066 \begin_layout Plain Layout
25072 <cell alignment="left" valignment="top" usebox="none">
25075 \begin_layout Plain Layout
25081 <cell alignment="center" valignment="top" usebox="none">
25084 \begin_layout Plain Layout
25090 <cell alignment="center" valignment="top" usebox="none">
25093 \begin_layout Plain Layout
25099 <cell alignment="center" valignment="top" usebox="none">
25102 \begin_layout Plain Layout
25108 <cell alignment="center" valignment="top" usebox="none">
25111 \begin_layout Plain Layout
25119 <cell alignment="left" valignment="top" usebox="none">
25122 \begin_layout Plain Layout
25128 <cell alignment="left" valignment="top" usebox="none">
25131 \begin_layout Plain Layout
25137 <cell alignment="left" valignment="top" usebox="none">
25140 \begin_layout Plain Layout
25146 <cell alignment="left" valignment="top" usebox="none">
25149 \begin_layout Plain Layout
25155 <cell alignment="center" valignment="top" usebox="none">
25158 \begin_layout Plain Layout
25164 <cell alignment="center" valignment="top" usebox="none">
25167 \begin_layout Plain Layout
25173 <cell alignment="center" valignment="top" usebox="none">
25176 \begin_layout Plain Layout
25182 <cell alignment="center" valignment="top" usebox="none">
25185 \begin_layout Plain Layout
25193 <cell alignment="center" valignment="top" usebox="none">
25196 \begin_layout Plain Layout
25202 <cell alignment="center" valignment="top" usebox="none">
25205 \begin_layout Plain Layout
25211 <cell alignment="center" valignment="top" usebox="none">
25214 \begin_layout Plain Layout
25220 <cell alignment="center" valignment="top" usebox="none">
25223 \begin_layout Plain Layout
25229 <cell alignment="center" valignment="top" usebox="none">
25232 \begin_layout Plain Layout
25238 <cell alignment="center" valignment="top" usebox="none">
25241 \begin_layout Plain Layout
25247 <cell alignment="center" valignment="top" usebox="none">
25250 \begin_layout Plain Layout
25256 <cell alignment="center" valignment="top" usebox="none">
25259 \begin_layout Plain Layout
25273 \begin_layout Chapter
25274 Names of available colors to be used in layouts
25275 \begin_inset CommandInset label
25277 name "chap:Names-of-colors"
25284 \begin_layout Standard
25285 The colors listed here are the standard colors and the those that you can
25286 adjust in the \SpecialChar LyX
25290 \begin_layout Description
25303 No particular color – clear or default
25306 \begin_layout Description
25310 \begin_layout Description
25314 \begin_layout Description
25318 \begin_layout Description
25322 \begin_layout Description
25326 \begin_layout Description
25330 \begin_layout Description
25334 \begin_layout Description
25338 \begin_layout Description
25339 added_space Added space marker color
25342 \begin_layout Description
25343 addedtext Added text color
25346 \begin_layout Description
25347 appendix Appendix marker color
25350 \begin_layout Description
25351 background Background color
25354 \begin_layout Description
25355 bottomarea Bottom area color
25358 \begin_layout Description
25359 branchlabel Label color for branches
25362 \begin_layout Description
25363 buttonbg Color used for bottom background
25366 \begin_layout Description
25367 buttonhoverbg Color used for button background under focus
25370 \begin_layout Description
25371 buttonframe Color for inset button frames
25374 \begin_layout Description
25375 changebar Changebar color
25378 \begin_layout Description
25379 changedtextauthor1 Changed text color author 1
25382 \begin_layout Description
25383 changedtextauthor2 Changed text color author 2
25386 \begin_layout Description
25387 changedtextauthor3 Changed text color author 3
25390 \begin_layout Description
25391 changedtextauthor4 Changed text color author 4
25394 \begin_layout Description
25395 changedtextauthor5 Changed text color author 5
25398 \begin_layout Description
25399 collapsable_inset_frame Collapsable insets framecolor
25402 \begin_layout Description
25403 collapsable_inset_text Collapsable insets text color
25406 \begin_layout Description
25407 command Text color for command insets
25410 \begin_layout Description
25411 commandbg Background color for command insets
25414 \begin_layout Description
25415 commandframe Frame color for command insets
25418 \begin_layout Description
25419 comment color for comments
25422 \begin_layout Description
25423 commentbg Background color of comments
25426 \begin_layout Description
25427 cursor Cursor color
25430 \begin_layout Description
25431 deletedtext Deleted text color
25434 \begin_layout Description
25435 deletedtextmodifier Deleted text modifying color
25438 \begin_layout Description
25439 depthbar Color for the depth bars in the margin
25442 \begin_layout Description
25443 eolmarker End of line marker color
25446 \begin_layout Description
25447 error Color of the \SpecialChar LaTeX
25451 \begin_layout Description
25452 footlabel Label color for footnotes
25455 \begin_layout Description
25456 graphicsbg Graphics inset background color
25459 \begin_layout Description
25460 greyedout Label color for greyedout insets
25463 \begin_layout Description
25464 greyedoutbg Background color of greyedout inset
25467 \begin_layout Description
25468 greyedouttext Color for greyedout inset text
25471 \begin_layout Description
25472 indexlabel Label color for index insets
25475 \begin_layout Description
25476 ignore The color is ignored
25479 \begin_layout Description
25480 inherit The color is inherited
25483 \begin_layout Description
25484 inlinecompletion Inline completion color
25487 \begin_layout Description
25488 insetbg Inset marker background color
25491 \begin_layout Description
25492 insetframe Inset marker frame color
25495 \begin_layout Description
25496 language Color for marking foreign language words
25499 \begin_layout Description
25500 latex Text color in \SpecialChar LaTeX
25504 \begin_layout Description
25505 listingsbg Background color of listings inset
25508 \begin_layout Description
25509 marginlabel Label color for margin notes
25512 \begin_layout Description
25513 math Math inset text color
25516 \begin_layout Description
25517 mathbg Math inset background color
25520 \begin_layout Description
25521 mathcorners Math inset frame color not under focus
25524 \begin_layout Description
25525 mathframe Math inset frame color under focus
25528 \begin_layout Description
25529 mathline Math line color
25532 \begin_layout Description
25533 mathmacrobg Macro math inset background color
25536 \begin_layout Description
25537 mathmacroblend Macro math blended color
25540 \begin_layout Description
25541 mathmacroframe Macro math frame color
25544 \begin_layout Description
25545 mathmacrohoverbg Macro math inset background color hovered
25548 \begin_layout Description
25549 mathmacrolabel Macro math label color
25552 \begin_layout Description
25553 mathmacronewarg Macro template color for new parameters
25556 \begin_layout Description
25557 mathmacrooldarg Macro template color for old parameters
25560 \begin_layout Description
25561 newpage New page color
25564 \begin_layout Description
25565 nonunique_inlinecompletion Inline completion color for the non-unique part
25568 \begin_layout Description
25569 notebg Background color of notes
25572 \begin_layout Description
25573 notelabel Label color for notes
25576 \begin_layout Description
25577 pagebreak Page break/line break color
25580 \begin_layout Description
25581 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25584 \begin_layout Description
25585 phantomtext Text color for phantom insets
25588 \begin_layout Description
25589 preview The color used for previews
25592 \begin_layout Description
25593 previewframe Preview frame color
25596 \begin_layout Description
25597 regexpframe Color for regexp frame
25600 \begin_layout Description
25601 selection Background color of selected text
25604 \begin_layout Description
25605 selectiontext Foreground color of selected text
25608 \begin_layout Description
25609 shadedbg Background color of shaded box
25612 \begin_layout Description
25613 special Special chars text color
25616 \begin_layout Description
25617 tabularline Table line color
25620 \begin_layout Description
25621 tabularonoffline Table line color
25624 \begin_layout Description
25625 urllabel Label color for URL insets
25628 \begin_layout Description
25629 urltext Color for URL inset text