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.
11394 \change_inserted -712698321 1431070519
11398 \begin_layout Itemize
11400 \change_inserted -712698321 1431070588
11403 \begin_inset Flex Code
11406 \begin_layout Plain Layout
11408 \change_inserted -712698321 1431070522
11417 \begin_inset Flex Code
11420 \begin_layout Plain Layout
11422 \change_inserted -712698321 1431070522
11423 string of characters
11432 Defines individual characters that should be output in raw form, meaning
11433 without special translations that \SpecialChar LaTeX
11435 Note that, contrary to PassThru, this needs to be explicitly defined for
11437 That is, arguments do not inherit PassThruChars from their parent inset
11443 \begin_layout Standard
11444 By default, the text entered in the \SpecialChar LyX
11445 workarea in the respective layout is
11446 the last (mandatory) argument of a command if the
11447 \begin_inset Flex Code
11450 \begin_layout Plain Layout
11457 \begin_inset Flex Code
11460 \begin_layout Plain Layout
11467 However, arguments with the prefix
11468 \begin_inset Flex Code
11471 \begin_layout Plain Layout
11477 are output after this workarea argument.
11478 Note that post-argument numbering restarts at 1, so the first argument
11479 following the workarea argument is
11480 \begin_inset Flex Code
11483 \begin_layout Plain Layout
11490 Post-arguments are ignored in any other
11491 \begin_inset Flex Code
11494 \begin_layout Plain Layout
11501 \begin_inset Flex Code
11504 \begin_layout Plain Layout
11513 \begin_layout Standard
11515 \begin_inset Flex Code
11518 \begin_layout Plain Layout
11527 \begin_inset Flex Code
11530 \begin_layout Plain Layout
11539 \begin_inset Flex Code
11542 \begin_layout Plain Layout
11548 followed by the number (e.
11549 \begin_inset space \thinspace{}
11553 \begin_inset space \space{}
11557 \begin_inset Flex Code
11560 \begin_layout Plain Layout
11570 \begin_layout Description
11571 \begin_inset Flex Code
11574 \begin_layout Plain Layout
11580 Note that this will completely override any prior
11581 \begin_inset Flex Code
11584 \begin_layout Plain Layout
11590 declaration for this style.
11592 \begin_inset Quotes eld
11596 \begin_inset Flex Code
11599 \begin_layout Plain Layout
11606 \begin_inset Quotes erd
11611 \begin_inset CommandInset ref
11613 reference "sub:I18n"
11617 for details on its use.
11620 \begin_layout Description
11621 \begin_inset Flex Code
11624 \begin_layout Plain Layout
11631 \begin_inset Flex Code
11634 \begin_layout Plain Layout
11644 \begin_layout Plain Layout
11645 Note that a `float' here is a real number, such as: 1.5.
11650 The vertical space with which the last of a chain of paragraphs with this
11651 style is separated from the following paragraph.
11652 If the next paragraph has another style, the separations are not simply
11653 added, but the maximum is taken.
11656 \begin_layout Description
11657 \begin_inset Flex Code
11660 \begin_layout Plain Layout
11667 \begin_inset Flex Code
11670 \begin_layout Plain Layout
11676 ] The category for this style.
11677 This is used to group related styles in the style combobox on the toolbar.
11678 Any string can be used, but you may want to use existing categories with
11683 \begin_layout Description
11684 \begin_inset Flex Code
11687 \begin_layout Plain Layout
11693 Depth of XML command.
11694 Used only with XML-type formats.
11697 \begin_layout Description
11698 \begin_inset Flex Code
11701 \begin_layout Plain Layout
11708 \begin_inset Flex Code
11711 \begin_layout Plain Layout
11717 ] Copies all the features of an existing style into the current one.
11721 \begin_layout Description
11722 \begin_inset Flex Code
11725 \begin_layout Plain Layout
11732 \begin_inset Flex Code
11735 \begin_layout Plain Layout
11741 ] The name of a style whose preamble should be output
11746 This allows to ensure some ordering of the preamble snippets when macros
11747 definitions depend on one another.
11751 \begin_layout Plain Layout
11752 Note that, besides that functionality, there is no way to ensure any ordering
11754 The ordering that you see in a given version of \SpecialChar LyX
11755 may change without warning
11764 \begin_layout Description
11765 \begin_inset Flex Code
11768 \begin_layout Plain Layout
11775 \begin_inset Flex Code
11778 \begin_layout Plain Layout
11783 , Box, Filled_Box, Static
11788 ] The type of label that stands at the end of the paragraph (or sequence
11790 \begin_inset Flex Code
11793 \begin_layout Plain Layout
11800 \begin_inset Newline newline
11804 \begin_inset Flex Code
11807 \begin_layout Plain Layout
11814 \begin_inset Flex Code
11817 \begin_layout Plain Layout
11824 \begin_inset Flex Code
11827 \begin_layout Plain Layout
11835 \begin_inset Flex Code
11838 \begin_layout Plain Layout
11845 \begin_inset Quotes eld
11849 \begin_inset Quotes erd
11853 \begin_inset Flex Code
11856 \begin_layout Plain Layout
11863 \begin_inset space \space{}
11867 \begin_inset Flex Code
11870 \begin_layout Plain Layout
11876 ) is a white (resp.
11877 \begin_inset space ~
11880 black) square suitable for end of proof markers,
11881 \begin_inset Flex Code
11884 \begin_layout Plain Layout
11890 is an explicit text string.
11893 \begin_layout Description
11894 \begin_inset Flex Code
11897 \begin_layout Plain Layout
11904 \begin_inset Flex Code
11907 \begin_layout Plain Layout
11913 ] The string used for a label with a
11914 \begin_inset Flex Code
11917 \begin_layout Plain Layout
11924 \begin_inset Newline newline
11928 \begin_inset Flex Code
11931 \begin_layout Plain Layout
11941 \begin_layout Description
11942 \begin_inset Flex Code
11945 \begin_layout Plain Layout
11951 The font used for both the text body
11957 \begin_inset CommandInset ref
11959 reference "sub:Font-description"
11964 Note that defining this font automatically defines the
11965 \begin_inset Flex Code
11968 \begin_layout Plain Layout
11975 So you should define this one first if you also want to define
11976 \begin_inset Flex Code
11979 \begin_layout Plain Layout
11988 \begin_layout Description
11989 \begin_inset Flex Code
11992 \begin_layout Plain Layout
11999 \begin_inset Flex Code
12002 \begin_layout Plain Layout
12008 ] Used for backporting new styles to stable \SpecialChar LyX
12010 The first stable version that supports this tag is \SpecialChar LyX
12012 The argument is a number which may either be 0, -1 or any value greater
12015 \begin_inset Flex Code
12018 \begin_layout Plain Layout
12024 flag of a style is greater than zero, it will always be written to the
12026 If a .lyx file is read, the style definitions from the document header are
12027 added to the document class.
12028 Therefore even older \SpecialChar LyX
12029 versions can handle the style.
12031 \begin_inset Flex Code
12034 \begin_layout Plain Layout
12040 is a version number: If the style is read, and the version number is less
12041 than the version number of the already existing style in the document class,
12042 the new style is ignored.
12043 If the version number is greater, the new style replaces the existing style.
12044 A value of -1 means an infinite version number, i.
12045 \begin_inset space \thinspace{}
12049 \begin_inset space \space{}
12052 the style is always used.
12055 \begin_layout Description
12056 \begin_inset Flex Code
12059 \begin_layout Plain Layout
12066 \begin_inset Flex Code
12069 \begin_layout Plain Layout
12078 \begin_inset space \thinspace{}
12082 \begin_inset Flex Code
12085 \begin_layout Plain Layout
12091 ] Usually \SpecialChar LyX
12092 does not allow you to insert more than one space between words,
12093 since a space is considered as the separation between two words, not a
12094 character or symbol of its own.
12095 This is a very fine thing but sometimes annoying, for example, when typing
12096 program code or plain \SpecialChar LaTeX
12099 \begin_inset Flex Code
12102 \begin_layout Plain Layout
12109 Note that \SpecialChar LyX
12110 will create protected blanks for the additional blanks when
12111 in another mode than \SpecialChar LaTeX
12115 \begin_layout Description
12116 \begin_inset Flex Code
12119 \begin_layout Plain Layout
12125 These tags are used with XHTML output.
12127 \begin_inset CommandInset ref
12129 reference "sub:Paragraph-Style-XHTML"
12136 \begin_layout Description
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12146 [FIXME] (Used only with XML-type formats.)
12149 \begin_layout Description
12150 \begin_inset Flex Code
12153 \begin_layout Plain Layout
12160 \begin_inset Flex Code
12163 \begin_layout Plain Layout
12172 \begin_inset space \thinspace{}
12176 \begin_inset Flex Code
12179 \begin_layout Plain Layout
12186 \begin_inset Flex Code
12189 \begin_layout Plain Layout
12195 , marks the style as to be included in the document preamble and not in
12197 This is useful for document classes that want such information as the title
12198 and author to appear in the preamble.
12199 Note that this works only for styles for which the
12200 \begin_inset Flex Code
12203 \begin_layout Plain Layout
12210 \begin_inset Flex Code
12213 \begin_layout Plain Layout
12220 \begin_inset Flex Code
12223 \begin_layout Plain Layout
12232 \begin_layout Description
12233 \begin_inset Flex Code
12236 \begin_layout Plain Layout
12243 \begin_inset Flex Code
12246 \begin_layout Plain Layout
12255 \begin_inset space \thinspace{}
12259 \begin_inset Flex Code
12262 \begin_layout Plain Layout
12269 \begin_inset Flex Code
12272 \begin_layout Plain Layout
12278 , marks the style as being part of a title block (see also the
12279 \begin_inset Flex Code
12282 \begin_layout Plain Layout
12289 \begin_inset Flex Code
12292 \begin_layout Plain Layout
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 ] The \SpecialChar LaTeX
12322 command sequence declaring an item in a list.
12323 The command is to be defined without the preceding backslash (the default
12325 \begin_inset Quotes eld
12329 \begin_inset Quotes erd
12333 \begin_inset Flex Code
12336 \begin_layout Plain Layout
12344 in the \SpecialChar LaTeX
12348 \begin_layout Description
12349 \begin_inset Flex Code
12352 \begin_layout Plain Layout
12359 \begin_inset Flex Code
12362 \begin_layout Plain Layout
12368 ] This provides extra space between paragraphs that have the same style.
12369 If you put other styles into an environment, each is separated with the
12371 \begin_inset Flex Code
12374 \begin_layout Plain Layout
12381 But the whole items of the environment are additionally separated with
12383 \begin_inset Flex Code
12386 \begin_layout Plain Layout
12393 Note that this is a
12398 \begin_layout Description
12399 \begin_inset Flex Code
12402 \begin_layout Plain Layout
12408 [FIXME] (Used only with XML-type formats.)
12411 \begin_layout Description
12412 \begin_inset Flex Code
12415 \begin_layout Plain Layout
12422 \begin_inset Flex Code
12425 \begin_layout Plain Layout
12434 \begin_inset space \thinspace{}
12438 \begin_inset Flex Code
12441 \begin_layout Plain Layout
12447 ] Usually \SpecialChar LyX
12448 does not allow you to leave a paragraph empty, since it would
12449 lead to empty \SpecialChar LaTeX
12451 There are some cases where this could be desirable however: in a letter
12452 template, the required fields can be provided as empty fields, so that
12453 people do not forget them; in some special classes, a style can be used
12454 as some kind of break, which does not contain actual text.
12457 \begin_layout Description
12458 \begin_inset Flex Code
12461 \begin_layout Plain Layout
12468 \begin_inset Flex Code
12471 \begin_layout Plain Layout
12477 ] The vertical space between the label and the text body.
12478 Only used for labels that are above the text body (
12479 \begin_inset Flex Code
12482 \begin_layout Plain Layout
12489 \begin_inset Newline newline
12493 \begin_inset Flex Code
12496 \begin_layout Plain Layout
12497 Centered_Top_Environment
12505 \begin_layout Description
12506 \begin_inset Flex Code
12509 \begin_layout Plain Layout
12516 \begin_inset Flex Code
12519 \begin_layout Plain Layout
12525 ] The name of the counter for automatic numbering.
12526 In order to have the counter appear with your label, you will need to reference
12528 \begin_inset Flex Code
12531 \begin_layout Plain Layout
12540 This will work with
12541 \begin_inset Flex Code
12544 \begin_layout Plain Layout
12551 \begin_inset Flex Code
12554 \begin_layout Plain Layout
12561 \begin_inset Flex Code
12564 \begin_layout Plain Layout
12571 \begin_inset Flex Code
12574 \begin_layout Plain Layout
12581 \begin_inset Newline newline
12589 \begin_inset Flex Code
12592 \begin_layout Plain Layout
12599 \begin_inset Flex Code
12602 \begin_layout Plain Layout
12608 , though this case is a bit complicated.
12609 Suppose you declare
12610 \begin_inset Quotes eld
12614 \begin_inset Flex Code
12617 \begin_layout Plain Layout
12618 LabelCounter myenum
12624 \begin_inset Quotes erd
12628 Then the actual counters used are
12629 \begin_inset Flex Code
12632 \begin_layout Plain Layout
12639 \begin_inset Flex Code
12642 \begin_layout Plain Layout
12649 \begin_inset Flex Code
12652 \begin_layout Plain Layout
12659 \begin_inset Flex Code
12662 \begin_layout Plain Layout
12668 , much as in \SpecialChar LaTeX
12670 These counters must all be declared separately.
12671 \begin_inset Newline newline
12675 \begin_inset CommandInset ref
12677 reference "sub:Counters"
12681 for details on counters.
12684 \begin_layout Description
12685 \begin_inset Flex Code
12688 \begin_layout Plain Layout
12694 The font used for the label.
12696 \begin_inset CommandInset ref
12698 reference "sub:Font-description"
12705 \begin_layout Description
12706 \begin_inset Flex Code
12709 \begin_layout Plain Layout
12716 \begin_inset Flex Code
12719 \begin_layout Plain Layout
12725 ] Text that indicates how far a label should be indented.
12728 \begin_layout Description
12729 \begin_inset Flex Code
12732 \begin_layout Plain Layout
12739 \begin_inset Flex Code
12742 \begin_layout Plain Layout
12748 ] Text that indicates the amount of horizontal space between the label and
12750 Only used for labels that are not above the text body.
12753 \begin_layout Description
12754 \begin_inset Flex Code
12757 \begin_layout Plain Layout
12764 \begin_inset Flex Code
12767 \begin_layout Plain Layout
12773 ] The string used for the label.
12775 \begin_inset Flex Code
12778 \begin_layout Plain Layout
12784 is set, this string can be contain the special formatting commands described
12786 \begin_inset CommandInset ref
12788 reference "sub:Counters"
12795 \begin_layout Description
12796 \begin_inset Flex Code
12799 \begin_layout Plain Layout
12800 LabelStringAppendix
12806 \begin_inset Flex Code
12809 \begin_layout Plain Layout
12815 ] This is used inside the appendix instead of
12816 \begin_inset Newline newline
12820 \begin_inset Flex Code
12823 \begin_layout Plain Layout
12831 \begin_inset Flex Code
12834 \begin_layout Plain Layout
12841 \begin_inset Newline newline
12845 \begin_inset Flex Code
12848 \begin_layout Plain Layout
12849 LabelStringAppendix
12857 \begin_layout Description
12858 \begin_inset Flex Code
12861 \begin_layout Plain Layout
12867 [FIXME] (Used only with XML-type formats.)
12870 \begin_layout Description
12871 \begin_inset Flex Code
12874 \begin_layout Plain Layout
12881 \begin_inset Flex Code
12884 \begin_layout Plain Layout
12889 , Manual, Static, Above,
12890 \begin_inset Newline newline
12893 Centered, Sensitive, Enumerate,
12894 \begin_inset Newline newline
12897 Itemize, Bibliography
12903 \begin_inset Separator parbreak
12910 \begin_layout Description
12911 \begin_inset Flex Code
12914 \begin_layout Plain Layout
12920 means the label is the very first word (up to the first real blank).
12921 Use protected spaces if you want more than one word as the label.
12925 \begin_layout Description
12926 \begin_inset Flex Code
12929 \begin_layout Plain Layout
12935 means the label is simply what is declared as
12936 \begin_inset Flex Code
12939 \begin_layout Plain Layout
12946 This will be displayed
12947 \begin_inset Quotes eld
12951 \begin_inset Quotes erd
12954 , at the beginning of the paragraph.
12956 \begin_inset Flex Code
12959 \begin_layout Plain Layout
12966 \begin_inset Flex Code
12969 \begin_layout Plain Layout
12975 , then it will be displayed only in the first paragraph of any sequence
12976 of paragraphs with the same
12977 \begin_inset Flex Code
12980 \begin_layout Plain Layout
12989 \begin_layout Description
12990 \begin_inset Flex Code
12993 \begin_layout Plain Layout
13000 \begin_inset space ~
13004 \begin_inset space ~
13008 \begin_inset Flex Code
13011 \begin_layout Plain Layout
13017 are special cases of
13018 \begin_inset Flex Code
13021 \begin_layout Plain Layout
13028 The label will be printed above the paragraph either at the beginning of
13029 the line or centered.
13032 \begin_layout Description
13033 \begin_inset Flex Code
13036 \begin_layout Plain Layout
13042 is a special case for the caption-labels
13043 \begin_inset Quotes eld
13047 \begin_inset Quotes erd
13051 \begin_inset Quotes eld
13055 \begin_inset Quotes erd
13059 \begin_inset Newline newline
13063 \begin_inset Flex Code
13066 \begin_layout Plain Layout
13072 means the (hardcoded) label string depends on the kind of float: It is
13073 hardcoded to be `FloatType N', where N is the value of the counter associated
13075 For the case that a caption is inserted outside of a float the
13076 \begin_inset Flex Code
13079 \begin_layout Plain Layout
13086 \begin_inset Quotes eld
13090 \begin_inset Quotes erd
13096 \begin_layout Description
13097 \begin_inset Flex Code
13100 \begin_layout Plain Layout
13106 produces the usual sort of enumeration labels.
13107 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13108 small Roman numerals, and uppercase letters for the four possible depths.
13111 \begin_layout Description
13112 \begin_inset Flex Code
13115 \begin_layout Plain Layout
13121 produces various bullets at the different levels.
13122 It is also hardcoded.
13125 \begin_layout Description
13126 \begin_inset Flex Code
13129 \begin_layout Plain Layout
13135 should be used only with
13136 \begin_inset Flex Code
13139 \begin_layout Plain Layout
13140 LatexType BibEnvironment
13149 \begin_layout Description
13150 \begin_inset Flex Code
13153 \begin_layout Plain Layout
13159 Note that this will completely override any prior
13160 \begin_inset Flex Code
13163 \begin_layout Plain Layout
13169 declaration for this style.
13171 \begin_inset Quotes eld
13175 \begin_inset Flex Code
13178 \begin_layout Plain Layout
13185 \begin_inset Quotes erd
13190 \begin_inset CommandInset ref
13192 reference "sub:I18n"
13196 for details on its use.
13199 \begin_layout Description
13200 \begin_inset Flex Code
13203 \begin_layout Plain Layout
13210 \begin_inset Flex Code
13213 \begin_layout Plain Layout
13219 ] The name of the corresponding \SpecialChar LaTeX
13221 Either the environment or command name.
13224 \begin_layout Description
13225 \begin_inset Flex Code
13228 \begin_layout Plain Layout
13235 \begin_inset Flex Code
13238 \begin_layout Plain Layout
13244 ] An optional parameter for the corresponding
13245 \begin_inset Flex Code
13248 \begin_layout Plain Layout
13255 This parameter cannot be changed from within \SpecialChar LyX
13257 \begin_inset Flex Code
13260 \begin_layout Plain Layout
13266 for customizable parameters).
13267 This will be output as is after all \SpecialChar LaTeX
13269 \begin_inset Flex Code
13272 \begin_layout Plain Layout
13281 \begin_layout Description
13282 \begin_inset Flex Code
13285 \begin_layout Plain Layout
13292 \begin_inset Flex Code
13295 \begin_layout Plain Layout
13300 , Command, Environment, Item_Environment,
13301 \begin_inset Newline newline
13304 List_Environment, Bib_Environment
13309 ] How the style should be translated into \SpecialChar LaTeX
13314 \begin_layout Plain Layout
13315 \begin_inset Flex Code
13318 \begin_layout Plain Layout
13324 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13325 Visit the SGML class files for specific examples.
13331 \begin_inset Separator parbreak
13338 \begin_layout Description
13339 \begin_inset Flex Code
13342 \begin_layout Plain Layout
13348 means nothing special.
13351 \begin_layout Description
13352 \begin_inset Flex Code
13355 \begin_layout Plain Layout
13362 \begin_inset Flex Code
13365 \begin_layout Plain Layout
13372 {\SpecialChar ldots
13381 \begin_layout Description
13382 \begin_inset Flex Code
13385 \begin_layout Plain Layout
13392 \begin_inset Flex Code
13395 \begin_layout Plain Layout
13402 }\SpecialChar ldots
13418 \begin_layout Description
13419 \begin_inset Flex Code
13422 \begin_layout Plain Layout
13429 \begin_inset Flex Code
13432 \begin_layout Plain Layout
13439 \begin_inset Flex Code
13442 \begin_layout Plain Layout
13450 is generated for each paragraph of this environment.
13454 \begin_layout Description
13455 \begin_inset Flex Code
13458 \begin_layout Plain Layout
13465 \begin_inset Flex Code
13468 \begin_layout Plain Layout
13475 \begin_inset Newline newline
13479 \begin_inset Flex Code
13482 \begin_layout Plain Layout
13488 is passed as an argument to the environment.
13489 \begin_inset Newline newline
13493 \begin_inset Flex Code
13496 \begin_layout Plain Layout
13502 can be defined in the
13503 \begin_inset Flex MenuItem
13506 \begin_layout Plain Layout
13507 Edit\SpecialChar menuseparator
13509 \begin_inset space ~
13520 \begin_layout Description
13521 \begin_inset Flex Code
13524 \begin_layout Plain Layout
13531 \begin_inset Flex Code
13534 \begin_layout Plain Layout
13540 but adds additionally the necessary mandatory argument (the longest label)
13541 to the begin statement of the bibliography environment:
13542 \begin_inset Newline newline
13546 \begin_inset Flex Code
13549 \begin_layout Plain Layout
13552 begin{thebibliography}{99}
13557 It is therefore only useful for bibliography environments.
13558 The default longest label
13559 \begin_inset Quotes eld
13563 \begin_inset Quotes erd
13566 can be changed by the user in the paragraph settings of a bibliography
13570 \begin_layout Standard
13571 Putting the last few things together, the \SpecialChar LaTeX
13572 output will be either:
13575 \begin_layout LyX-Code
13578 LatexName[LatexParam]{\SpecialChar ldots
13582 \begin_layout Standard
13586 \begin_layout LyX-Code
13589 begin{LatexName}[LatexParam] \SpecialChar ldots
13595 \begin_layout Standard
13596 depending upon the \SpecialChar LaTeX
13601 \begin_layout Description
13602 \begin_inset Flex Code
13605 \begin_layout Plain Layout
13612 \begin_inset Flex Code
13615 \begin_layout Plain Layout
13621 ] A string that is put at the beginning of the style content.
13622 A line break in the output can be indicated by
13623 \begin_inset Flex Code
13626 \begin_layout Plain Layout
13635 \begin_layout Description
13636 \begin_inset Flex Code
13639 \begin_layout Plain Layout
13646 \begin_inset Flex Code
13649 \begin_layout Plain Layout
13655 ] If you put styles into environments, the different
13656 \begin_inset Flex Code
13659 \begin_layout Plain Layout
13665 are not simply added, but added with a factor
13666 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13670 Note that this parameter is also used when
13671 \begin_inset Flex Code
13674 \begin_layout Plain Layout
13681 \begin_inset Flex Code
13684 \begin_layout Plain Layout
13691 \begin_inset Flex Code
13694 \begin_layout Plain Layout
13701 Then it is added to the manual or dynamic margin.
13702 \begin_inset Newline newline
13706 \begin_inset Quotes eld
13710 \begin_inset Flex Code
13713 \begin_layout Plain Layout
13720 \begin_inset Quotes erd
13723 means that the paragraph is indented with the width of
13724 \begin_inset Quotes eld
13728 \begin_inset Flex Code
13731 \begin_layout Plain Layout
13738 \begin_inset Quotes erd
13741 in the normal font.
13742 You can get a negative width by prefixing the string with
13743 \begin_inset Quotes eld
13747 \begin_inset Flex Code
13750 \begin_layout Plain Layout
13757 \begin_inset Quotes erd
13761 This way was chosen so that the look is the same with each used screen
13765 \begin_layout Description
13766 \begin_inset Flex Code
13769 \begin_layout Plain Layout
13776 \begin_inset Flex Code
13779 \begin_layout Plain Layout
13784 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13790 \begin_inset Newline newline
13793 The kind of margin that the style has on the left side.
13794 \begin_inset Separator parbreak
13801 \begin_layout Description
13802 \begin_inset Flex Code
13805 \begin_layout Plain Layout
13811 just means a fixed margin.
13814 \begin_layout Description
13815 \begin_inset Flex Code
13818 \begin_layout Plain Layout
13824 means that the left margin depends on the string entered in the
13825 \begin_inset Flex MenuItem
13828 \begin_layout Plain Layout
13829 Edit\SpecialChar menuseparator
13831 \begin_inset space ~
13840 This is used to typeset nice lists without tabulators.
13843 \begin_layout Description
13844 \begin_inset Flex Code
13847 \begin_layout Plain Layout
13853 means that the margin depends on the size of the label.
13854 This is used for automatic enumerated headlines.
13855 It is obvious that the headline
13856 \begin_inset Quotes eld
13859 5.4.3.2.1 Very long headline
13860 \begin_inset Quotes erd
13863 must have a wider left margin (as wide as
13864 \begin_inset Quotes eld
13868 \begin_inset Quotes erd
13871 plus the space) than
13872 \begin_inset Quotes eld
13875 3.2 Very long headline
13876 \begin_inset Quotes erd
13880 \begin_inset Quotes eld
13884 \begin_inset Quotes erd
13887 are not able to do this.
13890 \begin_layout Description
13891 \begin_inset Flex Code
13894 \begin_layout Plain Layout
13900 is similar, but only the very first row of the paragraph is dynamic, while
13901 the others are static; this is used, for example, for descriptions.
13904 \begin_layout Description
13905 \begin_inset Flex Code
13908 \begin_layout Plain Layout
13914 means the margin is chosen in a way that the longest row of this paragraph
13915 fits to the right margin.
13916 This is used to typeset an address on the right edge of the page.
13920 \begin_layout Description
13921 \begin_inset Flex Code
13924 \begin_layout Plain Layout
13931 \begin_inset Flex Code
13934 \begin_layout Plain Layout
13943 \begin_inset space \thinspace{}
13947 \begin_inset Flex Code
13950 \begin_layout Plain Layout
13956 ] Whether fragile commands in this style should be
13957 \begin_inset Flex Code
13960 \begin_layout Plain Layout
13973 whether this command should itself be protected.)
13976 \begin_layout Description
13977 \begin_inset Flex Code
13980 \begin_layout Plain Layout
13987 \begin_inset Flex Code
13990 \begin_layout Plain Layout
13997 \begin_inset space \thinspace{}
14001 \begin_inset Flex Code
14004 \begin_layout Plain Layout
14012 ] Whether newlines are translated into \SpecialChar LaTeX
14014 \begin_inset Flex Code
14017 \begin_layout Plain Layout
14028 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
14030 inside \SpecialChar LyX
14034 \begin_layout Description
14035 \begin_inset Flex Code
14038 \begin_layout Plain Layout
14045 \begin_inset Flex Code
14048 \begin_layout Plain Layout
14057 \begin_inset space \thinspace{}
14061 \begin_inset Flex Code
14064 \begin_layout Plain Layout
14070 ] If set to true, and if
14071 \begin_inset Flex Code
14074 \begin_layout Plain Layout
14081 \begin_inset Flex Code
14084 \begin_layout Plain Layout
14090 ) paragraphs are being indented, then the indentation of such a paragraph
14091 following one of this type will be suppressed.
14092 (So this will not affect the display of non-default paragraphs.)
14095 \begin_layout Description
14096 \begin_inset Flex Code
14099 \begin_layout Plain Layout
14106 \begin_inset Flex Code
14109 \begin_layout Plain Layout
14115 ] Name of a style that has replaced this style.
14116 This is used to rename a style, while keeping backward compatibility.
14119 \begin_layout Description
14120 \begin_inset Flex Code
14123 \begin_layout Plain Layout
14130 \begin_inset Flex Code
14133 \begin_layout Plain Layout
14142 \begin_inset space \thinspace{}
14146 \begin_inset Flex Code
14149 \begin_layout Plain Layout
14155 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14157 but only by a line break; together with
14158 \begin_inset Flex Code
14161 \begin_layout Plain Layout
14167 , this allows to emulate a plain text editor (like the ERT inset).
14170 \begin_layout Description
14171 \begin_inset Flex Code
14174 \begin_layout Plain Layout
14181 \begin_inset Flex Code
14184 \begin_layout Plain Layout
14190 ] The indent of the very first line of a paragraph.
14192 \begin_inset Newline newline
14196 \begin_inset Flex Code
14199 \begin_layout Plain Layout
14205 will be fixed for a certain style.
14206 The exception is the default style, since the indentation for these paragraphs
14207 can be prohibited with
14208 \begin_inset Flex Code
14211 \begin_layout Plain Layout
14219 \begin_inset Flex Code
14222 \begin_layout Plain Layout
14228 style paragraphs inside environments use the
14229 \begin_inset Flex Code
14232 \begin_layout Plain Layout
14238 of the environment, not their native one.
14240 \begin_inset Flex Code
14243 \begin_layout Plain Layout
14249 paragraphs inside an enumeration are not indented.
14252 \begin_layout Description
14253 \begin_inset Flex Code
14256 \begin_layout Plain Layout
14263 \begin_inset Flex Code
14266 \begin_layout Plain Layout
14272 ] The vertical space between two paragraphs of this style.
14275 \begin_layout Description
14276 \begin_inset Flex Code
14279 \begin_layout Plain Layout
14286 \begin_inset Flex Code
14289 \begin_layout Plain Layout
14296 allows the user to choose either
14297 \begin_inset Quotes eld
14301 \begin_inset Quotes erd
14305 \begin_inset Quotes eld
14309 \begin_inset Quotes erd
14312 to separate paragraphs.
14314 \begin_inset Quotes eld
14318 \begin_inset Quotes erd
14322 \begin_inset Flex Code
14325 \begin_layout Plain Layout
14333 \begin_inset Quotes eld
14337 \begin_inset Quotes erd
14341 \begin_inset Flex Code
14344 \begin_layout Plain Layout
14350 is ignored and all paragraphs are separated by the
14351 \begin_inset Flex Code
14354 \begin_layout Plain Layout
14361 The vertical space is calculated with
14362 \begin_inset Flex Code
14365 \begin_layout Plain Layout
14367 \begin_inset space ~
14376 \begin_inset Flex Code
14379 \begin_layout Plain Layout
14385 is the height of a row with the normal font.
14386 This way, the look stays the same with different screen fonts.
14389 \begin_layout Description
14390 \begin_inset Flex Code
14393 \begin_layout Plain Layout
14400 \begin_inset Flex Code
14403 \begin_layout Plain Layout
14412 \begin_inset space \thinspace{}
14416 \begin_inset Flex Code
14419 \begin_layout Plain Layout
14425 ] Whether the contents of this paragraph should be output in raw form, meaning
14426 without special translations that \SpecialChar LaTeX
14428 \change_inserted 155139281 1429534178
14432 \begin_layout Description
14434 \change_inserted 155139281 1429534242
14437 \begin_inset Flex Code
14440 \begin_layout Plain Layout
14442 \change_inserted 155139281 1429534178
14451 \begin_inset Flex Code
14454 \begin_layout Plain Layout
14456 \change_inserted 155139281 1429534178
14457 string of characters
14466 Defines individual characters that should be output in raw form, meaning
14467 without special translations that \SpecialChar LaTeX
14473 \begin_layout Description
14474 \begin_inset Flex Code
14477 \begin_layout Plain Layout
14483 Information to be included in the \SpecialChar LaTeX
14484 preamble when this style is used.
14485 Used to define macros, load packages, etc., required by this particular
14488 \begin_inset Quotes eld
14492 \begin_inset Flex Code
14495 \begin_layout Plain Layout
14502 \begin_inset Quotes erd
14508 \begin_layout Description
14509 \begin_inset Flex Code
14512 \begin_layout Plain Layout
14519 \begin_inset Flex Code
14522 \begin_layout Plain Layout
14528 ] The prefix to use when creating labels referring to paragraphs of this
14530 This allows the use of formatted references.
14533 \begin_layout Description
14534 \begin_inset Flex Code
14537 \begin_layout Plain Layout
14544 \begin_inset Flex Code
14547 \begin_layout Plain Layout
14553 ] Whether the style requires the feature
14554 \begin_inset Flex Code
14557 \begin_layout Plain Layout
14564 See the description of
14565 \begin_inset Flex Code
14568 \begin_layout Plain Layout
14575 \begin_inset CommandInset ref
14577 reference "sub:General-text-class"
14581 ) for information on `features'.
14584 \begin_layout Description
14585 \begin_inset Flex Code
14588 \begin_layout Plain Layout
14595 \begin_inset Flex Code
14598 \begin_layout Plain Layout
14607 \begin_inset Flex Code
14610 \begin_layout Plain Layout
14616 ] Resets the \SpecialChar LaTeX
14617 arguments of this style (as defined via the
14618 \begin_inset Flex Code
14621 \begin_layout Plain Layout
14628 This is useful if you have copied a style via
14629 \begin_inset Flex Code
14632 \begin_layout Plain Layout
14638 , but you do not want to inherit its (required and optional) arguments.
14641 \begin_layout Description
14642 \begin_inset Flex Code
14645 \begin_layout Plain Layout
14652 \begin_inset Flex Code
14655 \begin_layout Plain Layout
14661 ] A string that is put at the end of the layout content.
14662 A line break in the output can be indicated by
14663 \begin_inset Flex Code
14666 \begin_layout Plain Layout
14675 \begin_layout Description
14676 \begin_inset Flex Code
14679 \begin_layout Plain Layout
14686 \begin_inset Flex Code
14689 \begin_layout Plain Layout
14696 \begin_inset Flex Code
14699 \begin_layout Plain Layout
14708 \begin_layout Description
14709 \begin_inset Flex Code
14712 \begin_layout Plain Layout
14719 \begin_inset Flex Code
14722 \begin_layout Plain Layout
14731 \begin_inset Flex Code
14734 \begin_layout Plain Layout
14741 \begin_inset Flex Code
14744 \begin_layout Plain Layout
14751 \begin_inset Flex Code
14754 \begin_layout Plain Layout
14756 \begin_inset space ~
14764 ] This defines what the default spacing should be in the style.
14766 \begin_inset Flex Code
14769 \begin_layout Plain Layout
14776 \begin_inset Flex Code
14779 \begin_layout Plain Layout
14786 \begin_inset Flex Code
14789 \begin_layout Plain Layout
14795 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14796 If you specify the argument
14797 \begin_inset Flex Code
14800 \begin_layout Plain Layout
14806 , then you must also provide a value argument which will be the actual multiplie
14808 Note that, contrary to other parameters,
14809 \begin_inset Flex Code
14812 \begin_layout Plain Layout
14818 implies the generation of specific \SpecialChar LaTeX
14819 code, using the \SpecialChar LaTeX
14823 \begin_inset Flex Code
14826 \begin_layout Plain Layout
14835 \begin_layout Description
14836 \begin_inset Flex Code
14839 \begin_layout Plain Layout
14846 \begin_inset Flex Code
14849 \begin_layout Plain Layout
14856 \begin_inset space \thinspace{}
14860 \begin_inset Flex Code
14863 \begin_layout Plain Layout
14871 ] Allow spell-checking paragraphs of this style.
14875 \begin_layout Description
14876 \begin_inset Flex Code
14879 \begin_layout Plain Layout
14885 The font used for the text body .
14887 \begin_inset CommandInset ref
14889 reference "sub:Font-description"
14896 \begin_layout Description
14897 \begin_inset Flex Code
14900 \begin_layout Plain Layout
14909 \begin_inset Flex Code
14912 \begin_layout Plain Layout
14922 The level of the style in the table of contents.
14923 This is used for automatic numbering of section headings.
14924 \change_inserted -712698321 1401363541
14928 \begin_layout Description
14930 \change_inserted -712698321 1401363906
14931 \begin_inset Flex Code
14934 \begin_layout Plain Layout
14936 \change_inserted -712698321 1401363547
14945 \begin_inset Flex Code
14948 \begin_layout Plain Layout
14950 \change_inserted -712698321 1401363664
14963 \begin_inset Flex Code
14966 \begin_layout Plain Layout
14968 \change_inserted -712698321 1401363669
14977 \begin_inset Flex Code
14980 \begin_layout Plain Layout
14982 \change_inserted -712698321 1401363675
14990 ] This tag determines whether the first line indentation of this paragraph
14991 can be toggled via the Paragraph settings dialog.
14995 \begin_inset Flex Code
14998 \begin_layout Plain Layout
15000 \change_inserted -712698321 1401363761
15010 is set, indentation can be toggled if the document settings use
15011 \begin_inset Quotes eld
15015 \begin_inset Quotes erd
15018 paragraph style, with
15019 \begin_inset Flex Code
15022 \begin_layout Plain Layout
15024 \change_inserted -712698321 1401363844
15030 , indentation can always be toggled, notwithstanding the document settings,
15032 \begin_inset Flex Code
15035 \begin_layout Plain Layout
15037 \change_inserted -712698321 1401363901
15043 , indentation can never be toggled.
15048 \begin_layout Description
15049 \begin_inset Flex Code
15052 \begin_layout Plain Layout
15059 \begin_inset Flex Code
15062 \begin_layout Plain Layout
15068 ] The vertical space with which the very first of a chain of paragraphs
15069 with this style is separated from the previous paragraph.
15070 If the previous paragraph has another style, the separations are not simply
15071 added, but the maximum is taken.
15074 \begin_layout Subsection
15075 \begin_inset CommandInset label
15081 Internationalization of Paragraph Styles
15084 \begin_layout Standard
15086 has long supported internationalization of layout information, but, until
15087 version 2.0, this applied only to the user interface and not to, say, PDF
15089 Thus, French authors were forced to resort to ugly hacks if they wanted
15094 1' instead of `Theorem 1'.
15095 Thanks to Georg Baum, that is no longer the case.
15098 \begin_layout Standard
15100 \begin_inset Flex Code
15103 \begin_layout Plain Layout
15109 defines text that is to appear in the typeset document, it may use
15110 \begin_inset Flex Code
15113 \begin_layout Plain Layout
15120 \begin_inset Flex Code
15123 \begin_layout Plain Layout
15129 to support non-English and even multi-language documents correctly.
15130 The following excerpt (from the
15131 \begin_inset Flex Code
15134 \begin_layout Plain Layout
15140 file) shows how this works:
15143 \begin_layout LyX-Code
15145 \begin_inset Separator parbreak
15152 \begin_layout LyX-Code
15155 theoremstyle{remark}
15158 \begin_layout LyX-Code
15161 newtheorem{claim}[thm]{
15168 \begin_layout LyX-Code
15172 \begin_layout LyX-Code
15176 \begin_layout LyX-Code
15181 claimname}{_(Claim)}
15184 \begin_layout LyX-Code
15188 \begin_layout LyX-Code
15192 \begin_layout LyX-Code
15201 claimname}{_(Claim)}}
15204 \begin_layout LyX-Code
15209 \begin_layout Standard
15210 In principle, any legal \SpecialChar LaTeX
15212 \begin_inset Flex Code
15215 \begin_layout Plain Layout
15222 \begin_inset Flex Code
15225 \begin_layout Plain Layout
15231 tags, but in practice they will typically look as they do here.
15232 The key to correct translation of the typeset text is the definition of
15233 the \SpecialChar LaTeX
15235 \begin_inset Flex Code
15238 \begin_layout Plain Layout
15247 \begin_inset Flex Code
15250 \begin_layout Plain Layout
15262 \begin_layout Standard
15264 \begin_inset Flex Code
15267 \begin_layout Plain Layout
15273 tag provides for internationalization based upon the overall language of
15275 The contents of the tag will be included in the preamble, just as with
15277 \begin_inset Flex Code
15280 \begin_layout Plain Layout
15287 What makes it special is the use of the
15288 \begin_inset Quotes eld
15292 \begin_inset Quotes erd
15296 \begin_inset Flex Code
15299 \begin_layout Plain Layout
15305 , which will be replaced, when \SpecialChar LyX
15306 produces \SpecialChar LaTeX
15307 output, with the translation of
15308 its argument into the document language.
15311 \begin_layout Standard
15313 \begin_inset Flex Code
15316 \begin_layout Plain Layout
15322 tag is more complex, since it is meant to provide support for multi-language
15323 documents and so offers an interface to the
15324 \begin_inset Flex Code
15327 \begin_layout Plain Layout
15334 Its contents will be added to the preamble once for each language that
15335 appears in the document.
15336 In this case, the argument to
15337 \begin_inset Flex Code
15340 \begin_layout Plain Layout
15346 will be replaced with its translation into the language in question; the
15348 \begin_inset Flex Code
15351 \begin_layout Plain Layout
15357 is replaced by the language name (as used by the babel package).
15360 \begin_layout Standard
15361 A German document that also included a French section would thus have the
15362 following in the preamble:
15365 \begin_layout LyX-Code
15374 claimname}{Affirmation}}
15375 \begin_inset Newline newline
15386 claimname}{Behauptung}}
15387 \begin_inset Newline newline
15394 claimname}{Behauptung}
15397 \begin_layout Standard
15400 \begin_inset Flex Code
15403 \begin_layout Plain Layout
15409 will then conspire to produce the correct text in the output.
15412 \begin_layout Standard
15413 One important point to note here is that the translations are provided by
15415 itself, through the file
15416 \begin_inset Flex Code
15419 \begin_layout Plain Layout
15426 This means, in effect, that
15427 \begin_inset Flex Code
15430 \begin_layout Plain Layout
15437 \begin_inset Flex Code
15440 \begin_layout Plain Layout
15446 are really only of use in layout files that are provided with \SpecialChar LyX
15448 entered in user-created layout files will not be seen by \SpecialChar LyX
15449 's internationalizatio
15450 n routines unless the
15451 \begin_inset Flex Code
15454 \begin_layout Plain Layout
15460 file is modified accordingly.
15461 That said, however, any layout created with the intention that it will
15462 be included with \SpecialChar LyX
15463 should use these tags where appropriate.
15464 Please note that the paragraph style translations provided by \SpecialChar LyX
15466 change with a minor update (e.
15467 \begin_inset space \thinspace{}
15471 \begin_inset space \space{}
15474 from version 2.1.x to 2.1.y).
15475 It is however quite likely that a major update (e.
15476 \begin_inset space \thinspace{}
15480 \begin_inset space \space{}
15483 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15486 \begin_layout Subsection
15488 \begin_inset CommandInset label
15497 \begin_layout Standard
15498 It is necessary to define the floats (
15499 \begin_inset Flex MenuItem
15502 \begin_layout Plain Layout
15509 \begin_inset Flex MenuItem
15512 \begin_layout Plain Layout
15518 , \SpecialChar ldots
15519 ) in the text class itself.
15520 Standard floats are included in the file
15521 \begin_inset Flex Code
15524 \begin_layout Plain Layout
15530 , so you may have to do no more than add
15533 \begin_layout LyX-Code
15534 Input stdfloats.inc
15537 \begin_layout Standard
15538 to your layout file.
15539 If you want to implement a text class that proposes some other float types
15540 (like the AGU class bundled with \SpecialChar LyX
15541 ), the information below will hopefully
15545 \begin_layout Description
15546 \begin_inset Flex Code
15549 \begin_layout Plain Layout
15556 \begin_inset Flex Code
15559 \begin_layout Plain Layout
15566 \begin_inset Quotes erd
15570 \begin_inset Quotes erd
15573 ] The file name extension of an auxiliary file for the list of figures (or
15576 writes the captions to this file.
15579 \begin_layout Description
15580 \begin_inset Flex Code
15583 \begin_layout Plain Layout
15590 \begin_inset Flex Code
15593 \begin_layout Plain Layout
15600 \begin_inset Quotes erd
15604 \begin_inset Quotes erd
15607 ] The string that will be used in the menus and also for the caption.
15608 This is translated to the current language if babel is used.
15611 \begin_layout Description
15612 \begin_inset Flex Code
15615 \begin_layout Plain Layout
15621 These tags control the XHTML output.
15623 \begin_inset CommandInset ref
15625 reference "sec:Tags-for-XHTML"
15632 \begin_layout Description
15633 \begin_inset Flex Code
15636 \begin_layout Plain Layout
15645 \begin_inset Flex Code
15648 \begin_layout Plain Layout
15657 \begin_inset space \thinspace{}
15661 \begin_inset Flex Code
15664 \begin_layout Plain Layout
15670 ] Indicates whether the float is already defined in the document class or
15671 if instead the \SpecialChar LaTeX
15673 \begin_inset Flex Code
15676 \begin_layout Plain Layout
15682 needs to be loaded to define it on-the-fly.
15684 \begin_inset Flex Code
15687 \begin_layout Plain Layout
15694 \begin_inset Flex Code
15697 \begin_layout Plain Layout
15704 It should be set to
15705 \begin_inset Flex Code
15708 \begin_layout Plain Layout
15714 if the float is already defined by the \SpecialChar LaTeX
15718 \begin_layout Description
15719 \begin_inset Flex Code
15722 \begin_layout Plain Layout
15729 \begin_inset Flex Code
15732 \begin_layout Plain Layout
15739 \begin_inset Quotes erd
15743 \begin_inset Quotes erd
15746 ] The command used to generate a list of floats of this type; the leading
15755 \begin_inset Flex Code
15758 \begin_layout Plain Layout
15764 is false, since there is no standard way to generate this command.
15766 \begin_inset Flex Code
15769 \begin_layout Plain Layout
15775 is true, since in that case there is a standard way to define the command.
15778 \begin_layout Description
15779 \begin_inset Flex Code
15782 \begin_layout Plain Layout
15789 \begin_inset Flex Code
15792 \begin_layout Plain Layout
15799 \begin_inset Quotes erd
15803 \begin_inset Quotes erd
15806 ] A title for a list of floats of this kind (list of figures, tables, or
15808 It is used for the screen label within \SpecialChar LyX
15809 , it is used by \SpecialChar LaTeX
15811 it is used as the title in the XHTML output.
15812 It will be translated to the document language.
15815 \begin_layout Description
15816 \begin_inset Flex Code
15819 \begin_layout Plain Layout
15826 \begin_inset Flex Code
15829 \begin_layout Plain Layout
15836 \begin_inset Quotes erd
15840 \begin_inset Quotes erd
15843 ] This (optional) argument determines whether floats of this class will
15844 be numbered within some sectional unit of the document.
15846 \begin_inset Flex Code
15849 \begin_layout Plain Layout
15856 \begin_inset Quotes eld
15860 \begin_inset Flex Code
15863 \begin_layout Plain Layout
15870 \begin_inset Quotes erd
15873 , the floats will be numbered within chapters.
15877 \begin_layout Description
15878 \begin_inset Flex Code
15881 \begin_layout Plain Layout
15888 \begin_inset Flex Code
15891 \begin_layout Plain Layout
15898 \begin_inset Quotes erd
15902 \begin_inset Quotes erd
15905 ] The default placement for the given class of floats.
15906 The string should be as in standard \SpecialChar LaTeX
15908 \begin_inset Flex Code
15911 \begin_layout Plain Layout
15918 \begin_inset Flex Code
15921 \begin_layout Plain Layout
15928 \begin_inset Flex Code
15931 \begin_layout Plain Layout
15938 \begin_inset Flex Code
15941 \begin_layout Plain Layout
15947 for top, bottom, page, and here, respectively.
15951 \begin_layout Plain Layout
15952 Note that the order of these letters in the string is irrelevant, like in
15959 On top of that there is a new type,
15960 \begin_inset Flex Code
15963 \begin_layout Plain Layout
15969 , which does not really correspond to a float, since it means: put it
15970 \begin_inset Quotes eld
15974 \begin_inset Quotes erd
15978 Note however that the
15979 \begin_inset Flex Code
15982 \begin_layout Plain Layout
15988 specifier is special and, because of implementation details, cannot be
15989 used in non-built in float types.
15990 If you do not understand what this means, just use
15991 \begin_inset Quotes eld
15995 \begin_inset Flex Code
15998 \begin_layout Plain Layout
16005 \begin_inset Quotes erd
16011 \begin_layout Description
16012 \begin_inset Flex Code
16015 \begin_layout Plain Layout
16022 \begin_inset Flex Code
16025 \begin_layout Plain Layout
16031 ] The prefix to use when creating labels referring to floats of this type.
16032 This allows the use of formatted references.
16033 Note that you can remove any
16034 \begin_inset Flex Code
16037 \begin_layout Plain Layout
16043 set by a copied style by using the special value
16044 \begin_inset Quotes eld
16048 \begin_inset Quotes erd
16051 , which must be all caps.
16054 \begin_layout Description
16055 \begin_inset Flex Code
16058 \begin_layout Plain Layout
16065 \begin_inset Flex Code
16068 \begin_layout Plain Layout
16075 \begin_inset Quotes erd
16079 \begin_inset Quotes erd
16082 ] The style used when defining the float using
16083 \begin_inset Flex Code
16086 \begin_layout Plain Layout
16097 \begin_layout Description
16098 \begin_inset Flex Code
16101 \begin_layout Plain Layout
16108 \begin_inset Flex Code
16111 \begin_layout Plain Layout
16118 \begin_inset Quotes erd
16122 \begin_inset Quotes erd
16126 \begin_inset Quotes eld
16130 \begin_inset Quotes erd
16133 of the new class of floats, like program or algorithm.
16134 After the appropriate
16135 \begin_inset Flex Code
16138 \begin_layout Plain Layout
16147 \begin_inset Flex Code
16150 \begin_layout Plain Layout
16159 \begin_inset Flex Code
16162 \begin_layout Plain Layout
16173 \begin_layout Description
16174 \begin_inset Flex Code
16177 \begin_layout Plain Layout
16184 \begin_inset Flex Code
16187 \begin_layout Plain Layout
16194 \begin_inset space \thinspace{}
16198 \begin_inset Flex Code
16201 \begin_layout Plain Layout
16209 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16211 \begin_inset Flex Code
16214 \begin_layout Plain Layout
16220 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16224 \begin_layout Standard
16225 Note that defining a float with type
16226 \begin_inset Flex Code
16229 \begin_layout Plain Layout
16237 automatically defines the corresponding counter with name
16238 \begin_inset Flex Code
16241 \begin_layout Plain Layout
16252 \begin_layout Subsection
16253 Flex insets and InsetLayout
16254 \begin_inset CommandInset label
16256 name "sub:Flex-insets-and"
16263 \begin_layout Standard
16264 Flex insets come in three different kinds:
16267 \begin_layout Itemize
16269 \begin_inset Flex Code
16272 \begin_layout Plain Layout
16278 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16280 \begin_inset Flex Code
16283 \begin_layout Plain Layout
16292 \begin_inset Flex Code
16295 \begin_layout Plain Layout
16306 \begin_layout Itemize
16308 \begin_inset Flex Code
16311 \begin_layout Plain Layout
16317 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16319 footnote, and the like.
16320 An obvious example is an endnote inset, which is defined in the
16321 \begin_inset Flex Code
16324 \begin_layout Plain Layout
16333 \begin_layout Itemize
16335 \begin_inset Flex Code
16338 \begin_layout Plain Layout
16344 ): For use with DocBook classes.
16347 \begin_layout Standard
16348 Flex insets are defined using the
16349 \begin_inset Flex Code
16352 \begin_layout Plain Layout
16358 tag, which shall be explained in a moment.
16361 \begin_layout Standard
16363 \begin_inset Flex Code
16366 \begin_layout Plain Layout
16372 tag also serves another function: It can be used to customize the general
16373 layout of many different types of insets.
16375 \begin_inset Flex Code
16378 \begin_layout Plain Layout
16384 can be used to customize the layout parameters for footnotes, marginal
16385 notes, note insets, \SpecialChar TeX
16386 code (ERT) insets, branches, listings, indexes, boxes,
16387 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16390 \begin_layout Standard
16392 \begin_inset Flex Code
16395 \begin_layout Plain Layout
16401 definition must begin with a line of the form:
16404 \begin_layout LyX-Code
16408 \begin_layout Standard
16410 \begin_inset Flex Code
16413 \begin_layout Plain Layout
16419 indicates the inset whose layout is being defined, and here there are four
16423 \begin_layout Enumerate
16424 The layout for a pre-existing inset is being modified.
16425 In this case, can be
16426 \begin_inset Flex Code
16429 \begin_layout Plain Layout
16435 any one of the following:
16436 \begin_inset Flex Code
16439 \begin_layout Plain Layout
16446 \begin_inset Flex Code
16449 \begin_layout Plain Layout
16456 \begin_inset Flex Code
16459 \begin_layout Plain Layout
16466 \begin_inset Flex Code
16469 \begin_layout Plain Layout
16476 \begin_inset Flex Code
16479 \begin_layout Plain Layout
16486 \begin_inset Flex Code
16489 \begin_layout Plain Layout
16496 \begin_inset Flex Code
16499 \begin_layout Plain Layout
16506 \begin_inset Flex Code
16509 \begin_layout Plain Layout
16516 \begin_inset Flex Code
16519 \begin_layout Plain Layout
16526 \begin_inset Flex Code
16529 \begin_layout Plain Layout
16536 \begin_inset Flex Code
16539 \begin_layout Plain Layout
16546 \begin_inset Flex Code
16549 \begin_layout Plain Layout
16556 \begin_inset Flex Code
16559 \begin_layout Plain Layout
16566 \begin_inset Flex Code
16569 \begin_layout Plain Layout
16576 \begin_inset Flex Code
16579 \begin_layout Plain Layout
16586 \begin_inset Flex Code
16589 \begin_layout Plain Layout
16596 \begin_inset Flex Code
16599 \begin_layout Plain Layout
16606 \begin_inset Flex Code
16609 \begin_layout Plain Layout
16616 \begin_inset Flex Code
16619 \begin_layout Plain Layout
16626 \begin_inset Flex Code
16629 \begin_layout Plain Layout
16638 \begin_layout Enumerate
16639 The layout for a Flex inset is being defined.
16641 \begin_inset Flex Code
16644 \begin_layout Plain Layout
16650 must be of the form
16651 \begin_inset Quotes eld
16655 \begin_inset Flex Code
16658 \begin_layout Plain Layout
16665 \begin_inset Quotes erd
16669 \begin_inset Flex Code
16672 \begin_layout Plain Layout
16678 may be be any valid identifier not used by a pre-existing Flex inset.
16679 The identifier may include spaces, but in that case the whole thing must
16680 be wrapped in quotes.
16681 Note that the definition of a flex inset
16686 \begin_inset Flex Code
16689 \begin_layout Plain Layout
16696 entry, declaring which type of inset it defines.
16699 \begin_layout Enumerate
16700 The layout for user specific branch is being defined.
16702 \begin_inset Flex Code
16705 \begin_layout Plain Layout
16711 must be of the form
16712 \begin_inset Quotes eld
16716 \begin_inset Flex Code
16719 \begin_layout Plain Layout
16726 \begin_inset Quotes erd
16730 \begin_inset Flex Code
16733 \begin_layout Plain Layout
16739 may be be any valid identifier of branch defined in user's document.
16740 The identifier may include spaces, but in that case the whole thing must
16741 be wrapped in quotes.
16742 The main purpose of this feature is to allow \SpecialChar LaTeX
16743 wrapping around specific
16744 branches as user needs.
16747 \begin_layout Enumerate
16748 The layout of a user (or class) specific caption is being defined.
16750 \begin_inset Flex Code
16753 \begin_layout Plain Layout
16759 must be of the form
16760 \begin_inset Quotes eld
16764 \begin_inset Flex Code
16767 \begin_layout Plain Layout
16774 \begin_inset Quotes erd
16778 \begin_inset Flex Code
16781 \begin_layout Plain Layout
16787 specifies the name of the caption as it appears in the menu.
16788 Have a look at the standard caption (
16789 \begin_inset Flex Code
16792 \begin_layout Plain Layout
16798 ), the specific captions of the KOMA-Script classes (
16799 \begin_inset Flex Code
16802 \begin_layout Plain Layout
16809 \begin_inset Flex Code
16812 \begin_layout Plain Layout
16821 \begin_inset space ~
16827 \begin_inset Flex Code
16830 \begin_layout Plain Layout
16836 ) for applications.
16839 \begin_layout Standard
16841 \begin_inset Flex Code
16844 \begin_layout Plain Layout
16850 definition can contain the following entries:
16853 \begin_layout Description
16854 \begin_inset Flex Code
16857 \begin_layout Plain Layout
16864 \begin_inset Flex Code
16867 \begin_layout Plain Layout
16873 ] Defines argument number of a command\SpecialChar breakableslash
16874 environment associated with the current
16876 The definition must end with
16877 \begin_inset Flex Code
16880 \begin_layout Plain Layout
16888 \begin_inset CommandInset ref
16890 reference "sub:Paragraph-Styles"
16897 \begin_layout Description
16898 \begin_inset Flex Code
16901 \begin_layout Plain Layout
16907 Preamble for changing language commands; see
16908 \begin_inset CommandInset ref
16910 reference "sub:I18n"
16917 \begin_layout Description
16918 \begin_inset Flex Code
16921 \begin_layout Plain Layout
16928 \begin_inset Flex Code
16931 \begin_layout Plain Layout
16937 ] The color for the inset's background.
16939 \begin_inset CommandInset ref
16941 reference "chap:Names-of-colors"
16945 for a list of the available color names.
16948 \begin_layout Description
16949 \begin_inset Flex Code
16952 \begin_layout Plain Layout
16959 \begin_inset Flex Code
16962 \begin_layout Plain Layout
16971 \begin_inset space \thinspace{}
16975 \begin_inset Flex Code
16978 \begin_layout Plain Layout
16984 ] Whether to use the content of the inset as the label, when the inset is
16989 \begin_layout Description
16990 \begin_inset Flex Code
16993 \begin_layout Plain Layout
17000 \begin_inset Flex Code
17003 \begin_layout Plain Layout
17009 ] As with paragraph styles, see
17010 \begin_inset CommandInset ref
17012 reference "sub:Paragraph-Styles"
17017 Note that you need to specify the complete type, e.
17018 \begin_inset space \thinspace{}
17022 \begin_inset space ~
17026 \begin_inset Flex Code
17029 \begin_layout Plain Layout
17030 CopyStyle Flex:<name>
17038 \begin_layout Description
17039 \begin_inset Flex Code
17042 \begin_layout Plain Layout
17049 \begin_inset Flex Code
17052 \begin_layout Plain Layout
17061 \begin_inset space \thinspace{}
17065 \begin_inset Flex Code
17068 \begin_layout Plain Layout
17074 ] Indicates whether the user may employ the Paragraph Settings dialog to
17075 customize the paragraph.
17078 \begin_layout Description
17079 \begin_inset Flex Code
17082 \begin_layout Plain Layout
17089 \begin_inset Flex Code
17092 \begin_layout Plain Layout
17099 \begin_inset Flex Code
17102 \begin_layout Plain Layout
17109 \begin_inset Flex Code
17112 \begin_layout Plain Layout
17118 , describing the rendering style used for the inset's frame and buttons.
17119 Footnotes generally use
17120 \begin_inset Flex Code
17123 \begin_layout Plain Layout
17129 , ERT insets generally
17130 \begin_inset Flex Code
17133 \begin_layout Plain Layout
17139 , and character styles
17140 \begin_inset Flex Code
17143 \begin_layout Plain Layout
17152 \begin_layout Description
17153 \begin_inset Flex Code
17156 \begin_layout Plain Layout
17163 \begin_inset Flex Code
17166 \begin_layout Plain Layout
17175 \begin_inset space \thinspace{}
17181 \begin_inset Flex Code
17184 \begin_layout Plain Layout
17193 \begin_inset Flex Code
17196 \begin_layout Plain Layout
17203 \begin_inset Flex Code
17206 \begin_layout Plain Layout
17213 Indicates whether the environment will stand on its own in the output or
17214 will appear inline with the surrounding text.
17215 If set to false, it is supposed that the \SpecialChar LaTeX
17216 environment ignores white space
17217 (including one newline character) after the
17218 \begin_inset Flex Code
17221 \begin_layout Plain Layout
17234 \begin_inset Flex Code
17237 \begin_layout Plain Layout
17253 \begin_layout Description
17254 \begin_inset Flex Code
17257 \begin_layout Plain Layout
17263 Required at the end of the
17264 \begin_inset Flex Code
17267 \begin_layout Plain Layout
17276 \begin_layout Description
17277 \begin_inset Flex Code
17280 \begin_layout Plain Layout
17286 The font used for both the text body
17292 \begin_inset CommandInset ref
17294 reference "sub:Font-description"
17299 Note that defining this font automatically defines the
17300 \begin_inset Flex Code
17303 \begin_layout Plain Layout
17309 to the same value, so define this first and define
17310 \begin_inset Flex Code
17313 \begin_layout Plain Layout
17319 later if you want them to be different.
17320 \change_inserted -195340706 1421002157
17324 \begin_layout Description
17326 \change_inserted -195340706 1421002157
17327 \begin_inset Flex Code
17330 \begin_layout Plain Layout
17332 \change_inserted -195340706 1421002157
17333 FixedWidthPreambleEncoding
17339 \begin_inset Flex Code
17342 \begin_layout Plain Layout
17344 \change_inserted -195340706 1421002157
17353 \begin_inset space \thinspace{}
17357 \begin_inset Flex Code
17360 \begin_layout Plain Layout
17362 \change_inserted -195340706 1421002157
17368 ] Force a fixed width encoding for the translated contents of
17369 \begin_inset Flex Code
17372 \begin_layout Plain Layout
17374 \change_inserted -195340706 1421002157
17381 \begin_inset Flex Code
17384 \begin_layout Plain Layout
17386 \change_inserted -195340706 1421002157
17392 code generated by this layout.
17393 This is needed for special packages like the listings package that do not
17394 work with variable width encodings such as utf8.
17396 This setting is ignored if fully unicode aware \SpecialChar LaTeX
17397 backends such as Xe\SpecialChar LaTeX
17404 \begin_layout Description
17405 \begin_inset Flex Code
17408 \begin_layout Plain Layout
17409 ForceLocalFontSwitch
17415 \begin_inset Flex Code
17418 \begin_layout Plain Layout
17427 \begin_inset space \thinspace{}
17431 \begin_inset Flex Code
17434 \begin_layout Plain Layout
17440 ] When using babel, always use a local font switch (
17441 \begin_inset Flex Code
17444 \begin_layout Plain Layout
17452 ), never a global one (such as
17453 \begin_inset Flex Code
17456 \begin_layout Plain Layout
17467 \begin_layout Description
17468 \begin_inset Flex Code
17471 \begin_layout Plain Layout
17478 \begin_inset Flex Code
17481 \begin_layout Plain Layout
17490 \begin_inset space \thinspace{}
17494 \begin_inset Flex Code
17497 \begin_layout Plain Layout
17504 \begin_inset Quotes eld
17508 \begin_inset Quotes erd
17511 language, leading to Left-to-Right (Latin) output, e.
17512 \begin_inset space \thinspace{}
17516 \begin_inset space \space{}
17519 in \SpecialChar TeX
17522 \change_inserted -712698321 1417441977
17526 \begin_layout Description
17528 \change_inserted -712698321 1417442090
17529 \begin_inset Flex Code
17532 \begin_layout Plain Layout
17534 \change_inserted -712698321 1417441983
17541 \begin_inset Flex Code
17544 \begin_layout Plain Layout
17546 \change_inserted -712698321 1417441978
17555 \begin_inset space \thinspace{}
17559 \begin_inset Flex Code
17562 \begin_layout Plain Layout
17564 \change_inserted -712698321 1417441978
17570 ] Force a a line break in the \SpecialChar LaTeX
17571 output before the inset starts and after
17573 This assures the inset itself is output on its own lines, for parsing purposes.
17575 \change_inserted 274215730 1419105878
17581 \begin_layout Description
17582 \begin_inset Flex Code
17585 \begin_layout Plain Layout
17592 \begin_inset Flex Code
17595 \begin_layout Plain Layout
17604 \begin_inset space \thinspace{}
17608 \begin_inset Flex Code
17611 \begin_layout Plain Layout
17617 ] Indicates whether the
17618 \begin_inset Flex Code
17621 \begin_layout Plain Layout
17627 should be used or, instead, the user can change the paragraph style used
17632 \begin_layout Description
17633 \begin_inset Flex Code
17636 \begin_layout Plain Layout
17643 \begin_inset Flex Code
17646 \begin_layout Plain Layout
17655 \begin_inset space \thinspace{}
17659 \begin_inset Flex Code
17662 \begin_layout Plain Layout
17668 ] As with paragraph styles, see
17669 \begin_inset CommandInset ref
17671 reference "sub:Paragraph-Styles"
17678 \begin_layout Description
17679 \begin_inset Flex Code
17682 \begin_layout Plain Layout
17688 These tags control the XHTML output.
17690 \begin_inset CommandInset ref
17692 reference "sec:Tags-for-XHTML"
17699 \begin_layout Description
17700 \begin_inset Flex Code
17703 \begin_layout Plain Layout
17710 \begin_inset Flex Code
17713 \begin_layout Plain Layout
17722 \begin_inset space \thinspace{}
17726 \begin_inset Flex Code
17729 \begin_layout Plain Layout
17735 ] Whether to include the contents of this inset in the strings generated
17736 for the `Outline' pane.
17737 One would not, for example, want the content of a footnote in a section
17738 header to be included in the TOC displayed in the outline, but one would
17739 normally want the content of a character style displayed.
17740 Default is false: not to include.
17743 \begin_layout Description
17744 \begin_inset Flex Code
17747 \begin_layout Plain Layout
17756 \begin_inset Flex Code
17759 \begin_layout Plain Layout
17768 \begin_inset space \thinspace{}
17772 \begin_inset Flex Code
17775 \begin_layout Plain Layout
17781 ] As with paragraph styles, see
17782 \begin_inset CommandInset ref
17784 reference "sub:Paragraph-Styles"
17791 \begin_layout Description
17792 \begin_inset Flex Code
17795 \begin_layout Plain Layout
17801 The font used for the label.
17803 \begin_inset CommandInset ref
17805 reference "sub:Font-description"
17810 Note that this definition can never appear before
17811 \begin_inset Flex Code
17814 \begin_layout Plain Layout
17820 , lest it be ineffective.
17823 \begin_layout Description
17824 \begin_inset Flex Code
17827 \begin_layout Plain Layout
17834 \begin_inset Flex Code
17837 \begin_layout Plain Layout
17844 \begin_inset Quotes erd
17848 \begin_inset Quotes erd
17851 ] What will be displayed on the button or elsewhere as the inset label.
17853 \begin_inset Flex Code
17856 \begin_layout Plain Layout
17864 \begin_inset Flex Code
17867 \begin_layout Plain Layout
17873 ) modify this label on the fly.
17876 \begin_layout Description
17877 \begin_inset Flex Code
17880 \begin_layout Plain Layout
17886 Language dependent preamble; see
17887 \begin_inset CommandInset ref
17889 reference "sub:I18n"
17896 \begin_layout Description
17897 \begin_inset Flex Code
17900 \begin_layout Plain Layout
17907 \begin_inset Flex Code
17910 \begin_layout Plain Layout
17916 ] The name of the corresponding \SpecialChar LaTeX
17918 Either the environment or command name.
17921 \begin_layout Description
17922 \begin_inset Flex Code
17925 \begin_layout Plain Layout
17932 \begin_inset Flex Code
17935 \begin_layout Plain Layout
17941 ] The optional parameter for the corresponding
17942 \begin_inset Flex Code
17945 \begin_layout Plain Layout
17951 stuff, including possible bracket pairs like
17952 \begin_inset Flex Code
17955 \begin_layout Plain Layout
17962 This parameter cannot be changed from within \SpecialChar LyX
17964 \begin_inset Flex Code
17967 \begin_layout Plain Layout
17973 for customizable parameters).
17974 It will be output as is after all \SpecialChar LaTeX
17976 \begin_inset Flex Code
17979 \begin_layout Plain Layout
17988 \begin_layout Description
17989 \begin_inset Flex Code
17992 \begin_layout Plain Layout
17999 \begin_inset Flex Code
18002 \begin_layout Plain Layout
18003 Command, Environment, None
18008 ] How the style should be translated into \SpecialChar LaTeX
18013 \begin_layout Plain Layout
18014 \begin_inset Flex Code
18017 \begin_layout Plain Layout
18023 is perhaps a bit misleading, since these rules apply to SGML classes too.
18024 Visit the SGML class files for specific examples.
18030 \begin_inset Separator parbreak
18037 \begin_layout Description
18038 \begin_inset Flex Code
18041 \begin_layout Plain Layout
18047 means nothing special
18050 \begin_layout Description
18051 \begin_inset Flex Code
18054 \begin_layout Plain Layout
18061 \begin_inset Flex Code
18064 \begin_layout Plain Layout
18071 {\SpecialChar ldots
18080 \begin_layout Description
18081 \begin_inset Flex Code
18084 \begin_layout Plain Layout
18091 \begin_inset Flex Code
18094 \begin_layout Plain Layout
18101 }\SpecialChar ldots
18116 \begin_layout Standard
18117 Putting the last few things together, the \SpecialChar LaTeX
18118 output will be either:
18121 \begin_layout LyX-Code
18124 LatexName[LatexParam]{\SpecialChar ldots
18128 \begin_layout Standard
18132 \begin_layout LyX-Code
18135 begin{LatexName}[LatexParam] \SpecialChar ldots
18141 \begin_layout Standard
18142 depending upon the \SpecialChar LaTeX
18147 \begin_layout Description
18148 \begin_inset Flex Code
18151 \begin_layout Plain Layout
18158 \begin_inset Flex Code
18161 \begin_layout Plain Layout
18167 ] A string that is put at the beginning of the layout content.
18168 A line break in the output can be indicated by
18169 \begin_inset Flex Code
18172 \begin_layout Plain Layout
18181 \begin_layout Description
18182 \begin_inset Flex Code
18185 \begin_layout Plain Layout
18192 \begin_inset Flex Code
18195 \begin_layout Plain Layout
18202 \begin_inset Flex Code
18205 \begin_layout Plain Layout
18212 \begin_inset Flex Code
18215 \begin_layout Plain Layout
18222 \begin_inset Flex Code
18225 \begin_layout Plain Layout
18231 (indicating a dummy definition ending definitions of charstyles, etc).
18232 This entry is required in and is only meaningful for Flex insets.
18233 Among other things, it determines on which menu this inset will appear.
18235 \begin_inset Flex Code
18238 \begin_layout Plain Layout
18246 \begin_inset Flex Code
18249 \begin_layout Plain Layout
18255 will automatically set
18256 \begin_inset Flex Code
18259 \begin_layout Plain Layout
18267 \begin_inset Flex Code
18270 \begin_layout Plain Layout
18276 can be set to true for
18277 \begin_inset Flex Code
18280 \begin_layout Plain Layout
18286 insets by setting it
18291 \begin_inset Flex Code
18294 \begin_layout Plain Layout
18304 \begin_layout Description
18305 \begin_inset Flex Code
18308 \begin_layout Plain Layout
18315 \begin_inset Flex Code
18318 \begin_layout Plain Layout
18327 \begin_inset space \thinspace{}
18331 \begin_inset Flex Code
18334 \begin_layout Plain Layout
18340 ] Whether multiple paragraphs are permitted in this inset.
18342 \begin_inset Flex Code
18345 \begin_layout Plain Layout
18351 to the same value and
18352 \begin_inset Flex Code
18355 \begin_layout Plain Layout
18361 to the opposite value.
18362 These can be reset to other values, if they are used
18367 \begin_inset Flex Code
18370 \begin_layout Plain Layout
18380 \begin_layout Description
18381 \begin_inset Flex Code
18384 \begin_layout Plain Layout
18391 \begin_inset Flex Code
18394 \begin_layout Plain Layout
18403 \begin_inset space \thinspace{}
18407 \begin_inset Flex Code
18410 \begin_layout Plain Layout
18416 ] Whether fragile commands in this inset should be
18417 \begin_inset Flex Code
18420 \begin_layout Plain Layout
18433 whether the command should itself be protected.) Default is false.
18436 \begin_layout Description
18437 \begin_inset Flex Code
18440 \begin_layout Plain Layout
18447 \begin_inset Flex Code
18450 \begin_layout Plain Layout
18456 ] Deletes an existing
18457 \begin_inset Flex Code
18460 \begin_layout Plain Layout
18467 \change_inserted -712698321 1417953494
18471 \begin_layout Description
18473 \change_inserted -712698321 1417953559
18474 \begin_inset Flex Code
18477 \begin_layout Plain Layout
18479 \change_inserted -712698321 1417953494
18486 \begin_inset Flex Code
18489 \begin_layout Plain Layout
18491 \change_inserted -712698321 1417953574
18498 \begin_inset Flex Code
18501 \begin_layout Plain Layout
18503 \change_inserted -712698321 1417953533
18509 that has replaced this
18510 \begin_inset Flex Code
18513 \begin_layout Plain Layout
18515 \change_inserted -712698321 1417953551
18522 This is used to rename an
18523 \begin_inset Flex Code
18526 \begin_layout Plain Layout
18528 \change_inserted -712698321 1417953559
18534 , while keeping backward compatibility.
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
18597 \begin_inset Flex Code
18600 \begin_layout Plain Layout
18609 \begin_inset space \thinspace{}
18613 \begin_inset Flex Code
18616 \begin_layout Plain Layout
18622 ] As with paragraph styles, see
18623 \begin_inset CommandInset ref
18625 reference "sub:Paragraph-Styles"
18633 \begin_layout Description
18634 \begin_inset Flex Code
18637 \begin_layout Plain Layout
18643 As with paragraph styles, see
18644 \begin_inset CommandInset ref
18646 reference "sub:Paragraph-Styles"
18653 \begin_layout Description
18654 \begin_inset Flex Code
18657 \begin_layout Plain Layout
18664 \begin_inset Flex Code
18667 \begin_layout Plain Layout
18673 ] The prefix to use when creating labels referring to insets of this type.
18674 This allows the use of formatted references.
18677 \begin_layout Description
18678 \begin_inset Flex Code
18681 \begin_layout Plain Layout
18688 \begin_inset Flex Code
18691 \begin_layout Plain Layout
18697 ] As with paragraph styles, see
18698 \begin_inset CommandInset ref
18700 reference "sub:Paragraph-Styles"
18707 \begin_layout Description
18708 \begin_inset Flex Code
18711 \begin_layout Plain Layout
18718 \begin_inset Flex Code
18721 \begin_layout Plain Layout
18730 \begin_inset space \thinspace{}
18734 \begin_inset Flex Code
18737 \begin_layout Plain Layout
18743 ] Resets the \SpecialChar LaTeX
18744 arguments of this layout (as defined via the
18745 \begin_inset Flex Code
18748 \begin_layout Plain Layout
18755 This is useful if you have copied a style via
18756 \begin_inset Flex Code
18759 \begin_layout Plain Layout
18765 , but you do not want to inherit its (required and optional) arguments.
18768 \begin_layout Description
18769 \begin_inset Flex Code
18772 \begin_layout Plain Layout
18779 \begin_inset Flex Code
18782 \begin_layout Plain Layout
18789 \begin_inset space \thinspace{}
18793 \begin_inset Flex Code
18796 \begin_layout Plain Layout
18804 ] Whether this inset should use the font of its surrounding environment
18806 Default is false: use the font of the surrounding environment.
18809 \begin_layout Description
18810 \begin_inset Flex Code
18813 \begin_layout Plain Layout
18820 \begin_inset Flex Code
18823 \begin_layout Plain Layout
18829 ] A string that is put at the end of the layout content.
18830 A line break in the output can be indicated by
18831 \begin_inset Flex Code
18834 \begin_layout Plain Layout
18843 \begin_layout Description
18844 \begin_inset Flex Code
18847 \begin_layout Plain Layout
18854 \begin_inset Flex Code
18857 \begin_layout Plain Layout
18864 \begin_inset space \thinspace{}
18868 \begin_inset Flex Code
18871 \begin_layout Plain Layout
18879 ] Allow spell-checking the contents of this inset.
18883 \begin_layout Subsection
18885 \begin_inset CommandInset label
18887 name "sub:Counters"
18894 \begin_layout Standard
18895 It is necessary to define the counters (
18896 \begin_inset Flex MenuItem
18899 \begin_layout Plain Layout
18906 \begin_inset Flex MenuItem
18909 \begin_layout Plain Layout
18915 , \SpecialChar ldots
18916 ) in the text class itself.
18917 The standard counters are defined in the file
18918 \begin_inset Flex Code
18921 \begin_layout Plain Layout
18927 , so you may have to do no more than add
18930 \begin_layout LyX-Code
18931 Input stdcounters.inc
18934 \begin_layout Standard
18935 to your layout file to get them to work.
18936 But if you want to define custom counters, then you can do so.
18937 The counter declaration must begin with:
18940 \begin_layout LyX-Code
18941 Counter CounterName
18944 \begin_layout Standard
18946 \begin_inset Flex Code
18949 \begin_layout Plain Layout
18955 ' is replaced by the name of the counter.
18956 And it must end with
18957 \begin_inset Quotes eld
18961 \begin_inset Flex Code
18964 \begin_layout Plain Layout
18971 \begin_inset Quotes erd
18975 The following parameters can also be used:
18978 \begin_layout Description
18979 \begin_inset Flex Code
18982 \begin_layout Plain Layout
18989 \begin_inset Flex Code
18992 \begin_layout Plain Layout
18998 ] Sets the initial value for the counter, to which it will be reset whenever
19000 Normally, one will want the default, 1.
19003 \begin_layout Description
19004 \begin_inset Flex Code
19007 \begin_layout Plain Layout
19014 \begin_inset Flex Code
19017 \begin_layout Plain Layout
19024 \begin_inset Quotes erd
19028 \begin_inset Quotes erd
19031 ] When defined, this string defines how the counter is displayed.
19032 Setting this value sets
19033 \begin_inset Flex Code
19036 \begin_layout Plain Layout
19037 LabelStringAppendix
19043 The following special constructs can be used in the string:
19044 \begin_inset Separator parbreak
19051 \begin_layout Itemize
19052 \begin_inset Flex Code
19055 \begin_layout Plain Layout
19063 will be replaced by the expansion of the
19064 \begin_inset Flex Code
19067 \begin_layout Plain Layout
19074 \begin_inset Flex Code
19077 \begin_layout Plain Layout
19078 LabelStringAppendix
19084 \begin_inset Flex Code
19087 \begin_layout Plain Layout
19097 \begin_layout Itemize
19098 counter values can be expressed using \SpecialChar LaTeX
19100 \begin_inset Newline newline
19104 \begin_inset Flex Code
19107 \begin_layout Plain Layout
19124 \begin_inset Flex Code
19127 \begin_layout Plain Layout
19139 \begin_layout Plain Layout
19149 Actually, the situation is a bit more complicated: any
19168 other than those described below will produce arabic numerals.
19169 It would not be surprising to see this change in the future.
19175 \begin_inset Flex Code
19178 \begin_layout Plain Layout
19184 : 1, 2, 3,\SpecialChar ldots
19186 \begin_inset Flex Code
19189 \begin_layout Plain Layout
19195 for lower-case letters: a, b, c, \SpecialChar ldots
19197 \begin_inset Flex Code
19200 \begin_layout Plain Layout
19206 for upper-case letters: A, B, C, \SpecialChar ldots
19208 \begin_inset Flex Code
19211 \begin_layout Plain Layout
19217 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19219 \begin_inset Flex Code
19222 \begin_layout Plain Layout
19228 for upper-case roman numerals: I, II, III\SpecialChar ldots
19230 \begin_inset Flex Code
19233 \begin_layout Plain Layout
19239 for hebrew numerals.
19243 \begin_layout Standard
19244 If LabelString is not defined, a default value is constructed as follows:
19245 if the counter has a master counter
19246 \begin_inset Flex Code
19249 \begin_layout Plain Layout
19256 \begin_inset Flex Code
19259 \begin_layout Plain Layout
19266 \begin_inset Newline newline
19270 \begin_inset Flex Code
19273 \begin_layout Plain Layout
19283 is used; otherwise the string
19284 \begin_inset Flex Code
19287 \begin_layout Plain Layout
19298 \begin_layout Description
19299 \begin_inset Flex Code
19302 \begin_layout Plain Layout
19303 LabelStringAppendix
19309 \begin_inset Flex Code
19312 \begin_layout Plain Layout
19319 \begin_inset Quotes erd
19323 \begin_inset Quotes erd
19327 \begin_inset Flex Code
19330 \begin_layout Plain Layout
19336 , but for use in the Appendix.
19339 \begin_layout Description
19340 \begin_inset Flex Code
19343 \begin_layout Plain Layout
19350 \begin_inset Flex Code
19353 \begin_layout Plain Layout
19360 \begin_inset Quotes erd
19364 \begin_inset Quotes erd
19367 ] A format for use with formatted references to this counter.
19368 For example, one might want to have references to section numbers appear
19370 \begin_inset Quotes eld
19374 \begin_inset Quotes erd
19378 The string should contain
19379 \begin_inset Quotes eld
19383 \begin_inset Quotes erd
19387 This will be replaced by the counter number itself.
19388 So, for sections, it would be: Section ##.
19391 \begin_layout Description
19392 \begin_inset Flex Code
19395 \begin_layout Plain Layout
19402 \begin_inset Flex Code
19405 \begin_layout Plain Layout
19412 \begin_inset Quotes erd
19416 \begin_inset Quotes erd
19419 ] If this is set to the name of another counter, the present counter will
19420 be reset every time the other one is increased.
19422 \begin_inset Flex Code
19425 \begin_layout Plain Layout
19432 \begin_inset Flex Code
19435 \begin_layout Plain Layout
19444 \begin_layout Subsection
19446 \begin_inset CommandInset label
19448 name "sub:Font-description"
19455 \begin_layout Standard
19456 A font description looks like this:
19459 \begin_layout LyX-Code
19473 \begin_layout LyX-Code
19477 \begin_layout LyX-Code
19481 \begin_layout Standard
19482 The following commands are available:
19485 \begin_layout Description
19486 \begin_inset Flex Code
19489 \begin_layout Plain Layout
19496 \begin_inset Flex Code
19499 \begin_layout Plain Layout
19508 \begin_inset Flex Code
19511 \begin_layout Plain Layout
19518 \begin_inset Flex Code
19521 \begin_layout Plain Layout
19528 \begin_inset Flex Code
19531 \begin_layout Plain Layout
19538 \begin_inset Flex Code
19541 \begin_layout Plain Layout
19548 \begin_inset Flex Code
19551 \begin_layout Plain Layout
19558 \begin_inset Flex Code
19561 \begin_layout Plain Layout
19568 \begin_inset Flex Code
19571 \begin_layout Plain Layout
19578 \begin_inset Flex Code
19581 \begin_layout Plain Layout
19590 \begin_layout Description
19591 \begin_inset Flex Code
19594 \begin_layout Plain Layout
19601 \begin_inset Flex Code
19604 \begin_layout Plain Layout
19613 \begin_inset Flex Code
19616 \begin_layout Plain Layout
19623 \begin_inset Flex Code
19626 \begin_layout Plain Layout
19635 \begin_layout Description
19636 \begin_inset Flex Code
19639 \begin_layout Plain Layout
19646 \begin_inset Flex Code
19649 \begin_layout Plain Layout
19655 ] Valid arguments are:
19656 \begin_inset Flex Code
19659 \begin_layout Plain Layout
19666 \begin_inset Flex Code
19669 \begin_layout Plain Layout
19676 \begin_inset Flex Code
19679 \begin_layout Plain Layout
19686 \begin_inset Flex Code
19689 \begin_layout Plain Layout
19696 \begin_inset Flex Code
19699 \begin_layout Plain Layout
19706 \begin_inset Flex Code
19709 \begin_layout Plain Layout
19716 \begin_inset Flex Code
19719 \begin_layout Plain Layout
19726 \begin_inset Flex Code
19729 \begin_layout Plain Layout
19736 \begin_inset Flex Code
19739 \begin_layout Plain Layout
19746 \begin_inset Flex Code
19749 \begin_layout Plain Layout
19756 \begin_inset Flex Code
19759 \begin_layout Plain Layout
19766 \begin_inset Flex Code
19769 \begin_layout Plain Layout
19776 Each of these turns on or off the corresponding attribute.
19778 \begin_inset Flex Code
19781 \begin_layout Plain Layout
19787 turns on emphasis, and
19788 \begin_inset Flex Code
19791 \begin_layout Plain Layout
19799 \begin_inset Newline newline
19802 If the latter seems puzzling, remember that the font settings for the present
19803 context are generally inherited from the surrounding context.
19805 \begin_inset Flex Code
19808 \begin_layout Plain Layout
19814 would turn off the emphasis that was anyway in effect, say, in a theorem
19818 \begin_layout Description
19819 \begin_inset Flex Code
19822 \begin_layout Plain Layout
19829 \begin_inset Flex Code
19832 \begin_layout Plain Layout
19841 \begin_inset Flex Code
19844 \begin_layout Plain Layout
19853 \begin_layout Description
19854 \begin_inset Flex Code
19857 \begin_layout Plain Layout
19864 \begin_inset Flex Code
19867 \begin_layout Plain Layout
19876 \begin_inset Flex Code
19879 \begin_layout Plain Layout
19886 \begin_inset Flex Code
19889 \begin_layout Plain Layout
19896 \begin_inset Flex Code
19899 \begin_layout Plain Layout
19908 \begin_layout Description
19909 \begin_inset Flex Code
19912 \begin_layout Plain Layout
19919 \begin_inset Flex Code
19922 \begin_layout Plain Layout
19929 \begin_inset Flex Code
19932 \begin_layout Plain Layout
19939 \begin_inset Flex Code
19942 \begin_layout Plain Layout
19951 \begin_inset Flex Code
19954 \begin_layout Plain Layout
19961 \begin_inset Flex Code
19964 \begin_layout Plain Layout
19971 \begin_inset Flex Code
19974 \begin_layout Plain Layout
19981 \begin_inset Flex Code
19984 \begin_layout Plain Layout
19991 \begin_inset Flex Code
19994 \begin_layout Plain Layout
20003 \begin_layout Subsection
20004 \begin_inset CommandInset label
20006 name "sub:Citation-format-description"
20010 Citation format description
20013 \begin_layout Standard
20015 \begin_inset Flex Code
20018 \begin_layout Plain Layout
20024 blocks are used to describe how bibliographic information should be displayed,
20025 both within \SpecialChar LyX
20026 itself (in the citation dialog and in tooltips, for example)
20027 and in XHTML output.
20028 Such a block might look like this:
20031 \begin_layout LyX-Code
20035 \begin_layout LyX-Code
20039 \begin_layout LyX-Code
20043 \begin_layout LyX-Code
20047 \begin_layout Standard
20048 The individual lines define how the bibliographic information associated
20049 with an article or book, respectively, is to be displayed, and such a definitio
20050 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20053 defines a default format in the source code that will be used if no specific
20054 definition has been given.
20056 predefines several formats in the file
20057 \begin_inset Flex Code
20060 \begin_layout Plain Layout
20066 , which is included in most of \SpecialChar LyX
20067 's document classes.
20070 \begin_layout Standard
20071 The definitions use a simple language that allows Bib\SpecialChar TeX
20072 keys to be replaced
20074 Keys should be enclosed in
20075 \begin_inset Flex Code
20078 \begin_layout Plain Layout
20085 \begin_inset Flex Code
20088 \begin_layout Plain Layout
20095 So a simple definition might look like this:
20098 \begin_layout LyX-Code
20100 \begin_inset Quotes eld
20104 \begin_inset Quotes erd
20110 \begin_layout Standard
20111 This would print the author, followed by a comma, followed by the title,
20112 in quotes, followed by a period.
20115 \begin_layout Standard
20116 Of course, sometimes you may want to print a key only if it exists.
20117 This can be done by using a conditional construction, such as:
20118 \begin_inset Flex Code
20121 \begin_layout Plain Layout
20123 \begin_inset space ~
20133 \begin_inset Flex Code
20136 \begin_layout Plain Layout
20142 key exists, then print
20143 \begin_inset Quotes eld
20147 \begin_inset space ~
20151 \begin_inset Quotes erd
20154 followed by the volume key.
20155 It is also possible to have an else clause in the conditional, such as:
20156 \begin_inset Newline newline
20160 \begin_inset Flex Code
20163 \begin_layout Plain Layout
20164 {%author%[[%author%]][[%editor%, ed.]]}
20170 \begin_inset Newline newline
20174 \begin_inset Flex Code
20177 \begin_layout Plain Layout
20183 key is printed if it exists; otherwise, the editor key is printed, followed
20185 \begin_inset Quotes eld
20189 \begin_inset space ~
20193 \begin_inset Quotes erd
20196 Note that the key is again enclosed in
20197 \begin_inset Flex Code
20200 \begin_layout Plain Layout
20206 signs; the entire conditional is enclosed in braces; and the if and else
20207 clauses are enclosed in double brackets,
20208 \begin_inset Quotes eld
20212 \begin_inset Flex Code
20215 \begin_layout Plain Layout
20222 \begin_inset Quotes eld
20226 \begin_inset Quotes eld
20230 \begin_inset Flex Code
20233 \begin_layout Plain Layout
20240 \begin_inset Quotes erd
20244 There must be no space between any of these.
20247 \begin_layout Standard
20248 There is one other piece of syntax available in definitions, which looks
20250 \begin_inset Flex Code
20253 \begin_layout Plain Layout
20260 This defines a piece of formatting information that is to be used when
20262 \begin_inset Quotes eld
20266 \begin_inset Quotes erd
20270 Obviously, we do not want to output HTML tags when writing plain text,
20271 so they should be wrapped in
20272 \begin_inset Quotes eld
20276 \begin_inset Quotes erd
20280 \begin_inset Quotes eld
20284 \begin_inset Quotes erd
20290 \begin_layout Standard
20291 Two special sorts of definitions are also possible in a
20292 \begin_inset Flex Code
20295 \begin_layout Plain Layout
20302 An example of the first would be:
20305 \begin_layout LyX-Code
20307 \begin_inset Quotes eld
20311 \begin_inset Quotes erd
20317 \begin_layout Standard
20318 This is an abbreviation, or macro, and it can be used by treating it as
20320 \begin_inset Flex Code
20323 \begin_layout Plain Layout
20332 \begin_inset Flex Code
20335 \begin_layout Plain Layout
20341 exactly as it would treat its definition.
20342 So, let us issue the obvious
20350 \begin_layout LyX-Code
20354 \begin_layout Standard
20355 or anything like it.
20357 shouldn't go into an infinite loop, but it may go into a long one before
20361 \begin_layout Standard
20362 The second sort of special definition might look like this:
20365 \begin_layout LyX-Code
20369 \begin_layout Standard
20370 This defines a translatable piece of text, which allows relevant parts of
20371 the bibliography to be translated.
20372 It can be included in a definition by treating it as a key:
20373 \begin_inset Flex Code
20376 \begin_layout Plain Layout
20383 Several of these are predefined in
20384 \begin_inset Flex Code
20387 \begin_layout Plain Layout
20394 Note that these are not macros, in the sense just defined.
20395 They will not be expanded.
20398 \begin_layout Standard
20399 So here then is an example that use all these features:
20400 \begin_inset VSpace defskip
20406 \begin_layout Standard
20410 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20413 \begin_layout Standard
20414 \begin_inset VSpace defskip
20417 This defines a macro that prints the author, followed by a comma, if the
20419 \begin_inset Flex Code
20422 \begin_layout Plain Layout
20428 key is defined, or else prints the name of the editor, followed by the
20430 \begin_inset Flex Code
20433 \begin_layout Plain Layout
20439 or its translation (it is by default
20440 \begin_inset Quotes eld
20444 \begin_inset Quotes erd
20448 \begin_inset Flex Code
20451 \begin_layout Plain Layout
20458 Note that this is in fact defined in
20459 \begin_inset Flex Code
20462 \begin_layout Plain Layout
20468 , so you can use it in your own definitions, or re-definitions, if you load
20472 \begin_layout Section
20473 \begin_inset CommandInset label
20475 name "sec:Tags-for-XHTML"
20479 Tags for XHTML output
20482 \begin_layout Standard
20483 As with \SpecialChar LaTeX
20484 or DocBook, the format of \SpecialChar LyX
20485 's XHTML output is also controlled by
20486 layout information.
20487 In general, \SpecialChar LyX
20488 provides sensible defaults and, as mentioned earlier, it will
20489 even construct default CSS style rules from the other layout tags.
20490 For example, \SpecialChar LyX
20491 will attempt to use the information provided in the
20492 \begin_inset Flex Code
20495 \begin_layout Plain Layout
20501 declaration for the Chapter style to write CSS that will appropriately
20502 format chapter headings.
20505 \begin_layout Standard
20506 In many cases, then, you may not have to do anything at all to get acceptable
20507 XHTML output for your own environments, custom insets, and so forth.
20508 But in some cases you will, and so \SpecialChar LyX
20509 provides a number of layout tags that
20510 can be used to customize the XHTML and CSS that are generated.
20513 \begin_layout Standard
20514 Note that there are two tags,
20515 \begin_inset Flex Code
20518 \begin_layout Plain Layout
20525 \begin_inset Flex Code
20528 \begin_layout Plain Layout
20534 that may appear outside style and inset declarations.
20536 \begin_inset CommandInset ref
20538 reference "sub:General-text-class"
20542 for details on these.
20545 \begin_layout Subsection
20546 \begin_inset CommandInset label
20548 name "sub:Paragraph-Style-XHTML"
20555 \begin_layout Standard
20556 The sort of XHTML \SpecialChar LyX
20557 outputs for a paragraph depends upon whether we are dealing
20558 with a normal paragraph, a command, or an environment, where this is itself
20559 determined by the contents of the corresponding
20560 \begin_inset Flex Code
20563 \begin_layout Plain Layout
20574 \begin_layout Standard
20575 For a command or normal paragraph, the output XHTML has the following form:
20578 \begin_layout LyX-Code
20580 \begin_inset Quotes erd
20584 \begin_inset Quotes erd
20590 \begin_layout LyX-Code
20592 \begin_inset Quotes erd
20596 \begin_inset Quotes erd
20602 \begin_layout LyX-Code
20603 Contents of the paragraph.
20606 \begin_layout LyX-Code
20610 \begin_layout Standard
20611 The label tags are of course omitted if the paragraph does not have a label.
20614 \begin_layout Standard
20615 For an environment that is not some sort of list, the XHTML takes this form:
20618 \begin_layout LyX-Code
20620 \begin_inset Quotes erd
20624 \begin_inset Quotes erd
20630 \begin_layout LyX-Code
20632 \begin_inset Quotes erd
20636 \begin_inset Quotes erd
20640 \begin_inset Quotes erd
20644 \begin_inset Quotes erd
20647 >Environment Label</labeltag>First paragraph.</itemtag>
20650 \begin_layout LyX-Code
20651 <itemtag>Second paragraph.</itemtag>
20654 \begin_layout LyX-Code
20658 \begin_layout Standard
20659 Note that the label is output only for the first paragraph, as it should
20660 be for a theorem, for example.
20664 \begin_layout Standard
20665 For a list, we have one of these forms:
20668 \begin_layout LyX-Code
20670 \begin_inset Quotes erd
20674 \begin_inset Quotes erd
20680 \begin_layout LyX-Code
20682 \begin_inset Quotes erd
20686 \begin_inset Quotes erd
20690 \begin_inset Quotes erd
20694 \begin_inset Quotes erd
20697 >List Label</labeltag>First item.</itemtag>
20700 \begin_layout LyX-Code
20702 \begin_inset Quotes erd
20706 \begin_inset Quotes erd
20710 \begin_inset Quotes erd
20714 \begin_inset Quotes erd
20717 >List Label</labeltag>Second item.</itemtag>
20720 \begin_layout LyX-Code
20724 \begin_layout LyX-Code
20728 \begin_layout LyX-Code
20730 \begin_inset Quotes erd
20734 \begin_inset Quotes erd
20740 \begin_layout LyX-Code
20742 \begin_inset Quotes erd
20746 \begin_inset Quotes erd
20749 >List Label</labeltag><itemtag attr=
20750 \begin_inset Quotes erd
20754 \begin_inset Quotes erd
20757 >First item.</itemtag>
20760 \begin_layout LyX-Code
20762 \begin_inset Quotes erd
20766 \begin_inset Quotes erd
20769 >List Label</labeltag><itemtag attr=
20770 \begin_inset Quotes erd
20774 \begin_inset Quotes erd
20777 >Second item.</itemtag>
20780 \begin_layout LyX-Code
20784 \begin_layout Standard
20785 Note the different orders of
20786 \begin_inset Flex Code
20789 \begin_layout Plain Layout
20796 \begin_inset Flex Code
20799 \begin_layout Plain Layout
20806 Which order we get depends upon the setting of
20807 \begin_inset Flex Code
20810 \begin_layout Plain Layout
20817 \begin_inset Flex Code
20820 \begin_layout Plain Layout
20826 is false (the default), you get the first of these, with the label within
20827 the item; if true, you get the second, with the label outside the item.
20830 \begin_layout Standard
20831 The specific tags and attributes output for each paragraph type can be controlle
20832 d by means of the layout tags we are about to describe.
20833 As mentioned earlier, however, \SpecialChar LyX
20834 uses sensible defaults for many of these,
20835 so you often may not need to do very much to get good XHTML output.
20836 Think of the available tags as there so you can tweak things to your liking.
20839 \begin_layout Description
20840 \begin_inset Flex Code
20843 \begin_layout Plain Layout
20850 \begin_inset Flex Code
20853 \begin_layout Plain Layout
20859 ] Specifies attribute information to be output with the main tag.
20861 \begin_inset Quotes eld
20865 \begin_inset Flex Code
20868 \begin_layout Plain Layout
20875 \begin_inset Quotes erd
20879 By default, \SpecialChar LyX
20881 \begin_inset Quotes eld
20885 \begin_inset Flex Code
20888 \begin_layout Plain Layout
20895 \begin_inset Quotes erd
20899 \begin_inset Flex Code
20902 \begin_layout Plain Layout
20908 is the \SpecialChar LyX
20909 name of the layout, made lowercase, for example: chapter.
20914 contain any style information.
20916 \begin_inset Flex Code
20919 \begin_layout Plain Layout
20928 \begin_layout Description
20929 \begin_inset Flex Code
20932 \begin_layout Plain Layout
20939 \begin_inset Flex Code
20942 \begin_layout Plain Layout
20952 ] Whether to output the default CSS information \SpecialChar LyX
20953 generates for this layout,
20954 even if additional information is explicitly provided via
20955 \begin_inset Flex Code
20958 \begin_layout Plain Layout
20966 \begin_inset Flex Code
20969 \begin_layout Plain Layout
20975 allows you to alter or augment the generated CSS, rather than to override
20978 \begin_inset Flex Code
20981 \begin_layout Plain Layout
20990 \begin_layout Description
20991 \begin_inset Flex Code
20994 \begin_layout Plain Layout
21001 \begin_inset Flex Code
21004 \begin_layout Plain Layout
21010 ] The tag to be used for individual paragraphs of environments, replacing
21012 \begin_inset Flex Code
21015 \begin_layout Plain Layout
21021 in the examples above.
21023 \begin_inset Flex Code
21026 \begin_layout Plain Layout
21035 \begin_layout Description
21036 \begin_inset Flex Code
21039 \begin_layout Plain Layout
21046 \begin_inset Flex Code
21049 \begin_layout Plain Layout
21055 ] Attributes for the item tag.
21057 \begin_inset Quotes eld
21061 \begin_inset Flex Code
21064 \begin_layout Plain Layout
21065 class=`layoutname_item'
21071 \begin_inset Quotes erd
21079 contain any style information.
21081 \begin_inset Flex Code
21084 \begin_layout Plain Layout
21093 \begin_layout Description
21094 \begin_inset Flex Code
21097 \begin_layout Plain Layout
21104 \begin_inset Flex Code
21107 \begin_layout Plain Layout
21113 ] The tag to be used for paragraph and item labels, replacing
21114 \begin_inset Flex Code
21117 \begin_layout Plain Layout
21123 in the examples above.
21125 \begin_inset Flex Code
21128 \begin_layout Plain Layout
21135 \begin_inset Flex Code
21138 \begin_layout Plain Layout
21145 \begin_inset Flex Code
21148 \begin_layout Plain Layout
21155 \begin_inset Flex Code
21158 \begin_layout Plain Layout
21159 Centered_Top_Environment
21164 , in which case it defaults to
21165 \begin_inset Flex Code
21168 \begin_layout Plain Layout
21177 \begin_layout Description
21178 \begin_inset Flex Code
21181 \begin_layout Plain Layout
21188 \begin_inset Flex Code
21191 \begin_layout Plain Layout
21197 ] Attributes for the label tag.
21199 \begin_inset Quotes eld
21203 \begin_inset Flex Code
21206 \begin_layout Plain Layout
21207 class=`layoutname_label'
21213 \begin_inset Quotes erd
21221 contain any style information.
21223 \begin_inset Flex Code
21226 \begin_layout Plain Layout
21235 \begin_layout Description
21236 \begin_inset Flex Code
21239 \begin_layout Plain Layout
21246 \begin_inset Flex Code
21249 \begin_layout Plain Layout
21259 ] Meaningful only for list-like environments, this tag controls whether
21260 the label tag is output before or inside the item tag.
21261 This is used, for example, in the description environment, where we want
21263 \begin_inset Flex Code
21266 \begin_layout Plain Layout
21267 <dt>\SpecialChar ldots
21268 </dt><dd>\SpecialChar ldots
21276 \begin_inset Flex Code
21279 \begin_layout Plain Layout
21285 : The label tag is output inside the item tag.
21288 \begin_layout Description
21289 \begin_inset Flex Code
21292 \begin_layout Plain Layout
21298 Information to be output in the
21299 \begin_inset Flex Code
21302 \begin_layout Plain Layout
21308 section when this style is used.
21309 This might, for example, be used to include a
21310 \begin_inset Flex Code
21313 \begin_layout Plain Layout
21320 \begin_inset Flex Code
21323 \begin_layout Plain Layout
21332 \begin_layout Description
21333 \begin_inset Flex Code
21336 \begin_layout Plain Layout
21342 CSS style information to be included when this style is used.
21343 Note that this will automatically be wrapped in a layout-generated
21344 \begin_inset Flex Code
21347 \begin_layout Plain Layout
21353 block, so only the CSS itself need be included.
21355 \begin_inset Flex Code
21358 \begin_layout Plain Layout
21367 \begin_layout Description
21368 \begin_inset Flex Code
21371 \begin_layout Plain Layout
21378 \begin_inset Flex Code
21381 \begin_layout Plain Layout
21387 ] The tag to be used for the main label, replacing
21388 \begin_inset Flex Code
21391 \begin_layout Plain Layout
21397 in the examples above.
21399 \begin_inset Flex Code
21402 \begin_layout Plain Layout
21411 \begin_layout Description
21412 \begin_inset Flex Code
21415 \begin_layout Plain Layout
21422 \begin_inset Flex Code
21425 \begin_layout Plain Layout
21435 ] Marks this style as the one to be used to generate the
21436 \begin_inset Flex Code
21439 \begin_layout Plain Layout
21445 tag for the XHTML file.
21446 By default, it is false.
21448 \begin_inset Flex Code
21451 \begin_layout Plain Layout
21457 file sets it to true for the
21458 \begin_inset Flex Code
21461 \begin_layout Plain Layout
21471 \begin_layout Subsection
21475 \begin_layout Standard
21476 The XHTML output of insets can also be controlled by information in layout
21481 \begin_layout Plain Layout
21482 At present, this is true only for
21483 \begin_inset Quotes eld
21487 \begin_inset Quotes erd
21490 insets (insets you can type into) and is not true for
21491 \begin_inset Quotes eld
21495 \begin_inset Quotes erd
21498 insets (insets that are associated with dialog boxes).
21503 Here, too, \SpecialChar LyX
21504 tries to provide sensible defaults, and it constructs default
21506 But everything can be customized.
21509 \begin_layout Standard
21510 The XHTML \SpecialChar LyX
21511 outputs for an inset has the following form:
21514 \begin_layout LyX-Code
21516 \begin_inset Quotes erd
21520 \begin_inset Quotes erd
21526 \begin_layout LyX-Code
21527 <labeltag>Label</labeltag>
21530 \begin_layout LyX-Code
21532 \begin_inset Quotes erd
21536 \begin_inset Quotes erd
21539 >Contents of the inset.</innertag>
21542 \begin_layout LyX-Code
21546 \begin_layout Standard
21547 If the inset permits multiple paragraphs—that is, if
21548 \begin_inset Flex Code
21551 \begin_layout Plain Layout
21557 is true—then the contents of the inset will itself be output as paragraphs
21558 formatted according to the styles used for those paragraphs (standard,
21559 quote, and the like).
21560 The label tag is of course omitted if the paragraph does not have a label
21561 and, at present, is always
21562 \begin_inset Flex Code
21565 \begin_layout Plain Layout
21572 The inner tag is optional and, by default, does not appear.
21575 \begin_layout Standard
21576 The specific tags and attributes output for each inset can be controlled
21577 by means of the following layout tags.
21580 \begin_layout Description
21581 \begin_inset Flex Code
21584 \begin_layout Plain Layout
21591 \begin_inset Flex Code
21594 \begin_layout Plain Layout
21600 ] Specifies attribute information to be output with the main tag.
21602 \begin_inset Quotes eld
21606 \begin_inset Flex Code
21609 \begin_layout Plain Layout
21610 class=`myinset' onclick=`\SpecialChar ldots
21617 \begin_inset Quotes erd
21621 By default, \SpecialChar LyX
21623 \begin_inset Quotes eld
21627 \begin_inset Flex Code
21630 \begin_layout Plain Layout
21637 \begin_inset Quotes erd
21641 \begin_inset Flex Code
21644 \begin_layout Plain Layout
21650 is the \SpecialChar LyX
21651 name of the inset, made lowercase and with non-alphanumeric characters
21652 converted to underscores, for example: footnote.
21655 \begin_layout Description
21656 \begin_inset Flex Code
21659 \begin_layout Plain Layout
21666 \begin_inset Flex Code
21669 \begin_layout Plain Layout
21679 ] Whether to output the default CSS information \SpecialChar LyX
21680 generates for this layout,
21681 even if additional information is explicitly provided via
21682 \begin_inset Flex Code
21685 \begin_layout Plain Layout
21693 \begin_inset Flex Code
21696 \begin_layout Plain Layout
21702 allows you to alter or augment the generated CSS, rather than to override
21707 \begin_layout Description
21708 \begin_inset Flex Code
21711 \begin_layout Plain Layout
21718 \begin_inset Flex Code
21721 \begin_layout Plain Layout
21727 ] Attributes for the inner tag.
21729 \begin_inset Quotes eld
21733 \begin_inset Flex Code
21736 \begin_layout Plain Layout
21737 class=`insetname_inner'
21743 \begin_inset Quotes erd
21749 \begin_layout Description
21750 \begin_inset Flex Code
21753 \begin_layout Plain Layout
21760 \begin_inset Flex Code
21763 \begin_layout Plain Layout
21769 ] The inner tag, replacing
21770 \begin_inset Flex Code
21773 \begin_layout Plain Layout
21779 in the examples above.
21780 By default, there is none.
21783 \begin_layout Description
21784 \begin_inset Flex Code
21787 \begin_layout Plain Layout
21794 \begin_inset Flex Code
21797 \begin_layout Plain Layout
21805 ] Whether this inset represents a standalone block of text (such as a footnote)
21806 or instead represents material that is included in the surrounding text
21807 (such as a branch).
21811 \begin_layout Description
21812 \begin_inset Flex Code
21815 \begin_layout Plain Layout
21822 \begin_inset Flex Code
21825 \begin_layout Plain Layout
21831 ] A label for this inset, possibly including a reference to a counter.
21832 For example, for footnote, it might be:
21833 \begin_inset Flex Code
21836 \begin_layout Plain Layout
21845 This is optional, and there is no default.
21848 \begin_layout Description
21849 \begin_inset Flex Code
21852 \begin_layout Plain Layout
21858 Information to be output in the
21859 \begin_inset Flex Code
21862 \begin_layout Plain Layout
21868 section when this style is used.
21869 This might, for example, be used to include a
21870 \begin_inset Flex Code
21873 \begin_layout Plain Layout
21880 \begin_inset Flex Code
21883 \begin_layout Plain Layout
21892 \begin_layout Description
21893 \begin_inset Flex Code
21896 \begin_layout Plain Layout
21902 CSS style information to be included when this style is used.
21903 Note that this will automatically be wrapped in a layout-generated
21904 \begin_inset Flex Code
21907 \begin_layout Plain Layout
21913 block, so only the CSS itself need be included.
21916 \begin_layout Description
21917 \begin_inset Flex Code
21920 \begin_layout Plain Layout
21927 \begin_inset Flex Code
21930 \begin_layout Plain Layout
21936 ] The tag to be used for the main label, replacing
21937 \begin_inset Flex Code
21940 \begin_layout Plain Layout
21946 in the examples above.
21947 The default depends upon the setting of
21948 \begin_inset Flex Code
21951 \begin_layout Plain Layout
21958 \begin_inset Flex Code
21961 \begin_layout Plain Layout
21967 is true, the default is
21968 \begin_inset Flex Code
21971 \begin_layout Plain Layout
21977 ; if it is false, the default is
21978 \begin_inset Flex Code
21981 \begin_layout Plain Layout
21990 \begin_layout Subsection
21994 \begin_layout Standard
21995 The XHTML output for floats too can be controlled by layout information.
21996 The output has the following form:
21999 \begin_layout LyX-Code
22001 \begin_inset Quotes erd
22005 \begin_inset Quotes erd
22011 \begin_layout LyX-Code
22012 Contents of the float.
22015 \begin_layout LyX-Code
22019 \begin_layout Standard
22020 The caption, if there is one, is a separate inset and will be output as
22022 Its appearance can be controlled via the InsetLayout for caption insets.
22026 \begin_layout Description
22027 \begin_inset Flex Code
22030 \begin_layout Plain Layout
22037 \begin_inset Flex Code
22040 \begin_layout Plain Layout
22046 ] Specifies attribute information to be output with the main tag.
22048 \begin_inset Quotes eld
22052 \begin_inset Flex Code
22055 \begin_layout Plain Layout
22056 class=`myfloat' onclick=`\SpecialChar ldots
22063 \begin_inset Quotes erd
22067 By default, \SpecialChar LyX
22069 \begin_inset Quotes eld
22073 \begin_inset Flex Code
22076 \begin_layout Plain Layout
22077 class=`float float-floattype'
22083 \begin_inset Quotes erd
22087 \begin_inset Flex Code
22090 \begin_layout Plain Layout
22096 is \SpecialChar LyX
22097 's name for this type of float, as determined by the float declaration
22099 \begin_inset CommandInset ref
22101 reference "sub:Floats"
22105 ), though made lowercase and with non-alphanumeric characters converted
22106 to underscores, for example: float-table.
22109 \begin_layout Description
22110 \begin_inset Flex Code
22113 \begin_layout Plain Layout
22119 CSS style information to be included when this float is used.
22120 Note that this will automatically be wrapped in a layout-generated
22121 \begin_inset Flex Code
22124 \begin_layout Plain Layout
22130 block, so only the CSS itself need be included.
22133 \begin_layout Description
22134 \begin_inset Flex Code
22137 \begin_layout Plain Layout
22144 \begin_inset Flex Code
22147 \begin_layout Plain Layout
22153 ] The tag to be used for this float, replacing
22154 \begin_inset Quotes eld
22158 \begin_inset Flex Code
22161 \begin_layout Plain Layout
22168 \begin_inset Quotes erd
22171 in the example above.
22173 \begin_inset Flex Code
22176 \begin_layout Plain Layout
22182 and will rarely need changing.
22185 \begin_layout Subsection
22186 Bibliography formatting
22189 \begin_layout Standard
22190 The bibliography can be formatted using
22191 \begin_inset Flex Code
22194 \begin_layout Plain Layout
22202 \begin_inset CommandInset ref
22204 reference "sub:Citation-format-description"
22211 \begin_layout Subsection
22216 \begin_layout Standard
22217 We have several times mentioned that \SpecialChar LyX
22218 will generate default CSS style rules
22219 for both insets and paragraph styles, based upon the other layout information
22221 In this section, we shall say a word about which layout information \SpecialChar LyX
22226 \begin_layout Standard
22227 At present, \SpecialChar LyX
22228 auto-generates CSS only for font information, making use of
22230 \begin_inset Flex Code
22233 \begin_layout Plain Layout
22240 \begin_inset Flex Code
22243 \begin_layout Plain Layout
22250 \begin_inset Flex Code
22253 \begin_layout Plain Layout
22260 \begin_inset Flex Code
22263 \begin_layout Plain Layout
22270 \begin_inset Flex Code
22273 \begin_layout Plain Layout
22280 \begin_inset CommandInset ref
22282 reference "sub:Font-description"
22287 The translation is mostly straightforward and obvious.
22289 \begin_inset Quotes eld
22293 \begin_inset Flex Code
22296 \begin_layout Plain Layout
22303 \begin_inset Quotes erd
22307 \begin_inset Quotes eld
22311 \begin_inset Flex Code
22314 \begin_layout Plain Layout
22315 font-family: sans-serif;
22321 \begin_inset Quotes erd
22325 The correspondence of \SpecialChar LyX
22326 sizes and CSS sizes is a little less obvious but
22327 nonetheless intuitive.
22329 \begin_inset Flex Code
22332 \begin_layout Plain Layout
22339 \begin_inset Flex URL
22342 \begin_layout Plain Layout
22352 \begin_layout Chapter
22353 Including External Material
22354 \begin_inset CommandInset label
22356 name "chap:Including-External-Material"
22363 \begin_layout Standard
22364 \begin_inset Box Shadowbox
22374 height_special "totalheight"
22377 \begin_layout Plain Layout
22378 WARNING: This portion of the documentation has not been updated for some
22380 We certainly hope that it is still accurate, but there are no guarantees.
22388 \begin_layout Standard
22389 The use of material from sources external to \SpecialChar LyX
22390 is covered in detail in the
22396 This part of the manual covers what needs to happen behind the scenes for
22397 new sorts of material to be included.
22400 \begin_layout Section
22404 \begin_layout Standard
22405 The external material feature is based on the concept of a
22410 A template is a specification of how \SpecialChar LyX
22411 should interface with a certain kind
22413 As bundled, \SpecialChar LyX
22414 comes with predefined templates for Xfig figures, various
22415 raster format images, chess diagrams, and LilyPond music notation.
22416 You can check the actual list by using the menu
22417 \begin_inset Flex MenuItem
22420 \begin_layout Plain Layout
22421 Insert\SpecialChar menuseparator
22422 File\SpecialChar menuseparator
22429 Furthermore, it is possible to roll your own template to support a specific
22431 Later we'll describe in more detail what is involved, and hopefully you
22432 will submit all the templates you create so we can include them in a later
22437 \begin_layout Standard
22438 Another basic idea of the external material feature is to distinguish between
22439 the original file that serves as a base for final material and the produced
22440 file that is included in your exported or printed document.
22441 For example, consider the case of a figure produced with
22442 \begin_inset Flex Code
22445 \begin_layout Plain Layout
22452 The Xfig application itself works on an original file with the
22453 \begin_inset Flex Code
22456 \begin_layout Plain Layout
22463 Within Xfig, you create and change your figure, and when you are done,
22465 \begin_inset Flex Code
22468 \begin_layout Plain Layout
22475 When you want to include the figure in your document, you invoke
22476 \begin_inset Flex Code
22479 \begin_layout Plain Layout
22485 in order to create a PostScript file that can readily be included in your
22489 \begin_inset Flex Code
22492 \begin_layout Plain Layout
22498 file is the original file, and the PostScript file is the produced file.
22501 \begin_layout Standard
22502 This distinction is important in order to allow updating of the material
22503 while you are in the process of writing the document.
22504 Furthermore, it provides us with the flexibility that is needed to support
22505 multiple export formats.
22506 For instance, in the case of a plain text file, it is not exactly an award-winn
22507 ing idea to include the figure as raw PostScript.
22508 Instead, you would either prefer to just include a reference to the figure
22509 or try to invoke some graphics to ASCII converter to make the final result
22510 look similar to the real graphics.
22511 The external material management allows you to do this, because it is parametri
22512 zed on the different export formats that \SpecialChar LyX
22516 \begin_layout Standard
22517 Besides supporting the production of different products according to the
22518 exported format, it supports tight integration with editing and viewing
22520 In the case of an Xfig figure, you are able to invoke Xfig on the original
22521 file with a single click from within the external material dialog in \SpecialChar LyX
22523 and also preview the produced PostScript file with Ghostview with another
22525 No more fiddling around with the command line and/or file browsers to locate
22526 and manipulate the original or produced files.
22527 In this way, you are finally able to take full advantage of the many different
22528 applications that are relevant to use when you write your documents, and
22529 ultimately be more productive.
22532 \begin_layout Section
22533 The external template configuration file
22536 \begin_layout Standard
22537 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22539 However, be aware that doing this in an careless manner most probably
22543 introduce an easily exploitable security hole.
22544 So before you do this, please read the discussion about security in
22545 \begin_inset CommandInset ref
22547 reference "sec:Security-discussion"
22554 \begin_layout Standard
22555 Having said that, we encourage you to submit any interesting templates that
22560 \begin_layout Standard
22561 The external templates are defined in the
22562 \begin_inset Flex Code
22565 \begin_layout Plain Layout
22567 Dir/lib/external_templates
22573 You can place your own version in
22574 \begin_inset Flex Code
22577 \begin_layout Plain Layout
22578 UserDir/external_templates
22586 \begin_layout Standard
22587 A typical template looks like this:
22590 \begin_layout LyX-Code
22594 \begin_layout LyX-Code
22595 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22598 \begin_layout LyX-Code
22602 \begin_layout LyX-Code
22606 \begin_layout LyX-Code
22610 \begin_layout LyX-Code
22614 \begin_layout LyX-Code
22618 \begin_layout LyX-Code
22619 AutomaticProduction true
22622 \begin_layout LyX-Code
22626 \begin_layout LyX-Code
22630 \begin_layout LyX-Code
22631 Format \SpecialChar LaTeX
22635 \begin_layout LyX-Code
22636 TransformCommand Rotate RotationLatexCommand
22639 \begin_layout LyX-Code
22640 TransformCommand Resize ResizeLatexCommand
22643 \begin_layout LyX-Code
22644 Product "$$RotateFront$$ResizeFront
22647 \begin_layout LyX-Code
22652 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22655 \begin_layout LyX-Code
22656 $$ResizeBack$$RotateBack"
22659 \begin_layout LyX-Code
22663 \begin_layout LyX-Code
22664 UpdateResult "$$AbsPath$$Basename.pstex_t"
22667 \begin_layout LyX-Code
22668 Requirement "graphicx"
22671 \begin_layout LyX-Code
22672 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22675 \begin_layout LyX-Code
22676 ReferencedFile latex "$$AbsPath$$Basename.eps"
22679 \begin_layout LyX-Code
22680 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22683 \begin_layout LyX-Code
22687 \begin_layout LyX-Code
22688 Format PDF\SpecialChar LaTeX
22692 \begin_layout LyX-Code
22693 TransformCommand Rotate RotationLatexCommand
22696 \begin_layout LyX-Code
22697 TransformCommand Resize ResizeLatexCommand
22700 \begin_layout LyX-Code
22701 Product "$$RotateFront$$ResizeFront
22704 \begin_layout LyX-Code
22709 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22712 \begin_layout LyX-Code
22713 $$ResizeBack$$RotateBack"
22716 \begin_layout LyX-Code
22717 UpdateFormat pdftex
22720 \begin_layout LyX-Code
22721 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22724 \begin_layout LyX-Code
22725 Requirement "graphicx"
22728 \begin_layout LyX-Code
22729 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22732 \begin_layout LyX-Code
22733 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22736 \begin_layout LyX-Code
22740 \begin_layout LyX-Code
22744 \begin_layout LyX-Code
22745 Product "$$Contents(
22747 "$$AbsPath$$Basename.asc
22752 \begin_layout LyX-Code
22753 UpdateFormat asciixfig
22756 \begin_layout LyX-Code
22757 UpdateResult "$$AbsPath$$Basename.asc"
22760 \begin_layout LyX-Code
22764 \begin_layout LyX-Code
22768 \begin_layout LyX-Code
22769 Product "<graphic fileref=
22771 "$$AbsOrRelPathMaster$$Basename.eps
22776 \begin_layout LyX-Code
22780 \begin_layout LyX-Code
22784 \begin_layout LyX-Code
22785 UpdateResult "$$AbsPath$$Basename.eps"
22788 \begin_layout LyX-Code
22789 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22792 \begin_layout LyX-Code
22793 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22796 \begin_layout LyX-Code
22800 \begin_layout LyX-Code
22801 Product "[XFig: $$FName]"
22804 \begin_layout LyX-Code
22808 \begin_layout LyX-Code
22812 \begin_layout Standard
22813 As you can see, the template is enclosed in
22814 \begin_inset Flex Code
22817 \begin_layout Plain Layout
22825 \begin_inset Flex Code
22828 \begin_layout Plain Layout
22835 It contains a header specifying some general settings and, for each supported
22836 primary document file format, a section
22837 \begin_inset Flex Code
22840 \begin_layout Plain Layout
22848 \begin_inset Flex Code
22851 \begin_layout Plain Layout
22860 \begin_layout Subsection
22861 The template header
22864 \begin_layout Description
22865 \begin_inset Flex Code
22868 \begin_layout Plain Layout
22869 AutomaticProduction
22870 \begin_inset space ~
22878 Whether the file represented by the template must be generated by \SpecialChar LyX
22880 This command must occur exactly once.
22883 \begin_layout Description
22884 \begin_inset Flex Code
22887 \begin_layout Plain Layout
22889 \begin_inset space ~
22897 A glob pattern that is used in the file dialog to filter out the desired
22899 If there is more than one possible file extension (e.
22900 \begin_inset space \thinspace{}
22904 \begin_inset space \space{}
22908 \begin_inset Flex Code
22911 \begin_layout Plain Layout
22918 \begin_inset Flex Code
22921 \begin_layout Plain Layout
22927 ), use something like
22928 \begin_inset Flex Code
22931 \begin_layout Plain Layout
22938 This command must occur exactly once.
22941 \begin_layout Description
22942 \begin_inset Flex Code
22945 \begin_layout Plain Layout
22947 \begin_inset space ~
22955 The text that is displayed on the button.
22956 This command must occur exactly once.
22959 \begin_layout Description
22960 \begin_inset Flex Code
22963 \begin_layout Plain Layout
22965 \begin_inset space ~
22969 \begin_inset space ~
22977 The help text that is used in the External dialog.
22978 Provide enough information to explain to the user just what the template
22979 can provide him with.
22980 This command must occur exactly once.
22983 \begin_layout Description
22984 \begin_inset Flex Code
22987 \begin_layout Plain Layout
22989 \begin_inset space ~
22997 The file format of the original file.
22998 This must be the name of a format that is known to \SpecialChar LyX
23000 \begin_inset CommandInset ref
23002 reference "sec:Formats"
23008 \begin_inset Quotes eld
23012 \begin_inset Flex Code
23015 \begin_layout Plain Layout
23022 \begin_inset Quotes erd
23025 if the template can handle original files of more than one format.
23027 will attempt to interrogate the file itself in order to deduce its format
23029 This command must occur exactly once.
23032 \begin_layout Description
23033 \begin_inset Flex Code
23036 \begin_layout Plain Layout
23038 \begin_inset space ~
23046 A unique name for the template.
23047 It must not contain substitution macros (see below).
23050 \begin_layout Description
23051 \begin_inset Flex Code
23054 \begin_layout Plain Layout
23056 \begin_inset space ~
23059 Rotate|Resize|Clip|Extra
23064 This command specifies which transformations are supported by this template.
23065 It may occur zero or more times.
23066 This command enables the corresponding tabs in the external dialog.
23068 \begin_inset Flex Code
23071 \begin_layout Plain Layout
23077 command must have either a corresponding
23078 \begin_inset Flex Code
23081 \begin_layout Plain Layout
23088 \begin_inset Flex Code
23091 \begin_layout Plain Layout
23098 \begin_inset Flex Code
23101 \begin_layout Plain Layout
23108 Otherwise the transformation will not be supported by that format.
23111 \begin_layout Subsection
23115 \begin_layout Description
23116 \begin_inset Flex Code
23119 \begin_layout Plain Layout
23121 \begin_inset space ~
23125 |PDF\SpecialChar LaTeX
23131 The primary document file format that this format definition is for.
23132 Not every template has a sensible representation in all document file formats.
23133 Please define nevertheless a
23134 \begin_inset Flex Code
23137 \begin_layout Plain Layout
23143 section for all templates.
23144 Use a dummy text when no representation is available.
23145 Then you can at least see a reference to the external material in the exported
23149 \begin_layout Description
23150 \begin_inset Flex Code
23153 \begin_layout Plain Layout
23155 \begin_inset space ~
23159 \begin_inset space ~
23167 This command defines an additional macro
23168 \begin_inset Flex Code
23171 \begin_layout Plain Layout
23177 for substitution in
23178 \begin_inset Flex Code
23181 \begin_layout Plain Layout
23189 \begin_inset Flex Code
23192 \begin_layout Plain Layout
23198 itself may contain substitution macros.
23199 The advantage over using
23200 \begin_inset Flex Code
23203 \begin_layout Plain Layout
23210 \begin_inset Flex Code
23213 \begin_layout Plain Layout
23219 is that the substituted value of
23220 \begin_inset Flex Code
23223 \begin_layout Plain Layout
23229 is sanitized so that it is a valid optional argument in the document format.
23230 This command may occur zero or more times.
23233 \begin_layout Description
23234 \begin_inset Flex Code
23237 \begin_layout Plain Layout
23239 \begin_inset space ~
23247 The text that is inserted in the exported document.
23248 This is actually the most important command and can be quite complex.
23249 This command must occur exactly once.
23252 \begin_layout Description
23253 \begin_inset Flex Code
23256 \begin_layout Plain Layout
23258 \begin_inset space ~
23266 This command specifies a preamble snippet that will be included in the
23269 It has to be defined using
23270 \begin_inset Flex Code
23273 \begin_layout Plain Layout
23281 \begin_inset Flex Code
23284 \begin_layout Plain Layout
23291 This command may occur zero or more times.
23294 \begin_layout Description
23295 \begin_inset Flex Code
23298 \begin_layout Plain Layout
23300 \begin_inset space ~
23304 \begin_inset space ~
23312 This command denotes files that are created by the conversion process and
23313 are needed for a particular export format.
23314 If the filename is relative, it is interpreted relative to the master document.
23315 This command may be given zero or more times.
23318 \begin_layout Description
23319 \begin_inset Flex Code
23322 \begin_layout Plain Layout
23324 \begin_inset space ~
23332 The name of a required \SpecialChar LaTeX
23334 The package is included via
23335 \begin_inset Flex Code
23338 \begin_layout Plain Layout
23346 in the \SpecialChar LaTeX
23348 This command may occur zero or more times.
23351 \begin_layout Description
23352 \begin_inset Flex Code
23355 \begin_layout Plain Layout
23357 \begin_inset space ~
23361 \begin_inset space ~
23364 RotationLatexCommand
23369 This command specifies that the built in \SpecialChar LaTeX
23370 command should be used for rotation.
23371 This command may occur once or not at all.
23374 \begin_layout Description
23375 \begin_inset Flex Code
23378 \begin_layout Plain Layout
23380 \begin_inset space ~
23384 \begin_inset space ~
23392 This command specifies that the built in \SpecialChar LaTeX
23393 command should be used for resizing.
23394 This command may occur once or not at all.
23397 \begin_layout Description
23398 \begin_inset Flex Code
23401 \begin_layout Plain Layout
23403 \begin_inset space ~
23407 \begin_inset space ~
23410 RotationLatexOption
23415 This command specifies that rotation is done via an optional argument.
23416 This command may occur once or not at all.
23419 \begin_layout Description
23420 \begin_inset Flex Code
23423 \begin_layout Plain Layout
23425 \begin_inset space ~
23429 \begin_inset space ~
23437 This command specifies that resizing is done via an optional argument.
23438 This command may occur once or not at all.
23441 \begin_layout Description
23442 \begin_inset Flex Code
23445 \begin_layout Plain Layout
23447 \begin_inset space ~
23451 \begin_inset space ~
23459 This command specifies that clipping is done via an optional argument.
23460 This command may occur once or not at all.
23463 \begin_layout Description
23464 \begin_inset Flex Code
23467 \begin_layout Plain Layout
23469 \begin_inset space ~
23473 \begin_inset space ~
23481 This command specifies that an extra optional argument is used.
23482 This command may occur once or not at all.
23485 \begin_layout Description
23486 \begin_inset Flex Code
23489 \begin_layout Plain Layout
23491 \begin_inset space ~
23499 The file format of the converted file.
23500 This must be the name of a format that is known to \SpecialChar LyX
23502 \begin_inset Flex MenuItem
23505 \begin_layout Plain Layout
23506 Tools\SpecialChar menuseparator
23507 Preferences\SpecialChar menuseparator
23508 File Handling\SpecialChar menuseparator
23515 This command must occur exactly once.
23516 If the resulting file format is PDF, you need to specify the format
23517 \begin_inset Flex Code
23520 \begin_layout Plain Layout
23527 This is the PDF format used for including graphics.
23528 The other defined PDF formats are for document export.
23531 \begin_layout Description
23532 \begin_inset Flex Code
23535 \begin_layout Plain Layout
23537 \begin_inset space ~
23545 The file name of the converted file.
23546 The file name must be absolute.
23547 This command must occur exactly once.
23550 \begin_layout Subsection
23551 Preamble definitions
23554 \begin_layout Standard
23555 The external template configuration file may contain additional preamble
23556 definitions enclosed by
23557 \begin_inset Flex Code
23560 \begin_layout Plain Layout
23568 \begin_inset Flex Code
23571 \begin_layout Plain Layout
23578 They can be used by the templates in the
23579 \begin_inset Flex Code
23582 \begin_layout Plain Layout
23591 \begin_layout Section
23592 The substitution mechanism
23595 \begin_layout Standard
23596 When the external material facility invokes an external program, it is done
23597 on the basis of a command defined in the template configuration file.
23598 These commands can contain various macros that are expanded before execution.
23599 Execution always take place in the directory of the containing document.
23602 \begin_layout Standard
23603 Also, whenever external material is to be displayed, the name will be produced
23604 by the substitution mechanism, and most other commands in the template
23605 definition support substitution as well.
23608 \begin_layout Standard
23609 The available macros are the following:
23612 \begin_layout Description
23613 \begin_inset Flex Code
23616 \begin_layout Plain Layout
23617 $$AbsOrRelPathMaster
23622 The file path, absolute or relative to the master \SpecialChar LyX
23626 \begin_layout Description
23627 \begin_inset Flex Code
23630 \begin_layout Plain Layout
23631 $$AbsOrRelPathParent
23636 The file path, absolute or relative to the \SpecialChar LyX
23640 \begin_layout Description
23641 \begin_inset Flex Code
23644 \begin_layout Plain Layout
23650 The absolute file path.
23653 \begin_layout Description
23654 \begin_inset Flex Code
23657 \begin_layout Plain Layout
23663 The filename without path and without the extension.
23666 \begin_layout Description
23667 \begin_inset Flex Code
23670 \begin_layout Plain Layout
23672 \begin_inset Quotes eld
23676 \begin_inset Quotes erd
23684 This macro will expand to the contents of the file with the name
23685 \begin_inset Flex Code
23688 \begin_layout Plain Layout
23697 \begin_layout Description
23698 \begin_inset Flex Code
23701 \begin_layout Plain Layout
23707 The file extension (including the dot).
23710 \begin_layout Description
23711 \begin_inset Flex Code
23714 \begin_layout Plain Layout
23720 The filename of the file specified in the external material dialog.
23721 This is either an absolute name, or it is relative to the \SpecialChar LyX
23725 \begin_layout Description
23726 \begin_inset Flex Code
23729 \begin_layout Plain Layout
23736 \begin_inset Flex Code
23739 \begin_layout Plain Layout
23745 (absolute name or relative to the \SpecialChar LyX
23749 \begin_layout Description
23750 \begin_inset Flex Code
23753 \begin_layout Plain Layout
23759 The file path, relative to the master \SpecialChar LyX
23763 \begin_layout Description
23764 \begin_inset Flex Code
23767 \begin_layout Plain Layout
23773 The file path, relative to the \SpecialChar LyX
23777 \begin_layout Description
23778 \begin_inset Flex Code
23781 \begin_layout Plain Layout
23787 This macro will expand to the absolute path of the system directory.
23788 This is typically used to point to the various helper scripts that are
23789 bundled with \SpecialChar LyX
23793 \begin_layout Description
23794 \begin_inset Flex Code
23797 \begin_layout Plain Layout
23803 A name and full path to a temporary file which will be automatically deleted
23804 whenever the containing document is closed, or the external material insertion
23808 \begin_layout Standard
23809 All path macros contain a trailing directory separator, so you can construct
23811 \begin_inset space \thinspace{}
23815 \begin_inset space \space{}
23818 the absolute filename with
23819 \begin_inset Flex Code
23822 \begin_layout Plain Layout
23823 $$AbsPath$$Basename$$Extension
23831 \begin_layout Standard
23832 The macros above are substituted in all commands unless otherwise noted.
23834 \begin_inset Flex Code
23837 \begin_layout Plain Layout
23843 supports additionally the following substitutions if they are enabled by
23845 \begin_inset Flex Code
23848 \begin_layout Plain Layout
23855 \begin_inset Flex Code
23858 \begin_layout Plain Layout
23867 \begin_layout Description
23868 \begin_inset Flex Code
23871 \begin_layout Plain Layout
23877 The front part of the resize command.
23880 \begin_layout Description
23881 \begin_inset Flex Code
23884 \begin_layout Plain Layout
23890 The back part of the resize command.
23893 \begin_layout Description
23894 \begin_inset Flex Code
23897 \begin_layout Plain Layout
23903 The front part of the rotation command.
23906 \begin_layout Description
23907 \begin_inset Flex Code
23910 \begin_layout Plain Layout
23916 The back part of the rotation command.
23919 \begin_layout Standard
23920 The value string of the
23921 \begin_inset Flex Code
23924 \begin_layout Plain Layout
23930 command supports additionally the following substitutions if they are enabled
23932 \begin_inset Flex Code
23935 \begin_layout Plain Layout
23942 \begin_inset Flex Code
23945 \begin_layout Plain Layout
23954 \begin_layout Description
23955 \begin_inset Flex Code
23958 \begin_layout Plain Layout
23967 \begin_layout Description
23968 \begin_inset Flex Code
23971 \begin_layout Plain Layout
23980 \begin_layout Description
23981 \begin_inset Flex Code
23984 \begin_layout Plain Layout
23993 \begin_layout Description
23994 \begin_inset Flex Code
23997 \begin_layout Plain Layout
24003 The rotation option.
24006 \begin_layout Standard
24007 You may ask why there are so many path macros.
24008 There are mainly two reasons:
24011 \begin_layout Enumerate
24012 Relative and absolute file names should remain relative or absolute, respectivel
24014 Users may have reasons to prefer either form.
24015 Relative names are useful for portable documents that should work on different
24016 machines, for example.
24017 Absolute names may be required by some programs.
24020 \begin_layout Enumerate
24022 treats relative file names differently than \SpecialChar LyX
24023 and other programs in nested
24025 For \SpecialChar LyX
24026 , a relative file name is always relative to the document that contains
24028 For \SpecialChar LaTeX
24029 , it is always relative to the master document.
24030 These two definitions are identical if you have only one document, but
24031 differ if you have a master document that includes part documents.
24032 That means that relative filenames must be transformed when presented to
24035 Fortunately \SpecialChar LyX
24036 does this automatically for you if you choose the right macros.
24039 \begin_layout Standard
24040 So which path macro should be used in new template definitions? The rule
24044 \begin_layout Itemize
24046 \begin_inset Flex Code
24049 \begin_layout Plain Layout
24055 if an absolute path is required.
24058 \begin_layout Itemize
24060 \begin_inset Flex Code
24063 \begin_layout Plain Layout
24064 $$AbsOrRelPathMaster
24069 if the substituted string is some kind of \SpecialChar LaTeX
24073 \begin_layout Itemize
24075 \begin_inset Flex Code
24078 \begin_layout Plain Layout
24079 $$AbsOrRelPathParent
24084 in order to preserve the user's choice.
24087 \begin_layout Standard
24088 There are special cases where this rule does not work and e.
24089 \begin_inset space \thinspace{}
24093 \begin_inset space \space{}
24096 relative names are needed, but normally it will work just fine.
24097 One example for such a case is the command
24098 \begin_inset Flex Code
24101 \begin_layout Plain Layout
24102 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24107 in the XFig template above: We can't use the absolute name because the
24109 \begin_inset Flex Code
24112 \begin_layout Plain Layout
24118 files needs the relative name in order to rewrite the file content.
24121 \begin_layout Section
24122 Security discussion
24123 \begin_inset CommandInset label
24125 name "sec:Security-discussion"
24132 \begin_layout Standard
24133 The external material feature interfaces with a lot of external programs
24134 and does so automatically, so we have to consider the security implications
24136 In particular, since you have the option of including your own filenames
24137 and/or parameter strings and those are expanded into a command, it seems
24138 that it would be possible to create a malicious document which executes
24139 arbitrary commands when a user views or prints the document.
24140 This is something we definitely want to avoid.
24143 \begin_layout Standard
24144 However, since the external program commands are specified in the template
24145 configuration file only, there are no security issues if \SpecialChar LyX
24146 is properly configure
24147 d with safe templates only.
24148 This is so because the external programs are invoked with the
24149 \begin_inset Flex Code
24152 \begin_layout Plain Layout
24158 -system call rather than the
24159 \begin_inset Flex Code
24162 \begin_layout Plain Layout
24168 system-call, so it's not possible to execute arbitrary commands from the
24169 filename or parameter section via the shell.
24172 \begin_layout Standard
24173 This also implies that you are restricted in what command strings you can
24174 use in the external material templates.
24175 In particular, pipes and redirection are not readily available.
24176 This has to be so if \SpecialChar LyX
24177 should remain safe.
24178 If you want to use some of the shell features, you should write a safe
24179 script to do this in a controlled manner, and then invoke the script from
24180 the command string.
24184 \begin_layout Standard
24185 It is possible to design a template that interacts directly with the shell,
24186 but since this would allow a malicious user to execute arbitrary commands
24187 by writing clever filenames and/or parameters, we generally recommend that
24188 you only use safe scripts that work with the
24189 \begin_inset Flex Code
24192 \begin_layout Plain Layout
24198 system call in a controlled manner.
24199 Of course, for use in a controlled environment, it can be tempting to just
24200 fall back to use ordinary shell scripts.
24201 If you do so, be aware that you
24205 provide an easily exploitable security hole in your system.
24206 Of course it stands to reason that such unsafe templates will never be
24207 included in the standard \SpecialChar LyX
24208 distribution, although we do encourage people
24209 to submit new templates in the open source tradition.
24210 But \SpecialChar LyX
24211 as shipped from the official distribution channels will never have
24215 \begin_layout Standard
24216 Including external material provides a lot of power, and you have to be
24217 careful not to introduce security hazards with this power.
24218 A subtle error in a single line in an innocent looking script can open
24219 the door to huge security problems.
24220 So if you do not fully understand the issues, we recommend that you consult
24221 a knowledgeable security professional or the \SpecialChar LyX
24222 development team if you have
24223 any questions about whether a given template is safe or not.
24224 And do this before you use it in an uncontrolled environment.
24227 \begin_layout Chapter
24229 List of supported \SpecialChar LyX
24230 functions to be used in layouts
24231 \begin_inset CommandInset label
24233 name "chap:List-of-functions"
24240 \begin_layout Standard
24242 \begin_inset Tabular
24243 <lyxtabular version="3" rows="11" columns="8">
24244 <features tabularvalignment="middle">
24245 <column alignment="left" valignment="top">
24246 <column alignment="left" valignment="top">
24247 <column alignment="left" valignment="top">
24248 <column alignment="left" valignment="top">
24249 <column alignment="left" valignment="top">
24250 <column alignment="left" valignment="top">
24251 <column alignment="left" valignment="top">
24252 <column alignment="left" valignment="top">
24254 <cell alignment="left" valignment="top" usebox="none">
24257 \begin_layout Plain Layout
24263 <cell alignment="left" valignment="top" usebox="none">
24266 \begin_layout Plain Layout
24272 <cell alignment="left" valignment="top" usebox="none">
24275 \begin_layout Plain Layout
24281 <cell alignment="left" valignment="top" usebox="none">
24284 \begin_layout Plain Layout
24290 <cell alignment="center" valignment="top" usebox="none">
24293 \begin_layout Plain Layout
24299 <cell alignment="center" valignment="top" usebox="none">
24302 \begin_layout Plain Layout
24308 <cell alignment="center" valignment="top" usebox="none">
24311 \begin_layout Plain Layout
24317 <cell alignment="center" valignment="top" usebox="none">
24320 \begin_layout Plain Layout
24328 <cell alignment="left" valignment="top" usebox="none">
24331 \begin_layout Plain Layout
24337 <cell alignment="left" valignment="top" usebox="none">
24340 \begin_layout Plain Layout
24346 <cell alignment="left" valignment="top" usebox="none">
24349 \begin_layout Plain Layout
24355 <cell alignment="left" valignment="top" usebox="none">
24358 \begin_layout Plain Layout
24364 <cell alignment="center" valignment="top" usebox="none">
24367 \begin_layout Plain Layout
24373 <cell alignment="center" valignment="top" usebox="none">
24376 \begin_layout Plain Layout
24382 <cell alignment="center" valignment="top" usebox="none">
24385 \begin_layout Plain Layout
24391 <cell alignment="center" valignment="top" usebox="none">
24394 \begin_layout Plain Layout
24402 <cell alignment="left" valignment="top" usebox="none">
24405 \begin_layout Plain Layout
24411 <cell alignment="left" valignment="top" usebox="none">
24414 \begin_layout Plain Layout
24420 <cell alignment="left" valignment="top" usebox="none">
24423 \begin_layout Plain Layout
24429 <cell alignment="left" valignment="top" usebox="none">
24432 \begin_layout Plain Layout
24438 <cell alignment="center" valignment="top" usebox="none">
24441 \begin_layout Plain Layout
24447 <cell alignment="center" valignment="top" usebox="none">
24450 \begin_layout Plain Layout
24456 <cell alignment="center" valignment="top" usebox="none">
24459 \begin_layout Plain Layout
24465 <cell alignment="center" valignment="top" usebox="none">
24468 \begin_layout Plain Layout
24476 <cell alignment="left" valignment="top" usebox="none">
24479 \begin_layout Plain Layout
24485 <cell alignment="left" valignment="top" usebox="none">
24488 \begin_layout Plain Layout
24494 <cell alignment="left" valignment="top" usebox="none">
24497 \begin_layout Plain Layout
24503 <cell alignment="left" valignment="top" usebox="none">
24506 \begin_layout Plain Layout
24512 <cell alignment="center" valignment="top" usebox="none">
24515 \begin_layout Plain Layout
24521 <cell alignment="center" valignment="top" usebox="none">
24524 \begin_layout Plain Layout
24530 <cell alignment="center" valignment="top" usebox="none">
24533 \begin_layout Plain Layout
24539 <cell alignment="center" valignment="top" usebox="none">
24542 \begin_layout Plain Layout
24550 <cell alignment="left" valignment="top" usebox="none">
24553 \begin_layout Plain Layout
24559 <cell alignment="left" valignment="top" usebox="none">
24562 \begin_layout Plain Layout
24568 <cell alignment="left" valignment="top" usebox="none">
24571 \begin_layout Plain Layout
24577 <cell alignment="left" valignment="top" usebox="none">
24580 \begin_layout Plain Layout
24586 <cell alignment="center" valignment="top" usebox="none">
24589 \begin_layout Plain Layout
24595 <cell alignment="center" valignment="top" usebox="none">
24598 \begin_layout Plain Layout
24604 <cell alignment="center" valignment="top" usebox="none">
24607 \begin_layout Plain Layout
24613 <cell alignment="center" valignment="top" usebox="none">
24616 \begin_layout Plain Layout
24624 <cell alignment="left" valignment="top" usebox="none">
24627 \begin_layout Plain Layout
24633 <cell alignment="left" valignment="top" usebox="none">
24636 \begin_layout Plain Layout
24642 <cell alignment="left" valignment="top" usebox="none">
24645 \begin_layout Plain Layout
24651 <cell alignment="left" valignment="top" usebox="none">
24654 \begin_layout Plain Layout
24660 <cell alignment="center" valignment="top" usebox="none">
24663 \begin_layout Plain Layout
24669 <cell alignment="center" valignment="top" usebox="none">
24672 \begin_layout Plain Layout
24678 <cell alignment="center" valignment="top" usebox="none">
24681 \begin_layout Plain Layout
24687 <cell alignment="center" valignment="top" usebox="none">
24690 \begin_layout Plain Layout
24698 <cell alignment="left" valignment="top" usebox="none">
24701 \begin_layout Plain Layout
24707 <cell alignment="left" valignment="top" usebox="none">
24710 \begin_layout Plain Layout
24716 <cell alignment="left" valignment="top" usebox="none">
24719 \begin_layout Plain Layout
24725 <cell alignment="left" valignment="top" usebox="none">
24728 \begin_layout Plain Layout
24734 <cell alignment="center" valignment="top" usebox="none">
24737 \begin_layout Plain Layout
24743 <cell alignment="center" valignment="top" usebox="none">
24746 \begin_layout Plain Layout
24752 <cell alignment="center" valignment="top" usebox="none">
24755 \begin_layout Plain Layout
24761 <cell alignment="center" valignment="top" usebox="none">
24764 \begin_layout Plain Layout
24772 <cell alignment="left" valignment="top" usebox="none">
24775 \begin_layout Plain Layout
24781 <cell alignment="left" valignment="top" usebox="none">
24784 \begin_layout Plain Layout
24790 <cell alignment="left" valignment="top" usebox="none">
24793 \begin_layout Plain Layout
24799 <cell alignment="left" valignment="top" usebox="none">
24802 \begin_layout Plain Layout
24808 <cell alignment="center" valignment="top" usebox="none">
24811 \begin_layout Plain Layout
24817 <cell alignment="center" valignment="top" usebox="none">
24820 \begin_layout Plain Layout
24826 <cell alignment="center" valignment="top" usebox="none">
24829 \begin_layout Plain Layout
24835 <cell alignment="center" valignment="top" usebox="none">
24838 \begin_layout Plain Layout
24846 <cell alignment="left" valignment="top" usebox="none">
24849 \begin_layout Plain Layout
24855 <cell alignment="left" valignment="top" usebox="none">
24858 \begin_layout Plain Layout
24864 <cell alignment="left" valignment="top" usebox="none">
24867 \begin_layout Plain Layout
24873 <cell alignment="left" valignment="top" usebox="none">
24876 \begin_layout Plain Layout
24882 <cell alignment="center" valignment="top" usebox="none">
24885 \begin_layout Plain Layout
24891 <cell alignment="center" valignment="top" usebox="none">
24894 \begin_layout Plain Layout
24900 <cell alignment="center" valignment="top" usebox="none">
24903 \begin_layout Plain Layout
24909 <cell alignment="center" valignment="top" usebox="none">
24912 \begin_layout Plain Layout
24920 <cell alignment="left" valignment="top" usebox="none">
24923 \begin_layout Plain Layout
24929 <cell alignment="left" valignment="top" usebox="none">
24932 \begin_layout Plain Layout
24938 <cell alignment="left" valignment="top" usebox="none">
24941 \begin_layout Plain Layout
24947 <cell alignment="left" valignment="top" usebox="none">
24950 \begin_layout Plain Layout
24956 <cell alignment="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
24994 <cell alignment="center" valignment="top" usebox="none">
24997 \begin_layout Plain Layout
25003 <cell alignment="center" valignment="top" usebox="none">
25006 \begin_layout Plain Layout
25012 <cell alignment="center" valignment="top" usebox="none">
25015 \begin_layout Plain Layout
25021 <cell alignment="center" valignment="top" usebox="none">
25024 \begin_layout Plain Layout
25030 <cell alignment="center" valignment="top" usebox="none">
25033 \begin_layout Plain Layout
25039 <cell alignment="center" valignment="top" usebox="none">
25042 \begin_layout Plain Layout
25048 <cell alignment="center" valignment="top" usebox="none">
25051 \begin_layout Plain Layout
25057 <cell alignment="center" valignment="top" usebox="none">
25060 \begin_layout Plain Layout
25074 \begin_layout Chapter
25075 Names of available colors to be used in layouts
25076 \begin_inset CommandInset label
25078 name "chap:Names-of-colors"
25085 \begin_layout Standard
25086 The colors listed here are the standard colors and the those that you can
25087 adjust in the \SpecialChar LyX
25091 \begin_layout Description
25104 No particular color – clear or default
25107 \begin_layout Description
25111 \begin_layout Description
25115 \begin_layout Description
25119 \begin_layout Description
25123 \begin_layout Description
25127 \begin_layout Description
25131 \begin_layout Description
25135 \begin_layout Description
25139 \begin_layout Description
25140 added_space Added space marker color
25143 \begin_layout Description
25144 addedtext Added text color
25147 \begin_layout Description
25148 appendix Appendix marker color
25151 \begin_layout Description
25152 background Background color
25155 \begin_layout Description
25156 bottomarea Bottom area color
25159 \begin_layout Description
25160 branchlabel Label color for branches
25163 \begin_layout Description
25164 buttonbg Color used for bottom background
25167 \begin_layout Description
25168 buttonhoverbg Color used for button background under focus
25171 \begin_layout Description
25172 buttonframe Color for inset button frames
25175 \begin_layout Description
25176 changebar Changebar color
25179 \begin_layout Description
25180 changedtextauthor1 Changed text color author 1
25183 \begin_layout Description
25184 changedtextauthor2 Changed text color author 2
25187 \begin_layout Description
25188 changedtextauthor3 Changed text color author 3
25191 \begin_layout Description
25192 changedtextauthor4 Changed text color author 4
25195 \begin_layout Description
25196 changedtextauthor5 Changed text color author 5
25199 \begin_layout Description
25200 collapsable_inset_frame Collapsable insets framecolor
25203 \begin_layout Description
25204 collapsable_inset_text Collapsable insets text color
25207 \begin_layout Description
25208 command Text color for command insets
25211 \begin_layout Description
25212 commandbg Background color for command insets
25215 \begin_layout Description
25216 commandframe Frame color for command insets
25219 \begin_layout Description
25220 comment color for comments
25223 \begin_layout Description
25224 commentbg Background color of comments
25227 \begin_layout Description
25228 cursor Cursor color
25231 \begin_layout Description
25232 deletedtext Deleted text color
25235 \begin_layout Description
25236 deletedtextmodifier Deleted text modifying color
25239 \begin_layout Description
25240 depthbar Color for the depth bars in the margin
25243 \begin_layout Description
25244 eolmarker End of line marker color
25247 \begin_layout Description
25248 error Color of the \SpecialChar LaTeX
25252 \begin_layout Description
25253 footlabel Label color for footnotes
25256 \begin_layout Description
25257 graphicsbg Graphics inset background color
25260 \begin_layout Description
25261 greyedout Label color for greyedout insets
25264 \begin_layout Description
25265 greyedoutbg Background color of greyedout inset
25268 \begin_layout Description
25269 greyedouttext Color for greyedout inset text
25272 \begin_layout Description
25273 indexlabel Label color for index insets
25276 \begin_layout Description
25277 ignore The color is ignored
25280 \begin_layout Description
25281 inherit The color is inherited
25284 \begin_layout Description
25285 inlinecompletion Inline completion color
25288 \begin_layout Description
25289 insetbg Inset marker background color
25292 \begin_layout Description
25293 insetframe Inset marker frame color
25296 \begin_layout Description
25297 language Color for marking foreign language words
25300 \begin_layout Description
25301 latex Text color in \SpecialChar LaTeX
25305 \begin_layout Description
25306 listingsbg Background color of listings inset
25309 \begin_layout Description
25310 marginlabel Label color for margin notes
25313 \begin_layout Description
25314 math Math inset text color
25317 \begin_layout Description
25318 mathbg Math inset background color
25321 \begin_layout Description
25322 mathcorners Math inset frame color not under focus
25325 \begin_layout Description
25326 mathframe Math inset frame color under focus
25329 \begin_layout Description
25330 mathline Math line color
25333 \begin_layout Description
25334 mathmacrobg Macro math inset background color
25337 \begin_layout Description
25338 mathmacroblend Macro math blended color
25341 \begin_layout Description
25342 mathmacroframe Macro math frame color
25345 \begin_layout Description
25346 mathmacrohoverbg Macro math inset background color hovered
25349 \begin_layout Description
25350 mathmacrolabel Macro math label color
25353 \begin_layout Description
25354 mathmacronewarg Macro template color for new parameters
25357 \begin_layout Description
25358 mathmacrooldarg Macro template color for old parameters
25361 \begin_layout Description
25362 newpage New page color
25365 \begin_layout Description
25366 nonunique_inlinecompletion Inline completion color for the non-unique part
25369 \begin_layout Description
25370 notebg Background color of notes
25373 \begin_layout Description
25374 notelabel Label color for notes
25377 \begin_layout Description
25378 pagebreak Page break/line break color
25381 \begin_layout Description
25382 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25385 \begin_layout Description
25386 phantomtext Text color for phantom insets
25389 \begin_layout Description
25390 preview The color used for previews
25393 \begin_layout Description
25394 previewframe Preview frame color
25397 \begin_layout Description
25398 regexpframe Color for regexp frame
25401 \begin_layout Description
25402 selection Background color of selected text
25405 \begin_layout Description
25406 selectiontext Foreground color of selected text
25409 \begin_layout Description
25410 shadedbg Background color of shaded box
25413 \begin_layout Description
25414 special Special chars text color
25417 \begin_layout Description
25418 tabularline Table line color
25421 \begin_layout Description
25422 tabularonoffline Table line color
25425 \begin_layout Description
25426 urllabel Label color for URL insets
25429 \begin_layout Description
25430 urltext Color for URL inset text