1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 % increase link area for cross-references and autoname them,
35 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
36 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
37 \addto\extrasenglish{%
38 \renewcommand*{\equationautorefname}[1]{}%
39 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
40 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
41 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
44 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
45 \use_default_options false
49 \maintain_unincluded_children false
52 InsetLayout Flex:MenuItem
61 \newcommand*{\menuitem}[1]{{\sffamily #1}}
64 # In case we need to do with sans...
65 #InsetLayout CharStyle:Code
70 #\renewcommand{\code}[1]{{\sffamily #1}}
75 \language_package default
80 \font_typewriter default
82 \font_default_family default
83 \use_non_tex_fonts false
89 \default_output_format default
91 \bibtex_command default
92 \index_command default
96 \pdf_title "LyX Configuration Manual"
97 \pdf_author "LyX Team"
98 \pdf_subject "LyX-documentation Customization"
99 \pdf_keywords "LyX, documentation, customization"
101 \pdf_bookmarksnumbered true
102 \pdf_bookmarksopen true
103 \pdf_bookmarksopenlevel 1
104 \pdf_breaklinks false
108 \pdf_pdfusetitle false
109 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
112 \use_package amsmath 0
113 \use_package amssymb 0
114 \use_package cancel 0
116 \use_package mathdots 1
117 \use_package mathtools 0
118 \use_package mhchem 0
119 \use_package stackrel 0
120 \use_package stmaryrd 0
121 \use_package undertilde 0
123 \cite_engine_type default
127 \paperorientation portrait
142 \paragraph_separation indent
143 \paragraph_indentation default
144 \quotes_language english
147 \paperpagestyle headings
148 \tracking_changes true
149 \output_changes false
153 \author -712698321 "Jürgen Spitzmüller"
154 \author -195340706 "Georg Baum"
155 \author 155139281 "Jrgen Spitzmller"
156 \author 274215730 "scott"
162 Customizing \SpecialChar LyX
163 : Features for the Advanced User
167 by the \SpecialChar LyX
172 \begin_layout Plain Layout
174 If you have comments or error corrections, please send them to the \SpecialChar LyX
177 \begin_inset CommandInset href
179 target "lyx-docs@lists.lyx.org"
186 \begin_inset Quotes eld
190 \begin_inset Quotes erd
193 in the subject header, and please cc the current maintainer of this file,
194 Richard Heck <rgheck@comcast.net>.
200 \begin_inset Newline newline
204 \begin_inset Newline newline
210 \begin_layout Standard
211 \begin_inset CommandInset toc
212 LatexCommand tableofcontents
219 \begin_layout Standard
220 \begin_inset Note Note
223 \begin_layout Plain Layout
224 Please use change tracking when modifying this document.
225 This makes it easier for our translators to recognize things that have
226 been changed, and it helps the maintainer keep up-to-date with what's been
235 \begin_layout Chapter
239 \begin_layout Standard
240 This manual covers the customization features present in \SpecialChar LyX
242 In it, we discuss issues like keyboard shortcuts, screen previewing options,
243 printer options, sending commands to \SpecialChar LyX
244 via the \SpecialChar LyX
245 Server, internationalization,
246 installing new \SpecialChar LaTeX
247 classes and \SpecialChar LyX
249 We can't possibly hope to touch on everything you can change—our developers
250 add new features faster than we can document them—but we will explain the
251 most common customizations and hopefully point you in the right direction
252 for some of the more obscure ones.
255 \begin_layout Standard
256 \begin_inset Branch OutDated
259 \begin_layout Standard
260 Information from previous versions of this document that now seems to be
261 outdated is contained in the OutDated branch of this document.
262 By default, this information will not appear in the \SpecialChar LaTeX
271 \begin_layout Chapter
276 \begin_layout Standard
277 This chapter aims to help you to find your way through the \SpecialChar LyX
280 Before continuing to read this chapter, you should find out where your
282 library and user directories are by using
283 \begin_inset Flex MenuItem
286 \begin_layout Plain Layout
287 Help\SpecialChar menuseparator
299 The library directory is the place where \SpecialChar LyX
300 places its system-wide configuration
301 files; the user directory is where you can place your modified versions.
302 We will call the former
303 \begin_inset Flex Code
306 \begin_layout Plain Layout
314 \begin_inset Flex MenuItem
317 \begin_layout Plain Layout
323 in the remainder of this document.
327 \begin_layout Section
329 \begin_inset Flex Code
332 \begin_layout Plain Layout
342 \begin_layout Standard
343 \begin_inset Flex Code
346 \begin_layout Plain Layout
353 and its sub-directories contain a number of files and that can be used
354 to customize \SpecialChar LyX
356 You can change many of these files from within \SpecialChar LyX
358 \begin_inset Flex MenuItem
361 \begin_layout Plain Layout
362 Tools\SpecialChar menuseparator
369 Most customization that you will want to do in \SpecialChar LyX
370 is possible through this
372 However, many other inner aspects of \SpecialChar LyX
373 can be customized by modifying the
375 \begin_inset Flex Code
378 \begin_layout Plain Layout
386 These files fall in different categories, described in the following subsection
390 \begin_layout Subsection
391 Automatically generated files
394 \begin_layout Standard
395 The files, which are to be found in
396 \begin_inset Flex MenuItem
399 \begin_layout Plain Layout
405 , are generated when you configure \SpecialChar LyX
407 They contain various default values that are guessed by inspection.
408 In general, it is not a good idea to modify them, since they might be overwritt
412 \begin_layout Labeling
413 \labelwidthstring 00.00.0000
414 \begin_inset Flex Code
417 \begin_layout Plain Layout
423 contains defaults for various commands.
426 \begin_layout Labeling
427 \labelwidthstring 00.00.0000
428 \begin_inset Flex Code
431 \begin_layout Plain Layout
437 contains the list of packages that have been recognized by \SpecialChar LyX
439 It is currently unused by the \SpecialChar LyX
440 program itself, but the information extracted,
441 and more, is made available with
442 \begin_inset Flex MenuItem
445 \begin_layout Plain Layout
446 Help\SpecialChar menuseparator
460 \begin_layout Labeling
461 \labelwidthstring 00.00.0000
462 \begin_inset Flex Code
465 \begin_layout Plain Layout
471 the list of text classes that have been found in your
472 \begin_inset Flex Code
475 \begin_layout Plain Layout
481 directories, along with the associated \SpecialChar LaTeX
482 document class and their description.
485 \begin_layout Labeling
486 \labelwidthstring 00.00.0000
487 \begin_inset Flex Code
490 \begin_layout Plain Layout
496 the list of layout modules found in your
497 \begin_inset Flex Code
500 \begin_layout Plain Layout
509 \begin_layout Labeling
510 \labelwidthstring 00.00.0000
511 \begin_inset Flex Code
514 \begin_layout Plain Layout
520 lists of various sorts of \SpecialChar LaTeX
521 -related files found on your system
524 \begin_layout Labeling
525 \labelwidthstring 00.00.0000
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
530 doc/\SpecialChar LaTeX
536 is automatically generated during configuration from the file
537 \begin_inset Flex Code
540 \begin_layout Plain Layout
548 It contains information on your \SpecialChar LaTeX
552 \begin_layout Subsection
556 \begin_layout Standard
557 These directories are duplicated between
558 \begin_inset Flex Code
561 \begin_layout Plain Layout
569 \begin_inset Flex Code
572 \begin_layout Plain Layout
579 If a particular files exists in both places, the one in
580 \begin_inset Flex Code
583 \begin_layout Plain Layout
592 \begin_layout Labeling
593 \labelwidthstring 00.00.0000
594 \begin_inset Flex Code
597 \begin_layout Plain Layout
603 this directory contains files with the extension
604 \begin_inset Flex Code
607 \begin_layout Plain Layout
613 that define the keybindings used in \SpecialChar LyX
615 If there exists an internationalized version of the bind file named
616 \begin_inset Flex Code
619 \begin_layout Plain Layout
625 , that will be used first.
628 \begin_layout Labeling
629 \labelwidthstring 00.00.0000
630 \begin_inset Flex Code
633 \begin_layout Plain Layout
639 contains graphics files that can be included in documents.
643 \begin_layout Labeling
644 \labelwidthstring 00.00.0000
645 \begin_inset Flex Code
648 \begin_layout Plain Layout
654 contains \SpecialChar LyX
655 documentation files (including the one you are currently reading).
657 \begin_inset Flex Code
660 \begin_layout Plain Layout
667 deserves special attention, as noted above.
668 The internationalized help docs are in subdirectories
669 \begin_inset Flex Code
672 \begin_layout Plain Layout
679 \begin_inset Quotes eld
683 \begin_inset Quotes erd
686 is the ISO language code.
688 \begin_inset CommandInset ref
690 reference "cha:Internationalizing-LyX"
697 \begin_layout Labeling
698 \labelwidthstring 00.00.0000
699 \begin_inset Flex Code
702 \begin_layout Plain Layout
708 contains example files that explain how to use some features.
709 In the file browser, press the
710 \begin_inset Flex MenuItem
713 \begin_layout Plain Layout
722 \begin_layout Labeling
723 \labelwidthstring 00.00.0000
724 \begin_inset Flex Code
727 \begin_layout Plain Layout
733 contains image files that are used by the
734 \begin_inset Flex MenuItem
737 \begin_layout Plain Layout
744 In addition, it also contains the individual icons used in the toolbar
745 and the banners that can be shown when \SpecialChar LyX
749 \begin_layout Labeling
750 \labelwidthstring 00.00.0000
751 \begin_inset Flex Code
754 \begin_layout Plain Layout
760 contains keyboard keymapping files.
762 \begin_inset CommandInset ref
764 reference "sec:International-Keymap-Stuff"
771 \begin_layout Labeling
772 \labelwidthstring 00.00.0000
773 \begin_inset Flex Code
776 \begin_layout Plain Layout
782 contains the text class and module files described in
783 \begin_inset CommandInset ref
785 reference "cha:Installing-New-Document"
792 \begin_layout Labeling
793 \labelwidthstring 00.00.0000
794 \begin_inset Flex Code
797 \begin_layout Plain Layout
804 \begin_inset Flex Code
807 \begin_layout Plain Layout
813 Python scripts used to convert between \SpecialChar LyX
815 These can be run from the command line if, say, you want to batch-convert
819 \begin_layout Labeling
820 \labelwidthstring 00.00.0000
821 \begin_inset Flex Code
824 \begin_layout Plain Layout
830 contains some files that demonstrate the capabilities of the
831 \begin_inset Flex MenuItem
834 \begin_layout Plain Layout
845 Also contains some scripts used by \SpecialChar LyX
849 \begin_layout Labeling
850 \labelwidthstring 00.00.0000
851 \begin_inset Flex Code
854 \begin_layout Plain Layout
860 contains the standard \SpecialChar LyX
861 template files described in
862 \begin_inset CommandInset ref
864 reference "sub:Creating-Templates"
871 \begin_layout Labeling
872 \labelwidthstring 00.00.0000
873 \begin_inset Flex Code
876 \begin_layout Plain Layout
882 contains files with the extension
883 \begin_inset Flex Code
886 \begin_layout Plain Layout
892 that define the user interface to \SpecialChar LyX
894 That is, the files define which items appear in which menus and the items
895 appearing on the toolbar.
898 \begin_layout Subsection
899 Files you don't want to modify
902 \begin_layout Standard
903 These files are used internally by \SpecialChar LyX
904 and you generally do not need to modify
905 them unless you are a developer.
908 \begin_layout Labeling
909 \labelwidthstring 00.00.0000
910 \begin_inset Flex Code
913 \begin_layout Plain Layout
919 this file contains the list of \SpecialChar LyX
921 The contents are displayed with the menu entry
922 \begin_inset Flex MenuItem
925 \begin_layout Plain Layout
926 Help\SpecialChar menuseparator
940 \begin_layout Labeling
941 \labelwidthstring 00.00.0000
942 \begin_inset Flex Code
945 \begin_layout Plain Layout
951 this is a \SpecialChar LaTeX
952 script used during the configuration process.
956 \begin_layout Labeling
957 \labelwidthstring 00.00.0000
958 \begin_inset Flex Code
961 \begin_layout Plain Layout
967 this is a Python script that is used to re-configure \SpecialChar LyX
969 It creates configuration files in the directory it was run from.
972 \begin_layout Subsection
973 Other files needing a line or two
976 \begin_layout Labeling
977 \labelwidthstring 00.00.0000
978 \begin_inset Flex Code
981 \begin_layout Plain Layout
987 this contains tables describing how different character encodings can be
991 \begin_layout Labeling
992 \labelwidthstring 00.00.0000
993 \begin_inset Flex Code
996 \begin_layout Plain Layout
1002 this file contains the templates available to the new
1003 \begin_inset Flex MenuItem
1006 \begin_layout Plain Layout
1008 \begin_inset space ~
1017 \begin_inset CommandInset ref
1019 reference "chap:Including-External-Material"
1026 \begin_layout Labeling
1027 \labelwidthstring 00.00.0000
1028 \begin_inset Flex Code
1031 \begin_layout Plain Layout
1037 this file contains a list of all the languages currently supported by \SpecialChar LyX
1041 \begin_layout Labeling
1042 \labelwidthstring 00.00.0000
1043 \begin_inset Flex Code
1046 \begin_layout Plain Layout
1052 contains information about the supported fonts.
1055 \begin_layout Labeling
1056 \labelwidthstring 00.00.0000
1057 \begin_inset Flex Code
1060 \begin_layout Plain Layout
1066 this file contains translations for internationalized paragraph styles
1068 \begin_inset CommandInset ref
1070 reference "sub:I18n"
1077 \begin_layout Labeling
1078 \labelwidthstring 00.00.0000
1079 \begin_inset Flex Code
1082 \begin_layout Plain Layout
1088 this file contains information about unicode-encoded glyphs and the way
1089 they are supported by \SpecialChar LyX
1090 via \SpecialChar LaTeX
1094 \begin_layout Section
1095 Your local configuration directory
1098 \begin_layout Standard
1099 Even if you are using \SpecialChar LyX
1100 as an unprivileged user, you might want to change
1102 configuration for your own use.
1104 \begin_inset Flex Code
1107 \begin_layout Plain Layout
1113 directory contains all your personal configuration files.
1114 This is the directory described as
1115 \begin_inset Quotes eld
1119 \begin_inset Quotes erd
1123 \begin_inset Flex MenuItem
1126 \begin_layout Plain Layout
1127 Help\SpecialChar menuseparator
1129 \begin_inset space ~
1139 This directory is used as a mirror of
1140 \begin_inset Flex Code
1143 \begin_layout Plain Layout
1150 , which means that every file in
1151 \begin_inset Flex Code
1154 \begin_layout Plain Layout
1160 is a replacement for the corresponding file in
1161 \begin_inset Flex Code
1164 \begin_layout Plain Layout
1172 Any configuration file described in the above sections can be placed either
1173 in the system-wide directory, in which case it will affect all users, or
1174 in your local directory for your own use.
1177 \begin_layout Standard
1178 To make things clearer, let's provide a few examples:
1181 \begin_layout Itemize
1182 The preferences set in the
1183 \begin_inset Flex MenuItem
1186 \begin_layout Plain Layout
1187 Tools\SpecialChar menuseparator
1193 dialog are saved to a file
1194 \begin_inset Flex Code
1197 \begin_layout Plain Layout
1204 \begin_inset Flex Code
1207 \begin_layout Plain Layout
1216 \begin_layout Itemize
1217 When you reconfigure using
1218 \begin_inset Flex MenuItem
1221 \begin_layout Plain Layout
1222 Tools\SpecialChar menuseparator
1230 \begin_inset Flex Code
1233 \begin_layout Plain Layout
1239 script, and the resulting files are written in your local configuration
1241 This means that any additional text class file that you might have added
1243 \begin_inset Flex Code
1246 \begin_layout Plain Layout
1252 will be added to the list of classes in the
1253 \begin_inset Flex MenuItem
1256 \begin_layout Plain Layout
1257 Document\SpecialChar menuseparator
1266 \begin_layout Itemize
1267 If you get some updated documentation from \SpecialChar LyX
1268 ftp site and cannot install
1269 it because you do not have sysadmin rights on your system, you can just
1271 \begin_inset Flex Code
1274 \begin_layout Plain Layout
1280 and the items in the
1281 \begin_inset Flex MenuItem
1284 \begin_layout Plain Layout
1290 menu will open them!
1293 \begin_layout Section
1294 Running \SpecialChar LyX
1295 with multiple configurations
1298 \begin_layout Standard
1299 The configuration freedom of the local configuration directory may not suffice
1300 if you want to have more than one configuration at your disposal.
1301 For example, you may want to be use different key bindings or printer settings
1303 You can achieve this by having several such directories.
1304 You then specify which directory to use at run-time.
1307 \begin_layout Standard
1308 Invoking \SpecialChar LyX
1309 with the command line switch
1310 \begin_inset Flex Code
1313 \begin_layout Plain Layout
1323 instructs the program to read the configuration from that directory, and
1324 not from the default directory.
1325 (You can determine the default directory by running \SpecialChar LyX
1327 \begin_inset Flex Code
1330 \begin_layout Plain Layout
1336 switch.) If the specified directory does not exist, \SpecialChar LyX
1338 for you, just like it does for the default directory on the first time
1339 you run the program.
1340 You can modify the configuration options in this additional user directory
1341 exactly as you would for the default directory.
1342 These directories are completely independent (but read on).
1343 Note that setting the environment variable
1344 \begin_inset Flex Code
1347 \begin_layout Plain Layout
1353 to some value has exactly the same effect.
1356 \begin_layout Standard
1357 Having several configurations also requires more maintenance: if you want
1358 to add a new layout to
1359 \begin_inset Flex Code
1362 \begin_layout Plain Layout
1368 which you want available from all your configurations, you must add it
1369 to each directory separately.
1370 You can avoid this with the following trick: after \SpecialChar LyX
1371 creates the additional
1372 directory, most of the subdirectories (see above) are empty.
1373 If you want the new configuration to mirror an existing one, replace the
1374 empty subdirectory with a symbolic link to the matching subdirectory in
1375 the existing configuration.
1377 \begin_inset Flex Code
1380 \begin_layout Plain Layout
1386 subdirectory, however, since it contains a file written by the configuration
1387 script (also accessible through
1388 \begin_inset Flex MenuItem
1391 \begin_layout Plain Layout
1392 Tools\SpecialChar menuseparator
1398 ) which is configuration-specific.
1401 \begin_layout Chapter
1402 The Preferences dialog
1405 \begin_layout Standard
1406 All options of the preferences dialog are described in the Appendix
1408 The Preferences Dialog
1415 For some options you might find here more details.
1418 \begin_layout Section
1420 \begin_inset CommandInset label
1429 \begin_layout Standard
1430 The first step is to define your file formats if they are not already defined.
1432 \begin_inset Flex MenuItem
1435 \begin_layout Plain Layout
1436 Tools\SpecialChar menuseparator
1444 \begin_inset Flex MenuItem
1447 \begin_layout Plain Layout
1448 File Handling\SpecialChar menuseparator
1455 \begin_inset Flex MenuItem
1458 \begin_layout Plain Layout
1464 button to define your new format.
1466 \begin_inset Flex MenuItem
1469 \begin_layout Plain Layout
1475 field contains the name used to identify the format in the GUI.
1477 \begin_inset Flex MenuItem
1480 \begin_layout Plain Layout
1486 is used to identify the format internally.
1487 You will also need to enter a file extension.
1488 These are all required.
1490 \begin_inset Flex MenuItem
1493 \begin_layout Plain Layout
1499 field is used to provide a keyboard shortcut on the menus.
1500 (For example, pressing
1501 \begin_inset Flex MenuItem
1504 \begin_layout Plain Layout
1511 \begin_inset Flex MenuItem
1514 \begin_layout Plain Layout
1515 Document\SpecialChar menuseparator
1516 View (Other Formats)\SpecialChar menuseparator
1525 \begin_layout Standard
1527 \begin_inset Flex MenuItem
1530 \begin_layout Plain Layout
1537 \begin_inset Flex MenuItem
1540 \begin_layout Plain Layout
1547 For example, you might want to use
1548 \begin_inset Flex MenuItem
1551 \begin_layout Plain Layout
1557 to view PostScript files.
1558 You can enter the command needed to start the program in the corresponding
1560 In defining this command, you can use the four variables listed in the
1562 The viewer is launched when you view an image in \SpecialChar LyX
1564 \begin_inset Flex MenuItem
1567 \begin_layout Plain Layout
1568 Document\SpecialChar menuseparator
1575 The editor is for example launched when you right-click on an image and
1577 \begin_inset Flex MenuItem
1580 \begin_layout Plain Layout
1586 in the appearing context menu.
1589 \begin_layout Standard
1591 \begin_inset Flex MenuItem
1594 \begin_layout Plain Layout
1600 type of a format is optional, but if it is specified, it must be unique
1602 It is used to detect files of this format from the file contents.
1603 For some important file formats there is no MIME type officially registered
1605 \begin_inset CommandInset href
1608 target "http://www.iana.org/assignments/media-types/"
1613 Therefore \SpecialChar LyX
1614 uses the extended list of MIME types as specified by
1615 \begin_inset CommandInset href
1617 name "freedesktop.org"
1618 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1625 \begin_layout Standard
1627 \begin_inset Flex MenuItem
1630 \begin_layout Plain Layout
1636 option tells \SpecialChar LyX
1637 that a format is suitable for document export.
1638 If this is set and if a suitable conversion route exists (see
1639 \begin_inset CommandInset ref
1641 reference "sec:Converters"
1645 ), the format will appear in the
1646 \begin_inset Flex MenuItem
1649 \begin_layout Plain Layout
1650 File\SpecialChar menuseparator
1657 The format will also appear in the
1658 \begin_inset Flex MenuItem
1661 \begin_layout Plain Layout
1662 Document\SpecialChar menuseparator
1668 menu if a viewer is specified for the format.
1669 Pure image formats, such as
1670 \begin_inset Flex Code
1673 \begin_layout Plain Layout
1679 , should not use this option.
1680 Formats that can both represent vector graphics and documents like
1681 \begin_inset Flex Code
1684 \begin_layout Plain Layout
1693 \begin_layout Standard
1695 \begin_inset Flex MenuItem
1698 \begin_layout Plain Layout
1699 Vector graphics format
1704 tells \SpecialChar LyX
1705 that a format can contain vector graphics.
1706 This information is used to determine the target format of included graphics
1708 \begin_inset Flex MenuItem
1711 \begin_layout Plain Layout
1718 Included graphics may need to be converted to either
1719 \begin_inset Flex MenuItem
1722 \begin_layout Plain Layout
1729 \begin_inset Flex MenuItem
1732 \begin_layout Plain Layout
1739 \begin_inset Flex MenuItem
1742 \begin_layout Plain Layout
1749 \begin_inset Flex MenuItem
1752 \begin_layout Plain Layout
1758 cannot handle other image formats.
1759 If an included graphic is not already in
1760 \begin_inset Flex MenuItem
1763 \begin_layout Plain Layout
1770 \begin_inset Flex MenuItem
1773 \begin_layout Plain Layout
1780 \begin_inset Flex MenuItem
1783 \begin_layout Plain Layout
1789 format, it is converted to
1790 \begin_inset Flex MenuItem
1793 \begin_layout Plain Layout
1799 if the vector format option is set, and otherwise to
1800 \begin_inset Flex MenuItem
1803 \begin_layout Plain Layout
1812 \begin_layout Section
1816 \begin_layout Standard
1817 Since all conversions from one format to another take place in \SpecialChar LyX
1819 directory, it is sometimes necessary to modify a file before copying it
1820 to the temporary directory in order that the conversion may be performed.
1824 \begin_layout Plain Layout
1825 For example, the file may refer to other files—images, for example—using
1826 relative file names, and these may become invalid when the file is copied
1827 to the temporary directory.
1832 This is done by a Copier: It copies a file to (or from) the temporary directory
1833 and may modify it in the process.
1836 \begin_layout Standard
1837 The definitions of the copiers may use four variables:
1840 \begin_layout Labeling
1841 \labelwidthstring 00.00.0000
1842 \begin_inset Flex Code
1845 \begin_layout Plain Layout
1851 The \SpecialChar LyX
1852 system directory (e.
1853 \begin_inset space \thinspace{}
1857 \begin_inset space \space{}
1861 \begin_inset Flex MenuItem
1864 \begin_layout Plain Layout
1873 \begin_layout Labeling
1874 \labelwidthstring 00.00.0000
1875 \begin_inset Flex Code
1878 \begin_layout Plain Layout
1887 \begin_layout Labeling
1888 \labelwidthstring 00.00.0000
1889 \begin_inset Flex Code
1892 \begin_layout Plain Layout
1901 \begin_layout Labeling
1902 \labelwidthstring 00.00.0000
1903 \begin_inset Flex Code
1906 \begin_layout Plain Layout
1912 The base name (without filename extension) in the \SpecialChar LyX
1916 \begin_layout Labeling
1917 \labelwidthstring 00.00.0000
1918 \begin_inset Flex Code
1921 \begin_layout Plain Layout
1927 The full directory path of the \SpecialChar LyX
1931 \begin_layout Labeling
1932 \labelwidthstring 00.00.0000
1933 \begin_inset Flex Code
1936 \begin_layout Plain Layout
1942 The full pathname to the original \SpecialChar LyX
1943 file being processed
1946 \begin_layout Labeling
1947 \labelwidthstring 00.00.0000
1948 \begin_inset Flex Code
1951 \begin_layout Plain Layout
1957 The filename (without any directory path) of the \SpecialChar LyX
1961 \begin_layout Labeling
1962 \labelwidthstring 00.00.0000
1963 \begin_inset Flex Code
1966 \begin_layout Plain Layout
1972 The `\SpecialChar LaTeX
1976 \begin_layout Standard
1977 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1985 It is relevant only when exporting files suitable for such inclusion.
1988 \begin_layout Standard
1989 Copiers can be used to do almost anything with output files.
1990 For example, suppose you want generated pdf files to be copied to a special
1992 \begin_inset Flex Code
1995 \begin_layout Plain Layout
2002 Then you could write a shell script such as this one:
2005 \begin_layout Standard
2006 \begin_inset listings
2010 \begin_layout Plain Layout
2015 \begin_layout Plain Layout
2020 \begin_layout Plain Layout
2022 TOFILE=`basename $2`
2025 \begin_layout Plain Layout
2027 cp $FROMFILE /home/you/pdf/$TOFILE
2032 Save it in your local \SpecialChar LyX
2034 \begin_inset Flex Code
2037 \begin_layout Plain Layout
2038 /home/you/.lyx/scripts/pdfcopier.sh
2043 —and make it executable, if you need to do so on your platform.
2045 \begin_inset Flex MenuItem
2048 \begin_layout Plain Layout
2049 Tools\SpecialChar menuseparator
2055 dialog, select under
2056 \begin_inset Flex MenuItem
2059 \begin_layout Plain Layout
2060 File Handling\SpecialChar menuseparator
2067 \begin_inset Flex MenuItem
2070 \begin_layout Plain Layout
2076 format—or one of the other pdf formats—and enter
2077 \begin_inset Flex Code
2080 \begin_layout Plain Layout
2081 pdfcopier.sh $$i $$o
2087 \begin_inset Flex MenuItem
2090 \begin_layout Plain Layout
2100 \begin_layout Standard
2101 Copiers are used by \SpecialChar LyX
2102 in various of its own conversions.
2103 For example, if appropriate programs are found, \SpecialChar LyX
2104 will automatically install
2106 \begin_inset Flex MenuItem
2109 \begin_layout Plain Layout
2116 \begin_inset Flex MenuItem
2119 \begin_layout Plain Layout
2121 \begin_inset space ~
2130 When these formats are exported, the copier sees that not just the main
2131 HTML file but various associated files (style files, images, etc.) are also
2133 All these files are written to a subdirectory of the directory in which
2134 the original \SpecialChar LyX
2139 \begin_layout Plain Layout
2140 This copier can be customized.
2142 \begin_inset Quotes eld
2146 \begin_inset Quotes erd
2149 argument takes a comma-separated list of extensions to be copied; if it
2150 is omitted, all files will be copied.
2152 \begin_inset Quotes eld
2156 \begin_inset Quotes erd
2159 argument determines the extension added to the generated directory.
2161 \begin_inset Quotes eld
2165 \begin_inset Flex MenuItem
2168 \begin_layout Plain Layout
2176 \begin_inset Quotes erd
2179 , so HTML generated from
2180 \begin_inset Flex MenuItem
2183 \begin_layout Plain Layout
2184 /path/to/filename.lyx
2190 \begin_inset Flex MenuItem
2193 \begin_layout Plain Layout
2194 /path/to/filename.html.\SpecialChar LyX
2209 \begin_layout Section
2211 \begin_inset CommandInset label
2213 name "sec:Converters"
2220 \begin_layout Standard
2221 You can define your own Converters to convert files between different formats.
2223 \begin_inset Flex MenuItem
2226 \begin_layout Plain Layout
2227 Tools\SpecialChar menuseparator
2228 Preferences\SpecialChar menuseparator
2229 File Handling\SpecialChar menuseparator
2238 \begin_layout Standard
2239 To define a new converter, select the
2240 \begin_inset Flex MenuItem
2243 \begin_layout Plain Layout
2245 \begin_inset space ~
2254 \begin_inset Flex MenuItem
2257 \begin_layout Plain Layout
2259 \begin_inset space ~
2267 from the drop-down lists, enter the command needed for the conversion,
2269 \begin_inset Flex MenuItem
2272 \begin_layout Plain Layout
2279 Several variables can be used in the definition of converters:
2282 \begin_layout Labeling
2283 \labelwidthstring 00.00.0000
2284 \begin_inset Flex Code
2287 \begin_layout Plain Layout
2293 The \SpecialChar LyX
2297 \begin_layout Labeling
2298 \labelwidthstring 00.00.0000
2299 \begin_inset Flex Code
2302 \begin_layout Plain Layout
2311 \begin_layout Labeling
2312 \labelwidthstring 00.00.0000
2313 \begin_inset Flex Code
2316 \begin_layout Plain Layout
2325 \begin_layout Labeling
2326 \labelwidthstring 00.00.0000
2327 \begin_inset Flex Code
2330 \begin_layout Plain Layout
2336 The base filename of the input file (i.
2337 \begin_inset space \thinspace{}
2340 g., without the extension)
2343 \begin_layout Labeling
2344 \labelwidthstring 00.00.0000
2345 \begin_inset Flex Code
2348 \begin_layout Plain Layout
2354 The path to the input file
2357 \begin_layout Labeling
2358 \labelwidthstring 00.00.0000
2359 \begin_inset Flex Code
2362 \begin_layout Plain Layout
2368 The path to the original input file (this is different from $$p when a
2369 chain of converters is called)
2372 \begin_layout Labeling
2373 \labelwidthstring 00.00.0000
2374 \begin_inset Flex Code
2377 \begin_layout Plain Layout
2383 The iconv name for the encoding of the document.
2386 \begin_layout Standard
2388 \begin_inset Flex MenuItem
2391 \begin_layout Plain Layout
2393 \begin_inset space ~
2401 field you can enter the following flags, separated by commas:
2404 \begin_layout Labeling
2405 \labelwidthstring 00.00.0000
2406 \begin_inset Flex Code
2409 \begin_layout Plain Layout
2415 This converter runs some form of \SpecialChar LaTeX
2417 This will make \SpecialChar LyX
2418 's \SpecialChar LaTeX
2419 error logs available.
2422 \begin_layout Labeling
2423 \labelwidthstring 00.00.0000
2424 \begin_inset Flex Code
2427 \begin_layout Plain Layout
2433 Needs the \SpecialChar LaTeX
2435 \begin_inset Flex MenuItem
2438 \begin_layout Plain Layout
2444 file for the conversion.
2447 \begin_layout Labeling
2448 \labelwidthstring 00.00.0000
2449 \begin_inset Flex Code
2452 \begin_layout Plain Layout
2459 \begin_inset Quotes eld
2463 \begin_inset Quotes erd
2466 file from the backend, which in practice means a \SpecialChar LaTeX
2467 file like the one we
2468 would export, without
2469 \begin_inset Flex Code
2472 \begin_layout Plain Layout
2481 \begin_layout Labeling
2482 \labelwidthstring 00.00.0000
2483 \begin_inset Flex Code
2486 \begin_layout Plain Layout
2495 \begin_layout Standard
2496 The following three flags are not really flags at all because they take
2498 \begin_inset Flex MenuItem
2501 \begin_layout Plain Layout
2503 \begin_inset space ~
2507 \begin_inset space ~
2518 \begin_layout Labeling
2519 \labelwidthstring 00.00.0000
2520 \begin_inset Flex Code
2523 \begin_layout Plain Layout
2529 If set, the converter's standard error will be redirected to a file
2530 \begin_inset Flex Code
2533 \begin_layout Plain Layout
2539 , and the script given as argument will be run as:
2540 \begin_inset Flex Code
2543 \begin_layout Plain Layout
2544 script < infile.out > infile.log
2550 The argument may contain
2551 \begin_inset Flex Code
2554 \begin_layout Plain Layout
2563 \begin_layout Labeling
2564 \labelwidthstring 00.00.0000
2565 \begin_inset Flex Code
2568 \begin_layout Plain Layout
2574 The name of the directory in which the converter will dump the generated
2577 will not create this directory, and it does not copy anything into it,
2578 though it will copy this directory to the destination.
2579 The argument may contain
2580 \begin_inset Flex Code
2583 \begin_layout Plain Layout
2589 , which will be replaced by the base name of the input and output files,
2590 respectively, when the directory is copied.
2591 \begin_inset Newline newline
2594 Note that resultdir and usetempdir make no sense together.
2595 The latter will be ignored if the former is given.
2598 \begin_layout Labeling
2599 \labelwidthstring 00.00.0000
2600 \begin_inset Flex Code
2603 \begin_layout Plain Layout
2609 Determines the output file name and may, contain
2610 \begin_inset Flex Code
2613 \begin_layout Plain Layout
2620 Sensible only with resultdir and optional even then; if not given, it defaults
2624 \begin_layout Standard
2625 None of these last three are presently used in any of the converters that
2626 are installed with \SpecialChar LyX
2631 \begin_layout Standard
2632 You do not have to define converters for all formats between which you want
2634 For example, you will note that there is no `\SpecialChar LyX
2635 to PostScript' converter,
2636 but \SpecialChar LyX
2637 will export PostScript.
2638 It does so by first creating a \SpecialChar LaTeX
2639 file (no converter needs to be defined
2640 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2642 and finally converting the resulting DVI file to PostScript.
2644 finds such `chains' of converters automatically, and it will always choose
2645 the shortest possible chain.
2646 You can, though, still define multiple conversion methods between file
2648 For example, the standard \SpecialChar LyX
2649 configuration provides five ways to convert
2654 \begin_layout Enumerate
2656 \begin_inset Flex MenuItem
2659 \begin_layout Plain Layout
2668 \begin_layout Enumerate
2669 via (DVI and) PostScript, using
2670 \begin_inset Flex MenuItem
2673 \begin_layout Plain Layout
2682 \begin_layout Enumerate
2684 \begin_inset Flex MenuItem
2687 \begin_layout Plain Layout
2696 \begin_layout Enumerate
2698 \begin_inset Flex MenuItem
2701 \begin_layout Plain Layout
2711 \begin_layout Enumerate
2713 \begin_inset Flex MenuItem
2716 \begin_layout Plain Layout
2726 \begin_layout Standard
2727 To define such alternate chains, you must define multiple target `file formats',
2729 \begin_inset CommandInset ref
2731 reference "sec:Formats"
2736 For example, in the standard configuration, the formats named
2737 \begin_inset Flex MenuItem
2740 \begin_layout Plain Layout
2747 \begin_inset Flex MenuItem
2750 \begin_layout Plain Layout
2757 \begin_inset Flex MenuItem
2760 \begin_layout Plain Layout
2767 \begin_inset Flex MenuItem
2770 \begin_layout Plain Layout
2777 \begin_inset Flex MenuItem
2780 \begin_layout Plain Layout
2787 \begin_inset Flex MenuItem
2790 \begin_layout Plain Layout
2797 \begin_inset Flex MenuItem
2800 \begin_layout Plain Layout
2807 \begin_inset Flex MenuItem
2810 \begin_layout Plain Layout
2818 \begin_inset Flex MenuItem
2821 \begin_layout Plain Layout
2828 \begin_inset Flex MenuItem
2831 \begin_layout Plain Layout
2838 ) are defined, all of which share the extension
2839 \begin_inset Flex MenuItem
2842 \begin_layout Plain Layout
2848 , and which correspond to the conversion methods just mentioned.
2851 \begin_layout Chapter
2852 Internationalizing \SpecialChar LyX
2854 \begin_inset CommandInset label
2856 name "cha:Internationalizing-LyX"
2863 \begin_layout Standard
2865 supports using a translated interface.
2866 Last time we checked, \SpecialChar LyX
2867 provided text in thirty languages.
2868 The language of choice is called your
2873 (For further reading on locale settings, see also the documentation for
2874 locale that comes with your operating system.
2875 For Linux, the manual page for
2876 \begin_inset Flex Code
2879 \begin_layout Plain Layout
2885 could be a good place to start).
2888 \begin_layout Standard
2889 Notice that these translations will work, but do contain a few flaws.
2890 In particular, all dialogs have been designed with the English text in
2891 mind, which means that some of the translated text will be too large to
2892 fit within the space allocated.
2893 This is only a display problem and will not cause any harm.
2894 Also, you will find that some of the translations do not define shortcut
2895 keys for everything.
2896 Sometimes, there are simply not enough free letters to do it.
2897 Other times, the translator just hasn't got around to doing it yet.
2898 Our localization team, which you may wish to join,
2902 \begin_layout Plain Layout
2903 If you are a fluent speaker of a language other than English, joining these
2904 teams is a great way to give back to the \SpecialChar LyX
2910 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2914 \begin_layout Section
2915 Translating \SpecialChar LyX
2919 \begin_layout Subsection
2920 Translating the graphical user interface (text messages).
2923 \begin_layout Standard
2926 \begin_inset Flex Code
2929 \begin_layout Plain Layout
2935 library to handle the internationalization of the interface.
2936 To have \SpecialChar LyX
2937 speak your favorite language in all menus and dialogs, you need
2939 \begin_inset Flex Code
2942 \begin_layout Plain Layout
2948 -file for that language.
2949 When this is available, you'll have to generate a
2950 \begin_inset Flex Code
2953 \begin_layout Plain Layout
2959 -file from it and install the
2960 \begin_inset Flex Code
2963 \begin_layout Plain Layout
2970 The process of doing all of this is explained in the documentation for
2972 \begin_inset Flex Code
2975 \begin_layout Plain Layout
2982 It is possible to do this just for yourself, but if you're going to do
2983 it, you might as well share the results of your labors with the rest of
2984 the \SpecialChar LyX
2986 Send a message to the \SpecialChar LyX
2987 developers' list for more information about how
2991 \begin_layout Standard
2992 In short, this is what you should do (xx denotes the language code):
2995 \begin_layout Itemize
2996 Check out the \SpecialChar LyX
2999 \begin_inset CommandInset href
3001 name "information on the web"
3002 target "http://www.lyx.org/HowToUseSVN"
3009 \begin_layout Itemize
3011 \begin_inset Flex Code
3014 \begin_layout Plain Layout
3020 to the folder of the
3021 \begin_inset Flex Code
3024 \begin_layout Plain Layout
3032 \begin_inset Flex Code
3035 \begin_layout Plain Layout
3043 \begin_inset Flex Code
3046 \begin_layout Plain Layout
3052 doesn't exist anywhere, it can be remade with the console command
3053 \begin_inset Flex Code
3056 \begin_layout Plain Layout
3062 in that directory, or you can use an existing po-file for some other language
3066 \begin_layout Itemize
3068 \begin_inset Flex Code
3071 \begin_layout Plain Layout
3081 \begin_layout Plain Layout
3082 This is just a text file, so it can be edited in any text editor.
3083 But there are also specialized programs that support such editing, such
3088 (for all platforms) or
3097 contains a `mode' for editing
3098 \begin_inset Flex Code
3101 \begin_layout Plain Layout
3112 For some menu- and widget-labels, there are also shortcut keys that should
3114 Those keys are marked after a `|', and should be translated according to
3115 the words and phrases of the language.
3116 You should also fill also out the information at the beginning of the new
3118 \begin_inset Flex Code
3121 \begin_layout Plain Layout
3127 -file with your email-address, etc., so people know where to reach you with
3128 suggestions and entertaining flames.
3131 \begin_layout Standard
3132 If you are just doing this on your own, then:
3135 \begin_layout Itemize
3137 \begin_inset Flex Code
3140 \begin_layout Plain Layout
3147 This can be done with
3148 \begin_inset Flex Code
3151 \begin_layout Plain Layout
3152 msgfmt -o xx.mo < xx.po
3160 \begin_layout Itemize
3162 \begin_inset Flex Code
3165 \begin_layout Plain Layout
3171 -file to your locale-tree, at the correct directory for application messages
3176 xx, and under the name
3177 \begin_inset Flex Code
3180 \begin_layout Plain Layout
3187 \begin_inset space \thinspace{}
3191 \begin_inset space \space{}
3195 \begin_inset Flex Code
3198 \begin_layout Plain Layout
3199 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3209 \begin_layout Standard
3210 As said, however, it would be best if the new
3211 \begin_inset Flex Code
3214 \begin_layout Plain Layout
3220 -file could be added to the \SpecialChar LyX
3221 distribution, so others can use it.
3222 Adding it involves making additional changes to \SpecialChar LyX
3224 So send an email to the developers' mailing list if you're interested in
3228 \begin_layout Subsubsection
3232 \begin_layout Standard
3233 Sometimes it turns out that one English message needs to be translated into
3234 different messages in the target language.
3235 One example is the message
3236 \begin_inset Flex Code
3239 \begin_layout Plain Layout
3245 which has the German translation
3253 , depending upon exactly what the English
3254 \begin_inset Quotes eld
3258 \begin_inset Quotes erd
3263 \begin_inset Flex Code
3266 \begin_layout Plain Layout
3272 does not handle such ambiguous translations.
3273 Therefore you have to add some context information to the message: Instead
3275 \begin_inset Flex Code
3278 \begin_layout Plain Layout
3285 \begin_inset Flex Code
3288 \begin_layout Plain Layout
3289 To[[as in 'From format x to format y']]
3295 \begin_inset Flex Code
3298 \begin_layout Plain Layout
3299 To[[as in 'From page x to page y']].
3304 Now the two occurrences of
3305 \begin_inset Flex Code
3308 \begin_layout Plain Layout
3315 \begin_inset Flex Code
3318 \begin_layout Plain Layout
3324 and can be translated correctly to
3335 \begin_layout Standard
3336 Of course the context information needs to be stripped off the original
3337 message when no translation is used.
3338 Therefore you have to put it in double square brackets at the end of the
3339 message (see the example above).
3340 The translation mechanism of \SpecialChar LyX
3341 ensures that everything in double square
3342 brackets at the end of messages is removed before displaying the message.
3345 \begin_layout Subsection
3346 Translating the documentation.
3349 \begin_layout Standard
3350 The online documentation (in the
3351 \begin_inset Flex MenuItem
3354 \begin_layout Plain Layout
3360 -menu) can (and should!) be translated.
3361 If there are translated versions of the documentation available
3365 \begin_layout Plain Layout
3366 As of March 2008, at least some of the documents have been translated into
3367 fourteen languages, with the Tutorial available in a few more.
3372 and the locale is set accordingly, these will be used automagically by
3376 looks for translated versions as
3377 \begin_inset Flex Code
3380 \begin_layout Plain Layout
3382 Dir/doc/xx/DocName.lyx
3388 \begin_inset Flex Code
3391 \begin_layout Plain Layout
3397 is the code for the language currently in use.
3398 If there are no translated documents, the default English versions will
3400 Note that the translated versions must have the same filenames (
3401 \begin_inset Flex Code
3404 \begin_layout Plain Layout
3410 above) as the original.
3411 If you feel up to translating the documentation (an excellent way to proof-read
3412 the original documentation by the way!), there are a few things you should
3416 \begin_layout Itemize
3417 Check out the documentation translation web page at
3418 \begin_inset CommandInset href
3420 name "http://www.lyx.org/Translation"
3421 target "http://www.lyx.org/Translation"
3426 That way, you can find out which (if any) documents have already been translate
3427 d into your language.
3428 You can also find out who (if anyone) is organizing the effort to translate
3429 the documentation into your language.
3430 If no one is organizing the effort, please let us know that you're interested.
3433 \begin_layout Standard
3434 Once you get to actually translating, here's a few hints for you that may
3438 \begin_layout Itemize
3439 Join the documentation team! There is information on how to do that in
3440 \begin_inset Flex Code
3443 \begin_layout Plain Layout
3450 \begin_inset Flex MenuItem
3453 \begin_layout Plain Layout
3454 Help\SpecialChar menuseparator
3460 ), which by the way is the first document you should translate.
3463 \begin_layout Itemize
3464 Learn the typographic conventions for the language you are translating to.
3465 Typography is an ancient art and over the centuries, a great variety of
3466 conventions have developed throughout different parts of the world.
3467 Also study the professional terminology amongst typographers in your country.
3468 Inventing your own terminology will only confuse the users.
3471 (Warning! Typography is addictive!)
3474 \begin_layout Itemize
3475 Make a copy of the document.
3476 This will be your working copy.
3477 You can use this as your personal translated help-file by placing it in
3479 \begin_inset Flex Code
3482 \begin_layout Plain Layout
3491 \begin_layout Itemize
3492 Sometimes the original document (from the \SpecialChar LyX
3493 -team) will be updated.
3494 Use the source viewer at
3495 \begin_inset CommandInset href
3497 name "http://www.lyx.org/trac/timeline"
3498 target "http://www.lyx.org/trac/timeline"
3502 to see what has been changed.
3503 That way you can easily see which parts of the translated document need
3507 \begin_layout Standard
3508 If you ever find an error in the original document, fix it and notify the
3509 rest of the documentation team of the changes! (You didn't forget to join
3510 the documentation team, did you?)
3513 \begin_layout Standard
3514 \begin_inset Branch OutDated
3517 \begin_layout Section
3518 International Keyboard Support
3521 \begin_layout Standard
3524 [Editor's Note: The following section is by
3532 It needs to be fixed to conform to the new Documentation Style sheet and
3533 to make use of the new v1.0 features.
3534 The whole thing also needs to be merged with the section following it.-jw
3535 It may also be badly out of date.-rh (2008)]
3538 \begin_layout Subsection
3539 Defining Own Keymaps: Keymap File Format
3542 \begin_layout Standard
3543 Let's look at a keyboard definition file a little closer.
3544 It is a plain text file defining
3547 \begin_layout Itemize
3548 key-to-key or key-to-string translations
3551 \begin_layout Itemize
3555 \begin_layout Itemize
3556 dead keys exceptions
3559 \begin_layout Standard
3560 To define key-to-key or key-to-string translation, use this command:
3563 \begin_layout Quotation
3564 \begin_inset Flex Code
3567 \begin_layout Plain Layout
3576 \begin_inset Flex Code
3579 \begin_layout Plain Layout
3588 \begin_layout Standard
3590 \begin_inset Flex Code
3593 \begin_layout Plain Layout
3599 is the key to be translated and
3600 \begin_inset Flex Code
3603 \begin_layout Plain Layout
3609 is the string to be inserted into the document.
3610 To define dead keys, use:
3613 \begin_layout Quotation
3614 \begin_inset Flex Code
3617 \begin_layout Plain Layout
3626 \begin_inset Flex Code
3629 \begin_layout Plain Layout
3638 \begin_layout Standard
3640 \begin_inset Flex Code
3643 \begin_layout Plain Layout
3649 is a keyboard key and
3650 \begin_inset Flex Code
3653 \begin_layout Plain Layout
3660 The following dead keys are supported (shortcut name is in parentheses):
3663 \begin_layout Quotation
3667 \begin_inset space \hfill{}
3673 \begin_layout Quotation
3675 \begin_inset space \hfill{}
3681 \begin_layout Quotation
3683 \begin_inset space \hfill{}
3689 \begin_layout Quotation
3691 \begin_inset space \hfill{}
3697 \begin_layout Quotation
3699 \begin_inset space \hfill{}
3705 \begin_layout Quotation
3707 \begin_inset space \hfill{}
3714 \begin_layout Plain Layout
3726 \begin_layout Quotation
3728 \begin_inset space \hfill{}
3734 \begin_layout Quotation
3736 \begin_inset space \hfill{}
3743 \begin_layout Plain Layout
3755 \begin_layout Quotation
3757 \begin_inset space \hfill{}
3763 \begin_layout Quotation
3765 \begin_inset space \hfill{}
3771 \begin_layout Quotation
3773 \begin_inset space \hfill{}
3780 \begin_layout Plain Layout
3792 \begin_layout Quotation
3794 \begin_inset space \hfill{}
3801 \begin_layout Plain Layout
3813 \begin_layout Quotation
3815 \begin_inset space \hfill{}
3821 \begin_layout Quotation
3822 hungarian umlaut (hug)
3823 \begin_inset space \hfill{}
3829 \begin_layout Quotation
3831 \begin_inset space \hfill{}
3837 \begin_layout Quotation
3839 \begin_inset space \hfill{}
3846 \begin_layout Plain Layout
3858 \begin_layout Standard
3859 Since in many international keyboards there are exceptions to what some
3860 dead keys should do, you can define them using
3863 \begin_layout Quotation
3864 \begin_inset Flex Code
3867 \begin_layout Plain Layout
3875 deadkey key outstring
3878 \begin_layout Standard
3879 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3883 \begin_layout Quotation
3884 \begin_inset Flex Code
3887 \begin_layout Plain Layout
3900 \begin_layout Standard
3901 to make it work correctly.
3902 Also, you have to define as exceptions dead keys over i and j, to remove
3903 the dot from them before inserting an accent mark.
3904 I will change this when the time comes, but so far I haven't had time.
3907 \begin_layout Standard
3908 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3911 \begin_inset Flex Code
3914 \begin_layout Plain Layout
3920 have different meaning.
3922 \begin_inset Flex Code
3925 \begin_layout Plain Layout
3931 marks comments, quotes start and end \SpecialChar LaTeX
3933 To enter quote, you'll need to use
3934 \begin_inset Flex Code
3937 \begin_layout Plain Layout
3946 \begin_inset Flex Code
3949 \begin_layout Plain Layout
3956 \begin_inset Flex Code
3959 \begin_layout Plain Layout
3970 \begin_layout Standard
3971 If you make a keyboard description file that works for your language, please
3972 mail it to me, so I can include it in the next keymap distribution.
3975 \begin_layout Standard
3976 More keywords will be supported in keymap configuration file in future,
3980 \begin_layout Itemize
3981 \begin_inset Flex Code
3984 \begin_layout Plain Layout
3995 \begin_inset space \hfill{}
3999 \begin_inset Flex Code
4002 \begin_layout Plain Layout
4011 \begin_layout Itemize
4012 \begin_inset Flex Code
4015 \begin_layout Plain Layout
4026 \begin_inset space \hfill{}
4030 \begin_inset Flex Code
4033 \begin_layout Plain Layout
4039 an external keymap translation program
4042 \begin_layout Standard
4043 Also, it should look into
4044 \begin_inset Flex Code
4047 \begin_layout Plain Layout
4053 file for defaults, too (for example, a
4054 \begin_inset Flex Code
4057 \begin_layout Plain Layout
4065 option to include default keyboard).
4073 \begin_layout Section
4074 International Keymap Stuff
4075 \begin_inset CommandInset label
4077 name "sec:International-Keymap-Stuff"
4084 \begin_layout Standard
4085 \begin_inset Note Note
4088 \begin_layout Plain Layout
4089 In doing the revisions on this document in March 2008, I did not look over
4090 this stuff, as I do not understand it.
4091 It would be good if someone else could do so.
4100 \begin_layout Standard
4101 The next two sections describe the
4102 \begin_inset Flex Code
4105 \begin_layout Plain Layout
4114 \begin_inset Flex Code
4117 \begin_layout Plain Layout
4125 file syntax in detail.
4126 These sections should help you design your own key map if the ones provided
4127 do not meet your needs.
4130 \begin_layout Subsection
4134 \begin_layout Standard
4138 \begin_inset Flex Code
4141 \begin_layout Plain Layout
4147 file maps keystrokes to characters or strings.
4148 As the name suggests, it sets a keyboard mapping.
4150 \begin_inset Flex Code
4153 \begin_layout Plain Layout
4164 \begin_inset Flex Code
4167 \begin_layout Plain Layout
4182 \begin_inset Flex Code
4185 \begin_layout Plain Layout
4198 \begin_inset Flex Code
4201 \begin_layout Plain Layout
4210 \begin_inset Flex Code
4213 \begin_layout Plain Layout
4221 are described in this section.
4224 \begin_layout Labeling
4225 \labelwidthstring 00.00.0000
4226 \begin_inset Flex Code
4229 \begin_layout Plain Layout
4237 Map a character to a string
4240 \begin_layout LyX-Code
4255 \begin_layout Standard
4288 the double-quote (")
4305 must be escaped with a preceding backslash (
4316 \begin_layout Standard
4318 \begin_inset Flex MenuItem
4321 \begin_layout Plain Layout
4329 statement to cause the symbol
4330 \begin_inset Flex MenuItem
4333 \begin_layout Plain Layout
4341 to be output for the keystroke
4342 \begin_inset Flex MenuItem
4345 \begin_layout Plain Layout
4356 \begin_layout LyX-Code
4362 \begin_layout Labeling
4363 \labelwidthstring 00.00.0000
4364 \begin_inset Flex Code
4367 \begin_layout Plain Layout
4375 Specify an accent character
4378 \begin_layout LyX-Code
4387 \begin_layout Standard
4388 This will make the cha
4426 This is the dead key
4430 \begin_layout Plain Layout
4437 refers to a key that does not produce a character by itself, but when followed
4438 with another key, produces the desired accent character.
4439 For example, a German characte
4441 r with an umlaut like
4451 can be produced in this manner.
4460 \begin_layout Standard
4473 and then another key not in
4490 followed by the other, not allowed key, as output.
4494 \begin_inset Flex MenuItem
4497 \begin_layout Plain Layout
4505 cancels a dead key, so if
4516 \begin_inset Flex MenuItem
4519 \begin_layout Plain Layout
4528 , the cursor will not go one position backwards but will instead cancel
4544 might have had on the next keystroke.
4548 \begin_layout Standard
4549 The following example specifies that the character ' is to be an acute accent,
4550 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4553 \begin_layout LyX-Code
4556 kmod ' acute aeiouAEIOU
4559 \begin_layout Labeling
4560 \labelwidthstring 00.00.0000
4561 \begin_inset Flex Code
4564 \begin_layout Plain Layout
4570 Specify an exception to the accent character
4573 \begin_layout LyX-Code
4582 \begin_layout Standard
4583 This defines an exce
4624 have been assigned a keystroke with a previous
4627 \begin_inset Flex Code
4630 \begin_layout Plain Layout
4654 must not belong in the
4701 If such a declaration does not exist in
4709 \begin_inset Flex Code
4712 \begin_layout Plain Layout
4746 \begin_inset Flex Code
4749 \begin_layout Plain Layout
4763 \begin_layout Standard
4764 The following command produces causes äi to be produced when you enter acute-i
4768 \begin_layout LyX-Code
4782 \begin_layout Labeling
4783 \labelwidthstring 00.00.0000
4784 \begin_inset Flex Code
4787 \begin_layout Plain Layout
4793 Combine two accent characters
4796 \begin_layout LyX-Code
4802 accent1 accent2 allowed
4805 \begin_layout Standard
4806 This one is getting pretty esoteric.
4807 It allows you to combine the effect
4863 \begin_inset Flex Code
4866 \begin_layout Plain Layout
4894 \begin_layout Standard
4895 Consider this example from the
4896 \begin_inset Flex Code
4899 \begin_layout Plain Layout
4910 \begin_layout LyX-Code
4913 kmod ; acute aeioyvhAEIOYVH
4917 kcomb acute umlaut iyIY
4920 \begin_layout Standard
4921 This allows you to press
4922 \begin_inset Flex MenuItem
4925 \begin_layout Plain Layout
4933 and get the effect of
4934 \begin_inset Flex Code
4937 \begin_layout Plain Layout
4956 in this case cancels the last dead key, so if you press
4957 \begin_inset Flex MenuItem
4960 \begin_layout Plain Layout
4969 \begin_inset Flex Code
4972 \begin_layout Plain Layout
4985 \begin_layout Subsection
4989 \begin_layout Standard
4991 \begin_inset Flex Code
4994 \begin_layout Plain Layout
5002 mapping is performed, a
5003 \begin_inset Flex Code
5006 \begin_layout Plain Layout
5016 file maps the strings that the symbols generate to characters in the current
5018 The \SpecialChar LyX
5019 distribution currently includes at least the
5020 \begin_inset Flex Code
5023 \begin_layout Plain Layout
5032 \begin_inset Flex Code
5035 \begin_layout Plain Layout
5046 \begin_layout Standard
5048 \begin_inset Flex Code
5051 \begin_layout Plain Layout
5059 file is a sequence of declarations of the form
5062 \begin_layout LyX-Code
5075 \begin_layout Standard
5076 For example, in order to map
5077 \begin_inset Flex MenuItem
5080 \begin_layout Plain Layout
5090 to the corresponding character in the iso-8859-1 set (233), the following
5094 \begin_layout LyX-Code
5102 \begin_layout Standard
5104 \begin_inset Flex Code
5107 \begin_layout Plain Layout
5116 \begin_inset Flex Code
5119 \begin_layout Plain Layout
5137 the same character can apply to more than one string.
5139 \begin_inset Flex Code
5142 \begin_layout Plain Layout
5153 \begin_layout LyX-Code
5165 \begin_inset Newline newline
5181 \begin_layout Standard
5183 cannot find a mapping for the string produced by the keystroke or a
5184 deadkey sequence, it will check if it looks like an accented char and try
5185 to draw an accent over the character on screen.
5188 \begin_layout Subsection
5192 \begin_layout Standard
5193 There is a second way to add support for international characters through
5194 so-called dead-keys.
5195 A dead-key works in combination with a letter to produce an accented character.
5196 Here, we'll explain how to create a really simple dead-key to illustrate
5200 \begin_layout Standard
5201 Suppose you happen to need the circumflex character,
5202 \begin_inset Quotes eld
5206 \begin_inset Quotes erd
5211 \begin_inset Flex MenuItem
5214 \begin_layout Plain Layout
5221 \begin_inset space ~
5225 \begin_inset Flex MenuItem
5228 \begin_layout Plain Layout
5234 ] to the \SpecialChar LyX
5236 \begin_inset Flex Code
5239 \begin_layout Plain Layout
5246 \begin_inset Flex Code
5249 \begin_layout Plain Layout
5256 Now, whenever you type the
5257 \begin_inset Flex MenuItem
5260 \begin_layout Plain Layout
5266 -key followed by a letter, that letter will have a circumflex accent on
5268 For example, the sequence
5269 \begin_inset Quotes eld
5273 \begin_inset Flex MenuItem
5276 \begin_layout Plain Layout
5283 \begin_inset Quotes erd
5286 produces the letter:
5287 \begin_inset Quotes eld
5291 \begin_inset Quotes erd
5295 If you tried to type
5296 \begin_inset Quotes eld
5300 \begin_inset Flex MenuItem
5303 \begin_layout Plain Layout
5310 \begin_inset Quotes erd
5313 , however, \SpecialChar LyX
5314 will complain with a beep, since a
5315 \begin_inset Quotes eld
5319 \begin_inset Flex MenuItem
5322 \begin_layout Plain Layout
5329 \begin_inset Quotes erd
5332 never takes a circumflex accent.
5334 \begin_inset Flex MenuItem
5337 \begin_layout Plain Layout
5343 after a dead-key produces the bare-accent.
5344 Please note this last point! If you bind a key to a dead-key, you'll need
5345 to rebind the character on that key to yet another key.
5347 \begin_inset Flex MenuItem
5350 \begin_layout Plain Layout
5356 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5359 \begin_layout Standard
5360 One common way to bind dead-keys is to use
5361 \begin_inset Flex MenuItem
5364 \begin_layout Plain Layout
5371 \begin_inset Flex MenuItem
5374 \begin_layout Plain Layout
5381 \begin_inset Flex MenuItem
5384 \begin_layout Plain Layout
5390 in combination with an accent, like
5391 \begin_inset Quotes eld
5395 \begin_inset Flex MenuItem
5398 \begin_layout Plain Layout
5405 \begin_inset Quotes erd
5409 \begin_inset Quotes eld
5413 \begin_inset Flex MenuItem
5416 \begin_layout Plain Layout
5423 \begin_inset Quotes erd
5427 \begin_inset Quotes eld
5431 \begin_inset Flex MenuItem
5434 \begin_layout Plain Layout
5441 \begin_inset Quotes erd
5445 Another way involves using
5446 \begin_inset Flex Code
5449 \begin_layout Plain Layout
5456 \begin_inset Flex Code
5459 \begin_layout Plain Layout
5465 to set up the special
5466 \begin_inset Flex Code
5469 \begin_layout Plain Layout
5477 \begin_inset Flex Code
5480 \begin_layout Plain Layout
5486 acts in some ways just like
5487 \begin_inset Flex MenuItem
5490 \begin_layout Plain Layout
5496 and permits you to bind keys to accented characters.
5497 You can also turn keys into dead-keys by binding them to something like
5499 \begin_inset Flex Code
5502 \begin_layout Plain Layout
5508 and then binding this symbolic key to the corresponding \SpecialChar LyX
5513 \begin_layout Plain Layout
5518 : This is exactly what I do in my
5519 \begin_inset Flex Code
5522 \begin_layout Plain Layout
5529 \begin_inset Flex Code
5532 \begin_layout Plain Layout
5540 \begin_inset Flex MenuItem
5543 \begin_layout Plain Layout
5545 \begin_inset space ~
5554 \begin_inset Flex Code
5557 \begin_layout Plain Layout
5563 and a bunch of these
5564 \begin_inset Quotes eld
5568 \begin_inset Flex Code
5571 \begin_layout Plain Layout
5578 \begin_inset Quotes erd
5581 symbolic keys bound such things as
5582 \begin_inset Flex MenuItem
5585 \begin_layout Plain Layout
5587 \begin_inset space ~
5596 \begin_inset Flex MenuItem
5599 \begin_layout Plain Layout
5601 \begin_inset space ~
5610 This is how I produce my accented characters.
5615 You can make just about anything into the
5616 \begin_inset Flex Code
5619 \begin_layout Plain Layout
5626 \begin_inset Flex MenuItem
5629 \begin_layout Plain Layout
5635 keys, a spare function key, etc.
5636 As for the \SpecialChar LyX
5637 commands that produce accents, check the entry for
5638 \begin_inset Flex Code
5641 \begin_layout Plain Layout
5652 You'll find the complete list there.
5655 \begin_layout Subsection
5656 Saving your Language Configuration
5659 \begin_layout Standard
5660 You can edit your preferences so that your desired language environment
5661 is automatically configured when \SpecialChar LyX
5663 \begin_inset Flex MenuItem
5666 \begin_layout Plain Layout
5667 Edit\SpecialChar menuseparator
5676 \begin_layout Chapter
5677 Installing New Document Classes, Layouts, and Templates
5678 \begin_inset CommandInset label
5680 name "cha:Installing-New-Document"
5685 \begin_inset Argument 1
5688 \begin_layout Plain Layout
5689 Installing New Document Classes
5697 \begin_layout Standard
5698 In this chapter, we describe the procedures for creating and installing
5699 new \SpecialChar LyX
5700 layout and template files, as well as offer a refresher on correctly
5701 installing new \SpecialChar LaTeX
5706 \begin_layout Standard
5707 First, let us a say a few words about how one ought to think about the relation
5708 between \SpecialChar LyX
5709 and \SpecialChar LaTeX
5711 The thing to understand is that, in a certain sense, \SpecialChar LyX
5712 doesn't know anything
5713 about \SpecialChar LaTeX
5715 Indeed, from \SpecialChar LyX
5716 's point of view, \SpecialChar LaTeX
5717 is just one of several
5718 \begin_inset Quotes eld
5722 \begin_inset Quotes erd
5725 in which it is capable of producing output.
5726 Other such formats are DocBook, plaintext, and XHTML.
5728 is, of course, a particularly important format, but very little of the
5729 information \SpecialChar LyX
5730 has about \SpecialChar LaTeX
5731 is actually contained in the program itself.
5735 \begin_layout Plain Layout
5736 Some commands are sufficiently complex that they are
5737 \begin_inset Quotes eld
5741 \begin_inset Quotes erd
5744 into \SpecialChar LyX
5746 But the developers generally regard this as a Bad Thing.
5751 Rather, that information, even for the standard classes like
5752 \begin_inset Flex Code
5755 \begin_layout Plain Layout
5761 , is contained in `layout files'.
5762 Similarly, \SpecialChar LyX
5763 itself does not know much about DocBook or XHTML.
5764 What it knows is contained in layout files.
5767 \begin_layout Standard
5768 You can think of the layout file for a given document class as a translation
5769 manual between \SpecialChar LyX
5770 constructs—paragraphs with their corresponding styles,
5771 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5774 Almost everything \SpecialChar LyX
5776 \begin_inset Flex Code
5779 \begin_layout Plain Layout
5785 , for example, is contained in the file
5786 \begin_inset Flex Code
5789 \begin_layout Plain Layout
5795 and in various other files it includes.
5796 For this reason, anyone intending to write layout files should plan to
5797 study the existing files.
5798 A good place to start is with
5799 \begin_inset Flex Code
5802 \begin_layout Plain Layout
5808 , which is included in
5809 \begin_inset Flex Code
5812 \begin_layout Plain Layout
5819 \begin_inset Flex Code
5822 \begin_layout Plain Layout
5828 , and many of the other layout files for document classes.
5829 This file is where sections and the like are defined:
5830 \begin_inset Flex Code
5833 \begin_layout Plain Layout
5839 tells \SpecialChar LyX
5840 how paragraphs that are marked with the Section, Subsection, etc,
5841 styles can be translated into corresponding \SpecialChar LaTeX
5842 , DocBook, and XHTML commands
5845 \begin_inset Flex Code
5848 \begin_layout Plain Layout
5854 file basically just includes several of these
5855 \begin_inset Flex Code
5858 \begin_layout Plain Layout
5867 \begin_layout Standard
5868 Defining the \SpecialChar LyX
5870 correspondence is not the only thing layout files do, though.
5871 Their other job is to define how the \SpecialChar LyX
5872 constructs themselves will appear
5874 The fact that layout files have these two jobs is often a source of confusion,
5875 because they are completely separate.
5876 Telling \SpecialChar LyX
5877 how to translate a certain paragraph style into \SpecialChar LaTeX
5880 how to display it; conversely, telling \SpecialChar LyX
5881 how to display a certain paragraph
5882 style does not tell \SpecialChar LyX
5883 how to translate it into \SpecialChar LaTeX
5884 (let alone tell \SpecialChar LaTeX
5887 So, in general, when you define a new \SpecialChar LyX
5888 construct, you must always do two
5889 quite separate things: (i)
5890 \begin_inset space ~
5893 tell \SpecialChar LyX
5894 how to translate it into \SpecialChar LaTeX
5896 \begin_inset space ~
5899 tell \SpecialChar LyX
5903 \begin_layout Standard
5904 Much the same is true, of course, as regards \SpecialChar LyX
5905 's other backend formats, though
5906 XHTML is in some ways different, because in that case \SpecialChar LyX
5911 able, to some extent, to use information about how it should display a
5912 paragraph on the screen to output information (in the form of CSS) about
5913 how the paragraph should be displayed in a browser.
5914 Even in this case, however, the distinction between what \SpecialChar LyX
5916 and how things are rendered externally remains in force, and the two can
5917 be controlled separately.
5919 \begin_inset CommandInset ref
5921 reference "sec:Tags-for-XHTML"
5928 \begin_layout Section
5929 Installing new \SpecialChar LaTeX
5933 \begin_layout Standard
5934 Some installations may not include a \SpecialChar LaTeX
5935 package or class file that you would
5936 like to use within \SpecialChar LyX
5938 For example, you might need Foil\SpecialChar TeX
5939 , a package for preparing slides for overhead
5941 Modern \SpecialChar LaTeX
5942 distributions like \SpecialChar TeX
5943 Live (2008 or newer) or MiK\SpecialChar TeX
5944 provide a user interface
5945 for installing such packages.
5946 For example, with MiK\SpecialChar TeX
5947 , you start the program
5948 \begin_inset Quotes eld
5952 \begin_inset space ~
5956 \begin_inset Quotes erd
5959 to get a list of available packages.
5960 To install one of them, right click on it or use the corresponding toolbar
5964 \begin_layout Standard
5965 If your \SpecialChar LaTeX
5966 distribution does not provide such a `package manager', or if the
5967 package is not available from your distribution, then follow these steps
5968 to install it manually:
5971 \begin_layout Enumerate
5972 Get the package from
5973 \begin_inset CommandInset href
5976 target "http://www.ctan.org/"
5983 \begin_layout Enumerate
5984 If the package contains a file with the ending
5985 \begin_inset Quotes eld
5989 \begin_inset Flex Code
5992 \begin_layout Plain Layout
5999 \begin_inset Quotes erd
6002 (is the case for Foil\SpecialChar TeX
6003 ) then open a console, change to the folder of this
6004 file and execute the command
6005 \begin_inset Flex Code
6008 \begin_layout Plain Layout
6015 You have now unpacked the package and have all files to install it.
6016 Most \SpecialChar LaTeX
6017 -packages are not packed and you can skip this step.
6020 \begin_layout Enumerate
6021 Now you need to decide if the package should be available for all users
6023 \begin_inset Separator parbreak
6030 \begin_layout Enumerate
6031 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
6032 for all users on your system, then install it in your `local' \SpecialChar TeX
6034 install it in your own `user' \SpecialChar TeX
6036 Where these trees should be created, if they do not already exist, depends
6038 To find this out, look in the file
6039 \begin_inset Flex Code
6042 \begin_layout Plain Layout
6052 \begin_layout Plain Layout
6053 This is usually in the directory
6054 \begin_inset Flex Code
6057 \begin_layout Plain Layout
6063 , though you can execute the command
6064 \begin_inset Flex Code
6067 \begin_layout Plain Layout
6078 The location of the `local' \SpecialChar TeX
6079 tree is defined by the
6080 \begin_inset Flex Code
6083 \begin_layout Plain Layout
6089 variable; this is usually somewhere like
6090 \begin_inset Flex Code
6093 \begin_layout Plain Layout
6094 /usr/local/share/texmf
6100 The location of the `user' \SpecialChar TeX
6102 \begin_inset Flex Code
6105 \begin_layout Plain Layout
6112 \begin_inset Flex Code
6115 \begin_layout Plain Layout
6122 (If these variables are not predefined, you have to define them.) You'll
6123 probably need root permissions to create or modify the `local' tree, but
6124 not for your `user' tree.
6125 \begin_inset Newline newline
6128 In general, it is recommended to install in the user tree because your user
6129 will not be modified or even overwritten when you upgrade your system.
6130 It will typically also be backed up together with everything else when
6131 you backup your home directory (which, of course, you do on a regular basis).
6134 \begin_layout Enumerate
6135 On Windows, if you want the new package to be available for all users on
6136 your system, change to the folder where \SpecialChar LaTeX
6137 is installed and then change to
6139 \begin_inset Flex Code
6142 \begin_layout Plain Layout
6153 (For MiK\SpecialChar TeX
6154 , this would be by default the folder
6155 \begin_inset Flex Code
6158 \begin_layout Plain Layout
6177 \begin_layout Plain Layout
6178 Note that this will be the correct path only on English installations.
6179 On a German one, it would be
6180 \begin_inset Flex Code
6183 \begin_layout Plain Layout
6198 , and similarly for other languages.
6203 Create there a new folder
6204 \begin_inset Flex Code
6207 \begin_layout Plain Layout
6213 and copy all files of the package into it.
6215 \begin_inset Newline newline
6218 If the package should only available for you or you don't have admin permissions
6219 , do the same, but in the local \SpecialChar LaTeX
6222 \begin_inset space \thinspace{}
6225 g., for MiK\SpecialChar TeX
6227 \begin_inset space ~
6230 2.8 under Windows XP, this would be the folder:
6231 \begin_inset Newline newline
6237 \begin_inset Flex Code
6240 \begin_layout Plain Layout
6243 Documents and Settings
6255 \begin_inset Newline newline
6261 \begin_inset Phantom HPhantom
6264 \begin_layout Plain Layout
6275 \begin_inset Flex Code
6278 \begin_layout Plain Layout
6292 \begin_inset Newline newline
6295 On Vista, it would be:
6296 \begin_inset Newline newline
6300 \begin_inset Flex Code
6303 \begin_layout Plain Layout
6330 \begin_layout Enumerate
6331 Now one only need to tell \SpecialChar LaTeX
6332 that there are new files.
6333 This depends on the used \SpecialChar LaTeX
6335 \begin_inset Separator parbreak
6342 \begin_layout Enumerate
6343 For \SpecialChar TeX
6344 Live execute the command
6345 \begin_inset Flex Code
6348 \begin_layout Plain Layout
6355 If you installed the package for all users, then you will probably need
6356 to have root permissions for that.
6359 \begin_layout Enumerate
6360 For MiK\SpecialChar TeX
6361 , if you have installed the package for all users, start the program
6363 \begin_inset Quotes eld
6367 \begin_inset space ~
6371 \begin_inset Quotes erd
6374 and press the button marked
6375 \begin_inset Quotes eld
6379 \begin_inset Quotes erd
6383 Otherwise start the program
6384 \begin_inset Quotes eld
6388 \begin_inset Quotes erd
6395 \begin_layout Enumerate
6396 Finally, you need to tell \SpecialChar LyX
6397 that there are new packages available.
6398 So, in \SpecialChar LyX
6400 \begin_inset Flex MenuItem
6403 \begin_layout Plain Layout
6406 \SpecialChar menuseparator
6412 and then restart \SpecialChar LyX
6416 \begin_layout Standard
6417 Now the package is installed.
6418 In our example, the document class
6419 \begin_inset Flex Code
6422 \begin_layout Plain Layout
6424 \begin_inset space ~
6431 \begin_layout Plain Layout
6443 will now be available under
6444 \begin_inset Flex MenuItem
6447 \begin_layout Plain Layout
6448 Document\SpecialChar menuseparator
6449 Settings\SpecialChar menuseparator
6459 \begin_layout Standard
6460 If you would like to use a \SpecialChar LaTeX
6461 document class that is not even listed in the
6463 \begin_inset Flex MenuItem
6466 \begin_layout Plain Layout
6467 Document\SpecialChar menuseparator
6468 Settings\SpecialChar menuseparator
6474 , then you need to create a `layout' file for it.
6475 That is the topic of the next section.
6478 \begin_layout Section
6479 Types of layout files
6482 \begin_layout Standard
6483 This section describes the various sorts of \SpecialChar LyX
6484 files that contain layout informati
6486 These files describe various paragraph and character styles, determining
6487 how \SpecialChar LyX
6488 should display them and how they should be translated into \SpecialChar LaTeX
6490 XHTML, or whatever output format is being used.
6494 \begin_layout Standard
6495 We shall try to provide a thorough description of the process of writing
6497 However, there are so many different types of documents supported even
6498 by just \SpecialChar LaTeX
6499 that we can't hope to cover every different possibility or problem
6500 you might encounter.
6501 The \SpecialChar LyX
6502 users' list is frequented by people with lots of experience with layout
6503 design who are willing to share what they've learned, so please feel free
6504 to ask questions there.
6507 \begin_layout Standard
6508 As you prepare to write a new layout, it is extremely helpful to look at
6509 the layouts distributed with \SpecialChar LyX
6511 If you write a \SpecialChar LyX
6512 layout for a \SpecialChar LaTeX
6513 document class that might also be used by
6514 others, or write a module that might be useful to others, then you should
6515 consider posting your layout to the
6516 \begin_inset CommandInset href
6518 name "layout section on the LyX wiki"
6519 target "http://wiki.lyx.org/Layouts/Layouts"
6523 or even to the \SpecialChar LyX
6524 developers' list, so that it might be included in \SpecialChar LyX
6529 \begin_layout Plain Layout
6530 Note that \SpecialChar LyX
6531 is licensed under the General Public License, so any material
6532 that is contributed to \SpecialChar LyX
6533 must be similarly licensed.
6541 \begin_layout Subsection
6543 \begin_inset CommandInset label
6545 name "sub:Layout-modules"
6552 \begin_layout Standard
6553 We have spoken to this point about `layout files'.
6554 But there are different sorts of files that contain layout information.
6555 Layout files, strictly so called, have the
6556 \begin_inset Flex Code
6559 \begin_layout Plain Layout
6565 extension and provide \SpecialChar LyX
6566 with information about document classes.
6567 Since \SpecialChar LyX
6568 1.6 layout information can also be contained in layout
6573 \begin_inset Flex Code
6576 \begin_layout Plain Layout
6583 Modules are to \SpecialChar LaTeX
6584 packages much as layouts are to \SpecialChar LaTeX
6585 classes, and some modules—such
6587 \begin_inset Flex Code
6590 \begin_layout Plain Layout
6596 module—specifically provide support for one package.
6597 In a sense, layout modules are similar to included
6601 \begin_layout Plain Layout
6602 These can have any extension, but by convention have the
6603 \begin_inset Flex Code
6606 \begin_layout Plain Layout
6618 \begin_inset Flex Code
6621 \begin_layout Plain Layout
6627 —in that modules are not specific to a given document class but may be used
6628 with many different classes.
6629 The difference is that using an included file with
6630 \begin_inset Flex Code
6633 \begin_layout Plain Layout
6639 requires editing that file.
6640 Modules, by contrast, are selected in the
6641 \begin_inset Flex MenuItem
6644 \begin_layout Plain Layout
6645 Document\SpecialChar menuseparator
6654 \begin_layout Standard
6655 Building modules is the easiest way to get started with layout editing,
6656 since it can be as simple as adding a single new paragraph style or flex
6658 But modules may, in principle, contain anything a layout file can contain.
6661 \begin_layout Standard
6662 After creating a new module and copying it to the
6663 \begin_inset Flex Code
6666 \begin_layout Plain Layout
6672 folder, you will need to reconfigure and then restart \SpecialChar LyX
6675 However, changes you make to the module will be seen immediately, if you
6677 \begin_inset Flex MenuItem
6680 \begin_layout Plain Layout
6681 Document\SpecialChar menuseparator
6687 , highlight something, and then hit
6688 \begin_inset Quotes eld
6692 \begin_inset Quotes erd
6698 It is strongly recommended that you save your work before doing this
6703 it is strongly recommended that you not attempt to edit modules while simultaneo
6704 usly working on actual documents
6707 Though of course the developers strive to keep \SpecialChar LyX
6708 stable in such situations,
6709 syntax errors and the like in your module file could cause strange behavior.
6712 \begin_layout Subsubsection
6716 \begin_layout Standard
6717 Modules are to \SpecialChar LyX
6718 as packages are to \SpecialChar LaTeX
6720 Sometimes, however, you find yourself wanting a specific inset or character
6721 style just for one document and writing a module that will also be available
6722 to other documents makes little sense.
6723 What you need is \SpecialChar LyX
6725 \begin_inset Quotes eld
6729 \begin_inset Quotes erd
6735 \begin_layout Standard
6736 You will find it under
6738 Document\SpecialChar menuseparator
6739 Settings\SpecialChar menuseparator
6743 The large text box allows you to enter anything that you might enter in
6744 a layout file or module.
6745 You can think of a document's local layout, in fact, as a module that belongs
6747 So, in particular, you must enter a
6748 \begin_inset Flex Code
6751 \begin_layout Plain Layout
6758 Any format is acceptable, but one would normally use the format current
6760 (In \SpecialChar LyX
6761 2.1, the current layout format is 48.) You should be aware that local
6762 layout is not supported by versions of \SpecialChar LyX
6763 prior to 1.6, so you should not
6764 use it if you want to be able to export your document to \SpecialChar LyX
6766 (without, that is, losing the local layout information).
6767 If you wish to be able to export to 1.6—local layout is supported in 1.6,
6768 though there is no UI for it—then you should use format 11 and, of course,
6769 use only layout constructs that were available in \SpecialChar LyX
6773 \begin_layout Standard
6774 When you have entered something in the
6775 \begin_inset Flex Code
6778 \begin_layout Plain Layout
6784 pane, \SpecialChar LyX
6786 \begin_inset Quotes eld
6790 \begin_inset Quotes erd
6793 button at the bottom.
6794 Clicking this button will cause \SpecialChar LyX
6795 to determine whether what you have entered
6796 is valid layout information for the chosen format.
6798 will report the result but, unfortunately, will not tell you what errors
6799 there might have been.
6800 These will be written to the terminal, however, if \SpecialChar LyX
6801 is started from a terminal.
6802 You will not be permitted to save your local layout until you have entered
6806 \begin_layout Standard
6807 The warnings at the end of the previous section apply here, too.
6808 Do not play with local layout while you are actually working, especially
6809 if you have not saved your document.
6810 That said, using local layout with a test document can be a very convenient
6811 way to try out layout ideas, or even to start developing a module.
6814 \begin_layout Subsection
6816 \begin_inset Flex MenuItem
6819 \begin_layout Plain Layout
6828 \begin_layout Standard
6829 There are two situations you are likely to encounter when wanting to support
6830 a new \SpecialChar LaTeX
6831 document class, involving style (
6832 \begin_inset Flex Code
6835 \begin_layout Plain Layout
6841 ) files and \SpecialChar LaTeX2e
6843 \begin_inset Flex Code
6846 \begin_layout Plain Layout
6853 Supporting a style file is usually fairly easy.
6854 Supporting a new class file is a bit harder.
6855 We'll discuss the former in this section and the latter in the next.
6856 Similar remarks apply, of course, if you want to support a new DocBook
6860 \begin_layout Standard
6861 The easier case is the one in which your new document class is provided
6862 as a style file that is to be used in conjunction with an already supported
6864 For the sake of the example, we'll assume that the style file is called
6866 \begin_inset Flex MenuItem
6869 \begin_layout Plain Layout
6875 and that it is meant to be used with
6876 \begin_inset Flex MenuItem
6879 \begin_layout Plain Layout
6885 , which is a standard class.
6889 \begin_layout Standard
6890 Start by copying the existing class's layout file into your local directory:
6894 \begin_layout Plain Layout
6895 Of course, which directory is your local directory will vary by platform,
6896 and \SpecialChar LyX
6897 allows you to specify your local directory on startup, too, using
6899 \begin_inset Flex Code
6902 \begin_layout Plain Layout
6916 \begin_layout LyX-Code
6917 cp report.layout ~/.lyx/layouts/myclass.layout
6920 \begin_layout Standard
6922 \begin_inset Flex Code
6925 \begin_layout Plain Layout
6931 and change the line:
6934 \begin_layout LyX-Code
6937 Declare\SpecialChar LaTeX
6941 \begin_layout Standard
6945 \begin_layout LyX-Code
6948 Declare\SpecialChar LaTeX
6949 Class[report, myclass.sty]{report (myclass)}
6952 \begin_layout Standard
6956 \begin_layout LyX-Code
6958 \begin_inset Newline newline
6964 \begin_inset Newline newline
6970 \begin_layout Standard
6971 near the top of the file.
6974 \begin_layout Standard
6975 Start \SpecialChar LyX
6977 \begin_inset Flex MenuItem
6980 \begin_layout Plain Layout
6981 Tools\SpecialChar menuseparator
6988 Then restart \SpecialChar LyX
6989 and try creating a new document.
6991 \begin_inset Flex MenuItem
6994 \begin_layout Plain Layout
7000 " as a document class option in the
7001 \begin_inset Flex MenuItem
7004 \begin_layout Plain Layout
7005 Document\SpecialChar menuseparator
7012 It is likely that some of the sectioning commands and such in your new
7013 class will work differently from how they worked in the base class—
7014 \begin_inset Flex Code
7017 \begin_layout Plain Layout
7023 in this example—so you can fiddle around with the settings for the different
7024 sections if you wish.
7025 The layout information for sections is contained in
7026 \begin_inset Flex Code
7029 \begin_layout Plain Layout
7035 , but you do not need to copy and change this file.
7036 Instead, you can simply add your changes to your layout file, after the
7038 \begin_inset Flex Code
7041 \begin_layout Plain Layout
7047 , which itself includes
7048 \begin_inset Flex Code
7051 \begin_layout Plain Layout
7058 For example, you might add these lines:
7061 \begin_layout LyX-Code
7065 \begin_layout LyX-Code
7069 \begin_layout LyX-Code
7073 \begin_layout LyX-Code
7077 \begin_layout LyX-Code
7081 \begin_layout Standard
7082 to change the font for chapter headings to sans-serif.
7083 This will override (or, in this case, add to) the existing declaration
7084 for the Chapter style.
7088 \begin_layout Standard
7089 Your new package may also provide commands or environments not present in
7091 In this case, you will want to add these to the layout file.
7093 \begin_inset CommandInset ref
7095 reference "sec:TextClass"
7099 for information on how to do so.
7102 \begin_layout Standard
7104 \begin_inset Flex MenuItem
7107 \begin_layout Plain Layout
7113 can be used with several different document classes, and even if it cannot,
7114 you might find it easiest just to write a module that you can load with
7116 The simplest possible such module would be:
7119 \begin_layout LyX-Code
7122 Declare\SpecialChar LyX
7126 \begin_layout LyX-Code
7130 \begin_layout LyX-Code
7131 #Support for mypkg.sty.
7134 \begin_layout LyX-Code
7136 \begin_inset Newline newline
7142 \begin_layout LyX-Code
7144 \begin_inset Newline newline
7150 \begin_layout LyX-Code
7152 \begin_inset Newline newline
7158 \begin_inset Newline newline
7164 \begin_layout Standard
7165 A more complex module might modify the behavior of some existing constructs
7166 or define some new ones.
7168 \begin_inset CommandInset ref
7170 reference "sec:TextClass"
7177 \begin_layout Subsection
7179 \begin_inset Flex MenuItem
7182 \begin_layout Plain Layout
7191 \begin_layout Standard
7192 There are two possibilities here.
7193 One is that the class file is itself based upon an existing document class.
7194 For example, many thesis classes are based upon
7195 \begin_inset Flex MenuItem
7198 \begin_layout Plain Layout
7205 To see whether yours is, look for a line like
7208 \begin_layout LyX-Code
7214 \begin_layout Standard
7216 If so, then you may proceed largely as in the previous section, though
7218 \begin_inset Flex Code
7221 \begin_layout Plain Layout
7222 Declare\SpecialChar LaTeX
7228 line will be different.
7229 If your new class is
7230 \begin_inset Flex Code
7233 \begin_layout Plain Layout
7239 and it is based upon
7240 \begin_inset Flex Code
7243 \begin_layout Plain Layout
7249 , then the line should read:
7253 \begin_layout Plain Layout
7254 And it will be easiest if you save the file to
7255 \begin_inset Flex Code
7258 \begin_layout Plain Layout
7265 assumes that the document class has the same name as the layout file.
7274 \begin_layout LyX-Code
7277 Declare\SpecialChar LaTeX
7278 Class[thesis,book]{thesis}
7281 \begin_layout Standard
7282 If, on the other hand, the new class is not based upon an existing class,
7283 you will probably have to
7284 \begin_inset Quotes eld
7288 \begin_inset Quotes erd
7292 We strongly suggest copying an existing layout file which uses a similar
7294 class and then modifying it, if you can do so.
7295 At least use an existing file as a starting point so you can find out what
7296 items you need to worry about.
7297 Again, the specifics are covered below.
7300 \begin_layout Subsection
7302 \begin_inset CommandInset label
7304 name "sub:Creating-Templates"
7311 \begin_layout Standard
7312 Once you have written a layout file for a new document class, you might
7313 want to consider writing a
7318 A template acts as a kind of tutorial for your layout, showing how it might
7319 be used, though containing dummy content.
7320 You can of course look at the various templates included with \SpecialChar LyX
7324 \begin_layout Standard
7325 Templates are created just like usual documents: using \SpecialChar LyX
7327 The only difference is that usual documents contain all possible settings,
7328 including the font scheme and the paper size.
7329 Usually a user doesn't want a template to overwrite his preferred settings
7330 for such parameters.
7331 For that reason, the designer of a template should remove the corresponding
7333 \begin_inset Flex Code
7336 \begin_layout Plain Layout
7345 \begin_inset Flex Code
7348 \begin_layout Plain Layout
7356 from the template \SpecialChar LyX
7358 This can be done with any simple text-editor, for example
7359 \begin_inset Flex Code
7362 \begin_layout Plain Layout
7369 \begin_inset Flex Code
7372 \begin_layout Plain Layout
7381 \begin_layout Standard
7382 Put the edited template files you create in
7383 \begin_inset Flex Code
7386 \begin_layout Plain Layout
7392 , copy the ones you use from the global template directory in
7393 \begin_inset Flex Code
7396 \begin_layout Plain Layout
7403 to the same place, and redefine the template path in the
7404 \begin_inset Flex MenuItem
7407 \begin_layout Plain Layout
7408 Tools\SpecialChar menuseparator
7409 Preferences\SpecialChar menuseparator
7418 \begin_layout Standard
7419 Note, by the way, that there is a template which has a particular meaning:
7421 \begin_inset Flex Code
7424 \begin_layout Plain Layout
7431 This template is loaded every time you create a new document with
7432 \begin_inset Flex MenuItem
7435 \begin_layout Plain Layout
7436 File\SpecialChar menuseparator
7442 in order to provide useful defaults.
7443 To create this template from inside \SpecialChar LyX
7444 , all you have to do is to open a document
7445 with the correct settings, and use the
7446 \begin_inset Flex MenuItem
7449 \begin_layout Plain Layout
7450 Save as Document Defaults
7458 \begin_layout Subsection
7459 Upgrading old layout files
7462 \begin_layout Standard
7463 The format of layout files changes with each \SpecialChar LyX
7464 release, so old layout files
7465 need to be converted to the new format.
7467 reads a layout file in an older format, it automatically calls the
7469 \begin_inset Flex Code
7472 \begin_layout Plain Layout
7478 to convert it to a temporary file in current format.
7479 The original file is left untouched.
7480 If you use the layout file often, then, you may want to convert it permanently,
7481 so that \SpecialChar LyX
7482 does not have to do so itself every time.
7483 To do this, you can call the converter manually:
7486 \begin_layout Enumerate
7488 \begin_inset Flex Code
7491 \begin_layout Plain Layout
7498 \begin_inset Flex Code
7501 \begin_layout Plain Layout
7510 \begin_layout Enumerate
7512 \begin_inset Newline newline
7516 \begin_inset Flex Code
7519 \begin_layout Plain Layout
7520 python \SpecialChar LyX
7521 Dir/scripts/layout2layout.py myclass.old myclass.layout
7527 \begin_inset Newline newline
7531 \begin_inset Flex Code
7534 \begin_layout Plain Layout
7541 is the name of your \SpecialChar LyX
7545 \begin_layout Standard
7546 Note that manual conversion does not affect included files, so these will
7547 have to be converted separately.
7550 \begin_layout Section
7551 \begin_inset CommandInset label
7553 name "sec:TextClass"
7557 The layout file format
7560 \begin_layout Standard
7561 The following sections describe how layout files are structured and written.
7562 Our advice is to go slowly, save and test often.
7563 It is really not that hard, except that the multitude of options can become
7564 overwhelming, especially if you try to check out too many at once.
7565 It becomes easier if you use existing layouts of \SpecialChar LyX
7566 as examples/reference
7567 or if you modify an existing layout to your needs.
7570 \begin_layout Standard
7571 Note that all the tags used in layout files are case-insensitive.
7573 \begin_inset Flex Code
7576 \begin_layout Plain Layout
7583 \begin_inset Flex Code
7586 \begin_layout Plain Layout
7593 \begin_inset Flex Code
7596 \begin_layout Plain Layout
7602 are really the same tag.
7603 The possible arguments are printed in brackets after the tag's name.
7604 The default argument is typeset
7605 \begin_inset Flex Code
7608 \begin_layout Plain Layout
7617 If the argument has a data type like
7618 \begin_inset Quotes eld
7622 \begin_inset Quotes erd
7626 \begin_inset Quotes eld
7630 \begin_inset Quotes erd
7633 , the default is shown like this:
7634 \begin_inset Flex Code
7637 \begin_layout Plain Layout
7648 \begin_layout Subsection
7649 The document class declaration and classification
7652 \begin_layout Standard
7653 Lines in a layout file which begin with
7654 \begin_inset Flex Code
7657 \begin_layout Plain Layout
7664 There is one exception to this rule.
7666 \begin_inset Flex Code
7669 \begin_layout Plain Layout
7675 files should begin with lines like:
7678 \begin_layout LyX-Code
7681 #% Do not delete the line below; configure depends on this
7684 \begin_layout LyX-Code
7695 \begin_layout Plain Layout
7704 eXClass{Article (Standard Class)}
7707 \begin_layout LyX-Code
7712 DeclareCategory{Articles}
7715 \begin_layout Standard
7716 The second and third lines are used when you (re)configure \SpecialChar LyX
7718 The layout file is read by the \SpecialChar LaTeX
7720 \begin_inset Flex Code
7723 \begin_layout Plain Layout
7729 , in a special mode where
7730 \begin_inset Flex Code
7733 \begin_layout Plain Layout
7740 The first line is just a \SpecialChar LaTeX
7741 comment, the second one contains the mandatory
7742 declaration of the text class and the third line contains the optional
7743 classification of the class.
7744 If these lines appear in a file named
7745 \begin_inset Flex Code
7748 \begin_layout Plain Layout
7754 , then they define a text class of name
7755 \begin_inset Flex Code
7758 \begin_layout Plain Layout
7764 (the name of the layout file) which uses the \SpecialChar LaTeX
7766 \begin_inset Flex Code
7769 \begin_layout Plain Layout
7775 (the default is to use the same name as the layout).
7777 \begin_inset Quotes eld
7780 Article (Standard Class)
7781 \begin_inset Quotes erd
7784 that appears above is used as a description of the text class in the
7785 \begin_inset Flex MenuItem
7788 \begin_layout Plain Layout
7789 Document\SpecialChar menuseparator
7797 \begin_inset Quotes eld
7801 \begin_inset Quotes erd
7804 in the example) is also used in the
7805 \begin_inset Flex MenuItem
7808 \begin_layout Plain Layout
7809 Document\SpecialChar menuseparator
7815 dialog: the text classes are grouped by these categories (which are usually
7816 genres, so typical categories are
7817 \begin_inset Quotes eld
7821 \begin_inset Quotes erd
7825 \begin_inset Quotes eld
7829 \begin_inset Quotes erd
7833 \begin_inset Quotes eld
7837 \begin_inset Quotes erd
7841 \begin_inset Quotes eld
7845 \begin_inset Quotes erd
7849 \begin_inset Quotes eld
7853 \begin_inset Quotes erd
7857 \begin_inset Quotes eld
7861 \begin_inset Quotes erd
7865 If no category has been declared, the class will be put in the
7866 \begin_inset Quotes eld
7870 \begin_inset Quotes erd
7876 \begin_layout Standard
7877 Let's assume that you wrote your own text class that uses the
7878 \begin_inset Flex Code
7881 \begin_layout Plain Layout
7887 document class, but where you changed the appearance of the section headings.
7888 If you put it in a file
7889 \begin_inset Flex Code
7892 \begin_layout Plain Layout
7898 , the header of this file should be:
7901 \begin_layout LyX-Code
7904 #% Do not delete the line below; configure depends on this
7907 \begin_layout LyX-Code
7918 \begin_layout Plain Layout
7927 eXClass[article]{Article (with My Own Headings)}
7930 \begin_layout LyX-Code
7935 DeclareCategory{Articles}
7938 \begin_layout Standard
7939 This declares a text class
7940 \begin_inset Flex Code
7943 \begin_layout Plain Layout
7949 , associated with the \SpecialChar LaTeX
7951 \begin_inset Flex Code
7954 \begin_layout Plain Layout
7961 \begin_inset Quotes eld
7964 Article (with My Own Headings)
7965 \begin_inset Quotes erd
7969 If your text class depends on several packages, you can declare it as:
7972 \begin_layout LyX-Code
7975 #% Do not delete the line below; configure depends on this
7978 \begin_layout LyX-Code
7989 \begin_layout Plain Layout
7998 eXClass[article,foo.sty]{Article (with My Own Headings)}
8001 \begin_layout LyX-Code
8006 DeclareCategory{Articles}
8009 \begin_layout Standard
8010 This indicates that your text class uses the
8011 \begin_inset Flex Code
8014 \begin_layout Plain Layout
8021 Finally, it is also possible to declare classes for DocBook code.
8022 Typical declarations will look like:
8025 \begin_layout LyX-Code
8028 #% Do not delete the line below; configure depends on this
8031 \begin_layout LyX-Code
8036 DeclareDocBookClass[article]{SGML (DocBook Article)}
8039 \begin_layout LyX-Code
8044 DeclareCategory{Articles (DocBook)}
8047 \begin_layout Standard
8048 Note that these declarations can also be given an optional parameter declaring
8049 the name of the document class (but not a list).
8052 \begin_layout Standard
8053 So, to be as explicit as possible, the form of the layout declaration is:
8056 \begin_layout LyX-Code
8067 \begin_layout Plain Layout
8076 eXClass[class,package.sty]{layout description}
8079 \begin_layout LyX-Code
8084 DeclareCategory{category}
8087 \begin_layout Standard
8088 The class need only be specified if the name of the \SpecialChar LaTeX
8090 name of the layout file are different or if there are packages to load.
8091 If the name of the class file is not specified, then \SpecialChar LyX
8093 that it is the same as the name of the layout file.
8096 \begin_layout Standard
8097 When the text class has been modified to your taste, all you have to do
8098 is to copy it either to
8099 \begin_inset Flex Code
8102 \begin_layout Plain Layout
8110 \begin_inset Flex Code
8113 \begin_layout Plain Layout
8120 \begin_inset Flex MenuItem
8123 \begin_layout Plain Layout
8124 Tools\SpecialChar menuseparator
8130 , exit \SpecialChar LyX
8132 Then your new text class should be available along with the others.
8135 \begin_layout Standard
8136 Once the layout file is installed, you can edit it and see your changes
8137 without having to reconfigure or to restart \SpecialChar LyX
8143 \begin_layout Plain Layout
8144 In versions of \SpecialChar LyX
8145 prior to 1.6, this was not true.
8146 As a result, editing layout files was very time consuming, since you had
8147 constantly to restart \SpecialChar LyX
8153 You can force a reload of the current layout by using the \SpecialChar LyX
8155 \begin_inset Flex MenuItem
8158 \begin_layout Plain Layout
8165 There is no default binding for this function—though, of course, you can
8166 bind it to a key yourself.
8167 But you will normally use this function simply by entering it in the mini-buffe
8172 \begin_layout Standard
8178 \begin_inset Flex MenuItem
8181 \begin_layout Plain Layout
8187 is very much an `advanced feature'.
8192 recommended that you save your work before using this function.
8197 recommended that you not attempt to edit layout information while simultaneousl
8198 y working on a document that you care about.
8199 Use a test document.
8200 Syntax errors and the like in your layout file could cause peculiar behavior.
8201 In particular, such errors could cause \SpecialChar LyX
8202 to regard the current layout as
8203 invalid and to attempt to switch to some other layout.
8207 \begin_layout Plain Layout
8208 Really bad syntax errors may even caused \SpecialChar LyX
8210 This is because certain sorts of errors may make \SpecialChar LyX
8221 The \SpecialChar LyX
8222 team strives to keep \SpecialChar LyX
8223 stable in such situations, but safe is better
8228 \begin_layout Plain Layout
8229 While we're giving advice: make regular backups.
8230 And be nice to your mother.
8238 \begin_layout Subsection
8239 The Module declaration
8242 \begin_layout Standard
8243 A module must begin with a line like the following:
8246 \begin_layout LyX-Code
8253 \begin_layout Plain Layout
8260 yXModule[endnotes.sty]{Endnotes}
8263 \begin_layout Standard
8264 The mandatory argument, in curly brackets, is the name of the module, as
8266 \begin_inset Flex MenuItem
8269 \begin_layout Plain Layout
8270 Document\SpecialChar menuseparator
8271 Settings\SpecialChar menuseparator
8278 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8280 on which the module depends.
8281 It is also possible to use the form
8282 \begin_inset Flex MenuItem
8285 \begin_layout Plain Layout
8291 as an optional argument, which declares that the module can only be used
8292 when there exists a conversion chain between the formats `
8293 \begin_inset Flex Code
8296 \begin_layout Plain Layout
8303 \begin_inset Flex Code
8306 \begin_layout Plain Layout
8315 \begin_layout Standard
8316 The module declaration should then be followed by lines like the following
8320 \begin_layout Plain Layout
8321 Preferably in English if the module should be published with \SpecialChar LyX
8323 This description will appear in the list of messages to be translated and
8324 will be thus translated with the next interface update.
8332 \begin_layout LyX-Code
8336 \begin_layout LyX-Code
8337 #Adds an endnote command, in addition to footnotes.
8341 \begin_layout LyX-Code
8342 #You will need to add
8344 theendnotes in \SpecialChar TeX
8348 \begin_layout LyX-Code
8349 #want the endnotes to appear.
8353 \begin_layout LyX-Code
8357 \begin_layout LyX-Code
8358 #Requires: somemodule | othermodule
8361 \begin_layout LyX-Code
8362 #Excludes: badmodule
8365 \begin_layout Standard
8366 The description is used in
8367 \begin_inset Flex MenuItem
8370 \begin_layout Plain Layout
8371 Document\SpecialChar menuseparator
8372 Settings\SpecialChar menuseparator
8378 to provide the user with information about what the module does.
8380 \begin_inset Flex Code
8383 \begin_layout Plain Layout
8389 line is used to identify other modules with which this one must be used;
8391 \begin_inset Flex Code
8394 \begin_layout Plain Layout
8400 line is used to identify modules with which this one may not be used.
8401 Both are optional, and, as shown, multiple modules should be separated
8402 with the pipe symbol: |.
8403 Note that the required modules are treated disjunctively:
8407 of the required modules must be used.
8412 excluded module may be used.
8413 Note that modules are identified here by their filenames without the
8414 \begin_inset Flex Code
8417 \begin_layout Plain Layout
8425 \begin_inset Flex Code
8428 \begin_layout Plain Layout
8435 \begin_inset Flex Code
8438 \begin_layout Plain Layout
8447 \begin_layout Subsection
8451 \begin_layout Standard
8452 The first non-comment line of any layout file, included file, or module
8457 contain the file format number:
8460 \begin_layout Description
8461 \begin_inset Flex Code
8464 \begin_layout Plain Layout
8471 \begin_inset Flex Code
8474 \begin_layout Plain Layout
8480 ] The format number of the layout file.
8483 \begin_layout Standard
8484 This tag was introduced with \SpecialChar LyX
8486 \begin_inset space ~
8490 Layout files from older \SpecialChar LyX
8491 versions do not have an explicit file format and
8492 are considered to have
8493 \begin_inset Flex Code
8496 \begin_layout Plain Layout
8498 \begin_inset space ~
8507 The format for the present version of \SpecialChar LyX
8509 But each version of \SpecialChar LyX
8510 is capable of reading earlier versions' layout files,
8511 just as they are capable of reading files produced by earlier versions
8514 There is, however, no provision for converting to earlier formats.
8517 \begin_layout Subsection
8518 \begin_inset CommandInset label
8520 name "sub:General-text-class"
8524 General text class parameters
8527 \begin_layout Standard
8528 These are general parameters that govern the behavior of an entire document
8534 mean that they must appear in
8535 \begin_inset Flex Code
8538 \begin_layout Plain Layout
8544 files rather than in modules.
8545 A module can contain any layout tag.)
8548 \begin_layout Description
8549 \begin_inset Flex Code
8552 \begin_layout Plain Layout
8558 Adds information that will be output in the
8559 \begin_inset Flex Code
8562 \begin_layout Plain Layout
8568 block when the document is output to XHTML.
8569 Typically, this would be used to output CSS style information, but it can
8570 be used for anything that can appear in
8571 \begin_inset Flex Code
8574 \begin_layout Plain Layout
8582 \begin_inset Quotes eld
8586 \begin_inset Flex Code
8589 \begin_layout Plain Layout
8596 \begin_inset Quotes erd
8602 \begin_layout Description
8603 \begin_inset Flex Code
8606 \begin_layout Plain Layout
8612 Adds information to the document preamble.
8614 \begin_inset Newline newline
8618 \begin_inset Quotes eld
8622 \begin_inset Flex Code
8625 \begin_layout Plain Layout
8632 \begin_inset Quotes erd
8638 \begin_layout Description
8639 \begin_inset Flex Code
8642 \begin_layout Plain Layout
8648 Defines formats for use in the display of bibliographic information.
8650 \begin_inset CommandInset ref
8652 reference "sub:Citation-format-description"
8658 \begin_inset Quotes eld
8662 \begin_inset Flex Code
8665 \begin_layout Plain Layout
8672 \begin_inset Quotes erd
8678 \begin_layout Description
8679 \begin_inset Flex Code
8682 \begin_layout Plain Layout
8688 Describes various global options supported by the document class.
8690 \begin_inset CommandInset ref
8692 reference "sub:ClassOptions"
8698 \begin_inset Quotes eld
8702 \begin_inset Flex Code
8705 \begin_layout Plain Layout
8712 \begin_inset Quotes erd
8718 \begin_layout Description
8719 \begin_inset Flex Code
8722 \begin_layout Plain Layout
8729 \begin_inset Flex Code
8732 \begin_layout Plain Layout
8741 \begin_inset space \thinspace{}
8745 \begin_inset Flex Code
8748 \begin_layout Plain Layout
8754 ] Whether the class should
8758 to having one or two columns.
8759 Can be changed in the
8760 \begin_inset Flex MenuItem
8763 \begin_layout Plain Layout
8764 Document\SpecialChar menuseparator
8773 \begin_layout Description
8774 \begin_inset Flex Code
8777 \begin_layout Plain Layout
8784 \begin_inset Flex Code
8787 \begin_layout Plain Layout
8793 ] This sequence defines the properties for a counter.
8794 If the counter does not yet exist, it is created; if it does exist, it
8797 \begin_inset Quotes eld
8801 \begin_inset Flex Code
8804 \begin_layout Plain Layout
8811 \begin_inset Quotes erd
8815 \begin_inset Newline newline
8819 \begin_inset CommandInset ref
8821 reference "sub:Counters"
8825 for details on counters.
8828 \begin_layout Description
8829 \begin_inset Flex Code
8832 \begin_layout Plain Layout
8838 Sets the default font used to display the document.
8840 \begin_inset CommandInset ref
8842 reference "sub:Font-description"
8846 for how to declare fonts.
8848 \begin_inset Quotes eld
8852 \begin_inset Flex Code
8855 \begin_layout Plain Layout
8862 \begin_inset Quotes erd
8868 \begin_layout Description
8869 \begin_inset Flex Code
8872 \begin_layout Plain Layout
8879 \begin_inset Flex Code
8882 \begin_layout Plain Layout
8888 ] Specifies a module to be included by default with this document class.
8889 The module is specified as filename without the
8890 \begin_inset Flex Code
8893 \begin_layout Plain Layout
8900 The user can still remove the module, but it will be active at the outset.
8901 (This applies only when new files are created, or when this class is chosen
8902 for an existing document.)
8905 \begin_layout Description
8906 \begin_inset Flex Code
8909 \begin_layout Plain Layout
8916 \begin_inset Flex Code
8919 \begin_layout Plain Layout
8925 ] This is the style that will be assigned to new paragraphs, usually
8926 \begin_inset Flex MenuItem
8929 \begin_layout Plain Layout
8936 This will default to the first defined style if not given, but you are
8937 encouraged to use this directive.
8940 \begin_layout Description
8941 \begin_inset Flex Code
8944 \begin_layout Plain Layout
8951 \begin_inset Flex Code
8954 \begin_layout Plain Layout
8960 ] This tag indicates that the module (which is specified by filename without
8962 \begin_inset Flex Code
8965 \begin_layout Plain Layout
8971 extension) cannot be used with this document class.
8972 This might be used in a journal-specific layout file to prevent, say, the
8974 \begin_inset Flex Code
8977 \begin_layout Plain Layout
8983 module that numbers theorems by section.
8988 be used in a module.
8989 Modules have their own way of excluding other modules (see
8990 \begin_inset CommandInset ref
8992 reference "sub:Layout-modules"
8999 \begin_layout Description
9000 \begin_inset Flex Code
9003 \begin_layout Plain Layout
9009 Defines a new float.
9011 \begin_inset CommandInset ref
9013 reference "sub:Floats"
9019 \begin_inset Quotes eld
9023 \begin_inset Flex Code
9026 \begin_layout Plain Layout
9033 \begin_inset Quotes erd
9039 \begin_layout Description
9040 \begin_inset Flex Code
9043 \begin_layout Plain Layout
9049 Sets the information that will be output in the
9050 \begin_inset Flex Code
9053 \begin_layout Plain Layout
9059 block when this document class is output to XHTML.
9060 Note that this will completely override any prior
9061 \begin_inset Flex Code
9064 \begin_layout Plain Layout
9071 \begin_inset Flex Code
9074 \begin_layout Plain Layout
9082 \begin_inset Newline newline
9086 \begin_inset Flex Code
9089 \begin_layout Plain Layout
9095 if you just want to add material to the preamble.) Must end with
9096 \begin_inset Quotes eld
9100 \begin_inset Flex Code
9103 \begin_layout Plain Layout
9110 \begin_inset Quotes erd
9116 \begin_layout Description
9117 \begin_inset Flex Code
9120 \begin_layout Plain Layout
9127 \begin_inset Flex Code
9130 \begin_layout Plain Layout
9136 ] The style to use for the table of contents, bibliography, and so forth,
9137 when the document is output to HTML.
9138 For articles, this should normally be
9139 \begin_inset Flex Code
9142 \begin_layout Plain Layout
9149 \begin_inset Flex Code
9152 \begin_layout Plain Layout
9159 If it is not given, then \SpecialChar LyX
9160 will attempt to figure out which layout to use.
9163 \begin_layout Description
9164 \begin_inset Flex Code
9167 \begin_layout Plain Layout
9174 \begin_inset Flex Code
9177 \begin_layout Plain Layout
9183 ] Modifies the properties of the given counter.
9184 If the counter does not exist, the statement is ignored.
9186 \begin_inset Quotes eld
9190 \begin_inset Flex Code
9193 \begin_layout Plain Layout
9200 \begin_inset Quotes erd
9204 \begin_inset Newline newline
9208 \begin_inset CommandInset ref
9210 reference "sub:Counters"
9214 for details on counters.
9217 \begin_layout Description
9218 \begin_inset Flex Code
9221 \begin_layout Plain Layout
9228 \begin_inset Flex Code
9231 \begin_layout Plain Layout
9237 ] Modifies the properties of the given paragraph style.
9238 If the style does not exist, the statement is ignored.
9240 \begin_inset Quotes eld
9244 \begin_inset Flex Code
9247 \begin_layout Plain Layout
9254 \begin_inset Quotes erd
9260 \begin_layout Description
9261 \begin_inset Flex Code
9264 \begin_layout Plain Layout
9271 \begin_inset Flex Code
9274 \begin_layout Plain Layout
9280 ] This allows you to include another layout definition file within yours
9281 to avoid duplicating commands.
9282 Common examples are the standard layout files, for example,
9283 \begin_inset Flex Code
9286 \begin_layout Plain Layout
9292 , which contains most of the basic layouts.
9295 \begin_layout Description
9296 \begin_inset Flex Code
9299 \begin_layout Plain Layout
9306 \begin_inset Flex Code
9309 \begin_layout Plain Layout
9315 ] This section (re-)defines the layout of an inset.
9316 It can be applied to an existing inset or to a new, user-defined inset,
9317 e.g., a new character style.
9319 \begin_inset Quotes eld
9323 \begin_inset Flex Code
9326 \begin_layout Plain Layout
9333 \begin_inset Quotes erd
9337 \begin_inset Newline newline
9341 \begin_inset CommandInset ref
9343 reference "sub:Flex-insets-and"
9347 for more information.
9351 \begin_layout Description
9352 \begin_inset Flex Code
9355 \begin_layout Plain Layout
9362 \begin_inset Flex Code
9365 \begin_layout Plain Layout
9371 ] A string that indicates the width of the left margin on the screen, for
9373 \begin_inset Quotes eld
9377 \begin_inset Flex Code
9380 \begin_layout Plain Layout
9387 \begin_inset Quotes erd
9391 (Note that this is not a `length', like
9392 \begin_inset Quotes eld
9396 \begin_inset Quotes erd
9402 \begin_layout Description
9403 \begin_inset Flex Code
9406 \begin_layout Plain Layout
9413 \begin_inset Flex Code
9416 \begin_layout Plain Layout
9422 ] Deletes an existing counter, usually one defined in an included file.
9425 \begin_layout Description
9426 \begin_inset Flex Code
9429 \begin_layout Plain Layout
9436 \begin_inset Flex Code
9439 \begin_layout Plain Layout
9445 ] Deletes an existing float.
9446 This is particularly useful when you want to suppress a float that has
9447 been defined in an input file.
9450 \begin_layout Description
9451 \begin_inset Flex Code
9454 \begin_layout Plain Layout
9461 \begin_inset Flex Code
9464 \begin_layout Plain Layout
9470 ] Deletes an existing style.
9473 \begin_layout Description
9474 \begin_inset Flex Code
9477 \begin_layout Plain Layout
9484 \begin_inset Flex Code
9487 \begin_layout Plain Layout
9493 ] The file format (as defined in the \SpecialChar LyX
9494 preferences) produced by this document
9496 It is mainly useful when
9497 \begin_inset Flex Code
9500 \begin_layout Plain Layout
9507 \begin_inset Flex Code
9510 \begin_layout Plain Layout
9516 and one wants to define a new type of literate document.
9517 The format is reset to
9518 \begin_inset Quotes eld
9522 \begin_inset Flex Code
9525 \begin_layout Plain Layout
9532 \begin_inset Quotes erd
9536 \begin_inset Quotes eld
9540 \begin_inset Flex Code
9543 \begin_layout Plain Layout
9550 \begin_inset Quotes erd
9553 when the corresponding
9554 \begin_inset Flex Code
9557 \begin_layout Plain Layout
9563 parameter is encountered.
9566 \begin_layout Description
9567 \begin_inset Flex Code
9570 \begin_layout Plain Layout
9577 \begin_inset Flex Code
9580 \begin_layout Plain Layout
9591 \begin_inset Flex Code
9594 \begin_layout Plain Layout
9601 \begin_inset Flex Code
9604 \begin_layout Plain Layout
9610 ] Specifies what sort of output documents using this class will produce.
9613 \begin_layout Description
9614 \begin_inset Flex Code
9617 \begin_layout Plain Layout
9624 \begin_inset Flex Code
9627 \begin_layout Plain Layout
9634 \begin_inset Flex Code
9637 \begin_layout Plain Layout
9643 ] Specifies options, given in the second string, for the package named by
9646 \begin_inset Quotes eld
9650 \begin_inset Flex Code
9653 \begin_layout Plain Layout
9654 PackageOptions natbib square
9660 \begin_inset Quotes erd
9664 \begin_inset Flex Code
9667 \begin_layout Plain Layout
9673 to be loaded with the
9674 \begin_inset Flex Code
9677 \begin_layout Plain Layout
9684 (For \SpecialChar TeX
9685 perts, this causes \SpecialChar LyX
9687 \begin_inset Flex Code
9690 \begin_layout Plain Layout
9693 PassOptionsToPackage{natbib}{square}
9699 \begin_inset Flex Code
9702 \begin_layout Plain Layout
9711 \begin_layout Description
9712 \begin_inset Flex Code
9715 \begin_layout Plain Layout
9722 \begin_inset Flex Code
9725 \begin_layout Plain Layout
9734 \begin_inset Flex Code
9737 \begin_layout Plain Layout
9744 \begin_inset Flex Code
9747 \begin_layout Plain Layout
9753 ] The default pagestyle.
9754 Can be changed in the
9755 \begin_inset Flex MenuItem
9758 \begin_layout Plain Layout
9759 Document\SpecialChar menuseparator
9768 \begin_layout Description
9769 \begin_inset Flex Code
9772 \begin_layout Plain Layout
9778 Sets the preamble for the \SpecialChar LaTeX
9780 Note that this will completely override any prior
9781 \begin_inset Flex Code
9784 \begin_layout Plain Layout
9791 \begin_inset Flex Code
9794 \begin_layout Plain Layout
9802 \begin_inset Flex Code
9805 \begin_layout Plain Layout
9811 if you just want to add material to the preamble.) Must end with
9812 \begin_inset Quotes eld
9816 \begin_inset Flex Code
9819 \begin_layout Plain Layout
9826 \begin_inset Quotes erd
9832 \begin_layout Description
9833 \begin_inset Flex Code
9836 \begin_layout Plain Layout
9843 \begin_inset Flex Code
9846 \begin_layout Plain Layout
9853 \begin_inset Flex Code
9856 \begin_layout Plain Layout
9865 \begin_inset space \thinspace{}
9869 \begin_inset Flex Code
9872 \begin_layout Plain Layout
9878 ] Whether the class already provides the feature
9879 \begin_inset Flex Code
9882 \begin_layout Plain Layout
9889 A feature is in general the name of a package (e.
9890 \begin_inset space \thinspace{}
9894 \begin_inset space \space{}
9898 \begin_inset Flex Code
9901 \begin_layout Plain Layout
9908 \begin_inset Flex Code
9911 \begin_layout Plain Layout
9918 \begin_inset space \thinspace{}
9922 \begin_inset space \space{}
9926 \begin_inset Flex Code
9929 \begin_layout Plain Layout
9936 \begin_inset Flex Code
9939 \begin_layout Plain Layout
9947 \begin_inset CommandInset ref
9949 reference "chap:List-of-functions"
9953 for the list of features.
9956 \begin_layout Description
9957 \begin_inset Flex Code
9960 \begin_layout Plain Layout
9967 \begin_inset Flex Code
9970 \begin_layout Plain Layout
9976 ] Indicates that this layout provides the functionality of the module mentioned,
9977 which should be specified by the filename without the
9978 \begin_inset Flex Code
9981 \begin_layout Plain Layout
9988 This will typically be used if the layout includes the module directly,
9989 rather than using the
9990 \begin_inset Flex Code
9993 \begin_layout Plain Layout
9999 tag to indicate that it ought to be used.
10000 It could also be used in a module that provided an alternate implementation
10001 of the same functionality.
10004 \begin_layout Description
10005 \begin_inset Flex Code
10008 \begin_layout Plain Layout
10015 \begin_inset Flex Code
10018 \begin_layout Plain Layout
10024 ] Whether the class requires the feature
10025 \begin_inset Flex Code
10028 \begin_layout Plain Layout
10035 Multiple features must be separated by commas.
10036 Note that you can only request supported features.
10038 \begin_inset CommandInset ref
10040 reference "chap:List-of-functions"
10044 for the list of features.)
10047 \begin_layout Description
10048 \begin_inset Flex Code
10051 \begin_layout Plain Layout
10058 \begin_inset Flex Code
10061 \begin_layout Plain Layout
10067 ] A string that indicates the width of the right margin on the screen, for
10069 \begin_inset Quotes eld
10073 \begin_inset Flex Code
10076 \begin_layout Plain Layout
10083 \begin_inset Quotes erd
10089 \begin_layout Description
10090 \begin_inset Flex Code
10093 \begin_layout Plain Layout
10100 \begin_inset Flex Code
10103 \begin_layout Plain Layout
10109 ] Sets which divisions get numbered.
10111 \begin_inset Newline newline
10115 \begin_inset Flex Code
10118 \begin_layout Plain Layout
10124 counter in \SpecialChar LaTeX
10128 \begin_layout Description
10129 \begin_inset Flex Code
10132 \begin_layout Plain Layout
10139 \begin_inset Flex Code
10142 \begin_layout Plain Layout
10151 \begin_inset space \thinspace{}
10155 \begin_inset Flex Code
10158 \begin_layout Plain Layout
10164 ] Whether the class-default should be printing on one or both sides of the
10166 Can be changed in the
10167 \begin_inset Flex MenuItem
10170 \begin_layout Plain Layout
10171 Document\SpecialChar menuseparator
10180 \begin_layout Description
10181 \begin_inset Flex Code
10184 \begin_layout Plain Layout
10191 \begin_inset Flex Code
10194 \begin_layout Plain Layout
10200 ] This sequence defines a paragraph style.
10201 If the style does not yet exist, it is created; if it does exist, its parameter
10204 \begin_inset Quotes eld
10208 \begin_inset Flex Code
10211 \begin_layout Plain Layout
10218 \begin_inset Quotes erd
10222 \begin_inset Newline newline
10226 \begin_inset CommandInset ref
10228 reference "sub:Paragraph-Styles"
10232 for details on paragraph styles.
10235 \begin_layout Description
10236 \begin_inset Flex Code
10239 \begin_layout Plain Layout
10246 \begin_inset Flex Code
10249 \begin_layout Plain Layout
10255 ] The name of the command or environment to be used with
10256 \begin_inset Flex Code
10259 \begin_layout Plain Layout
10268 \begin_layout Description
10269 \begin_inset Flex Code
10272 \begin_layout Plain Layout
10279 \begin_inset Flex Code
10282 \begin_layout Plain Layout
10291 \begin_inset Flex Code
10294 \begin_layout Plain Layout
10300 ] Indicates what kind of markup is used to define the title of a document.
10302 \begin_inset Flex Code
10305 \begin_layout Plain Layout
10311 means that the macro with name
10312 \begin_inset Flex Code
10315 \begin_layout Plain Layout
10321 will be inserted after the last layout which has
10322 \begin_inset Quotes eld
10326 \begin_inset Flex Code
10329 \begin_layout Plain Layout
10331 \begin_inset space ~
10340 \begin_inset Quotes erd
10345 \begin_inset Flex Code
10348 \begin_layout Plain Layout
10354 corresponds to the case where all layouts which have
10355 \begin_inset Quotes eld
10359 \begin_inset Flex Code
10362 \begin_layout Plain Layout
10364 \begin_inset space ~
10373 \begin_inset Quotes erd
10376 should be enclosed into the
10377 \begin_inset Flex Code
10380 \begin_layout Plain Layout
10389 \begin_layout Description
10390 \begin_inset Flex Code
10393 \begin_layout Plain Layout
10400 \begin_inset Flex Code
10403 \begin_layout Plain Layout
10409 ] Sets which divisions are included in the table of contents.
10411 \begin_inset Flex Code
10414 \begin_layout Plain Layout
10420 counter in \SpecialChar LaTeX
10424 \begin_layout Subsection
10425 \begin_inset Flex Code
10428 \begin_layout Plain Layout
10435 \begin_inset CommandInset label
10437 name "sub:ClassOptions"
10444 \begin_layout Standard
10446 \begin_inset Flex Code
10449 \begin_layout Plain Layout
10455 section can contain the following entries:
10458 \begin_layout Description
10459 \begin_inset Flex Code
10462 \begin_layout Plain Layout
10469 \begin_inset Flex Code
10472 \begin_layout Plain Layout
10478 ] The list of available font sizes for the document's main font, separated
10480 \begin_inset Quotes eld
10484 \begin_inset Flex Code
10487 \begin_layout Plain Layout
10494 \begin_inset Quotes erd
10500 \begin_layout Description
10501 \begin_inset Flex Code
10504 \begin_layout Plain Layout
10510 Used to set the DTD line with XML-based output classes.
10512 \begin_inset space \thinspace{}
10516 \begin_inset Quotes eld
10519 -//OASIS//DTD DocBook V4.2//EN
10520 \begin_inset Quotes erd
10526 \begin_layout Description
10527 \begin_inset Flex Code
10530 \begin_layout Plain Layout
10537 \begin_inset Flex Code
10540 \begin_layout Plain Layout
10541 string="empty|plain|headings|fancy"
10546 ] The list of available page sty\SpecialChar softhyphen
10548 \begin_inset Quotes eld
10552 \begin_inset Flex Code
10555 \begin_layout Plain Layout
10562 \begin_inset Quotes erd
10568 \begin_layout Description
10569 \begin_inset Flex Code
10572 \begin_layout Plain Layout
10579 \begin_inset Flex Code
10582 \begin_layout Plain Layout
10588 ] Some document class options, separated by a comma, that will be added
10589 to the optional part of the
10590 \begin_inset Flex Code
10593 \begin_layout Plain Layout
10604 \begin_layout Standard
10606 \begin_inset Flex Code
10609 \begin_layout Plain Layout
10615 section must end with
10616 \begin_inset Quotes eld
10620 \begin_inset Flex Code
10623 \begin_layout Plain Layout
10630 \begin_inset Quotes erd
10636 \begin_layout Subsection
10638 \begin_inset CommandInset label
10640 name "sub:Paragraph-Styles"
10647 \begin_layout Standard
10648 A paragraph style description looks like this:
10652 \begin_layout Plain Layout
10653 Note that this will either define a new style or modify an existing one.
10661 \begin_layout LyX-Code
10668 \begin_layout LyX-Code
10672 \begin_layout LyX-Code
10676 \begin_layout Standard
10677 where the following commands are allowed:
10680 \begin_layout Description
10681 \begin_inset Flex Code
10684 \begin_layout Plain Layout
10691 \begin_inset Flex Code
10694 \begin_layout Plain Layout
10699 , left, right, center
10704 ] Paragraph alignment.
10707 \begin_layout Description
10708 \begin_inset Flex Code
10711 \begin_layout Plain Layout
10718 \begin_inset Flex Code
10721 \begin_layout Plain Layout
10726 , left, right, center
10731 ] A comma separated list of permitted alignments.
10732 (Some \SpecialChar LaTeX
10733 styles prohibit certain alignments, since those wouldn't make sense.
10734 For example a right-aligned or centered enumeration isn't possible.)
10737 \begin_layout Description
10738 \begin_inset Flex Code
10741 \begin_layout Plain Layout
10748 \begin_inset Flex Code
10751 \begin_layout Plain Layout
10757 ] Defines argument number <int> of a command\SpecialChar breakableslash
10758 environment associated with
10760 This is useful for things like section headings, and only makes sense with
10763 Every (optional or required) argument of a command or environment – except
10764 for the required argument that is associated with the content of the paragraph
10765 itself – has a separate definition, where the number specifies the order
10767 The definition must end with
10768 \begin_inset Flex Code
10771 \begin_layout Plain Layout
10778 So a command with two optional arguments has:
10779 \begin_inset Separator parbreak
10786 \begin_layout Quote
10792 \begin_layout Quote
10798 \begin_layout Quote
10804 \begin_layout Quote
10810 \begin_layout Quote
10816 \begin_layout Quote
10822 \begin_layout Standard
10824 \begin_inset Flex Code
10827 \begin_layout Plain Layout
10833 definition, the following specifications are possible:
10836 \begin_layout Itemize
10837 \begin_inset Flex Code
10840 \begin_layout Plain Layout
10847 \begin_inset Flex Code
10850 \begin_layout Plain Layout
10856 The string that will appear both in the menu (to insert this argument)
10857 and on the argument inset button (unless you also specify a separate
10858 \begin_inset Flex Code
10861 \begin_layout Plain Layout
10868 For the menu, you can define an accelerator by appending the respective
10869 character to the string, divided by
10870 \begin_inset Quotes eld
10874 \begin_inset Quotes erd
10878 \begin_inset space \thinspace{}
10882 \begin_inset space \space{}
10886 \begin_inset Quotes eld
10890 \begin_inset Flex Code
10893 \begin_layout Plain Layout
10900 \begin_inset Quotes erd
10906 \begin_layout Itemize
10907 \begin_inset Flex Code
10910 \begin_layout Plain Layout
10917 \begin_inset Flex Code
10920 \begin_layout Plain Layout
10926 A separate string for the menu.
10927 You can define an accelerator by appending the respective character to
10928 the string, divided by
10929 \begin_inset Quotes eld
10933 \begin_inset Quotes erd
10937 \begin_inset space \thinspace{}
10941 \begin_inset space \space{}
10945 \begin_inset Quotes eld
10949 \begin_inset Flex Code
10952 \begin_layout Plain Layout
10959 \begin_inset Quotes erd
10963 This specification is optional.
10964 If it is not given the
10965 \begin_inset Flex Code
10968 \begin_layout Plain Layout
10974 will be used instead for the menu.
10977 \begin_layout Itemize
10978 \begin_inset Flex Code
10981 \begin_layout Plain Layout
10988 \begin_inset Flex Code
10991 \begin_layout Plain Layout
10997 A longer explanatory text that appears in the tooltip when hovering over
10998 the argument inset.
11001 \begin_layout Itemize
11002 \begin_inset Flex Code
11005 \begin_layout Plain Layout
11012 \begin_inset Flex Code
11015 \begin_layout Plain Layout
11024 \begin_inset space \thinspace{}
11028 \begin_inset Flex Code
11031 \begin_layout Plain Layout
11037 ] Declare if this is a mandatory (1) or an optional (0) argument.
11038 Mandatory arguments will be output empty if not given, while optional arguments
11039 will not be output at all.
11040 By default, mandatory arguments are delimited by
11041 \begin_inset Flex Code
11044 \begin_layout Plain Layout
11050 , while optional arguments are delimited by
11051 \begin_inset Flex Code
11054 \begin_layout Plain Layout
11063 \begin_layout Itemize
11064 \begin_inset Flex Code
11067 \begin_layout Plain Layout
11074 \begin_inset Flex Code
11077 \begin_layout Plain Layout
11083 defines another argument (by its number) which this argument requires to
11084 be output if it is itself output.
11086 \begin_inset space \thinspace{}
11089 g., in \SpecialChar LaTeX
11090 commands, optional arguments often require previous optional arguments
11091 to be output (at least empty), as in
11092 \begin_inset Flex Code
11095 \begin_layout Plain Layout
11098 command[][argument]{text}
11104 This can be achieved by the statement
11105 \begin_inset Flex Code
11108 \begin_layout Plain Layout
11115 \begin_inset Flex Code
11118 \begin_layout Plain Layout
11127 \begin_layout Itemize
11128 \begin_inset Flex Code
11131 \begin_layout Plain Layout
11138 \begin_inset Flex Code
11141 \begin_layout Plain Layout
11147 defines a custom left delimiter (instead of
11148 \begin_inset Flex Code
11151 \begin_layout Plain Layout
11158 \begin_inset Flex Code
11161 \begin_layout Plain Layout
11168 A line break in the output can be indicated by
11169 \begin_inset Flex Code
11172 \begin_layout Plain Layout
11181 \begin_layout Itemize
11182 \begin_inset Flex Code
11185 \begin_layout Plain Layout
11192 \begin_inset Flex Code
11195 \begin_layout Plain Layout
11201 defines a custom right delimiter (instead of
11202 \begin_inset Flex Code
11205 \begin_layout Plain Layout
11212 \begin_inset Flex Code
11215 \begin_layout Plain Layout
11222 A line break in the output can be indicated by
11223 \begin_inset Flex Code
11226 \begin_layout Plain Layout
11235 \begin_layout Itemize
11236 \begin_inset Flex Code
11239 \begin_layout Plain Layout
11246 \begin_inset Flex Code
11249 \begin_layout Plain Layout
11255 defines an argument that is inserted if and only if no user-specified arguments
11257 \begin_inset space \thinspace{}
11261 \begin_inset space \space{}
11264 if no argument inset has been inserted (note that also an empty argument
11265 inset omits the DefaultArg).
11266 Multiple arguments need to be separated by comma.
11269 \begin_layout Itemize
11270 \begin_inset Flex Code
11273 \begin_layout Plain Layout
11280 \begin_inset Flex Code
11283 \begin_layout Plain Layout
11289 defines an argument that is inserted in any case (alone or in addition
11290 to user-specified arguments).
11291 Multiple arguments need to be separated by comma.
11294 \begin_layout Itemize
11295 \begin_inset Flex Code
11298 \begin_layout Plain Layout
11304 The font used for the argument content, see
11305 \begin_inset CommandInset ref
11307 reference "sub:Font-description"
11314 \begin_layout Itemize
11315 \begin_inset Flex Code
11318 \begin_layout Plain Layout
11324 The font used for the label; see
11325 \begin_inset CommandInset ref
11327 reference "sub:Font-description"
11334 \begin_layout Itemize
11335 \begin_inset Flex Code
11338 \begin_layout Plain Layout
11345 \begin_inset Flex Code
11348 \begin_layout Plain Layout
11353 , Minimalistic, Conglomerate
11358 ] describes the rendering style used for the inset's frame and buttons.
11361 \begin_layout Itemize
11362 \begin_inset Flex Code
11365 \begin_layout Plain Layout
11372 \begin_inset Flex Code
11375 \begin_layout Plain Layout
11382 \begin_inset Flex Code
11385 \begin_layout Plain Layout
11391 , this argument is automatically inserted when the respective style is selected.
11392 Currently, only one argument per style\SpecialChar breakableslash
11393 layout can be automatically inserted.
11396 \begin_layout Standard
11397 By default, the text entered in the \SpecialChar LyX
11398 workarea in the respective layout is
11399 the last (mandatory) argument of a command if the
11400 \begin_inset Flex Code
11403 \begin_layout Plain Layout
11410 \begin_inset Flex Code
11413 \begin_layout Plain Layout
11420 However, arguments with the prefix
11421 \begin_inset Flex Code
11424 \begin_layout Plain Layout
11430 are output after this workarea argument.
11431 Note that post-argument numbering restarts at 1, so the first argument
11432 following the workarea argument is
11433 \begin_inset Flex Code
11436 \begin_layout Plain Layout
11443 Post-arguments are ignored in any other
11444 \begin_inset Flex Code
11447 \begin_layout Plain Layout
11454 \begin_inset Flex Code
11457 \begin_layout Plain Layout
11466 \begin_layout Standard
11468 \begin_inset Flex Code
11471 \begin_layout Plain Layout
11480 \begin_inset Flex Code
11483 \begin_layout Plain Layout
11492 \begin_inset Flex Code
11495 \begin_layout Plain Layout
11501 followed by the number (e.
11502 \begin_inset space \thinspace{}
11506 \begin_inset space \space{}
11510 \begin_inset Flex Code
11513 \begin_layout Plain Layout
11523 \begin_layout Description
11524 \begin_inset Flex Code
11527 \begin_layout Plain Layout
11533 Note that this will completely override any prior
11534 \begin_inset Flex Code
11537 \begin_layout Plain Layout
11543 declaration for this style.
11545 \begin_inset Quotes eld
11549 \begin_inset Flex Code
11552 \begin_layout Plain Layout
11559 \begin_inset Quotes erd
11564 \begin_inset CommandInset ref
11566 reference "sub:I18n"
11570 for details on its use.
11573 \begin_layout Description
11574 \begin_inset Flex Code
11577 \begin_layout Plain Layout
11584 \begin_inset Flex Code
11587 \begin_layout Plain Layout
11597 \begin_layout Plain Layout
11598 Note that a `float' here is a real number, such as: 1.5.
11603 The vertical space with which the last of a chain of paragraphs with this
11604 style is separated from the following paragraph.
11605 If the next paragraph has another style, the separations are not simply
11606 added, but the maximum is taken.
11609 \begin_layout Description
11610 \begin_inset Flex Code
11613 \begin_layout Plain Layout
11620 \begin_inset Flex Code
11623 \begin_layout Plain Layout
11629 ] The category for this style.
11630 This is used to group related styles in the style combobox on the toolbar.
11631 Any string can be used, but you may want to use existing categories with
11636 \begin_layout Description
11637 \begin_inset Flex Code
11640 \begin_layout Plain Layout
11646 Depth of XML command.
11647 Used only with XML-type formats.
11650 \begin_layout Description
11651 \begin_inset Flex Code
11654 \begin_layout Plain Layout
11661 \begin_inset Flex Code
11664 \begin_layout Plain Layout
11670 ] Copies all the features of an existing style into the current one.
11674 \begin_layout Description
11675 \begin_inset Flex Code
11678 \begin_layout Plain Layout
11685 \begin_inset Flex Code
11688 \begin_layout Plain Layout
11694 ] The name of a style whose preamble should be output
11699 This allows to ensure some ordering of the preamble snippets when macros
11700 definitions depend on one another.
11704 \begin_layout Plain Layout
11705 Note that, besides that functionality, there is no way to ensure any ordering
11707 The ordering that you see in a given version of \SpecialChar LyX
11708 may change without warning
11717 \begin_layout Description
11718 \begin_inset Flex Code
11721 \begin_layout Plain Layout
11728 \begin_inset Flex Code
11731 \begin_layout Plain Layout
11736 , Box, Filled_Box, Static
11741 ] The type of label that stands at the end of the paragraph (or sequence
11743 \begin_inset Flex Code
11746 \begin_layout Plain Layout
11753 \begin_inset Newline newline
11757 \begin_inset Flex Code
11760 \begin_layout Plain Layout
11767 \begin_inset Flex Code
11770 \begin_layout Plain Layout
11777 \begin_inset Flex Code
11780 \begin_layout Plain Layout
11788 \begin_inset Flex Code
11791 \begin_layout Plain Layout
11798 \begin_inset Quotes eld
11802 \begin_inset Quotes erd
11806 \begin_inset Flex Code
11809 \begin_layout Plain Layout
11816 \begin_inset space \space{}
11820 \begin_inset Flex Code
11823 \begin_layout Plain Layout
11829 ) is a white (resp.
11830 \begin_inset space ~
11833 black) square suitable for end of proof markers,
11834 \begin_inset Flex Code
11837 \begin_layout Plain Layout
11843 is an explicit text string.
11846 \begin_layout Description
11847 \begin_inset Flex Code
11850 \begin_layout Plain Layout
11857 \begin_inset Flex Code
11860 \begin_layout Plain Layout
11866 ] The string used for a label with a
11867 \begin_inset Flex Code
11870 \begin_layout Plain Layout
11877 \begin_inset Newline newline
11881 \begin_inset Flex Code
11884 \begin_layout Plain Layout
11894 \begin_layout Description
11895 \begin_inset Flex Code
11898 \begin_layout Plain Layout
11904 The font used for both the text body
11910 \begin_inset CommandInset ref
11912 reference "sub:Font-description"
11917 Note that defining this font automatically defines the
11918 \begin_inset Flex Code
11921 \begin_layout Plain Layout
11928 So you should define this one first if you also want to define
11929 \begin_inset Flex Code
11932 \begin_layout Plain Layout
11941 \begin_layout Description
11942 \begin_inset Flex Code
11945 \begin_layout Plain Layout
11952 \begin_inset Flex Code
11955 \begin_layout Plain Layout
11961 ] Used for backporting new styles to stable \SpecialChar LyX
11963 The first stable version that supports this tag is \SpecialChar LyX
11965 The argument is a number which may either be 0, -1 or any value greater
11968 \begin_inset Flex Code
11971 \begin_layout Plain Layout
11977 flag of a style is greater than zero, it will always be written to the
11979 If a .lyx file is read, the style definitions from the document header are
11980 added to the document class.
11981 Therefore even older \SpecialChar LyX
11982 versions can handle the style.
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11993 is a version number: If the style is read, and the version number is less
11994 than the version number of the already existing style in the document class,
11995 the new style is ignored.
11996 If the version number is greater, the new style replaces the existing style.
11997 A value of -1 means an infinite version number, i.
11998 \begin_inset space \thinspace{}
12002 \begin_inset space \space{}
12005 the style is always used.
12008 \begin_layout Description
12009 \begin_inset Flex Code
12012 \begin_layout Plain Layout
12019 \begin_inset Flex Code
12022 \begin_layout Plain Layout
12031 \begin_inset space \thinspace{}
12035 \begin_inset Flex Code
12038 \begin_layout Plain Layout
12044 ] Usually \SpecialChar LyX
12045 does not allow you to insert more than one space between words,
12046 since a space is considered as the separation between two words, not a
12047 character or symbol of its own.
12048 This is a very fine thing but sometimes annoying, for example, when typing
12049 program code or plain \SpecialChar LaTeX
12052 \begin_inset Flex Code
12055 \begin_layout Plain Layout
12062 Note that \SpecialChar LyX
12063 will create protected blanks for the additional blanks when
12064 in another mode than \SpecialChar LaTeX
12068 \begin_layout Description
12069 \begin_inset Flex Code
12072 \begin_layout Plain Layout
12078 These tags are used with XHTML output.
12080 \begin_inset CommandInset ref
12082 reference "sub:Paragraph-Style-XHTML"
12089 \begin_layout Description
12090 \begin_inset Flex Code
12093 \begin_layout Plain Layout
12099 [FIXME] (Used only with XML-type formats.)
12102 \begin_layout Description
12103 \begin_inset Flex Code
12106 \begin_layout Plain Layout
12113 \begin_inset Flex Code
12116 \begin_layout Plain Layout
12125 \begin_inset space \thinspace{}
12129 \begin_inset Flex Code
12132 \begin_layout Plain Layout
12139 \begin_inset Flex Code
12142 \begin_layout Plain Layout
12148 , marks the style as to be included in the document preamble and not in
12150 This is useful for document classes that want such information as the title
12151 and author to appear in the preamble.
12152 Note that this works only for styles for which the
12153 \begin_inset Flex Code
12156 \begin_layout Plain Layout
12163 \begin_inset Flex Code
12166 \begin_layout Plain Layout
12173 \begin_inset Flex Code
12176 \begin_layout Plain Layout
12185 \begin_layout Description
12186 \begin_inset Flex Code
12189 \begin_layout Plain Layout
12196 \begin_inset Flex Code
12199 \begin_layout Plain Layout
12208 \begin_inset space \thinspace{}
12212 \begin_inset Flex Code
12215 \begin_layout Plain Layout
12222 \begin_inset Flex Code
12225 \begin_layout Plain Layout
12231 , marks the style as being part of a title block (see also the
12232 \begin_inset Flex Code
12235 \begin_layout Plain Layout
12242 \begin_inset Flex Code
12245 \begin_layout Plain Layout
12254 \begin_layout Description
12255 \begin_inset Flex Code
12258 \begin_layout Plain Layout
12265 \begin_inset Flex Code
12268 \begin_layout Plain Layout
12274 ] The \SpecialChar LaTeX
12275 command sequence declaring an item in a list.
12276 The command is to be defined without the preceding backslash (the default
12278 \begin_inset Quotes eld
12282 \begin_inset Quotes erd
12286 \begin_inset Flex Code
12289 \begin_layout Plain Layout
12297 in the \SpecialChar LaTeX
12301 \begin_layout Description
12302 \begin_inset Flex Code
12305 \begin_layout Plain Layout
12312 \begin_inset Flex Code
12315 \begin_layout Plain Layout
12321 ] This provides extra space between paragraphs that have the same style.
12322 If you put other styles into an environment, each is separated with the
12324 \begin_inset Flex Code
12327 \begin_layout Plain Layout
12334 But the whole items of the environment are additionally separated with
12336 \begin_inset Flex Code
12339 \begin_layout Plain Layout
12346 Note that this is a
12351 \begin_layout Description
12352 \begin_inset Flex Code
12355 \begin_layout Plain Layout
12361 [FIXME] (Used only with XML-type formats.)
12364 \begin_layout Description
12365 \begin_inset Flex Code
12368 \begin_layout Plain Layout
12375 \begin_inset Flex Code
12378 \begin_layout Plain Layout
12387 \begin_inset space \thinspace{}
12391 \begin_inset Flex Code
12394 \begin_layout Plain Layout
12400 ] Usually \SpecialChar LyX
12401 does not allow you to leave a paragraph empty, since it would
12402 lead to empty \SpecialChar LaTeX
12404 There are some cases where this could be desirable however: in a letter
12405 template, the required fields can be provided as empty fields, so that
12406 people do not forget them; in some special classes, a style can be used
12407 as some kind of break, which does not contain actual text.
12410 \begin_layout Description
12411 \begin_inset Flex Code
12414 \begin_layout Plain Layout
12421 \begin_inset Flex Code
12424 \begin_layout Plain Layout
12430 ] The vertical space between the label and the text body.
12431 Only used for labels that are above the text body (
12432 \begin_inset Flex Code
12435 \begin_layout Plain Layout
12442 \begin_inset Newline newline
12446 \begin_inset Flex Code
12449 \begin_layout Plain Layout
12450 Centered_Top_Environment
12458 \begin_layout Description
12459 \begin_inset Flex Code
12462 \begin_layout Plain Layout
12469 \begin_inset Flex Code
12472 \begin_layout Plain Layout
12478 ] The name of the counter for automatic numbering.
12479 In order to have the counter appear with your label, you will need to reference
12481 \begin_inset Flex Code
12484 \begin_layout Plain Layout
12493 This will work with
12494 \begin_inset Flex Code
12497 \begin_layout Plain Layout
12504 \begin_inset Flex Code
12507 \begin_layout Plain Layout
12514 \begin_inset Flex Code
12517 \begin_layout Plain Layout
12524 \begin_inset Flex Code
12527 \begin_layout Plain Layout
12534 \begin_inset Newline newline
12542 \begin_inset Flex Code
12545 \begin_layout Plain Layout
12552 \begin_inset Flex Code
12555 \begin_layout Plain Layout
12561 , though this case is a bit complicated.
12562 Suppose you declare
12563 \begin_inset Quotes eld
12567 \begin_inset Flex Code
12570 \begin_layout Plain Layout
12571 LabelCounter myenum
12577 \begin_inset Quotes erd
12581 Then the actual counters used are
12582 \begin_inset Flex Code
12585 \begin_layout Plain Layout
12592 \begin_inset Flex Code
12595 \begin_layout Plain Layout
12602 \begin_inset Flex Code
12605 \begin_layout Plain Layout
12612 \begin_inset Flex Code
12615 \begin_layout Plain Layout
12621 , much as in \SpecialChar LaTeX
12623 These counters must all be declared separately.
12624 \begin_inset Newline newline
12628 \begin_inset CommandInset ref
12630 reference "sub:Counters"
12634 for details on counters.
12637 \begin_layout Description
12638 \begin_inset Flex Code
12641 \begin_layout Plain Layout
12647 The font used for the label.
12649 \begin_inset CommandInset ref
12651 reference "sub:Font-description"
12658 \begin_layout Description
12659 \begin_inset Flex Code
12662 \begin_layout Plain Layout
12669 \begin_inset Flex Code
12672 \begin_layout Plain Layout
12678 ] Text that indicates how far a label should be indented.
12681 \begin_layout Description
12682 \begin_inset Flex Code
12685 \begin_layout Plain Layout
12692 \begin_inset Flex Code
12695 \begin_layout Plain Layout
12701 ] Text that indicates the amount of horizontal space between the label and
12703 Only used for labels that are not above the text body.
12706 \begin_layout Description
12707 \begin_inset Flex Code
12710 \begin_layout Plain Layout
12717 \begin_inset Flex Code
12720 \begin_layout Plain Layout
12726 ] The string used for the label.
12728 \begin_inset Flex Code
12731 \begin_layout Plain Layout
12737 is set, this string can be contain the special formatting commands described
12739 \begin_inset CommandInset ref
12741 reference "sub:Counters"
12748 \begin_layout Description
12749 \begin_inset Flex Code
12752 \begin_layout Plain Layout
12753 LabelStringAppendix
12759 \begin_inset Flex Code
12762 \begin_layout Plain Layout
12768 ] This is used inside the appendix instead of
12769 \begin_inset Newline newline
12773 \begin_inset Flex Code
12776 \begin_layout Plain Layout
12784 \begin_inset Flex Code
12787 \begin_layout Plain Layout
12794 \begin_inset Newline newline
12798 \begin_inset Flex Code
12801 \begin_layout Plain Layout
12802 LabelStringAppendix
12810 \begin_layout Description
12811 \begin_inset Flex Code
12814 \begin_layout Plain Layout
12820 [FIXME] (Used only with XML-type formats.)
12823 \begin_layout Description
12824 \begin_inset Flex Code
12827 \begin_layout Plain Layout
12834 \begin_inset Flex Code
12837 \begin_layout Plain Layout
12842 , Manual, Static, Above,
12843 \begin_inset Newline newline
12846 Centered, Sensitive, Enumerate,
12847 \begin_inset Newline newline
12850 Itemize, Bibliography
12856 \begin_inset Separator parbreak
12863 \begin_layout Description
12864 \begin_inset Flex Code
12867 \begin_layout Plain Layout
12873 means the label is the very first word (up to the first real blank).
12874 Use protected spaces if you want more than one word as the label.
12878 \begin_layout Description
12879 \begin_inset Flex Code
12882 \begin_layout Plain Layout
12888 means the label is simply what is declared as
12889 \begin_inset Flex Code
12892 \begin_layout Plain Layout
12899 This will be displayed
12900 \begin_inset Quotes eld
12904 \begin_inset Quotes erd
12907 , at the beginning of the paragraph.
12909 \begin_inset Flex Code
12912 \begin_layout Plain Layout
12919 \begin_inset Flex Code
12922 \begin_layout Plain Layout
12928 , then it will be displayed only in the first paragraph of any sequence
12929 of paragraphs with the same
12930 \begin_inset Flex Code
12933 \begin_layout Plain Layout
12942 \begin_layout Description
12943 \begin_inset Flex Code
12946 \begin_layout Plain Layout
12953 \begin_inset space ~
12957 \begin_inset space ~
12961 \begin_inset Flex Code
12964 \begin_layout Plain Layout
12970 are special cases of
12971 \begin_inset Flex Code
12974 \begin_layout Plain Layout
12981 The label will be printed above the paragraph either at the beginning of
12982 the line or centered.
12985 \begin_layout Description
12986 \begin_inset Flex Code
12989 \begin_layout Plain Layout
12995 is a special case for the caption-labels
12996 \begin_inset Quotes eld
13000 \begin_inset Quotes erd
13004 \begin_inset Quotes eld
13008 \begin_inset Quotes erd
13012 \begin_inset Newline newline
13016 \begin_inset Flex Code
13019 \begin_layout Plain Layout
13025 means the (hardcoded) label string depends on the kind of float: It is
13026 hardcoded to be `FloatType N', where N is the value of the counter associated
13028 For the case that a caption is inserted outside of a float the
13029 \begin_inset Flex Code
13032 \begin_layout Plain Layout
13039 \begin_inset Quotes eld
13043 \begin_inset Quotes erd
13049 \begin_layout Description
13050 \begin_inset Flex Code
13053 \begin_layout Plain Layout
13059 produces the usual sort of enumeration labels.
13060 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13061 small Roman numerals, and uppercase letters for the four possible depths.
13064 \begin_layout Description
13065 \begin_inset Flex Code
13068 \begin_layout Plain Layout
13074 produces various bullets at the different levels.
13075 It is also hardcoded.
13078 \begin_layout Description
13079 \begin_inset Flex Code
13082 \begin_layout Plain Layout
13088 should be used only with
13089 \begin_inset Flex Code
13092 \begin_layout Plain Layout
13093 LatexType BibEnvironment
13102 \begin_layout Description
13103 \begin_inset Flex Code
13106 \begin_layout Plain Layout
13112 Note that this will completely override any prior
13113 \begin_inset Flex Code
13116 \begin_layout Plain Layout
13122 declaration for this style.
13124 \begin_inset Quotes eld
13128 \begin_inset Flex Code
13131 \begin_layout Plain Layout
13138 \begin_inset Quotes erd
13143 \begin_inset CommandInset ref
13145 reference "sub:I18n"
13149 for details on its use.
13152 \begin_layout Description
13153 \begin_inset Flex Code
13156 \begin_layout Plain Layout
13163 \begin_inset Flex Code
13166 \begin_layout Plain Layout
13172 ] The name of the corresponding \SpecialChar LaTeX
13174 Either the environment or command name.
13177 \begin_layout Description
13178 \begin_inset Flex Code
13181 \begin_layout Plain Layout
13188 \begin_inset Flex Code
13191 \begin_layout Plain Layout
13197 ] An optional parameter for the corresponding
13198 \begin_inset Flex Code
13201 \begin_layout Plain Layout
13208 This parameter cannot be changed from within \SpecialChar LyX
13210 \begin_inset Flex Code
13213 \begin_layout Plain Layout
13219 for customizable parameters).
13220 This will be output as is after all \SpecialChar LaTeX
13222 \begin_inset Flex Code
13225 \begin_layout Plain Layout
13234 \begin_layout Description
13235 \begin_inset Flex Code
13238 \begin_layout Plain Layout
13245 \begin_inset Flex Code
13248 \begin_layout Plain Layout
13253 , Command, Environment, Item_Environment,
13254 \begin_inset Newline newline
13257 List_Environment, Bib_Environment
13262 ] How the style should be translated into \SpecialChar LaTeX
13267 \begin_layout Plain Layout
13268 \begin_inset Flex Code
13271 \begin_layout Plain Layout
13277 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13278 Visit the SGML class files for specific examples.
13284 \begin_inset Separator parbreak
13291 \begin_layout Description
13292 \begin_inset Flex Code
13295 \begin_layout Plain Layout
13301 means nothing special.
13304 \begin_layout Description
13305 \begin_inset Flex Code
13308 \begin_layout Plain Layout
13315 \begin_inset Flex Code
13318 \begin_layout Plain Layout
13325 {\SpecialChar ldots
13334 \begin_layout Description
13335 \begin_inset Flex Code
13338 \begin_layout Plain Layout
13345 \begin_inset Flex Code
13348 \begin_layout Plain Layout
13355 }\SpecialChar ldots
13371 \begin_layout Description
13372 \begin_inset Flex Code
13375 \begin_layout Plain Layout
13382 \begin_inset Flex Code
13385 \begin_layout Plain Layout
13392 \begin_inset Flex Code
13395 \begin_layout Plain Layout
13403 is generated for each paragraph of this environment.
13407 \begin_layout Description
13408 \begin_inset Flex Code
13411 \begin_layout Plain Layout
13418 \begin_inset Flex Code
13421 \begin_layout Plain Layout
13428 \begin_inset Newline newline
13432 \begin_inset Flex Code
13435 \begin_layout Plain Layout
13441 is passed as an argument to the environment.
13442 \begin_inset Newline newline
13446 \begin_inset Flex Code
13449 \begin_layout Plain Layout
13455 can be defined in the
13456 \begin_inset Flex MenuItem
13459 \begin_layout Plain Layout
13460 Edit\SpecialChar menuseparator
13462 \begin_inset space ~
13473 \begin_layout Description
13474 \begin_inset Flex Code
13477 \begin_layout Plain Layout
13484 \begin_inset Flex Code
13487 \begin_layout Plain Layout
13493 but adds additionally the necessary mandatory argument (the longest label)
13494 to the begin statement of the bibliography environment:
13495 \begin_inset Newline newline
13499 \begin_inset Flex Code
13502 \begin_layout Plain Layout
13505 begin{thebibliography}{99}
13510 It is therefore only useful for bibliography environments.
13511 The default longest label
13512 \begin_inset Quotes eld
13516 \begin_inset Quotes erd
13519 can be changed by the user in the paragraph settings of a bibliography
13523 \begin_layout Standard
13524 Putting the last few things together, the \SpecialChar LaTeX
13525 output will be either:
13528 \begin_layout LyX-Code
13531 LatexName[LatexParam]{\SpecialChar ldots
13535 \begin_layout Standard
13539 \begin_layout LyX-Code
13542 begin{LatexName}[LatexParam] \SpecialChar ldots
13548 \begin_layout Standard
13549 depending upon the \SpecialChar LaTeX
13554 \begin_layout Description
13555 \begin_inset Flex Code
13558 \begin_layout Plain Layout
13565 \begin_inset Flex Code
13568 \begin_layout Plain Layout
13574 ] A string that is put at the beginning of the style content.
13575 A line break in the output can be indicated by
13576 \begin_inset Flex Code
13579 \begin_layout Plain Layout
13588 \begin_layout Description
13589 \begin_inset Flex Code
13592 \begin_layout Plain Layout
13599 \begin_inset Flex Code
13602 \begin_layout Plain Layout
13608 ] If you put styles into environments, the different
13609 \begin_inset Flex Code
13612 \begin_layout Plain Layout
13618 are not simply added, but added with a factor
13619 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13623 Note that this parameter is also used when
13624 \begin_inset Flex Code
13627 \begin_layout Plain Layout
13634 \begin_inset Flex Code
13637 \begin_layout Plain Layout
13644 \begin_inset Flex Code
13647 \begin_layout Plain Layout
13654 Then it is added to the manual or dynamic margin.
13655 \begin_inset Newline newline
13659 \begin_inset Quotes eld
13663 \begin_inset Flex Code
13666 \begin_layout Plain Layout
13673 \begin_inset Quotes erd
13676 means that the paragraph is indented with the width of
13677 \begin_inset Quotes eld
13681 \begin_inset Flex Code
13684 \begin_layout Plain Layout
13691 \begin_inset Quotes erd
13694 in the normal font.
13695 You can get a negative width by prefixing the string with
13696 \begin_inset Quotes eld
13700 \begin_inset Flex Code
13703 \begin_layout Plain Layout
13710 \begin_inset Quotes erd
13714 This way was chosen so that the look is the same with each used screen
13718 \begin_layout Description
13719 \begin_inset Flex Code
13722 \begin_layout Plain Layout
13729 \begin_inset Flex Code
13732 \begin_layout Plain Layout
13737 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13743 \begin_inset Newline newline
13746 The kind of margin that the style has on the left side.
13747 \begin_inset Separator parbreak
13754 \begin_layout Description
13755 \begin_inset Flex Code
13758 \begin_layout Plain Layout
13764 just means a fixed margin.
13767 \begin_layout Description
13768 \begin_inset Flex Code
13771 \begin_layout Plain Layout
13777 means that the left margin depends on the string entered in the
13778 \begin_inset Flex MenuItem
13781 \begin_layout Plain Layout
13782 Edit\SpecialChar menuseparator
13784 \begin_inset space ~
13793 This is used to typeset nice lists without tabulators.
13796 \begin_layout Description
13797 \begin_inset Flex Code
13800 \begin_layout Plain Layout
13806 means that the margin depends on the size of the label.
13807 This is used for automatic enumerated headlines.
13808 It is obvious that the headline
13809 \begin_inset Quotes eld
13812 5.4.3.2.1 Very long headline
13813 \begin_inset Quotes erd
13816 must have a wider left margin (as wide as
13817 \begin_inset Quotes eld
13821 \begin_inset Quotes erd
13824 plus the space) than
13825 \begin_inset Quotes eld
13828 3.2 Very long headline
13829 \begin_inset Quotes erd
13833 \begin_inset Quotes eld
13837 \begin_inset Quotes erd
13840 are not able to do this.
13843 \begin_layout Description
13844 \begin_inset Flex Code
13847 \begin_layout Plain Layout
13853 is similar, but only the very first row of the paragraph is dynamic, while
13854 the others are static; this is used, for example, for descriptions.
13857 \begin_layout Description
13858 \begin_inset Flex Code
13861 \begin_layout Plain Layout
13867 means the margin is chosen in a way that the longest row of this paragraph
13868 fits to the right margin.
13869 This is used to typeset an address on the right edge of the page.
13873 \begin_layout Description
13874 \begin_inset Flex Code
13877 \begin_layout Plain Layout
13884 \begin_inset Flex Code
13887 \begin_layout Plain Layout
13896 \begin_inset space \thinspace{}
13900 \begin_inset Flex Code
13903 \begin_layout Plain Layout
13909 ] Whether fragile commands in this style should be
13910 \begin_inset Flex Code
13913 \begin_layout Plain Layout
13926 whether this command should itself be protected.)
13929 \begin_layout Description
13930 \begin_inset Flex Code
13933 \begin_layout Plain Layout
13940 \begin_inset Flex Code
13943 \begin_layout Plain Layout
13950 \begin_inset space \thinspace{}
13954 \begin_inset Flex Code
13957 \begin_layout Plain Layout
13965 ] Whether newlines are translated into \SpecialChar LaTeX
13967 \begin_inset Flex Code
13970 \begin_layout Plain Layout
13981 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
13983 inside \SpecialChar LyX
13987 \begin_layout Description
13988 \begin_inset Flex Code
13991 \begin_layout Plain Layout
13998 \begin_inset Flex Code
14001 \begin_layout Plain Layout
14010 \begin_inset space \thinspace{}
14014 \begin_inset Flex Code
14017 \begin_layout Plain Layout
14023 ] If set to true, and if
14024 \begin_inset Flex Code
14027 \begin_layout Plain Layout
14034 \begin_inset Flex Code
14037 \begin_layout Plain Layout
14043 ) paragraphs are being indented, then the indentation of such a paragraph
14044 following one of this type will be suppressed.
14045 (So this will not affect the display of non-default paragraphs.)
14048 \begin_layout Description
14049 \begin_inset Flex Code
14052 \begin_layout Plain Layout
14059 \begin_inset Flex Code
14062 \begin_layout Plain Layout
14068 ] Name of a style that has replaced this style.
14069 This is used to rename a style, while keeping backward compatibility.
14072 \begin_layout Description
14073 \begin_inset Flex Code
14076 \begin_layout Plain Layout
14083 \begin_inset Flex Code
14086 \begin_layout Plain Layout
14095 \begin_inset space \thinspace{}
14099 \begin_inset Flex Code
14102 \begin_layout Plain Layout
14108 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14110 but only by a line break; together with
14111 \begin_inset Flex Code
14114 \begin_layout Plain Layout
14120 , this allows to emulate a plain text editor (like the ERT inset).
14123 \begin_layout Description
14124 \begin_inset Flex Code
14127 \begin_layout Plain Layout
14134 \begin_inset Flex Code
14137 \begin_layout Plain Layout
14143 ] The indent of the very first line of a paragraph.
14145 \begin_inset Newline newline
14149 \begin_inset Flex Code
14152 \begin_layout Plain Layout
14158 will be fixed for a certain style.
14159 The exception is the default style, since the indentation for these paragraphs
14160 can be prohibited with
14161 \begin_inset Flex Code
14164 \begin_layout Plain Layout
14172 \begin_inset Flex Code
14175 \begin_layout Plain Layout
14181 style paragraphs inside environments use the
14182 \begin_inset Flex Code
14185 \begin_layout Plain Layout
14191 of the environment, not their native one.
14193 \begin_inset Flex Code
14196 \begin_layout Plain Layout
14202 paragraphs inside an enumeration are not indented.
14205 \begin_layout Description
14206 \begin_inset Flex Code
14209 \begin_layout Plain Layout
14216 \begin_inset Flex Code
14219 \begin_layout Plain Layout
14225 ] The vertical space between two paragraphs of this style.
14228 \begin_layout Description
14229 \begin_inset Flex Code
14232 \begin_layout Plain Layout
14239 \begin_inset Flex Code
14242 \begin_layout Plain Layout
14249 allows the user to choose either
14250 \begin_inset Quotes eld
14254 \begin_inset Quotes erd
14258 \begin_inset Quotes eld
14262 \begin_inset Quotes erd
14265 to separate paragraphs.
14267 \begin_inset Quotes eld
14271 \begin_inset Quotes erd
14275 \begin_inset Flex Code
14278 \begin_layout Plain Layout
14286 \begin_inset Quotes eld
14290 \begin_inset Quotes erd
14294 \begin_inset Flex Code
14297 \begin_layout Plain Layout
14303 is ignored and all paragraphs are separated by the
14304 \begin_inset Flex Code
14307 \begin_layout Plain Layout
14314 The vertical space is calculated with
14315 \begin_inset Flex Code
14318 \begin_layout Plain Layout
14320 \begin_inset space ~
14329 \begin_inset Flex Code
14332 \begin_layout Plain Layout
14338 is the height of a row with the normal font.
14339 This way, the look stays the same with different screen fonts.
14342 \begin_layout Description
14343 \begin_inset Flex Code
14346 \begin_layout Plain Layout
14353 \begin_inset Flex Code
14356 \begin_layout Plain Layout
14365 \begin_inset space \thinspace{}
14369 \begin_inset Flex Code
14372 \begin_layout Plain Layout
14378 ] Whether the contents of this paragraph should be output in raw form, meaning
14379 without special translations that \SpecialChar LaTeX
14381 \change_inserted 155139281 1429534178
14385 \begin_layout Description
14387 \change_inserted 155139281 1429534242
14390 \begin_inset Flex Code
14393 \begin_layout Plain Layout
14395 \change_inserted 155139281 1429534178
14404 \begin_inset Flex Code
14407 \begin_layout Plain Layout
14409 \change_inserted 155139281 1429534178
14410 string of characters
14419 Defines individual characters that should be output in raw form, meaning
14420 without special translations that \SpecialChar LaTeX
14426 \begin_layout Description
14427 \begin_inset Flex Code
14430 \begin_layout Plain Layout
14436 Information to be included in the \SpecialChar LaTeX
14437 preamble when this style is used.
14438 Used to define macros, load packages, etc., required by this particular
14441 \begin_inset Quotes eld
14445 \begin_inset Flex Code
14448 \begin_layout Plain Layout
14455 \begin_inset Quotes erd
14461 \begin_layout Description
14462 \begin_inset Flex Code
14465 \begin_layout Plain Layout
14472 \begin_inset Flex Code
14475 \begin_layout Plain Layout
14481 ] The prefix to use when creating labels referring to paragraphs of this
14483 This allows the use of formatted references.
14486 \begin_layout Description
14487 \begin_inset Flex Code
14490 \begin_layout Plain Layout
14497 \begin_inset Flex Code
14500 \begin_layout Plain Layout
14506 ] Whether the style requires the feature
14507 \begin_inset Flex Code
14510 \begin_layout Plain Layout
14517 See the description of
14518 \begin_inset Flex Code
14521 \begin_layout Plain Layout
14528 \begin_inset CommandInset ref
14530 reference "sub:General-text-class"
14534 ) for information on `features'.
14537 \begin_layout Description
14538 \begin_inset Flex Code
14541 \begin_layout Plain Layout
14548 \begin_inset Flex Code
14551 \begin_layout Plain Layout
14560 \begin_inset Flex Code
14563 \begin_layout Plain Layout
14569 ] Resets the \SpecialChar LaTeX
14570 arguments of this style (as defined via the
14571 \begin_inset Flex Code
14574 \begin_layout Plain Layout
14581 This is useful if you have copied a style via
14582 \begin_inset Flex Code
14585 \begin_layout Plain Layout
14591 , but you do not want to inherit its (required and optional) arguments.
14594 \begin_layout Description
14595 \begin_inset Flex Code
14598 \begin_layout Plain Layout
14605 \begin_inset Flex Code
14608 \begin_layout Plain Layout
14614 ] A string that is put at the end of the layout content.
14615 A line break in the output can be indicated by
14616 \begin_inset Flex Code
14619 \begin_layout Plain Layout
14628 \begin_layout Description
14629 \begin_inset Flex Code
14632 \begin_layout Plain Layout
14639 \begin_inset Flex Code
14642 \begin_layout Plain Layout
14649 \begin_inset Flex Code
14652 \begin_layout Plain Layout
14661 \begin_layout Description
14662 \begin_inset Flex Code
14665 \begin_layout Plain Layout
14672 \begin_inset Flex Code
14675 \begin_layout Plain Layout
14684 \begin_inset Flex Code
14687 \begin_layout Plain Layout
14694 \begin_inset Flex Code
14697 \begin_layout Plain Layout
14704 \begin_inset Flex Code
14707 \begin_layout Plain Layout
14709 \begin_inset space ~
14717 ] This defines what the default spacing should be in the style.
14719 \begin_inset Flex Code
14722 \begin_layout Plain Layout
14729 \begin_inset Flex Code
14732 \begin_layout Plain Layout
14739 \begin_inset Flex Code
14742 \begin_layout Plain Layout
14748 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14749 If you specify the argument
14750 \begin_inset Flex Code
14753 \begin_layout Plain Layout
14759 , then you must also provide a value argument which will be the actual multiplie
14761 Note that, contrary to other parameters,
14762 \begin_inset Flex Code
14765 \begin_layout Plain Layout
14771 implies the generation of specific \SpecialChar LaTeX
14772 code, using the \SpecialChar LaTeX
14776 \begin_inset Flex Code
14779 \begin_layout Plain Layout
14788 \begin_layout Description
14789 \begin_inset Flex Code
14792 \begin_layout Plain Layout
14799 \begin_inset Flex Code
14802 \begin_layout Plain Layout
14809 \begin_inset space \thinspace{}
14813 \begin_inset Flex Code
14816 \begin_layout Plain Layout
14824 ] Allow spell-checking paragraphs of this style.
14828 \begin_layout Description
14829 \begin_inset Flex Code
14832 \begin_layout Plain Layout
14838 The font used for the text body .
14840 \begin_inset CommandInset ref
14842 reference "sub:Font-description"
14849 \begin_layout Description
14850 \begin_inset Flex Code
14853 \begin_layout Plain Layout
14862 \begin_inset Flex Code
14865 \begin_layout Plain Layout
14875 The level of the style in the table of contents.
14876 This is used for automatic numbering of section headings.
14877 \change_inserted -712698321 1401363541
14881 \begin_layout Description
14883 \change_inserted -712698321 1401363906
14884 \begin_inset Flex Code
14887 \begin_layout Plain Layout
14889 \change_inserted -712698321 1401363547
14898 \begin_inset Flex Code
14901 \begin_layout Plain Layout
14903 \change_inserted -712698321 1401363664
14916 \begin_inset Flex Code
14919 \begin_layout Plain Layout
14921 \change_inserted -712698321 1401363669
14930 \begin_inset Flex Code
14933 \begin_layout Plain Layout
14935 \change_inserted -712698321 1401363675
14943 ] This tag determines whether the first line indentation of this paragraph
14944 can be toggled via the Paragraph settings dialog.
14948 \begin_inset Flex Code
14951 \begin_layout Plain Layout
14953 \change_inserted -712698321 1401363761
14963 is set, indentation can be toggled if the document settings use
14964 \begin_inset Quotes eld
14968 \begin_inset Quotes erd
14971 paragraph style, with
14972 \begin_inset Flex Code
14975 \begin_layout Plain Layout
14977 \change_inserted -712698321 1401363844
14983 , indentation can always be toggled, notwithstanding the document settings,
14985 \begin_inset Flex Code
14988 \begin_layout Plain Layout
14990 \change_inserted -712698321 1401363901
14996 , indentation can never be toggled.
15001 \begin_layout Description
15002 \begin_inset Flex Code
15005 \begin_layout Plain Layout
15012 \begin_inset Flex Code
15015 \begin_layout Plain Layout
15021 ] The vertical space with which the very first of a chain of paragraphs
15022 with this style is separated from the previous paragraph.
15023 If the previous paragraph has another style, the separations are not simply
15024 added, but the maximum is taken.
15027 \begin_layout Subsection
15028 \begin_inset CommandInset label
15034 Internationalization of Paragraph Styles
15037 \begin_layout Standard
15039 has long supported internationalization of layout information, but, until
15040 version 2.0, this applied only to the user interface and not to, say, PDF
15042 Thus, French authors were forced to resort to ugly hacks if they wanted
15047 1' instead of `Theorem 1'.
15048 Thanks to Georg Baum, that is no longer the case.
15051 \begin_layout Standard
15053 \begin_inset Flex Code
15056 \begin_layout Plain Layout
15062 defines text that is to appear in the typeset document, it may use
15063 \begin_inset Flex Code
15066 \begin_layout Plain Layout
15073 \begin_inset Flex Code
15076 \begin_layout Plain Layout
15082 to support non-English and even multi-language documents correctly.
15083 The following excerpt (from the
15084 \begin_inset Flex Code
15087 \begin_layout Plain Layout
15093 file) shows how this works:
15096 \begin_layout LyX-Code
15098 \begin_inset Separator parbreak
15105 \begin_layout LyX-Code
15108 theoremstyle{remark}
15111 \begin_layout LyX-Code
15114 newtheorem{claim}[thm]{
15121 \begin_layout LyX-Code
15125 \begin_layout LyX-Code
15129 \begin_layout LyX-Code
15134 claimname}{_(Claim)}
15137 \begin_layout LyX-Code
15141 \begin_layout LyX-Code
15145 \begin_layout LyX-Code
15154 claimname}{_(Claim)}}
15157 \begin_layout LyX-Code
15162 \begin_layout Standard
15163 In principle, any legal \SpecialChar LaTeX
15165 \begin_inset Flex Code
15168 \begin_layout Plain Layout
15175 \begin_inset Flex Code
15178 \begin_layout Plain Layout
15184 tags, but in practice they will typically look as they do here.
15185 The key to correct translation of the typeset text is the definition of
15186 the \SpecialChar LaTeX
15188 \begin_inset Flex Code
15191 \begin_layout Plain Layout
15200 \begin_inset Flex Code
15203 \begin_layout Plain Layout
15215 \begin_layout Standard
15217 \begin_inset Flex Code
15220 \begin_layout Plain Layout
15226 tag provides for internationalization based upon the overall language of
15228 The contents of the tag will be included in the preamble, just as with
15230 \begin_inset Flex Code
15233 \begin_layout Plain Layout
15240 What makes it special is the use of the
15241 \begin_inset Quotes eld
15245 \begin_inset Quotes erd
15249 \begin_inset Flex Code
15252 \begin_layout Plain Layout
15258 , which will be replaced, when \SpecialChar LyX
15259 produces \SpecialChar LaTeX
15260 output, with the translation of
15261 its argument into the document language.
15264 \begin_layout Standard
15266 \begin_inset Flex Code
15269 \begin_layout Plain Layout
15275 tag is more complex, since it is meant to provide support for multi-language
15276 documents and so offers an interface to the
15277 \begin_inset Flex Code
15280 \begin_layout Plain Layout
15287 Its contents will be added to the preamble once for each language that
15288 appears in the document.
15289 In this case, the argument to
15290 \begin_inset Flex Code
15293 \begin_layout Plain Layout
15299 will be replaced with its translation into the language in question; the
15301 \begin_inset Flex Code
15304 \begin_layout Plain Layout
15310 is replaced by the language name (as used by the babel package).
15313 \begin_layout Standard
15314 A German document that also included a French section would thus have the
15315 following in the preamble:
15318 \begin_layout LyX-Code
15327 claimname}{Affirmation}}
15328 \begin_inset Newline newline
15339 claimname}{Behauptung}}
15340 \begin_inset Newline newline
15347 claimname}{Behauptung}
15350 \begin_layout Standard
15353 \begin_inset Flex Code
15356 \begin_layout Plain Layout
15362 will then conspire to produce the correct text in the output.
15365 \begin_layout Standard
15366 One important point to note here is that the translations are provided by
15368 itself, through the file
15369 \begin_inset Flex Code
15372 \begin_layout Plain Layout
15379 This means, in effect, that
15380 \begin_inset Flex Code
15383 \begin_layout Plain Layout
15390 \begin_inset Flex Code
15393 \begin_layout Plain Layout
15399 are really only of use in layout files that are provided with \SpecialChar LyX
15401 entered in user-created layout files will not be seen by \SpecialChar LyX
15402 's internationalizatio
15403 n routines unless the
15404 \begin_inset Flex Code
15407 \begin_layout Plain Layout
15413 file is modified accordingly.
15414 That said, however, any layout created with the intention that it will
15415 be included with \SpecialChar LyX
15416 should use these tags where appropriate.
15417 Please note that the paragraph style translations provided by \SpecialChar LyX
15419 change with a minor update (e.
15420 \begin_inset space \thinspace{}
15424 \begin_inset space \space{}
15427 from version 2.1.x to 2.1.y).
15428 It is however quite likely that a major update (e.
15429 \begin_inset space \thinspace{}
15433 \begin_inset space \space{}
15436 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15439 \begin_layout Subsection
15441 \begin_inset CommandInset label
15450 \begin_layout Standard
15451 It is necessary to define the floats (
15452 \begin_inset Flex MenuItem
15455 \begin_layout Plain Layout
15462 \begin_inset Flex MenuItem
15465 \begin_layout Plain Layout
15471 , \SpecialChar ldots
15472 ) in the text class itself.
15473 Standard floats are included in the file
15474 \begin_inset Flex Code
15477 \begin_layout Plain Layout
15483 , so you may have to do no more than add
15486 \begin_layout LyX-Code
15487 Input stdfloats.inc
15490 \begin_layout Standard
15491 to your layout file.
15492 If you want to implement a text class that proposes some other float types
15493 (like the AGU class bundled with \SpecialChar LyX
15494 ), the information below will hopefully
15498 \begin_layout Description
15499 \begin_inset Flex Code
15502 \begin_layout Plain Layout
15509 \begin_inset Flex Code
15512 \begin_layout Plain Layout
15519 \begin_inset Quotes erd
15523 \begin_inset Quotes erd
15526 ] The file name extension of an auxiliary file for the list of figures (or
15529 writes the captions to this file.
15532 \begin_layout Description
15533 \begin_inset Flex Code
15536 \begin_layout Plain Layout
15543 \begin_inset Flex Code
15546 \begin_layout Plain Layout
15553 \begin_inset Quotes erd
15557 \begin_inset Quotes erd
15560 ] The string that will be used in the menus and also for the caption.
15561 This is translated to the current language if babel is used.
15564 \begin_layout Description
15565 \begin_inset Flex Code
15568 \begin_layout Plain Layout
15574 These tags control the XHTML output.
15576 \begin_inset CommandInset ref
15578 reference "sec:Tags-for-XHTML"
15585 \begin_layout Description
15586 \begin_inset Flex Code
15589 \begin_layout Plain Layout
15598 \begin_inset Flex Code
15601 \begin_layout Plain Layout
15610 \begin_inset space \thinspace{}
15614 \begin_inset Flex Code
15617 \begin_layout Plain Layout
15623 ] Indicates whether the float is already defined in the document class or
15624 if instead the \SpecialChar LaTeX
15626 \begin_inset Flex Code
15629 \begin_layout Plain Layout
15635 needs to be loaded to define it on-the-fly.
15637 \begin_inset Flex Code
15640 \begin_layout Plain Layout
15647 \begin_inset Flex Code
15650 \begin_layout Plain Layout
15657 It should be set to
15658 \begin_inset Flex Code
15661 \begin_layout Plain Layout
15667 if the float is already defined by the \SpecialChar LaTeX
15671 \begin_layout Description
15672 \begin_inset Flex Code
15675 \begin_layout Plain Layout
15682 \begin_inset Flex Code
15685 \begin_layout Plain Layout
15692 \begin_inset Quotes erd
15696 \begin_inset Quotes erd
15699 ] The command used to generate a list of floats of this type; the leading
15708 \begin_inset Flex Code
15711 \begin_layout Plain Layout
15717 is false, since there is no standard way to generate this command.
15719 \begin_inset Flex Code
15722 \begin_layout Plain Layout
15728 is true, since in that case there is a standard way to define the command.
15731 \begin_layout Description
15732 \begin_inset Flex Code
15735 \begin_layout Plain Layout
15742 \begin_inset Flex Code
15745 \begin_layout Plain Layout
15752 \begin_inset Quotes erd
15756 \begin_inset Quotes erd
15759 ] A title for a list of floats of this kind (list of figures, tables, or
15761 It is used for the screen label within \SpecialChar LyX
15762 , it is used by \SpecialChar LaTeX
15764 it is used as the title in the XHTML output.
15765 It will be translated to the document language.
15768 \begin_layout Description
15769 \begin_inset Flex Code
15772 \begin_layout Plain Layout
15779 \begin_inset Flex Code
15782 \begin_layout Plain Layout
15789 \begin_inset Quotes erd
15793 \begin_inset Quotes erd
15796 ] This (optional) argument determines whether floats of this class will
15797 be numbered within some sectional unit of the document.
15799 \begin_inset Flex Code
15802 \begin_layout Plain Layout
15809 \begin_inset Quotes eld
15813 \begin_inset Flex Code
15816 \begin_layout Plain Layout
15823 \begin_inset Quotes erd
15826 , the floats will be numbered within chapters.
15830 \begin_layout Description
15831 \begin_inset Flex Code
15834 \begin_layout Plain Layout
15841 \begin_inset Flex Code
15844 \begin_layout Plain Layout
15851 \begin_inset Quotes erd
15855 \begin_inset Quotes erd
15858 ] The default placement for the given class of floats.
15859 The string should be as in standard \SpecialChar LaTeX
15861 \begin_inset Flex Code
15864 \begin_layout Plain Layout
15871 \begin_inset Flex Code
15874 \begin_layout Plain Layout
15881 \begin_inset Flex Code
15884 \begin_layout Plain Layout
15891 \begin_inset Flex Code
15894 \begin_layout Plain Layout
15900 for top, bottom, page, and here, respectively.
15904 \begin_layout Plain Layout
15905 Note that the order of these letters in the string is irrelevant, like in
15912 On top of that there is a new type,
15913 \begin_inset Flex Code
15916 \begin_layout Plain Layout
15922 , which does not really correspond to a float, since it means: put it
15923 \begin_inset Quotes eld
15927 \begin_inset Quotes erd
15931 Note however that the
15932 \begin_inset Flex Code
15935 \begin_layout Plain Layout
15941 specifier is special and, because of implementation details, cannot be
15942 used in non-built in float types.
15943 If you do not understand what this means, just use
15944 \begin_inset Quotes eld
15948 \begin_inset Flex Code
15951 \begin_layout Plain Layout
15958 \begin_inset Quotes erd
15964 \begin_layout Description
15965 \begin_inset Flex Code
15968 \begin_layout Plain Layout
15975 \begin_inset Flex Code
15978 \begin_layout Plain Layout
15984 ] The prefix to use when creating labels referring to floats of this type.
15985 This allows the use of formatted references.
15986 Note that you can remove any
15987 \begin_inset Flex Code
15990 \begin_layout Plain Layout
15996 set by a copied style by using the special value
15997 \begin_inset Quotes eld
16001 \begin_inset Quotes erd
16004 , which must be all caps.
16007 \begin_layout Description
16008 \begin_inset Flex Code
16011 \begin_layout Plain Layout
16018 \begin_inset Flex Code
16021 \begin_layout Plain Layout
16028 \begin_inset Quotes erd
16032 \begin_inset Quotes erd
16035 ] The style used when defining the float using
16036 \begin_inset Flex Code
16039 \begin_layout Plain Layout
16050 \begin_layout Description
16051 \begin_inset Flex Code
16054 \begin_layout Plain Layout
16061 \begin_inset Flex Code
16064 \begin_layout Plain Layout
16071 \begin_inset Quotes erd
16075 \begin_inset Quotes erd
16079 \begin_inset Quotes eld
16083 \begin_inset Quotes erd
16086 of the new class of floats, like program or algorithm.
16087 After the appropriate
16088 \begin_inset Flex Code
16091 \begin_layout Plain Layout
16100 \begin_inset Flex Code
16103 \begin_layout Plain Layout
16112 \begin_inset Flex Code
16115 \begin_layout Plain Layout
16126 \begin_layout Description
16127 \begin_inset Flex Code
16130 \begin_layout Plain Layout
16137 \begin_inset Flex Code
16140 \begin_layout Plain Layout
16147 \begin_inset space \thinspace{}
16151 \begin_inset Flex Code
16154 \begin_layout Plain Layout
16162 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16164 \begin_inset Flex Code
16167 \begin_layout Plain Layout
16173 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16177 \begin_layout Standard
16178 Note that defining a float with type
16179 \begin_inset Flex Code
16182 \begin_layout Plain Layout
16190 automatically defines the corresponding counter with name
16191 \begin_inset Flex Code
16194 \begin_layout Plain Layout
16205 \begin_layout Subsection
16206 Flex insets and InsetLayout
16207 \begin_inset CommandInset label
16209 name "sub:Flex-insets-and"
16216 \begin_layout Standard
16217 Flex insets come in three different kinds:
16220 \begin_layout Itemize
16222 \begin_inset Flex Code
16225 \begin_layout Plain Layout
16231 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16233 \begin_inset Flex Code
16236 \begin_layout Plain Layout
16245 \begin_inset Flex Code
16248 \begin_layout Plain Layout
16259 \begin_layout Itemize
16261 \begin_inset Flex Code
16264 \begin_layout Plain Layout
16270 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16272 footnote, and the like.
16273 An obvious example is an endnote inset, which is defined in the
16274 \begin_inset Flex Code
16277 \begin_layout Plain Layout
16286 \begin_layout Itemize
16288 \begin_inset Flex Code
16291 \begin_layout Plain Layout
16297 ): For use with DocBook classes.
16300 \begin_layout Standard
16301 Flex insets are defined using the
16302 \begin_inset Flex Code
16305 \begin_layout Plain Layout
16311 tag, which shall be explained in a moment.
16314 \begin_layout Standard
16316 \begin_inset Flex Code
16319 \begin_layout Plain Layout
16325 tag also serves another function: It can be used to customize the general
16326 layout of many different types of insets.
16328 \begin_inset Flex Code
16331 \begin_layout Plain Layout
16337 can be used to customize the layout parameters for footnotes, marginal
16338 notes, note insets, \SpecialChar TeX
16339 code (ERT) insets, branches, listings, indexes, boxes,
16340 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16343 \begin_layout Standard
16345 \begin_inset Flex Code
16348 \begin_layout Plain Layout
16354 definition must begin with a line of the form:
16357 \begin_layout LyX-Code
16361 \begin_layout Standard
16363 \begin_inset Flex Code
16366 \begin_layout Plain Layout
16372 indicates the inset whose layout is being defined, and here there are four
16376 \begin_layout Enumerate
16377 The layout for a pre-existing inset is being modified.
16378 In this case, can be
16379 \begin_inset Flex Code
16382 \begin_layout Plain Layout
16388 any one of the following:
16389 \begin_inset Flex Code
16392 \begin_layout Plain Layout
16399 \begin_inset Flex Code
16402 \begin_layout Plain Layout
16409 \begin_inset Flex Code
16412 \begin_layout Plain Layout
16419 \begin_inset Flex Code
16422 \begin_layout Plain Layout
16429 \begin_inset Flex Code
16432 \begin_layout Plain Layout
16439 \begin_inset Flex Code
16442 \begin_layout Plain Layout
16449 \begin_inset Flex Code
16452 \begin_layout Plain Layout
16459 \begin_inset Flex Code
16462 \begin_layout Plain Layout
16469 \begin_inset Flex Code
16472 \begin_layout Plain Layout
16479 \begin_inset Flex Code
16482 \begin_layout Plain Layout
16489 \begin_inset Flex Code
16492 \begin_layout Plain Layout
16499 \begin_inset Flex Code
16502 \begin_layout Plain Layout
16509 \begin_inset Flex Code
16512 \begin_layout Plain Layout
16519 \begin_inset Flex Code
16522 \begin_layout Plain Layout
16529 \begin_inset Flex Code
16532 \begin_layout Plain Layout
16539 \begin_inset Flex Code
16542 \begin_layout Plain Layout
16549 \begin_inset Flex Code
16552 \begin_layout Plain Layout
16559 \begin_inset Flex Code
16562 \begin_layout Plain Layout
16569 \begin_inset Flex Code
16572 \begin_layout Plain Layout
16579 \begin_inset Flex Code
16582 \begin_layout Plain Layout
16591 \begin_layout Enumerate
16592 The layout for a Flex inset is being defined.
16594 \begin_inset Flex Code
16597 \begin_layout Plain Layout
16603 must be of the form
16604 \begin_inset Quotes eld
16608 \begin_inset Flex Code
16611 \begin_layout Plain Layout
16618 \begin_inset Quotes erd
16622 \begin_inset Flex Code
16625 \begin_layout Plain Layout
16631 may be be any valid identifier not used by a pre-existing Flex inset.
16632 The identifier may include spaces, but in that case the whole thing must
16633 be wrapped in quotes.
16634 Note that the definition of a flex inset
16639 \begin_inset Flex Code
16642 \begin_layout Plain Layout
16649 entry, declaring which type of inset it defines.
16652 \begin_layout Enumerate
16653 The layout for user specific branch is being defined.
16655 \begin_inset Flex Code
16658 \begin_layout Plain Layout
16664 must be of the form
16665 \begin_inset Quotes eld
16669 \begin_inset Flex Code
16672 \begin_layout Plain Layout
16679 \begin_inset Quotes erd
16683 \begin_inset Flex Code
16686 \begin_layout Plain Layout
16692 may be be any valid identifier of branch defined in user's document.
16693 The identifier may include spaces, but in that case the whole thing must
16694 be wrapped in quotes.
16695 The main purpose of this feature is to allow \SpecialChar LaTeX
16696 wrapping around specific
16697 branches as user needs.
16700 \begin_layout Enumerate
16701 The layout of a user (or class) specific caption is being defined.
16703 \begin_inset Flex Code
16706 \begin_layout Plain Layout
16712 must be of the form
16713 \begin_inset Quotes eld
16717 \begin_inset Flex Code
16720 \begin_layout Plain Layout
16727 \begin_inset Quotes erd
16731 \begin_inset Flex Code
16734 \begin_layout Plain Layout
16740 specifies the name of the caption as it appears in the menu.
16741 Have a look at the standard caption (
16742 \begin_inset Flex Code
16745 \begin_layout Plain Layout
16751 ), the specific captions of the KOMA-Script classes (
16752 \begin_inset Flex Code
16755 \begin_layout Plain Layout
16762 \begin_inset Flex Code
16765 \begin_layout Plain Layout
16774 \begin_inset space ~
16780 \begin_inset Flex Code
16783 \begin_layout Plain Layout
16789 ) for applications.
16792 \begin_layout Standard
16794 \begin_inset Flex Code
16797 \begin_layout Plain Layout
16803 definition can contain the following entries:
16806 \begin_layout Description
16807 \begin_inset Flex Code
16810 \begin_layout Plain Layout
16817 \begin_inset Flex Code
16820 \begin_layout Plain Layout
16826 ] Defines argument number of a command\SpecialChar breakableslash
16827 environment associated with the current
16829 The definition must end with
16830 \begin_inset Flex Code
16833 \begin_layout Plain Layout
16841 \begin_inset CommandInset ref
16843 reference "sub:Paragraph-Styles"
16850 \begin_layout Description
16851 \begin_inset Flex Code
16854 \begin_layout Plain Layout
16860 Preamble for changing language commands; see
16861 \begin_inset CommandInset ref
16863 reference "sub:I18n"
16870 \begin_layout Description
16871 \begin_inset Flex Code
16874 \begin_layout Plain Layout
16881 \begin_inset Flex Code
16884 \begin_layout Plain Layout
16890 ] The color for the inset's background.
16892 \begin_inset CommandInset ref
16894 reference "chap:Names-of-colors"
16898 for a list of the available color names.
16901 \begin_layout Description
16902 \begin_inset Flex Code
16905 \begin_layout Plain Layout
16912 \begin_inset Flex Code
16915 \begin_layout Plain Layout
16924 \begin_inset space \thinspace{}
16928 \begin_inset Flex Code
16931 \begin_layout Plain Layout
16937 ] Whether to use the content of the inset as the label, when the inset is
16942 \begin_layout Description
16943 \begin_inset Flex Code
16946 \begin_layout Plain Layout
16953 \begin_inset Flex Code
16956 \begin_layout Plain Layout
16962 ] As with paragraph styles, see
16963 \begin_inset CommandInset ref
16965 reference "sub:Paragraph-Styles"
16970 Note that you need to specify the complete type, e.
16971 \begin_inset space \thinspace{}
16975 \begin_inset space ~
16979 \begin_inset Flex Code
16982 \begin_layout Plain Layout
16983 CopyStyle Flex:<name>
16991 \begin_layout Description
16992 \begin_inset Flex Code
16995 \begin_layout Plain Layout
17002 \begin_inset Flex Code
17005 \begin_layout Plain Layout
17014 \begin_inset space \thinspace{}
17018 \begin_inset Flex Code
17021 \begin_layout Plain Layout
17027 ] Indicates whether the user may employ the Paragraph Settings dialog to
17028 customize the paragraph.
17031 \begin_layout Description
17032 \begin_inset Flex Code
17035 \begin_layout Plain Layout
17042 \begin_inset Flex Code
17045 \begin_layout Plain Layout
17052 \begin_inset Flex Code
17055 \begin_layout Plain Layout
17062 \begin_inset Flex Code
17065 \begin_layout Plain Layout
17071 , describing the rendering style used for the inset's frame and buttons.
17072 Footnotes generally use
17073 \begin_inset Flex Code
17076 \begin_layout Plain Layout
17082 , ERT insets generally
17083 \begin_inset Flex Code
17086 \begin_layout Plain Layout
17092 , and character styles
17093 \begin_inset Flex Code
17096 \begin_layout Plain Layout
17105 \begin_layout Description
17106 \begin_inset Flex Code
17109 \begin_layout Plain Layout
17116 \begin_inset Flex Code
17119 \begin_layout Plain Layout
17128 \begin_inset space \thinspace{}
17134 \begin_inset Flex Code
17137 \begin_layout Plain Layout
17146 \begin_inset Flex Code
17149 \begin_layout Plain Layout
17156 \begin_inset Flex Code
17159 \begin_layout Plain Layout
17166 Indicates whether the environment will stand on its own in the output or
17167 will appear inline with the surrounding text.
17168 If set to false, it is supposed that the \SpecialChar LaTeX
17169 environment ignores white space
17170 (including one newline character) after the
17171 \begin_inset Flex Code
17174 \begin_layout Plain Layout
17187 \begin_inset Flex Code
17190 \begin_layout Plain Layout
17206 \begin_layout Description
17207 \begin_inset Flex Code
17210 \begin_layout Plain Layout
17216 Required at the end of the
17217 \begin_inset Flex Code
17220 \begin_layout Plain Layout
17229 \begin_layout Description
17230 \begin_inset Flex Code
17233 \begin_layout Plain Layout
17239 The font used for both the text body
17245 \begin_inset CommandInset ref
17247 reference "sub:Font-description"
17252 Note that defining this font automatically defines the
17253 \begin_inset Flex Code
17256 \begin_layout Plain Layout
17262 to the same value, so define this first and define
17263 \begin_inset Flex Code
17266 \begin_layout Plain Layout
17272 later if you want them to be different.
17273 \change_inserted -195340706 1421002157
17277 \begin_layout Description
17279 \change_inserted -195340706 1421002157
17280 \begin_inset Flex Code
17283 \begin_layout Plain Layout
17285 \change_inserted -195340706 1421002157
17286 FixedWidthPreambleEncoding
17292 \begin_inset Flex Code
17295 \begin_layout Plain Layout
17297 \change_inserted -195340706 1421002157
17306 \begin_inset space \thinspace{}
17310 \begin_inset Flex Code
17313 \begin_layout Plain Layout
17315 \change_inserted -195340706 1421002157
17321 ] Force a fixed width encoding for the translated contents of
17322 \begin_inset Flex Code
17325 \begin_layout Plain Layout
17327 \change_inserted -195340706 1421002157
17334 \begin_inset Flex Code
17337 \begin_layout Plain Layout
17339 \change_inserted -195340706 1421002157
17345 code generated by this layout.
17346 This is needed for special packages like the listings package that do not
17347 work with variable width encodings such as utf8.
17349 This setting is ignored if fully unicode aware \SpecialChar LaTeX
17350 backends such as Xe\SpecialChar LaTeX
17357 \begin_layout Description
17358 \begin_inset Flex Code
17361 \begin_layout Plain Layout
17362 ForceLocalFontSwitch
17368 \begin_inset Flex Code
17371 \begin_layout Plain Layout
17380 \begin_inset space \thinspace{}
17384 \begin_inset Flex Code
17387 \begin_layout Plain Layout
17393 ] When using babel, always use a local font switch (
17394 \begin_inset Flex Code
17397 \begin_layout Plain Layout
17405 ), never a global one (such as
17406 \begin_inset Flex Code
17409 \begin_layout Plain Layout
17420 \begin_layout Description
17421 \begin_inset Flex Code
17424 \begin_layout Plain Layout
17431 \begin_inset Flex Code
17434 \begin_layout Plain Layout
17443 \begin_inset space \thinspace{}
17447 \begin_inset Flex Code
17450 \begin_layout Plain Layout
17457 \begin_inset Quotes eld
17461 \begin_inset Quotes erd
17464 language, leading to Left-to-Right (Latin) output, e.
17465 \begin_inset space \thinspace{}
17469 \begin_inset space \space{}
17472 in \SpecialChar TeX
17475 \change_inserted -712698321 1417441977
17479 \begin_layout Description
17481 \change_inserted -712698321 1417442090
17482 \begin_inset Flex Code
17485 \begin_layout Plain Layout
17487 \change_inserted -712698321 1417441983
17494 \begin_inset Flex Code
17497 \begin_layout Plain Layout
17499 \change_inserted -712698321 1417441978
17508 \begin_inset space \thinspace{}
17512 \begin_inset Flex Code
17515 \begin_layout Plain Layout
17517 \change_inserted -712698321 1417441978
17523 ] Force a a line break in the \SpecialChar LaTeX
17524 output before the inset starts and after
17526 This assures the inset itself is output on its own lines, for parsing purposes.
17528 \change_inserted 274215730 1419105878
17534 \begin_layout Description
17535 \begin_inset Flex Code
17538 \begin_layout Plain Layout
17545 \begin_inset Flex Code
17548 \begin_layout Plain Layout
17557 \begin_inset space \thinspace{}
17561 \begin_inset Flex Code
17564 \begin_layout Plain Layout
17570 ] Indicates whether the
17571 \begin_inset Flex Code
17574 \begin_layout Plain Layout
17580 should be used or, instead, the user can change the paragraph style used
17585 \begin_layout Description
17586 \begin_inset Flex Code
17589 \begin_layout Plain Layout
17596 \begin_inset Flex Code
17599 \begin_layout Plain Layout
17608 \begin_inset space \thinspace{}
17612 \begin_inset Flex Code
17615 \begin_layout Plain Layout
17621 ] As with paragraph styles, see
17622 \begin_inset CommandInset ref
17624 reference "sub:Paragraph-Styles"
17631 \begin_layout Description
17632 \begin_inset Flex Code
17635 \begin_layout Plain Layout
17641 These tags control the XHTML output.
17643 \begin_inset CommandInset ref
17645 reference "sec:Tags-for-XHTML"
17652 \begin_layout Description
17653 \begin_inset Flex Code
17656 \begin_layout Plain Layout
17663 \begin_inset Flex Code
17666 \begin_layout Plain Layout
17675 \begin_inset space \thinspace{}
17679 \begin_inset Flex Code
17682 \begin_layout Plain Layout
17688 ] Whether to include the contents of this inset in the strings generated
17689 for the `Outline' pane.
17690 One would not, for example, want the content of a footnote in a section
17691 header to be included in the TOC displayed in the outline, but one would
17692 normally want the content of a character style displayed.
17693 Default is false: not to include.
17696 \begin_layout Description
17697 \begin_inset Flex Code
17700 \begin_layout Plain Layout
17709 \begin_inset Flex Code
17712 \begin_layout Plain Layout
17721 \begin_inset space \thinspace{}
17725 \begin_inset Flex Code
17728 \begin_layout Plain Layout
17734 ] As with paragraph styles, see
17735 \begin_inset CommandInset ref
17737 reference "sub:Paragraph-Styles"
17744 \begin_layout Description
17745 \begin_inset Flex Code
17748 \begin_layout Plain Layout
17754 The font used for the label.
17756 \begin_inset CommandInset ref
17758 reference "sub:Font-description"
17763 Note that this definition can never appear before
17764 \begin_inset Flex Code
17767 \begin_layout Plain Layout
17773 , lest it be ineffective.
17776 \begin_layout Description
17777 \begin_inset Flex Code
17780 \begin_layout Plain Layout
17787 \begin_inset Flex Code
17790 \begin_layout Plain Layout
17797 \begin_inset Quotes erd
17801 \begin_inset Quotes erd
17804 ] What will be displayed on the button or elsewhere as the inset label.
17806 \begin_inset Flex Code
17809 \begin_layout Plain Layout
17817 \begin_inset Flex Code
17820 \begin_layout Plain Layout
17826 ) modify this label on the fly.
17829 \begin_layout Description
17830 \begin_inset Flex Code
17833 \begin_layout Plain Layout
17839 Language dependent preamble; see
17840 \begin_inset CommandInset ref
17842 reference "sub:I18n"
17849 \begin_layout Description
17850 \begin_inset Flex Code
17853 \begin_layout Plain Layout
17860 \begin_inset Flex Code
17863 \begin_layout Plain Layout
17869 ] The name of the corresponding \SpecialChar LaTeX
17871 Either the environment or command name.
17874 \begin_layout Description
17875 \begin_inset Flex Code
17878 \begin_layout Plain Layout
17885 \begin_inset Flex Code
17888 \begin_layout Plain Layout
17894 ] The optional parameter for the corresponding
17895 \begin_inset Flex Code
17898 \begin_layout Plain Layout
17904 stuff, including possible bracket pairs like
17905 \begin_inset Flex Code
17908 \begin_layout Plain Layout
17915 This parameter cannot be changed from within \SpecialChar LyX
17917 \begin_inset Flex Code
17920 \begin_layout Plain Layout
17926 for customizable parameters).
17927 It will be output as is after all \SpecialChar LaTeX
17929 \begin_inset Flex Code
17932 \begin_layout Plain Layout
17941 \begin_layout Description
17942 \begin_inset Flex Code
17945 \begin_layout Plain Layout
17952 \begin_inset Flex Code
17955 \begin_layout Plain Layout
17956 Command, Environment, None
17961 ] How the style should be translated into \SpecialChar LaTeX
17966 \begin_layout Plain Layout
17967 \begin_inset Flex Code
17970 \begin_layout Plain Layout
17976 is perhaps a bit misleading, since these rules apply to SGML classes too.
17977 Visit the SGML class files for specific examples.
17983 \begin_inset Separator parbreak
17990 \begin_layout Description
17991 \begin_inset Flex Code
17994 \begin_layout Plain Layout
18000 means nothing special
18003 \begin_layout Description
18004 \begin_inset Flex Code
18007 \begin_layout Plain Layout
18014 \begin_inset Flex Code
18017 \begin_layout Plain Layout
18024 {\SpecialChar ldots
18033 \begin_layout Description
18034 \begin_inset Flex Code
18037 \begin_layout Plain Layout
18044 \begin_inset Flex Code
18047 \begin_layout Plain Layout
18054 }\SpecialChar ldots
18069 \begin_layout Standard
18070 Putting the last few things together, the \SpecialChar LaTeX
18071 output will be either:
18074 \begin_layout LyX-Code
18077 LatexName[LatexParam]{\SpecialChar ldots
18081 \begin_layout Standard
18085 \begin_layout LyX-Code
18088 begin{LatexName}[LatexParam] \SpecialChar ldots
18094 \begin_layout Standard
18095 depending upon the \SpecialChar LaTeX
18100 \begin_layout Description
18101 \begin_inset Flex Code
18104 \begin_layout Plain Layout
18111 \begin_inset Flex Code
18114 \begin_layout Plain Layout
18120 ] A string that is put at the beginning of the layout content.
18121 A line break in the output can be indicated by
18122 \begin_inset Flex Code
18125 \begin_layout Plain Layout
18134 \begin_layout Description
18135 \begin_inset Flex Code
18138 \begin_layout Plain Layout
18145 \begin_inset Flex Code
18148 \begin_layout Plain Layout
18155 \begin_inset Flex Code
18158 \begin_layout Plain Layout
18165 \begin_inset Flex Code
18168 \begin_layout Plain Layout
18175 \begin_inset Flex Code
18178 \begin_layout Plain Layout
18184 (indicating a dummy definition ending definitions of charstyles, etc).
18185 This entry is required in and is only meaningful for Flex insets.
18186 Among other things, it determines on which menu this inset will appear.
18188 \begin_inset Flex Code
18191 \begin_layout Plain Layout
18199 \begin_inset Flex Code
18202 \begin_layout Plain Layout
18208 will automatically set
18209 \begin_inset Flex Code
18212 \begin_layout Plain Layout
18220 \begin_inset Flex Code
18223 \begin_layout Plain Layout
18229 can be set to true for
18230 \begin_inset Flex Code
18233 \begin_layout Plain Layout
18239 insets by setting it
18244 \begin_inset Flex Code
18247 \begin_layout Plain Layout
18257 \begin_layout Description
18258 \begin_inset Flex Code
18261 \begin_layout Plain Layout
18268 \begin_inset Flex Code
18271 \begin_layout Plain Layout
18280 \begin_inset space \thinspace{}
18284 \begin_inset Flex Code
18287 \begin_layout Plain Layout
18293 ] Whether multiple paragraphs are permitted in this inset.
18295 \begin_inset Flex Code
18298 \begin_layout Plain Layout
18304 to the same value and
18305 \begin_inset Flex Code
18308 \begin_layout Plain Layout
18314 to the opposite value.
18315 These can be reset to other values, if they are used
18320 \begin_inset Flex Code
18323 \begin_layout Plain Layout
18333 \begin_layout Description
18334 \begin_inset Flex Code
18337 \begin_layout Plain Layout
18344 \begin_inset Flex Code
18347 \begin_layout Plain Layout
18356 \begin_inset space \thinspace{}
18360 \begin_inset Flex Code
18363 \begin_layout Plain Layout
18369 ] Whether fragile commands in this inset should be
18370 \begin_inset Flex Code
18373 \begin_layout Plain Layout
18386 whether the command should itself be protected.) Default is false.
18389 \begin_layout Description
18390 \begin_inset Flex Code
18393 \begin_layout Plain Layout
18400 \begin_inset Flex Code
18403 \begin_layout Plain Layout
18409 ] Deletes an existing
18410 \begin_inset Flex Code
18413 \begin_layout Plain Layout
18420 \change_inserted -712698321 1417953494
18424 \begin_layout Description
18426 \change_inserted -712698321 1417953559
18427 \begin_inset Flex Code
18430 \begin_layout Plain Layout
18432 \change_inserted -712698321 1417953494
18439 \begin_inset Flex Code
18442 \begin_layout Plain Layout
18444 \change_inserted -712698321 1417953574
18451 \begin_inset Flex Code
18454 \begin_layout Plain Layout
18456 \change_inserted -712698321 1417953533
18462 that has replaced this
18463 \begin_inset Flex Code
18466 \begin_layout Plain Layout
18468 \change_inserted -712698321 1417953551
18475 This is used to rename an
18476 \begin_inset Flex Code
18479 \begin_layout Plain Layout
18481 \change_inserted -712698321 1417953559
18487 , while keeping backward compatibility.
18492 \begin_layout Description
18493 \begin_inset Flex Code
18496 \begin_layout Plain Layout
18503 \begin_inset Flex Code
18506 \begin_layout Plain Layout
18515 \begin_inset space \thinspace{}
18519 \begin_inset Flex Code
18522 \begin_layout Plain Layout
18528 ] As with paragraph styles, see
18529 \begin_inset CommandInset ref
18531 reference "sub:Paragraph-Styles"
18539 \begin_layout Description
18540 \begin_inset Flex Code
18543 \begin_layout Plain Layout
18550 \begin_inset Flex Code
18553 \begin_layout Plain Layout
18562 \begin_inset space \thinspace{}
18566 \begin_inset Flex Code
18569 \begin_layout Plain Layout
18575 ] As with paragraph styles, see
18576 \begin_inset CommandInset ref
18578 reference "sub:Paragraph-Styles"
18586 \begin_layout Description
18587 \begin_inset Flex Code
18590 \begin_layout Plain Layout
18596 As with paragraph styles, see
18597 \begin_inset CommandInset ref
18599 reference "sub:Paragraph-Styles"
18606 \begin_layout Description
18607 \begin_inset Flex Code
18610 \begin_layout Plain Layout
18617 \begin_inset Flex Code
18620 \begin_layout Plain Layout
18626 ] The prefix to use when creating labels referring to insets of this type.
18627 This allows the use of formatted references.
18630 \begin_layout Description
18631 \begin_inset Flex Code
18634 \begin_layout Plain Layout
18641 \begin_inset Flex Code
18644 \begin_layout Plain Layout
18650 ] As with paragraph styles, see
18651 \begin_inset CommandInset ref
18653 reference "sub:Paragraph-Styles"
18660 \begin_layout Description
18661 \begin_inset Flex Code
18664 \begin_layout Plain Layout
18671 \begin_inset Flex Code
18674 \begin_layout Plain Layout
18683 \begin_inset space \thinspace{}
18687 \begin_inset Flex Code
18690 \begin_layout Plain Layout
18696 ] Resets the \SpecialChar LaTeX
18697 arguments of this layout (as defined via the
18698 \begin_inset Flex Code
18701 \begin_layout Plain Layout
18708 This is useful if you have copied a style via
18709 \begin_inset Flex Code
18712 \begin_layout Plain Layout
18718 , but you do not want to inherit its (required and optional) arguments.
18721 \begin_layout Description
18722 \begin_inset Flex Code
18725 \begin_layout Plain Layout
18732 \begin_inset Flex Code
18735 \begin_layout Plain Layout
18742 \begin_inset space \thinspace{}
18746 \begin_inset Flex Code
18749 \begin_layout Plain Layout
18757 ] Whether this inset should use the font of its surrounding environment
18759 Default is false: use the font of the surrounding environment.
18762 \begin_layout Description
18763 \begin_inset Flex Code
18766 \begin_layout Plain Layout
18773 \begin_inset Flex Code
18776 \begin_layout Plain Layout
18782 ] A string that is put at the end of the layout content.
18783 A line break in the output can be indicated by
18784 \begin_inset Flex Code
18787 \begin_layout Plain Layout
18796 \begin_layout Description
18797 \begin_inset Flex Code
18800 \begin_layout Plain Layout
18807 \begin_inset Flex Code
18810 \begin_layout Plain Layout
18817 \begin_inset space \thinspace{}
18821 \begin_inset Flex Code
18824 \begin_layout Plain Layout
18832 ] Allow spell-checking the contents of this inset.
18836 \begin_layout Subsection
18838 \begin_inset CommandInset label
18840 name "sub:Counters"
18847 \begin_layout Standard
18848 It is necessary to define the counters (
18849 \begin_inset Flex MenuItem
18852 \begin_layout Plain Layout
18859 \begin_inset Flex MenuItem
18862 \begin_layout Plain Layout
18868 , \SpecialChar ldots
18869 ) in the text class itself.
18870 The standard counters are defined in the file
18871 \begin_inset Flex Code
18874 \begin_layout Plain Layout
18880 , so you may have to do no more than add
18883 \begin_layout LyX-Code
18884 Input stdcounters.inc
18887 \begin_layout Standard
18888 to your layout file to get them to work.
18889 But if you want to define custom counters, then you can do so.
18890 The counter declaration must begin with:
18893 \begin_layout LyX-Code
18894 Counter CounterName
18897 \begin_layout Standard
18899 \begin_inset Flex Code
18902 \begin_layout Plain Layout
18908 ' is replaced by the name of the counter.
18909 And it must end with
18910 \begin_inset Quotes eld
18914 \begin_inset Flex Code
18917 \begin_layout Plain Layout
18924 \begin_inset Quotes erd
18928 The following parameters can also be used:
18931 \begin_layout Description
18932 \begin_inset Flex Code
18935 \begin_layout Plain Layout
18942 \begin_inset Flex Code
18945 \begin_layout Plain Layout
18951 ] Sets the initial value for the counter, to which it will be reset whenever
18953 Normally, one will want the default, 1.
18956 \begin_layout Description
18957 \begin_inset Flex Code
18960 \begin_layout Plain Layout
18967 \begin_inset Flex Code
18970 \begin_layout Plain Layout
18977 \begin_inset Quotes erd
18981 \begin_inset Quotes erd
18984 ] When defined, this string defines how the counter is displayed.
18985 Setting this value sets
18986 \begin_inset Flex Code
18989 \begin_layout Plain Layout
18990 LabelStringAppendix
18996 The following special constructs can be used in the string:
18997 \begin_inset Separator parbreak
19004 \begin_layout Itemize
19005 \begin_inset Flex Code
19008 \begin_layout Plain Layout
19016 will be replaced by the expansion of the
19017 \begin_inset Flex Code
19020 \begin_layout Plain Layout
19027 \begin_inset Flex Code
19030 \begin_layout Plain Layout
19031 LabelStringAppendix
19037 \begin_inset Flex Code
19040 \begin_layout Plain Layout
19050 \begin_layout Itemize
19051 counter values can be expressed using \SpecialChar LaTeX
19053 \begin_inset Newline newline
19057 \begin_inset Flex Code
19060 \begin_layout Plain Layout
19077 \begin_inset Flex Code
19080 \begin_layout Plain Layout
19092 \begin_layout Plain Layout
19102 Actually, the situation is a bit more complicated: any
19121 other than those described below will produce arabic numerals.
19122 It would not be surprising to see this change in the future.
19128 \begin_inset Flex Code
19131 \begin_layout Plain Layout
19137 : 1, 2, 3,\SpecialChar ldots
19139 \begin_inset Flex Code
19142 \begin_layout Plain Layout
19148 for lower-case letters: a, b, c, \SpecialChar ldots
19150 \begin_inset Flex Code
19153 \begin_layout Plain Layout
19159 for upper-case letters: A, B, C, \SpecialChar ldots
19161 \begin_inset Flex Code
19164 \begin_layout Plain Layout
19170 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19172 \begin_inset Flex Code
19175 \begin_layout Plain Layout
19181 for upper-case roman numerals: I, II, III\SpecialChar ldots
19183 \begin_inset Flex Code
19186 \begin_layout Plain Layout
19192 for hebrew numerals.
19196 \begin_layout Standard
19197 If LabelString is not defined, a default value is constructed as follows:
19198 if the counter has a master counter
19199 \begin_inset Flex Code
19202 \begin_layout Plain Layout
19209 \begin_inset Flex Code
19212 \begin_layout Plain Layout
19219 \begin_inset Newline newline
19223 \begin_inset Flex Code
19226 \begin_layout Plain Layout
19236 is used; otherwise the string
19237 \begin_inset Flex Code
19240 \begin_layout Plain Layout
19251 \begin_layout Description
19252 \begin_inset Flex Code
19255 \begin_layout Plain Layout
19256 LabelStringAppendix
19262 \begin_inset Flex Code
19265 \begin_layout Plain Layout
19272 \begin_inset Quotes erd
19276 \begin_inset Quotes erd
19280 \begin_inset Flex Code
19283 \begin_layout Plain Layout
19289 , but for use in the Appendix.
19292 \begin_layout Description
19293 \begin_inset Flex Code
19296 \begin_layout Plain Layout
19303 \begin_inset Flex Code
19306 \begin_layout Plain Layout
19313 \begin_inset Quotes erd
19317 \begin_inset Quotes erd
19320 ] A format for use with formatted references to this counter.
19321 For example, one might want to have references to section numbers appear
19323 \begin_inset Quotes eld
19327 \begin_inset Quotes erd
19331 The string should contain
19332 \begin_inset Quotes eld
19336 \begin_inset Quotes erd
19340 This will be replaced by the counter number itself.
19341 So, for sections, it would be: Section ##.
19344 \begin_layout Description
19345 \begin_inset Flex Code
19348 \begin_layout Plain Layout
19355 \begin_inset Flex Code
19358 \begin_layout Plain Layout
19365 \begin_inset Quotes erd
19369 \begin_inset Quotes erd
19372 ] If this is set to the name of another counter, the present counter will
19373 be reset every time the other one is increased.
19375 \begin_inset Flex Code
19378 \begin_layout Plain Layout
19385 \begin_inset Flex Code
19388 \begin_layout Plain Layout
19397 \begin_layout Subsection
19399 \begin_inset CommandInset label
19401 name "sub:Font-description"
19408 \begin_layout Standard
19409 A font description looks like this:
19412 \begin_layout LyX-Code
19426 \begin_layout LyX-Code
19430 \begin_layout LyX-Code
19434 \begin_layout Standard
19435 The following commands are available:
19438 \begin_layout Description
19439 \begin_inset Flex Code
19442 \begin_layout Plain Layout
19449 \begin_inset Flex Code
19452 \begin_layout Plain Layout
19461 \begin_inset Flex Code
19464 \begin_layout Plain Layout
19471 \begin_inset Flex Code
19474 \begin_layout Plain Layout
19481 \begin_inset Flex Code
19484 \begin_layout Plain Layout
19491 \begin_inset Flex Code
19494 \begin_layout Plain Layout
19501 \begin_inset Flex Code
19504 \begin_layout Plain Layout
19511 \begin_inset Flex Code
19514 \begin_layout Plain Layout
19521 \begin_inset Flex Code
19524 \begin_layout Plain Layout
19531 \begin_inset Flex Code
19534 \begin_layout Plain Layout
19543 \begin_layout Description
19544 \begin_inset Flex Code
19547 \begin_layout Plain Layout
19554 \begin_inset Flex Code
19557 \begin_layout Plain Layout
19566 \begin_inset Flex Code
19569 \begin_layout Plain Layout
19576 \begin_inset Flex Code
19579 \begin_layout Plain Layout
19588 \begin_layout Description
19589 \begin_inset Flex Code
19592 \begin_layout Plain Layout
19599 \begin_inset Flex Code
19602 \begin_layout Plain Layout
19608 ] Valid arguments are:
19609 \begin_inset Flex Code
19612 \begin_layout Plain Layout
19619 \begin_inset Flex Code
19622 \begin_layout Plain Layout
19629 \begin_inset Flex Code
19632 \begin_layout Plain Layout
19639 \begin_inset Flex Code
19642 \begin_layout Plain Layout
19649 \begin_inset Flex Code
19652 \begin_layout Plain Layout
19659 \begin_inset Flex Code
19662 \begin_layout Plain Layout
19669 \begin_inset Flex Code
19672 \begin_layout Plain Layout
19679 \begin_inset Flex Code
19682 \begin_layout Plain Layout
19689 \begin_inset Flex Code
19692 \begin_layout Plain Layout
19699 \begin_inset Flex Code
19702 \begin_layout Plain Layout
19709 \begin_inset Flex Code
19712 \begin_layout Plain Layout
19719 \begin_inset Flex Code
19722 \begin_layout Plain Layout
19729 Each of these turns on or off the corresponding attribute.
19731 \begin_inset Flex Code
19734 \begin_layout Plain Layout
19740 turns on emphasis, and
19741 \begin_inset Flex Code
19744 \begin_layout Plain Layout
19752 \begin_inset Newline newline
19755 If the latter seems puzzling, remember that the font settings for the present
19756 context are generally inherited from the surrounding context.
19758 \begin_inset Flex Code
19761 \begin_layout Plain Layout
19767 would turn off the emphasis that was anyway in effect, say, in a theorem
19771 \begin_layout Description
19772 \begin_inset Flex Code
19775 \begin_layout Plain Layout
19782 \begin_inset Flex Code
19785 \begin_layout Plain Layout
19794 \begin_inset Flex Code
19797 \begin_layout Plain Layout
19806 \begin_layout Description
19807 \begin_inset Flex Code
19810 \begin_layout Plain Layout
19817 \begin_inset Flex Code
19820 \begin_layout Plain Layout
19829 \begin_inset Flex Code
19832 \begin_layout Plain Layout
19839 \begin_inset Flex Code
19842 \begin_layout Plain Layout
19849 \begin_inset Flex Code
19852 \begin_layout Plain Layout
19861 \begin_layout Description
19862 \begin_inset Flex Code
19865 \begin_layout Plain Layout
19872 \begin_inset Flex Code
19875 \begin_layout Plain Layout
19882 \begin_inset Flex Code
19885 \begin_layout Plain Layout
19892 \begin_inset Flex Code
19895 \begin_layout Plain Layout
19904 \begin_inset Flex Code
19907 \begin_layout Plain Layout
19914 \begin_inset Flex Code
19917 \begin_layout Plain Layout
19924 \begin_inset Flex Code
19927 \begin_layout Plain Layout
19934 \begin_inset Flex Code
19937 \begin_layout Plain Layout
19944 \begin_inset Flex Code
19947 \begin_layout Plain Layout
19956 \begin_layout Subsection
19957 \begin_inset CommandInset label
19959 name "sub:Citation-format-description"
19963 Citation format description
19966 \begin_layout Standard
19968 \begin_inset Flex Code
19971 \begin_layout Plain Layout
19977 blocks are used to describe how bibliographic information should be displayed,
19978 both within \SpecialChar LyX
19979 itself (in the citation dialog and in tooltips, for example)
19980 and in XHTML output.
19981 Such a block might look like this:
19984 \begin_layout LyX-Code
19988 \begin_layout LyX-Code
19992 \begin_layout LyX-Code
19996 \begin_layout LyX-Code
20000 \begin_layout Standard
20001 The individual lines define how the bibliographic information associated
20002 with an article or book, respectively, is to be displayed, and such a definitio
20003 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20006 defines a default format in the source code that will be used if no specific
20007 definition has been given.
20009 predefines several formats in the file
20010 \begin_inset Flex Code
20013 \begin_layout Plain Layout
20019 , which is included in most of \SpecialChar LyX
20020 's document classes.
20023 \begin_layout Standard
20024 The definitions use a simple language that allows Bib\SpecialChar TeX
20025 keys to be replaced
20027 Keys should be enclosed in
20028 \begin_inset Flex Code
20031 \begin_layout Plain Layout
20038 \begin_inset Flex Code
20041 \begin_layout Plain Layout
20048 So a simple definition might look like this:
20051 \begin_layout LyX-Code
20053 \begin_inset Quotes eld
20057 \begin_inset Quotes erd
20063 \begin_layout Standard
20064 This would print the author, followed by a comma, followed by the title,
20065 in quotes, followed by a period.
20068 \begin_layout Standard
20069 Of course, sometimes you may want to print a key only if it exists.
20070 This can be done by using a conditional construction, such as:
20071 \begin_inset Flex Code
20074 \begin_layout Plain Layout
20076 \begin_inset space ~
20086 \begin_inset Flex Code
20089 \begin_layout Plain Layout
20095 key exists, then print
20096 \begin_inset Quotes eld
20100 \begin_inset space ~
20104 \begin_inset Quotes erd
20107 followed by the volume key.
20108 It is also possible to have an else clause in the conditional, such as:
20109 \begin_inset Newline newline
20113 \begin_inset Flex Code
20116 \begin_layout Plain Layout
20117 {%author%[[%author%]][[%editor%, ed.]]}
20123 \begin_inset Newline newline
20127 \begin_inset Flex Code
20130 \begin_layout Plain Layout
20136 key is printed if it exists; otherwise, the editor key is printed, followed
20138 \begin_inset Quotes eld
20142 \begin_inset space ~
20146 \begin_inset Quotes erd
20149 Note that the key is again enclosed in
20150 \begin_inset Flex Code
20153 \begin_layout Plain Layout
20159 signs; the entire conditional is enclosed in braces; and the if and else
20160 clauses are enclosed in double brackets,
20161 \begin_inset Quotes eld
20165 \begin_inset Flex Code
20168 \begin_layout Plain Layout
20175 \begin_inset Quotes eld
20179 \begin_inset Quotes eld
20183 \begin_inset Flex Code
20186 \begin_layout Plain Layout
20193 \begin_inset Quotes erd
20197 There must be no space between any of these.
20200 \begin_layout Standard
20201 There is one other piece of syntax available in definitions, which looks
20203 \begin_inset Flex Code
20206 \begin_layout Plain Layout
20213 This defines a piece of formatting information that is to be used when
20215 \begin_inset Quotes eld
20219 \begin_inset Quotes erd
20223 Obviously, we do not want to output HTML tags when writing plain text,
20224 so they should be wrapped in
20225 \begin_inset Quotes eld
20229 \begin_inset Quotes erd
20233 \begin_inset Quotes eld
20237 \begin_inset Quotes erd
20243 \begin_layout Standard
20244 Two special sorts of definitions are also possible in a
20245 \begin_inset Flex Code
20248 \begin_layout Plain Layout
20255 An example of the first would be:
20258 \begin_layout LyX-Code
20260 \begin_inset Quotes eld
20264 \begin_inset Quotes erd
20270 \begin_layout Standard
20271 This is an abbreviation, or macro, and it can be used by treating it as
20273 \begin_inset Flex Code
20276 \begin_layout Plain Layout
20285 \begin_inset Flex Code
20288 \begin_layout Plain Layout
20294 exactly as it would treat its definition.
20295 So, let us issue the obvious
20303 \begin_layout LyX-Code
20307 \begin_layout Standard
20308 or anything like it.
20310 shouldn't go into an infinite loop, but it may go into a long one before
20314 \begin_layout Standard
20315 The second sort of special definition might look like this:
20318 \begin_layout LyX-Code
20322 \begin_layout Standard
20323 This defines a translatable piece of text, which allows relevant parts of
20324 the bibliography to be translated.
20325 It can be included in a definition by treating it as a key:
20326 \begin_inset Flex Code
20329 \begin_layout Plain Layout
20336 Several of these are predefined in
20337 \begin_inset Flex Code
20340 \begin_layout Plain Layout
20347 Note that these are not macros, in the sense just defined.
20348 They will not be expanded.
20351 \begin_layout Standard
20352 So here then is an example that use all these features:
20353 \begin_inset VSpace defskip
20359 \begin_layout Standard
20363 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20366 \begin_layout Standard
20367 \begin_inset VSpace defskip
20370 This defines a macro that prints the author, followed by a comma, if the
20372 \begin_inset Flex Code
20375 \begin_layout Plain Layout
20381 key is defined, or else prints the name of the editor, followed by the
20383 \begin_inset Flex Code
20386 \begin_layout Plain Layout
20392 or its translation (it is by default
20393 \begin_inset Quotes eld
20397 \begin_inset Quotes erd
20401 \begin_inset Flex Code
20404 \begin_layout Plain Layout
20411 Note that this is in fact defined in
20412 \begin_inset Flex Code
20415 \begin_layout Plain Layout
20421 , so you can use it in your own definitions, or re-definitions, if you load
20425 \begin_layout Section
20426 \begin_inset CommandInset label
20428 name "sec:Tags-for-XHTML"
20432 Tags for XHTML output
20435 \begin_layout Standard
20436 As with \SpecialChar LaTeX
20437 or DocBook, the format of \SpecialChar LyX
20438 's XHTML output is also controlled by
20439 layout information.
20440 In general, \SpecialChar LyX
20441 provides sensible defaults and, as mentioned earlier, it will
20442 even construct default CSS style rules from the other layout tags.
20443 For example, \SpecialChar LyX
20444 will attempt to use the information provided in the
20445 \begin_inset Flex Code
20448 \begin_layout Plain Layout
20454 declaration for the Chapter style to write CSS that will appropriately
20455 format chapter headings.
20458 \begin_layout Standard
20459 In many cases, then, you may not have to do anything at all to get acceptable
20460 XHTML output for your own environments, custom insets, and so forth.
20461 But in some cases you will, and so \SpecialChar LyX
20462 provides a number of layout tags that
20463 can be used to customize the XHTML and CSS that are generated.
20466 \begin_layout Standard
20467 Note that there are two tags,
20468 \begin_inset Flex Code
20471 \begin_layout Plain Layout
20478 \begin_inset Flex Code
20481 \begin_layout Plain Layout
20487 that may appear outside style and inset declarations.
20489 \begin_inset CommandInset ref
20491 reference "sub:General-text-class"
20495 for details on these.
20498 \begin_layout Subsection
20499 \begin_inset CommandInset label
20501 name "sub:Paragraph-Style-XHTML"
20508 \begin_layout Standard
20509 The sort of XHTML \SpecialChar LyX
20510 outputs for a paragraph depends upon whether we are dealing
20511 with a normal paragraph, a command, or an environment, where this is itself
20512 determined by the contents of the corresponding
20513 \begin_inset Flex Code
20516 \begin_layout Plain Layout
20527 \begin_layout Standard
20528 For a command or normal paragraph, the output XHTML has the following form:
20531 \begin_layout LyX-Code
20533 \begin_inset Quotes erd
20537 \begin_inset Quotes erd
20543 \begin_layout LyX-Code
20545 \begin_inset Quotes erd
20549 \begin_inset Quotes erd
20555 \begin_layout LyX-Code
20556 Contents of the paragraph.
20559 \begin_layout LyX-Code
20563 \begin_layout Standard
20564 The label tags are of course omitted if the paragraph does not have a label.
20567 \begin_layout Standard
20568 For an environment that is not some sort of list, the XHTML takes this form:
20571 \begin_layout LyX-Code
20573 \begin_inset Quotes erd
20577 \begin_inset Quotes erd
20583 \begin_layout LyX-Code
20585 \begin_inset Quotes erd
20589 \begin_inset Quotes erd
20593 \begin_inset Quotes erd
20597 \begin_inset Quotes erd
20600 >Environment Label</labeltag>First paragraph.</itemtag>
20603 \begin_layout LyX-Code
20604 <itemtag>Second paragraph.</itemtag>
20607 \begin_layout LyX-Code
20611 \begin_layout Standard
20612 Note that the label is output only for the first paragraph, as it should
20613 be for a theorem, for example.
20617 \begin_layout Standard
20618 For a list, we have one of these forms:
20621 \begin_layout LyX-Code
20623 \begin_inset Quotes erd
20627 \begin_inset Quotes erd
20633 \begin_layout LyX-Code
20635 \begin_inset Quotes erd
20639 \begin_inset Quotes erd
20643 \begin_inset Quotes erd
20647 \begin_inset Quotes erd
20650 >List Label</labeltag>First item.</itemtag>
20653 \begin_layout LyX-Code
20655 \begin_inset Quotes erd
20659 \begin_inset Quotes erd
20663 \begin_inset Quotes erd
20667 \begin_inset Quotes erd
20670 >List Label</labeltag>Second item.</itemtag>
20673 \begin_layout LyX-Code
20677 \begin_layout LyX-Code
20681 \begin_layout LyX-Code
20683 \begin_inset Quotes erd
20687 \begin_inset Quotes erd
20693 \begin_layout LyX-Code
20695 \begin_inset Quotes erd
20699 \begin_inset Quotes erd
20702 >List Label</labeltag><itemtag attr=
20703 \begin_inset Quotes erd
20707 \begin_inset Quotes erd
20710 >First item.</itemtag>
20713 \begin_layout LyX-Code
20715 \begin_inset Quotes erd
20719 \begin_inset Quotes erd
20722 >List Label</labeltag><itemtag attr=
20723 \begin_inset Quotes erd
20727 \begin_inset Quotes erd
20730 >Second item.</itemtag>
20733 \begin_layout LyX-Code
20737 \begin_layout Standard
20738 Note the different orders of
20739 \begin_inset Flex Code
20742 \begin_layout Plain Layout
20749 \begin_inset Flex Code
20752 \begin_layout Plain Layout
20759 Which order we get depends upon the setting of
20760 \begin_inset Flex Code
20763 \begin_layout Plain Layout
20770 \begin_inset Flex Code
20773 \begin_layout Plain Layout
20779 is false (the default), you get the first of these, with the label within
20780 the item; if true, you get the second, with the label outside the item.
20783 \begin_layout Standard
20784 The specific tags and attributes output for each paragraph type can be controlle
20785 d by means of the layout tags we are about to describe.
20786 As mentioned earlier, however, \SpecialChar LyX
20787 uses sensible defaults for many of these,
20788 so you often may not need to do very much to get good XHTML output.
20789 Think of the available tags as there so you can tweak things to your liking.
20792 \begin_layout Description
20793 \begin_inset Flex Code
20796 \begin_layout Plain Layout
20803 \begin_inset Flex Code
20806 \begin_layout Plain Layout
20812 ] Specifies attribute information to be output with the main tag.
20814 \begin_inset Quotes eld
20818 \begin_inset Flex Code
20821 \begin_layout Plain Layout
20828 \begin_inset Quotes erd
20832 By default, \SpecialChar LyX
20834 \begin_inset Quotes eld
20838 \begin_inset Flex Code
20841 \begin_layout Plain Layout
20848 \begin_inset Quotes erd
20852 \begin_inset Flex Code
20855 \begin_layout Plain Layout
20861 is the \SpecialChar LyX
20862 name of the layout, made lowercase, for example: chapter.
20867 contain any style information.
20869 \begin_inset Flex Code
20872 \begin_layout Plain Layout
20881 \begin_layout Description
20882 \begin_inset Flex Code
20885 \begin_layout Plain Layout
20892 \begin_inset Flex Code
20895 \begin_layout Plain Layout
20905 ] Whether to output the default CSS information \SpecialChar LyX
20906 generates for this layout,
20907 even if additional information is explicitly provided via
20908 \begin_inset Flex Code
20911 \begin_layout Plain Layout
20919 \begin_inset Flex Code
20922 \begin_layout Plain Layout
20928 allows you to alter or augment the generated CSS, rather than to override
20931 \begin_inset Flex Code
20934 \begin_layout Plain Layout
20943 \begin_layout Description
20944 \begin_inset Flex Code
20947 \begin_layout Plain Layout
20954 \begin_inset Flex Code
20957 \begin_layout Plain Layout
20963 ] The tag to be used for individual paragraphs of environments, replacing
20965 \begin_inset Flex Code
20968 \begin_layout Plain Layout
20974 in the examples above.
20976 \begin_inset Flex Code
20979 \begin_layout Plain Layout
20988 \begin_layout Description
20989 \begin_inset Flex Code
20992 \begin_layout Plain Layout
20999 \begin_inset Flex Code
21002 \begin_layout Plain Layout
21008 ] Attributes for the item tag.
21010 \begin_inset Quotes eld
21014 \begin_inset Flex Code
21017 \begin_layout Plain Layout
21018 class=`layoutname_item'
21024 \begin_inset Quotes erd
21032 contain any style information.
21034 \begin_inset Flex Code
21037 \begin_layout Plain Layout
21046 \begin_layout Description
21047 \begin_inset Flex Code
21050 \begin_layout Plain Layout
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21066 ] The tag to be used for paragraph and item labels, replacing
21067 \begin_inset Flex Code
21070 \begin_layout Plain Layout
21076 in the examples above.
21078 \begin_inset Flex Code
21081 \begin_layout Plain Layout
21088 \begin_inset Flex Code
21091 \begin_layout Plain Layout
21098 \begin_inset Flex Code
21101 \begin_layout Plain Layout
21108 \begin_inset Flex Code
21111 \begin_layout Plain Layout
21112 Centered_Top_Environment
21117 , in which case it defaults to
21118 \begin_inset Flex Code
21121 \begin_layout Plain Layout
21130 \begin_layout Description
21131 \begin_inset Flex Code
21134 \begin_layout Plain Layout
21141 \begin_inset Flex Code
21144 \begin_layout Plain Layout
21150 ] Attributes for the label tag.
21152 \begin_inset Quotes eld
21156 \begin_inset Flex Code
21159 \begin_layout Plain Layout
21160 class=`layoutname_label'
21166 \begin_inset Quotes erd
21174 contain any style information.
21176 \begin_inset Flex Code
21179 \begin_layout Plain Layout
21188 \begin_layout Description
21189 \begin_inset Flex Code
21192 \begin_layout Plain Layout
21199 \begin_inset Flex Code
21202 \begin_layout Plain Layout
21212 ] Meaningful only for list-like environments, this tag controls whether
21213 the label tag is output before or inside the item tag.
21214 This is used, for example, in the description environment, where we want
21216 \begin_inset Flex Code
21219 \begin_layout Plain Layout
21220 <dt>\SpecialChar ldots
21221 </dt><dd>\SpecialChar ldots
21229 \begin_inset Flex Code
21232 \begin_layout Plain Layout
21238 : The label tag is output inside the item tag.
21241 \begin_layout Description
21242 \begin_inset Flex Code
21245 \begin_layout Plain Layout
21251 Information to be output in the
21252 \begin_inset Flex Code
21255 \begin_layout Plain Layout
21261 section when this style is used.
21262 This might, for example, be used to include a
21263 \begin_inset Flex Code
21266 \begin_layout Plain Layout
21273 \begin_inset Flex Code
21276 \begin_layout Plain Layout
21285 \begin_layout Description
21286 \begin_inset Flex Code
21289 \begin_layout Plain Layout
21295 CSS style information to be included when this style is used.
21296 Note that this will automatically be wrapped in a layout-generated
21297 \begin_inset Flex Code
21300 \begin_layout Plain Layout
21306 block, so only the CSS itself need be included.
21308 \begin_inset Flex Code
21311 \begin_layout Plain Layout
21320 \begin_layout Description
21321 \begin_inset Flex Code
21324 \begin_layout Plain Layout
21331 \begin_inset Flex Code
21334 \begin_layout Plain Layout
21340 ] The tag to be used for the main label, replacing
21341 \begin_inset Flex Code
21344 \begin_layout Plain Layout
21350 in the examples above.
21352 \begin_inset Flex Code
21355 \begin_layout Plain Layout
21364 \begin_layout Description
21365 \begin_inset Flex Code
21368 \begin_layout Plain Layout
21375 \begin_inset Flex Code
21378 \begin_layout Plain Layout
21388 ] Marks this style as the one to be used to generate the
21389 \begin_inset Flex Code
21392 \begin_layout Plain Layout
21398 tag for the XHTML file.
21399 By default, it is false.
21401 \begin_inset Flex Code
21404 \begin_layout Plain Layout
21410 file sets it to true for the
21411 \begin_inset Flex Code
21414 \begin_layout Plain Layout
21424 \begin_layout Subsection
21428 \begin_layout Standard
21429 The XHTML output of insets can also be controlled by information in layout
21434 \begin_layout Plain Layout
21435 At present, this is true only for
21436 \begin_inset Quotes eld
21440 \begin_inset Quotes erd
21443 insets (insets you can type into) and is not true for
21444 \begin_inset Quotes eld
21448 \begin_inset Quotes erd
21451 insets (insets that are associated with dialog boxes).
21456 Here, too, \SpecialChar LyX
21457 tries to provide sensible defaults, and it constructs default
21459 But everything can be customized.
21462 \begin_layout Standard
21463 The XHTML \SpecialChar LyX
21464 outputs for an inset has the following form:
21467 \begin_layout LyX-Code
21469 \begin_inset Quotes erd
21473 \begin_inset Quotes erd
21479 \begin_layout LyX-Code
21480 <labeltag>Label</labeltag>
21483 \begin_layout LyX-Code
21485 \begin_inset Quotes erd
21489 \begin_inset Quotes erd
21492 >Contents of the inset.</innertag>
21495 \begin_layout LyX-Code
21499 \begin_layout Standard
21500 If the inset permits multiple paragraphs—that is, if
21501 \begin_inset Flex Code
21504 \begin_layout Plain Layout
21510 is true—then the contents of the inset will itself be output as paragraphs
21511 formatted according to the styles used for those paragraphs (standard,
21512 quote, and the like).
21513 The label tag is of course omitted if the paragraph does not have a label
21514 and, at present, is always
21515 \begin_inset Flex Code
21518 \begin_layout Plain Layout
21525 The inner tag is optional and, by default, does not appear.
21528 \begin_layout Standard
21529 The specific tags and attributes output for each inset can be controlled
21530 by means of the following layout tags.
21533 \begin_layout Description
21534 \begin_inset Flex Code
21537 \begin_layout Plain Layout
21544 \begin_inset Flex Code
21547 \begin_layout Plain Layout
21553 ] Specifies attribute information to be output with the main tag.
21555 \begin_inset Quotes eld
21559 \begin_inset Flex Code
21562 \begin_layout Plain Layout
21563 class=`myinset' onclick=`\SpecialChar ldots
21570 \begin_inset Quotes erd
21574 By default, \SpecialChar LyX
21576 \begin_inset Quotes eld
21580 \begin_inset Flex Code
21583 \begin_layout Plain Layout
21590 \begin_inset Quotes erd
21594 \begin_inset Flex Code
21597 \begin_layout Plain Layout
21603 is the \SpecialChar LyX
21604 name of the inset, made lowercase and with non-alphanumeric characters
21605 converted to underscores, for example: footnote.
21608 \begin_layout Description
21609 \begin_inset Flex Code
21612 \begin_layout Plain Layout
21619 \begin_inset Flex Code
21622 \begin_layout Plain Layout
21632 ] Whether to output the default CSS information \SpecialChar LyX
21633 generates for this layout,
21634 even if additional information is explicitly provided via
21635 \begin_inset Flex Code
21638 \begin_layout Plain Layout
21646 \begin_inset Flex Code
21649 \begin_layout Plain Layout
21655 allows you to alter or augment the generated CSS, rather than to override
21660 \begin_layout Description
21661 \begin_inset Flex Code
21664 \begin_layout Plain Layout
21671 \begin_inset Flex Code
21674 \begin_layout Plain Layout
21680 ] Attributes for the inner tag.
21682 \begin_inset Quotes eld
21686 \begin_inset Flex Code
21689 \begin_layout Plain Layout
21690 class=`insetname_inner'
21696 \begin_inset Quotes erd
21702 \begin_layout Description
21703 \begin_inset Flex Code
21706 \begin_layout Plain Layout
21713 \begin_inset Flex Code
21716 \begin_layout Plain Layout
21722 ] The inner tag, replacing
21723 \begin_inset Flex Code
21726 \begin_layout Plain Layout
21732 in the examples above.
21733 By default, there is none.
21736 \begin_layout Description
21737 \begin_inset Flex Code
21740 \begin_layout Plain Layout
21747 \begin_inset Flex Code
21750 \begin_layout Plain Layout
21758 ] Whether this inset represents a standalone block of text (such as a footnote)
21759 or instead represents material that is included in the surrounding text
21760 (such as a branch).
21764 \begin_layout Description
21765 \begin_inset Flex Code
21768 \begin_layout Plain Layout
21775 \begin_inset Flex Code
21778 \begin_layout Plain Layout
21784 ] A label for this inset, possibly including a reference to a counter.
21785 For example, for footnote, it might be:
21786 \begin_inset Flex Code
21789 \begin_layout Plain Layout
21798 This is optional, and there is no default.
21801 \begin_layout Description
21802 \begin_inset Flex Code
21805 \begin_layout Plain Layout
21811 Information to be output in the
21812 \begin_inset Flex Code
21815 \begin_layout Plain Layout
21821 section when this style is used.
21822 This might, for example, be used to include a
21823 \begin_inset Flex Code
21826 \begin_layout Plain Layout
21833 \begin_inset Flex Code
21836 \begin_layout Plain Layout
21845 \begin_layout Description
21846 \begin_inset Flex Code
21849 \begin_layout Plain Layout
21855 CSS style information to be included when this style is used.
21856 Note that this will automatically be wrapped in a layout-generated
21857 \begin_inset Flex Code
21860 \begin_layout Plain Layout
21866 block, so only the CSS itself need be included.
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 tag to be used for the main label, replacing
21890 \begin_inset Flex Code
21893 \begin_layout Plain Layout
21899 in the examples above.
21900 The default depends upon the setting of
21901 \begin_inset Flex Code
21904 \begin_layout Plain Layout
21911 \begin_inset Flex Code
21914 \begin_layout Plain Layout
21920 is true, the default is
21921 \begin_inset Flex Code
21924 \begin_layout Plain Layout
21930 ; if it is false, the default is
21931 \begin_inset Flex Code
21934 \begin_layout Plain Layout
21943 \begin_layout Subsection
21947 \begin_layout Standard
21948 The XHTML output for floats too can be controlled by layout information.
21949 The output has the following form:
21952 \begin_layout LyX-Code
21954 \begin_inset Quotes erd
21958 \begin_inset Quotes erd
21964 \begin_layout LyX-Code
21965 Contents of the float.
21968 \begin_layout LyX-Code
21972 \begin_layout Standard
21973 The caption, if there is one, is a separate inset and will be output as
21975 Its appearance can be controlled via the InsetLayout for caption insets.
21979 \begin_layout Description
21980 \begin_inset Flex Code
21983 \begin_layout Plain Layout
21990 \begin_inset Flex Code
21993 \begin_layout Plain Layout
21999 ] Specifies attribute information to be output with the main tag.
22001 \begin_inset Quotes eld
22005 \begin_inset Flex Code
22008 \begin_layout Plain Layout
22009 class=`myfloat' onclick=`\SpecialChar ldots
22016 \begin_inset Quotes erd
22020 By default, \SpecialChar LyX
22022 \begin_inset Quotes eld
22026 \begin_inset Flex Code
22029 \begin_layout Plain Layout
22030 class=`float float-floattype'
22036 \begin_inset Quotes erd
22040 \begin_inset Flex Code
22043 \begin_layout Plain Layout
22049 is \SpecialChar LyX
22050 's name for this type of float, as determined by the float declaration
22052 \begin_inset CommandInset ref
22054 reference "sub:Floats"
22058 ), though made lowercase and with non-alphanumeric characters converted
22059 to underscores, for example: float-table.
22062 \begin_layout Description
22063 \begin_inset Flex Code
22066 \begin_layout Plain Layout
22072 CSS style information to be included when this float is used.
22073 Note that this will automatically be wrapped in a layout-generated
22074 \begin_inset Flex Code
22077 \begin_layout Plain Layout
22083 block, so only the CSS itself need be included.
22086 \begin_layout Description
22087 \begin_inset Flex Code
22090 \begin_layout Plain Layout
22097 \begin_inset Flex Code
22100 \begin_layout Plain Layout
22106 ] The tag to be used for this float, replacing
22107 \begin_inset Quotes eld
22111 \begin_inset Flex Code
22114 \begin_layout Plain Layout
22121 \begin_inset Quotes erd
22124 in the example above.
22126 \begin_inset Flex Code
22129 \begin_layout Plain Layout
22135 and will rarely need changing.
22138 \begin_layout Subsection
22139 Bibliography formatting
22142 \begin_layout Standard
22143 The bibliography can be formatted using
22144 \begin_inset Flex Code
22147 \begin_layout Plain Layout
22155 \begin_inset CommandInset ref
22157 reference "sub:Citation-format-description"
22164 \begin_layout Subsection
22169 \begin_layout Standard
22170 We have several times mentioned that \SpecialChar LyX
22171 will generate default CSS style rules
22172 for both insets and paragraph styles, based upon the other layout information
22174 In this section, we shall say a word about which layout information \SpecialChar LyX
22179 \begin_layout Standard
22180 At present, \SpecialChar LyX
22181 auto-generates CSS only for font information, making use of
22183 \begin_inset Flex Code
22186 \begin_layout Plain Layout
22193 \begin_inset Flex Code
22196 \begin_layout Plain Layout
22203 \begin_inset Flex Code
22206 \begin_layout Plain Layout
22213 \begin_inset Flex Code
22216 \begin_layout Plain Layout
22223 \begin_inset Flex Code
22226 \begin_layout Plain Layout
22233 \begin_inset CommandInset ref
22235 reference "sub:Font-description"
22240 The translation is mostly straightforward and obvious.
22242 \begin_inset Quotes eld
22246 \begin_inset Flex Code
22249 \begin_layout Plain Layout
22256 \begin_inset Quotes erd
22260 \begin_inset Quotes eld
22264 \begin_inset Flex Code
22267 \begin_layout Plain Layout
22268 font-family: sans-serif;
22274 \begin_inset Quotes erd
22278 The correspondence of \SpecialChar LyX
22279 sizes and CSS sizes is a little less obvious but
22280 nonetheless intuitive.
22282 \begin_inset Flex Code
22285 \begin_layout Plain Layout
22292 \begin_inset Flex URL
22295 \begin_layout Plain Layout
22305 \begin_layout Chapter
22306 Including External Material
22307 \begin_inset CommandInset label
22309 name "chap:Including-External-Material"
22316 \begin_layout Standard
22317 \begin_inset Box Shadowbox
22327 height_special "totalheight"
22330 \begin_layout Plain Layout
22331 WARNING: This portion of the documentation has not been updated for some
22333 We certainly hope that it is still accurate, but there are no guarantees.
22341 \begin_layout Standard
22342 The use of material from sources external to \SpecialChar LyX
22343 is covered in detail in the
22349 This part of the manual covers what needs to happen behind the scenes for
22350 new sorts of material to be included.
22353 \begin_layout Section
22357 \begin_layout Standard
22358 The external material feature is based on the concept of a
22363 A template is a specification of how \SpecialChar LyX
22364 should interface with a certain kind
22366 As bundled, \SpecialChar LyX
22367 comes with predefined templates for Xfig figures, various
22368 raster format images, chess diagrams, and LilyPond music notation.
22369 You can check the actual list by using the menu
22370 \begin_inset Flex MenuItem
22373 \begin_layout Plain Layout
22374 Insert\SpecialChar menuseparator
22375 File\SpecialChar menuseparator
22382 Furthermore, it is possible to roll your own template to support a specific
22384 Later we'll describe in more detail what is involved, and hopefully you
22385 will submit all the templates you create so we can include them in a later
22390 \begin_layout Standard
22391 Another basic idea of the external material feature is to distinguish between
22392 the original file that serves as a base for final material and the produced
22393 file that is included in your exported or printed document.
22394 For example, consider the case of a figure produced with
22395 \begin_inset Flex Code
22398 \begin_layout Plain Layout
22405 The Xfig application itself works on an original file with the
22406 \begin_inset Flex Code
22409 \begin_layout Plain Layout
22416 Within Xfig, you create and change your figure, and when you are done,
22418 \begin_inset Flex Code
22421 \begin_layout Plain Layout
22428 When you want to include the figure in your document, you invoke
22429 \begin_inset Flex Code
22432 \begin_layout Plain Layout
22438 in order to create a PostScript file that can readily be included in your
22442 \begin_inset Flex Code
22445 \begin_layout Plain Layout
22451 file is the original file, and the PostScript file is the produced file.
22454 \begin_layout Standard
22455 This distinction is important in order to allow updating of the material
22456 while you are in the process of writing the document.
22457 Furthermore, it provides us with the flexibility that is needed to support
22458 multiple export formats.
22459 For instance, in the case of a plain text file, it is not exactly an award-winn
22460 ing idea to include the figure as raw PostScript.
22461 Instead, you would either prefer to just include a reference to the figure
22462 or try to invoke some graphics to ASCII converter to make the final result
22463 look similar to the real graphics.
22464 The external material management allows you to do this, because it is parametri
22465 zed on the different export formats that \SpecialChar LyX
22469 \begin_layout Standard
22470 Besides supporting the production of different products according to the
22471 exported format, it supports tight integration with editing and viewing
22473 In the case of an Xfig figure, you are able to invoke Xfig on the original
22474 file with a single click from within the external material dialog in \SpecialChar LyX
22476 and also preview the produced PostScript file with Ghostview with another
22478 No more fiddling around with the command line and/or file browsers to locate
22479 and manipulate the original or produced files.
22480 In this way, you are finally able to take full advantage of the many different
22481 applications that are relevant to use when you write your documents, and
22482 ultimately be more productive.
22485 \begin_layout Section
22486 The external template configuration file
22489 \begin_layout Standard
22490 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22492 However, be aware that doing this in an careless manner most probably
22496 introduce an easily exploitable security hole.
22497 So before you do this, please read the discussion about security in
22498 \begin_inset CommandInset ref
22500 reference "sec:Security-discussion"
22507 \begin_layout Standard
22508 Having said that, we encourage you to submit any interesting templates that
22513 \begin_layout Standard
22514 The external templates are defined in the
22515 \begin_inset Flex Code
22518 \begin_layout Plain Layout
22520 Dir/lib/external_templates
22526 You can place your own version in
22527 \begin_inset Flex Code
22530 \begin_layout Plain Layout
22531 UserDir/external_templates
22539 \begin_layout Standard
22540 A typical template looks like this:
22543 \begin_layout LyX-Code
22547 \begin_layout LyX-Code
22548 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22551 \begin_layout LyX-Code
22555 \begin_layout LyX-Code
22559 \begin_layout LyX-Code
22563 \begin_layout LyX-Code
22567 \begin_layout LyX-Code
22571 \begin_layout LyX-Code
22572 AutomaticProduction true
22575 \begin_layout LyX-Code
22579 \begin_layout LyX-Code
22583 \begin_layout LyX-Code
22584 Format \SpecialChar LaTeX
22588 \begin_layout LyX-Code
22589 TransformCommand Rotate RotationLatexCommand
22592 \begin_layout LyX-Code
22593 TransformCommand Resize ResizeLatexCommand
22596 \begin_layout LyX-Code
22597 Product "$$RotateFront$$ResizeFront
22600 \begin_layout LyX-Code
22605 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22608 \begin_layout LyX-Code
22609 $$ResizeBack$$RotateBack"
22612 \begin_layout LyX-Code
22616 \begin_layout LyX-Code
22617 UpdateResult "$$AbsPath$$Basename.pstex_t"
22620 \begin_layout LyX-Code
22621 Requirement "graphicx"
22624 \begin_layout LyX-Code
22625 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22628 \begin_layout LyX-Code
22629 ReferencedFile latex "$$AbsPath$$Basename.eps"
22632 \begin_layout LyX-Code
22633 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22636 \begin_layout LyX-Code
22640 \begin_layout LyX-Code
22641 Format PDF\SpecialChar LaTeX
22645 \begin_layout LyX-Code
22646 TransformCommand Rotate RotationLatexCommand
22649 \begin_layout LyX-Code
22650 TransformCommand Resize ResizeLatexCommand
22653 \begin_layout LyX-Code
22654 Product "$$RotateFront$$ResizeFront
22657 \begin_layout LyX-Code
22662 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22665 \begin_layout LyX-Code
22666 $$ResizeBack$$RotateBack"
22669 \begin_layout LyX-Code
22670 UpdateFormat pdftex
22673 \begin_layout LyX-Code
22674 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22677 \begin_layout LyX-Code
22678 Requirement "graphicx"
22681 \begin_layout LyX-Code
22682 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22685 \begin_layout LyX-Code
22686 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22689 \begin_layout LyX-Code
22693 \begin_layout LyX-Code
22697 \begin_layout LyX-Code
22698 Product "$$Contents(
22700 "$$AbsPath$$Basename.asc
22705 \begin_layout LyX-Code
22706 UpdateFormat asciixfig
22709 \begin_layout LyX-Code
22710 UpdateResult "$$AbsPath$$Basename.asc"
22713 \begin_layout LyX-Code
22717 \begin_layout LyX-Code
22721 \begin_layout LyX-Code
22722 Product "<graphic fileref=
22724 "$$AbsOrRelPathMaster$$Basename.eps
22729 \begin_layout LyX-Code
22733 \begin_layout LyX-Code
22737 \begin_layout LyX-Code
22738 UpdateResult "$$AbsPath$$Basename.eps"
22741 \begin_layout LyX-Code
22742 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22745 \begin_layout LyX-Code
22746 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22749 \begin_layout LyX-Code
22753 \begin_layout LyX-Code
22754 Product "[XFig: $$FName]"
22757 \begin_layout LyX-Code
22761 \begin_layout LyX-Code
22765 \begin_layout Standard
22766 As you can see, the template is enclosed in
22767 \begin_inset Flex Code
22770 \begin_layout Plain Layout
22778 \begin_inset Flex Code
22781 \begin_layout Plain Layout
22788 It contains a header specifying some general settings and, for each supported
22789 primary document file format, a section
22790 \begin_inset Flex Code
22793 \begin_layout Plain Layout
22801 \begin_inset Flex Code
22804 \begin_layout Plain Layout
22813 \begin_layout Subsection
22814 The template header
22817 \begin_layout Description
22818 \begin_inset Flex Code
22821 \begin_layout Plain Layout
22822 AutomaticProduction
22823 \begin_inset space ~
22831 Whether the file represented by the template must be generated by \SpecialChar LyX
22833 This command must occur exactly once.
22836 \begin_layout Description
22837 \begin_inset Flex Code
22840 \begin_layout Plain Layout
22842 \begin_inset space ~
22850 A glob pattern that is used in the file dialog to filter out the desired
22852 If there is more than one possible file extension (e.
22853 \begin_inset space \thinspace{}
22857 \begin_inset space \space{}
22861 \begin_inset Flex Code
22864 \begin_layout Plain Layout
22871 \begin_inset Flex Code
22874 \begin_layout Plain Layout
22880 ), use something like
22881 \begin_inset Flex Code
22884 \begin_layout Plain Layout
22891 This command must occur exactly once.
22894 \begin_layout Description
22895 \begin_inset Flex Code
22898 \begin_layout Plain Layout
22900 \begin_inset space ~
22908 The text that is displayed on the button.
22909 This command must occur exactly once.
22912 \begin_layout Description
22913 \begin_inset Flex Code
22916 \begin_layout Plain Layout
22918 \begin_inset space ~
22922 \begin_inset space ~
22930 The help text that is used in the External dialog.
22931 Provide enough information to explain to the user just what the template
22932 can provide him with.
22933 This command must occur exactly once.
22936 \begin_layout Description
22937 \begin_inset Flex Code
22940 \begin_layout Plain Layout
22942 \begin_inset space ~
22950 The file format of the original file.
22951 This must be the name of a format that is known to \SpecialChar LyX
22953 \begin_inset CommandInset ref
22955 reference "sec:Formats"
22961 \begin_inset Quotes eld
22965 \begin_inset Flex Code
22968 \begin_layout Plain Layout
22975 \begin_inset Quotes erd
22978 if the template can handle original files of more than one format.
22980 will attempt to interrogate the file itself in order to deduce its format
22982 This command must occur exactly once.
22985 \begin_layout Description
22986 \begin_inset Flex Code
22989 \begin_layout Plain Layout
22991 \begin_inset space ~
22999 A unique name for the template.
23000 It must not contain substitution macros (see below).
23003 \begin_layout Description
23004 \begin_inset Flex Code
23007 \begin_layout Plain Layout
23009 \begin_inset space ~
23012 Rotate|Resize|Clip|Extra
23017 This command specifies which transformations are supported by this template.
23018 It may occur zero or more times.
23019 This command enables the corresponding tabs in the external dialog.
23021 \begin_inset Flex Code
23024 \begin_layout Plain Layout
23030 command must have either a corresponding
23031 \begin_inset Flex Code
23034 \begin_layout Plain Layout
23041 \begin_inset Flex Code
23044 \begin_layout Plain Layout
23051 \begin_inset Flex Code
23054 \begin_layout Plain Layout
23061 Otherwise the transformation will not be supported by that format.
23064 \begin_layout Subsection
23068 \begin_layout Description
23069 \begin_inset Flex Code
23072 \begin_layout Plain Layout
23074 \begin_inset space ~
23078 |PDF\SpecialChar LaTeX
23084 The primary document file format that this format definition is for.
23085 Not every template has a sensible representation in all document file formats.
23086 Please define nevertheless a
23087 \begin_inset Flex Code
23090 \begin_layout Plain Layout
23096 section for all templates.
23097 Use a dummy text when no representation is available.
23098 Then you can at least see a reference to the external material in the exported
23102 \begin_layout Description
23103 \begin_inset Flex Code
23106 \begin_layout Plain Layout
23108 \begin_inset space ~
23112 \begin_inset space ~
23120 This command defines an additional macro
23121 \begin_inset Flex Code
23124 \begin_layout Plain Layout
23130 for substitution in
23131 \begin_inset Flex Code
23134 \begin_layout Plain Layout
23142 \begin_inset Flex Code
23145 \begin_layout Plain Layout
23151 itself may contain substitution macros.
23152 The advantage over using
23153 \begin_inset Flex Code
23156 \begin_layout Plain Layout
23163 \begin_inset Flex Code
23166 \begin_layout Plain Layout
23172 is that the substituted value of
23173 \begin_inset Flex Code
23176 \begin_layout Plain Layout
23182 is sanitized so that it is a valid optional argument in the document format.
23183 This command may occur zero or more times.
23186 \begin_layout Description
23187 \begin_inset Flex Code
23190 \begin_layout Plain Layout
23192 \begin_inset space ~
23200 The text that is inserted in the exported document.
23201 This is actually the most important command and can be quite complex.
23202 This command must occur exactly once.
23205 \begin_layout Description
23206 \begin_inset Flex Code
23209 \begin_layout Plain Layout
23211 \begin_inset space ~
23219 This command specifies a preamble snippet that will be included in the
23222 It has to be defined using
23223 \begin_inset Flex Code
23226 \begin_layout Plain Layout
23234 \begin_inset Flex Code
23237 \begin_layout Plain Layout
23244 This command may occur zero or more times.
23247 \begin_layout Description
23248 \begin_inset Flex Code
23251 \begin_layout Plain Layout
23253 \begin_inset space ~
23257 \begin_inset space ~
23265 This command denotes files that are created by the conversion process and
23266 are needed for a particular export format.
23267 If the filename is relative, it is interpreted relative to the master document.
23268 This command may be given zero or more times.
23271 \begin_layout Description
23272 \begin_inset Flex Code
23275 \begin_layout Plain Layout
23277 \begin_inset space ~
23285 The name of a required \SpecialChar LaTeX
23287 The package is included via
23288 \begin_inset Flex Code
23291 \begin_layout Plain Layout
23299 in the \SpecialChar LaTeX
23301 This command may occur zero or more times.
23304 \begin_layout Description
23305 \begin_inset Flex Code
23308 \begin_layout Plain Layout
23310 \begin_inset space ~
23314 \begin_inset space ~
23317 RotationLatexCommand
23322 This command specifies that the built in \SpecialChar LaTeX
23323 command should be used for rotation.
23324 This command may occur once or not at all.
23327 \begin_layout Description
23328 \begin_inset Flex Code
23331 \begin_layout Plain Layout
23333 \begin_inset space ~
23337 \begin_inset space ~
23345 This command specifies that the built in \SpecialChar LaTeX
23346 command should be used for resizing.
23347 This command may occur once or not at all.
23350 \begin_layout Description
23351 \begin_inset Flex Code
23354 \begin_layout Plain Layout
23356 \begin_inset space ~
23360 \begin_inset space ~
23363 RotationLatexOption
23368 This command specifies that rotation is done via an optional argument.
23369 This command may occur once or not at all.
23372 \begin_layout Description
23373 \begin_inset Flex Code
23376 \begin_layout Plain Layout
23378 \begin_inset space ~
23382 \begin_inset space ~
23390 This command specifies that resizing is done via an optional argument.
23391 This command may occur once or not at all.
23394 \begin_layout Description
23395 \begin_inset Flex Code
23398 \begin_layout Plain Layout
23400 \begin_inset space ~
23404 \begin_inset space ~
23412 This command specifies that clipping is done via an optional argument.
23413 This command may occur once or not at all.
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 specifies that an extra optional argument is used.
23435 This command may occur once or not at all.
23438 \begin_layout Description
23439 \begin_inset Flex Code
23442 \begin_layout Plain Layout
23444 \begin_inset space ~
23452 The file format of the converted file.
23453 This must be the name of a format that is known to \SpecialChar LyX
23455 \begin_inset Flex MenuItem
23458 \begin_layout Plain Layout
23459 Tools\SpecialChar menuseparator
23460 Preferences\SpecialChar menuseparator
23461 File Handling\SpecialChar menuseparator
23468 This command must occur exactly once.
23469 If the resulting file format is PDF, you need to specify the format
23470 \begin_inset Flex Code
23473 \begin_layout Plain Layout
23480 This is the PDF format used for including graphics.
23481 The other defined PDF formats are for document export.
23484 \begin_layout Description
23485 \begin_inset Flex Code
23488 \begin_layout Plain Layout
23490 \begin_inset space ~
23498 The file name of the converted file.
23499 The file name must be absolute.
23500 This command must occur exactly once.
23503 \begin_layout Subsection
23504 Preamble definitions
23507 \begin_layout Standard
23508 The external template configuration file may contain additional preamble
23509 definitions enclosed by
23510 \begin_inset Flex Code
23513 \begin_layout Plain Layout
23521 \begin_inset Flex Code
23524 \begin_layout Plain Layout
23531 They can be used by the templates in the
23532 \begin_inset Flex Code
23535 \begin_layout Plain Layout
23544 \begin_layout Section
23545 The substitution mechanism
23548 \begin_layout Standard
23549 When the external material facility invokes an external program, it is done
23550 on the basis of a command defined in the template configuration file.
23551 These commands can contain various macros that are expanded before execution.
23552 Execution always take place in the directory of the containing document.
23555 \begin_layout Standard
23556 Also, whenever external material is to be displayed, the name will be produced
23557 by the substitution mechanism, and most other commands in the template
23558 definition support substitution as well.
23561 \begin_layout Standard
23562 The available macros are the following:
23565 \begin_layout Description
23566 \begin_inset Flex Code
23569 \begin_layout Plain Layout
23570 $$AbsOrRelPathMaster
23575 The file path, absolute or relative to the master \SpecialChar LyX
23579 \begin_layout Description
23580 \begin_inset Flex Code
23583 \begin_layout Plain Layout
23584 $$AbsOrRelPathParent
23589 The file path, absolute or relative to the \SpecialChar LyX
23593 \begin_layout Description
23594 \begin_inset Flex Code
23597 \begin_layout Plain Layout
23603 The absolute file path.
23606 \begin_layout Description
23607 \begin_inset Flex Code
23610 \begin_layout Plain Layout
23616 The filename without path and without the extension.
23619 \begin_layout Description
23620 \begin_inset Flex Code
23623 \begin_layout Plain Layout
23625 \begin_inset Quotes eld
23629 \begin_inset Quotes erd
23637 This macro will expand to the contents of the file with the name
23638 \begin_inset Flex Code
23641 \begin_layout Plain Layout
23650 \begin_layout Description
23651 \begin_inset Flex Code
23654 \begin_layout Plain Layout
23660 The file extension (including the dot).
23663 \begin_layout Description
23664 \begin_inset Flex Code
23667 \begin_layout Plain Layout
23673 The filename of the file specified in the external material dialog.
23674 This is either an absolute name, or it is relative to the \SpecialChar LyX
23678 \begin_layout Description
23679 \begin_inset Flex Code
23682 \begin_layout Plain Layout
23689 \begin_inset Flex Code
23692 \begin_layout Plain Layout
23698 (absolute name or relative to the \SpecialChar LyX
23702 \begin_layout Description
23703 \begin_inset Flex Code
23706 \begin_layout Plain Layout
23712 The file path, relative to the master \SpecialChar LyX
23716 \begin_layout Description
23717 \begin_inset Flex Code
23720 \begin_layout Plain Layout
23726 The file path, relative to the \SpecialChar LyX
23730 \begin_layout Description
23731 \begin_inset Flex Code
23734 \begin_layout Plain Layout
23740 This macro will expand to the absolute path of the system directory.
23741 This is typically used to point to the various helper scripts that are
23742 bundled with \SpecialChar LyX
23746 \begin_layout Description
23747 \begin_inset Flex Code
23750 \begin_layout Plain Layout
23756 A name and full path to a temporary file which will be automatically deleted
23757 whenever the containing document is closed, or the external material insertion
23761 \begin_layout Standard
23762 All path macros contain a trailing directory separator, so you can construct
23764 \begin_inset space \thinspace{}
23768 \begin_inset space \space{}
23771 the absolute filename with
23772 \begin_inset Flex Code
23775 \begin_layout Plain Layout
23776 $$AbsPath$$Basename$$Extension
23784 \begin_layout Standard
23785 The macros above are substituted in all commands unless otherwise noted.
23787 \begin_inset Flex Code
23790 \begin_layout Plain Layout
23796 supports additionally the following substitutions if they are enabled by
23798 \begin_inset Flex Code
23801 \begin_layout Plain Layout
23808 \begin_inset Flex Code
23811 \begin_layout Plain Layout
23820 \begin_layout Description
23821 \begin_inset Flex Code
23824 \begin_layout Plain Layout
23830 The front part of the resize command.
23833 \begin_layout Description
23834 \begin_inset Flex Code
23837 \begin_layout Plain Layout
23843 The back part of the resize command.
23846 \begin_layout Description
23847 \begin_inset Flex Code
23850 \begin_layout Plain Layout
23856 The front part of the rotation command.
23859 \begin_layout Description
23860 \begin_inset Flex Code
23863 \begin_layout Plain Layout
23869 The back part of the rotation command.
23872 \begin_layout Standard
23873 The value string of the
23874 \begin_inset Flex Code
23877 \begin_layout Plain Layout
23883 command supports additionally the following substitutions if they are enabled
23885 \begin_inset Flex Code
23888 \begin_layout Plain Layout
23895 \begin_inset Flex Code
23898 \begin_layout Plain Layout
23907 \begin_layout Description
23908 \begin_inset Flex Code
23911 \begin_layout Plain Layout
23920 \begin_layout Description
23921 \begin_inset Flex Code
23924 \begin_layout Plain Layout
23933 \begin_layout Description
23934 \begin_inset Flex Code
23937 \begin_layout Plain Layout
23946 \begin_layout Description
23947 \begin_inset Flex Code
23950 \begin_layout Plain Layout
23956 The rotation option.
23959 \begin_layout Standard
23960 You may ask why there are so many path macros.
23961 There are mainly two reasons:
23964 \begin_layout Enumerate
23965 Relative and absolute file names should remain relative or absolute, respectivel
23967 Users may have reasons to prefer either form.
23968 Relative names are useful for portable documents that should work on different
23969 machines, for example.
23970 Absolute names may be required by some programs.
23973 \begin_layout Enumerate
23975 treats relative file names differently than \SpecialChar LyX
23976 and other programs in nested
23978 For \SpecialChar LyX
23979 , a relative file name is always relative to the document that contains
23981 For \SpecialChar LaTeX
23982 , it is always relative to the master document.
23983 These two definitions are identical if you have only one document, but
23984 differ if you have a master document that includes part documents.
23985 That means that relative filenames must be transformed when presented to
23988 Fortunately \SpecialChar LyX
23989 does this automatically for you if you choose the right macros.
23992 \begin_layout Standard
23993 So which path macro should be used in new template definitions? The rule
23997 \begin_layout Itemize
23999 \begin_inset Flex Code
24002 \begin_layout Plain Layout
24008 if an absolute path is required.
24011 \begin_layout Itemize
24013 \begin_inset Flex Code
24016 \begin_layout Plain Layout
24017 $$AbsOrRelPathMaster
24022 if the substituted string is some kind of \SpecialChar LaTeX
24026 \begin_layout Itemize
24028 \begin_inset Flex Code
24031 \begin_layout Plain Layout
24032 $$AbsOrRelPathParent
24037 in order to preserve the user's choice.
24040 \begin_layout Standard
24041 There are special cases where this rule does not work and e.
24042 \begin_inset space \thinspace{}
24046 \begin_inset space \space{}
24049 relative names are needed, but normally it will work just fine.
24050 One example for such a case is the command
24051 \begin_inset Flex Code
24054 \begin_layout Plain Layout
24055 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24060 in the XFig template above: We can't use the absolute name because the
24062 \begin_inset Flex Code
24065 \begin_layout Plain Layout
24071 files needs the relative name in order to rewrite the file content.
24074 \begin_layout Section
24075 Security discussion
24076 \begin_inset CommandInset label
24078 name "sec:Security-discussion"
24085 \begin_layout Standard
24086 The external material feature interfaces with a lot of external programs
24087 and does so automatically, so we have to consider the security implications
24089 In particular, since you have the option of including your own filenames
24090 and/or parameter strings and those are expanded into a command, it seems
24091 that it would be possible to create a malicious document which executes
24092 arbitrary commands when a user views or prints the document.
24093 This is something we definitely want to avoid.
24096 \begin_layout Standard
24097 However, since the external program commands are specified in the template
24098 configuration file only, there are no security issues if \SpecialChar LyX
24099 is properly configure
24100 d with safe templates only.
24101 This is so because the external programs are invoked with the
24102 \begin_inset Flex Code
24105 \begin_layout Plain Layout
24111 -system call rather than the
24112 \begin_inset Flex Code
24115 \begin_layout Plain Layout
24121 system-call, so it's not possible to execute arbitrary commands from the
24122 filename or parameter section via the shell.
24125 \begin_layout Standard
24126 This also implies that you are restricted in what command strings you can
24127 use in the external material templates.
24128 In particular, pipes and redirection are not readily available.
24129 This has to be so if \SpecialChar LyX
24130 should remain safe.
24131 If you want to use some of the shell features, you should write a safe
24132 script to do this in a controlled manner, and then invoke the script from
24133 the command string.
24137 \begin_layout Standard
24138 It is possible to design a template that interacts directly with the shell,
24139 but since this would allow a malicious user to execute arbitrary commands
24140 by writing clever filenames and/or parameters, we generally recommend that
24141 you only use safe scripts that work with the
24142 \begin_inset Flex Code
24145 \begin_layout Plain Layout
24151 system call in a controlled manner.
24152 Of course, for use in a controlled environment, it can be tempting to just
24153 fall back to use ordinary shell scripts.
24154 If you do so, be aware that you
24158 provide an easily exploitable security hole in your system.
24159 Of course it stands to reason that such unsafe templates will never be
24160 included in the standard \SpecialChar LyX
24161 distribution, although we do encourage people
24162 to submit new templates in the open source tradition.
24163 But \SpecialChar LyX
24164 as shipped from the official distribution channels will never have
24168 \begin_layout Standard
24169 Including external material provides a lot of power, and you have to be
24170 careful not to introduce security hazards with this power.
24171 A subtle error in a single line in an innocent looking script can open
24172 the door to huge security problems.
24173 So if you do not fully understand the issues, we recommend that you consult
24174 a knowledgeable security professional or the \SpecialChar LyX
24175 development team if you have
24176 any questions about whether a given template is safe or not.
24177 And do this before you use it in an uncontrolled environment.
24180 \begin_layout Chapter
24182 List of supported \SpecialChar LyX
24183 functions to be used in layouts
24184 \begin_inset CommandInset label
24186 name "chap:List-of-functions"
24193 \begin_layout Standard
24195 \begin_inset Tabular
24196 <lyxtabular version="3" rows="11" columns="8">
24197 <features tabularvalignment="middle">
24198 <column alignment="left" valignment="top">
24199 <column alignment="left" valignment="top">
24200 <column alignment="left" valignment="top">
24201 <column alignment="left" valignment="top">
24202 <column alignment="left" valignment="top">
24203 <column alignment="left" valignment="top">
24204 <column alignment="left" valignment="top">
24205 <column alignment="left" valignment="top">
24207 <cell alignment="left" valignment="top" usebox="none">
24210 \begin_layout Plain Layout
24216 <cell alignment="left" valignment="top" usebox="none">
24219 \begin_layout Plain Layout
24225 <cell alignment="left" valignment="top" usebox="none">
24228 \begin_layout Plain Layout
24234 <cell alignment="left" valignment="top" usebox="none">
24237 \begin_layout Plain Layout
24243 <cell alignment="center" valignment="top" usebox="none">
24246 \begin_layout Plain Layout
24252 <cell alignment="center" valignment="top" usebox="none">
24255 \begin_layout Plain Layout
24261 <cell alignment="center" valignment="top" usebox="none">
24264 \begin_layout Plain Layout
24270 <cell alignment="center" valignment="top" usebox="none">
24273 \begin_layout Plain Layout
24281 <cell alignment="left" valignment="top" usebox="none">
24284 \begin_layout Plain Layout
24290 <cell alignment="left" valignment="top" usebox="none">
24293 \begin_layout Plain Layout
24299 <cell alignment="left" valignment="top" usebox="none">
24302 \begin_layout Plain Layout
24308 <cell alignment="left" valignment="top" usebox="none">
24311 \begin_layout Plain Layout
24317 <cell alignment="center" valignment="top" usebox="none">
24320 \begin_layout Plain Layout
24326 <cell alignment="center" valignment="top" usebox="none">
24329 \begin_layout Plain Layout
24335 <cell alignment="center" valignment="top" usebox="none">
24338 \begin_layout Plain Layout
24344 <cell alignment="center" valignment="top" usebox="none">
24347 \begin_layout Plain Layout
24355 <cell alignment="left" valignment="top" usebox="none">
24358 \begin_layout Plain Layout
24364 <cell alignment="left" valignment="top" usebox="none">
24367 \begin_layout Plain Layout
24373 <cell alignment="left" valignment="top" usebox="none">
24376 \begin_layout Plain Layout
24382 <cell alignment="left" valignment="top" usebox="none">
24385 \begin_layout Plain Layout
24391 <cell alignment="center" valignment="top" usebox="none">
24394 \begin_layout Plain Layout
24400 <cell alignment="center" valignment="top" usebox="none">
24403 \begin_layout Plain Layout
24409 <cell alignment="center" valignment="top" usebox="none">
24412 \begin_layout Plain Layout
24418 <cell alignment="center" valignment="top" usebox="none">
24421 \begin_layout Plain Layout
24429 <cell alignment="left" valignment="top" usebox="none">
24432 \begin_layout Plain Layout
24438 <cell alignment="left" valignment="top" usebox="none">
24441 \begin_layout Plain Layout
24447 <cell alignment="left" valignment="top" usebox="none">
24450 \begin_layout Plain Layout
24456 <cell alignment="left" valignment="top" usebox="none">
24459 \begin_layout Plain Layout
24465 <cell alignment="center" valignment="top" usebox="none">
24468 \begin_layout Plain Layout
24474 <cell alignment="center" valignment="top" usebox="none">
24477 \begin_layout Plain Layout
24483 <cell alignment="center" valignment="top" usebox="none">
24486 \begin_layout Plain Layout
24492 <cell alignment="center" valignment="top" usebox="none">
24495 \begin_layout Plain Layout
24503 <cell alignment="left" valignment="top" usebox="none">
24506 \begin_layout Plain Layout
24512 <cell alignment="left" valignment="top" usebox="none">
24515 \begin_layout Plain Layout
24521 <cell alignment="left" valignment="top" usebox="none">
24524 \begin_layout Plain Layout
24530 <cell alignment="left" valignment="top" usebox="none">
24533 \begin_layout Plain Layout
24539 <cell alignment="center" valignment="top" usebox="none">
24542 \begin_layout Plain Layout
24548 <cell alignment="center" valignment="top" usebox="none">
24551 \begin_layout Plain Layout
24557 <cell alignment="center" valignment="top" usebox="none">
24560 \begin_layout Plain Layout
24566 <cell alignment="center" valignment="top" usebox="none">
24569 \begin_layout Plain Layout
24577 <cell alignment="left" valignment="top" usebox="none">
24580 \begin_layout Plain Layout
24586 <cell alignment="left" valignment="top" usebox="none">
24589 \begin_layout Plain Layout
24595 <cell alignment="left" valignment="top" usebox="none">
24598 \begin_layout Plain Layout
24604 <cell alignment="left" valignment="top" usebox="none">
24607 \begin_layout Plain Layout
24613 <cell alignment="center" valignment="top" usebox="none">
24616 \begin_layout Plain Layout
24622 <cell alignment="center" valignment="top" usebox="none">
24625 \begin_layout Plain Layout
24631 <cell alignment="center" valignment="top" usebox="none">
24634 \begin_layout Plain Layout
24640 <cell alignment="center" valignment="top" usebox="none">
24643 \begin_layout Plain Layout
24651 <cell alignment="left" valignment="top" usebox="none">
24654 \begin_layout Plain Layout
24660 <cell alignment="left" valignment="top" usebox="none">
24663 \begin_layout Plain Layout
24669 <cell alignment="left" valignment="top" usebox="none">
24672 \begin_layout Plain Layout
24678 <cell alignment="left" valignment="top" usebox="none">
24681 \begin_layout Plain Layout
24687 <cell alignment="center" valignment="top" usebox="none">
24690 \begin_layout Plain Layout
24696 <cell alignment="center" valignment="top" usebox="none">
24699 \begin_layout Plain Layout
24705 <cell alignment="center" valignment="top" usebox="none">
24708 \begin_layout Plain Layout
24714 <cell alignment="center" valignment="top" usebox="none">
24717 \begin_layout Plain Layout
24725 <cell alignment="left" valignment="top" usebox="none">
24728 \begin_layout Plain Layout
24734 <cell alignment="left" valignment="top" usebox="none">
24737 \begin_layout Plain Layout
24743 <cell alignment="left" valignment="top" usebox="none">
24746 \begin_layout Plain Layout
24752 <cell alignment="left" valignment="top" usebox="none">
24755 \begin_layout Plain Layout
24761 <cell alignment="center" valignment="top" usebox="none">
24764 \begin_layout Plain Layout
24770 <cell alignment="center" valignment="top" usebox="none">
24773 \begin_layout Plain Layout
24779 <cell alignment="center" valignment="top" usebox="none">
24782 \begin_layout Plain Layout
24788 <cell alignment="center" valignment="top" usebox="none">
24791 \begin_layout Plain Layout
24799 <cell alignment="left" valignment="top" usebox="none">
24802 \begin_layout Plain Layout
24808 <cell alignment="left" valignment="top" usebox="none">
24811 \begin_layout Plain Layout
24817 <cell alignment="left" valignment="top" usebox="none">
24820 \begin_layout Plain Layout
24826 <cell alignment="left" valignment="top" usebox="none">
24829 \begin_layout Plain Layout
24835 <cell alignment="center" valignment="top" usebox="none">
24838 \begin_layout Plain Layout
24844 <cell alignment="center" valignment="top" usebox="none">
24847 \begin_layout Plain Layout
24853 <cell alignment="center" valignment="top" usebox="none">
24856 \begin_layout Plain Layout
24862 <cell alignment="center" valignment="top" usebox="none">
24865 \begin_layout Plain Layout
24873 <cell alignment="left" valignment="top" usebox="none">
24876 \begin_layout Plain Layout
24882 <cell alignment="left" valignment="top" usebox="none">
24885 \begin_layout Plain Layout
24891 <cell alignment="left" valignment="top" usebox="none">
24894 \begin_layout Plain Layout
24900 <cell alignment="left" valignment="top" usebox="none">
24903 \begin_layout Plain Layout
24909 <cell alignment="center" valignment="top" usebox="none">
24912 \begin_layout Plain Layout
24918 <cell alignment="center" valignment="top" usebox="none">
24921 \begin_layout Plain Layout
24927 <cell alignment="center" valignment="top" usebox="none">
24930 \begin_layout Plain Layout
24936 <cell alignment="center" valignment="top" usebox="none">
24939 \begin_layout Plain Layout
24947 <cell alignment="center" valignment="top" usebox="none">
24950 \begin_layout Plain Layout
24956 <cell alignment="center" valignment="top" usebox="none">
24959 \begin_layout Plain Layout
24965 <cell alignment="center" valignment="top" usebox="none">
24968 \begin_layout Plain Layout
24974 <cell alignment="center" valignment="top" usebox="none">
24977 \begin_layout Plain Layout
24983 <cell alignment="center" valignment="top" usebox="none">
24986 \begin_layout Plain Layout
24992 <cell alignment="center" valignment="top" usebox="none">
24995 \begin_layout Plain Layout
25001 <cell alignment="center" valignment="top" usebox="none">
25004 \begin_layout Plain Layout
25010 <cell alignment="center" valignment="top" usebox="none">
25013 \begin_layout Plain Layout
25027 \begin_layout Chapter
25028 Names of available colors to be used in layouts
25029 \begin_inset CommandInset label
25031 name "chap:Names-of-colors"
25038 \begin_layout Standard
25039 The colors listed here are the standard colors and the those that you can
25040 adjust in the \SpecialChar LyX
25044 \begin_layout Description
25057 No particular color – clear or default
25060 \begin_layout Description
25064 \begin_layout Description
25068 \begin_layout Description
25072 \begin_layout Description
25076 \begin_layout Description
25080 \begin_layout Description
25084 \begin_layout Description
25088 \begin_layout Description
25092 \begin_layout Description
25093 added_space Added space marker color
25096 \begin_layout Description
25097 addedtext Added text color
25100 \begin_layout Description
25101 appendix Appendix marker color
25104 \begin_layout Description
25105 background Background color
25108 \begin_layout Description
25109 bottomarea Bottom area color
25112 \begin_layout Description
25113 branchlabel Label color for branches
25116 \begin_layout Description
25117 buttonbg Color used for bottom background
25120 \begin_layout Description
25121 buttonhoverbg Color used for button background under focus
25124 \begin_layout Description
25125 buttonframe Color for inset button frames
25128 \begin_layout Description
25129 changebar Changebar color
25132 \begin_layout Description
25133 changedtextauthor1 Changed text color author 1
25136 \begin_layout Description
25137 changedtextauthor2 Changed text color author 2
25140 \begin_layout Description
25141 changedtextauthor3 Changed text color author 3
25144 \begin_layout Description
25145 changedtextauthor4 Changed text color author 4
25148 \begin_layout Description
25149 changedtextauthor5 Changed text color author 5
25152 \begin_layout Description
25153 collapsable_inset_frame Collapsable insets framecolor
25156 \begin_layout Description
25157 collapsable_inset_text Collapsable insets text color
25160 \begin_layout Description
25161 command Text color for command insets
25164 \begin_layout Description
25165 commandbg Background color for command insets
25168 \begin_layout Description
25169 commandframe Frame color for command insets
25172 \begin_layout Description
25173 comment color for comments
25176 \begin_layout Description
25177 commentbg Background color of comments
25180 \begin_layout Description
25181 cursor Cursor color
25184 \begin_layout Description
25185 deletedtext Deleted text color
25188 \begin_layout Description
25189 deletedtextmodifier Deleted text modifying color
25192 \begin_layout Description
25193 depthbar Color for the depth bars in the margin
25196 \begin_layout Description
25197 eolmarker End of line marker color
25200 \begin_layout Description
25201 error Color of the \SpecialChar LaTeX
25205 \begin_layout Description
25206 footlabel Label color for footnotes
25209 \begin_layout Description
25210 graphicsbg Graphics inset background color
25213 \begin_layout Description
25214 greyedout Label color for greyedout insets
25217 \begin_layout Description
25218 greyedoutbg Background color of greyedout inset
25221 \begin_layout Description
25222 greyedouttext Color for greyedout inset text
25225 \begin_layout Description
25226 indexlabel Label color for index insets
25229 \begin_layout Description
25230 ignore The color is ignored
25233 \begin_layout Description
25234 inherit The color is inherited
25237 \begin_layout Description
25238 inlinecompletion Inline completion color
25241 \begin_layout Description
25242 insetbg Inset marker background color
25245 \begin_layout Description
25246 insetframe Inset marker frame color
25249 \begin_layout Description
25250 language Color for marking foreign language words
25253 \begin_layout Description
25254 latex Text color in \SpecialChar LaTeX
25258 \begin_layout Description
25259 listingsbg Background color of listings inset
25262 \begin_layout Description
25263 marginlabel Label color for margin notes
25266 \begin_layout Description
25267 math Math inset text color
25270 \begin_layout Description
25271 mathbg Math inset background color
25274 \begin_layout Description
25275 mathcorners Math inset frame color not under focus
25278 \begin_layout Description
25279 mathframe Math inset frame color under focus
25282 \begin_layout Description
25283 mathline Math line color
25286 \begin_layout Description
25287 mathmacrobg Macro math inset background color
25290 \begin_layout Description
25291 mathmacroblend Macro math blended color
25294 \begin_layout Description
25295 mathmacroframe Macro math frame color
25298 \begin_layout Description
25299 mathmacrohoverbg Macro math inset background color hovered
25302 \begin_layout Description
25303 mathmacrolabel Macro math label color
25306 \begin_layout Description
25307 mathmacronewarg Macro template color for new parameters
25310 \begin_layout Description
25311 mathmacrooldarg Macro template color for old parameters
25314 \begin_layout Description
25315 newpage New page color
25318 \begin_layout Description
25319 nonunique_inlinecompletion Inline completion color for the non-unique part
25322 \begin_layout Description
25323 notebg Background color of notes
25326 \begin_layout Description
25327 notelabel Label color for notes
25330 \begin_layout Description
25331 pagebreak Page break/line break color
25334 \begin_layout Description
25335 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25338 \begin_layout Description
25339 phantomtext Text color for phantom insets
25342 \begin_layout Description
25343 preview The color used for previews
25346 \begin_layout Description
25347 previewframe Preview frame color
25350 \begin_layout Description
25351 regexpframe Color for regexp frame
25354 \begin_layout Description
25355 selection Background color of selected text
25358 \begin_layout Description
25359 selectiontext Foreground color of selected text
25362 \begin_layout Description
25363 shadedbg Background color of shaded box
25366 \begin_layout Description
25367 special Special chars text color
25370 \begin_layout Description
25371 tabularline Table line color
25374 \begin_layout Description
25375 tabularonoffline Table line color
25378 \begin_layout Description
25379 urllabel Label color for URL insets
25382 \begin_layout Description
25383 urltext Color for URL inset text