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 default
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 ] Modifies the properties of the given paragraph style.
9099 If the style does not exist, the statement is ignored.
9101 \begin_inset Quotes eld
9105 \begin_inset Flex Code
9108 \begin_layout Plain Layout
9115 \begin_inset Quotes erd
9121 \begin_layout Description
9122 \begin_inset Flex Code
9125 \begin_layout Plain Layout
9132 \begin_inset Flex Code
9135 \begin_layout Plain Layout
9141 ] This allows you to include another layout definition file within yours
9142 to avoid duplicating commands.
9143 Common examples are the standard layout files, for example,
9144 \begin_inset Flex Code
9147 \begin_layout Plain Layout
9153 , which contains most of the basic layouts.
9156 \begin_layout Description
9157 \begin_inset Flex Code
9160 \begin_layout Plain Layout
9167 \begin_inset Flex Code
9170 \begin_layout Plain Layout
9176 ] This section (re-)defines the layout of an inset.
9177 It can be applied to an existing inset or to a new, user-defined inset,
9178 e.g., a new character style.
9180 \begin_inset Quotes eld
9184 \begin_inset Flex Code
9187 \begin_layout Plain Layout
9194 \begin_inset Quotes erd
9198 \begin_inset Newline newline
9202 \begin_inset CommandInset ref
9204 reference "subsec:Flex-insets-and"
9208 for more information.
9212 \begin_layout Description
9213 \begin_inset Flex Code
9216 \begin_layout Plain Layout
9223 \begin_inset Flex Code
9226 \begin_layout Plain Layout
9232 ] A string that indicates the width of the left margin on the screen, for
9234 \begin_inset Quotes eld
9238 \begin_inset Flex Code
9241 \begin_layout Plain Layout
9248 \begin_inset Quotes erd
9252 (Note that this is not a `length', like
9253 \begin_inset Quotes eld
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 ] Whether the class requires the feature
9886 \begin_inset Flex Code
9889 \begin_layout Plain Layout
9896 Multiple features must be separated by commas.
9897 Note that you can only request supported features.
9899 \begin_inset CommandInset ref
9901 reference "chap:List-of-functions"
9905 for the list of features.).
9906 If you require a package with specific options, you can additionally use
9908 \begin_inset Flex Code
9911 \begin_layout Plain Layout
9920 \begin_layout Description
9921 \begin_inset Flex Code
9924 \begin_layout Plain Layout
9931 \begin_inset Flex Code
9934 \begin_layout Plain Layout
9940 ] A string that indicates the width of the right margin on the screen, for
9942 \begin_inset Quotes eld
9946 \begin_inset Flex Code
9949 \begin_layout Plain Layout
9956 \begin_inset Quotes erd
9962 \begin_layout Description
9963 \begin_inset Flex Code
9966 \begin_layout Plain Layout
9973 \begin_inset Flex Code
9976 \begin_layout Plain Layout
9982 ] Sets which divisions get numbered.
9984 \begin_inset Newline newline
9988 \begin_inset Flex Code
9991 \begin_layout Plain Layout
9997 counter in \SpecialChar LaTeX
10001 \begin_layout Description
10002 \begin_inset Flex Code
10005 \begin_layout Plain Layout
10012 \begin_inset Flex Code
10015 \begin_layout Plain Layout
10024 \begin_inset space \thinspace{}
10028 \begin_inset Flex Code
10031 \begin_layout Plain Layout
10037 ] Whether the class-default should be printing on one or both sides of the
10039 Can be changed in the
10040 \begin_inset Flex Noun
10043 \begin_layout Plain Layout
10044 Document\SpecialChar menuseparator
10053 \begin_layout Description
10054 \begin_inset Flex Code
10057 \begin_layout Plain Layout
10064 \begin_inset Flex Code
10067 \begin_layout Plain Layout
10073 ] This sequence defines a paragraph style.
10074 If the style does not yet exist, it is created; if it does exist, its parameter
10077 \begin_inset Quotes eld
10081 \begin_inset Flex Code
10084 \begin_layout Plain Layout
10091 \begin_inset Quotes erd
10095 \begin_inset Newline newline
10099 \begin_inset CommandInset ref
10101 reference "subsec:Paragraph-Styles"
10105 for details on paragraph styles.
10108 \begin_layout Description
10109 \begin_inset Flex Code
10112 \begin_layout Plain Layout
10119 \begin_inset Flex Code
10122 \begin_layout Plain Layout
10128 ] The name of the command or environment to be used with
10129 \begin_inset Flex Code
10132 \begin_layout Plain Layout
10141 \begin_layout Description
10142 \begin_inset Flex Code
10145 \begin_layout Plain Layout
10152 \begin_inset Flex Code
10155 \begin_layout Plain Layout
10164 \begin_inset Flex Code
10167 \begin_layout Plain Layout
10173 ] Indicates what kind of markup is used to define the title of a document.
10175 \begin_inset Flex Code
10178 \begin_layout Plain Layout
10184 means that the macro with name
10185 \begin_inset Flex Code
10188 \begin_layout Plain Layout
10194 will be inserted after the last layout which has
10195 \begin_inset Quotes eld
10199 \begin_inset Flex Code
10202 \begin_layout Plain Layout
10204 \begin_inset space ~
10213 \begin_inset Quotes erd
10218 \begin_inset Flex Code
10221 \begin_layout Plain Layout
10227 corresponds to the case where all layouts which have
10228 \begin_inset Quotes eld
10232 \begin_inset Flex Code
10235 \begin_layout Plain Layout
10237 \begin_inset space ~
10246 \begin_inset Quotes erd
10249 should be enclosed into the
10250 \begin_inset Flex Code
10253 \begin_layout Plain Layout
10262 \begin_layout Description
10263 \begin_inset Flex Code
10266 \begin_layout Plain Layout
10273 \begin_inset Flex Code
10276 \begin_layout Plain Layout
10282 ] Sets which divisions are included in the table of contents.
10284 \begin_inset Flex Code
10287 \begin_layout Plain Layout
10293 counter in \SpecialChar LaTeX
10297 \begin_layout Subsection
10298 \begin_inset Flex Code
10301 \begin_layout Plain Layout
10308 \begin_inset CommandInset label
10310 name "subsec:ClassOptions"
10317 \begin_layout Standard
10319 \begin_inset Flex Code
10322 \begin_layout Plain Layout
10328 section can contain the following entries:
10331 \begin_layout Description
10332 \begin_inset Flex Code
10335 \begin_layout Plain Layout
10342 \begin_inset Flex Code
10345 \begin_layout Plain Layout
10351 ] The list of available font sizes for the document's main font, separated
10353 \begin_inset Quotes eld
10357 \begin_inset Flex Code
10360 \begin_layout Plain Layout
10367 \begin_inset Quotes erd
10373 \begin_layout Description
10374 \begin_inset Flex Code
10377 \begin_layout Plain Layout
10383 Used to set the DTD line with XML-based output classes.
10385 \begin_inset space \thinspace{}
10389 \begin_inset Quotes eld
10392 -//OASIS//DTD DocBook V4.2//EN
10393 \begin_inset Quotes erd
10399 \begin_layout Description
10400 \begin_inset Flex Code
10403 \begin_layout Plain Layout
10410 \begin_inset Flex Code
10413 \begin_layout Plain Layout
10414 string="empty|plain|headings|fancy"
10419 ] The list of available page sty\SpecialChar softhyphen
10421 \begin_inset Quotes eld
10425 \begin_inset Flex Code
10428 \begin_layout Plain Layout
10435 \begin_inset Quotes erd
10441 \begin_layout Description
10442 \begin_inset Flex Code
10445 \begin_layout Plain Layout
10452 \begin_inset Flex Code
10455 \begin_layout Plain Layout
10461 ] Some document class options, separated by a comma, that will be added
10462 to the optional part of the
10463 \begin_inset Flex Code
10466 \begin_layout Plain Layout
10477 \begin_layout Standard
10479 \begin_inset Flex Code
10482 \begin_layout Plain Layout
10488 section must end with
10489 \begin_inset Quotes eld
10493 \begin_inset Flex Code
10496 \begin_layout Plain Layout
10503 \begin_inset Quotes erd
10509 \begin_layout Subsection
10511 \begin_inset CommandInset label
10513 name "subsec:Paragraph-Styles"
10520 \begin_layout Standard
10521 A paragraph style description looks like this:
10525 \begin_layout Plain Layout
10526 Note that this will either define a new style or modify an existing one.
10534 \begin_layout LyX-Code
10541 \begin_layout LyX-Code
10545 \begin_layout LyX-Code
10549 \begin_layout Standard
10550 where the following commands are allowed:
10553 \begin_layout Description
10554 \begin_inset Flex Code
10557 \begin_layout Plain Layout
10564 \begin_inset Flex Code
10567 \begin_layout Plain Layout
10572 , left, right, center
10577 ] Paragraph alignment.
10580 \begin_layout Description
10581 \begin_inset Flex Code
10584 \begin_layout Plain Layout
10591 \begin_inset Flex Code
10594 \begin_layout Plain Layout
10599 , left, right, center
10604 ] A comma separated list of permitted alignments.
10605 (Some \SpecialChar LaTeX
10606 styles prohibit certain alignments, since those wouldn't make sense.
10607 For example a right-aligned or centered enumeration isn't possible.)
10610 \begin_layout Description
10611 \begin_inset Flex Code
10614 \begin_layout Plain Layout
10621 \begin_inset Flex Code
10624 \begin_layout Plain Layout
10630 ] Defines argument number <int> of a command\SpecialChar breakableslash
10631 environment associated with
10633 This is useful for things like section headings, and only makes sense with
10636 Every (optional or required) argument of a command or environment – except
10637 for the required argument that is associated with the content of the paragraph
10638 itself – has a separate definition, where the number specifies the order
10640 The definition must end with
10641 \begin_inset Flex Code
10644 \begin_layout Plain Layout
10651 So a command with two optional arguments has:
10652 \begin_inset Separator parbreak
10659 \begin_layout Quote
10665 \begin_layout Quote
10671 \begin_layout Quote
10677 \begin_layout Quote
10683 \begin_layout Quote
10689 \begin_layout Quote
10695 \begin_layout Standard
10697 \begin_inset Flex Code
10700 \begin_layout Plain Layout
10706 definition, the following specifications are possible:
10709 \begin_layout Itemize
10710 \begin_inset Flex Code
10713 \begin_layout Plain Layout
10720 \begin_inset Flex Code
10723 \begin_layout Plain Layout
10729 The string that will appear both in the menu (to insert this argument)
10730 and on the argument inset button (unless you also specify a separate
10731 \begin_inset Flex Code
10734 \begin_layout Plain Layout
10741 For the menu, you can define an accelerator by appending the respective
10742 character to the string, divided by
10743 \begin_inset Quotes eld
10747 \begin_inset Quotes erd
10751 \begin_inset space \thinspace{}
10755 \begin_inset space \space{}
10759 \begin_inset Quotes eld
10763 \begin_inset Flex Code
10766 \begin_layout Plain Layout
10773 \begin_inset Quotes erd
10779 \begin_layout Itemize
10780 \begin_inset Flex Code
10783 \begin_layout Plain Layout
10790 \begin_inset Flex Code
10793 \begin_layout Plain Layout
10799 A separate string for the menu.
10800 You can define an accelerator by appending the respective character to
10801 the string, divided by
10802 \begin_inset Quotes eld
10806 \begin_inset Quotes erd
10810 \begin_inset space \thinspace{}
10814 \begin_inset space \space{}
10818 \begin_inset Quotes eld
10822 \begin_inset Flex Code
10825 \begin_layout Plain Layout
10832 \begin_inset Quotes erd
10836 This specification is optional.
10837 If it is not given the
10838 \begin_inset Flex Code
10841 \begin_layout Plain Layout
10847 will be used instead for the menu.
10850 \begin_layout Itemize
10851 \begin_inset Flex Code
10854 \begin_layout Plain Layout
10861 \begin_inset Flex Code
10864 \begin_layout Plain Layout
10870 A longer explanatory text that appears in the tooltip when hovering over
10871 the argument inset.
10874 \begin_layout Itemize
10875 \begin_inset Flex Code
10878 \begin_layout Plain Layout
10885 \begin_inset Flex Code
10888 \begin_layout Plain Layout
10897 \begin_inset space \thinspace{}
10901 \begin_inset Flex Code
10904 \begin_layout Plain Layout
10910 ] Declare if this is a mandatory (1) or an optional (0) argument.
10911 Mandatory arguments will be output empty if not given, while optional arguments
10912 will not be output at all.
10913 By default, mandatory arguments are delimited by
10914 \begin_inset Flex Code
10917 \begin_layout Plain Layout
10923 , while optional arguments are delimited by
10924 \begin_inset Flex Code
10927 \begin_layout Plain Layout
10936 \begin_layout Itemize
10937 \begin_inset Flex Code
10940 \begin_layout Plain Layout
10947 \begin_inset Flex Code
10950 \begin_layout Plain Layout
10956 defines another argument (by its number) which this argument requires to
10957 be output if it is itself output.
10959 \begin_inset space \thinspace{}
10962 g., in \SpecialChar LaTeX
10963 commands, optional arguments often require previous optional arguments
10964 to be output (at least empty), as in
10965 \begin_inset Flex Code
10968 \begin_layout Plain Layout
10971 command[][argument]{text}
10977 This can be achieved by the statement
10978 \begin_inset Flex Code
10981 \begin_layout Plain Layout
10988 \begin_inset Flex Code
10991 \begin_layout Plain Layout
11000 \begin_layout Itemize
11001 \begin_inset Flex Code
11004 \begin_layout Plain Layout
11011 \begin_inset Flex Code
11014 \begin_layout Plain Layout
11020 defines a custom left delimiter (instead of
11021 \begin_inset Flex Code
11024 \begin_layout Plain Layout
11031 \begin_inset Flex Code
11034 \begin_layout Plain Layout
11041 A line break in the output can be indicated by
11042 \begin_inset Flex Code
11045 \begin_layout Plain Layout
11054 \begin_layout Itemize
11055 \begin_inset Flex Code
11058 \begin_layout Plain Layout
11065 \begin_inset Flex Code
11068 \begin_layout Plain Layout
11074 defines a custom right delimiter (instead of
11075 \begin_inset Flex Code
11078 \begin_layout Plain Layout
11085 \begin_inset Flex Code
11088 \begin_layout Plain Layout
11095 A line break in the output can be indicated by
11096 \begin_inset Flex Code
11099 \begin_layout Plain Layout
11108 \begin_layout Itemize
11109 \begin_inset Flex Code
11112 \begin_layout Plain Layout
11119 \begin_inset Flex Code
11122 \begin_layout Plain Layout
11128 defines an argument that is inserted if and only if no user-specified arguments
11130 \begin_inset space \thinspace{}
11134 \begin_inset space \space{}
11137 if no argument inset has been inserted (note that also an empty argument
11138 inset omits the DefaultArg).
11139 Multiple arguments need to be separated by comma.
11142 \begin_layout Itemize
11143 \begin_inset Flex Code
11146 \begin_layout Plain Layout
11153 \begin_inset Flex Code
11156 \begin_layout Plain Layout
11162 defines an argument that is inserted in any case (alone or in addition
11163 to user-specified arguments).
11164 Multiple arguments need to be separated by comma.
11167 \begin_layout Itemize
11168 \begin_inset Flex Code
11171 \begin_layout Plain Layout
11177 The font used for the argument content, see
11178 \begin_inset CommandInset ref
11180 reference "subsec:Font-description"
11187 \begin_layout Itemize
11188 \begin_inset Flex Code
11191 \begin_layout Plain Layout
11197 The font used for the label; see
11198 \begin_inset CommandInset ref
11200 reference "subsec:Font-description"
11207 \begin_layout Itemize
11208 \begin_inset Flex Code
11211 \begin_layout Plain Layout
11218 \begin_inset Flex Code
11221 \begin_layout Plain Layout
11226 , Minimalistic, Conglomerate
11231 ] describes the rendering style used for the inset's frame and buttons.
11234 \begin_layout Itemize
11235 \begin_inset Flex Code
11238 \begin_layout Plain Layout
11245 \begin_inset Flex Code
11248 \begin_layout Plain Layout
11255 \begin_inset Flex Code
11258 \begin_layout Plain Layout
11264 , this argument is automatically inserted when the respective style is selected.
11265 Currently, only one argument per style\SpecialChar breakableslash
11266 layout can be automatically inserted.
11269 \begin_layout Itemize
11270 \begin_inset Flex Code
11273 \begin_layout Plain Layout
11280 \begin_inset Flex Code
11283 \begin_layout Plain Layout
11290 \begin_inset Flex Code
11293 \begin_layout Plain Layout
11299 , this argument will be inserted with a copy of the co-text (either selected
11300 text or the whole paragraph) as content.
11303 \begin_layout Itemize
11304 \begin_inset Flex Code
11307 \begin_layout Plain Layout
11314 \begin_inset Flex Code
11317 \begin_layout Plain Layout
11318 string of characters
11327 Defines individual characters that should be output in raw form, meaning
11328 without special translations that \SpecialChar LaTeX
11330 Note that, contrary to PassThru, this needs to be explicitly defined for
11332 That is, arguments do not inherit PassThruChars from their parent inset
11336 \begin_layout Standard
11337 By default, the text entered in the \SpecialChar LyX
11338 workarea in the respective layout is
11339 the last (mandatory) argument of a command if the
11340 \begin_inset Flex Code
11343 \begin_layout Plain Layout
11350 \begin_inset Flex Code
11353 \begin_layout Plain Layout
11360 However, arguments with the prefix
11361 \begin_inset Flex Code
11364 \begin_layout Plain Layout
11370 are output after this workarea argument.
11371 Note that post-argument numbering restarts at 1, so the first argument
11372 following the workarea argument is
11373 \begin_inset Flex Code
11376 \begin_layout Plain Layout
11383 Post-arguments are ignored in any other
11384 \begin_inset Flex Code
11387 \begin_layout Plain Layout
11394 \begin_inset Flex Code
11397 \begin_layout Plain Layout
11406 \begin_layout Standard
11408 \begin_inset Flex Code
11411 \begin_layout Plain Layout
11420 \begin_inset Flex Code
11423 \begin_layout Plain Layout
11432 \begin_inset Flex Code
11435 \begin_layout Plain Layout
11441 followed by the number (e.
11442 \begin_inset space \thinspace{}
11446 \begin_inset space \space{}
11450 \begin_inset Flex Code
11453 \begin_layout Plain Layout
11463 \begin_layout Description
11464 \begin_inset Flex Code
11467 \begin_layout Plain Layout
11473 Note that this will completely override any prior
11474 \begin_inset Flex Code
11477 \begin_layout Plain Layout
11483 declaration for this style.
11485 \begin_inset Quotes eld
11489 \begin_inset Flex Code
11492 \begin_layout Plain Layout
11499 \begin_inset Quotes erd
11504 \begin_inset CommandInset ref
11506 reference "subsec:I18n"
11510 for details on its use.
11513 \begin_layout Description
11514 \begin_inset Flex Code
11517 \begin_layout Plain Layout
11524 \begin_inset Flex Code
11527 \begin_layout Plain Layout
11537 \begin_layout Plain Layout
11538 Note that a `float' here is a real number, such as: 1.5.
11543 The vertical space with which the last of a chain of paragraphs with this
11544 style is separated from the following paragraph.
11545 If the next paragraph has another style, the separations are not simply
11546 added, but the maximum is taken.
11549 \begin_layout Description
11550 \begin_inset Flex Code
11553 \begin_layout Plain Layout
11560 \begin_inset Flex Code
11563 \begin_layout Plain Layout
11569 ] The category for this style.
11570 This is used to group related styles in the style combobox on the toolbar.
11571 Any string can be used, but you may want to use existing categories with
11576 \begin_layout Description
11577 \begin_inset Flex Code
11580 \begin_layout Plain Layout
11586 Depth of XML command.
11587 Used only with XML-type formats.
11590 \begin_layout Description
11591 \begin_inset Flex Code
11594 \begin_layout Plain Layout
11601 \begin_inset Flex Code
11604 \begin_layout Plain Layout
11610 ] Copies all the features of an existing style into the current one.
11614 \begin_layout Description
11615 \begin_inset Flex Code
11618 \begin_layout Plain Layout
11625 \begin_inset Flex Code
11628 \begin_layout Plain Layout
11634 ] The name of a style whose preamble should be output
11639 This allows to ensure some ordering of the preamble snippets when macros
11640 definitions depend on one another.
11644 \begin_layout Plain Layout
11645 Note that, besides that functionality, there is no way to ensure any ordering
11647 The ordering that you see in a given version of \SpecialChar LyX
11648 may change without warning
11657 \begin_layout Description
11658 \begin_inset Flex Code
11661 \begin_layout Plain Layout
11668 \begin_inset Flex Code
11671 \begin_layout Plain Layout
11676 , Box, Filled_Box, Static
11681 ] The type of label that stands at the end of the paragraph (or sequence
11683 \begin_inset Flex Code
11686 \begin_layout Plain Layout
11693 \begin_inset Newline newline
11697 \begin_inset Flex Code
11700 \begin_layout Plain Layout
11707 \begin_inset Flex Code
11710 \begin_layout Plain Layout
11717 \begin_inset Flex Code
11720 \begin_layout Plain Layout
11728 \begin_inset Flex Code
11731 \begin_layout Plain Layout
11738 \begin_inset Quotes eld
11742 \begin_inset Quotes erd
11746 \begin_inset Flex Code
11749 \begin_layout Plain Layout
11756 \begin_inset space \space{}
11760 \begin_inset Flex Code
11763 \begin_layout Plain Layout
11769 ) is a white (resp.
11770 \begin_inset space ~
11773 black) square suitable for end of proof markers,
11774 \begin_inset Flex Code
11777 \begin_layout Plain Layout
11783 is an explicit text string.
11786 \begin_layout Description
11787 \begin_inset Flex Code
11790 \begin_layout Plain Layout
11797 \begin_inset Flex Code
11800 \begin_layout Plain Layout
11806 ] The string used for a label with a
11807 \begin_inset Flex Code
11810 \begin_layout Plain Layout
11817 \begin_inset Newline newline
11821 \begin_inset Flex Code
11824 \begin_layout Plain Layout
11834 \begin_layout Description
11835 \begin_inset Flex Code
11838 \begin_layout Plain Layout
11844 The font used for both the text body
11850 \begin_inset CommandInset ref
11852 reference "subsec:Font-description"
11857 Note that defining this font automatically defines the
11858 \begin_inset Flex Code
11861 \begin_layout Plain Layout
11868 So you should define this one first if you also want to define
11869 \begin_inset Flex Code
11872 \begin_layout Plain Layout
11881 \begin_layout Description
11882 \begin_inset Flex Code
11885 \begin_layout Plain Layout
11892 \begin_inset Flex Code
11895 \begin_layout Plain Layout
11901 ] Used for backporting new styles to stable \SpecialChar LyX
11903 The first stable version that supports this tag is \SpecialChar LyX
11905 The argument is a number which may either be 0, -1 or any value greater
11908 \begin_inset Flex Code
11911 \begin_layout Plain Layout
11917 flag of a style is greater than zero, it will always be written to the
11919 If a .lyx file is read, the style definitions from the document header are
11920 added to the document class.
11921 Therefore even older \SpecialChar LyX
11922 versions can handle the style.
11924 \begin_inset Flex Code
11927 \begin_layout Plain Layout
11933 is a version number: If the style is read, and the version number is less
11934 than the version number of the already existing style in the document class,
11935 the new style is ignored.
11936 If the version number is greater, the new style replaces the existing style.
11937 A value of -1 means an infinite version number, i.
11938 \begin_inset space \thinspace{}
11942 \begin_inset space \space{}
11945 the style is always used.
11948 \begin_layout Description
11949 \begin_inset Flex Code
11952 \begin_layout Plain Layout
11959 \begin_inset Flex Code
11962 \begin_layout Plain Layout
11971 \begin_inset space \thinspace{}
11975 \begin_inset Flex Code
11978 \begin_layout Plain Layout
11984 ] Usually \SpecialChar LyX
11985 does not allow you to insert more than one space between words,
11986 since a space is considered as the separation between two words, not a
11987 character or symbol of its own.
11988 This is a very fine thing but sometimes annoying, for example, when typing
11989 program code or plain \SpecialChar LaTeX
11992 \begin_inset Flex Code
11995 \begin_layout Plain Layout
12002 Note that \SpecialChar LyX
12003 will create protected blanks for the additional blanks when
12004 in another mode than \SpecialChar LaTeX
12008 \begin_layout Description
12009 \begin_inset Flex Code
12012 \begin_layout Plain Layout
12018 These tags are used with XHTML output.
12020 \begin_inset CommandInset ref
12022 reference "subsec:Paragraph-Style-XHTML"
12029 \begin_layout Description
12030 \begin_inset Flex Code
12033 \begin_layout Plain Layout
12039 [FIXME] (Used only with XML-type formats.)
12042 \begin_layout Description
12043 \begin_inset Flex Code
12046 \begin_layout Plain Layout
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12065 \begin_inset space \thinspace{}
12069 \begin_inset Flex Code
12072 \begin_layout Plain Layout
12079 \begin_inset Flex Code
12082 \begin_layout Plain Layout
12088 , marks the style as to be included in the document preamble and not in
12090 This is useful for document classes that want such information as the title
12091 and author to appear in the preamble.
12092 Note that this works only for styles for which the
12093 \begin_inset Flex Code
12096 \begin_layout Plain Layout
12103 \begin_inset Flex Code
12106 \begin_layout Plain Layout
12113 \begin_inset Flex Code
12116 \begin_layout Plain Layout
12125 \begin_layout Description
12126 \begin_inset Flex Code
12129 \begin_layout Plain Layout
12136 \begin_inset Flex Code
12139 \begin_layout Plain Layout
12148 \begin_inset space \thinspace{}
12152 \begin_inset Flex Code
12155 \begin_layout Plain Layout
12162 \begin_inset Flex Code
12165 \begin_layout Plain Layout
12171 , marks the style as being part of a title block (see also the
12172 \begin_inset Flex Code
12175 \begin_layout Plain Layout
12182 \begin_inset Flex Code
12185 \begin_layout Plain Layout
12194 \begin_layout Description
12195 \begin_inset Flex Code
12198 \begin_layout Plain Layout
12205 \begin_inset Flex Code
12208 \begin_layout Plain Layout
12214 ] The \SpecialChar LaTeX
12215 command sequence declaring an item in a list.
12216 The command is to be defined without the preceding backslash (the default
12218 \begin_inset Quotes eld
12222 \begin_inset Quotes erd
12226 \begin_inset Flex Code
12229 \begin_layout Plain Layout
12237 in the \SpecialChar LaTeX
12241 \begin_layout Description
12242 \begin_inset Flex Code
12245 \begin_layout Plain Layout
12252 \begin_inset Flex Code
12255 \begin_layout Plain Layout
12261 ] This provides extra space between paragraphs that have the same style.
12262 If you put other styles into an environment, each is separated with the
12264 \begin_inset Flex Code
12267 \begin_layout Plain Layout
12274 But the whole items of the environment are additionally separated with
12276 \begin_inset Flex Code
12279 \begin_layout Plain Layout
12286 Note that this is a
12291 \begin_layout Description
12292 \begin_inset Flex Code
12295 \begin_layout Plain Layout
12301 [FIXME] (Used only with XML-type formats.)
12304 \begin_layout Description
12305 \begin_inset Flex Code
12308 \begin_layout Plain Layout
12315 \begin_inset Flex Code
12318 \begin_layout Plain Layout
12327 \begin_inset space \thinspace{}
12331 \begin_inset Flex Code
12334 \begin_layout Plain Layout
12340 ] Usually \SpecialChar LyX
12341 does not allow you to leave a paragraph empty, since it would
12342 lead to empty \SpecialChar LaTeX
12344 There are some cases where this could be desirable however: in a letter
12345 template, the required fields can be provided as empty fields, so that
12346 people do not forget them; in some special classes, a style can be used
12347 as some kind of break, which does not contain actual text.
12350 \begin_layout Description
12351 \begin_inset Flex Code
12354 \begin_layout Plain Layout
12361 \begin_inset Flex Code
12364 \begin_layout Plain Layout
12370 ] The vertical space between the label and the text body.
12371 Only used for labels that are above the text body (
12372 \begin_inset Flex Code
12375 \begin_layout Plain Layout
12382 \begin_inset Newline newline
12386 \begin_inset Flex Code
12389 \begin_layout Plain Layout
12390 Centered_Top_Environment
12398 \begin_layout Description
12399 \begin_inset Flex Code
12402 \begin_layout Plain Layout
12409 \begin_inset Flex Code
12412 \begin_layout Plain Layout
12418 ] The name of the counter for automatic numbering.
12419 In order to have the counter appear with your label, you will need to reference
12421 \begin_inset Flex Code
12424 \begin_layout Plain Layout
12433 This will work with
12434 \begin_inset Flex Code
12437 \begin_layout Plain Layout
12444 \begin_inset Flex Code
12447 \begin_layout Plain Layout
12454 \begin_inset Flex Code
12457 \begin_layout Plain Layout
12464 \begin_inset Flex Code
12467 \begin_layout Plain Layout
12474 \begin_inset Newline newline
12482 \begin_inset Flex Code
12485 \begin_layout Plain Layout
12492 \begin_inset Flex Code
12495 \begin_layout Plain Layout
12501 , though this case is a bit complicated.
12502 Suppose you declare
12503 \begin_inset Quotes eld
12507 \begin_inset Flex Code
12510 \begin_layout Plain Layout
12511 LabelCounter myenum
12517 \begin_inset Quotes erd
12521 Then the actual counters used are
12522 \begin_inset Flex Code
12525 \begin_layout Plain Layout
12532 \begin_inset Flex Code
12535 \begin_layout Plain Layout
12542 \begin_inset Flex Code
12545 \begin_layout Plain Layout
12552 \begin_inset Flex Code
12555 \begin_layout Plain Layout
12561 , much as in \SpecialChar LaTeX
12563 These counters must all be declared separately.
12564 \begin_inset Newline newline
12568 \begin_inset CommandInset ref
12570 reference "subsec:Counters"
12574 for details on counters.
12577 \begin_layout Description
12578 \begin_inset Flex Code
12581 \begin_layout Plain Layout
12587 The font used for the label.
12589 \begin_inset CommandInset ref
12591 reference "subsec:Font-description"
12598 \begin_layout Description
12599 \begin_inset Flex Code
12602 \begin_layout Plain Layout
12609 \begin_inset Flex Code
12612 \begin_layout Plain Layout
12618 ] Text that indicates how far a label should be indented.
12621 \begin_layout Description
12622 \begin_inset Flex Code
12625 \begin_layout Plain Layout
12632 \begin_inset Flex Code
12635 \begin_layout Plain Layout
12641 ] Text that indicates the amount of horizontal space between the label and
12643 Only used for labels that are not above the text body.
12646 \begin_layout Description
12647 \begin_inset Flex Code
12650 \begin_layout Plain Layout
12657 \begin_inset Flex Code
12660 \begin_layout Plain Layout
12666 ] The string used for the label.
12668 \begin_inset Flex Code
12671 \begin_layout Plain Layout
12677 is set, this string can be contain the special formatting commands described
12679 \begin_inset CommandInset ref
12681 reference "subsec:Counters"
12688 \begin_layout Description
12689 \begin_inset Flex Code
12692 \begin_layout Plain Layout
12693 LabelStringAppendix
12699 \begin_inset Flex Code
12702 \begin_layout Plain Layout
12708 ] This is used inside the appendix instead of
12709 \begin_inset Newline newline
12713 \begin_inset Flex Code
12716 \begin_layout Plain Layout
12724 \begin_inset Flex Code
12727 \begin_layout Plain Layout
12734 \begin_inset Newline newline
12738 \begin_inset Flex Code
12741 \begin_layout Plain Layout
12742 LabelStringAppendix
12750 \begin_layout Description
12751 \begin_inset Flex Code
12754 \begin_layout Plain Layout
12760 [FIXME] (Used only with XML-type formats.)
12763 \begin_layout Description
12764 \begin_inset Flex Code
12767 \begin_layout Plain Layout
12774 \begin_inset Flex Code
12777 \begin_layout Plain Layout
12782 , Manual, Static, Above,
12783 \begin_inset Newline newline
12786 Centered, Sensitive, Enumerate,
12787 \begin_inset Newline newline
12790 Itemize, Bibliography
12796 \begin_inset Separator parbreak
12803 \begin_layout Description
12804 \begin_inset Flex Code
12807 \begin_layout Plain Layout
12813 means the label is the very first word (up to the first real blank).
12814 Use protected spaces if you want more than one word as the label.
12818 \begin_layout Description
12819 \begin_inset Flex Code
12822 \begin_layout Plain Layout
12828 means the label is simply what is declared as
12829 \begin_inset Flex Code
12832 \begin_layout Plain Layout
12839 This will be displayed
12840 \begin_inset Quotes eld
12844 \begin_inset Quotes erd
12847 , at the beginning of the paragraph.
12849 \begin_inset Flex Code
12852 \begin_layout Plain Layout
12859 \begin_inset Flex Code
12862 \begin_layout Plain Layout
12868 , then it will be displayed only in the first paragraph of any sequence
12869 of paragraphs with the same
12870 \begin_inset Flex Code
12873 \begin_layout Plain Layout
12882 \begin_layout Description
12883 \begin_inset Flex Code
12886 \begin_layout Plain Layout
12893 \begin_inset space ~
12897 \begin_inset space ~
12901 \begin_inset Flex Code
12904 \begin_layout Plain Layout
12910 are special cases of
12911 \begin_inset Flex Code
12914 \begin_layout Plain Layout
12921 The label will be printed above the paragraph either at the beginning of
12922 the line or centered.
12925 \begin_layout Description
12926 \begin_inset Flex Code
12929 \begin_layout Plain Layout
12935 is a special case for the caption-labels
12936 \begin_inset Quotes eld
12940 \begin_inset Quotes erd
12944 \begin_inset Quotes eld
12948 \begin_inset Quotes erd
12952 \begin_inset Newline newline
12956 \begin_inset Flex Code
12959 \begin_layout Plain Layout
12965 means the (hardcoded) label string depends on the kind of float: It is
12966 hardcoded to be `FloatType N', where N is the value of the counter associated
12968 For the case that a caption is inserted outside of a float the
12969 \begin_inset Flex Code
12972 \begin_layout Plain Layout
12979 \begin_inset Quotes eld
12983 \begin_inset Quotes erd
12989 \begin_layout Description
12990 \begin_inset Flex Code
12993 \begin_layout Plain Layout
12999 produces the usual sort of enumeration labels.
13000 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13001 small Roman numerals, and uppercase letters for the four possible depths.
13004 \begin_layout Description
13005 \begin_inset Flex Code
13008 \begin_layout Plain Layout
13014 produces various bullets at the different levels.
13015 It is also hardcoded.
13018 \begin_layout Description
13019 \begin_inset Flex Code
13022 \begin_layout Plain Layout
13028 should be used only with
13029 \begin_inset Flex Code
13032 \begin_layout Plain Layout
13033 LatexType BibEnvironment
13042 \begin_layout Description
13043 \begin_inset Flex Code
13046 \begin_layout Plain Layout
13052 Note that this will completely override any prior
13053 \begin_inset Flex Code
13056 \begin_layout Plain Layout
13062 declaration for this style.
13064 \begin_inset Quotes eld
13068 \begin_inset Flex Code
13071 \begin_layout Plain Layout
13078 \begin_inset Quotes erd
13083 \begin_inset CommandInset ref
13085 reference "subsec:I18n"
13089 for details on its use.
13092 \begin_layout Description
13093 \begin_inset Flex Code
13096 \begin_layout Plain Layout
13103 \begin_inset Flex Code
13106 \begin_layout Plain Layout
13112 ] The name of the corresponding \SpecialChar LaTeX
13114 Either the environment or command name.
13117 \begin_layout Description
13118 \begin_inset Flex Code
13121 \begin_layout Plain Layout
13128 \begin_inset Flex Code
13131 \begin_layout Plain Layout
13137 ] An optional parameter for the corresponding
13138 \begin_inset Flex Code
13141 \begin_layout Plain Layout
13148 This parameter cannot be changed from within \SpecialChar LyX
13150 \begin_inset Flex Code
13153 \begin_layout Plain Layout
13159 for customizable parameters).
13160 This will be output as is after all \SpecialChar LaTeX
13162 \begin_inset Flex Code
13165 \begin_layout Plain Layout
13174 \begin_layout Description
13175 \begin_inset Flex Code
13178 \begin_layout Plain Layout
13185 \begin_inset Flex Code
13188 \begin_layout Plain Layout
13193 , Command, Environment, Item_Environment,
13194 \begin_inset Newline newline
13197 List_Environment, Bib_Environment
13202 ] How the style should be translated into \SpecialChar LaTeX
13207 \begin_layout Plain Layout
13208 \begin_inset Flex Code
13211 \begin_layout Plain Layout
13217 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13218 Visit the SGML class files for specific examples.
13224 \begin_inset Separator parbreak
13231 \begin_layout Description
13232 \begin_inset Flex Code
13235 \begin_layout Plain Layout
13241 means nothing special.
13244 \begin_layout Description
13245 \begin_inset Flex Code
13248 \begin_layout Plain Layout
13255 \begin_inset Flex Code
13258 \begin_layout Plain Layout
13265 {\SpecialChar ldots
13274 \begin_layout Description
13275 \begin_inset Flex Code
13278 \begin_layout Plain Layout
13285 \begin_inset Flex Code
13288 \begin_layout Plain Layout
13295 }\SpecialChar ldots
13311 \begin_layout Description
13312 \begin_inset Flex Code
13315 \begin_layout Plain Layout
13322 \begin_inset Flex Code
13325 \begin_layout Plain Layout
13332 \begin_inset Flex Code
13335 \begin_layout Plain Layout
13343 is generated for each paragraph of this environment.
13347 \begin_layout Description
13348 \begin_inset Flex Code
13351 \begin_layout Plain Layout
13358 \begin_inset Flex Code
13361 \begin_layout Plain Layout
13368 \begin_inset Newline newline
13372 \begin_inset Flex Code
13375 \begin_layout Plain Layout
13381 is passed as an argument to the environment.
13382 \begin_inset Newline newline
13386 \begin_inset Flex Code
13389 \begin_layout Plain Layout
13395 can be defined in the
13396 \begin_inset Flex Noun
13399 \begin_layout Plain Layout
13400 Edit\SpecialChar menuseparator
13402 \begin_inset space ~
13413 \begin_layout Description
13414 \begin_inset Flex Code
13417 \begin_layout Plain Layout
13424 \begin_inset Flex Code
13427 \begin_layout Plain Layout
13433 but adds additionally the necessary mandatory argument (the longest label)
13434 to the begin statement of the bibliography environment:
13435 \begin_inset Newline newline
13439 \begin_inset Flex Code
13442 \begin_layout Plain Layout
13445 begin{thebibliography}{99}
13450 It is therefore only useful for bibliography environments.
13451 The default longest label
13452 \begin_inset Quotes eld
13456 \begin_inset Quotes erd
13459 can be changed by the user in the paragraph settings of a bibliography
13463 \begin_layout Standard
13464 Putting the last few things together, the \SpecialChar LaTeX
13465 output will be either:
13468 \begin_layout LyX-Code
13471 LatexName[LatexParam]{\SpecialChar ldots
13475 \begin_layout Standard
13479 \begin_layout LyX-Code
13482 begin{LatexName}[LatexParam] \SpecialChar ldots
13488 \begin_layout Standard
13489 depending upon the \SpecialChar LaTeX
13494 \begin_layout Description
13495 \begin_inset Flex Code
13498 \begin_layout Plain Layout
13505 \begin_inset Flex Code
13508 \begin_layout Plain Layout
13514 ] A string that is put at the beginning of the style content.
13515 A line break in the output can be indicated by
13516 \begin_inset Flex Code
13519 \begin_layout Plain Layout
13528 \begin_layout Description
13529 \begin_inset Flex Code
13532 \begin_layout Plain Layout
13539 \begin_inset Flex Code
13542 \begin_layout Plain Layout
13548 ] If you put styles into environments, the different
13549 \begin_inset Flex Code
13552 \begin_layout Plain Layout
13558 are not simply added, but added with a factor
13559 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13563 Note that this parameter is also used when
13564 \begin_inset Flex Code
13567 \begin_layout Plain Layout
13574 \begin_inset Flex Code
13577 \begin_layout Plain Layout
13584 \begin_inset Flex Code
13587 \begin_layout Plain Layout
13594 Then it is added to the manual or dynamic margin.
13595 \begin_inset Newline newline
13599 \begin_inset Quotes eld
13603 \begin_inset Flex Code
13606 \begin_layout Plain Layout
13613 \begin_inset Quotes erd
13616 means that the paragraph is indented with the width of
13617 \begin_inset Quotes eld
13621 \begin_inset Flex Code
13624 \begin_layout Plain Layout
13631 \begin_inset Quotes erd
13634 in the normal font.
13635 You can get a negative width by prefixing the string with
13636 \begin_inset Quotes eld
13640 \begin_inset Flex Code
13643 \begin_layout Plain Layout
13650 \begin_inset Quotes erd
13654 This way was chosen so that the look is the same with each used screen
13658 \begin_layout Description
13659 \begin_inset Flex Code
13662 \begin_layout Plain Layout
13669 \begin_inset Flex Code
13672 \begin_layout Plain Layout
13677 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13683 \begin_inset Newline newline
13686 The kind of margin that the style has on the left side.
13687 \begin_inset Separator parbreak
13694 \begin_layout Description
13695 \begin_inset Flex Code
13698 \begin_layout Plain Layout
13704 just means a fixed margin.
13707 \begin_layout Description
13708 \begin_inset Flex Code
13711 \begin_layout Plain Layout
13717 means that the left margin depends on the string entered in the
13718 \begin_inset Flex Noun
13721 \begin_layout Plain Layout
13722 Edit\SpecialChar menuseparator
13724 \begin_inset space ~
13733 This is used to typeset nice lists without tabulators.
13736 \begin_layout Description
13737 \begin_inset Flex Code
13740 \begin_layout Plain Layout
13746 means that the margin depends on the size of the label.
13747 This is used for automatic enumerated headlines.
13748 It is obvious that the headline
13749 \begin_inset Quotes eld
13752 5.4.3.2.1 Very long headline
13753 \begin_inset Quotes erd
13756 must have a wider left margin (as wide as
13757 \begin_inset Quotes eld
13761 \begin_inset Quotes erd
13764 plus the space) than
13765 \begin_inset Quotes eld
13768 3.2 Very long headline
13769 \begin_inset Quotes erd
13773 \begin_inset Quotes eld
13777 \begin_inset Quotes erd
13780 are not able to do this.
13783 \begin_layout Description
13784 \begin_inset Flex Code
13787 \begin_layout Plain Layout
13793 is similar, but only the very first row of the paragraph is dynamic, while
13794 the others are static; this is used, for example, for descriptions.
13797 \begin_layout Description
13798 \begin_inset Flex Code
13801 \begin_layout Plain Layout
13807 means the margin is chosen in a way that the longest row of this paragraph
13808 fits to the right margin.
13809 This is used to typeset an address on the right edge of the page.
13813 \begin_layout Description
13814 \begin_inset Flex Code
13817 \begin_layout Plain Layout
13824 \begin_inset Flex Code
13827 \begin_layout Plain Layout
13836 \begin_inset space \thinspace{}
13840 \begin_inset Flex Code
13843 \begin_layout Plain Layout
13849 ] Whether fragile commands in this style should be
13850 \begin_inset Flex Code
13853 \begin_layout Plain Layout
13866 whether this command should itself be protected.)
13869 \begin_layout Description
13870 \begin_inset Flex Code
13873 \begin_layout Plain Layout
13880 \begin_inset Flex Code
13883 \begin_layout Plain Layout
13890 \begin_inset space \thinspace{}
13894 \begin_inset Flex Code
13897 \begin_layout Plain Layout
13905 ] Whether newlines are translated into \SpecialChar LaTeX
13907 \begin_inset Flex Code
13910 \begin_layout Plain Layout
13921 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
13923 inside \SpecialChar LyX
13927 \begin_layout Description
13928 \begin_inset Flex Code
13931 \begin_layout Plain Layout
13938 \begin_inset Flex Code
13941 \begin_layout Plain Layout
13950 \begin_inset space \thinspace{}
13954 \begin_inset Flex Code
13957 \begin_layout Plain Layout
13963 ] If set to true, and if
13964 \begin_inset Flex Code
13967 \begin_layout Plain Layout
13974 \begin_inset Flex Code
13977 \begin_layout Plain Layout
13983 ) paragraphs are being indented, then the indentation of such a paragraph
13984 following one of this type will be suppressed.
13985 (So this will not affect the display of non-default paragraphs.)
13988 \begin_layout Description
13989 \begin_inset Flex Code
13992 \begin_layout Plain Layout
13999 \begin_inset Flex Code
14002 \begin_layout Plain Layout
14008 ] Name of a style that has replaced this style.
14009 This is used to rename a style, while keeping backward compatibility.
14012 \begin_layout Description
14013 \begin_inset Flex Code
14016 \begin_layout Plain Layout
14023 \begin_inset Flex Code
14026 \begin_layout Plain Layout
14033 \begin_inset space \thinspace{}
14037 \begin_inset Flex Code
14040 \begin_layout Plain Layout
14046 ] Determines whether consecutive pragraphs of the same type are treated
14047 as belonging together.
14048 This has the effect that the
14049 \begin_inset Flex Code
14052 \begin_layout Plain Layout
14058 is only printed once before such a group.
14059 By default, this is true for
14060 \begin_inset Flex Code
14063 \begin_layout Plain Layout
14070 \begin_inset Flex Code
14073 \begin_layout Plain Layout
14080 \begin_inset Flex Code
14083 \begin_layout Plain Layout
14089 and false for all other types.
14092 \begin_layout Description
14093 \begin_inset Flex Code
14096 \begin_layout Plain Layout
14103 \begin_inset Flex Code
14106 \begin_layout Plain Layout
14115 \begin_inset space \thinspace{}
14119 \begin_inset Flex Code
14122 \begin_layout Plain Layout
14128 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14130 but only by a line break; together with
14131 \begin_inset Flex Code
14134 \begin_layout Plain Layout
14140 , this allows to emulate a plain text editor (like the ERT inset).
14143 \begin_layout Description
14144 \begin_inset Flex Code
14147 \begin_layout Plain Layout
14154 \begin_inset Flex Code
14157 \begin_layout Plain Layout
14163 ] The indent of the very first line of a paragraph.
14165 \begin_inset Newline newline
14169 \begin_inset Flex Code
14172 \begin_layout Plain Layout
14178 will be fixed for a certain style.
14179 The exception is the default style, since the indentation for these paragraphs
14180 can be prohibited with
14181 \begin_inset Flex Code
14184 \begin_layout Plain Layout
14192 \begin_inset Flex Code
14195 \begin_layout Plain Layout
14201 style paragraphs inside environments use the
14202 \begin_inset Flex Code
14205 \begin_layout Plain Layout
14211 of the environment, not their native one.
14213 \begin_inset Flex Code
14216 \begin_layout Plain Layout
14222 paragraphs inside an enumeration are not indented.
14225 \begin_layout Description
14226 \begin_inset Flex Code
14229 \begin_layout Plain Layout
14236 \begin_inset Flex Code
14239 \begin_layout Plain Layout
14245 ] The vertical space between two paragraphs of this style.
14248 \begin_layout Description
14249 \begin_inset Flex Code
14252 \begin_layout Plain Layout
14259 \begin_inset Flex Code
14262 \begin_layout Plain Layout
14269 allows the user to choose either
14270 \begin_inset Quotes eld
14274 \begin_inset Quotes erd
14278 \begin_inset Quotes eld
14282 \begin_inset Quotes erd
14285 to separate paragraphs.
14287 \begin_inset Quotes eld
14291 \begin_inset Quotes erd
14295 \begin_inset Flex Code
14298 \begin_layout Plain Layout
14306 \begin_inset Quotes eld
14310 \begin_inset Quotes erd
14314 \begin_inset Flex Code
14317 \begin_layout Plain Layout
14323 is ignored and all paragraphs are separated by the
14324 \begin_inset Flex Code
14327 \begin_layout Plain Layout
14334 The vertical space is calculated with
14335 \begin_inset Flex Code
14338 \begin_layout Plain Layout
14340 \begin_inset space ~
14349 \begin_inset Flex Code
14352 \begin_layout Plain Layout
14358 is the height of a row with the normal font.
14359 This way, the look stays the same with different screen fonts.
14362 \begin_layout Description
14363 \begin_inset Flex Code
14366 \begin_layout Plain Layout
14373 \begin_inset Flex Code
14376 \begin_layout Plain Layout
14385 \begin_inset space \thinspace{}
14389 \begin_inset Flex Code
14392 \begin_layout Plain Layout
14398 ] Whether the contents of this paragraph should be output in raw form, meaning
14399 without special translations that \SpecialChar LaTeX
14403 \begin_layout Description
14404 \begin_inset Flex Code
14407 \begin_layout Plain Layout
14414 \begin_inset Flex Code
14417 \begin_layout Plain Layout
14427 Defines individual characters that should be output in raw form, meaning
14428 without special translations that \SpecialChar LaTeX
14432 \begin_layout Description
14433 \begin_inset Flex Code
14436 \begin_layout Plain Layout
14442 Information to be included in the \SpecialChar LaTeX
14443 preamble when this style is used.
14444 Used to define macros, load packages, etc., required by this particular
14447 \begin_inset Quotes eld
14451 \begin_inset Flex Code
14454 \begin_layout Plain Layout
14461 \begin_inset Quotes erd
14467 \begin_layout Description
14468 \begin_inset Flex Code
14471 \begin_layout Plain Layout
14478 \begin_inset Flex Code
14481 \begin_layout Plain Layout
14487 ] The prefix to use when creating labels referring to paragraphs of this
14489 This allows the use of formatted references.
14492 \begin_layout Description
14493 \begin_inset Flex Code
14496 \begin_layout Plain Layout
14503 \begin_inset Flex Code
14506 \begin_layout Plain Layout
14512 ] Whether the style requires the feature
14513 \begin_inset Flex Code
14516 \begin_layout Plain Layout
14523 \begin_inset CommandInset ref
14525 reference "chap:List-of-functions"
14529 for the list of features).
14530 If you require a package with specific options, you can additionally use
14532 \begin_inset Flex Code
14535 \begin_layout Plain Layout
14541 as a general text class parameter (see
14542 \begin_inset CommandInset ref
14544 reference "subsec:General-text-class"
14551 \begin_layout Description
14552 \begin_inset Flex Code
14555 \begin_layout Plain Layout
14562 \begin_inset Flex Code
14565 \begin_layout Plain Layout
14574 \begin_inset Flex Code
14577 \begin_layout Plain Layout
14583 ] Resets the \SpecialChar LaTeX
14584 arguments of this style (as defined via the
14585 \begin_inset Flex Code
14588 \begin_layout Plain Layout
14595 This is useful if you have copied a style via
14596 \begin_inset Flex Code
14599 \begin_layout Plain Layout
14605 , but you do not want to inherit its (required and optional) arguments.
14608 \begin_layout Description
14609 \begin_inset Flex Code
14612 \begin_layout Plain Layout
14619 \begin_inset Flex Code
14622 \begin_layout Plain Layout
14628 ] A string that is put at the end of the layout content.
14629 A line break in the output can be indicated by
14630 \begin_inset Flex Code
14633 \begin_layout Plain Layout
14642 \begin_layout Description
14643 \begin_inset Flex Code
14646 \begin_layout Plain Layout
14653 \begin_inset Flex Code
14656 \begin_layout Plain Layout
14663 \begin_inset Flex Code
14666 \begin_layout Plain Layout
14675 \begin_layout Description
14676 \begin_inset Flex Code
14679 \begin_layout Plain Layout
14686 \begin_inset Flex Code
14689 \begin_layout Plain Layout
14698 \begin_inset Flex Code
14701 \begin_layout Plain Layout
14708 \begin_inset Flex Code
14711 \begin_layout Plain Layout
14718 \begin_inset Flex Code
14721 \begin_layout Plain Layout
14723 \begin_inset space ~
14731 ] This defines what the default spacing should be in the style.
14733 \begin_inset Flex Code
14736 \begin_layout Plain Layout
14743 \begin_inset Flex Code
14746 \begin_layout Plain Layout
14753 \begin_inset Flex Code
14756 \begin_layout Plain Layout
14762 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14763 If you specify the argument
14764 \begin_inset Flex Code
14767 \begin_layout Plain Layout
14773 , then you must also provide a value argument which will be the actual multiplie
14775 Note that, contrary to other parameters,
14776 \begin_inset Flex Code
14779 \begin_layout Plain Layout
14785 implies the generation of specific \SpecialChar LaTeX
14786 code, using the \SpecialChar LaTeX
14790 \begin_inset Flex Code
14793 \begin_layout Plain Layout
14802 \begin_layout Description
14803 \begin_inset Flex Code
14806 \begin_layout Plain Layout
14813 \begin_inset Flex Code
14816 \begin_layout Plain Layout
14823 \begin_inset space \thinspace{}
14827 \begin_inset Flex Code
14830 \begin_layout Plain Layout
14838 ] Allow spell-checking paragraphs of this style.
14842 \begin_layout Description
14843 \begin_inset Flex Code
14846 \begin_layout Plain Layout
14852 The font used for the text body .
14854 \begin_inset CommandInset ref
14856 reference "subsec:Font-description"
14863 \begin_layout Description
14864 \begin_inset Flex Code
14867 \begin_layout Plain Layout
14876 \begin_inset Flex Code
14879 \begin_layout Plain Layout
14889 The level of the style in the table of contents.
14890 This is used for automatic numbering of section headings.
14893 \begin_layout Description
14894 \begin_inset Flex Code
14897 \begin_layout Plain Layout
14906 \begin_inset Flex Code
14909 \begin_layout Plain Layout
14920 \begin_inset Flex Code
14923 \begin_layout Plain Layout
14930 \begin_inset Flex Code
14933 \begin_layout Plain Layout
14939 ] This tag determines whether the first line indentation of this paragraph
14940 can be toggled via the Paragraph settings dialog.
14944 \begin_inset Flex Code
14947 \begin_layout Plain Layout
14957 is set, indentation can be toggled if the document settings use
14958 \begin_inset Quotes eld
14962 \begin_inset Quotes erd
14965 paragraph style, with
14966 \begin_inset Flex Code
14969 \begin_layout Plain Layout
14975 , indentation can always be toggled, notwithstanding the document settings,
14977 \begin_inset Flex Code
14980 \begin_layout Plain Layout
14986 , indentation can never be toggled.
14989 \begin_layout Description
14990 \begin_inset Flex Code
14993 \begin_layout Plain Layout
15000 \begin_inset Flex Code
15003 \begin_layout Plain Layout
15009 ] The vertical space with which the very first of a chain of paragraphs
15010 with this style is separated from the previous paragraph.
15011 If the previous paragraph has another style, the separations are not simply
15012 added, but the maximum is taken.
15015 \begin_layout Subsection
15016 \begin_inset CommandInset label
15022 Internationalization of Paragraph Styles
15025 \begin_layout Standard
15027 has long supported internationalization of layout information, but, until
15028 version 2.0, this applied only to the user interface and not to, say, PDF
15030 Thus, French authors were forced to resort to ugly hacks if they wanted
15035 1' instead of `Theorem 1'.
15036 Thanks to Georg Baum, that is no longer the case.
15039 \begin_layout Standard
15041 \begin_inset Flex Code
15044 \begin_layout Plain Layout
15050 defines text that is to appear in the typeset document, it may use
15051 \begin_inset Flex Code
15054 \begin_layout Plain Layout
15061 \begin_inset Flex Code
15064 \begin_layout Plain Layout
15070 to support non-English and even multi-language documents correctly.
15071 The following excerpt (from the
15072 \begin_inset Flex Code
15075 \begin_layout Plain Layout
15081 file) shows how this works:
15084 \begin_layout LyX-Code
15086 \begin_inset Separator parbreak
15093 \begin_layout LyX-Code
15096 theoremstyle{remark}
15099 \begin_layout LyX-Code
15102 newtheorem{claim}[thm]{
15109 \begin_layout LyX-Code
15113 \begin_layout LyX-Code
15117 \begin_layout LyX-Code
15122 claimname}{_(Claim)}
15125 \begin_layout LyX-Code
15129 \begin_layout LyX-Code
15133 \begin_layout LyX-Code
15142 claimname}{_(Claim)}}
15145 \begin_layout LyX-Code
15150 \begin_layout Standard
15151 In principle, any legal \SpecialChar LaTeX
15153 \begin_inset Flex Code
15156 \begin_layout Plain Layout
15163 \begin_inset Flex Code
15166 \begin_layout Plain Layout
15172 tags, but in practice they will typically look as they do here.
15173 The key to correct translation of the typeset text is the definition of
15174 the \SpecialChar LaTeX
15176 \begin_inset Flex Code
15179 \begin_layout Plain Layout
15188 \begin_inset Flex Code
15191 \begin_layout Plain Layout
15203 \begin_layout Standard
15205 \begin_inset Flex Code
15208 \begin_layout Plain Layout
15214 tag provides for internationalization based upon the overall language of
15216 The contents of the tag will be included in the preamble, just as with
15218 \begin_inset Flex Code
15221 \begin_layout Plain Layout
15228 What makes it special is the use of the
15229 \begin_inset Quotes eld
15233 \begin_inset Quotes erd
15237 \begin_inset Flex Code
15240 \begin_layout Plain Layout
15246 , which will be replaced, when \SpecialChar LyX
15247 produces \SpecialChar LaTeX
15248 output, with the translation of
15249 its argument into the document language.
15252 \begin_layout Standard
15254 \begin_inset Flex Code
15257 \begin_layout Plain Layout
15263 tag is more complex, since it is meant to provide support for multi-language
15264 documents and so offers an interface to the
15265 \begin_inset Flex Code
15268 \begin_layout Plain Layout
15275 Its contents will be added to the preamble once for each language that
15276 appears in the document.
15277 In this case, the argument to
15278 \begin_inset Flex Code
15281 \begin_layout Plain Layout
15287 will be replaced with its translation into the language in question; the
15289 \begin_inset Flex Code
15292 \begin_layout Plain Layout
15298 is replaced by the language name (as used by the babel package).
15301 \begin_layout Standard
15302 A German document that also included a French section would thus have the
15303 following in the preamble:
15306 \begin_layout LyX-Code
15315 claimname}{Affirmation}}
15316 \begin_inset Newline newline
15327 claimname}{Behauptung}}
15328 \begin_inset Newline newline
15335 claimname}{Behauptung}
15338 \begin_layout Standard
15341 \begin_inset Flex Code
15344 \begin_layout Plain Layout
15350 will then conspire to produce the correct text in the output.
15353 \begin_layout Standard
15354 One important point to note here is that the translations are provided by
15356 itself, through the file
15357 \begin_inset Flex Code
15360 \begin_layout Plain Layout
15367 This means, in effect, that
15368 \begin_inset Flex Code
15371 \begin_layout Plain Layout
15378 \begin_inset Flex Code
15381 \begin_layout Plain Layout
15387 are really only of use in layout files that are provided with \SpecialChar LyX
15389 entered in user-created layout files will not be seen by \SpecialChar LyX
15390 's internationalizatio
15391 n routines unless the
15392 \begin_inset Flex Code
15395 \begin_layout Plain Layout
15401 file is modified accordingly.
15402 That said, however, any layout created with the intention that it will
15403 be included with \SpecialChar LyX
15404 should use these tags where appropriate.
15405 Please note that the paragraph style translations provided by \SpecialChar LyX
15407 change with a minor update (e.
15408 \begin_inset space \thinspace{}
15412 \begin_inset space \space{}
15415 from version 2.1.x to 2.1.y).
15416 It is however quite likely that a major update (e.
15417 \begin_inset space \thinspace{}
15421 \begin_inset space \space{}
15424 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15427 \begin_layout Subsection
15429 \begin_inset CommandInset label
15431 name "subsec:Floats"
15438 \begin_layout Standard
15439 It is necessary to define the floats (
15440 \begin_inset Flex Noun
15443 \begin_layout Plain Layout
15450 \begin_inset Flex Noun
15453 \begin_layout Plain Layout
15459 , \SpecialChar ldots
15460 ) in the text class itself.
15461 Standard floats are included in the file
15462 \begin_inset Flex Code
15465 \begin_layout Plain Layout
15471 , so you may have to do no more than add
15474 \begin_layout LyX-Code
15475 Input stdfloats.inc
15478 \begin_layout Standard
15479 to your layout file.
15480 If you want to implement a text class that proposes some other float types
15481 (like the AGU class bundled with \SpecialChar LyX
15482 ), the information below will hopefully
15486 \begin_layout Description
15487 \begin_inset Flex Code
15490 \begin_layout Plain Layout
15497 \begin_inset Flex Code
15500 \begin_layout Plain Layout
15506 =!htbpH] Allowed placement options for this float type.
15507 The value is a string of placement characters.
15508 Possible characters include:
15513 \begin_inset Quotes eld
15517 \begin_inset Quotes erd
15525 \begin_inset Quotes eld
15529 \begin_inset Quotes erd
15537 \begin_inset Quotes eld
15541 \begin_inset Quotes erd
15549 \begin_inset Quotes eld
15553 \begin_inset Quotes erd
15561 \begin_inset Quotes eld
15565 \begin_inset Quotes erd
15573 \begin_inset Quotes eld
15577 \begin_inset Quotes erd
15581 The order of the characters in the string does not matter.
15582 If no placement options are allowed, use the string
15589 \begin_layout Description
15590 \begin_inset Flex Code
15593 \begin_layout Plain Layout
15600 \begin_inset Flex Code
15603 \begin_layout Plain Layout
15612 \begin_inset space \thinspace{}
15618 \begin_inset Flex Code
15621 \begin_layout Plain Layout
15631 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15638 \begin_inset Flex Code
15641 \begin_layout Plain Layout
15647 if the float does not support this feature.
15650 \begin_layout Description
15651 \begin_inset Flex Code
15654 \begin_layout Plain Layout
15661 \begin_inset Flex Code
15664 \begin_layout Plain Layout
15673 \begin_inset space \thinspace{}
15679 \begin_inset Flex Code
15682 \begin_layout Plain Layout
15692 ] Defines whether the float has a starred variant that spans columns in
15693 a two column paragraph.
15695 \begin_inset Flex Code
15698 \begin_layout Plain Layout
15704 if the float does not support this feature.
15707 \begin_layout Description
15708 \begin_inset Flex Code
15711 \begin_layout Plain Layout
15718 \begin_inset Flex Code
15721 \begin_layout Plain Layout
15728 \begin_inset Quotes erd
15732 \begin_inset Quotes erd
15735 ] The file name extension of an auxiliary file for the list of figures (or
15738 writes the captions to this file.
15741 \begin_layout Description
15742 \begin_inset Flex Code
15745 \begin_layout Plain Layout
15752 \begin_inset Flex Code
15755 \begin_layout Plain Layout
15762 \begin_inset Quotes erd
15766 \begin_inset Quotes erd
15769 ] The string that will be used in the menus and also for the caption.
15770 This is translated to the current language if babel is used.
15773 \begin_layout Description
15774 \begin_inset Flex Code
15777 \begin_layout Plain Layout
15783 These tags control the XHTML output.
15785 \begin_inset CommandInset ref
15787 reference "sec:Tags-for-XHTML"
15794 \begin_layout Description
15795 \begin_inset Flex Code
15798 \begin_layout Plain Layout
15807 \begin_inset Flex Code
15810 \begin_layout Plain Layout
15819 \begin_inset space \thinspace{}
15823 \begin_inset Flex Code
15826 \begin_layout Plain Layout
15832 ] Indicates whether the float is already defined in the document class or
15833 if instead the \SpecialChar LaTeX
15835 \begin_inset Flex Code
15838 \begin_layout Plain Layout
15844 needs to be loaded to define it on-the-fly.
15846 \begin_inset Flex Code
15849 \begin_layout Plain Layout
15856 \begin_inset Flex Code
15859 \begin_layout Plain Layout
15866 It should be set to
15867 \begin_inset Flex Code
15870 \begin_layout Plain Layout
15876 if the float is already defined by the \SpecialChar LaTeX
15880 \begin_layout Description
15881 \begin_inset Flex Code
15884 \begin_layout Plain Layout
15891 \begin_inset Flex Code
15894 \begin_layout Plain Layout
15901 \begin_inset Quotes erd
15905 \begin_inset Quotes erd
15908 ] The command used to generate a list of floats of this type; the leading
15917 \begin_inset Flex Code
15920 \begin_layout Plain Layout
15926 is false, since there is no standard way to generate this command.
15928 \begin_inset Flex Code
15931 \begin_layout Plain Layout
15937 is true, since in that case there is a standard way to define the command.
15940 \begin_layout Description
15941 \begin_inset Flex Code
15944 \begin_layout Plain Layout
15951 \begin_inset Flex Code
15954 \begin_layout Plain Layout
15961 \begin_inset Quotes erd
15965 \begin_inset Quotes erd
15968 ] A title for a list of floats of this kind (list of figures, tables, or
15970 It is used for the screen label within \SpecialChar LyX
15971 , it is used by \SpecialChar LaTeX
15973 it is used as the title in the XHTML output.
15974 It will be translated to the document language.
15977 \begin_layout Description
15978 \begin_inset Flex Code
15981 \begin_layout Plain Layout
15988 \begin_inset Flex Code
15991 \begin_layout Plain Layout
15998 \begin_inset Quotes erd
16002 \begin_inset Quotes erd
16005 ] This (optional) argument determines whether floats of this class will
16006 be numbered within some sectional unit of the document.
16008 \begin_inset Flex Code
16011 \begin_layout Plain Layout
16018 \begin_inset Quotes eld
16022 \begin_inset Flex Code
16025 \begin_layout Plain Layout
16032 \begin_inset Quotes erd
16035 , the floats will be numbered within chapters.
16039 \begin_layout Description
16040 \begin_inset Flex Code
16043 \begin_layout Plain Layout
16050 \begin_inset Flex Code
16053 \begin_layout Plain Layout
16060 \begin_inset Quotes erd
16064 \begin_inset Quotes erd
16067 ] The default placement for the given class of floats.
16068 The string should be as in standard \SpecialChar LaTeX
16070 \begin_inset Flex Code
16073 \begin_layout Plain Layout
16080 \begin_inset Flex Code
16083 \begin_layout Plain Layout
16090 \begin_inset Flex Code
16093 \begin_layout Plain Layout
16100 \begin_inset Flex Code
16103 \begin_layout Plain Layout
16109 for top, bottom, page, and here, respectively.
16113 \begin_layout Plain Layout
16114 Note that the order of these letters in the string is irrelevant, like in
16121 On top of that there is a new type,
16122 \begin_inset Flex Code
16125 \begin_layout Plain Layout
16131 , which does not really correspond to a float, since it means: put it
16132 \begin_inset Quotes eld
16136 \begin_inset Quotes erd
16140 Note however that the
16141 \begin_inset Flex Code
16144 \begin_layout Plain Layout
16150 specifier is special and, because of implementation details, cannot be
16151 used in non-built in float types.
16152 If you do not understand what this means, just use
16153 \begin_inset Quotes eld
16157 \begin_inset Flex Code
16160 \begin_layout Plain Layout
16167 \begin_inset Quotes erd
16173 \begin_layout Description
16174 \begin_inset Flex Code
16177 \begin_layout Plain Layout
16184 \begin_inset Flex Code
16187 \begin_layout Plain Layout
16193 ] The prefix to use when creating labels referring to floats of this type.
16194 This allows the use of formatted references.
16195 Note that you can remove any
16196 \begin_inset Flex Code
16199 \begin_layout Plain Layout
16205 set by a copied style by using the special value
16206 \begin_inset Quotes eld
16210 \begin_inset Quotes erd
16213 , which must be all caps.
16216 \begin_layout Description
16217 \begin_inset Flex Code
16220 \begin_layout Plain Layout
16227 \begin_inset Flex Code
16230 \begin_layout Plain Layout
16237 \begin_inset Quotes erd
16241 \begin_inset Quotes erd
16244 ] The style used when defining the float using
16245 \begin_inset Flex Code
16248 \begin_layout Plain Layout
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
16288 \begin_inset Quotes eld
16292 \begin_inset Quotes erd
16295 of the new class of floats, like program or algorithm.
16296 After the appropriate
16297 \begin_inset Flex Code
16300 \begin_layout Plain Layout
16309 \begin_inset Flex Code
16312 \begin_layout Plain Layout
16321 \begin_inset Flex Code
16324 \begin_layout Plain Layout
16335 \begin_layout Description
16336 \begin_inset Flex Code
16339 \begin_layout Plain Layout
16346 \begin_inset Flex Code
16349 \begin_layout Plain Layout
16356 \begin_inset space \thinspace{}
16360 \begin_inset Flex Code
16363 \begin_layout Plain Layout
16371 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16373 \begin_inset Flex Code
16376 \begin_layout Plain Layout
16382 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16386 \begin_layout Standard
16387 Note that defining a float with type
16388 \begin_inset Flex Code
16391 \begin_layout Plain Layout
16399 automatically defines the corresponding counter with name
16400 \begin_inset Flex Code
16403 \begin_layout Plain Layout
16414 \begin_layout Subsection
16415 Flex insets and InsetLayout
16416 \begin_inset CommandInset label
16418 name "subsec:Flex-insets-and"
16425 \begin_layout Standard
16426 Flex insets come in three different kinds:
16429 \begin_layout Itemize
16431 \begin_inset Flex Code
16434 \begin_layout Plain Layout
16440 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16442 \begin_inset Flex Code
16445 \begin_layout Plain Layout
16454 \begin_inset Flex Code
16457 \begin_layout Plain Layout
16468 \begin_layout Itemize
16470 \begin_inset Flex Code
16473 \begin_layout Plain Layout
16479 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16481 footnote, and the like.
16482 An obvious example is an endnote inset, which is defined in the
16483 \begin_inset Flex Code
16486 \begin_layout Plain Layout
16495 \begin_layout Itemize
16497 \begin_inset Flex Code
16500 \begin_layout Plain Layout
16506 ): For use with DocBook classes.
16509 \begin_layout Standard
16510 Flex insets are defined using the
16511 \begin_inset Flex Code
16514 \begin_layout Plain Layout
16520 tag, which shall be explained in a moment.
16523 \begin_layout Standard
16525 \begin_inset Flex Code
16528 \begin_layout Plain Layout
16534 tag also serves another function: It can be used to customize the general
16535 layout of many different types of insets.
16537 \begin_inset Flex Code
16540 \begin_layout Plain Layout
16546 can be used to customize the layout parameters for footnotes, marginal
16547 notes, note insets, \SpecialChar TeX
16548 code (ERT) insets, branches, listings, indexes, boxes,
16549 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16552 \begin_layout Standard
16554 \begin_inset Flex Code
16557 \begin_layout Plain Layout
16563 definition must begin with a line of the form:
16566 \begin_layout LyX-Code
16570 \begin_layout Standard
16572 \begin_inset Flex Code
16575 \begin_layout Plain Layout
16581 indicates the inset whose layout is being defined, and here there are four
16585 \begin_layout Enumerate
16586 The layout for a pre-existing inset is being modified.
16587 In this case, can be
16588 \begin_inset Flex Code
16591 \begin_layout Plain Layout
16597 any one of the following:
16598 \begin_inset Flex Code
16601 \begin_layout Plain Layout
16608 \begin_inset Flex Code
16611 \begin_layout Plain Layout
16618 \begin_inset Flex Code
16621 \begin_layout Plain Layout
16628 \begin_inset Flex Code
16631 \begin_layout Plain Layout
16638 \begin_inset Flex Code
16641 \begin_layout Plain Layout
16648 \begin_inset Flex Code
16651 \begin_layout Plain Layout
16658 \begin_inset Flex Code
16661 \begin_layout Plain Layout
16668 \begin_inset Flex Code
16671 \begin_layout Plain Layout
16678 \begin_inset Flex Code
16681 \begin_layout Plain Layout
16688 \begin_inset Flex Code
16691 \begin_layout Plain Layout
16698 \begin_inset Flex Code
16701 \begin_layout Plain Layout
16708 \begin_inset Flex Code
16711 \begin_layout Plain Layout
16718 \begin_inset Flex Code
16721 \begin_layout Plain Layout
16728 \begin_inset Flex Code
16731 \begin_layout Plain Layout
16738 \begin_inset Flex Code
16741 \begin_layout Plain Layout
16748 \begin_inset Flex Code
16751 \begin_layout Plain Layout
16758 \begin_inset Flex Code
16761 \begin_layout Plain Layout
16768 \begin_inset Flex Code
16771 \begin_layout Plain Layout
16778 \begin_inset Flex Code
16781 \begin_layout Plain Layout
16788 \begin_inset Flex Code
16791 \begin_layout Plain Layout
16800 \begin_layout Enumerate
16801 The layout for a Flex inset is being defined.
16803 \begin_inset Flex Code
16806 \begin_layout Plain Layout
16812 must be of the form
16813 \begin_inset Quotes eld
16817 \begin_inset Flex Code
16820 \begin_layout Plain Layout
16827 \begin_inset Quotes erd
16831 \begin_inset Flex Code
16834 \begin_layout Plain Layout
16840 may be be any valid identifier not used by a pre-existing Flex inset.
16841 The identifier may include spaces, but in that case the whole thing must
16842 be wrapped in quotes.
16843 Note that the definition of a flex inset
16848 \begin_inset Flex Code
16851 \begin_layout Plain Layout
16857 entry, declaring which type of inset it defines.
16860 \begin_layout Enumerate
16861 The layout for user specific branch is being defined.
16863 \begin_inset Flex Code
16866 \begin_layout Plain Layout
16872 must be of the form
16873 \begin_inset Quotes eld
16877 \begin_inset Flex Code
16880 \begin_layout Plain Layout
16887 \begin_inset Quotes erd
16891 \begin_inset Flex Code
16894 \begin_layout Plain Layout
16900 may be be any valid identifier of branch defined in user's document.
16901 The identifier may include spaces, but in that case the whole thing must
16902 be wrapped in quotes.
16903 The main purpose of this feature is to allow \SpecialChar LaTeX
16904 wrapping around specific
16905 branches as user needs.
16908 \begin_layout Enumerate
16909 The layout of a user (or class) specific caption is being defined.
16911 \begin_inset Flex Code
16914 \begin_layout Plain Layout
16920 must be of the form
16921 \begin_inset Quotes eld
16925 \begin_inset Flex Code
16928 \begin_layout Plain Layout
16935 \begin_inset Quotes erd
16939 \begin_inset Flex Code
16942 \begin_layout Plain Layout
16948 specifies the name of the caption as it appears in the menu.
16949 Have a look at the standard caption (
16950 \begin_inset Flex Code
16953 \begin_layout Plain Layout
16959 ), the specific captions of the KOMA-Script classes (
16960 \begin_inset Flex Code
16963 \begin_layout Plain Layout
16970 \begin_inset Flex Code
16973 \begin_layout Plain Layout
16982 \begin_inset space ~
16988 \begin_inset Flex Code
16991 \begin_layout Plain Layout
16997 ) for applications.
17000 \begin_layout Standard
17002 \begin_inset Flex Code
17005 \begin_layout Plain Layout
17011 definition can contain the following entries:
17014 \begin_layout Description
17015 \begin_inset Flex Code
17018 \begin_layout Plain Layout
17025 \begin_inset Flex Code
17028 \begin_layout Plain Layout
17034 ] Defines argument number of a command\SpecialChar breakableslash
17035 environment associated with the current
17037 The definition must end with
17038 \begin_inset Flex Code
17041 \begin_layout Plain Layout
17049 \begin_inset CommandInset ref
17051 reference "subsec:Paragraph-Styles"
17058 \begin_layout Description
17059 \begin_inset Flex Code
17062 \begin_layout Plain Layout
17068 Preamble for changing language commands; see
17069 \begin_inset CommandInset ref
17071 reference "subsec:I18n"
17078 \begin_layout Description
17079 \begin_inset Flex Code
17082 \begin_layout Plain Layout
17089 \begin_inset Flex Code
17092 \begin_layout Plain Layout
17098 ] The color for the inset's background.
17100 \begin_inset CommandInset ref
17102 reference "chap:Names-of-colors"
17106 for a list of the available color names.
17109 \begin_layout Description
17110 \begin_inset Flex Code
17113 \begin_layout Plain Layout
17120 \begin_inset Flex Code
17123 \begin_layout Plain Layout
17132 \begin_inset space \thinspace{}
17136 \begin_inset Flex Code
17139 \begin_layout Plain Layout
17145 ] Whether to use the content of the inset as the label, when the inset is
17150 \begin_layout Description
17151 \begin_inset Flex Code
17154 \begin_layout Plain Layout
17161 \begin_inset Flex Code
17164 \begin_layout Plain Layout
17170 ] As with paragraph styles, see
17171 \begin_inset CommandInset ref
17173 reference "subsec:Paragraph-Styles"
17178 Note that you need to specify the complete type, e.
17179 \begin_inset space \thinspace{}
17183 \begin_inset space ~
17187 \begin_inset Flex Code
17190 \begin_layout Plain Layout
17191 CopyStyle Flex:<name>
17199 \begin_layout Description
17200 \begin_inset Flex Code
17203 \begin_layout Plain Layout
17210 \begin_inset Flex Code
17213 \begin_layout Plain Layout
17222 \begin_inset space \thinspace{}
17226 \begin_inset Flex Code
17229 \begin_layout Plain Layout
17235 ] Indicates whether the user may employ the Paragraph Settings dialog to
17236 customize the paragraph.
17239 \begin_layout Description
17240 \begin_inset Flex Code
17243 \begin_layout Plain Layout
17250 \begin_inset Flex Code
17253 \begin_layout Plain Layout
17260 \begin_inset Flex Code
17263 \begin_layout Plain Layout
17270 \begin_inset Flex Code
17273 \begin_layout Plain Layout
17279 , describing the rendering style used for the inset's frame and buttons.
17280 Footnotes generally use
17281 \begin_inset Flex Code
17284 \begin_layout Plain Layout
17290 , ERT insets generally
17291 \begin_inset Flex Code
17294 \begin_layout Plain Layout
17300 , and character styles
17301 \begin_inset Flex Code
17304 \begin_layout Plain Layout
17313 \begin_layout Description
17314 \begin_inset Flex Code
17317 \begin_layout Plain Layout
17324 \begin_inset Flex Code
17327 \begin_layout Plain Layout
17336 \begin_inset space \thinspace{}
17342 \begin_inset Flex Code
17345 \begin_layout Plain Layout
17354 \begin_inset Flex Code
17357 \begin_layout Plain Layout
17364 \begin_inset Flex Code
17367 \begin_layout Plain Layout
17374 Indicates whether the environment will stand on its own in the output or
17375 will appear inline with the surrounding text.
17376 If set to false, it is supposed that the \SpecialChar LaTeX
17377 environment ignores white space
17378 (including one newline character) after the
17379 \begin_inset Flex Code
17382 \begin_layout Plain Layout
17395 \begin_inset Flex Code
17398 \begin_layout Plain Layout
17414 \begin_layout Description
17415 \begin_inset Flex Code
17418 \begin_layout Plain Layout
17424 Required at the end of the
17425 \begin_inset Flex Code
17428 \begin_layout Plain Layout
17437 \begin_layout Description
17438 \begin_inset Flex Code
17441 \begin_layout Plain Layout
17447 The font used for both the text body
17453 \begin_inset CommandInset ref
17455 reference "subsec:Font-description"
17460 Note that defining this font automatically defines the
17461 \begin_inset Flex Code
17464 \begin_layout Plain Layout
17470 to the same value, so define this first and define
17471 \begin_inset Flex Code
17474 \begin_layout Plain Layout
17480 later if you want them to be different.
17483 \begin_layout Description
17484 \begin_inset Flex Code
17487 \begin_layout Plain Layout
17488 FixedWidthPreambleEncoding
17494 \begin_inset Flex Code
17497 \begin_layout Plain Layout
17506 \begin_inset space \thinspace{}
17510 \begin_inset Flex Code
17513 \begin_layout Plain Layout
17519 ] Force a fixed width encoding for the translated contents of
17520 \begin_inset Flex Code
17523 \begin_layout Plain Layout
17530 \begin_inset Flex Code
17533 \begin_layout Plain Layout
17539 code generated by this layout.
17540 This is needed for special \SpecialChar LaTeX
17545 that do not work with variable width encodings such as
17550 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17551 backends such as Xe\SpecialChar TeX
17553 Lua\SpecialChar TeX
17557 \begin_layout Description
17558 \begin_inset Flex Code
17561 \begin_layout Plain Layout
17562 ForceLocalFontSwitch
17568 \begin_inset Flex Code
17571 \begin_layout Plain Layout
17580 \begin_inset space \thinspace{}
17584 \begin_inset Flex Code
17587 \begin_layout Plain Layout
17593 ] When using babel, always use a local font switch (
17594 \begin_inset Flex Code
17597 \begin_layout Plain Layout
17605 ), never a global one (such as
17606 \begin_inset Flex Code
17609 \begin_layout Plain Layout
17620 \begin_layout Description
17621 \begin_inset Flex Code
17624 \begin_layout Plain Layout
17631 \begin_inset Flex Code
17634 \begin_layout Plain Layout
17643 \begin_inset space \thinspace{}
17647 \begin_inset Flex Code
17650 \begin_layout Plain Layout
17657 \begin_inset Quotes eld
17661 \begin_inset Quotes erd
17664 language, leading to Left-to-Right (Latin) output, e.
17665 \begin_inset space \thinspace{}
17669 \begin_inset space \space{}
17672 in \SpecialChar TeX
17677 \begin_layout Description
17678 \begin_inset Flex Code
17681 \begin_layout Plain Layout
17688 \begin_inset Flex Code
17691 \begin_layout Plain Layout
17700 \begin_inset space \thinspace{}
17704 \begin_inset Flex Code
17707 \begin_layout Plain Layout
17713 ] Force a a line break in the \SpecialChar LaTeX
17714 output before the inset starts and after
17716 This assures the inset itself is output on its own lines, for parsing purposes.
17719 \begin_layout Description
17720 \begin_inset Flex Code
17723 \begin_layout Plain Layout
17730 \begin_inset Flex Code
17733 \begin_layout Plain Layout
17742 \begin_inset space \thinspace{}
17746 \begin_inset Flex Code
17749 \begin_layout Plain Layout
17755 ] Indicates whether the
17756 \begin_inset Flex Code
17759 \begin_layout Plain Layout
17765 should be used or, instead, the user can change the paragraph style used
17770 \begin_layout Description
17771 \begin_inset Flex Code
17774 \begin_layout Plain Layout
17781 \begin_inset Flex Code
17784 \begin_layout Plain Layout
17793 \begin_inset space \thinspace{}
17797 \begin_inset Flex Code
17800 \begin_layout Plain Layout
17806 ] As with paragraph styles, see
17807 \begin_inset CommandInset ref
17809 reference "subsec:Paragraph-Styles"
17816 \begin_layout Description
17817 \begin_inset Flex Code
17820 \begin_layout Plain Layout
17826 These tags control the XHTML output.
17828 \begin_inset CommandInset ref
17830 reference "sec:Tags-for-XHTML"
17837 \begin_layout Description
17838 \begin_inset Flex Code
17841 \begin_layout Plain Layout
17848 \begin_inset Flex Code
17851 \begin_layout Plain Layout
17860 \begin_inset space \thinspace{}
17864 \begin_inset Flex Code
17867 \begin_layout Plain Layout
17873 ] Whether to include the contents of this inset in the strings generated
17874 for the `Outline' pane.
17875 One would not, for example, want the content of a footnote in a section
17876 header to be included in the TOC displayed in the outline, but one would
17877 normally want the content of a character style displayed.
17878 Default is false: not to include.
17881 \begin_layout Description
17882 \begin_inset Flex Code
17885 \begin_layout Plain Layout
17894 \begin_inset Flex Code
17897 \begin_layout Plain Layout
17906 \begin_inset space \thinspace{}
17910 \begin_inset Flex Code
17913 \begin_layout Plain Layout
17919 ] As with paragraph styles, see
17920 \begin_inset CommandInset ref
17922 reference "subsec:Paragraph-Styles"
17929 \begin_layout Description
17930 \begin_inset Flex Code
17933 \begin_layout Plain Layout
17939 The font used for the label.
17941 \begin_inset CommandInset ref
17943 reference "subsec:Font-description"
17948 Note that this definition can never appear before
17949 \begin_inset Flex Code
17952 \begin_layout Plain Layout
17958 , lest it be ineffective.
17961 \begin_layout Description
17962 \begin_inset Flex Code
17965 \begin_layout Plain Layout
17972 \begin_inset Flex Code
17975 \begin_layout Plain Layout
17982 \begin_inset Quotes erd
17986 \begin_inset Quotes erd
17989 ] What will be displayed on the button or elsewhere as the inset label.
17991 \begin_inset Flex Code
17994 \begin_layout Plain Layout
18002 \begin_inset Flex Code
18005 \begin_layout Plain Layout
18011 ) modify this label on the fly.
18014 \begin_layout Description
18015 \begin_inset Flex Code
18018 \begin_layout Plain Layout
18024 Language dependent preamble; see
18025 \begin_inset CommandInset ref
18027 reference "subsec:I18n"
18034 \begin_layout Description
18035 \begin_inset Flex Code
18038 \begin_layout Plain Layout
18045 \begin_inset Flex Code
18048 \begin_layout Plain Layout
18054 ] The name of the corresponding \SpecialChar LaTeX
18056 Either the environment or command name.
18059 \begin_layout Description
18060 \begin_inset Flex Code
18063 \begin_layout Plain Layout
18070 \begin_inset Flex Code
18073 \begin_layout Plain Layout
18079 ] The optional parameter for the corresponding
18080 \begin_inset Flex Code
18083 \begin_layout Plain Layout
18089 stuff, including possible bracket pairs like
18090 \begin_inset Flex Code
18093 \begin_layout Plain Layout
18100 This parameter cannot be changed from within \SpecialChar LyX
18102 \begin_inset Flex Code
18105 \begin_layout Plain Layout
18111 for customizable parameters).
18112 It will be output as is after all \SpecialChar LaTeX
18114 \begin_inset Flex Code
18117 \begin_layout Plain Layout
18126 \begin_layout Description
18127 \begin_inset Flex Code
18130 \begin_layout Plain Layout
18137 \begin_inset Flex Code
18140 \begin_layout Plain Layout
18141 Command, Environment, None
18146 ] How the style should be translated into \SpecialChar LaTeX
18151 \begin_layout Plain Layout
18152 \begin_inset Flex Code
18155 \begin_layout Plain Layout
18161 is perhaps a bit misleading, since these rules apply to SGML classes too.
18162 Visit the SGML class files for specific examples.
18168 \begin_inset Separator parbreak
18175 \begin_layout Description
18176 \begin_inset Flex Code
18179 \begin_layout Plain Layout
18185 means nothing special
18188 \begin_layout Description
18189 \begin_inset Flex Code
18192 \begin_layout Plain Layout
18199 \begin_inset Flex Code
18202 \begin_layout Plain Layout
18209 {\SpecialChar ldots
18218 \begin_layout Description
18219 \begin_inset Flex Code
18222 \begin_layout Plain Layout
18229 \begin_inset Flex Code
18232 \begin_layout Plain Layout
18239 }\SpecialChar ldots
18254 \begin_layout Standard
18255 Putting the last few things together, the \SpecialChar LaTeX
18256 output will be either:
18259 \begin_layout LyX-Code
18262 LatexName[LatexParam]{\SpecialChar ldots
18266 \begin_layout Standard
18270 \begin_layout LyX-Code
18273 begin{LatexName}[LatexParam] \SpecialChar ldots
18279 \begin_layout Standard
18280 depending upon the \SpecialChar LaTeX
18285 \begin_layout Description
18286 \begin_inset Flex Code
18289 \begin_layout Plain Layout
18296 \begin_inset Flex Code
18299 \begin_layout Plain Layout
18305 ] A string that is put at the beginning of the layout content.
18306 A line break in the output can be indicated by
18307 \begin_inset Flex Code
18310 \begin_layout Plain Layout
18319 \begin_layout Description
18320 \begin_inset Flex Code
18323 \begin_layout Plain Layout
18330 \begin_inset Flex Code
18333 \begin_layout Plain Layout
18340 \begin_inset Flex Code
18343 \begin_layout Plain Layout
18350 \begin_inset Flex Code
18353 \begin_layout Plain Layout
18360 \begin_inset Flex Code
18363 \begin_layout Plain Layout
18369 (indicating a dummy definition ending definitions of charstyles, etc).
18370 This entry is required in and is only meaningful for Flex insets.
18371 Among other things, it determines on which menu this inset will appear.
18373 \begin_inset Flex Code
18376 \begin_layout Plain Layout
18383 \begin_inset Flex Code
18386 \begin_layout Plain Layout
18392 will automatically set
18393 \begin_inset Flex Code
18396 \begin_layout Plain Layout
18404 \begin_inset Flex Code
18407 \begin_layout Plain Layout
18413 can be set to true for
18414 \begin_inset Flex Code
18417 \begin_layout Plain Layout
18423 insets by setting it
18428 \begin_inset Flex Code
18431 \begin_layout Plain Layout
18440 \begin_layout Description
18441 \begin_inset Flex Code
18444 \begin_layout Plain Layout
18451 \begin_inset Flex Code
18454 \begin_layout Plain Layout
18463 \begin_inset space \thinspace{}
18467 \begin_inset Flex Code
18470 \begin_layout Plain Layout
18476 ] Whether multiple paragraphs are permitted in this inset.
18478 \begin_inset Flex Code
18481 \begin_layout Plain Layout
18487 to the same value and
18488 \begin_inset Flex Code
18491 \begin_layout Plain Layout
18497 to the opposite value.
18498 These can be reset to other values, if they are used
18503 \begin_inset Flex Code
18506 \begin_layout Plain Layout
18516 \begin_layout Description
18517 \begin_inset Flex Code
18520 \begin_layout Plain Layout
18527 \begin_inset Flex Code
18530 \begin_layout Plain Layout
18539 \begin_inset space \thinspace{}
18543 \begin_inset Flex Code
18546 \begin_layout Plain Layout
18552 ] Whether fragile commands in this inset should be
18553 \begin_inset Flex Code
18556 \begin_layout Plain Layout
18569 whether the command should itself be protected.) Default is false.
18572 \begin_layout Description
18573 \begin_inset Flex Code
18576 \begin_layout Plain Layout
18583 \begin_inset Flex Code
18586 \begin_layout Plain Layout
18592 ] Deletes an existing
18593 \begin_inset Flex Code
18596 \begin_layout Plain Layout
18605 \begin_layout Description
18606 \begin_inset Flex Code
18609 \begin_layout Plain Layout
18616 \begin_inset Flex Code
18619 \begin_layout Plain Layout
18626 \begin_inset Flex Code
18629 \begin_layout Plain Layout
18635 that has replaced this
18636 \begin_inset Flex Code
18639 \begin_layout Plain Layout
18646 This is used to rename an
18647 \begin_inset Flex Code
18650 \begin_layout Plain Layout
18656 , while keeping backward compatibility.
18659 \begin_layout Description
18660 \begin_inset Flex Code
18663 \begin_layout Plain Layout
18670 \begin_inset Flex Code
18673 \begin_layout Plain Layout
18682 \begin_inset space \thinspace{}
18686 \begin_inset Flex Code
18689 \begin_layout Plain Layout
18695 ] As with paragraph styles, see
18696 \begin_inset CommandInset ref
18698 reference "subsec:Paragraph-Styles"
18706 \begin_layout Description
18707 \begin_inset Flex Code
18710 \begin_layout Plain Layout
18717 \begin_inset Flex Code
18720 \begin_layout Plain Layout
18729 \begin_inset space \thinspace{}
18733 \begin_inset Flex Code
18736 \begin_layout Plain Layout
18742 ] As with paragraph styles, see
18743 \begin_inset CommandInset ref
18745 reference "subsec:Paragraph-Styles"
18753 \begin_layout Description
18754 \begin_inset Flex Code
18757 \begin_layout Plain Layout
18763 As with paragraph styles, see
18764 \begin_inset CommandInset ref
18766 reference "subsec:Paragraph-Styles"
18773 \begin_layout Description
18774 \begin_inset Flex Code
18777 \begin_layout Plain Layout
18784 \begin_inset Flex Code
18787 \begin_layout Plain Layout
18793 ] The prefix to use when creating labels referring to insets of this type.
18794 This allows the use of formatted references.
18797 \begin_layout Description
18798 \begin_inset Flex Code
18801 \begin_layout Plain Layout
18808 \begin_inset Flex Code
18811 \begin_layout Plain Layout
18817 ] As with paragraph styles, see
18818 \begin_inset CommandInset ref
18820 reference "subsec:Paragraph-Styles"
18827 \begin_layout Description
18828 \begin_inset Flex Code
18831 \begin_layout Plain Layout
18838 \begin_inset Flex Code
18841 \begin_layout Plain Layout
18850 \begin_inset space \thinspace{}
18854 \begin_inset Flex Code
18857 \begin_layout Plain Layout
18863 ] Resets the \SpecialChar LaTeX
18864 arguments of this layout (as defined via the
18865 \begin_inset Flex Code
18868 \begin_layout Plain Layout
18875 This is useful if you have copied a style via
18876 \begin_inset Flex Code
18879 \begin_layout Plain Layout
18885 , but you do not want to inherit its (required and optional) arguments.
18888 \begin_layout Description
18889 \begin_inset Flex Code
18892 \begin_layout Plain Layout
18899 \begin_inset Flex Code
18902 \begin_layout Plain Layout
18909 \begin_inset space \thinspace{}
18913 \begin_inset Flex Code
18916 \begin_layout Plain Layout
18924 ] Whether this inset should use the font of its surrounding environment
18926 Default is false: use the font of the surrounding environment.
18929 \begin_layout Description
18930 \begin_inset Flex Code
18933 \begin_layout Plain Layout
18940 \begin_inset Flex Code
18943 \begin_layout Plain Layout
18949 ] A string that is put at the end of the layout content.
18950 A line break in the output can be indicated by
18951 \begin_inset Flex Code
18954 \begin_layout Plain Layout
18963 \begin_layout Description
18964 \begin_inset Flex Code
18967 \begin_layout Plain Layout
18974 \begin_inset Flex Code
18977 \begin_layout Plain Layout
18984 \begin_inset space \thinspace{}
18988 \begin_inset Flex Code
18991 \begin_layout Plain Layout
18999 ] Allow spell-checking the contents of this inset.
19003 \begin_layout Subsection
19005 \begin_inset CommandInset label
19007 name "subsec:Counters"
19014 \begin_layout Standard
19015 It is necessary to define the counters (
19016 \begin_inset Flex Noun
19019 \begin_layout Plain Layout
19026 \begin_inset Flex Noun
19029 \begin_layout Plain Layout
19035 , \SpecialChar ldots
19036 ) in the text class itself.
19037 The standard counters are defined in the file
19038 \begin_inset Flex Code
19041 \begin_layout Plain Layout
19047 , so you may have to do no more than add
19050 \begin_layout LyX-Code
19051 Input stdcounters.inc
19054 \begin_layout Standard
19055 to your layout file to get them to work.
19056 But if you want to define custom counters, then you can do so.
19057 The counter declaration must begin with:
19060 \begin_layout LyX-Code
19061 Counter CounterName
19064 \begin_layout Standard
19066 \begin_inset Flex Code
19069 \begin_layout Plain Layout
19075 ' is replaced by the name of the counter.
19076 And it must end with
19077 \begin_inset Quotes eld
19081 \begin_inset Flex Code
19084 \begin_layout Plain Layout
19091 \begin_inset Quotes erd
19095 The following parameters can also be used:
19098 \begin_layout Description
19099 \begin_inset Flex Code
19102 \begin_layout Plain Layout
19109 \begin_inset Flex Code
19112 \begin_layout Plain Layout
19118 ] Sets the initial value for the counter, to which it will be reset whenever
19120 Normally, one will want the default, 1.
19123 \begin_layout Description
19124 \begin_inset Flex Code
19127 \begin_layout Plain Layout
19134 \begin_inset Flex Code
19137 \begin_layout Plain Layout
19144 \begin_inset Quotes erd
19148 \begin_inset Quotes erd
19151 ] When defined, this string defines how the counter is displayed.
19152 Setting this value sets
19153 \begin_inset Flex Code
19156 \begin_layout Plain Layout
19157 LabelStringAppendix
19163 The following special constructs can be used in the string:
19164 \begin_inset Separator parbreak
19171 \begin_layout Itemize
19172 \begin_inset Flex Code
19175 \begin_layout Plain Layout
19183 will be replaced by the expansion of the
19184 \begin_inset Flex Code
19187 \begin_layout Plain Layout
19194 \begin_inset Flex Code
19197 \begin_layout Plain Layout
19198 LabelStringAppendix
19204 \begin_inset Flex Code
19207 \begin_layout Plain Layout
19217 \begin_layout Itemize
19218 counter values can be expressed using \SpecialChar LaTeX
19220 \begin_inset Newline newline
19224 \begin_inset Flex Code
19227 \begin_layout Plain Layout
19244 \begin_inset Flex Code
19247 \begin_layout Plain Layout
19259 \begin_layout Plain Layout
19269 Actually, the situation is a bit more complicated: any
19288 other than those described below will produce arabic numerals.
19289 It would not be surprising to see this change in the future.
19295 \begin_inset Flex Code
19298 \begin_layout Plain Layout
19304 : 1, 2, 3,\SpecialChar ldots
19306 \begin_inset Flex Code
19309 \begin_layout Plain Layout
19315 for lower-case letters: a, b, c, \SpecialChar ldots
19317 \begin_inset Flex Code
19320 \begin_layout Plain Layout
19326 for upper-case letters: A, B, C, \SpecialChar ldots
19328 \begin_inset Flex Code
19331 \begin_layout Plain Layout
19337 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19339 \begin_inset Flex Code
19342 \begin_layout Plain Layout
19348 for upper-case roman numerals: I, II, III\SpecialChar ldots
19350 \begin_inset Flex Code
19353 \begin_layout Plain Layout
19359 for hebrew numerals.
19363 \begin_layout Standard
19364 If LabelString is not defined, a default value is constructed as follows:
19365 if the counter has a master counter
19366 \begin_inset Flex Code
19369 \begin_layout Plain Layout
19376 \begin_inset Flex Code
19379 \begin_layout Plain Layout
19386 \begin_inset Newline newline
19390 \begin_inset Flex Code
19393 \begin_layout Plain Layout
19403 is used; otherwise the string
19404 \begin_inset Flex Code
19407 \begin_layout Plain Layout
19418 \begin_layout Description
19419 \begin_inset Flex Code
19422 \begin_layout Plain Layout
19423 LabelStringAppendix
19429 \begin_inset Flex Code
19432 \begin_layout Plain Layout
19439 \begin_inset Quotes erd
19443 \begin_inset Quotes erd
19447 \begin_inset Flex Code
19450 \begin_layout Plain Layout
19456 , but for use in the Appendix.
19459 \begin_layout Description
19460 \begin_inset Flex Code
19463 \begin_layout Plain Layout
19470 \begin_inset Flex Code
19473 \begin_layout Plain Layout
19480 \begin_inset Quotes erd
19484 \begin_inset Quotes erd
19487 ] A format for use with formatted references to this counter.
19488 For example, one might want to have references to section numbers appear
19490 \begin_inset Quotes eld
19494 \begin_inset Quotes erd
19498 The string should contain
19499 \begin_inset Quotes eld
19503 \begin_inset Quotes erd
19507 This will be replaced by the counter number itself.
19508 So, for sections, it would be: Section ##.
19511 \begin_layout Description
19512 \begin_inset Flex Code
19515 \begin_layout Plain Layout
19522 \begin_inset Flex Code
19525 \begin_layout Plain Layout
19532 \begin_inset Quotes erd
19536 \begin_inset Quotes erd
19539 ] If this is set to the name of another counter, the present counter will
19540 be reset every time the other one is increased.
19542 \begin_inset Flex Code
19545 \begin_layout Plain Layout
19552 \begin_inset Flex Code
19555 \begin_layout Plain Layout
19564 \begin_layout Subsection
19566 \begin_inset CommandInset label
19568 name "subsec:Font-description"
19575 \begin_layout Standard
19576 A font description looks like this:
19579 \begin_layout LyX-Code
19593 \begin_layout LyX-Code
19597 \begin_layout LyX-Code
19601 \begin_layout Standard
19602 The following commands are available:
19605 \begin_layout Description
19606 \begin_inset Flex Code
19609 \begin_layout Plain Layout
19616 \begin_inset Flex Code
19619 \begin_layout Plain Layout
19628 \begin_inset Flex Code
19631 \begin_layout Plain Layout
19638 \begin_inset Flex Code
19641 \begin_layout Plain Layout
19648 \begin_inset Flex Code
19651 \begin_layout Plain Layout
19658 \begin_inset Flex Code
19661 \begin_layout Plain Layout
19668 \begin_inset Flex Code
19671 \begin_layout Plain Layout
19678 \begin_inset Flex Code
19681 \begin_layout Plain Layout
19688 \begin_inset Flex Code
19691 \begin_layout Plain Layout
19698 \begin_inset Flex Code
19701 \begin_layout Plain Layout
19710 \begin_layout Description
19711 \begin_inset Flex Code
19714 \begin_layout Plain Layout
19721 \begin_inset Flex Code
19724 \begin_layout Plain Layout
19733 \begin_inset Flex Code
19736 \begin_layout Plain Layout
19743 \begin_inset Flex Code
19746 \begin_layout Plain Layout
19755 \begin_layout Description
19756 \begin_inset Flex Code
19759 \begin_layout Plain Layout
19766 \begin_inset Flex Code
19769 \begin_layout Plain Layout
19775 ] Valid arguments are:
19776 \begin_inset Flex Code
19779 \begin_layout Plain Layout
19786 \begin_inset Flex Code
19789 \begin_layout Plain Layout
19796 \begin_inset Flex Code
19799 \begin_layout Plain Layout
19806 \begin_inset Flex Code
19809 \begin_layout Plain Layout
19816 \begin_inset Flex Code
19819 \begin_layout Plain Layout
19826 \begin_inset Flex Code
19829 \begin_layout Plain Layout
19836 \begin_inset Flex Code
19839 \begin_layout Plain Layout
19846 \begin_inset Flex Code
19849 \begin_layout Plain Layout
19856 \begin_inset Flex Code
19859 \begin_layout Plain Layout
19866 \begin_inset Flex Code
19869 \begin_layout Plain Layout
19876 \begin_inset Flex Code
19879 \begin_layout Plain Layout
19886 \begin_inset Flex Code
19889 \begin_layout Plain Layout
19896 Each of these turns on or off the corresponding attribute.
19898 \begin_inset Flex Code
19901 \begin_layout Plain Layout
19907 turns on emphasis, and
19908 \begin_inset Flex Code
19911 \begin_layout Plain Layout
19919 \begin_inset Newline newline
19922 If the latter seems puzzling, remember that the font settings for the present
19923 context are generally inherited from the surrounding context.
19925 \begin_inset Flex Code
19928 \begin_layout Plain Layout
19934 would turn off the emphasis that was anyway in effect, say, in a theorem
19938 \begin_layout Description
19939 \begin_inset Flex Code
19942 \begin_layout Plain Layout
19949 \begin_inset Flex Code
19952 \begin_layout Plain Layout
19961 \begin_inset Flex Code
19964 \begin_layout Plain Layout
19973 \begin_layout Description
19974 \begin_inset Flex Code
19977 \begin_layout Plain Layout
19984 \begin_inset Flex Code
19987 \begin_layout Plain Layout
19996 \begin_inset Flex Code
19999 \begin_layout Plain Layout
20006 \begin_inset Flex Code
20009 \begin_layout Plain Layout
20016 \begin_inset Flex Code
20019 \begin_layout Plain Layout
20028 \begin_layout Description
20029 \begin_inset Flex Code
20032 \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_inset Flex Code
20074 \begin_layout Plain Layout
20081 \begin_inset Flex Code
20084 \begin_layout Plain Layout
20091 \begin_inset Flex Code
20094 \begin_layout Plain Layout
20101 \begin_inset Flex Code
20104 \begin_layout Plain Layout
20111 \begin_inset Flex Code
20114 \begin_layout Plain Layout
20123 \begin_layout Subsection
20124 \begin_inset CommandInset label
20126 name "subsec:Citation-format-description"
20130 Citation format description
20133 \begin_layout Standard
20135 \begin_inset Flex Code
20138 \begin_layout Plain Layout
20144 blocks are used to describe how bibliographic information should be displayed,
20145 both within \SpecialChar LyX
20146 itself (in the citation dialog and in tooltips, for example)
20147 and in XHTML output.
20148 Such a block might look like this:
20151 \begin_layout LyX-Code
20155 \begin_layout LyX-Code
20159 \begin_layout LyX-Code
20163 \begin_layout LyX-Code
20167 \begin_layout Standard
20168 The individual lines define how the bibliographic information associated
20169 with an article or book, respectively, is to be displayed, and such a definitio
20170 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20173 defines a default format in the source code that will be used if no specific
20174 definition has been given.
20176 predefines several formats in the file
20177 \begin_inset Flex Code
20180 \begin_layout Plain Layout
20186 , which is included in most of \SpecialChar LyX
20187 's document classes.
20190 \begin_layout Standard
20191 The definitions use a simple language that allows Bib\SpecialChar TeX
20192 keys to be replaced
20194 Keys should be enclosed in
20195 \begin_inset Flex Code
20198 \begin_layout Plain Layout
20205 \begin_inset Flex Code
20208 \begin_layout Plain Layout
20215 So a simple definition might look like this:
20218 \begin_layout LyX-Code
20220 \begin_inset Quotes eld
20224 \begin_inset Quotes erd
20230 \begin_layout Standard
20231 This would print the author, followed by a comma, followed by the title,
20232 in quotes, followed by a period.
20235 \begin_layout Standard
20236 Of course, sometimes you may want to print a key only if it exists.
20237 This can be done by using a conditional construction, such as:
20238 \begin_inset Flex Code
20241 \begin_layout Plain Layout
20243 \begin_inset space ~
20253 \begin_inset Flex Code
20256 \begin_layout Plain Layout
20262 key exists, then print
20263 \begin_inset Quotes eld
20267 \begin_inset space ~
20271 \begin_inset Quotes erd
20274 followed by the volume key.
20275 It is also possible to have an else clause in the conditional, such as:
20276 \begin_inset Newline newline
20280 \begin_inset Flex Code
20283 \begin_layout Plain Layout
20284 {%author%[[%author%]][[%editor%, ed.]]}
20290 \begin_inset Newline newline
20294 \begin_inset Flex Code
20297 \begin_layout Plain Layout
20303 key is printed if it exists; otherwise, the editor key is printed, followed
20305 \begin_inset Quotes eld
20309 \begin_inset space ~
20313 \begin_inset Quotes erd
20316 Note that the key is again enclosed in
20317 \begin_inset Flex Code
20320 \begin_layout Plain Layout
20326 signs; the entire conditional is enclosed in braces; and the if and else
20327 clauses are enclosed in double brackets,
20328 \begin_inset Quotes eld
20332 \begin_inset Flex Code
20335 \begin_layout Plain Layout
20342 \begin_inset Quotes eld
20346 \begin_inset Quotes eld
20350 \begin_inset Flex Code
20353 \begin_layout Plain Layout
20360 \begin_inset Quotes erd
20364 There must be no space between any of these.
20367 \begin_layout Standard
20368 There is one other piece of syntax available in definitions, which looks
20370 \begin_inset Flex Code
20373 \begin_layout Plain Layout
20380 This defines a piece of formatting information that is to be used when
20382 \begin_inset Quotes eld
20386 \begin_inset Quotes erd
20390 Obviously, we do not want to output HTML tags when writing plain text,
20391 so they should be wrapped in
20392 \begin_inset Quotes eld
20396 \begin_inset Quotes erd
20400 \begin_inset Quotes eld
20404 \begin_inset Quotes erd
20410 \begin_layout Standard
20411 Two special sorts of definitions are also possible in a
20412 \begin_inset Flex Code
20415 \begin_layout Plain Layout
20422 An example of the first would be:
20425 \begin_layout LyX-Code
20427 \begin_inset Quotes eld
20431 \begin_inset Quotes erd
20437 \begin_layout Standard
20438 This is an abbreviation, or macro, and it can be used by treating it as
20440 \begin_inset Flex Code
20443 \begin_layout Plain Layout
20452 \begin_inset Flex Code
20455 \begin_layout Plain Layout
20461 exactly as it would treat its definition.
20462 So, let us issue the obvious
20470 \begin_layout LyX-Code
20474 \begin_layout Standard
20475 or anything like it.
20477 shouldn't go into an infinite loop, but it may go into a long one before
20481 \begin_layout Standard
20482 The second sort of special definition might look like this:
20485 \begin_layout LyX-Code
20489 \begin_layout Standard
20490 This defines a translatable piece of text, which allows relevant parts of
20491 the bibliography to be translated.
20492 It can be included in a definition by treating it as a key:
20493 \begin_inset Flex Code
20496 \begin_layout Plain Layout
20503 Several of these are predefined in
20504 \begin_inset Flex Code
20507 \begin_layout Plain Layout
20514 Note that these are not macros, in the sense just defined.
20515 They will not be expanded.
20518 \begin_layout Standard
20519 So here then is an example that use all these features:
20520 \begin_inset VSpace defskip
20526 \begin_layout Standard
20530 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20533 \begin_layout Standard
20534 \begin_inset VSpace defskip
20537 This defines a macro that prints the author, followed by a comma, if the
20539 \begin_inset Flex Code
20542 \begin_layout Plain Layout
20548 key is defined, or else prints the name of the editor, followed by the
20550 \begin_inset Flex Code
20553 \begin_layout Plain Layout
20559 or its translation (it is by default
20560 \begin_inset Quotes eld
20564 \begin_inset Quotes erd
20568 \begin_inset Flex Code
20571 \begin_layout Plain Layout
20578 Note that this is in fact defined in
20579 \begin_inset Flex Code
20582 \begin_layout Plain Layout
20588 , so you can use it in your own definitions, or re-definitions, if you load
20592 \begin_layout Section
20593 \begin_inset CommandInset label
20595 name "sec:Tags-for-XHTML"
20599 Tags for XHTML output
20602 \begin_layout Standard
20603 As with \SpecialChar LaTeX
20604 or DocBook, the format of \SpecialChar LyX
20605 's XHTML output is also controlled by
20606 layout information.
20607 In general, \SpecialChar LyX
20608 provides sensible defaults and, as mentioned earlier, it will
20609 even construct default CSS style rules from the other layout tags.
20610 For example, \SpecialChar LyX
20611 will attempt to use the information provided in the
20612 \begin_inset Flex Code
20615 \begin_layout Plain Layout
20621 declaration for the Chapter style to write CSS that will appropriately
20622 format chapter headings.
20625 \begin_layout Standard
20626 In many cases, then, you may not have to do anything at all to get acceptable
20627 XHTML output for your own environments, custom insets, and so forth.
20628 But in some cases you will, and so \SpecialChar LyX
20629 provides a number of layout tags that
20630 can be used to customize the XHTML and CSS that are generated.
20633 \begin_layout Standard
20634 Note that there are two tags,
20635 \begin_inset Flex Code
20638 \begin_layout Plain Layout
20645 \begin_inset Flex Code
20648 \begin_layout Plain Layout
20654 that may appear outside style and inset declarations.
20656 \begin_inset CommandInset ref
20658 reference "subsec:General-text-class"
20662 for details on these.
20665 \begin_layout Subsection
20666 \begin_inset CommandInset label
20668 name "subsec:Paragraph-Style-XHTML"
20675 \begin_layout Standard
20676 The sort of XHTML \SpecialChar LyX
20677 outputs for a paragraph depends upon whether we are dealing
20678 with a normal paragraph, a command, or an environment, where this is itself
20679 determined by the contents of the corresponding
20680 \begin_inset Flex Code
20683 \begin_layout Plain Layout
20694 \begin_layout Standard
20695 For a command or normal paragraph, the output XHTML has the following form:
20698 \begin_layout LyX-Code
20700 \begin_inset Quotes erd
20704 \begin_inset Quotes erd
20710 \begin_layout LyX-Code
20712 \begin_inset Quotes erd
20716 \begin_inset Quotes erd
20722 \begin_layout LyX-Code
20723 Contents of the paragraph.
20726 \begin_layout LyX-Code
20730 \begin_layout Standard
20731 The label tags are of course omitted if the paragraph does not have a label.
20734 \begin_layout Standard
20735 For an environment that is not some sort of list, the XHTML takes this form:
20738 \begin_layout LyX-Code
20740 \begin_inset Quotes erd
20744 \begin_inset Quotes erd
20750 \begin_layout LyX-Code
20752 \begin_inset Quotes erd
20756 \begin_inset Quotes erd
20760 \begin_inset Quotes erd
20764 \begin_inset Quotes erd
20767 >Environment Label</labeltag>First paragraph.</itemtag>
20770 \begin_layout LyX-Code
20771 <itemtag>Second paragraph.</itemtag>
20774 \begin_layout LyX-Code
20778 \begin_layout Standard
20779 Note that the label is output only for the first paragraph, as it should
20780 be for a theorem, for example.
20784 \begin_layout Standard
20785 For a list, we have one of these forms:
20788 \begin_layout LyX-Code
20790 \begin_inset Quotes erd
20794 \begin_inset Quotes erd
20800 \begin_layout LyX-Code
20802 \begin_inset Quotes erd
20806 \begin_inset Quotes erd
20810 \begin_inset Quotes erd
20814 \begin_inset Quotes erd
20817 >List Label</labeltag>First item.</itemtag>
20820 \begin_layout LyX-Code
20822 \begin_inset Quotes erd
20826 \begin_inset Quotes erd
20830 \begin_inset Quotes erd
20834 \begin_inset Quotes erd
20837 >List Label</labeltag>Second item.</itemtag>
20840 \begin_layout LyX-Code
20844 \begin_layout LyX-Code
20848 \begin_layout LyX-Code
20850 \begin_inset Quotes erd
20854 \begin_inset Quotes erd
20860 \begin_layout LyX-Code
20862 \begin_inset Quotes erd
20866 \begin_inset Quotes erd
20869 >List Label</labeltag><itemtag attr=
20870 \begin_inset Quotes erd
20874 \begin_inset Quotes erd
20877 >First item.</itemtag>
20880 \begin_layout LyX-Code
20882 \begin_inset Quotes erd
20886 \begin_inset Quotes erd
20889 >List Label</labeltag><itemtag attr=
20890 \begin_inset Quotes erd
20894 \begin_inset Quotes erd
20897 >Second item.</itemtag>
20900 \begin_layout LyX-Code
20904 \begin_layout Standard
20905 Note the different orders of
20906 \begin_inset Flex Code
20909 \begin_layout Plain Layout
20916 \begin_inset Flex Code
20919 \begin_layout Plain Layout
20926 Which order we get depends upon the setting of
20927 \begin_inset Flex Code
20930 \begin_layout Plain Layout
20937 \begin_inset Flex Code
20940 \begin_layout Plain Layout
20946 is false (the default), you get the first of these, with the label within
20947 the item; if true, you get the second, with the label outside the item.
20950 \begin_layout Standard
20951 The specific tags and attributes output for each paragraph type can be controlle
20952 d by means of the layout tags we are about to describe.
20953 As mentioned earlier, however, \SpecialChar LyX
20954 uses sensible defaults for many of these,
20955 so you often may not need to do very much to get good XHTML output.
20956 Think of the available tags as there so you can tweak things to your liking.
20959 \begin_layout Description
20960 \begin_inset Flex Code
20963 \begin_layout Plain Layout
20970 \begin_inset Flex Code
20973 \begin_layout Plain Layout
20979 ] Specifies attribute information to be output with the main tag.
20981 \begin_inset Quotes eld
20985 \begin_inset Flex Code
20988 \begin_layout Plain Layout
20995 \begin_inset Quotes erd
20999 By default, \SpecialChar LyX
21001 \begin_inset Quotes eld
21005 \begin_inset Flex Code
21008 \begin_layout Plain Layout
21015 \begin_inset Quotes erd
21019 \begin_inset Flex Code
21022 \begin_layout Plain Layout
21028 is the \SpecialChar LyX
21029 name of the layout, made lowercase, for example: chapter.
21034 contain any style information.
21036 \begin_inset Flex Code
21039 \begin_layout Plain Layout
21048 \begin_layout Description
21049 \begin_inset Flex Code
21052 \begin_layout Plain Layout
21059 \begin_inset Flex Code
21062 \begin_layout Plain Layout
21072 ] Whether to output the default CSS information \SpecialChar LyX
21073 generates for this layout,
21074 even if additional information is explicitly provided via
21075 \begin_inset Flex Code
21078 \begin_layout Plain Layout
21086 \begin_inset Flex Code
21089 \begin_layout Plain Layout
21095 allows you to alter or augment the generated CSS, rather than to override
21098 \begin_inset Flex Code
21101 \begin_layout Plain Layout
21110 \begin_layout Description
21111 \begin_inset Flex Code
21114 \begin_layout Plain Layout
21121 \begin_inset Flex Code
21124 \begin_layout Plain Layout
21130 ] The tag to be used for individual paragraphs of environments, replacing
21132 \begin_inset Flex Code
21135 \begin_layout Plain Layout
21141 in the examples above.
21143 \begin_inset Flex Code
21146 \begin_layout Plain Layout
21155 \begin_layout Description
21156 \begin_inset Flex Code
21159 \begin_layout Plain Layout
21166 \begin_inset Flex Code
21169 \begin_layout Plain Layout
21175 ] Attributes for the item tag.
21177 \begin_inset Quotes eld
21181 \begin_inset Flex Code
21184 \begin_layout Plain Layout
21185 class=`layoutname_item'
21191 \begin_inset Quotes erd
21199 contain any style information.
21201 \begin_inset Flex Code
21204 \begin_layout Plain Layout
21213 \begin_layout Description
21214 \begin_inset Flex Code
21217 \begin_layout Plain Layout
21224 \begin_inset Flex Code
21227 \begin_layout Plain Layout
21233 ] The tag to be used for paragraph and item labels, replacing
21234 \begin_inset Flex Code
21237 \begin_layout Plain Layout
21243 in the examples above.
21245 \begin_inset Flex Code
21248 \begin_layout Plain Layout
21255 \begin_inset Flex Code
21258 \begin_layout Plain Layout
21265 \begin_inset Flex Code
21268 \begin_layout Plain Layout
21275 \begin_inset Flex Code
21278 \begin_layout Plain Layout
21279 Centered_Top_Environment
21284 , in which case it defaults to
21285 \begin_inset Flex Code
21288 \begin_layout Plain Layout
21297 \begin_layout Description
21298 \begin_inset Flex Code
21301 \begin_layout Plain Layout
21308 \begin_inset Flex Code
21311 \begin_layout Plain Layout
21317 ] Attributes for the label tag.
21319 \begin_inset Quotes eld
21323 \begin_inset Flex Code
21326 \begin_layout Plain Layout
21327 class=`layoutname_label'
21333 \begin_inset Quotes erd
21341 contain any style information.
21343 \begin_inset Flex Code
21346 \begin_layout Plain Layout
21355 \begin_layout Description
21356 \begin_inset Flex Code
21359 \begin_layout Plain Layout
21366 \begin_inset Flex Code
21369 \begin_layout Plain Layout
21379 ] Meaningful only for list-like environments, this tag controls whether
21380 the label tag is output before or inside the item tag.
21381 This is used, for example, in the description environment, where we want
21383 \begin_inset Flex Code
21386 \begin_layout Plain Layout
21387 <dt>\SpecialChar ldots
21388 </dt><dd>\SpecialChar ldots
21396 \begin_inset Flex Code
21399 \begin_layout Plain Layout
21405 : The label tag is output inside the item tag.
21408 \begin_layout Description
21409 \begin_inset Flex Code
21412 \begin_layout Plain Layout
21418 Information to be output in the
21419 \begin_inset Flex Code
21422 \begin_layout Plain Layout
21428 section when this style is used.
21429 This might, for example, be used to include a
21430 \begin_inset Flex Code
21433 \begin_layout Plain Layout
21440 \begin_inset Flex Code
21443 \begin_layout Plain Layout
21452 \begin_layout Description
21453 \begin_inset Flex Code
21456 \begin_layout Plain Layout
21462 CSS style information to be included when this style is used.
21463 Note that this will automatically be wrapped in a layout-generated
21464 \begin_inset Flex Code
21467 \begin_layout Plain Layout
21473 block, so only the CSS itself need be included.
21475 \begin_inset Flex Code
21478 \begin_layout Plain Layout
21487 \begin_layout Description
21488 \begin_inset Flex Code
21491 \begin_layout Plain Layout
21498 \begin_inset Flex Code
21501 \begin_layout Plain Layout
21507 ] The tag to be used for the main label, replacing
21508 \begin_inset Flex Code
21511 \begin_layout Plain Layout
21517 in the examples above.
21519 \begin_inset Flex Code
21522 \begin_layout Plain Layout
21531 \begin_layout Description
21532 \begin_inset Flex Code
21535 \begin_layout Plain Layout
21542 \begin_inset Flex Code
21545 \begin_layout Plain Layout
21555 ] Marks this style as the one to be used to generate the
21556 \begin_inset Flex Code
21559 \begin_layout Plain Layout
21565 tag for the XHTML file.
21566 By default, it is false.
21568 \begin_inset Flex Code
21571 \begin_layout Plain Layout
21577 file sets it to true for the
21578 \begin_inset Flex Code
21581 \begin_layout Plain Layout
21591 \begin_layout Subsection
21595 \begin_layout Standard
21596 The XHTML output of insets can also be controlled by information in layout
21601 \begin_layout Plain Layout
21602 At present, this is true only for
21603 \begin_inset Quotes eld
21607 \begin_inset Quotes erd
21610 insets (insets you can type into) and is not true for
21611 \begin_inset Quotes eld
21615 \begin_inset Quotes erd
21618 insets (insets that are associated with dialog boxes).
21623 Here, too, \SpecialChar LyX
21624 tries to provide sensible defaults, and it constructs default
21626 But everything can be customized.
21629 \begin_layout Standard
21630 The XHTML \SpecialChar LyX
21631 outputs for an inset has the following form:
21634 \begin_layout LyX-Code
21636 \begin_inset Quotes erd
21640 \begin_inset Quotes erd
21646 \begin_layout LyX-Code
21647 <labeltag>Label</labeltag>
21650 \begin_layout LyX-Code
21652 \begin_inset Quotes erd
21656 \begin_inset Quotes erd
21659 >Contents of the inset.</innertag>
21662 \begin_layout LyX-Code
21666 \begin_layout Standard
21667 If the inset permits multiple paragraphs—that is, if
21668 \begin_inset Flex Code
21671 \begin_layout Plain Layout
21677 is true—then the contents of the inset will itself be output as paragraphs
21678 formatted according to the styles used for those paragraphs (standard,
21679 quote, and the like).
21680 The label tag is of course omitted if the paragraph does not have a label
21681 and, at present, is always
21682 \begin_inset Flex Code
21685 \begin_layout Plain Layout
21692 The inner tag is optional and, by default, does not appear.
21695 \begin_layout Standard
21696 The specific tags and attributes output for each inset can be controlled
21697 by means of the following layout tags.
21700 \begin_layout Description
21701 \begin_inset Flex Code
21704 \begin_layout Plain Layout
21711 \begin_inset Flex Code
21714 \begin_layout Plain Layout
21720 ] Specifies attribute information to be output with the main tag.
21722 \begin_inset Quotes eld
21726 \begin_inset Flex Code
21729 \begin_layout Plain Layout
21730 class=`myinset' onclick=`\SpecialChar ldots
21737 \begin_inset Quotes erd
21741 By default, \SpecialChar LyX
21743 \begin_inset Quotes eld
21747 \begin_inset Flex Code
21750 \begin_layout Plain Layout
21757 \begin_inset Quotes erd
21761 \begin_inset Flex Code
21764 \begin_layout Plain Layout
21770 is the \SpecialChar LyX
21771 name of the inset, made lowercase and with non-alphanumeric characters
21772 converted to underscores, for example: footnote.
21775 \begin_layout Description
21776 \begin_inset Flex Code
21779 \begin_layout Plain Layout
21786 \begin_inset Flex Code
21789 \begin_layout Plain Layout
21799 ] Whether to output the default CSS information \SpecialChar LyX
21800 generates for this layout,
21801 even if additional information is explicitly provided via
21802 \begin_inset Flex Code
21805 \begin_layout Plain Layout
21813 \begin_inset Flex Code
21816 \begin_layout Plain Layout
21822 allows you to alter or augment the generated CSS, rather than to override
21827 \begin_layout Description
21828 \begin_inset Flex Code
21831 \begin_layout Plain Layout
21838 \begin_inset Flex Code
21841 \begin_layout Plain Layout
21847 ] Attributes for the inner tag.
21849 \begin_inset Quotes eld
21853 \begin_inset Flex Code
21856 \begin_layout Plain Layout
21857 class=`insetname_inner'
21863 \begin_inset Quotes erd
21869 \begin_layout Description
21870 \begin_inset Flex Code
21873 \begin_layout Plain Layout
21880 \begin_inset Flex Code
21883 \begin_layout Plain Layout
21889 ] The inner tag, replacing
21890 \begin_inset Flex Code
21893 \begin_layout Plain Layout
21899 in the examples above.
21900 By default, there is none.
21903 \begin_layout Description
21904 \begin_inset Flex Code
21907 \begin_layout Plain Layout
21914 \begin_inset Flex Code
21917 \begin_layout Plain Layout
21925 ] Whether this inset represents a standalone block of text (such as a footnote)
21926 or instead represents material that is included in the surrounding text
21927 (such as a branch).
21931 \begin_layout Description
21932 \begin_inset Flex Code
21935 \begin_layout Plain Layout
21942 \begin_inset Flex Code
21945 \begin_layout Plain Layout
21951 ] A label for this inset, possibly including a reference to a counter.
21952 For example, for footnote, it might be:
21953 \begin_inset Flex Code
21956 \begin_layout Plain Layout
21965 This is optional, and there is no default.
21968 \begin_layout Description
21969 \begin_inset Flex Code
21972 \begin_layout Plain Layout
21978 Information to be output in the
21979 \begin_inset Flex Code
21982 \begin_layout Plain Layout
21988 section when this style is used.
21989 This might, for example, be used to include a
21990 \begin_inset Flex Code
21993 \begin_layout Plain Layout
22000 \begin_inset Flex Code
22003 \begin_layout Plain Layout
22012 \begin_layout Description
22013 \begin_inset Flex Code
22016 \begin_layout Plain Layout
22022 CSS style information to be included when this style is used.
22023 Note that this will automatically be wrapped in a layout-generated
22024 \begin_inset Flex Code
22027 \begin_layout Plain Layout
22033 block, so only the CSS itself need be included.
22036 \begin_layout Description
22037 \begin_inset Flex Code
22040 \begin_layout Plain Layout
22047 \begin_inset Flex Code
22050 \begin_layout Plain Layout
22056 ] The tag to be used for the main label, replacing
22057 \begin_inset Flex Code
22060 \begin_layout Plain Layout
22066 in the examples above.
22067 The default depends upon the setting of
22068 \begin_inset Flex Code
22071 \begin_layout Plain Layout
22078 \begin_inset Flex Code
22081 \begin_layout Plain Layout
22087 is true, the default is
22088 \begin_inset Flex Code
22091 \begin_layout Plain Layout
22097 ; if it is false, the default is
22098 \begin_inset Flex Code
22101 \begin_layout Plain Layout
22110 \begin_layout Subsection
22114 \begin_layout Standard
22115 The XHTML output for floats too can be controlled by layout information.
22116 The output has the following form:
22119 \begin_layout LyX-Code
22121 \begin_inset Quotes erd
22125 \begin_inset Quotes erd
22131 \begin_layout LyX-Code
22132 Contents of the float.
22135 \begin_layout LyX-Code
22139 \begin_layout Standard
22140 The caption, if there is one, is a separate inset and will be output as
22142 Its appearance can be controlled via the InsetLayout for caption insets.
22146 \begin_layout Description
22147 \begin_inset Flex Code
22150 \begin_layout Plain Layout
22157 \begin_inset Flex Code
22160 \begin_layout Plain Layout
22166 ] Specifies attribute information to be output with the main tag.
22168 \begin_inset Quotes eld
22172 \begin_inset Flex Code
22175 \begin_layout Plain Layout
22176 class=`myfloat' onclick=`\SpecialChar ldots
22183 \begin_inset Quotes erd
22187 By default, \SpecialChar LyX
22189 \begin_inset Quotes eld
22193 \begin_inset Flex Code
22196 \begin_layout Plain Layout
22197 class=`float float-floattype'
22203 \begin_inset Quotes erd
22207 \begin_inset Flex Code
22210 \begin_layout Plain Layout
22216 is \SpecialChar LyX
22217 's name for this type of float, as determined by the float declaration
22219 \begin_inset CommandInset ref
22221 reference "subsec:Floats"
22225 ), though made lowercase and with non-alphanumeric characters converted
22226 to underscores, for example: float-table.
22229 \begin_layout Description
22230 \begin_inset Flex Code
22233 \begin_layout Plain Layout
22239 CSS style information to be included when this float is used.
22240 Note that this will automatically be wrapped in a layout-generated
22241 \begin_inset Flex Code
22244 \begin_layout Plain Layout
22250 block, so only the CSS itself need be included.
22253 \begin_layout Description
22254 \begin_inset Flex Code
22257 \begin_layout Plain Layout
22264 \begin_inset Flex Code
22267 \begin_layout Plain Layout
22273 ] The tag to be used for this float, replacing
22274 \begin_inset Quotes eld
22278 \begin_inset Flex Code
22281 \begin_layout Plain Layout
22288 \begin_inset Quotes erd
22291 in the example above.
22293 \begin_inset Flex Code
22296 \begin_layout Plain Layout
22302 and will rarely need changing.
22305 \begin_layout Subsection
22306 Bibliography formatting
22309 \begin_layout Standard
22310 The bibliography can be formatted using
22311 \begin_inset Flex Code
22314 \begin_layout Plain Layout
22322 \begin_inset CommandInset ref
22324 reference "subsec:Citation-format-description"
22331 \begin_layout Subsection
22336 \begin_layout Standard
22337 We have several times mentioned that \SpecialChar LyX
22338 will generate default CSS style rules
22339 for both insets and paragraph styles, based upon the other layout information
22341 In this section, we shall say a word about which layout information \SpecialChar LyX
22346 \begin_layout Standard
22347 At present, \SpecialChar LyX
22348 auto-generates CSS only for font information, making use of
22350 \begin_inset Flex Code
22353 \begin_layout Plain Layout
22360 \begin_inset Flex Code
22363 \begin_layout Plain Layout
22370 \begin_inset Flex Code
22373 \begin_layout Plain Layout
22380 \begin_inset Flex Code
22383 \begin_layout Plain Layout
22390 \begin_inset Flex Code
22393 \begin_layout Plain Layout
22400 \begin_inset CommandInset ref
22402 reference "subsec:Font-description"
22407 The translation is mostly straightforward and obvious.
22409 \begin_inset Quotes eld
22413 \begin_inset Flex Code
22416 \begin_layout Plain Layout
22423 \begin_inset Quotes erd
22427 \begin_inset Quotes eld
22431 \begin_inset Flex Code
22434 \begin_layout Plain Layout
22435 font-family: sans-serif;
22441 \begin_inset Quotes erd
22445 The correspondence of \SpecialChar LyX
22446 sizes and CSS sizes is a little less obvious but
22447 nonetheless intuitive.
22449 \begin_inset Flex Code
22452 \begin_layout Plain Layout
22459 \begin_inset Flex URL
22462 \begin_layout Plain Layout
22472 \begin_layout Chapter
22473 Including External Material
22474 \begin_inset CommandInset label
22476 name "chap:Including-External-Material"
22483 \begin_layout Standard
22484 \begin_inset Box Shadowbox
22494 height_special "totalheight"
22499 backgroundcolor "none"
22502 \begin_layout Plain Layout
22503 WARNING: This portion of the documentation has not been updated for some
22505 We certainly hope that it is still accurate, but there are no guarantees.
22513 \begin_layout Standard
22514 The use of material from sources external to \SpecialChar LyX
22515 is covered in detail in the
22521 This part of the manual covers what needs to happen behind the scenes for
22522 new sorts of material to be included.
22525 \begin_layout Section
22529 \begin_layout Standard
22530 The external material feature is based on the concept of a
22535 A template is a specification of how \SpecialChar LyX
22536 should interface with a certain kind
22538 As bundled, \SpecialChar LyX
22539 comes with predefined templates for Xfig figures, various
22540 raster format images, chess diagrams, and LilyPond music notation.
22541 You can check the actual list by using the menu
22542 \begin_inset Flex Noun
22545 \begin_layout Plain Layout
22546 Insert\SpecialChar menuseparator
22547 File\SpecialChar menuseparator
22554 Furthermore, it is possible to roll your own template to support a specific
22556 Later we'll describe in more detail what is involved, and hopefully you
22557 will submit all the templates you create so we can include them in a later
22562 \begin_layout Standard
22563 Another basic idea of the external material feature is to distinguish between
22564 the original file that serves as a base for final material and the produced
22565 file that is included in your exported or printed document.
22566 For example, consider the case of a figure produced with
22567 \begin_inset Flex Code
22570 \begin_layout Plain Layout
22577 The Xfig application itself works on an original file with the
22578 \begin_inset Flex Code
22581 \begin_layout Plain Layout
22588 Within Xfig, you create and change your figure, and when you are done,
22590 \begin_inset Flex Code
22593 \begin_layout Plain Layout
22600 When you want to include the figure in your document, you invoke
22601 \begin_inset Flex Code
22604 \begin_layout Plain Layout
22610 in order to create a PostScript file that can readily be included in your
22614 \begin_inset Flex Code
22617 \begin_layout Plain Layout
22623 file is the original file, and the PostScript file is the produced file.
22626 \begin_layout Standard
22627 This distinction is important in order to allow updating of the material
22628 while you are in the process of writing the document.
22629 Furthermore, it provides us with the flexibility that is needed to support
22630 multiple export formats.
22631 For instance, in the case of a plain text file, it is not exactly an award-winn
22632 ing idea to include the figure as raw PostScript.
22633 Instead, you would either prefer to just include a reference to the figure
22634 or try to invoke some graphics to ASCII converter to make the final result
22635 look similar to the real graphics.
22636 The external material management allows you to do this, because it is parametri
22637 zed on the different export formats that \SpecialChar LyX
22641 \begin_layout Standard
22642 Besides supporting the production of different products according to the
22643 exported format, it supports tight integration with editing and viewing
22645 In the case of an Xfig figure, you are able to invoke Xfig on the original
22646 file with a single click from within the external material dialog in \SpecialChar LyX
22648 and also preview the produced PostScript file with Ghostview with another
22650 No more fiddling around with the command line and/or file browsers to locate
22651 and manipulate the original or produced files.
22652 In this way, you are finally able to take full advantage of the many different
22653 applications that are relevant to use when you write your documents, and
22654 ultimately be more productive.
22657 \begin_layout Section
22658 The external template configuration file
22661 \begin_layout Standard
22662 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22664 However, be aware that doing this in an careless manner most probably
22668 introduce an easily exploitable security hole.
22669 So before you do this, please read the discussion about security in
22670 \begin_inset CommandInset ref
22672 reference "sec:Security-discussion"
22679 \begin_layout Standard
22680 Having said that, we encourage you to submit any interesting templates that
22685 \begin_layout Standard
22686 The external templates are defined in the
22687 \begin_inset Flex Code
22690 \begin_layout Plain Layout
22691 LyXDir/lib/external_templates
22697 You can place your own version in
22698 \begin_inset Flex Code
22701 \begin_layout Plain Layout
22702 UserDir/external_templates
22710 \begin_layout Standard
22711 A typical template looks like this:
22714 \begin_layout LyX-Code
22718 \begin_layout LyX-Code
22719 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22722 \begin_layout LyX-Code
22726 \begin_layout LyX-Code
22730 \begin_layout LyX-Code
22734 \begin_layout LyX-Code
22738 \begin_layout LyX-Code
22742 \begin_layout LyX-Code
22743 AutomaticProduction true
22746 \begin_layout LyX-Code
22750 \begin_layout LyX-Code
22754 \begin_layout LyX-Code
22755 Format \SpecialChar LaTeX
22759 \begin_layout LyX-Code
22760 TransformCommand Rotate RotationLatexCommand
22763 \begin_layout LyX-Code
22764 TransformCommand Resize ResizeLatexCommand
22767 \begin_layout LyX-Code
22768 Product "$$RotateFront$$ResizeFront
22771 \begin_layout LyX-Code
22776 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22779 \begin_layout LyX-Code
22780 $$ResizeBack$$RotateBack"
22783 \begin_layout LyX-Code
22787 \begin_layout LyX-Code
22788 UpdateResult "$$AbsPath$$Basename.pstex_t"
22791 \begin_layout LyX-Code
22792 Requirement "graphicx"
22795 \begin_layout LyX-Code
22796 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22799 \begin_layout LyX-Code
22800 ReferencedFile latex "$$AbsPath$$Basename.eps"
22803 \begin_layout LyX-Code
22804 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22807 \begin_layout LyX-Code
22811 \begin_layout LyX-Code
22812 Format PDF\SpecialChar LaTeX
22816 \begin_layout LyX-Code
22817 TransformCommand Rotate RotationLatexCommand
22820 \begin_layout LyX-Code
22821 TransformCommand Resize ResizeLatexCommand
22824 \begin_layout LyX-Code
22825 Product "$$RotateFront$$ResizeFront
22828 \begin_layout LyX-Code
22833 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22836 \begin_layout LyX-Code
22837 $$ResizeBack$$RotateBack"
22840 \begin_layout LyX-Code
22841 UpdateFormat pdftex
22844 \begin_layout LyX-Code
22845 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22848 \begin_layout LyX-Code
22849 Requirement "graphicx"
22852 \begin_layout LyX-Code
22853 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22856 \begin_layout LyX-Code
22857 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22860 \begin_layout LyX-Code
22864 \begin_layout LyX-Code
22868 \begin_layout LyX-Code
22869 Product "$$Contents(
22871 "$$AbsPath$$Basename.asc
22876 \begin_layout LyX-Code
22877 UpdateFormat asciixfig
22880 \begin_layout LyX-Code
22881 UpdateResult "$$AbsPath$$Basename.asc"
22884 \begin_layout LyX-Code
22888 \begin_layout LyX-Code
22892 \begin_layout LyX-Code
22893 Product "<graphic fileref=
22895 "$$AbsOrRelPathMaster$$Basename.eps
22900 \begin_layout LyX-Code
22904 \begin_layout LyX-Code
22908 \begin_layout LyX-Code
22909 UpdateResult "$$AbsPath$$Basename.eps"
22912 \begin_layout LyX-Code
22913 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22916 \begin_layout LyX-Code
22917 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22920 \begin_layout LyX-Code
22924 \begin_layout LyX-Code
22925 Product "[XFig: $$FName]"
22928 \begin_layout LyX-Code
22932 \begin_layout LyX-Code
22936 \begin_layout Standard
22937 As you can see, the template is enclosed in
22938 \begin_inset Flex Code
22941 \begin_layout Plain Layout
22949 \begin_inset Flex Code
22952 \begin_layout Plain Layout
22959 It contains a header specifying some general settings and, for each supported
22960 primary document file format, a section
22961 \begin_inset Flex Code
22964 \begin_layout Plain Layout
22972 \begin_inset Flex Code
22975 \begin_layout Plain Layout
22984 \begin_layout Subsection
22985 The template header
22988 \begin_layout Description
22989 \begin_inset Flex Code
22992 \begin_layout Plain Layout
22993 AutomaticProduction
22994 \begin_inset space ~
23002 Whether the file represented by the template must be generated by \SpecialChar LyX
23004 This command must occur exactly once.
23007 \begin_layout Description
23008 \begin_inset Flex Code
23011 \begin_layout Plain Layout
23013 \begin_inset space ~
23021 A glob pattern that is used in the file dialog to filter out the desired
23023 If there is more than one possible file extension (e.
23024 \begin_inset space \thinspace{}
23028 \begin_inset space \space{}
23032 \begin_inset Flex Code
23035 \begin_layout Plain Layout
23042 \begin_inset Flex Code
23045 \begin_layout Plain Layout
23051 ), use something like
23052 \begin_inset Flex Code
23055 \begin_layout Plain Layout
23062 This command must occur exactly once.
23065 \begin_layout Description
23066 \begin_inset Flex Code
23069 \begin_layout Plain Layout
23071 \begin_inset space ~
23079 The text that is displayed on the button.
23080 This command must occur exactly once.
23083 \begin_layout Description
23084 \begin_inset Flex Code
23087 \begin_layout Plain Layout
23089 \begin_inset space ~
23093 \begin_inset space ~
23101 The help text that is used in the External dialog.
23102 Provide enough information to explain to the user just what the template
23103 can provide him with.
23104 This command must occur exactly once.
23107 \begin_layout Description
23108 \begin_inset Flex Code
23111 \begin_layout Plain Layout
23113 \begin_inset space ~
23121 The file format of the original file.
23122 This must be the name of a format that is known to \SpecialChar LyX
23124 \begin_inset CommandInset ref
23126 reference "sec:Formats"
23132 \begin_inset Quotes eld
23136 \begin_inset Flex Code
23139 \begin_layout Plain Layout
23146 \begin_inset Quotes erd
23149 if the template can handle original files of more than one format.
23151 will attempt to interrogate the file itself in order to deduce its format
23153 This command must occur exactly once.
23156 \begin_layout Description
23157 \begin_inset Flex Code
23160 \begin_layout Plain Layout
23162 \begin_inset space ~
23170 A unique name for the template.
23171 It must not contain substitution macros (see below).
23174 \begin_layout Description
23175 \begin_inset Flex Code
23178 \begin_layout Plain Layout
23180 \begin_inset space ~
23183 Rotate|Resize|Clip|Extra
23188 This command specifies which transformations are supported by this template.
23189 It may occur zero or more times.
23190 This command enables the corresponding tabs in the external dialog.
23192 \begin_inset Flex Code
23195 \begin_layout Plain Layout
23201 command must have either a corresponding
23202 \begin_inset Flex Code
23205 \begin_layout Plain Layout
23212 \begin_inset Flex Code
23215 \begin_layout Plain Layout
23222 \begin_inset Flex Code
23225 \begin_layout Plain Layout
23232 Otherwise the transformation will not be supported by that format.
23235 \begin_layout Subsection
23239 \begin_layout Description
23240 \begin_inset Flex Code
23243 \begin_layout Plain Layout
23245 \begin_inset space ~
23248 LaTeX|PDFLaTeX|PlainText|DocBook
23253 The primary document file format that this format definition is for.
23254 Not every template has a sensible representation in all document file formats.
23255 Please define nevertheless a
23256 \begin_inset Flex Code
23259 \begin_layout Plain Layout
23265 section for all templates.
23266 Use a dummy text when no representation is available.
23267 Then you can at least see a reference to the external material in the exported
23271 \begin_layout Description
23272 \begin_inset Flex Code
23275 \begin_layout Plain Layout
23277 \begin_inset space ~
23281 \begin_inset space ~
23289 This command defines an additional macro
23290 \begin_inset Flex Code
23293 \begin_layout Plain Layout
23299 for substitution in
23300 \begin_inset Flex Code
23303 \begin_layout Plain Layout
23311 \begin_inset Flex Code
23314 \begin_layout Plain Layout
23320 itself may contain substitution macros.
23321 The advantage over using
23322 \begin_inset Flex Code
23325 \begin_layout Plain Layout
23332 \begin_inset Flex Code
23335 \begin_layout Plain Layout
23341 is that the substituted value of
23342 \begin_inset Flex Code
23345 \begin_layout Plain Layout
23351 is sanitized so that it is a valid optional argument in the document format.
23352 This command may occur zero or more times.
23355 \begin_layout Description
23356 \begin_inset Flex Code
23359 \begin_layout Plain Layout
23361 \begin_inset space ~
23369 The text that is inserted in the exported document.
23370 This is actually the most important command and can be quite complex.
23371 This command must occur exactly once.
23374 \begin_layout Description
23375 \begin_inset Flex Code
23378 \begin_layout Plain Layout
23380 \begin_inset space ~
23388 This command specifies a preamble snippet that will be included in the
23391 It has to be defined using
23392 \begin_inset Flex Code
23395 \begin_layout Plain Layout
23403 \begin_inset Flex Code
23406 \begin_layout Plain Layout
23413 This command may occur zero or more times.
23416 \begin_layout Description
23417 \begin_inset Flex Code
23420 \begin_layout Plain Layout
23422 \begin_inset space ~
23426 \begin_inset space ~
23434 This command denotes files that are created by the conversion process and
23435 are needed for a particular export format.
23436 If the filename is relative, it is interpreted relative to the master document.
23437 This command may be given zero or more times.
23440 \begin_layout Description
23441 \begin_inset Flex Code
23444 \begin_layout Plain Layout
23446 \begin_inset space ~
23454 The name of a required \SpecialChar LaTeX
23456 The package is included via
23457 \begin_inset Flex Code
23460 \begin_layout Plain Layout
23468 in the \SpecialChar LaTeX
23470 This command may occur zero or more times.
23473 \begin_layout Description
23474 \begin_inset Flex Code
23477 \begin_layout Plain Layout
23479 \begin_inset space ~
23483 \begin_inset space ~
23486 RotationLatexCommand
23491 This command specifies that the built in \SpecialChar LaTeX
23492 command should be used for rotation.
23493 This command may occur once or not at all.
23496 \begin_layout Description
23497 \begin_inset Flex Code
23500 \begin_layout Plain Layout
23502 \begin_inset space ~
23506 \begin_inset space ~
23514 This command specifies that the built in \SpecialChar LaTeX
23515 command should be used for resizing.
23516 This command may occur once or not at all.
23519 \begin_layout Description
23520 \begin_inset Flex Code
23523 \begin_layout Plain Layout
23525 \begin_inset space ~
23529 \begin_inset space ~
23532 RotationLatexOption
23537 This command specifies that rotation is done via an optional argument.
23538 This command may occur once or not at all.
23541 \begin_layout Description
23542 \begin_inset Flex Code
23545 \begin_layout Plain Layout
23547 \begin_inset space ~
23551 \begin_inset space ~
23559 This command specifies that resizing is done via an optional argument.
23560 This command may occur once or not at all.
23563 \begin_layout Description
23564 \begin_inset Flex Code
23567 \begin_layout Plain Layout
23569 \begin_inset space ~
23573 \begin_inset space ~
23581 This command specifies that clipping is done via an optional argument.
23582 This command may occur once or not at all.
23585 \begin_layout Description
23586 \begin_inset Flex Code
23589 \begin_layout Plain Layout
23591 \begin_inset space ~
23595 \begin_inset space ~
23603 This command specifies that an extra optional argument is used.
23604 This command may occur once or not at all.
23607 \begin_layout Description
23608 \begin_inset Flex Code
23611 \begin_layout Plain Layout
23613 \begin_inset space ~
23621 The file format of the converted file.
23622 This must be the name of a format that is known to \SpecialChar LyX
23624 \begin_inset Flex Noun
23627 \begin_layout Plain Layout
23628 Tools\SpecialChar menuseparator
23629 Preferences\SpecialChar menuseparator
23630 File Handling\SpecialChar menuseparator
23637 This command must occur exactly once.
23638 If the resulting file format is PDF, you need to specify the format
23639 \begin_inset Flex Code
23642 \begin_layout Plain Layout
23649 This is the PDF format used for including graphics.
23650 The other defined PDF formats are for document export.
23653 \begin_layout Description
23654 \begin_inset Flex Code
23657 \begin_layout Plain Layout
23659 \begin_inset space ~
23667 The file name of the converted file.
23668 The file name must be absolute.
23669 This command must occur exactly once.
23672 \begin_layout Subsection
23673 Preamble definitions
23676 \begin_layout Standard
23677 The external template configuration file may contain additional preamble
23678 definitions enclosed by
23679 \begin_inset Flex Code
23682 \begin_layout Plain Layout
23690 \begin_inset Flex Code
23693 \begin_layout Plain Layout
23700 They can be used by the templates in the
23701 \begin_inset Flex Code
23704 \begin_layout Plain Layout
23713 \begin_layout Section
23714 The substitution mechanism
23717 \begin_layout Standard
23718 When the external material facility invokes an external program, it is done
23719 on the basis of a command defined in the template configuration file.
23720 These commands can contain various macros that are expanded before execution.
23721 Execution always take place in the directory of the containing document.
23724 \begin_layout Standard
23725 Also, whenever external material is to be displayed, the name will be produced
23726 by the substitution mechanism, and most other commands in the template
23727 definition support substitution as well.
23730 \begin_layout Standard
23731 The available macros are the following:
23734 \begin_layout Description
23735 \begin_inset Flex Code
23738 \begin_layout Plain Layout
23739 $$AbsOrRelPathMaster
23744 The file path, absolute or relative to the master \SpecialChar LyX
23748 \begin_layout Description
23749 \begin_inset Flex Code
23752 \begin_layout Plain Layout
23753 $$AbsOrRelPathParent
23758 The file path, absolute or relative to the \SpecialChar LyX
23762 \begin_layout Description
23763 \begin_inset Flex Code
23766 \begin_layout Plain Layout
23772 The absolute file path.
23775 \begin_layout Description
23776 \begin_inset Flex Code
23779 \begin_layout Plain Layout
23785 The filename without path and without the extension.
23788 \begin_layout Description
23789 \begin_inset Flex Code
23792 \begin_layout Plain Layout
23794 \begin_inset Quotes eld
23798 \begin_inset Quotes erd
23806 This macro will expand to the contents of the file with the name
23807 \begin_inset Flex Code
23810 \begin_layout Plain Layout
23819 \begin_layout Description
23820 \begin_inset Flex Code
23823 \begin_layout Plain Layout
23829 The file extension (including the dot).
23832 \begin_layout Description
23833 \begin_inset Flex Code
23836 \begin_layout Plain Layout
23842 This will be the string
23843 \begin_inset Quotes eld
23847 \begin_inset Quotes erd
23850 if the file is in JPEG format, otherwise it will be the string
23851 \begin_inset Quotes eld
23855 \begin_inset Quotes erd
23859 This is useful to avoid uneeded conversions for output formats that support
23860 both PNG and JPEG fomats.
23861 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
23866 \begin_layout Description
23867 \begin_inset Flex Code
23870 \begin_layout Plain Layout
23876 The filename of the file specified in the external material dialog.
23877 This is either an absolute name, or it is relative to the \SpecialChar LyX
23881 \begin_layout Description
23882 \begin_inset Flex Code
23885 \begin_layout Plain Layout
23892 \begin_inset Flex Code
23895 \begin_layout Plain Layout
23901 (absolute name or relative to the \SpecialChar LyX
23905 \begin_layout Description
23906 \begin_inset Flex Code
23909 \begin_layout Plain Layout
23915 The file path, relative to the master \SpecialChar LyX
23919 \begin_layout Description
23920 \begin_inset Flex Code
23923 \begin_layout Plain Layout
23929 The file path, relative to the \SpecialChar LyX
23933 \begin_layout Description
23934 \begin_inset Flex Code
23937 \begin_layout Plain Layout
23943 This macro will expand to the absolute path of the system directory.
23944 This is typically used to point to the various helper scripts that are
23945 bundled with \SpecialChar LyX
23949 \begin_layout Description
23950 \begin_inset Flex Code
23953 \begin_layout Plain Layout
23959 A name and full path to a temporary file which will be automatically deleted
23960 whenever the containing document is closed, or the external material insertion
23964 \begin_layout Standard
23965 All path macros contain a trailing directory separator, so you can construct
23967 \begin_inset space \thinspace{}
23971 \begin_inset space \space{}
23974 the absolute filename with
23975 \begin_inset Flex Code
23978 \begin_layout Plain Layout
23979 $$AbsPath$$Basename$$Extension
23987 \begin_layout Standard
23988 The macros above are substituted in all commands unless otherwise noted.
23990 \begin_inset Flex Code
23993 \begin_layout Plain Layout
23999 supports additionally the following substitutions if they are enabled by
24001 \begin_inset Flex Code
24004 \begin_layout Plain Layout
24011 \begin_inset Flex Code
24014 \begin_layout Plain Layout
24023 \begin_layout Description
24024 \begin_inset Flex Code
24027 \begin_layout Plain Layout
24033 The front part of the resize command.
24036 \begin_layout Description
24037 \begin_inset Flex Code
24040 \begin_layout Plain Layout
24046 The back part of the resize command.
24049 \begin_layout Description
24050 \begin_inset Flex Code
24053 \begin_layout Plain Layout
24059 The front part of the rotation command.
24062 \begin_layout Description
24063 \begin_inset Flex Code
24066 \begin_layout Plain Layout
24072 The back part of the rotation command.
24075 \begin_layout Standard
24076 The value string of the
24077 \begin_inset Flex Code
24080 \begin_layout Plain Layout
24086 command supports additionally the following substitutions if they are enabled
24088 \begin_inset Flex Code
24091 \begin_layout Plain Layout
24098 \begin_inset Flex Code
24101 \begin_layout Plain Layout
24110 \begin_layout Description
24111 \begin_inset Flex Code
24114 \begin_layout Plain Layout
24123 \begin_layout Description
24124 \begin_inset Flex Code
24127 \begin_layout Plain Layout
24136 \begin_layout Description
24137 \begin_inset Flex Code
24140 \begin_layout Plain Layout
24149 \begin_layout Description
24150 \begin_inset Flex Code
24153 \begin_layout Plain Layout
24159 The rotation option.
24162 \begin_layout Standard
24163 You may ask why there are so many path macros.
24164 There are mainly two reasons:
24167 \begin_layout Enumerate
24168 Relative and absolute file names should remain relative or absolute, respectivel
24170 Users may have reasons to prefer either form.
24171 Relative names are useful for portable documents that should work on different
24172 machines, for example.
24173 Absolute names may be required by some programs.
24176 \begin_layout Enumerate
24178 treats relative file names differently than \SpecialChar LyX
24179 and other programs in nested
24181 For \SpecialChar LyX
24182 , a relative file name is always relative to the document that contains
24184 For \SpecialChar LaTeX
24185 , it is always relative to the master document.
24186 These two definitions are identical if you have only one document, but
24187 differ if you have a master document that includes part documents.
24188 That means that relative filenames must be transformed when presented to
24191 Fortunately \SpecialChar LyX
24192 does this automatically for you if you choose the right macros.
24195 \begin_layout Standard
24196 So which path macro should be used in new template definitions? The rule
24200 \begin_layout Itemize
24202 \begin_inset Flex Code
24205 \begin_layout Plain Layout
24211 if an absolute path is required.
24214 \begin_layout Itemize
24216 \begin_inset Flex Code
24219 \begin_layout Plain Layout
24220 $$AbsOrRelPathMaster
24225 if the substituted string is some kind of \SpecialChar LaTeX
24229 \begin_layout Itemize
24231 \begin_inset Flex Code
24234 \begin_layout Plain Layout
24235 $$AbsOrRelPathParent
24240 in order to preserve the user's choice.
24243 \begin_layout Standard
24244 There are special cases where this rule does not work and e.
24245 \begin_inset space \thinspace{}
24249 \begin_inset space \space{}
24252 relative names are needed, but normally it will work just fine.
24253 One example for such a case is the command
24254 \begin_inset Flex Code
24257 \begin_layout Plain Layout
24258 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24263 in the XFig template above: We can't use the absolute name because the
24265 \begin_inset Flex Code
24268 \begin_layout Plain Layout
24274 files needs the relative name in order to rewrite the file content.
24277 \begin_layout Section
24278 Security discussion
24279 \begin_inset CommandInset label
24281 name "sec:Security-discussion"
24288 \begin_layout Standard
24289 The external material feature interfaces with a lot of external programs
24290 and does so automatically, so we have to consider the security implications
24292 In particular, since you have the option of including your own filenames
24293 and/or parameter strings and those are expanded into a command, it seems
24294 that it would be possible to create a malicious document which executes
24295 arbitrary commands when a user views or prints the document.
24296 This is something we definitely want to avoid.
24299 \begin_layout Standard
24300 However, since the external program commands are specified in the template
24301 configuration file only, there are no security issues if \SpecialChar LyX
24302 is properly configure
24303 d with safe templates only.
24304 This is so because the external programs are invoked with the
24305 \begin_inset Flex Code
24308 \begin_layout Plain Layout
24314 -system call rather than the
24315 \begin_inset Flex Code
24318 \begin_layout Plain Layout
24324 system-call, so it's not possible to execute arbitrary commands from the
24325 filename or parameter section via the shell.
24328 \begin_layout Standard
24329 This also implies that you are restricted in what command strings you can
24330 use in the external material templates.
24331 In particular, pipes and redirection are not readily available.
24332 This has to be so if \SpecialChar LyX
24333 should remain safe.
24334 If you want to use some of the shell features, you should write a safe
24335 script to do this in a controlled manner, and then invoke the script from
24336 the command string.
24340 \begin_layout Standard
24341 It is possible to design a template that interacts directly with the shell,
24342 but since this would allow a malicious user to execute arbitrary commands
24343 by writing clever filenames and/or parameters, we generally recommend that
24344 you only use safe scripts that work with the
24345 \begin_inset Flex Code
24348 \begin_layout Plain Layout
24354 system call in a controlled manner.
24355 Of course, for use in a controlled environment, it can be tempting to just
24356 fall back to use ordinary shell scripts.
24357 If you do so, be aware that you
24361 provide an easily exploitable security hole in your system.
24362 Of course it stands to reason that such unsafe templates will never be
24363 included in the standard \SpecialChar LyX
24364 distribution, although we do encourage people
24365 to submit new templates in the open source tradition.
24366 But \SpecialChar LyX
24367 as shipped from the official distribution channels will never have
24371 \begin_layout Standard
24372 Including external material provides a lot of power, and you have to be
24373 careful not to introduce security hazards with this power.
24374 A subtle error in a single line in an innocent looking script can open
24375 the door to huge security problems.
24376 So if you do not fully understand the issues, we recommend that you consult
24377 a knowledgeable security professional or the \SpecialChar LyX
24378 development team if you have
24379 any questions about whether a given template is safe or not.
24380 And do this before you use it in an uncontrolled environment.
24383 \begin_layout Chapter
24385 List of supported \SpecialChar LyX
24386 functions to be used in layouts
24387 \begin_inset CommandInset label
24389 name "chap:List-of-functions"
24396 \begin_layout Standard
24398 \begin_inset Tabular
24399 <lyxtabular version="3" rows="11" columns="8">
24400 <features tabularvalignment="middle">
24401 <column alignment="left" valignment="top">
24402 <column alignment="left" valignment="top">
24403 <column alignment="left" valignment="top">
24404 <column alignment="left" valignment="top">
24405 <column alignment="left" valignment="top">
24406 <column alignment="left" valignment="top">
24407 <column alignment="left" valignment="top">
24408 <column alignment="left" valignment="top">
24410 <cell alignment="left" valignment="top" usebox="none">
24413 \begin_layout Plain Layout
24419 <cell alignment="left" valignment="top" usebox="none">
24422 \begin_layout Plain Layout
24428 <cell alignment="left" valignment="top" usebox="none">
24431 \begin_layout Plain Layout
24437 <cell alignment="left" valignment="top" usebox="none">
24440 \begin_layout Plain Layout
24446 <cell alignment="center" valignment="top" usebox="none">
24449 \begin_layout Plain Layout
24455 <cell alignment="center" valignment="top" usebox="none">
24458 \begin_layout Plain Layout
24464 <cell alignment="center" valignment="top" usebox="none">
24467 \begin_layout Plain Layout
24473 <cell alignment="center" valignment="top" usebox="none">
24476 \begin_layout Plain Layout
24484 <cell alignment="left" valignment="top" usebox="none">
24487 \begin_layout Plain Layout
24493 <cell alignment="left" valignment="top" usebox="none">
24496 \begin_layout Plain Layout
24502 <cell alignment="left" valignment="top" usebox="none">
24505 \begin_layout Plain Layout
24511 <cell alignment="left" valignment="top" usebox="none">
24514 \begin_layout Plain Layout
24520 <cell alignment="center" valignment="top" usebox="none">
24523 \begin_layout Plain Layout
24529 <cell alignment="center" valignment="top" usebox="none">
24532 \begin_layout Plain Layout
24538 <cell alignment="center" valignment="top" usebox="none">
24541 \begin_layout Plain Layout
24547 <cell alignment="center" valignment="top" usebox="none">
24550 \begin_layout Plain Layout
24558 <cell alignment="left" valignment="top" usebox="none">
24561 \begin_layout Plain Layout
24567 <cell alignment="left" valignment="top" usebox="none">
24570 \begin_layout Plain Layout
24576 <cell alignment="left" valignment="top" usebox="none">
24579 \begin_layout Plain Layout
24585 <cell alignment="left" valignment="top" usebox="none">
24588 \begin_layout Plain Layout
24594 <cell alignment="center" valignment="top" usebox="none">
24597 \begin_layout Plain Layout
24603 <cell alignment="center" valignment="top" usebox="none">
24606 \begin_layout Plain Layout
24612 <cell alignment="center" valignment="top" usebox="none">
24615 \begin_layout Plain Layout
24621 <cell alignment="center" valignment="top" usebox="none">
24624 \begin_layout Plain Layout
24632 <cell alignment="left" valignment="top" usebox="none">
24635 \begin_layout Plain Layout
24641 <cell alignment="left" valignment="top" usebox="none">
24644 \begin_layout Plain Layout
24650 <cell alignment="left" valignment="top" usebox="none">
24653 \begin_layout Plain Layout
24659 <cell alignment="left" valignment="top" usebox="none">
24662 \begin_layout Plain Layout
24668 <cell alignment="center" valignment="top" usebox="none">
24671 \begin_layout Plain Layout
24677 <cell alignment="center" valignment="top" usebox="none">
24680 \begin_layout Plain Layout
24686 <cell alignment="center" valignment="top" usebox="none">
24689 \begin_layout Plain Layout
24695 <cell alignment="center" valignment="top" usebox="none">
24698 \begin_layout Plain Layout
24706 <cell alignment="left" valignment="top" usebox="none">
24709 \begin_layout Plain Layout
24715 <cell alignment="left" valignment="top" usebox="none">
24718 \begin_layout Plain Layout
24724 <cell alignment="left" valignment="top" usebox="none">
24727 \begin_layout Plain Layout
24733 <cell alignment="left" valignment="top" usebox="none">
24736 \begin_layout Plain Layout
24742 <cell alignment="center" valignment="top" usebox="none">
24745 \begin_layout Plain Layout
24751 <cell alignment="center" valignment="top" usebox="none">
24754 \begin_layout Plain Layout
24760 <cell alignment="center" valignment="top" usebox="none">
24763 \begin_layout Plain Layout
24769 <cell alignment="center" valignment="top" usebox="none">
24772 \begin_layout Plain Layout
24780 <cell alignment="left" valignment="top" usebox="none">
24783 \begin_layout Plain Layout
24789 <cell alignment="left" valignment="top" usebox="none">
24792 \begin_layout Plain Layout
24798 <cell alignment="left" valignment="top" usebox="none">
24801 \begin_layout Plain Layout
24807 <cell alignment="left" valignment="top" usebox="none">
24810 \begin_layout Plain Layout
24816 <cell alignment="center" valignment="top" usebox="none">
24819 \begin_layout Plain Layout
24825 <cell alignment="center" valignment="top" usebox="none">
24828 \begin_layout Plain Layout
24834 <cell alignment="center" valignment="top" usebox="none">
24837 \begin_layout Plain Layout
24843 <cell alignment="center" valignment="top" usebox="none">
24846 \begin_layout Plain Layout
24854 <cell alignment="left" valignment="top" usebox="none">
24857 \begin_layout Plain Layout
24863 <cell alignment="left" valignment="top" usebox="none">
24866 \begin_layout Plain Layout
24872 <cell alignment="left" valignment="top" usebox="none">
24875 \begin_layout Plain Layout
24881 <cell alignment="left" valignment="top" usebox="none">
24884 \begin_layout Plain Layout
24890 <cell alignment="center" valignment="top" usebox="none">
24893 \begin_layout Plain Layout
24899 <cell alignment="center" valignment="top" usebox="none">
24902 \begin_layout Plain Layout
24908 <cell alignment="center" valignment="top" usebox="none">
24911 \begin_layout Plain Layout
24917 <cell alignment="center" valignment="top" usebox="none">
24920 \begin_layout Plain Layout
24928 <cell alignment="left" valignment="top" usebox="none">
24931 \begin_layout Plain Layout
24937 <cell alignment="left" valignment="top" usebox="none">
24940 \begin_layout Plain Layout
24946 <cell alignment="left" valignment="top" usebox="none">
24949 \begin_layout Plain Layout
24955 <cell alignment="left" valignment="top" usebox="none">
24958 \begin_layout Plain Layout
24964 <cell alignment="center" valignment="top" usebox="none">
24967 \begin_layout Plain Layout
24973 <cell alignment="center" valignment="top" usebox="none">
24976 \begin_layout Plain Layout
24982 <cell alignment="center" valignment="top" usebox="none">
24985 \begin_layout Plain Layout
24991 <cell alignment="center" valignment="top" usebox="none">
24994 \begin_layout Plain Layout
25002 <cell alignment="left" valignment="top" usebox="none">
25005 \begin_layout Plain Layout
25011 <cell alignment="left" valignment="top" usebox="none">
25014 \begin_layout Plain Layout
25020 <cell alignment="left" valignment="top" usebox="none">
25023 \begin_layout Plain Layout
25029 <cell alignment="left" valignment="top" usebox="none">
25032 \begin_layout Plain Layout
25038 <cell alignment="center" valignment="top" usebox="none">
25041 \begin_layout Plain Layout
25047 <cell alignment="center" valignment="top" usebox="none">
25050 \begin_layout Plain Layout
25056 <cell alignment="center" valignment="top" usebox="none">
25059 \begin_layout Plain Layout
25065 <cell alignment="center" valignment="top" usebox="none">
25068 \begin_layout Plain Layout
25076 <cell alignment="left" valignment="top" usebox="none">
25079 \begin_layout Plain Layout
25085 <cell alignment="left" valignment="top" usebox="none">
25088 \begin_layout Plain Layout
25094 <cell alignment="left" valignment="top" usebox="none">
25097 \begin_layout Plain Layout
25103 <cell alignment="left" valignment="top" usebox="none">
25106 \begin_layout Plain Layout
25112 <cell alignment="center" valignment="top" usebox="none">
25115 \begin_layout Plain Layout
25121 <cell alignment="center" valignment="top" usebox="none">
25124 \begin_layout Plain Layout
25130 <cell alignment="center" valignment="top" usebox="none">
25133 \begin_layout Plain Layout
25139 <cell alignment="center" valignment="top" usebox="none">
25142 \begin_layout Plain Layout
25150 <cell alignment="center" valignment="top" usebox="none">
25153 \begin_layout Plain Layout
25159 <cell alignment="center" valignment="top" usebox="none">
25162 \begin_layout Plain Layout
25168 <cell alignment="center" valignment="top" usebox="none">
25171 \begin_layout Plain Layout
25177 <cell alignment="center" valignment="top" usebox="none">
25180 \begin_layout Plain Layout
25186 <cell alignment="center" valignment="top" usebox="none">
25189 \begin_layout Plain Layout
25195 <cell alignment="center" valignment="top" usebox="none">
25198 \begin_layout Plain Layout
25204 <cell alignment="center" valignment="top" usebox="none">
25207 \begin_layout Plain Layout
25213 <cell alignment="center" valignment="top" usebox="none">
25216 \begin_layout Plain Layout
25230 \begin_layout Chapter
25231 Names of available colors to be used in layouts
25232 \begin_inset CommandInset label
25234 name "chap:Names-of-colors"
25241 \begin_layout Standard
25242 The colors listed here are the standard colors and the those that you can
25243 adjust in the \SpecialChar LyX
25247 \begin_layout Description
25260 No particular color – clear or default
25263 \begin_layout Description
25267 \begin_layout Description
25271 \begin_layout Description
25275 \begin_layout Description
25279 \begin_layout Description
25283 \begin_layout Description
25287 \begin_layout Description
25291 \begin_layout Description
25295 \begin_layout Description
25296 added_space Added space marker color
25299 \begin_layout Description
25300 addedtext Added text color
25303 \begin_layout Description
25304 appendix Appendix marker color
25307 \begin_layout Description
25308 background Background color
25311 \begin_layout Description
25312 bottomarea Bottom area color
25315 \begin_layout Description
25316 branchlabel Label color for branches
25319 \begin_layout Description
25320 buttonbg Color used for bottom background
25323 \begin_layout Description
25324 buttonhoverbg Color used for button background under focus
25327 \begin_layout Description
25328 buttonframe Color for inset button frames
25331 \begin_layout Description
25332 changebar Changebar color
25335 \begin_layout Description
25336 changedtextauthor1 Changed text color author 1
25339 \begin_layout Description
25340 changedtextauthor2 Changed text color author 2
25343 \begin_layout Description
25344 changedtextauthor3 Changed text color author 3
25347 \begin_layout Description
25348 changedtextauthor4 Changed text color author 4
25351 \begin_layout Description
25352 changedtextauthor5 Changed text color author 5
25355 \begin_layout Description
25356 collapsable_inset_frame Collapsable insets framecolor
25359 \begin_layout Description
25360 collapsable_inset_text Collapsable insets text color
25363 \begin_layout Description
25364 command Text color for command insets
25367 \begin_layout Description
25368 commandbg Background color for command insets
25371 \begin_layout Description
25372 commandframe Frame color for command insets
25375 \begin_layout Description
25376 comment color for comments
25379 \begin_layout Description
25380 commentbg Background color of comments
25383 \begin_layout Description
25384 cursor Cursor color
25387 \begin_layout Description
25388 deletedtext Deleted text color
25391 \begin_layout Description
25392 deletedtextmodifier Deleted text modifying color
25395 \begin_layout Description
25396 depthbar Color for the depth bars in the margin
25399 \begin_layout Description
25400 eolmarker End of line marker color
25403 \begin_layout Description
25404 error Color of the \SpecialChar LaTeX
25408 \begin_layout Description
25409 footlabel Label color for footnotes
25412 \begin_layout Description
25413 graphicsbg Graphics inset background color
25416 \begin_layout Description
25417 greyedout Label color for greyedout insets
25420 \begin_layout Description
25421 greyedoutbg Background color of greyedout inset
25424 \begin_layout Description
25425 greyedouttext Color for greyedout inset text
25428 \begin_layout Description
25429 indexlabel Label color for index insets
25432 \begin_layout Description
25433 ignore The color is ignored
25436 \begin_layout Description
25437 inherit The color is inherited
25440 \begin_layout Description
25441 inlinecompletion Inline completion color
25444 \begin_layout Description
25445 insetbg Inset marker background color
25448 \begin_layout Description
25449 insetframe Inset marker frame color
25452 \begin_layout Description
25453 language Color for marking foreign language words
25456 \begin_layout Description
25457 latex Text color in \SpecialChar LaTeX
25461 \begin_layout Description
25462 listingsbg Background color of listings inset
25465 \begin_layout Description
25466 marginlabel Label color for margin notes
25469 \begin_layout Description
25470 math Math inset text color
25473 \begin_layout Description
25474 mathbg Math inset background color
25477 \begin_layout Description
25478 mathcorners Math inset frame color not under focus
25481 \begin_layout Description
25482 mathframe Math inset frame color under focus
25485 \begin_layout Description
25486 mathline Math line color
25489 \begin_layout Description
25490 mathmacrobg Macro math inset background color
25493 \begin_layout Description
25494 mathmacroblend Macro math blended color
25497 \begin_layout Description
25498 mathmacroframe Macro math frame color
25501 \begin_layout Description
25502 mathmacrohoverbg Macro math inset background color hovered
25505 \begin_layout Description
25506 mathmacrolabel Macro math label color
25509 \begin_layout Description
25510 mathmacronewarg Macro template color for new parameters
25513 \begin_layout Description
25514 mathmacrooldarg Macro template color for old parameters
25517 \begin_layout Description
25518 newpage New page color
25521 \begin_layout Description
25522 nonunique_inlinecompletion Inline completion color for the non-unique part
25525 \begin_layout Description
25526 notebg Background color of notes
25529 \begin_layout Description
25530 notelabel Label color for notes
25533 \begin_layout Description
25534 pagebreak Page break/line break color
25537 \begin_layout Description
25538 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25541 \begin_layout Description
25542 phantomtext Text color for phantom insets
25545 \begin_layout Description
25546 preview The color used for previews
25549 \begin_layout Description
25550 previewframe Preview frame color
25553 \begin_layout Description
25554 regexpframe Color for regexp frame
25557 \begin_layout Description
25558 selection Background color of selected text
25561 \begin_layout Description
25562 selectiontext Foreground color of selected text
25565 \begin_layout Description
25566 shadedbg Background color of shaded box
25569 \begin_layout Description
25570 special Special chars text color
25573 \begin_layout Description
25574 tabularline Table line color
25577 \begin_layout Description
25578 tabularonoffline Table line color
25581 \begin_layout Description
25582 urllabel Label color for URL insets
25585 \begin_layout Description
25586 urltext Color for URL inset text