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 1431166542
11398 \begin_layout Itemize
11400 \change_inserted -712698321 1431166604
11401 \begin_inset Flex Code
11404 \begin_layout Plain Layout
11406 \change_inserted -712698321 1431166548
11413 \begin_inset Flex Code
11416 \begin_layout Plain Layout
11418 \change_inserted -712698321 1431166543
11425 \begin_inset Flex Code
11428 \begin_layout Plain Layout
11430 \change_inserted -712698321 1431166543
11436 , this argument will bei inserted with a copy of the co-text (either selected
11437 text or the whole paragraph) as content.
11440 \begin_layout Itemize
11442 \change_inserted -712698321 1431070588
11445 \begin_inset Flex Code
11448 \begin_layout Plain Layout
11450 \change_inserted -712698321 1431070522
11459 \begin_inset Flex Code
11462 \begin_layout Plain Layout
11464 \change_inserted -712698321 1431070522
11465 string of characters
11474 Defines individual characters that should be output in raw form, meaning
11475 without special translations that \SpecialChar LaTeX
11477 Note that, contrary to PassThru, this needs to be explicitly defined for
11479 That is, arguments do not inherit PassThruChars from their parent inset
11485 \begin_layout Standard
11486 By default, the text entered in the \SpecialChar LyX
11487 workarea in the respective layout is
11488 the last (mandatory) argument of a command if the
11489 \begin_inset Flex Code
11492 \begin_layout Plain Layout
11499 \begin_inset Flex Code
11502 \begin_layout Plain Layout
11509 However, arguments with the prefix
11510 \begin_inset Flex Code
11513 \begin_layout Plain Layout
11519 are output after this workarea argument.
11520 Note that post-argument numbering restarts at 1, so the first argument
11521 following the workarea argument is
11522 \begin_inset Flex Code
11525 \begin_layout Plain Layout
11532 Post-arguments are ignored in any other
11533 \begin_inset Flex Code
11536 \begin_layout Plain Layout
11543 \begin_inset Flex Code
11546 \begin_layout Plain Layout
11555 \begin_layout Standard
11557 \begin_inset Flex Code
11560 \begin_layout Plain Layout
11569 \begin_inset Flex Code
11572 \begin_layout Plain Layout
11581 \begin_inset Flex Code
11584 \begin_layout Plain Layout
11590 followed by the number (e.
11591 \begin_inset space \thinspace{}
11595 \begin_inset space \space{}
11599 \begin_inset Flex Code
11602 \begin_layout Plain Layout
11612 \begin_layout Description
11613 \begin_inset Flex Code
11616 \begin_layout Plain Layout
11622 Note that this will completely override any prior
11623 \begin_inset Flex Code
11626 \begin_layout Plain Layout
11632 declaration for this style.
11634 \begin_inset Quotes eld
11638 \begin_inset Flex Code
11641 \begin_layout Plain Layout
11648 \begin_inset Quotes erd
11653 \begin_inset CommandInset ref
11655 reference "sub:I18n"
11659 for details on its use.
11662 \begin_layout Description
11663 \begin_inset Flex Code
11666 \begin_layout Plain Layout
11673 \begin_inset Flex Code
11676 \begin_layout Plain Layout
11686 \begin_layout Plain Layout
11687 Note that a `float' here is a real number, such as: 1.5.
11692 The vertical space with which the last of a chain of paragraphs with this
11693 style is separated from the following paragraph.
11694 If the next paragraph has another style, the separations are not simply
11695 added, but the maximum is taken.
11698 \begin_layout Description
11699 \begin_inset Flex Code
11702 \begin_layout Plain Layout
11709 \begin_inset Flex Code
11712 \begin_layout Plain Layout
11718 ] The category for this style.
11719 This is used to group related styles in the style combobox on the toolbar.
11720 Any string can be used, but you may want to use existing categories with
11725 \begin_layout Description
11726 \begin_inset Flex Code
11729 \begin_layout Plain Layout
11735 Depth of XML command.
11736 Used only with XML-type formats.
11739 \begin_layout Description
11740 \begin_inset Flex Code
11743 \begin_layout Plain Layout
11750 \begin_inset Flex Code
11753 \begin_layout Plain Layout
11759 ] Copies all the features of an existing style into the current one.
11763 \begin_layout Description
11764 \begin_inset Flex Code
11767 \begin_layout Plain Layout
11774 \begin_inset Flex Code
11777 \begin_layout Plain Layout
11783 ] The name of a style whose preamble should be output
11788 This allows to ensure some ordering of the preamble snippets when macros
11789 definitions depend on one another.
11793 \begin_layout Plain Layout
11794 Note that, besides that functionality, there is no way to ensure any ordering
11796 The ordering that you see in a given version of \SpecialChar LyX
11797 may change without warning
11806 \begin_layout Description
11807 \begin_inset Flex Code
11810 \begin_layout Plain Layout
11817 \begin_inset Flex Code
11820 \begin_layout Plain Layout
11825 , Box, Filled_Box, Static
11830 ] The type of label that stands at the end of the paragraph (or sequence
11832 \begin_inset Flex Code
11835 \begin_layout Plain Layout
11842 \begin_inset Newline newline
11846 \begin_inset Flex Code
11849 \begin_layout Plain Layout
11856 \begin_inset Flex Code
11859 \begin_layout Plain Layout
11866 \begin_inset Flex Code
11869 \begin_layout Plain Layout
11877 \begin_inset Flex Code
11880 \begin_layout Plain Layout
11887 \begin_inset Quotes eld
11891 \begin_inset Quotes erd
11895 \begin_inset Flex Code
11898 \begin_layout Plain Layout
11905 \begin_inset space \space{}
11909 \begin_inset Flex Code
11912 \begin_layout Plain Layout
11918 ) is a white (resp.
11919 \begin_inset space ~
11922 black) square suitable for end of proof markers,
11923 \begin_inset Flex Code
11926 \begin_layout Plain Layout
11932 is an explicit text string.
11935 \begin_layout Description
11936 \begin_inset Flex Code
11939 \begin_layout Plain Layout
11946 \begin_inset Flex Code
11949 \begin_layout Plain Layout
11955 ] The string used for a label with a
11956 \begin_inset Flex Code
11959 \begin_layout Plain Layout
11966 \begin_inset Newline newline
11970 \begin_inset Flex Code
11973 \begin_layout Plain Layout
11983 \begin_layout Description
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11993 The font used for both the text body
11999 \begin_inset CommandInset ref
12001 reference "sub:Font-description"
12006 Note that defining this font automatically defines the
12007 \begin_inset Flex Code
12010 \begin_layout Plain Layout
12017 So you should define this one first if you also want to define
12018 \begin_inset Flex Code
12021 \begin_layout Plain Layout
12030 \begin_layout Description
12031 \begin_inset Flex Code
12034 \begin_layout Plain Layout
12041 \begin_inset Flex Code
12044 \begin_layout Plain Layout
12050 ] Used for backporting new styles to stable \SpecialChar LyX
12052 The first stable version that supports this tag is \SpecialChar LyX
12054 The argument is a number which may either be 0, -1 or any value greater
12057 \begin_inset Flex Code
12060 \begin_layout Plain Layout
12066 flag of a style is greater than zero, it will always be written to the
12068 If a .lyx file is read, the style definitions from the document header are
12069 added to the document class.
12070 Therefore even older \SpecialChar LyX
12071 versions can handle the style.
12073 \begin_inset Flex Code
12076 \begin_layout Plain Layout
12082 is a version number: If the style is read, and the version number is less
12083 than the version number of the already existing style in the document class,
12084 the new style is ignored.
12085 If the version number is greater, the new style replaces the existing style.
12086 A value of -1 means an infinite version number, i.
12087 \begin_inset space \thinspace{}
12091 \begin_inset space \space{}
12094 the style is always used.
12097 \begin_layout Description
12098 \begin_inset Flex Code
12101 \begin_layout Plain Layout
12108 \begin_inset Flex Code
12111 \begin_layout Plain Layout
12120 \begin_inset space \thinspace{}
12124 \begin_inset Flex Code
12127 \begin_layout Plain Layout
12133 ] Usually \SpecialChar LyX
12134 does not allow you to insert more than one space between words,
12135 since a space is considered as the separation between two words, not a
12136 character or symbol of its own.
12137 This is a very fine thing but sometimes annoying, for example, when typing
12138 program code or plain \SpecialChar LaTeX
12141 \begin_inset Flex Code
12144 \begin_layout Plain Layout
12151 Note that \SpecialChar LyX
12152 will create protected blanks for the additional blanks when
12153 in another mode than \SpecialChar LaTeX
12157 \begin_layout Description
12158 \begin_inset Flex Code
12161 \begin_layout Plain Layout
12167 These tags are used with XHTML output.
12169 \begin_inset CommandInset ref
12171 reference "sub:Paragraph-Style-XHTML"
12178 \begin_layout Description
12179 \begin_inset Flex Code
12182 \begin_layout Plain Layout
12188 [FIXME] (Used only with XML-type formats.)
12191 \begin_layout Description
12192 \begin_inset Flex Code
12195 \begin_layout Plain Layout
12202 \begin_inset Flex Code
12205 \begin_layout Plain Layout
12214 \begin_inset space \thinspace{}
12218 \begin_inset Flex Code
12221 \begin_layout Plain Layout
12228 \begin_inset Flex Code
12231 \begin_layout Plain Layout
12237 , marks the style as to be included in the document preamble and not in
12239 This is useful for document classes that want such information as the title
12240 and author to appear in the preamble.
12241 Note that this works only for styles for which the
12242 \begin_inset Flex Code
12245 \begin_layout Plain Layout
12252 \begin_inset Flex Code
12255 \begin_layout Plain Layout
12262 \begin_inset Flex Code
12265 \begin_layout Plain Layout
12274 \begin_layout Description
12275 \begin_inset Flex Code
12278 \begin_layout Plain Layout
12285 \begin_inset Flex Code
12288 \begin_layout Plain Layout
12297 \begin_inset space \thinspace{}
12301 \begin_inset Flex Code
12304 \begin_layout Plain Layout
12311 \begin_inset Flex Code
12314 \begin_layout Plain Layout
12320 , marks the style as being part of a title block (see also the
12321 \begin_inset Flex Code
12324 \begin_layout Plain Layout
12331 \begin_inset Flex Code
12334 \begin_layout Plain Layout
12343 \begin_layout Description
12344 \begin_inset Flex Code
12347 \begin_layout Plain Layout
12354 \begin_inset Flex Code
12357 \begin_layout Plain Layout
12363 ] The \SpecialChar LaTeX
12364 command sequence declaring an item in a list.
12365 The command is to be defined without the preceding backslash (the default
12367 \begin_inset Quotes eld
12371 \begin_inset Quotes erd
12375 \begin_inset Flex Code
12378 \begin_layout Plain Layout
12386 in the \SpecialChar LaTeX
12390 \begin_layout Description
12391 \begin_inset Flex Code
12394 \begin_layout Plain Layout
12401 \begin_inset Flex Code
12404 \begin_layout Plain Layout
12410 ] This provides extra space between paragraphs that have the same style.
12411 If you put other styles into an environment, each is separated with the
12413 \begin_inset Flex Code
12416 \begin_layout Plain Layout
12423 But the whole items of the environment are additionally separated with
12425 \begin_inset Flex Code
12428 \begin_layout Plain Layout
12435 Note that this is a
12440 \begin_layout Description
12441 \begin_inset Flex Code
12444 \begin_layout Plain Layout
12450 [FIXME] (Used only with XML-type formats.)
12453 \begin_layout Description
12454 \begin_inset Flex Code
12457 \begin_layout Plain Layout
12464 \begin_inset Flex Code
12467 \begin_layout Plain Layout
12476 \begin_inset space \thinspace{}
12480 \begin_inset Flex Code
12483 \begin_layout Plain Layout
12489 ] Usually \SpecialChar LyX
12490 does not allow you to leave a paragraph empty, since it would
12491 lead to empty \SpecialChar LaTeX
12493 There are some cases where this could be desirable however: in a letter
12494 template, the required fields can be provided as empty fields, so that
12495 people do not forget them; in some special classes, a style can be used
12496 as some kind of break, which does not contain actual text.
12499 \begin_layout Description
12500 \begin_inset Flex Code
12503 \begin_layout Plain Layout
12510 \begin_inset Flex Code
12513 \begin_layout Plain Layout
12519 ] The vertical space between the label and the text body.
12520 Only used for labels that are above the text body (
12521 \begin_inset Flex Code
12524 \begin_layout Plain Layout
12531 \begin_inset Newline newline
12535 \begin_inset Flex Code
12538 \begin_layout Plain Layout
12539 Centered_Top_Environment
12547 \begin_layout Description
12548 \begin_inset Flex Code
12551 \begin_layout Plain Layout
12558 \begin_inset Flex Code
12561 \begin_layout Plain Layout
12567 ] The name of the counter for automatic numbering.
12568 In order to have the counter appear with your label, you will need to reference
12570 \begin_inset Flex Code
12573 \begin_layout Plain Layout
12582 This will work with
12583 \begin_inset Flex Code
12586 \begin_layout Plain Layout
12593 \begin_inset Flex Code
12596 \begin_layout Plain Layout
12603 \begin_inset Flex Code
12606 \begin_layout Plain Layout
12613 \begin_inset Flex Code
12616 \begin_layout Plain Layout
12623 \begin_inset Newline newline
12631 \begin_inset Flex Code
12634 \begin_layout Plain Layout
12641 \begin_inset Flex Code
12644 \begin_layout Plain Layout
12650 , though this case is a bit complicated.
12651 Suppose you declare
12652 \begin_inset Quotes eld
12656 \begin_inset Flex Code
12659 \begin_layout Plain Layout
12660 LabelCounter myenum
12666 \begin_inset Quotes erd
12670 Then the actual counters used are
12671 \begin_inset Flex Code
12674 \begin_layout Plain Layout
12681 \begin_inset Flex Code
12684 \begin_layout Plain Layout
12691 \begin_inset Flex Code
12694 \begin_layout Plain Layout
12701 \begin_inset Flex Code
12704 \begin_layout Plain Layout
12710 , much as in \SpecialChar LaTeX
12712 These counters must all be declared separately.
12713 \begin_inset Newline newline
12717 \begin_inset CommandInset ref
12719 reference "sub:Counters"
12723 for details on counters.
12726 \begin_layout Description
12727 \begin_inset Flex Code
12730 \begin_layout Plain Layout
12736 The font used for the label.
12738 \begin_inset CommandInset ref
12740 reference "sub:Font-description"
12747 \begin_layout Description
12748 \begin_inset Flex Code
12751 \begin_layout Plain Layout
12758 \begin_inset Flex Code
12761 \begin_layout Plain Layout
12767 ] Text that indicates how far a label should be indented.
12770 \begin_layout Description
12771 \begin_inset Flex Code
12774 \begin_layout Plain Layout
12781 \begin_inset Flex Code
12784 \begin_layout Plain Layout
12790 ] Text that indicates the amount of horizontal space between the label and
12792 Only used for labels that are not above the text body.
12795 \begin_layout Description
12796 \begin_inset Flex Code
12799 \begin_layout Plain Layout
12806 \begin_inset Flex Code
12809 \begin_layout Plain Layout
12815 ] The string used for the label.
12817 \begin_inset Flex Code
12820 \begin_layout Plain Layout
12826 is set, this string can be contain the special formatting commands described
12828 \begin_inset CommandInset ref
12830 reference "sub:Counters"
12837 \begin_layout Description
12838 \begin_inset Flex Code
12841 \begin_layout Plain Layout
12842 LabelStringAppendix
12848 \begin_inset Flex Code
12851 \begin_layout Plain Layout
12857 ] This is used inside the appendix instead of
12858 \begin_inset Newline newline
12862 \begin_inset Flex Code
12865 \begin_layout Plain Layout
12873 \begin_inset Flex Code
12876 \begin_layout Plain Layout
12883 \begin_inset Newline newline
12887 \begin_inset Flex Code
12890 \begin_layout Plain Layout
12891 LabelStringAppendix
12899 \begin_layout Description
12900 \begin_inset Flex Code
12903 \begin_layout Plain Layout
12909 [FIXME] (Used only with XML-type formats.)
12912 \begin_layout Description
12913 \begin_inset Flex Code
12916 \begin_layout Plain Layout
12923 \begin_inset Flex Code
12926 \begin_layout Plain Layout
12931 , Manual, Static, Above,
12932 \begin_inset Newline newline
12935 Centered, Sensitive, Enumerate,
12936 \begin_inset Newline newline
12939 Itemize, Bibliography
12945 \begin_inset Separator parbreak
12952 \begin_layout Description
12953 \begin_inset Flex Code
12956 \begin_layout Plain Layout
12962 means the label is the very first word (up to the first real blank).
12963 Use protected spaces if you want more than one word as the label.
12967 \begin_layout Description
12968 \begin_inset Flex Code
12971 \begin_layout Plain Layout
12977 means the label is simply what is declared as
12978 \begin_inset Flex Code
12981 \begin_layout Plain Layout
12988 This will be displayed
12989 \begin_inset Quotes eld
12993 \begin_inset Quotes erd
12996 , at the beginning of the paragraph.
12998 \begin_inset Flex Code
13001 \begin_layout Plain Layout
13008 \begin_inset Flex Code
13011 \begin_layout Plain Layout
13017 , then it will be displayed only in the first paragraph of any sequence
13018 of paragraphs with the same
13019 \begin_inset Flex Code
13022 \begin_layout Plain Layout
13031 \begin_layout Description
13032 \begin_inset Flex Code
13035 \begin_layout Plain Layout
13042 \begin_inset space ~
13046 \begin_inset space ~
13050 \begin_inset Flex Code
13053 \begin_layout Plain Layout
13059 are special cases of
13060 \begin_inset Flex Code
13063 \begin_layout Plain Layout
13070 The label will be printed above the paragraph either at the beginning of
13071 the line or centered.
13074 \begin_layout Description
13075 \begin_inset Flex Code
13078 \begin_layout Plain Layout
13084 is a special case for the caption-labels
13085 \begin_inset Quotes eld
13089 \begin_inset Quotes erd
13093 \begin_inset Quotes eld
13097 \begin_inset Quotes erd
13101 \begin_inset Newline newline
13105 \begin_inset Flex Code
13108 \begin_layout Plain Layout
13114 means the (hardcoded) label string depends on the kind of float: It is
13115 hardcoded to be `FloatType N', where N is the value of the counter associated
13117 For the case that a caption is inserted outside of a float the
13118 \begin_inset Flex Code
13121 \begin_layout Plain Layout
13128 \begin_inset Quotes eld
13132 \begin_inset Quotes erd
13138 \begin_layout Description
13139 \begin_inset Flex Code
13142 \begin_layout Plain Layout
13148 produces the usual sort of enumeration labels.
13149 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13150 small Roman numerals, and uppercase letters for the four possible depths.
13153 \begin_layout Description
13154 \begin_inset Flex Code
13157 \begin_layout Plain Layout
13163 produces various bullets at the different levels.
13164 It is also hardcoded.
13167 \begin_layout Description
13168 \begin_inset Flex Code
13171 \begin_layout Plain Layout
13177 should be used only with
13178 \begin_inset Flex Code
13181 \begin_layout Plain Layout
13182 LatexType BibEnvironment
13191 \begin_layout Description
13192 \begin_inset Flex Code
13195 \begin_layout Plain Layout
13201 Note that this will completely override any prior
13202 \begin_inset Flex Code
13205 \begin_layout Plain Layout
13211 declaration for this style.
13213 \begin_inset Quotes eld
13217 \begin_inset Flex Code
13220 \begin_layout Plain Layout
13227 \begin_inset Quotes erd
13232 \begin_inset CommandInset ref
13234 reference "sub:I18n"
13238 for details on its use.
13241 \begin_layout Description
13242 \begin_inset Flex Code
13245 \begin_layout Plain Layout
13252 \begin_inset Flex Code
13255 \begin_layout Plain Layout
13261 ] The name of the corresponding \SpecialChar LaTeX
13263 Either the environment or command name.
13266 \begin_layout Description
13267 \begin_inset Flex Code
13270 \begin_layout Plain Layout
13277 \begin_inset Flex Code
13280 \begin_layout Plain Layout
13286 ] An optional parameter for the corresponding
13287 \begin_inset Flex Code
13290 \begin_layout Plain Layout
13297 This parameter cannot be changed from within \SpecialChar LyX
13299 \begin_inset Flex Code
13302 \begin_layout Plain Layout
13308 for customizable parameters).
13309 This will be output as is after all \SpecialChar LaTeX
13311 \begin_inset Flex Code
13314 \begin_layout Plain Layout
13323 \begin_layout Description
13324 \begin_inset Flex Code
13327 \begin_layout Plain Layout
13334 \begin_inset Flex Code
13337 \begin_layout Plain Layout
13342 , Command, Environment, Item_Environment,
13343 \begin_inset Newline newline
13346 List_Environment, Bib_Environment
13351 ] How the style should be translated into \SpecialChar LaTeX
13356 \begin_layout Plain Layout
13357 \begin_inset Flex Code
13360 \begin_layout Plain Layout
13366 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13367 Visit the SGML class files for specific examples.
13373 \begin_inset Separator parbreak
13380 \begin_layout Description
13381 \begin_inset Flex Code
13384 \begin_layout Plain Layout
13390 means nothing special.
13393 \begin_layout Description
13394 \begin_inset Flex Code
13397 \begin_layout Plain Layout
13404 \begin_inset Flex Code
13407 \begin_layout Plain Layout
13414 {\SpecialChar ldots
13423 \begin_layout Description
13424 \begin_inset Flex Code
13427 \begin_layout Plain Layout
13434 \begin_inset Flex Code
13437 \begin_layout Plain Layout
13444 }\SpecialChar ldots
13460 \begin_layout Description
13461 \begin_inset Flex Code
13464 \begin_layout Plain Layout
13471 \begin_inset Flex Code
13474 \begin_layout Plain Layout
13481 \begin_inset Flex Code
13484 \begin_layout Plain Layout
13492 is generated for each paragraph of this environment.
13496 \begin_layout Description
13497 \begin_inset Flex Code
13500 \begin_layout Plain Layout
13507 \begin_inset Flex Code
13510 \begin_layout Plain Layout
13517 \begin_inset Newline newline
13521 \begin_inset Flex Code
13524 \begin_layout Plain Layout
13530 is passed as an argument to the environment.
13531 \begin_inset Newline newline
13535 \begin_inset Flex Code
13538 \begin_layout Plain Layout
13544 can be defined in the
13545 \begin_inset Flex MenuItem
13548 \begin_layout Plain Layout
13549 Edit\SpecialChar menuseparator
13551 \begin_inset space ~
13562 \begin_layout Description
13563 \begin_inset Flex Code
13566 \begin_layout Plain Layout
13573 \begin_inset Flex Code
13576 \begin_layout Plain Layout
13582 but adds additionally the necessary mandatory argument (the longest label)
13583 to the begin statement of the bibliography environment:
13584 \begin_inset Newline newline
13588 \begin_inset Flex Code
13591 \begin_layout Plain Layout
13594 begin{thebibliography}{99}
13599 It is therefore only useful for bibliography environments.
13600 The default longest label
13601 \begin_inset Quotes eld
13605 \begin_inset Quotes erd
13608 can be changed by the user in the paragraph settings of a bibliography
13612 \begin_layout Standard
13613 Putting the last few things together, the \SpecialChar LaTeX
13614 output will be either:
13617 \begin_layout LyX-Code
13620 LatexName[LatexParam]{\SpecialChar ldots
13624 \begin_layout Standard
13628 \begin_layout LyX-Code
13631 begin{LatexName}[LatexParam] \SpecialChar ldots
13637 \begin_layout Standard
13638 depending upon the \SpecialChar LaTeX
13643 \begin_layout Description
13644 \begin_inset Flex Code
13647 \begin_layout Plain Layout
13654 \begin_inset Flex Code
13657 \begin_layout Plain Layout
13663 ] A string that is put at the beginning of the style content.
13664 A line break in the output can be indicated by
13665 \begin_inset Flex Code
13668 \begin_layout Plain Layout
13677 \begin_layout Description
13678 \begin_inset Flex Code
13681 \begin_layout Plain Layout
13688 \begin_inset Flex Code
13691 \begin_layout Plain Layout
13697 ] If you put styles into environments, the different
13698 \begin_inset Flex Code
13701 \begin_layout Plain Layout
13707 are not simply added, but added with a factor
13708 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13712 Note that this parameter is also used when
13713 \begin_inset Flex Code
13716 \begin_layout Plain Layout
13723 \begin_inset Flex Code
13726 \begin_layout Plain Layout
13733 \begin_inset Flex Code
13736 \begin_layout Plain Layout
13743 Then it is added to the manual or dynamic margin.
13744 \begin_inset Newline newline
13748 \begin_inset Quotes eld
13752 \begin_inset Flex Code
13755 \begin_layout Plain Layout
13762 \begin_inset Quotes erd
13765 means that the paragraph is indented with the width of
13766 \begin_inset Quotes eld
13770 \begin_inset Flex Code
13773 \begin_layout Plain Layout
13780 \begin_inset Quotes erd
13783 in the normal font.
13784 You can get a negative width by prefixing the string with
13785 \begin_inset Quotes eld
13789 \begin_inset Flex Code
13792 \begin_layout Plain Layout
13799 \begin_inset Quotes erd
13803 This way was chosen so that the look is the same with each used screen
13807 \begin_layout Description
13808 \begin_inset Flex Code
13811 \begin_layout Plain Layout
13818 \begin_inset Flex Code
13821 \begin_layout Plain Layout
13826 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13832 \begin_inset Newline newline
13835 The kind of margin that the style has on the left side.
13836 \begin_inset Separator parbreak
13843 \begin_layout Description
13844 \begin_inset Flex Code
13847 \begin_layout Plain Layout
13853 just means a fixed margin.
13856 \begin_layout Description
13857 \begin_inset Flex Code
13860 \begin_layout Plain Layout
13866 means that the left margin depends on the string entered in the
13867 \begin_inset Flex MenuItem
13870 \begin_layout Plain Layout
13871 Edit\SpecialChar menuseparator
13873 \begin_inset space ~
13882 This is used to typeset nice lists without tabulators.
13885 \begin_layout Description
13886 \begin_inset Flex Code
13889 \begin_layout Plain Layout
13895 means that the margin depends on the size of the label.
13896 This is used for automatic enumerated headlines.
13897 It is obvious that the headline
13898 \begin_inset Quotes eld
13901 5.4.3.2.1 Very long headline
13902 \begin_inset Quotes erd
13905 must have a wider left margin (as wide as
13906 \begin_inset Quotes eld
13910 \begin_inset Quotes erd
13913 plus the space) than
13914 \begin_inset Quotes eld
13917 3.2 Very long headline
13918 \begin_inset Quotes erd
13922 \begin_inset Quotes eld
13926 \begin_inset Quotes erd
13929 are not able to do this.
13932 \begin_layout Description
13933 \begin_inset Flex Code
13936 \begin_layout Plain Layout
13942 is similar, but only the very first row of the paragraph is dynamic, while
13943 the others are static; this is used, for example, for descriptions.
13946 \begin_layout Description
13947 \begin_inset Flex Code
13950 \begin_layout Plain Layout
13956 means the margin is chosen in a way that the longest row of this paragraph
13957 fits to the right margin.
13958 This is used to typeset an address on the right edge of the page.
13962 \begin_layout Description
13963 \begin_inset Flex Code
13966 \begin_layout Plain Layout
13973 \begin_inset Flex Code
13976 \begin_layout Plain Layout
13985 \begin_inset space \thinspace{}
13989 \begin_inset Flex Code
13992 \begin_layout Plain Layout
13998 ] Whether fragile commands in this style should be
13999 \begin_inset Flex Code
14002 \begin_layout Plain Layout
14015 whether this command should itself be protected.)
14018 \begin_layout Description
14019 \begin_inset Flex Code
14022 \begin_layout Plain Layout
14029 \begin_inset Flex Code
14032 \begin_layout Plain Layout
14039 \begin_inset space \thinspace{}
14043 \begin_inset Flex Code
14046 \begin_layout Plain Layout
14054 ] Whether newlines are translated into \SpecialChar LaTeX
14056 \begin_inset Flex Code
14059 \begin_layout Plain Layout
14070 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
14072 inside \SpecialChar LyX
14076 \begin_layout Description
14077 \begin_inset Flex Code
14080 \begin_layout Plain Layout
14087 \begin_inset Flex Code
14090 \begin_layout Plain Layout
14099 \begin_inset space \thinspace{}
14103 \begin_inset Flex Code
14106 \begin_layout Plain Layout
14112 ] If set to true, and if
14113 \begin_inset Flex Code
14116 \begin_layout Plain Layout
14123 \begin_inset Flex Code
14126 \begin_layout Plain Layout
14132 ) paragraphs are being indented, then the indentation of such a paragraph
14133 following one of this type will be suppressed.
14134 (So this will not affect the display of non-default paragraphs.)
14137 \begin_layout Description
14138 \begin_inset Flex Code
14141 \begin_layout Plain Layout
14148 \begin_inset Flex Code
14151 \begin_layout Plain Layout
14157 ] Name of a style that has replaced this style.
14158 This is used to rename a style, while keeping backward compatibility.
14161 \begin_layout Description
14162 \begin_inset Flex Code
14165 \begin_layout Plain Layout
14172 \begin_inset Flex Code
14175 \begin_layout Plain Layout
14184 \begin_inset space \thinspace{}
14188 \begin_inset Flex Code
14191 \begin_layout Plain Layout
14197 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14199 but only by a line break; together with
14200 \begin_inset Flex Code
14203 \begin_layout Plain Layout
14209 , this allows to emulate a plain text editor (like the ERT inset).
14212 \begin_layout Description
14213 \begin_inset Flex Code
14216 \begin_layout Plain Layout
14223 \begin_inset Flex Code
14226 \begin_layout Plain Layout
14232 ] The indent of the very first line of a paragraph.
14234 \begin_inset Newline newline
14238 \begin_inset Flex Code
14241 \begin_layout Plain Layout
14247 will be fixed for a certain style.
14248 The exception is the default style, since the indentation for these paragraphs
14249 can be prohibited with
14250 \begin_inset Flex Code
14253 \begin_layout Plain Layout
14261 \begin_inset Flex Code
14264 \begin_layout Plain Layout
14270 style paragraphs inside environments use the
14271 \begin_inset Flex Code
14274 \begin_layout Plain Layout
14280 of the environment, not their native one.
14282 \begin_inset Flex Code
14285 \begin_layout Plain Layout
14291 paragraphs inside an enumeration are not indented.
14294 \begin_layout Description
14295 \begin_inset Flex Code
14298 \begin_layout Plain Layout
14305 \begin_inset Flex Code
14308 \begin_layout Plain Layout
14314 ] The vertical space between two paragraphs of this style.
14317 \begin_layout Description
14318 \begin_inset Flex Code
14321 \begin_layout Plain Layout
14328 \begin_inset Flex Code
14331 \begin_layout Plain Layout
14338 allows the user to choose either
14339 \begin_inset Quotes eld
14343 \begin_inset Quotes erd
14347 \begin_inset Quotes eld
14351 \begin_inset Quotes erd
14354 to separate paragraphs.
14356 \begin_inset Quotes eld
14360 \begin_inset Quotes erd
14364 \begin_inset Flex Code
14367 \begin_layout Plain Layout
14375 \begin_inset Quotes eld
14379 \begin_inset Quotes erd
14383 \begin_inset Flex Code
14386 \begin_layout Plain Layout
14392 is ignored and all paragraphs are separated by the
14393 \begin_inset Flex Code
14396 \begin_layout Plain Layout
14403 The vertical space is calculated with
14404 \begin_inset Flex Code
14407 \begin_layout Plain Layout
14409 \begin_inset space ~
14418 \begin_inset Flex Code
14421 \begin_layout Plain Layout
14427 is the height of a row with the normal font.
14428 This way, the look stays the same with different screen fonts.
14431 \begin_layout Description
14432 \begin_inset Flex Code
14435 \begin_layout Plain Layout
14442 \begin_inset Flex Code
14445 \begin_layout Plain Layout
14454 \begin_inset space \thinspace{}
14458 \begin_inset Flex Code
14461 \begin_layout Plain Layout
14467 ] Whether the contents of this paragraph should be output in raw form, meaning
14468 without special translations that \SpecialChar LaTeX
14470 \change_inserted 155139281 1429534178
14474 \begin_layout Description
14476 \change_inserted 155139281 1429534242
14479 \begin_inset Flex Code
14482 \begin_layout Plain Layout
14484 \change_inserted 155139281 1429534178
14493 \begin_inset Flex Code
14496 \begin_layout Plain Layout
14498 \change_inserted 155139281 1429534178
14499 string of characters
14508 Defines individual characters that should be output in raw form, meaning
14509 without special translations that \SpecialChar LaTeX
14515 \begin_layout Description
14516 \begin_inset Flex Code
14519 \begin_layout Plain Layout
14525 Information to be included in the \SpecialChar LaTeX
14526 preamble when this style is used.
14527 Used to define macros, load packages, etc., required by this particular
14530 \begin_inset Quotes eld
14534 \begin_inset Flex Code
14537 \begin_layout Plain Layout
14544 \begin_inset Quotes erd
14550 \begin_layout Description
14551 \begin_inset Flex Code
14554 \begin_layout Plain Layout
14561 \begin_inset Flex Code
14564 \begin_layout Plain Layout
14570 ] The prefix to use when creating labels referring to paragraphs of this
14572 This allows the use of formatted references.
14575 \begin_layout Description
14576 \begin_inset Flex Code
14579 \begin_layout Plain Layout
14586 \begin_inset Flex Code
14589 \begin_layout Plain Layout
14595 ] Whether the style requires the feature
14596 \begin_inset Flex Code
14599 \begin_layout Plain Layout
14606 See the description of
14607 \begin_inset Flex Code
14610 \begin_layout Plain Layout
14617 \begin_inset CommandInset ref
14619 reference "sub:General-text-class"
14623 ) for information on `features'.
14626 \begin_layout Description
14627 \begin_inset Flex Code
14630 \begin_layout Plain Layout
14637 \begin_inset Flex Code
14640 \begin_layout Plain Layout
14649 \begin_inset Flex Code
14652 \begin_layout Plain Layout
14658 ] Resets the \SpecialChar LaTeX
14659 arguments of this style (as defined via the
14660 \begin_inset Flex Code
14663 \begin_layout Plain Layout
14670 This is useful if you have copied a style via
14671 \begin_inset Flex Code
14674 \begin_layout Plain Layout
14680 , but you do not want to inherit its (required and optional) arguments.
14683 \begin_layout Description
14684 \begin_inset Flex Code
14687 \begin_layout Plain Layout
14694 \begin_inset Flex Code
14697 \begin_layout Plain Layout
14703 ] A string that is put at the end of the layout content.
14704 A line break in the output can be indicated by
14705 \begin_inset Flex Code
14708 \begin_layout Plain Layout
14717 \begin_layout Description
14718 \begin_inset Flex Code
14721 \begin_layout Plain Layout
14728 \begin_inset Flex Code
14731 \begin_layout Plain Layout
14738 \begin_inset Flex Code
14741 \begin_layout Plain Layout
14750 \begin_layout Description
14751 \begin_inset Flex Code
14754 \begin_layout Plain Layout
14761 \begin_inset Flex Code
14764 \begin_layout Plain Layout
14773 \begin_inset Flex Code
14776 \begin_layout Plain Layout
14783 \begin_inset Flex Code
14786 \begin_layout Plain Layout
14793 \begin_inset Flex Code
14796 \begin_layout Plain Layout
14798 \begin_inset space ~
14806 ] This defines what the default spacing should be in the style.
14808 \begin_inset Flex Code
14811 \begin_layout Plain Layout
14818 \begin_inset Flex Code
14821 \begin_layout Plain Layout
14828 \begin_inset Flex Code
14831 \begin_layout Plain Layout
14837 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14838 If you specify the argument
14839 \begin_inset Flex Code
14842 \begin_layout Plain Layout
14848 , then you must also provide a value argument which will be the actual multiplie
14850 Note that, contrary to other parameters,
14851 \begin_inset Flex Code
14854 \begin_layout Plain Layout
14860 implies the generation of specific \SpecialChar LaTeX
14861 code, using the \SpecialChar LaTeX
14865 \begin_inset Flex Code
14868 \begin_layout Plain Layout
14877 \begin_layout Description
14878 \begin_inset Flex Code
14881 \begin_layout Plain Layout
14888 \begin_inset Flex Code
14891 \begin_layout Plain Layout
14898 \begin_inset space \thinspace{}
14902 \begin_inset Flex Code
14905 \begin_layout Plain Layout
14913 ] Allow spell-checking paragraphs of this style.
14917 \begin_layout Description
14918 \begin_inset Flex Code
14921 \begin_layout Plain Layout
14927 The font used for the text body .
14929 \begin_inset CommandInset ref
14931 reference "sub:Font-description"
14938 \begin_layout Description
14939 \begin_inset Flex Code
14942 \begin_layout Plain Layout
14951 \begin_inset Flex Code
14954 \begin_layout Plain Layout
14964 The level of the style in the table of contents.
14965 This is used for automatic numbering of section headings.
14966 \change_inserted -712698321 1401363541
14970 \begin_layout Description
14972 \change_inserted -712698321 1401363906
14973 \begin_inset Flex Code
14976 \begin_layout Plain Layout
14978 \change_inserted -712698321 1401363547
14987 \begin_inset Flex Code
14990 \begin_layout Plain Layout
14992 \change_inserted -712698321 1401363664
15005 \begin_inset Flex Code
15008 \begin_layout Plain Layout
15010 \change_inserted -712698321 1401363669
15019 \begin_inset Flex Code
15022 \begin_layout Plain Layout
15024 \change_inserted -712698321 1401363675
15032 ] This tag determines whether the first line indentation of this paragraph
15033 can be toggled via the Paragraph settings dialog.
15037 \begin_inset Flex Code
15040 \begin_layout Plain Layout
15042 \change_inserted -712698321 1401363761
15052 is set, indentation can be toggled if the document settings use
15053 \begin_inset Quotes eld
15057 \begin_inset Quotes erd
15060 paragraph style, with
15061 \begin_inset Flex Code
15064 \begin_layout Plain Layout
15066 \change_inserted -712698321 1401363844
15072 , indentation can always be toggled, notwithstanding the document settings,
15074 \begin_inset Flex Code
15077 \begin_layout Plain Layout
15079 \change_inserted -712698321 1401363901
15085 , indentation can never be toggled.
15090 \begin_layout Description
15091 \begin_inset Flex Code
15094 \begin_layout Plain Layout
15101 \begin_inset Flex Code
15104 \begin_layout Plain Layout
15110 ] The vertical space with which the very first of a chain of paragraphs
15111 with this style is separated from the previous paragraph.
15112 If the previous paragraph has another style, the separations are not simply
15113 added, but the maximum is taken.
15116 \begin_layout Subsection
15117 \begin_inset CommandInset label
15123 Internationalization of Paragraph Styles
15126 \begin_layout Standard
15128 has long supported internationalization of layout information, but, until
15129 version 2.0, this applied only to the user interface and not to, say, PDF
15131 Thus, French authors were forced to resort to ugly hacks if they wanted
15136 1' instead of `Theorem 1'.
15137 Thanks to Georg Baum, that is no longer the case.
15140 \begin_layout Standard
15142 \begin_inset Flex Code
15145 \begin_layout Plain Layout
15151 defines text that is to appear in the typeset document, it may use
15152 \begin_inset Flex Code
15155 \begin_layout Plain Layout
15162 \begin_inset Flex Code
15165 \begin_layout Plain Layout
15171 to support non-English and even multi-language documents correctly.
15172 The following excerpt (from the
15173 \begin_inset Flex Code
15176 \begin_layout Plain Layout
15182 file) shows how this works:
15185 \begin_layout LyX-Code
15187 \begin_inset Separator parbreak
15194 \begin_layout LyX-Code
15197 theoremstyle{remark}
15200 \begin_layout LyX-Code
15203 newtheorem{claim}[thm]{
15210 \begin_layout LyX-Code
15214 \begin_layout LyX-Code
15218 \begin_layout LyX-Code
15223 claimname}{_(Claim)}
15226 \begin_layout LyX-Code
15230 \begin_layout LyX-Code
15234 \begin_layout LyX-Code
15243 claimname}{_(Claim)}}
15246 \begin_layout LyX-Code
15251 \begin_layout Standard
15252 In principle, any legal \SpecialChar LaTeX
15254 \begin_inset Flex Code
15257 \begin_layout Plain Layout
15264 \begin_inset Flex Code
15267 \begin_layout Plain Layout
15273 tags, but in practice they will typically look as they do here.
15274 The key to correct translation of the typeset text is the definition of
15275 the \SpecialChar LaTeX
15277 \begin_inset Flex Code
15280 \begin_layout Plain Layout
15289 \begin_inset Flex Code
15292 \begin_layout Plain Layout
15304 \begin_layout Standard
15306 \begin_inset Flex Code
15309 \begin_layout Plain Layout
15315 tag provides for internationalization based upon the overall language of
15317 The contents of the tag will be included in the preamble, just as with
15319 \begin_inset Flex Code
15322 \begin_layout Plain Layout
15329 What makes it special is the use of the
15330 \begin_inset Quotes eld
15334 \begin_inset Quotes erd
15338 \begin_inset Flex Code
15341 \begin_layout Plain Layout
15347 , which will be replaced, when \SpecialChar LyX
15348 produces \SpecialChar LaTeX
15349 output, with the translation of
15350 its argument into the document language.
15353 \begin_layout Standard
15355 \begin_inset Flex Code
15358 \begin_layout Plain Layout
15364 tag is more complex, since it is meant to provide support for multi-language
15365 documents and so offers an interface to the
15366 \begin_inset Flex Code
15369 \begin_layout Plain Layout
15376 Its contents will be added to the preamble once for each language that
15377 appears in the document.
15378 In this case, the argument to
15379 \begin_inset Flex Code
15382 \begin_layout Plain Layout
15388 will be replaced with its translation into the language in question; the
15390 \begin_inset Flex Code
15393 \begin_layout Plain Layout
15399 is replaced by the language name (as used by the babel package).
15402 \begin_layout Standard
15403 A German document that also included a French section would thus have the
15404 following in the preamble:
15407 \begin_layout LyX-Code
15416 claimname}{Affirmation}}
15417 \begin_inset Newline newline
15428 claimname}{Behauptung}}
15429 \begin_inset Newline newline
15436 claimname}{Behauptung}
15439 \begin_layout Standard
15442 \begin_inset Flex Code
15445 \begin_layout Plain Layout
15451 will then conspire to produce the correct text in the output.
15454 \begin_layout Standard
15455 One important point to note here is that the translations are provided by
15457 itself, through the file
15458 \begin_inset Flex Code
15461 \begin_layout Plain Layout
15468 This means, in effect, that
15469 \begin_inset Flex Code
15472 \begin_layout Plain Layout
15479 \begin_inset Flex Code
15482 \begin_layout Plain Layout
15488 are really only of use in layout files that are provided with \SpecialChar LyX
15490 entered in user-created layout files will not be seen by \SpecialChar LyX
15491 's internationalizatio
15492 n routines unless the
15493 \begin_inset Flex Code
15496 \begin_layout Plain Layout
15502 file is modified accordingly.
15503 That said, however, any layout created with the intention that it will
15504 be included with \SpecialChar LyX
15505 should use these tags where appropriate.
15506 Please note that the paragraph style translations provided by \SpecialChar LyX
15508 change with a minor update (e.
15509 \begin_inset space \thinspace{}
15513 \begin_inset space \space{}
15516 from version 2.1.x to 2.1.y).
15517 It is however quite likely that a major update (e.
15518 \begin_inset space \thinspace{}
15522 \begin_inset space \space{}
15525 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15528 \begin_layout Subsection
15530 \begin_inset CommandInset label
15539 \begin_layout Standard
15540 It is necessary to define the floats (
15541 \begin_inset Flex MenuItem
15544 \begin_layout Plain Layout
15551 \begin_inset Flex MenuItem
15554 \begin_layout Plain Layout
15560 , \SpecialChar ldots
15561 ) in the text class itself.
15562 Standard floats are included in the file
15563 \begin_inset Flex Code
15566 \begin_layout Plain Layout
15572 , so you may have to do no more than add
15575 \begin_layout LyX-Code
15576 Input stdfloats.inc
15579 \begin_layout Standard
15580 to your layout file.
15581 If you want to implement a text class that proposes some other float types
15582 (like the AGU class bundled with \SpecialChar LyX
15583 ), the information below will hopefully
15587 \begin_layout Description
15588 \begin_inset Flex Code
15591 \begin_layout Plain Layout
15598 \begin_inset Flex Code
15601 \begin_layout Plain Layout
15608 \begin_inset Quotes erd
15612 \begin_inset Quotes erd
15615 ] The file name extension of an auxiliary file for the list of figures (or
15618 writes the captions to this file.
15621 \begin_layout Description
15622 \begin_inset Flex Code
15625 \begin_layout Plain Layout
15632 \begin_inset Flex Code
15635 \begin_layout Plain Layout
15642 \begin_inset Quotes erd
15646 \begin_inset Quotes erd
15649 ] The string that will be used in the menus and also for the caption.
15650 This is translated to the current language if babel is used.
15653 \begin_layout Description
15654 \begin_inset Flex Code
15657 \begin_layout Plain Layout
15663 These tags control the XHTML output.
15665 \begin_inset CommandInset ref
15667 reference "sec:Tags-for-XHTML"
15674 \begin_layout Description
15675 \begin_inset Flex Code
15678 \begin_layout Plain Layout
15687 \begin_inset Flex Code
15690 \begin_layout Plain Layout
15699 \begin_inset space \thinspace{}
15703 \begin_inset Flex Code
15706 \begin_layout Plain Layout
15712 ] Indicates whether the float is already defined in the document class or
15713 if instead the \SpecialChar LaTeX
15715 \begin_inset Flex Code
15718 \begin_layout Plain Layout
15724 needs to be loaded to define it on-the-fly.
15726 \begin_inset Flex Code
15729 \begin_layout Plain Layout
15736 \begin_inset Flex Code
15739 \begin_layout Plain Layout
15746 It should be set to
15747 \begin_inset Flex Code
15750 \begin_layout Plain Layout
15756 if the float is already defined by the \SpecialChar LaTeX
15760 \begin_layout Description
15761 \begin_inset Flex Code
15764 \begin_layout Plain Layout
15771 \begin_inset Flex Code
15774 \begin_layout Plain Layout
15781 \begin_inset Quotes erd
15785 \begin_inset Quotes erd
15788 ] The command used to generate a list of floats of this type; the leading
15797 \begin_inset Flex Code
15800 \begin_layout Plain Layout
15806 is false, since there is no standard way to generate this command.
15808 \begin_inset Flex Code
15811 \begin_layout Plain Layout
15817 is true, since in that case there is a standard way to define the command.
15820 \begin_layout Description
15821 \begin_inset Flex Code
15824 \begin_layout Plain Layout
15831 \begin_inset Flex Code
15834 \begin_layout Plain Layout
15841 \begin_inset Quotes erd
15845 \begin_inset Quotes erd
15848 ] A title for a list of floats of this kind (list of figures, tables, or
15850 It is used for the screen label within \SpecialChar LyX
15851 , it is used by \SpecialChar LaTeX
15853 it is used as the title in the XHTML output.
15854 It will be translated to the document language.
15857 \begin_layout Description
15858 \begin_inset Flex Code
15861 \begin_layout Plain Layout
15868 \begin_inset Flex Code
15871 \begin_layout Plain Layout
15878 \begin_inset Quotes erd
15882 \begin_inset Quotes erd
15885 ] This (optional) argument determines whether floats of this class will
15886 be numbered within some sectional unit of the document.
15888 \begin_inset Flex Code
15891 \begin_layout Plain Layout
15898 \begin_inset Quotes eld
15902 \begin_inset Flex Code
15905 \begin_layout Plain Layout
15912 \begin_inset Quotes erd
15915 , the floats will be numbered within chapters.
15919 \begin_layout Description
15920 \begin_inset Flex Code
15923 \begin_layout Plain Layout
15930 \begin_inset Flex Code
15933 \begin_layout Plain Layout
15940 \begin_inset Quotes erd
15944 \begin_inset Quotes erd
15947 ] The default placement for the given class of floats.
15948 The string should be as in standard \SpecialChar LaTeX
15950 \begin_inset Flex Code
15953 \begin_layout Plain Layout
15960 \begin_inset Flex Code
15963 \begin_layout Plain Layout
15970 \begin_inset Flex Code
15973 \begin_layout Plain Layout
15980 \begin_inset Flex Code
15983 \begin_layout Plain Layout
15989 for top, bottom, page, and here, respectively.
15993 \begin_layout Plain Layout
15994 Note that the order of these letters in the string is irrelevant, like in
16001 On top of that there is a new type,
16002 \begin_inset Flex Code
16005 \begin_layout Plain Layout
16011 , which does not really correspond to a float, since it means: put it
16012 \begin_inset Quotes eld
16016 \begin_inset Quotes erd
16020 Note however that the
16021 \begin_inset Flex Code
16024 \begin_layout Plain Layout
16030 specifier is special and, because of implementation details, cannot be
16031 used in non-built in float types.
16032 If you do not understand what this means, just use
16033 \begin_inset Quotes eld
16037 \begin_inset Flex Code
16040 \begin_layout Plain Layout
16047 \begin_inset Quotes erd
16053 \begin_layout Description
16054 \begin_inset Flex Code
16057 \begin_layout Plain Layout
16064 \begin_inset Flex Code
16067 \begin_layout Plain Layout
16073 ] The prefix to use when creating labels referring to floats of this type.
16074 This allows the use of formatted references.
16075 Note that you can remove any
16076 \begin_inset Flex Code
16079 \begin_layout Plain Layout
16085 set by a copied style by using the special value
16086 \begin_inset Quotes eld
16090 \begin_inset Quotes erd
16093 , which must be all caps.
16096 \begin_layout Description
16097 \begin_inset Flex Code
16100 \begin_layout Plain Layout
16107 \begin_inset Flex Code
16110 \begin_layout Plain Layout
16117 \begin_inset Quotes erd
16121 \begin_inset Quotes erd
16124 ] The style used when defining the float using
16125 \begin_inset Flex Code
16128 \begin_layout Plain Layout
16139 \begin_layout Description
16140 \begin_inset Flex Code
16143 \begin_layout Plain Layout
16150 \begin_inset Flex Code
16153 \begin_layout Plain Layout
16160 \begin_inset Quotes erd
16164 \begin_inset Quotes erd
16168 \begin_inset Quotes eld
16172 \begin_inset Quotes erd
16175 of the new class of floats, like program or algorithm.
16176 After the appropriate
16177 \begin_inset Flex Code
16180 \begin_layout Plain Layout
16189 \begin_inset Flex Code
16192 \begin_layout Plain Layout
16201 \begin_inset Flex Code
16204 \begin_layout Plain Layout
16215 \begin_layout Description
16216 \begin_inset Flex Code
16219 \begin_layout Plain Layout
16226 \begin_inset Flex Code
16229 \begin_layout Plain Layout
16236 \begin_inset space \thinspace{}
16240 \begin_inset Flex Code
16243 \begin_layout Plain Layout
16251 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16253 \begin_inset Flex Code
16256 \begin_layout Plain Layout
16262 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16266 \begin_layout Standard
16267 Note that defining a float with type
16268 \begin_inset Flex Code
16271 \begin_layout Plain Layout
16279 automatically defines the corresponding counter with name
16280 \begin_inset Flex Code
16283 \begin_layout Plain Layout
16294 \begin_layout Subsection
16295 Flex insets and InsetLayout
16296 \begin_inset CommandInset label
16298 name "sub:Flex-insets-and"
16305 \begin_layout Standard
16306 Flex insets come in three different kinds:
16309 \begin_layout Itemize
16311 \begin_inset Flex Code
16314 \begin_layout Plain Layout
16320 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16322 \begin_inset Flex Code
16325 \begin_layout Plain Layout
16334 \begin_inset Flex Code
16337 \begin_layout Plain Layout
16348 \begin_layout Itemize
16350 \begin_inset Flex Code
16353 \begin_layout Plain Layout
16359 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16361 footnote, and the like.
16362 An obvious example is an endnote inset, which is defined in the
16363 \begin_inset Flex Code
16366 \begin_layout Plain Layout
16375 \begin_layout Itemize
16377 \begin_inset Flex Code
16380 \begin_layout Plain Layout
16386 ): For use with DocBook classes.
16389 \begin_layout Standard
16390 Flex insets are defined using the
16391 \begin_inset Flex Code
16394 \begin_layout Plain Layout
16400 tag, which shall be explained in a moment.
16403 \begin_layout Standard
16405 \begin_inset Flex Code
16408 \begin_layout Plain Layout
16414 tag also serves another function: It can be used to customize the general
16415 layout of many different types of insets.
16417 \begin_inset Flex Code
16420 \begin_layout Plain Layout
16426 can be used to customize the layout parameters for footnotes, marginal
16427 notes, note insets, \SpecialChar TeX
16428 code (ERT) insets, branches, listings, indexes, boxes,
16429 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16432 \begin_layout Standard
16434 \begin_inset Flex Code
16437 \begin_layout Plain Layout
16443 definition must begin with a line of the form:
16446 \begin_layout LyX-Code
16450 \begin_layout Standard
16452 \begin_inset Flex Code
16455 \begin_layout Plain Layout
16461 indicates the inset whose layout is being defined, and here there are four
16465 \begin_layout Enumerate
16466 The layout for a pre-existing inset is being modified.
16467 In this case, can be
16468 \begin_inset Flex Code
16471 \begin_layout Plain Layout
16477 any one of the following:
16478 \begin_inset Flex Code
16481 \begin_layout Plain Layout
16488 \begin_inset Flex Code
16491 \begin_layout Plain Layout
16498 \begin_inset Flex Code
16501 \begin_layout Plain Layout
16508 \begin_inset Flex Code
16511 \begin_layout Plain Layout
16518 \begin_inset Flex Code
16521 \begin_layout Plain Layout
16528 \begin_inset Flex Code
16531 \begin_layout Plain Layout
16538 \begin_inset Flex Code
16541 \begin_layout Plain Layout
16548 \begin_inset Flex Code
16551 \begin_layout Plain Layout
16558 \begin_inset Flex Code
16561 \begin_layout Plain Layout
16568 \begin_inset Flex Code
16571 \begin_layout Plain Layout
16578 \begin_inset Flex Code
16581 \begin_layout Plain Layout
16588 \begin_inset Flex Code
16591 \begin_layout Plain Layout
16598 \begin_inset Flex Code
16601 \begin_layout Plain Layout
16608 \begin_inset Flex Code
16611 \begin_layout Plain Layout
16618 \begin_inset Flex Code
16621 \begin_layout Plain Layout
16628 \begin_inset Flex Code
16631 \begin_layout Plain Layout
16638 \begin_inset Flex Code
16641 \begin_layout Plain Layout
16648 \begin_inset Flex Code
16651 \begin_layout Plain Layout
16658 \begin_inset Flex Code
16661 \begin_layout Plain Layout
16668 \begin_inset Flex Code
16671 \begin_layout Plain Layout
16680 \begin_layout Enumerate
16681 The layout for a Flex inset is being defined.
16683 \begin_inset Flex Code
16686 \begin_layout Plain Layout
16692 must be of the form
16693 \begin_inset Quotes eld
16697 \begin_inset Flex Code
16700 \begin_layout Plain Layout
16707 \begin_inset Quotes erd
16711 \begin_inset Flex Code
16714 \begin_layout Plain Layout
16720 may be be any valid identifier not used by a pre-existing Flex inset.
16721 The identifier may include spaces, but in that case the whole thing must
16722 be wrapped in quotes.
16723 Note that the definition of a flex inset
16728 \begin_inset Flex Code
16731 \begin_layout Plain Layout
16738 entry, declaring which type of inset it defines.
16741 \begin_layout Enumerate
16742 The layout for user specific branch is being defined.
16744 \begin_inset Flex Code
16747 \begin_layout Plain Layout
16753 must be of the form
16754 \begin_inset Quotes eld
16758 \begin_inset Flex Code
16761 \begin_layout Plain Layout
16768 \begin_inset Quotes erd
16772 \begin_inset Flex Code
16775 \begin_layout Plain Layout
16781 may be be any valid identifier of branch defined in user's document.
16782 The identifier may include spaces, but in that case the whole thing must
16783 be wrapped in quotes.
16784 The main purpose of this feature is to allow \SpecialChar LaTeX
16785 wrapping around specific
16786 branches as user needs.
16789 \begin_layout Enumerate
16790 The layout of a user (or class) specific caption is being defined.
16792 \begin_inset Flex Code
16795 \begin_layout Plain Layout
16801 must be of the form
16802 \begin_inset Quotes eld
16806 \begin_inset Flex Code
16809 \begin_layout Plain Layout
16816 \begin_inset Quotes erd
16820 \begin_inset Flex Code
16823 \begin_layout Plain Layout
16829 specifies the name of the caption as it appears in the menu.
16830 Have a look at the standard caption (
16831 \begin_inset Flex Code
16834 \begin_layout Plain Layout
16840 ), the specific captions of the KOMA-Script classes (
16841 \begin_inset Flex Code
16844 \begin_layout Plain Layout
16851 \begin_inset Flex Code
16854 \begin_layout Plain Layout
16863 \begin_inset space ~
16869 \begin_inset Flex Code
16872 \begin_layout Plain Layout
16878 ) for applications.
16881 \begin_layout Standard
16883 \begin_inset Flex Code
16886 \begin_layout Plain Layout
16892 definition can contain the following entries:
16895 \begin_layout Description
16896 \begin_inset Flex Code
16899 \begin_layout Plain Layout
16906 \begin_inset Flex Code
16909 \begin_layout Plain Layout
16915 ] Defines argument number of a command\SpecialChar breakableslash
16916 environment associated with the current
16918 The definition must end with
16919 \begin_inset Flex Code
16922 \begin_layout Plain Layout
16930 \begin_inset CommandInset ref
16932 reference "sub:Paragraph-Styles"
16939 \begin_layout Description
16940 \begin_inset Flex Code
16943 \begin_layout Plain Layout
16949 Preamble for changing language commands; see
16950 \begin_inset CommandInset ref
16952 reference "sub:I18n"
16959 \begin_layout Description
16960 \begin_inset Flex Code
16963 \begin_layout Plain Layout
16970 \begin_inset Flex Code
16973 \begin_layout Plain Layout
16979 ] The color for the inset's background.
16981 \begin_inset CommandInset ref
16983 reference "chap:Names-of-colors"
16987 for a list of the available color names.
16990 \begin_layout Description
16991 \begin_inset Flex Code
16994 \begin_layout Plain Layout
17001 \begin_inset Flex Code
17004 \begin_layout Plain Layout
17013 \begin_inset space \thinspace{}
17017 \begin_inset Flex Code
17020 \begin_layout Plain Layout
17026 ] Whether to use the content of the inset as the label, when the inset is
17031 \begin_layout Description
17032 \begin_inset Flex Code
17035 \begin_layout Plain Layout
17042 \begin_inset Flex Code
17045 \begin_layout Plain Layout
17051 ] As with paragraph styles, see
17052 \begin_inset CommandInset ref
17054 reference "sub:Paragraph-Styles"
17059 Note that you need to specify the complete type, e.
17060 \begin_inset space \thinspace{}
17064 \begin_inset space ~
17068 \begin_inset Flex Code
17071 \begin_layout Plain Layout
17072 CopyStyle Flex:<name>
17080 \begin_layout Description
17081 \begin_inset Flex Code
17084 \begin_layout Plain Layout
17091 \begin_inset Flex Code
17094 \begin_layout Plain Layout
17103 \begin_inset space \thinspace{}
17107 \begin_inset Flex Code
17110 \begin_layout Plain Layout
17116 ] Indicates whether the user may employ the Paragraph Settings dialog to
17117 customize the paragraph.
17120 \begin_layout Description
17121 \begin_inset Flex Code
17124 \begin_layout Plain Layout
17131 \begin_inset Flex Code
17134 \begin_layout Plain Layout
17141 \begin_inset Flex Code
17144 \begin_layout Plain Layout
17151 \begin_inset Flex Code
17154 \begin_layout Plain Layout
17160 , describing the rendering style used for the inset's frame and buttons.
17161 Footnotes generally use
17162 \begin_inset Flex Code
17165 \begin_layout Plain Layout
17171 , ERT insets generally
17172 \begin_inset Flex Code
17175 \begin_layout Plain Layout
17181 , and character styles
17182 \begin_inset Flex Code
17185 \begin_layout Plain Layout
17194 \begin_layout Description
17195 \begin_inset Flex Code
17198 \begin_layout Plain Layout
17205 \begin_inset Flex Code
17208 \begin_layout Plain Layout
17217 \begin_inset space \thinspace{}
17223 \begin_inset Flex Code
17226 \begin_layout Plain Layout
17235 \begin_inset Flex Code
17238 \begin_layout Plain Layout
17245 \begin_inset Flex Code
17248 \begin_layout Plain Layout
17255 Indicates whether the environment will stand on its own in the output or
17256 will appear inline with the surrounding text.
17257 If set to false, it is supposed that the \SpecialChar LaTeX
17258 environment ignores white space
17259 (including one newline character) after the
17260 \begin_inset Flex Code
17263 \begin_layout Plain Layout
17276 \begin_inset Flex Code
17279 \begin_layout Plain Layout
17295 \begin_layout Description
17296 \begin_inset Flex Code
17299 \begin_layout Plain Layout
17305 Required at the end of the
17306 \begin_inset Flex Code
17309 \begin_layout Plain Layout
17318 \begin_layout Description
17319 \begin_inset Flex Code
17322 \begin_layout Plain Layout
17328 The font used for both the text body
17334 \begin_inset CommandInset ref
17336 reference "sub:Font-description"
17341 Note that defining this font automatically defines the
17342 \begin_inset Flex Code
17345 \begin_layout Plain Layout
17351 to the same value, so define this first and define
17352 \begin_inset Flex Code
17355 \begin_layout Plain Layout
17361 later if you want them to be different.
17362 \change_inserted -195340706 1421002157
17366 \begin_layout Description
17368 \change_inserted -195340706 1421002157
17369 \begin_inset Flex Code
17372 \begin_layout Plain Layout
17374 \change_inserted -195340706 1421002157
17375 FixedWidthPreambleEncoding
17381 \begin_inset Flex Code
17384 \begin_layout Plain Layout
17386 \change_inserted -195340706 1421002157
17395 \begin_inset space \thinspace{}
17399 \begin_inset Flex Code
17402 \begin_layout Plain Layout
17404 \change_inserted -195340706 1421002157
17410 ] Force a fixed width encoding for the translated contents of
17411 \begin_inset Flex Code
17414 \begin_layout Plain Layout
17416 \change_inserted -195340706 1421002157
17423 \begin_inset Flex Code
17426 \begin_layout Plain Layout
17428 \change_inserted -195340706 1421002157
17434 code generated by this layout.
17435 This is needed for special packages like the listings package that do not
17436 work with variable width encodings such as utf8.
17438 This setting is ignored if fully unicode aware \SpecialChar LaTeX
17439 backends such as Xe\SpecialChar LaTeX
17446 \begin_layout Description
17447 \begin_inset Flex Code
17450 \begin_layout Plain Layout
17451 ForceLocalFontSwitch
17457 \begin_inset Flex Code
17460 \begin_layout Plain Layout
17469 \begin_inset space \thinspace{}
17473 \begin_inset Flex Code
17476 \begin_layout Plain Layout
17482 ] When using babel, always use a local font switch (
17483 \begin_inset Flex Code
17486 \begin_layout Plain Layout
17494 ), never a global one (such as
17495 \begin_inset Flex Code
17498 \begin_layout Plain Layout
17509 \begin_layout Description
17510 \begin_inset Flex Code
17513 \begin_layout Plain Layout
17520 \begin_inset Flex Code
17523 \begin_layout Plain Layout
17532 \begin_inset space \thinspace{}
17536 \begin_inset Flex Code
17539 \begin_layout Plain Layout
17546 \begin_inset Quotes eld
17550 \begin_inset Quotes erd
17553 language, leading to Left-to-Right (Latin) output, e.
17554 \begin_inset space \thinspace{}
17558 \begin_inset space \space{}
17561 in \SpecialChar TeX
17564 \change_inserted -712698321 1417441977
17568 \begin_layout Description
17570 \change_inserted -712698321 1417442090
17571 \begin_inset Flex Code
17574 \begin_layout Plain Layout
17576 \change_inserted -712698321 1417441983
17583 \begin_inset Flex Code
17586 \begin_layout Plain Layout
17588 \change_inserted -712698321 1417441978
17597 \begin_inset space \thinspace{}
17601 \begin_inset Flex Code
17604 \begin_layout Plain Layout
17606 \change_inserted -712698321 1417441978
17612 ] Force a a line break in the \SpecialChar LaTeX
17613 output before the inset starts and after
17615 This assures the inset itself is output on its own lines, for parsing purposes.
17617 \change_inserted 274215730 1419105878
17623 \begin_layout Description
17624 \begin_inset Flex Code
17627 \begin_layout Plain Layout
17634 \begin_inset Flex Code
17637 \begin_layout Plain Layout
17646 \begin_inset space \thinspace{}
17650 \begin_inset Flex Code
17653 \begin_layout Plain Layout
17659 ] Indicates whether the
17660 \begin_inset Flex Code
17663 \begin_layout Plain Layout
17669 should be used or, instead, the user can change the paragraph style used
17674 \begin_layout Description
17675 \begin_inset Flex Code
17678 \begin_layout Plain Layout
17685 \begin_inset Flex Code
17688 \begin_layout Plain Layout
17697 \begin_inset space \thinspace{}
17701 \begin_inset Flex Code
17704 \begin_layout Plain Layout
17710 ] As with paragraph styles, see
17711 \begin_inset CommandInset ref
17713 reference "sub:Paragraph-Styles"
17720 \begin_layout Description
17721 \begin_inset Flex Code
17724 \begin_layout Plain Layout
17730 These tags control the XHTML output.
17732 \begin_inset CommandInset ref
17734 reference "sec:Tags-for-XHTML"
17741 \begin_layout Description
17742 \begin_inset Flex Code
17745 \begin_layout Plain Layout
17752 \begin_inset Flex Code
17755 \begin_layout Plain Layout
17764 \begin_inset space \thinspace{}
17768 \begin_inset Flex Code
17771 \begin_layout Plain Layout
17777 ] Whether to include the contents of this inset in the strings generated
17778 for the `Outline' pane.
17779 One would not, for example, want the content of a footnote in a section
17780 header to be included in the TOC displayed in the outline, but one would
17781 normally want the content of a character style displayed.
17782 Default is false: not to include.
17785 \begin_layout Description
17786 \begin_inset Flex Code
17789 \begin_layout Plain Layout
17798 \begin_inset Flex Code
17801 \begin_layout Plain Layout
17810 \begin_inset space \thinspace{}
17814 \begin_inset Flex Code
17817 \begin_layout Plain Layout
17823 ] As with paragraph styles, see
17824 \begin_inset CommandInset ref
17826 reference "sub:Paragraph-Styles"
17833 \begin_layout Description
17834 \begin_inset Flex Code
17837 \begin_layout Plain Layout
17843 The font used for the label.
17845 \begin_inset CommandInset ref
17847 reference "sub:Font-description"
17852 Note that this definition can never appear before
17853 \begin_inset Flex Code
17856 \begin_layout Plain Layout
17862 , lest it be ineffective.
17865 \begin_layout Description
17866 \begin_inset Flex Code
17869 \begin_layout Plain Layout
17876 \begin_inset Flex Code
17879 \begin_layout Plain Layout
17886 \begin_inset Quotes erd
17890 \begin_inset Quotes erd
17893 ] What will be displayed on the button or elsewhere as the inset label.
17895 \begin_inset Flex Code
17898 \begin_layout Plain Layout
17906 \begin_inset Flex Code
17909 \begin_layout Plain Layout
17915 ) modify this label on the fly.
17918 \begin_layout Description
17919 \begin_inset Flex Code
17922 \begin_layout Plain Layout
17928 Language dependent preamble; see
17929 \begin_inset CommandInset ref
17931 reference "sub:I18n"
17938 \begin_layout Description
17939 \begin_inset Flex Code
17942 \begin_layout Plain Layout
17949 \begin_inset Flex Code
17952 \begin_layout Plain Layout
17958 ] The name of the corresponding \SpecialChar LaTeX
17960 Either the environment or command name.
17963 \begin_layout Description
17964 \begin_inset Flex Code
17967 \begin_layout Plain Layout
17974 \begin_inset Flex Code
17977 \begin_layout Plain Layout
17983 ] The optional parameter for the corresponding
17984 \begin_inset Flex Code
17987 \begin_layout Plain Layout
17993 stuff, including possible bracket pairs like
17994 \begin_inset Flex Code
17997 \begin_layout Plain Layout
18004 This parameter cannot be changed from within \SpecialChar LyX
18006 \begin_inset Flex Code
18009 \begin_layout Plain Layout
18015 for customizable parameters).
18016 It will be output as is after all \SpecialChar LaTeX
18018 \begin_inset Flex Code
18021 \begin_layout Plain Layout
18030 \begin_layout Description
18031 \begin_inset Flex Code
18034 \begin_layout Plain Layout
18041 \begin_inset Flex Code
18044 \begin_layout Plain Layout
18045 Command, Environment, None
18050 ] How the style should be translated into \SpecialChar LaTeX
18055 \begin_layout Plain Layout
18056 \begin_inset Flex Code
18059 \begin_layout Plain Layout
18065 is perhaps a bit misleading, since these rules apply to SGML classes too.
18066 Visit the SGML class files for specific examples.
18072 \begin_inset Separator parbreak
18079 \begin_layout Description
18080 \begin_inset Flex Code
18083 \begin_layout Plain Layout
18089 means nothing special
18092 \begin_layout Description
18093 \begin_inset Flex Code
18096 \begin_layout Plain Layout
18103 \begin_inset Flex Code
18106 \begin_layout Plain Layout
18113 {\SpecialChar ldots
18122 \begin_layout Description
18123 \begin_inset Flex Code
18126 \begin_layout Plain Layout
18133 \begin_inset Flex Code
18136 \begin_layout Plain Layout
18143 }\SpecialChar ldots
18158 \begin_layout Standard
18159 Putting the last few things together, the \SpecialChar LaTeX
18160 output will be either:
18163 \begin_layout LyX-Code
18166 LatexName[LatexParam]{\SpecialChar ldots
18170 \begin_layout Standard
18174 \begin_layout LyX-Code
18177 begin{LatexName}[LatexParam] \SpecialChar ldots
18183 \begin_layout Standard
18184 depending upon the \SpecialChar LaTeX
18189 \begin_layout Description
18190 \begin_inset Flex Code
18193 \begin_layout Plain Layout
18200 \begin_inset Flex Code
18203 \begin_layout Plain Layout
18209 ] A string that is put at the beginning of the layout content.
18210 A line break in the output can be indicated by
18211 \begin_inset Flex Code
18214 \begin_layout Plain Layout
18223 \begin_layout Description
18224 \begin_inset Flex Code
18227 \begin_layout Plain Layout
18234 \begin_inset Flex Code
18237 \begin_layout Plain Layout
18244 \begin_inset Flex Code
18247 \begin_layout Plain Layout
18254 \begin_inset Flex Code
18257 \begin_layout Plain Layout
18264 \begin_inset Flex Code
18267 \begin_layout Plain Layout
18273 (indicating a dummy definition ending definitions of charstyles, etc).
18274 This entry is required in and is only meaningful for Flex insets.
18275 Among other things, it determines on which menu this inset will appear.
18277 \begin_inset Flex Code
18280 \begin_layout Plain Layout
18288 \begin_inset Flex Code
18291 \begin_layout Plain Layout
18297 will automatically set
18298 \begin_inset Flex Code
18301 \begin_layout Plain Layout
18309 \begin_inset Flex Code
18312 \begin_layout Plain Layout
18318 can be set to true for
18319 \begin_inset Flex Code
18322 \begin_layout Plain Layout
18328 insets by setting it
18333 \begin_inset Flex Code
18336 \begin_layout Plain Layout
18346 \begin_layout Description
18347 \begin_inset Flex Code
18350 \begin_layout Plain Layout
18357 \begin_inset Flex Code
18360 \begin_layout Plain Layout
18369 \begin_inset space \thinspace{}
18373 \begin_inset Flex Code
18376 \begin_layout Plain Layout
18382 ] Whether multiple paragraphs are permitted in this inset.
18384 \begin_inset Flex Code
18387 \begin_layout Plain Layout
18393 to the same value and
18394 \begin_inset Flex Code
18397 \begin_layout Plain Layout
18403 to the opposite value.
18404 These can be reset to other values, if they are used
18409 \begin_inset Flex Code
18412 \begin_layout Plain Layout
18422 \begin_layout Description
18423 \begin_inset Flex Code
18426 \begin_layout Plain Layout
18433 \begin_inset Flex Code
18436 \begin_layout Plain Layout
18445 \begin_inset space \thinspace{}
18449 \begin_inset Flex Code
18452 \begin_layout Plain Layout
18458 ] Whether fragile commands in this inset should be
18459 \begin_inset Flex Code
18462 \begin_layout Plain Layout
18475 whether the command should itself be protected.) Default is false.
18478 \begin_layout Description
18479 \begin_inset Flex Code
18482 \begin_layout Plain Layout
18489 \begin_inset Flex Code
18492 \begin_layout Plain Layout
18498 ] Deletes an existing
18499 \begin_inset Flex Code
18502 \begin_layout Plain Layout
18509 \change_inserted -712698321 1417953494
18513 \begin_layout Description
18515 \change_inserted -712698321 1417953559
18516 \begin_inset Flex Code
18519 \begin_layout Plain Layout
18521 \change_inserted -712698321 1417953494
18528 \begin_inset Flex Code
18531 \begin_layout Plain Layout
18533 \change_inserted -712698321 1417953574
18540 \begin_inset Flex Code
18543 \begin_layout Plain Layout
18545 \change_inserted -712698321 1417953533
18551 that has replaced this
18552 \begin_inset Flex Code
18555 \begin_layout Plain Layout
18557 \change_inserted -712698321 1417953551
18564 This is used to rename an
18565 \begin_inset Flex Code
18568 \begin_layout Plain Layout
18570 \change_inserted -712698321 1417953559
18576 , while keeping backward compatibility.
18581 \begin_layout Description
18582 \begin_inset Flex Code
18585 \begin_layout Plain Layout
18592 \begin_inset Flex Code
18595 \begin_layout Plain Layout
18604 \begin_inset space \thinspace{}
18608 \begin_inset Flex Code
18611 \begin_layout Plain Layout
18617 ] As with paragraph styles, see
18618 \begin_inset CommandInset ref
18620 reference "sub:Paragraph-Styles"
18628 \begin_layout Description
18629 \begin_inset Flex Code
18632 \begin_layout Plain Layout
18639 \begin_inset Flex Code
18642 \begin_layout Plain Layout
18651 \begin_inset space \thinspace{}
18655 \begin_inset Flex Code
18658 \begin_layout Plain Layout
18664 ] As with paragraph styles, see
18665 \begin_inset CommandInset ref
18667 reference "sub:Paragraph-Styles"
18675 \begin_layout Description
18676 \begin_inset Flex Code
18679 \begin_layout Plain Layout
18685 As with paragraph styles, see
18686 \begin_inset CommandInset ref
18688 reference "sub:Paragraph-Styles"
18695 \begin_layout Description
18696 \begin_inset Flex Code
18699 \begin_layout Plain Layout
18706 \begin_inset Flex Code
18709 \begin_layout Plain Layout
18715 ] The prefix to use when creating labels referring to insets of this type.
18716 This allows the use of formatted references.
18719 \begin_layout Description
18720 \begin_inset Flex Code
18723 \begin_layout Plain Layout
18730 \begin_inset Flex Code
18733 \begin_layout Plain Layout
18739 ] As with paragraph styles, see
18740 \begin_inset CommandInset ref
18742 reference "sub:Paragraph-Styles"
18749 \begin_layout Description
18750 \begin_inset Flex Code
18753 \begin_layout Plain Layout
18760 \begin_inset Flex Code
18763 \begin_layout Plain Layout
18772 \begin_inset space \thinspace{}
18776 \begin_inset Flex Code
18779 \begin_layout Plain Layout
18785 ] Resets the \SpecialChar LaTeX
18786 arguments of this layout (as defined via the
18787 \begin_inset Flex Code
18790 \begin_layout Plain Layout
18797 This is useful if you have copied a style via
18798 \begin_inset Flex Code
18801 \begin_layout Plain Layout
18807 , but you do not want to inherit its (required and optional) arguments.
18810 \begin_layout Description
18811 \begin_inset Flex Code
18814 \begin_layout Plain Layout
18821 \begin_inset Flex Code
18824 \begin_layout Plain Layout
18831 \begin_inset space \thinspace{}
18835 \begin_inset Flex Code
18838 \begin_layout Plain Layout
18846 ] Whether this inset should use the font of its surrounding environment
18848 Default is false: use the font of the surrounding environment.
18851 \begin_layout Description
18852 \begin_inset Flex Code
18855 \begin_layout Plain Layout
18862 \begin_inset Flex Code
18865 \begin_layout Plain Layout
18871 ] A string that is put at the end of the layout content.
18872 A line break in the output can be indicated by
18873 \begin_inset Flex Code
18876 \begin_layout Plain Layout
18885 \begin_layout Description
18886 \begin_inset Flex Code
18889 \begin_layout Plain Layout
18896 \begin_inset Flex Code
18899 \begin_layout Plain Layout
18906 \begin_inset space \thinspace{}
18910 \begin_inset Flex Code
18913 \begin_layout Plain Layout
18921 ] Allow spell-checking the contents of this inset.
18925 \begin_layout Subsection
18927 \begin_inset CommandInset label
18929 name "sub:Counters"
18936 \begin_layout Standard
18937 It is necessary to define the counters (
18938 \begin_inset Flex MenuItem
18941 \begin_layout Plain Layout
18948 \begin_inset Flex MenuItem
18951 \begin_layout Plain Layout
18957 , \SpecialChar ldots
18958 ) in the text class itself.
18959 The standard counters are defined in the file
18960 \begin_inset Flex Code
18963 \begin_layout Plain Layout
18969 , so you may have to do no more than add
18972 \begin_layout LyX-Code
18973 Input stdcounters.inc
18976 \begin_layout Standard
18977 to your layout file to get them to work.
18978 But if you want to define custom counters, then you can do so.
18979 The counter declaration must begin with:
18982 \begin_layout LyX-Code
18983 Counter CounterName
18986 \begin_layout Standard
18988 \begin_inset Flex Code
18991 \begin_layout Plain Layout
18997 ' is replaced by the name of the counter.
18998 And it must end with
18999 \begin_inset Quotes eld
19003 \begin_inset Flex Code
19006 \begin_layout Plain Layout
19013 \begin_inset Quotes erd
19017 The following parameters can also be used:
19020 \begin_layout Description
19021 \begin_inset Flex Code
19024 \begin_layout Plain Layout
19031 \begin_inset Flex Code
19034 \begin_layout Plain Layout
19040 ] Sets the initial value for the counter, to which it will be reset whenever
19042 Normally, one will want the default, 1.
19045 \begin_layout Description
19046 \begin_inset Flex Code
19049 \begin_layout Plain Layout
19056 \begin_inset Flex Code
19059 \begin_layout Plain Layout
19066 \begin_inset Quotes erd
19070 \begin_inset Quotes erd
19073 ] When defined, this string defines how the counter is displayed.
19074 Setting this value sets
19075 \begin_inset Flex Code
19078 \begin_layout Plain Layout
19079 LabelStringAppendix
19085 The following special constructs can be used in the string:
19086 \begin_inset Separator parbreak
19093 \begin_layout Itemize
19094 \begin_inset Flex Code
19097 \begin_layout Plain Layout
19105 will be replaced by the expansion of the
19106 \begin_inset Flex Code
19109 \begin_layout Plain Layout
19116 \begin_inset Flex Code
19119 \begin_layout Plain Layout
19120 LabelStringAppendix
19126 \begin_inset Flex Code
19129 \begin_layout Plain Layout
19139 \begin_layout Itemize
19140 counter values can be expressed using \SpecialChar LaTeX
19142 \begin_inset Newline newline
19146 \begin_inset Flex Code
19149 \begin_layout Plain Layout
19166 \begin_inset Flex Code
19169 \begin_layout Plain Layout
19181 \begin_layout Plain Layout
19191 Actually, the situation is a bit more complicated: any
19210 other than those described below will produce arabic numerals.
19211 It would not be surprising to see this change in the future.
19217 \begin_inset Flex Code
19220 \begin_layout Plain Layout
19226 : 1, 2, 3,\SpecialChar ldots
19228 \begin_inset Flex Code
19231 \begin_layout Plain Layout
19237 for lower-case letters: a, b, c, \SpecialChar ldots
19239 \begin_inset Flex Code
19242 \begin_layout Plain Layout
19248 for upper-case letters: A, B, C, \SpecialChar ldots
19250 \begin_inset Flex Code
19253 \begin_layout Plain Layout
19259 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19261 \begin_inset Flex Code
19264 \begin_layout Plain Layout
19270 for upper-case roman numerals: I, II, III\SpecialChar ldots
19272 \begin_inset Flex Code
19275 \begin_layout Plain Layout
19281 for hebrew numerals.
19285 \begin_layout Standard
19286 If LabelString is not defined, a default value is constructed as follows:
19287 if the counter has a master counter
19288 \begin_inset Flex Code
19291 \begin_layout Plain Layout
19298 \begin_inset Flex Code
19301 \begin_layout Plain Layout
19308 \begin_inset Newline newline
19312 \begin_inset Flex Code
19315 \begin_layout Plain Layout
19325 is used; otherwise the string
19326 \begin_inset Flex Code
19329 \begin_layout Plain Layout
19340 \begin_layout Description
19341 \begin_inset Flex Code
19344 \begin_layout Plain Layout
19345 LabelStringAppendix
19351 \begin_inset Flex Code
19354 \begin_layout Plain Layout
19361 \begin_inset Quotes erd
19365 \begin_inset Quotes erd
19369 \begin_inset Flex Code
19372 \begin_layout Plain Layout
19378 , but for use in the Appendix.
19381 \begin_layout Description
19382 \begin_inset Flex Code
19385 \begin_layout Plain Layout
19392 \begin_inset Flex Code
19395 \begin_layout Plain Layout
19402 \begin_inset Quotes erd
19406 \begin_inset Quotes erd
19409 ] A format for use with formatted references to this counter.
19410 For example, one might want to have references to section numbers appear
19412 \begin_inset Quotes eld
19416 \begin_inset Quotes erd
19420 The string should contain
19421 \begin_inset Quotes eld
19425 \begin_inset Quotes erd
19429 This will be replaced by the counter number itself.
19430 So, for sections, it would be: Section ##.
19433 \begin_layout Description
19434 \begin_inset Flex Code
19437 \begin_layout Plain Layout
19444 \begin_inset Flex Code
19447 \begin_layout Plain Layout
19454 \begin_inset Quotes erd
19458 \begin_inset Quotes erd
19461 ] If this is set to the name of another counter, the present counter will
19462 be reset every time the other one is increased.
19464 \begin_inset Flex Code
19467 \begin_layout Plain Layout
19474 \begin_inset Flex Code
19477 \begin_layout Plain Layout
19486 \begin_layout Subsection
19488 \begin_inset CommandInset label
19490 name "sub:Font-description"
19497 \begin_layout Standard
19498 A font description looks like this:
19501 \begin_layout LyX-Code
19515 \begin_layout LyX-Code
19519 \begin_layout LyX-Code
19523 \begin_layout Standard
19524 The following commands are available:
19527 \begin_layout Description
19528 \begin_inset Flex Code
19531 \begin_layout Plain Layout
19538 \begin_inset Flex Code
19541 \begin_layout Plain Layout
19550 \begin_inset Flex Code
19553 \begin_layout Plain Layout
19560 \begin_inset Flex Code
19563 \begin_layout Plain Layout
19570 \begin_inset Flex Code
19573 \begin_layout Plain Layout
19580 \begin_inset Flex Code
19583 \begin_layout Plain Layout
19590 \begin_inset Flex Code
19593 \begin_layout Plain Layout
19600 \begin_inset Flex Code
19603 \begin_layout Plain Layout
19610 \begin_inset Flex Code
19613 \begin_layout Plain Layout
19620 \begin_inset Flex Code
19623 \begin_layout Plain Layout
19632 \begin_layout Description
19633 \begin_inset Flex Code
19636 \begin_layout Plain Layout
19643 \begin_inset Flex Code
19646 \begin_layout Plain Layout
19655 \begin_inset Flex Code
19658 \begin_layout Plain Layout
19665 \begin_inset Flex Code
19668 \begin_layout Plain Layout
19677 \begin_layout Description
19678 \begin_inset Flex Code
19681 \begin_layout Plain Layout
19688 \begin_inset Flex Code
19691 \begin_layout Plain Layout
19697 ] Valid arguments are:
19698 \begin_inset Flex Code
19701 \begin_layout Plain Layout
19708 \begin_inset Flex Code
19711 \begin_layout Plain Layout
19718 \begin_inset Flex Code
19721 \begin_layout Plain Layout
19728 \begin_inset Flex Code
19731 \begin_layout Plain Layout
19738 \begin_inset Flex Code
19741 \begin_layout Plain Layout
19748 \begin_inset Flex Code
19751 \begin_layout Plain Layout
19758 \begin_inset Flex Code
19761 \begin_layout Plain Layout
19768 \begin_inset Flex Code
19771 \begin_layout Plain Layout
19778 \begin_inset Flex Code
19781 \begin_layout Plain Layout
19788 \begin_inset Flex Code
19791 \begin_layout Plain Layout
19798 \begin_inset Flex Code
19801 \begin_layout Plain Layout
19808 \begin_inset Flex Code
19811 \begin_layout Plain Layout
19818 Each of these turns on or off the corresponding attribute.
19820 \begin_inset Flex Code
19823 \begin_layout Plain Layout
19829 turns on emphasis, and
19830 \begin_inset Flex Code
19833 \begin_layout Plain Layout
19841 \begin_inset Newline newline
19844 If the latter seems puzzling, remember that the font settings for the present
19845 context are generally inherited from the surrounding context.
19847 \begin_inset Flex Code
19850 \begin_layout Plain Layout
19856 would turn off the emphasis that was anyway in effect, say, in a theorem
19860 \begin_layout Description
19861 \begin_inset Flex Code
19864 \begin_layout Plain Layout
19871 \begin_inset Flex Code
19874 \begin_layout Plain Layout
19883 \begin_inset Flex Code
19886 \begin_layout Plain Layout
19895 \begin_layout Description
19896 \begin_inset Flex Code
19899 \begin_layout Plain Layout
19906 \begin_inset Flex Code
19909 \begin_layout Plain Layout
19918 \begin_inset Flex Code
19921 \begin_layout Plain Layout
19928 \begin_inset Flex Code
19931 \begin_layout Plain Layout
19938 \begin_inset Flex Code
19941 \begin_layout Plain Layout
19950 \begin_layout Description
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
19993 \begin_inset Flex Code
19996 \begin_layout Plain Layout
20003 \begin_inset Flex Code
20006 \begin_layout Plain Layout
20013 \begin_inset Flex Code
20016 \begin_layout Plain Layout
20023 \begin_inset Flex Code
20026 \begin_layout Plain Layout
20033 \begin_inset Flex Code
20036 \begin_layout Plain Layout
20045 \begin_layout Subsection
20046 \begin_inset CommandInset label
20048 name "sub:Citation-format-description"
20052 Citation format description
20055 \begin_layout Standard
20057 \begin_inset Flex Code
20060 \begin_layout Plain Layout
20066 blocks are used to describe how bibliographic information should be displayed,
20067 both within \SpecialChar LyX
20068 itself (in the citation dialog and in tooltips, for example)
20069 and in XHTML output.
20070 Such a block might look like this:
20073 \begin_layout LyX-Code
20077 \begin_layout LyX-Code
20081 \begin_layout LyX-Code
20085 \begin_layout LyX-Code
20089 \begin_layout Standard
20090 The individual lines define how the bibliographic information associated
20091 with an article or book, respectively, is to be displayed, and such a definitio
20092 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20095 defines a default format in the source code that will be used if no specific
20096 definition has been given.
20098 predefines several formats in the file
20099 \begin_inset Flex Code
20102 \begin_layout Plain Layout
20108 , which is included in most of \SpecialChar LyX
20109 's document classes.
20112 \begin_layout Standard
20113 The definitions use a simple language that allows Bib\SpecialChar TeX
20114 keys to be replaced
20116 Keys should be enclosed in
20117 \begin_inset Flex Code
20120 \begin_layout Plain Layout
20127 \begin_inset Flex Code
20130 \begin_layout Plain Layout
20137 So a simple definition might look like this:
20140 \begin_layout LyX-Code
20142 \begin_inset Quotes eld
20146 \begin_inset Quotes erd
20152 \begin_layout Standard
20153 This would print the author, followed by a comma, followed by the title,
20154 in quotes, followed by a period.
20157 \begin_layout Standard
20158 Of course, sometimes you may want to print a key only if it exists.
20159 This can be done by using a conditional construction, such as:
20160 \begin_inset Flex Code
20163 \begin_layout Plain Layout
20165 \begin_inset space ~
20175 \begin_inset Flex Code
20178 \begin_layout Plain Layout
20184 key exists, then print
20185 \begin_inset Quotes eld
20189 \begin_inset space ~
20193 \begin_inset Quotes erd
20196 followed by the volume key.
20197 It is also possible to have an else clause in the conditional, such as:
20198 \begin_inset Newline newline
20202 \begin_inset Flex Code
20205 \begin_layout Plain Layout
20206 {%author%[[%author%]][[%editor%, ed.]]}
20212 \begin_inset Newline newline
20216 \begin_inset Flex Code
20219 \begin_layout Plain Layout
20225 key is printed if it exists; otherwise, the editor key is printed, followed
20227 \begin_inset Quotes eld
20231 \begin_inset space ~
20235 \begin_inset Quotes erd
20238 Note that the key is again enclosed in
20239 \begin_inset Flex Code
20242 \begin_layout Plain Layout
20248 signs; the entire conditional is enclosed in braces; and the if and else
20249 clauses are enclosed in double brackets,
20250 \begin_inset Quotes eld
20254 \begin_inset Flex Code
20257 \begin_layout Plain Layout
20264 \begin_inset Quotes eld
20268 \begin_inset Quotes eld
20272 \begin_inset Flex Code
20275 \begin_layout Plain Layout
20282 \begin_inset Quotes erd
20286 There must be no space between any of these.
20289 \begin_layout Standard
20290 There is one other piece of syntax available in definitions, which looks
20292 \begin_inset Flex Code
20295 \begin_layout Plain Layout
20302 This defines a piece of formatting information that is to be used when
20304 \begin_inset Quotes eld
20308 \begin_inset Quotes erd
20312 Obviously, we do not want to output HTML tags when writing plain text,
20313 so they should be wrapped in
20314 \begin_inset Quotes eld
20318 \begin_inset Quotes erd
20322 \begin_inset Quotes eld
20326 \begin_inset Quotes erd
20332 \begin_layout Standard
20333 Two special sorts of definitions are also possible in a
20334 \begin_inset Flex Code
20337 \begin_layout Plain Layout
20344 An example of the first would be:
20347 \begin_layout LyX-Code
20349 \begin_inset Quotes eld
20353 \begin_inset Quotes erd
20359 \begin_layout Standard
20360 This is an abbreviation, or macro, and it can be used by treating it as
20362 \begin_inset Flex Code
20365 \begin_layout Plain Layout
20374 \begin_inset Flex Code
20377 \begin_layout Plain Layout
20383 exactly as it would treat its definition.
20384 So, let us issue the obvious
20392 \begin_layout LyX-Code
20396 \begin_layout Standard
20397 or anything like it.
20399 shouldn't go into an infinite loop, but it may go into a long one before
20403 \begin_layout Standard
20404 The second sort of special definition might look like this:
20407 \begin_layout LyX-Code
20411 \begin_layout Standard
20412 This defines a translatable piece of text, which allows relevant parts of
20413 the bibliography to be translated.
20414 It can be included in a definition by treating it as a key:
20415 \begin_inset Flex Code
20418 \begin_layout Plain Layout
20425 Several of these are predefined in
20426 \begin_inset Flex Code
20429 \begin_layout Plain Layout
20436 Note that these are not macros, in the sense just defined.
20437 They will not be expanded.
20440 \begin_layout Standard
20441 So here then is an example that use all these features:
20442 \begin_inset VSpace defskip
20448 \begin_layout Standard
20452 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20455 \begin_layout Standard
20456 \begin_inset VSpace defskip
20459 This defines a macro that prints the author, followed by a comma, if the
20461 \begin_inset Flex Code
20464 \begin_layout Plain Layout
20470 key is defined, or else prints the name of the editor, followed by the
20472 \begin_inset Flex Code
20475 \begin_layout Plain Layout
20481 or its translation (it is by default
20482 \begin_inset Quotes eld
20486 \begin_inset Quotes erd
20490 \begin_inset Flex Code
20493 \begin_layout Plain Layout
20500 Note that this is in fact defined in
20501 \begin_inset Flex Code
20504 \begin_layout Plain Layout
20510 , so you can use it in your own definitions, or re-definitions, if you load
20514 \begin_layout Section
20515 \begin_inset CommandInset label
20517 name "sec:Tags-for-XHTML"
20521 Tags for XHTML output
20524 \begin_layout Standard
20525 As with \SpecialChar LaTeX
20526 or DocBook, the format of \SpecialChar LyX
20527 's XHTML output is also controlled by
20528 layout information.
20529 In general, \SpecialChar LyX
20530 provides sensible defaults and, as mentioned earlier, it will
20531 even construct default CSS style rules from the other layout tags.
20532 For example, \SpecialChar LyX
20533 will attempt to use the information provided in the
20534 \begin_inset Flex Code
20537 \begin_layout Plain Layout
20543 declaration for the Chapter style to write CSS that will appropriately
20544 format chapter headings.
20547 \begin_layout Standard
20548 In many cases, then, you may not have to do anything at all to get acceptable
20549 XHTML output for your own environments, custom insets, and so forth.
20550 But in some cases you will, and so \SpecialChar LyX
20551 provides a number of layout tags that
20552 can be used to customize the XHTML and CSS that are generated.
20555 \begin_layout Standard
20556 Note that there are two tags,
20557 \begin_inset Flex Code
20560 \begin_layout Plain Layout
20567 \begin_inset Flex Code
20570 \begin_layout Plain Layout
20576 that may appear outside style and inset declarations.
20578 \begin_inset CommandInset ref
20580 reference "sub:General-text-class"
20584 for details on these.
20587 \begin_layout Subsection
20588 \begin_inset CommandInset label
20590 name "sub:Paragraph-Style-XHTML"
20597 \begin_layout Standard
20598 The sort of XHTML \SpecialChar LyX
20599 outputs for a paragraph depends upon whether we are dealing
20600 with a normal paragraph, a command, or an environment, where this is itself
20601 determined by the contents of the corresponding
20602 \begin_inset Flex Code
20605 \begin_layout Plain Layout
20616 \begin_layout Standard
20617 For a command or normal paragraph, the output XHTML has the following form:
20620 \begin_layout LyX-Code
20622 \begin_inset Quotes erd
20626 \begin_inset Quotes erd
20632 \begin_layout LyX-Code
20634 \begin_inset Quotes erd
20638 \begin_inset Quotes erd
20644 \begin_layout LyX-Code
20645 Contents of the paragraph.
20648 \begin_layout LyX-Code
20652 \begin_layout Standard
20653 The label tags are of course omitted if the paragraph does not have a label.
20656 \begin_layout Standard
20657 For an environment that is not some sort of list, the XHTML takes this form:
20660 \begin_layout LyX-Code
20662 \begin_inset Quotes erd
20666 \begin_inset Quotes erd
20672 \begin_layout LyX-Code
20674 \begin_inset Quotes erd
20678 \begin_inset Quotes erd
20682 \begin_inset Quotes erd
20686 \begin_inset Quotes erd
20689 >Environment Label</labeltag>First paragraph.</itemtag>
20692 \begin_layout LyX-Code
20693 <itemtag>Second paragraph.</itemtag>
20696 \begin_layout LyX-Code
20700 \begin_layout Standard
20701 Note that the label is output only for the first paragraph, as it should
20702 be for a theorem, for example.
20706 \begin_layout Standard
20707 For a list, we have one of these forms:
20710 \begin_layout LyX-Code
20712 \begin_inset Quotes erd
20716 \begin_inset Quotes erd
20722 \begin_layout LyX-Code
20724 \begin_inset Quotes erd
20728 \begin_inset Quotes erd
20732 \begin_inset Quotes erd
20736 \begin_inset Quotes erd
20739 >List Label</labeltag>First item.</itemtag>
20742 \begin_layout LyX-Code
20744 \begin_inset Quotes erd
20748 \begin_inset Quotes erd
20752 \begin_inset Quotes erd
20756 \begin_inset Quotes erd
20759 >List Label</labeltag>Second item.</itemtag>
20762 \begin_layout LyX-Code
20766 \begin_layout LyX-Code
20770 \begin_layout LyX-Code
20772 \begin_inset Quotes erd
20776 \begin_inset Quotes erd
20782 \begin_layout LyX-Code
20784 \begin_inset Quotes erd
20788 \begin_inset Quotes erd
20791 >List Label</labeltag><itemtag attr=
20792 \begin_inset Quotes erd
20796 \begin_inset Quotes erd
20799 >First item.</itemtag>
20802 \begin_layout LyX-Code
20804 \begin_inset Quotes erd
20808 \begin_inset Quotes erd
20811 >List Label</labeltag><itemtag attr=
20812 \begin_inset Quotes erd
20816 \begin_inset Quotes erd
20819 >Second item.</itemtag>
20822 \begin_layout LyX-Code
20826 \begin_layout Standard
20827 Note the different orders of
20828 \begin_inset Flex Code
20831 \begin_layout Plain Layout
20838 \begin_inset Flex Code
20841 \begin_layout Plain Layout
20848 Which order we get depends upon the setting of
20849 \begin_inset Flex Code
20852 \begin_layout Plain Layout
20859 \begin_inset Flex Code
20862 \begin_layout Plain Layout
20868 is false (the default), you get the first of these, with the label within
20869 the item; if true, you get the second, with the label outside the item.
20872 \begin_layout Standard
20873 The specific tags and attributes output for each paragraph type can be controlle
20874 d by means of the layout tags we are about to describe.
20875 As mentioned earlier, however, \SpecialChar LyX
20876 uses sensible defaults for many of these,
20877 so you often may not need to do very much to get good XHTML output.
20878 Think of the available tags as there so you can tweak things to your liking.
20881 \begin_layout Description
20882 \begin_inset Flex Code
20885 \begin_layout Plain Layout
20892 \begin_inset Flex Code
20895 \begin_layout Plain Layout
20901 ] Specifies attribute information to be output with the main tag.
20903 \begin_inset Quotes eld
20907 \begin_inset Flex Code
20910 \begin_layout Plain Layout
20917 \begin_inset Quotes erd
20921 By default, \SpecialChar LyX
20923 \begin_inset Quotes eld
20927 \begin_inset Flex Code
20930 \begin_layout Plain Layout
20937 \begin_inset Quotes erd
20941 \begin_inset Flex Code
20944 \begin_layout Plain Layout
20950 is the \SpecialChar LyX
20951 name of the layout, made lowercase, for example: chapter.
20956 contain any style information.
20958 \begin_inset Flex Code
20961 \begin_layout Plain Layout
20970 \begin_layout Description
20971 \begin_inset Flex Code
20974 \begin_layout Plain Layout
20981 \begin_inset Flex Code
20984 \begin_layout Plain Layout
20994 ] Whether to output the default CSS information \SpecialChar LyX
20995 generates for this layout,
20996 even if additional information is explicitly provided via
20997 \begin_inset Flex Code
21000 \begin_layout Plain Layout
21008 \begin_inset Flex Code
21011 \begin_layout Plain Layout
21017 allows you to alter or augment the generated CSS, rather than to override
21020 \begin_inset Flex Code
21023 \begin_layout Plain Layout
21032 \begin_layout Description
21033 \begin_inset Flex Code
21036 \begin_layout Plain Layout
21043 \begin_inset Flex Code
21046 \begin_layout Plain Layout
21052 ] The tag to be used for individual paragraphs of environments, replacing
21054 \begin_inset Flex Code
21057 \begin_layout Plain Layout
21063 in the examples above.
21065 \begin_inset Flex Code
21068 \begin_layout Plain Layout
21077 \begin_layout Description
21078 \begin_inset Flex Code
21081 \begin_layout Plain Layout
21088 \begin_inset Flex Code
21091 \begin_layout Plain Layout
21097 ] Attributes for the item tag.
21099 \begin_inset Quotes eld
21103 \begin_inset Flex Code
21106 \begin_layout Plain Layout
21107 class=`layoutname_item'
21113 \begin_inset Quotes erd
21121 contain any style information.
21123 \begin_inset Flex Code
21126 \begin_layout Plain Layout
21135 \begin_layout Description
21136 \begin_inset Flex Code
21139 \begin_layout Plain Layout
21146 \begin_inset Flex Code
21149 \begin_layout Plain Layout
21155 ] The tag to be used for paragraph and item labels, replacing
21156 \begin_inset Flex Code
21159 \begin_layout Plain Layout
21165 in the examples above.
21167 \begin_inset Flex Code
21170 \begin_layout Plain Layout
21177 \begin_inset Flex Code
21180 \begin_layout Plain Layout
21187 \begin_inset Flex Code
21190 \begin_layout Plain Layout
21197 \begin_inset Flex Code
21200 \begin_layout Plain Layout
21201 Centered_Top_Environment
21206 , in which case it defaults to
21207 \begin_inset Flex Code
21210 \begin_layout Plain Layout
21219 \begin_layout Description
21220 \begin_inset Flex Code
21223 \begin_layout Plain Layout
21230 \begin_inset Flex Code
21233 \begin_layout Plain Layout
21239 ] Attributes for the label tag.
21241 \begin_inset Quotes eld
21245 \begin_inset Flex Code
21248 \begin_layout Plain Layout
21249 class=`layoutname_label'
21255 \begin_inset Quotes erd
21263 contain any style information.
21265 \begin_inset Flex Code
21268 \begin_layout Plain Layout
21277 \begin_layout Description
21278 \begin_inset Flex Code
21281 \begin_layout Plain Layout
21288 \begin_inset Flex Code
21291 \begin_layout Plain Layout
21301 ] Meaningful only for list-like environments, this tag controls whether
21302 the label tag is output before or inside the item tag.
21303 This is used, for example, in the description environment, where we want
21305 \begin_inset Flex Code
21308 \begin_layout Plain Layout
21309 <dt>\SpecialChar ldots
21310 </dt><dd>\SpecialChar ldots
21318 \begin_inset Flex Code
21321 \begin_layout Plain Layout
21327 : The label tag is output inside the item tag.
21330 \begin_layout Description
21331 \begin_inset Flex Code
21334 \begin_layout Plain Layout
21340 Information to be output in the
21341 \begin_inset Flex Code
21344 \begin_layout Plain Layout
21350 section when this style is used.
21351 This might, for example, be used to include a
21352 \begin_inset Flex Code
21355 \begin_layout Plain Layout
21362 \begin_inset Flex Code
21365 \begin_layout Plain Layout
21374 \begin_layout Description
21375 \begin_inset Flex Code
21378 \begin_layout Plain Layout
21384 CSS style information to be included when this style is used.
21385 Note that this will automatically be wrapped in a layout-generated
21386 \begin_inset Flex Code
21389 \begin_layout Plain Layout
21395 block, so only the CSS itself need be included.
21397 \begin_inset Flex Code
21400 \begin_layout Plain Layout
21409 \begin_layout Description
21410 \begin_inset Flex Code
21413 \begin_layout Plain Layout
21420 \begin_inset Flex Code
21423 \begin_layout Plain Layout
21429 ] The tag to be used for the main label, replacing
21430 \begin_inset Flex Code
21433 \begin_layout Plain Layout
21439 in the examples above.
21441 \begin_inset Flex Code
21444 \begin_layout Plain Layout
21453 \begin_layout Description
21454 \begin_inset Flex Code
21457 \begin_layout Plain Layout
21464 \begin_inset Flex Code
21467 \begin_layout Plain Layout
21477 ] Marks this style as the one to be used to generate the
21478 \begin_inset Flex Code
21481 \begin_layout Plain Layout
21487 tag for the XHTML file.
21488 By default, it is false.
21490 \begin_inset Flex Code
21493 \begin_layout Plain Layout
21499 file sets it to true for the
21500 \begin_inset Flex Code
21503 \begin_layout Plain Layout
21513 \begin_layout Subsection
21517 \begin_layout Standard
21518 The XHTML output of insets can also be controlled by information in layout
21523 \begin_layout Plain Layout
21524 At present, this is true only for
21525 \begin_inset Quotes eld
21529 \begin_inset Quotes erd
21532 insets (insets you can type into) and is not true for
21533 \begin_inset Quotes eld
21537 \begin_inset Quotes erd
21540 insets (insets that are associated with dialog boxes).
21545 Here, too, \SpecialChar LyX
21546 tries to provide sensible defaults, and it constructs default
21548 But everything can be customized.
21551 \begin_layout Standard
21552 The XHTML \SpecialChar LyX
21553 outputs for an inset has the following form:
21556 \begin_layout LyX-Code
21558 \begin_inset Quotes erd
21562 \begin_inset Quotes erd
21568 \begin_layout LyX-Code
21569 <labeltag>Label</labeltag>
21572 \begin_layout LyX-Code
21574 \begin_inset Quotes erd
21578 \begin_inset Quotes erd
21581 >Contents of the inset.</innertag>
21584 \begin_layout LyX-Code
21588 \begin_layout Standard
21589 If the inset permits multiple paragraphs—that is, if
21590 \begin_inset Flex Code
21593 \begin_layout Plain Layout
21599 is true—then the contents of the inset will itself be output as paragraphs
21600 formatted according to the styles used for those paragraphs (standard,
21601 quote, and the like).
21602 The label tag is of course omitted if the paragraph does not have a label
21603 and, at present, is always
21604 \begin_inset Flex Code
21607 \begin_layout Plain Layout
21614 The inner tag is optional and, by default, does not appear.
21617 \begin_layout Standard
21618 The specific tags and attributes output for each inset can be controlled
21619 by means of the following layout tags.
21622 \begin_layout Description
21623 \begin_inset Flex Code
21626 \begin_layout Plain Layout
21633 \begin_inset Flex Code
21636 \begin_layout Plain Layout
21642 ] Specifies attribute information to be output with the main tag.
21644 \begin_inset Quotes eld
21648 \begin_inset Flex Code
21651 \begin_layout Plain Layout
21652 class=`myinset' onclick=`\SpecialChar ldots
21659 \begin_inset Quotes erd
21663 By default, \SpecialChar LyX
21665 \begin_inset Quotes eld
21669 \begin_inset Flex Code
21672 \begin_layout Plain Layout
21679 \begin_inset Quotes erd
21683 \begin_inset Flex Code
21686 \begin_layout Plain Layout
21692 is the \SpecialChar LyX
21693 name of the inset, made lowercase and with non-alphanumeric characters
21694 converted to underscores, for example: footnote.
21697 \begin_layout Description
21698 \begin_inset Flex Code
21701 \begin_layout Plain Layout
21708 \begin_inset Flex Code
21711 \begin_layout Plain Layout
21721 ] Whether to output the default CSS information \SpecialChar LyX
21722 generates for this layout,
21723 even if additional information is explicitly provided via
21724 \begin_inset Flex Code
21727 \begin_layout Plain Layout
21735 \begin_inset Flex Code
21738 \begin_layout Plain Layout
21744 allows you to alter or augment the generated CSS, rather than to override
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 ] Attributes for the inner tag.
21771 \begin_inset Quotes eld
21775 \begin_inset Flex Code
21778 \begin_layout Plain Layout
21779 class=`insetname_inner'
21785 \begin_inset Quotes erd
21791 \begin_layout Description
21792 \begin_inset Flex Code
21795 \begin_layout Plain Layout
21802 \begin_inset Flex Code
21805 \begin_layout Plain Layout
21811 ] The inner tag, replacing
21812 \begin_inset Flex Code
21815 \begin_layout Plain Layout
21821 in the examples above.
21822 By default, there is none.
21825 \begin_layout Description
21826 \begin_inset Flex Code
21829 \begin_layout Plain Layout
21836 \begin_inset Flex Code
21839 \begin_layout Plain Layout
21847 ] Whether this inset represents a standalone block of text (such as a footnote)
21848 or instead represents material that is included in the surrounding text
21849 (such as a branch).
21853 \begin_layout Description
21854 \begin_inset Flex Code
21857 \begin_layout Plain Layout
21864 \begin_inset Flex Code
21867 \begin_layout Plain Layout
21873 ] A label for this inset, possibly including a reference to a counter.
21874 For example, for footnote, it might be:
21875 \begin_inset Flex Code
21878 \begin_layout Plain Layout
21887 This is optional, and there is no default.
21890 \begin_layout Description
21891 \begin_inset Flex Code
21894 \begin_layout Plain Layout
21900 Information to be output in the
21901 \begin_inset Flex Code
21904 \begin_layout Plain Layout
21910 section when this style is used.
21911 This might, for example, be used to include a
21912 \begin_inset Flex Code
21915 \begin_layout Plain Layout
21922 \begin_inset Flex Code
21925 \begin_layout Plain Layout
21934 \begin_layout Description
21935 \begin_inset Flex Code
21938 \begin_layout Plain Layout
21944 CSS style information to be included when this style is used.
21945 Note that this will automatically be wrapped in a layout-generated
21946 \begin_inset Flex Code
21949 \begin_layout Plain Layout
21955 block, so only the CSS itself need be included.
21958 \begin_layout Description
21959 \begin_inset Flex Code
21962 \begin_layout Plain Layout
21969 \begin_inset Flex Code
21972 \begin_layout Plain Layout
21978 ] The tag to be used for the main label, replacing
21979 \begin_inset Flex Code
21982 \begin_layout Plain Layout
21988 in the examples above.
21989 The default depends upon the setting of
21990 \begin_inset Flex Code
21993 \begin_layout Plain Layout
22000 \begin_inset Flex Code
22003 \begin_layout Plain Layout
22009 is true, the default is
22010 \begin_inset Flex Code
22013 \begin_layout Plain Layout
22019 ; if it is false, the default is
22020 \begin_inset Flex Code
22023 \begin_layout Plain Layout
22032 \begin_layout Subsection
22036 \begin_layout Standard
22037 The XHTML output for floats too can be controlled by layout information.
22038 The output has the following form:
22041 \begin_layout LyX-Code
22043 \begin_inset Quotes erd
22047 \begin_inset Quotes erd
22053 \begin_layout LyX-Code
22054 Contents of the float.
22057 \begin_layout LyX-Code
22061 \begin_layout Standard
22062 The caption, if there is one, is a separate inset and will be output as
22064 Its appearance can be controlled via the InsetLayout for caption insets.
22068 \begin_layout Description
22069 \begin_inset Flex Code
22072 \begin_layout Plain Layout
22079 \begin_inset Flex Code
22082 \begin_layout Plain Layout
22088 ] Specifies attribute information to be output with the main tag.
22090 \begin_inset Quotes eld
22094 \begin_inset Flex Code
22097 \begin_layout Plain Layout
22098 class=`myfloat' onclick=`\SpecialChar ldots
22105 \begin_inset Quotes erd
22109 By default, \SpecialChar LyX
22111 \begin_inset Quotes eld
22115 \begin_inset Flex Code
22118 \begin_layout Plain Layout
22119 class=`float float-floattype'
22125 \begin_inset Quotes erd
22129 \begin_inset Flex Code
22132 \begin_layout Plain Layout
22138 is \SpecialChar LyX
22139 's name for this type of float, as determined by the float declaration
22141 \begin_inset CommandInset ref
22143 reference "sub:Floats"
22147 ), though made lowercase and with non-alphanumeric characters converted
22148 to underscores, for example: float-table.
22151 \begin_layout Description
22152 \begin_inset Flex Code
22155 \begin_layout Plain Layout
22161 CSS style information to be included when this float is used.
22162 Note that this will automatically be wrapped in a layout-generated
22163 \begin_inset Flex Code
22166 \begin_layout Plain Layout
22172 block, so only the CSS itself need be included.
22175 \begin_layout Description
22176 \begin_inset Flex Code
22179 \begin_layout Plain Layout
22186 \begin_inset Flex Code
22189 \begin_layout Plain Layout
22195 ] The tag to be used for this float, replacing
22196 \begin_inset Quotes eld
22200 \begin_inset Flex Code
22203 \begin_layout Plain Layout
22210 \begin_inset Quotes erd
22213 in the example above.
22215 \begin_inset Flex Code
22218 \begin_layout Plain Layout
22224 and will rarely need changing.
22227 \begin_layout Subsection
22228 Bibliography formatting
22231 \begin_layout Standard
22232 The bibliography can be formatted using
22233 \begin_inset Flex Code
22236 \begin_layout Plain Layout
22244 \begin_inset CommandInset ref
22246 reference "sub:Citation-format-description"
22253 \begin_layout Subsection
22258 \begin_layout Standard
22259 We have several times mentioned that \SpecialChar LyX
22260 will generate default CSS style rules
22261 for both insets and paragraph styles, based upon the other layout information
22263 In this section, we shall say a word about which layout information \SpecialChar LyX
22268 \begin_layout Standard
22269 At present, \SpecialChar LyX
22270 auto-generates CSS only for font information, making use of
22272 \begin_inset Flex Code
22275 \begin_layout Plain Layout
22282 \begin_inset Flex Code
22285 \begin_layout Plain Layout
22292 \begin_inset Flex Code
22295 \begin_layout Plain Layout
22302 \begin_inset Flex Code
22305 \begin_layout Plain Layout
22312 \begin_inset Flex Code
22315 \begin_layout Plain Layout
22322 \begin_inset CommandInset ref
22324 reference "sub:Font-description"
22329 The translation is mostly straightforward and obvious.
22331 \begin_inset Quotes eld
22335 \begin_inset Flex Code
22338 \begin_layout Plain Layout
22345 \begin_inset Quotes erd
22349 \begin_inset Quotes eld
22353 \begin_inset Flex Code
22356 \begin_layout Plain Layout
22357 font-family: sans-serif;
22363 \begin_inset Quotes erd
22367 The correspondence of \SpecialChar LyX
22368 sizes and CSS sizes is a little less obvious but
22369 nonetheless intuitive.
22371 \begin_inset Flex Code
22374 \begin_layout Plain Layout
22381 \begin_inset Flex URL
22384 \begin_layout Plain Layout
22394 \begin_layout Chapter
22395 Including External Material
22396 \begin_inset CommandInset label
22398 name "chap:Including-External-Material"
22405 \begin_layout Standard
22406 \begin_inset Box Shadowbox
22416 height_special "totalheight"
22419 \begin_layout Plain Layout
22420 WARNING: This portion of the documentation has not been updated for some
22422 We certainly hope that it is still accurate, but there are no guarantees.
22430 \begin_layout Standard
22431 The use of material from sources external to \SpecialChar LyX
22432 is covered in detail in the
22438 This part of the manual covers what needs to happen behind the scenes for
22439 new sorts of material to be included.
22442 \begin_layout Section
22446 \begin_layout Standard
22447 The external material feature is based on the concept of a
22452 A template is a specification of how \SpecialChar LyX
22453 should interface with a certain kind
22455 As bundled, \SpecialChar LyX
22456 comes with predefined templates for Xfig figures, various
22457 raster format images, chess diagrams, and LilyPond music notation.
22458 You can check the actual list by using the menu
22459 \begin_inset Flex MenuItem
22462 \begin_layout Plain Layout
22463 Insert\SpecialChar menuseparator
22464 File\SpecialChar menuseparator
22471 Furthermore, it is possible to roll your own template to support a specific
22473 Later we'll describe in more detail what is involved, and hopefully you
22474 will submit all the templates you create so we can include them in a later
22479 \begin_layout Standard
22480 Another basic idea of the external material feature is to distinguish between
22481 the original file that serves as a base for final material and the produced
22482 file that is included in your exported or printed document.
22483 For example, consider the case of a figure produced with
22484 \begin_inset Flex Code
22487 \begin_layout Plain Layout
22494 The Xfig application itself works on an original file with the
22495 \begin_inset Flex Code
22498 \begin_layout Plain Layout
22505 Within Xfig, you create and change your figure, and when you are done,
22507 \begin_inset Flex Code
22510 \begin_layout Plain Layout
22517 When you want to include the figure in your document, you invoke
22518 \begin_inset Flex Code
22521 \begin_layout Plain Layout
22527 in order to create a PostScript file that can readily be included in your
22531 \begin_inset Flex Code
22534 \begin_layout Plain Layout
22540 file is the original file, and the PostScript file is the produced file.
22543 \begin_layout Standard
22544 This distinction is important in order to allow updating of the material
22545 while you are in the process of writing the document.
22546 Furthermore, it provides us with the flexibility that is needed to support
22547 multiple export formats.
22548 For instance, in the case of a plain text file, it is not exactly an award-winn
22549 ing idea to include the figure as raw PostScript.
22550 Instead, you would either prefer to just include a reference to the figure
22551 or try to invoke some graphics to ASCII converter to make the final result
22552 look similar to the real graphics.
22553 The external material management allows you to do this, because it is parametri
22554 zed on the different export formats that \SpecialChar LyX
22558 \begin_layout Standard
22559 Besides supporting the production of different products according to the
22560 exported format, it supports tight integration with editing and viewing
22562 In the case of an Xfig figure, you are able to invoke Xfig on the original
22563 file with a single click from within the external material dialog in \SpecialChar LyX
22565 and also preview the produced PostScript file with Ghostview with another
22567 No more fiddling around with the command line and/or file browsers to locate
22568 and manipulate the original or produced files.
22569 In this way, you are finally able to take full advantage of the many different
22570 applications that are relevant to use when you write your documents, and
22571 ultimately be more productive.
22574 \begin_layout Section
22575 The external template configuration file
22578 \begin_layout Standard
22579 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22581 However, be aware that doing this in an careless manner most probably
22585 introduce an easily exploitable security hole.
22586 So before you do this, please read the discussion about security in
22587 \begin_inset CommandInset ref
22589 reference "sec:Security-discussion"
22596 \begin_layout Standard
22597 Having said that, we encourage you to submit any interesting templates that
22602 \begin_layout Standard
22603 The external templates are defined in the
22604 \begin_inset Flex Code
22607 \begin_layout Plain Layout
22609 Dir/lib/external_templates
22615 You can place your own version in
22616 \begin_inset Flex Code
22619 \begin_layout Plain Layout
22620 UserDir/external_templates
22628 \begin_layout Standard
22629 A typical template looks like this:
22632 \begin_layout LyX-Code
22636 \begin_layout LyX-Code
22637 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22640 \begin_layout LyX-Code
22644 \begin_layout LyX-Code
22648 \begin_layout LyX-Code
22652 \begin_layout LyX-Code
22656 \begin_layout LyX-Code
22660 \begin_layout LyX-Code
22661 AutomaticProduction true
22664 \begin_layout LyX-Code
22668 \begin_layout LyX-Code
22672 \begin_layout LyX-Code
22673 Format \SpecialChar LaTeX
22677 \begin_layout LyX-Code
22678 TransformCommand Rotate RotationLatexCommand
22681 \begin_layout LyX-Code
22682 TransformCommand Resize ResizeLatexCommand
22685 \begin_layout LyX-Code
22686 Product "$$RotateFront$$ResizeFront
22689 \begin_layout LyX-Code
22694 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22697 \begin_layout LyX-Code
22698 $$ResizeBack$$RotateBack"
22701 \begin_layout LyX-Code
22705 \begin_layout LyX-Code
22706 UpdateResult "$$AbsPath$$Basename.pstex_t"
22709 \begin_layout LyX-Code
22710 Requirement "graphicx"
22713 \begin_layout LyX-Code
22714 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22717 \begin_layout LyX-Code
22718 ReferencedFile latex "$$AbsPath$$Basename.eps"
22721 \begin_layout LyX-Code
22722 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22725 \begin_layout LyX-Code
22729 \begin_layout LyX-Code
22730 Format PDF\SpecialChar LaTeX
22734 \begin_layout LyX-Code
22735 TransformCommand Rotate RotationLatexCommand
22738 \begin_layout LyX-Code
22739 TransformCommand Resize ResizeLatexCommand
22742 \begin_layout LyX-Code
22743 Product "$$RotateFront$$ResizeFront
22746 \begin_layout LyX-Code
22751 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22754 \begin_layout LyX-Code
22755 $$ResizeBack$$RotateBack"
22758 \begin_layout LyX-Code
22759 UpdateFormat pdftex
22762 \begin_layout LyX-Code
22763 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22766 \begin_layout LyX-Code
22767 Requirement "graphicx"
22770 \begin_layout LyX-Code
22771 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22774 \begin_layout LyX-Code
22775 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22778 \begin_layout LyX-Code
22782 \begin_layout LyX-Code
22786 \begin_layout LyX-Code
22787 Product "$$Contents(
22789 "$$AbsPath$$Basename.asc
22794 \begin_layout LyX-Code
22795 UpdateFormat asciixfig
22798 \begin_layout LyX-Code
22799 UpdateResult "$$AbsPath$$Basename.asc"
22802 \begin_layout LyX-Code
22806 \begin_layout LyX-Code
22810 \begin_layout LyX-Code
22811 Product "<graphic fileref=
22813 "$$AbsOrRelPathMaster$$Basename.eps
22818 \begin_layout LyX-Code
22822 \begin_layout LyX-Code
22826 \begin_layout LyX-Code
22827 UpdateResult "$$AbsPath$$Basename.eps"
22830 \begin_layout LyX-Code
22831 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22834 \begin_layout LyX-Code
22835 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22838 \begin_layout LyX-Code
22842 \begin_layout LyX-Code
22843 Product "[XFig: $$FName]"
22846 \begin_layout LyX-Code
22850 \begin_layout LyX-Code
22854 \begin_layout Standard
22855 As you can see, the template is enclosed in
22856 \begin_inset Flex Code
22859 \begin_layout Plain Layout
22867 \begin_inset Flex Code
22870 \begin_layout Plain Layout
22877 It contains a header specifying some general settings and, for each supported
22878 primary document file format, a section
22879 \begin_inset Flex Code
22882 \begin_layout Plain Layout
22890 \begin_inset Flex Code
22893 \begin_layout Plain Layout
22902 \begin_layout Subsection
22903 The template header
22906 \begin_layout Description
22907 \begin_inset Flex Code
22910 \begin_layout Plain Layout
22911 AutomaticProduction
22912 \begin_inset space ~
22920 Whether the file represented by the template must be generated by \SpecialChar LyX
22922 This command must occur exactly once.
22925 \begin_layout Description
22926 \begin_inset Flex Code
22929 \begin_layout Plain Layout
22931 \begin_inset space ~
22939 A glob pattern that is used in the file dialog to filter out the desired
22941 If there is more than one possible file extension (e.
22942 \begin_inset space \thinspace{}
22946 \begin_inset space \space{}
22950 \begin_inset Flex Code
22953 \begin_layout Plain Layout
22960 \begin_inset Flex Code
22963 \begin_layout Plain Layout
22969 ), use something like
22970 \begin_inset Flex Code
22973 \begin_layout Plain Layout
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 text that is displayed on the button.
22998 This command must occur exactly once.
23001 \begin_layout Description
23002 \begin_inset Flex Code
23005 \begin_layout Plain Layout
23007 \begin_inset space ~
23011 \begin_inset space ~
23019 The help text that is used in the External dialog.
23020 Provide enough information to explain to the user just what the template
23021 can provide him with.
23022 This command must occur exactly once.
23025 \begin_layout Description
23026 \begin_inset Flex Code
23029 \begin_layout Plain Layout
23031 \begin_inset space ~
23039 The file format of the original file.
23040 This must be the name of a format that is known to \SpecialChar LyX
23042 \begin_inset CommandInset ref
23044 reference "sec:Formats"
23050 \begin_inset Quotes eld
23054 \begin_inset Flex Code
23057 \begin_layout Plain Layout
23064 \begin_inset Quotes erd
23067 if the template can handle original files of more than one format.
23069 will attempt to interrogate the file itself in order to deduce its format
23071 This command must occur exactly once.
23074 \begin_layout Description
23075 \begin_inset Flex Code
23078 \begin_layout Plain Layout
23080 \begin_inset space ~
23088 A unique name for the template.
23089 It must not contain substitution macros (see below).
23092 \begin_layout Description
23093 \begin_inset Flex Code
23096 \begin_layout Plain Layout
23098 \begin_inset space ~
23101 Rotate|Resize|Clip|Extra
23106 This command specifies which transformations are supported by this template.
23107 It may occur zero or more times.
23108 This command enables the corresponding tabs in the external dialog.
23110 \begin_inset Flex Code
23113 \begin_layout Plain Layout
23119 command must have either a corresponding
23120 \begin_inset Flex Code
23123 \begin_layout Plain Layout
23130 \begin_inset Flex Code
23133 \begin_layout Plain Layout
23140 \begin_inset Flex Code
23143 \begin_layout Plain Layout
23150 Otherwise the transformation will not be supported by that format.
23153 \begin_layout Subsection
23157 \begin_layout Description
23158 \begin_inset Flex Code
23161 \begin_layout Plain Layout
23163 \begin_inset space ~
23167 |PDF\SpecialChar LaTeX
23173 The primary document file format that this format definition is for.
23174 Not every template has a sensible representation in all document file formats.
23175 Please define nevertheless a
23176 \begin_inset Flex Code
23179 \begin_layout Plain Layout
23185 section for all templates.
23186 Use a dummy text when no representation is available.
23187 Then you can at least see a reference to the external material in the exported
23191 \begin_layout Description
23192 \begin_inset Flex Code
23195 \begin_layout Plain Layout
23197 \begin_inset space ~
23201 \begin_inset space ~
23209 This command defines an additional macro
23210 \begin_inset Flex Code
23213 \begin_layout Plain Layout
23219 for substitution in
23220 \begin_inset Flex Code
23223 \begin_layout Plain Layout
23231 \begin_inset Flex Code
23234 \begin_layout Plain Layout
23240 itself may contain substitution macros.
23241 The advantage over using
23242 \begin_inset Flex Code
23245 \begin_layout Plain Layout
23252 \begin_inset Flex Code
23255 \begin_layout Plain Layout
23261 is that the substituted value of
23262 \begin_inset Flex Code
23265 \begin_layout Plain Layout
23271 is sanitized so that it is a valid optional argument in the document format.
23272 This command may occur zero or more times.
23275 \begin_layout Description
23276 \begin_inset Flex Code
23279 \begin_layout Plain Layout
23281 \begin_inset space ~
23289 The text that is inserted in the exported document.
23290 This is actually the most important command and can be quite complex.
23291 This command must occur exactly once.
23294 \begin_layout Description
23295 \begin_inset Flex Code
23298 \begin_layout Plain Layout
23300 \begin_inset space ~
23308 This command specifies a preamble snippet that will be included in the
23311 It has to be defined using
23312 \begin_inset Flex Code
23315 \begin_layout Plain Layout
23323 \begin_inset Flex Code
23326 \begin_layout Plain Layout
23333 This command may occur zero or more times.
23336 \begin_layout Description
23337 \begin_inset Flex Code
23340 \begin_layout Plain Layout
23342 \begin_inset space ~
23346 \begin_inset space ~
23354 This command denotes files that are created by the conversion process and
23355 are needed for a particular export format.
23356 If the filename is relative, it is interpreted relative to the master document.
23357 This command may be given zero or more times.
23360 \begin_layout Description
23361 \begin_inset Flex Code
23364 \begin_layout Plain Layout
23366 \begin_inset space ~
23374 The name of a required \SpecialChar LaTeX
23376 The package is included via
23377 \begin_inset Flex Code
23380 \begin_layout Plain Layout
23388 in the \SpecialChar LaTeX
23390 This command may occur zero or more times.
23393 \begin_layout Description
23394 \begin_inset Flex Code
23397 \begin_layout Plain Layout
23399 \begin_inset space ~
23403 \begin_inset space ~
23406 RotationLatexCommand
23411 This command specifies that the built in \SpecialChar LaTeX
23412 command should be used for rotation.
23413 This command may occur once or not at all.
23416 \begin_layout Description
23417 \begin_inset Flex Code
23420 \begin_layout Plain Layout
23422 \begin_inset space ~
23426 \begin_inset space ~
23434 This command specifies that the built in \SpecialChar LaTeX
23435 command should be used for resizing.
23436 This command may occur once or not at all.
23439 \begin_layout Description
23440 \begin_inset Flex Code
23443 \begin_layout Plain Layout
23445 \begin_inset space ~
23449 \begin_inset space ~
23452 RotationLatexOption
23457 This command specifies that rotation is done via an optional argument.
23458 This command may occur once or not at all.
23461 \begin_layout Description
23462 \begin_inset Flex Code
23465 \begin_layout Plain Layout
23467 \begin_inset space ~
23471 \begin_inset space ~
23479 This command specifies that resizing is done via an optional argument.
23480 This command may occur once or not at all.
23483 \begin_layout Description
23484 \begin_inset Flex Code
23487 \begin_layout Plain Layout
23489 \begin_inset space ~
23493 \begin_inset space ~
23501 This command specifies that clipping is done via an optional argument.
23502 This command may occur once or not at all.
23505 \begin_layout Description
23506 \begin_inset Flex Code
23509 \begin_layout Plain Layout
23511 \begin_inset space ~
23515 \begin_inset space ~
23523 This command specifies that an extra optional argument is used.
23524 This command may occur once or not at all.
23527 \begin_layout Description
23528 \begin_inset Flex Code
23531 \begin_layout Plain Layout
23533 \begin_inset space ~
23541 The file format of the converted file.
23542 This must be the name of a format that is known to \SpecialChar LyX
23544 \begin_inset Flex MenuItem
23547 \begin_layout Plain Layout
23548 Tools\SpecialChar menuseparator
23549 Preferences\SpecialChar menuseparator
23550 File Handling\SpecialChar menuseparator
23557 This command must occur exactly once.
23558 If the resulting file format is PDF, you need to specify the format
23559 \begin_inset Flex Code
23562 \begin_layout Plain Layout
23569 This is the PDF format used for including graphics.
23570 The other defined PDF formats are for document export.
23573 \begin_layout Description
23574 \begin_inset Flex Code
23577 \begin_layout Plain Layout
23579 \begin_inset space ~
23587 The file name of the converted file.
23588 The file name must be absolute.
23589 This command must occur exactly once.
23592 \begin_layout Subsection
23593 Preamble definitions
23596 \begin_layout Standard
23597 The external template configuration file may contain additional preamble
23598 definitions enclosed by
23599 \begin_inset Flex Code
23602 \begin_layout Plain Layout
23610 \begin_inset Flex Code
23613 \begin_layout Plain Layout
23620 They can be used by the templates in the
23621 \begin_inset Flex Code
23624 \begin_layout Plain Layout
23633 \begin_layout Section
23634 The substitution mechanism
23637 \begin_layout Standard
23638 When the external material facility invokes an external program, it is done
23639 on the basis of a command defined in the template configuration file.
23640 These commands can contain various macros that are expanded before execution.
23641 Execution always take place in the directory of the containing document.
23644 \begin_layout Standard
23645 Also, whenever external material is to be displayed, the name will be produced
23646 by the substitution mechanism, and most other commands in the template
23647 definition support substitution as well.
23650 \begin_layout Standard
23651 The available macros are the following:
23654 \begin_layout Description
23655 \begin_inset Flex Code
23658 \begin_layout Plain Layout
23659 $$AbsOrRelPathMaster
23664 The file path, absolute or relative to the master \SpecialChar LyX
23668 \begin_layout Description
23669 \begin_inset Flex Code
23672 \begin_layout Plain Layout
23673 $$AbsOrRelPathParent
23678 The file path, absolute or relative to the \SpecialChar LyX
23682 \begin_layout Description
23683 \begin_inset Flex Code
23686 \begin_layout Plain Layout
23692 The absolute file path.
23695 \begin_layout Description
23696 \begin_inset Flex Code
23699 \begin_layout Plain Layout
23705 The filename without path and without the extension.
23708 \begin_layout Description
23709 \begin_inset Flex Code
23712 \begin_layout Plain Layout
23714 \begin_inset Quotes eld
23718 \begin_inset Quotes erd
23726 This macro will expand to the contents of the file with the name
23727 \begin_inset Flex Code
23730 \begin_layout Plain Layout
23739 \begin_layout Description
23740 \begin_inset Flex Code
23743 \begin_layout Plain Layout
23749 The file extension (including the dot).
23752 \begin_layout Description
23753 \begin_inset Flex Code
23756 \begin_layout Plain Layout
23762 The filename of the file specified in the external material dialog.
23763 This is either an absolute name, or it is relative to the \SpecialChar LyX
23767 \begin_layout Description
23768 \begin_inset Flex Code
23771 \begin_layout Plain Layout
23778 \begin_inset Flex Code
23781 \begin_layout Plain Layout
23787 (absolute name or relative to the \SpecialChar LyX
23791 \begin_layout Description
23792 \begin_inset Flex Code
23795 \begin_layout Plain Layout
23801 The file path, relative to the master \SpecialChar LyX
23805 \begin_layout Description
23806 \begin_inset Flex Code
23809 \begin_layout Plain Layout
23815 The file path, relative to the \SpecialChar LyX
23819 \begin_layout Description
23820 \begin_inset Flex Code
23823 \begin_layout Plain Layout
23829 This macro will expand to the absolute path of the system directory.
23830 This is typically used to point to the various helper scripts that are
23831 bundled with \SpecialChar LyX
23835 \begin_layout Description
23836 \begin_inset Flex Code
23839 \begin_layout Plain Layout
23845 A name and full path to a temporary file which will be automatically deleted
23846 whenever the containing document is closed, or the external material insertion
23850 \begin_layout Standard
23851 All path macros contain a trailing directory separator, so you can construct
23853 \begin_inset space \thinspace{}
23857 \begin_inset space \space{}
23860 the absolute filename with
23861 \begin_inset Flex Code
23864 \begin_layout Plain Layout
23865 $$AbsPath$$Basename$$Extension
23873 \begin_layout Standard
23874 The macros above are substituted in all commands unless otherwise noted.
23876 \begin_inset Flex Code
23879 \begin_layout Plain Layout
23885 supports additionally the following substitutions if they are enabled by
23887 \begin_inset Flex Code
23890 \begin_layout Plain Layout
23897 \begin_inset Flex Code
23900 \begin_layout Plain Layout
23909 \begin_layout Description
23910 \begin_inset Flex Code
23913 \begin_layout Plain Layout
23919 The front part of the resize command.
23922 \begin_layout Description
23923 \begin_inset Flex Code
23926 \begin_layout Plain Layout
23932 The back part of the resize command.
23935 \begin_layout Description
23936 \begin_inset Flex Code
23939 \begin_layout Plain Layout
23945 The front part of the rotation command.
23948 \begin_layout Description
23949 \begin_inset Flex Code
23952 \begin_layout Plain Layout
23958 The back part of the rotation command.
23961 \begin_layout Standard
23962 The value string of the
23963 \begin_inset Flex Code
23966 \begin_layout Plain Layout
23972 command supports additionally the following substitutions if they are enabled
23974 \begin_inset Flex Code
23977 \begin_layout Plain Layout
23984 \begin_inset Flex Code
23987 \begin_layout Plain Layout
23996 \begin_layout Description
23997 \begin_inset Flex Code
24000 \begin_layout Plain Layout
24009 \begin_layout Description
24010 \begin_inset Flex Code
24013 \begin_layout Plain Layout
24022 \begin_layout Description
24023 \begin_inset Flex Code
24026 \begin_layout Plain Layout
24035 \begin_layout Description
24036 \begin_inset Flex Code
24039 \begin_layout Plain Layout
24045 The rotation option.
24048 \begin_layout Standard
24049 You may ask why there are so many path macros.
24050 There are mainly two reasons:
24053 \begin_layout Enumerate
24054 Relative and absolute file names should remain relative or absolute, respectivel
24056 Users may have reasons to prefer either form.
24057 Relative names are useful for portable documents that should work on different
24058 machines, for example.
24059 Absolute names may be required by some programs.
24062 \begin_layout Enumerate
24064 treats relative file names differently than \SpecialChar LyX
24065 and other programs in nested
24067 For \SpecialChar LyX
24068 , a relative file name is always relative to the document that contains
24070 For \SpecialChar LaTeX
24071 , it is always relative to the master document.
24072 These two definitions are identical if you have only one document, but
24073 differ if you have a master document that includes part documents.
24074 That means that relative filenames must be transformed when presented to
24077 Fortunately \SpecialChar LyX
24078 does this automatically for you if you choose the right macros.
24081 \begin_layout Standard
24082 So which path macro should be used in new template definitions? The rule
24086 \begin_layout Itemize
24088 \begin_inset Flex Code
24091 \begin_layout Plain Layout
24097 if an absolute path is required.
24100 \begin_layout Itemize
24102 \begin_inset Flex Code
24105 \begin_layout Plain Layout
24106 $$AbsOrRelPathMaster
24111 if the substituted string is some kind of \SpecialChar LaTeX
24115 \begin_layout Itemize
24117 \begin_inset Flex Code
24120 \begin_layout Plain Layout
24121 $$AbsOrRelPathParent
24126 in order to preserve the user's choice.
24129 \begin_layout Standard
24130 There are special cases where this rule does not work and e.
24131 \begin_inset space \thinspace{}
24135 \begin_inset space \space{}
24138 relative names are needed, but normally it will work just fine.
24139 One example for such a case is the command
24140 \begin_inset Flex Code
24143 \begin_layout Plain Layout
24144 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24149 in the XFig template above: We can't use the absolute name because the
24151 \begin_inset Flex Code
24154 \begin_layout Plain Layout
24160 files needs the relative name in order to rewrite the file content.
24163 \begin_layout Section
24164 Security discussion
24165 \begin_inset CommandInset label
24167 name "sec:Security-discussion"
24174 \begin_layout Standard
24175 The external material feature interfaces with a lot of external programs
24176 and does so automatically, so we have to consider the security implications
24178 In particular, since you have the option of including your own filenames
24179 and/or parameter strings and those are expanded into a command, it seems
24180 that it would be possible to create a malicious document which executes
24181 arbitrary commands when a user views or prints the document.
24182 This is something we definitely want to avoid.
24185 \begin_layout Standard
24186 However, since the external program commands are specified in the template
24187 configuration file only, there are no security issues if \SpecialChar LyX
24188 is properly configure
24189 d with safe templates only.
24190 This is so because the external programs are invoked with the
24191 \begin_inset Flex Code
24194 \begin_layout Plain Layout
24200 -system call rather than the
24201 \begin_inset Flex Code
24204 \begin_layout Plain Layout
24210 system-call, so it's not possible to execute arbitrary commands from the
24211 filename or parameter section via the shell.
24214 \begin_layout Standard
24215 This also implies that you are restricted in what command strings you can
24216 use in the external material templates.
24217 In particular, pipes and redirection are not readily available.
24218 This has to be so if \SpecialChar LyX
24219 should remain safe.
24220 If you want to use some of the shell features, you should write a safe
24221 script to do this in a controlled manner, and then invoke the script from
24222 the command string.
24226 \begin_layout Standard
24227 It is possible to design a template that interacts directly with the shell,
24228 but since this would allow a malicious user to execute arbitrary commands
24229 by writing clever filenames and/or parameters, we generally recommend that
24230 you only use safe scripts that work with the
24231 \begin_inset Flex Code
24234 \begin_layout Plain Layout
24240 system call in a controlled manner.
24241 Of course, for use in a controlled environment, it can be tempting to just
24242 fall back to use ordinary shell scripts.
24243 If you do so, be aware that you
24247 provide an easily exploitable security hole in your system.
24248 Of course it stands to reason that such unsafe templates will never be
24249 included in the standard \SpecialChar LyX
24250 distribution, although we do encourage people
24251 to submit new templates in the open source tradition.
24252 But \SpecialChar LyX
24253 as shipped from the official distribution channels will never have
24257 \begin_layout Standard
24258 Including external material provides a lot of power, and you have to be
24259 careful not to introduce security hazards with this power.
24260 A subtle error in a single line in an innocent looking script can open
24261 the door to huge security problems.
24262 So if you do not fully understand the issues, we recommend that you consult
24263 a knowledgeable security professional or the \SpecialChar LyX
24264 development team if you have
24265 any questions about whether a given template is safe or not.
24266 And do this before you use it in an uncontrolled environment.
24269 \begin_layout Chapter
24271 List of supported \SpecialChar LyX
24272 functions to be used in layouts
24273 \begin_inset CommandInset label
24275 name "chap:List-of-functions"
24282 \begin_layout Standard
24284 \begin_inset Tabular
24285 <lyxtabular version="3" rows="11" columns="8">
24286 <features tabularvalignment="middle">
24287 <column alignment="left" valignment="top">
24288 <column alignment="left" valignment="top">
24289 <column alignment="left" valignment="top">
24290 <column alignment="left" valignment="top">
24291 <column alignment="left" valignment="top">
24292 <column alignment="left" valignment="top">
24293 <column alignment="left" valignment="top">
24294 <column alignment="left" valignment="top">
24296 <cell alignment="left" valignment="top" usebox="none">
24299 \begin_layout Plain Layout
24305 <cell alignment="left" valignment="top" usebox="none">
24308 \begin_layout Plain Layout
24314 <cell alignment="left" valignment="top" usebox="none">
24317 \begin_layout Plain Layout
24323 <cell alignment="left" valignment="top" usebox="none">
24326 \begin_layout Plain Layout
24332 <cell alignment="center" valignment="top" usebox="none">
24335 \begin_layout Plain Layout
24341 <cell alignment="center" valignment="top" usebox="none">
24344 \begin_layout Plain Layout
24350 <cell alignment="center" valignment="top" usebox="none">
24353 \begin_layout Plain Layout
24359 <cell alignment="center" valignment="top" usebox="none">
24362 \begin_layout Plain Layout
24370 <cell alignment="left" valignment="top" usebox="none">
24373 \begin_layout Plain Layout
24379 <cell alignment="left" valignment="top" usebox="none">
24382 \begin_layout Plain Layout
24388 <cell alignment="left" valignment="top" usebox="none">
24391 \begin_layout Plain Layout
24397 <cell alignment="left" valignment="top" usebox="none">
24400 \begin_layout Plain Layout
24406 <cell alignment="center" valignment="top" usebox="none">
24409 \begin_layout Plain Layout
24415 <cell alignment="center" valignment="top" usebox="none">
24418 \begin_layout Plain Layout
24424 <cell alignment="center" valignment="top" usebox="none">
24427 \begin_layout Plain Layout
24433 <cell alignment="center" valignment="top" usebox="none">
24436 \begin_layout Plain Layout
24444 <cell alignment="left" valignment="top" usebox="none">
24447 \begin_layout Plain Layout
24453 <cell alignment="left" valignment="top" usebox="none">
24456 \begin_layout Plain Layout
24462 <cell alignment="left" valignment="top" usebox="none">
24465 \begin_layout Plain Layout
24471 <cell alignment="left" valignment="top" usebox="none">
24474 \begin_layout Plain Layout
24480 <cell alignment="center" valignment="top" usebox="none">
24483 \begin_layout Plain Layout
24489 <cell alignment="center" valignment="top" usebox="none">
24492 \begin_layout Plain Layout
24498 <cell alignment="center" valignment="top" usebox="none">
24501 \begin_layout Plain Layout
24507 <cell alignment="center" valignment="top" usebox="none">
24510 \begin_layout Plain Layout
24518 <cell alignment="left" valignment="top" usebox="none">
24521 \begin_layout Plain Layout
24527 <cell alignment="left" valignment="top" usebox="none">
24530 \begin_layout Plain Layout
24536 <cell alignment="left" valignment="top" usebox="none">
24539 \begin_layout Plain Layout
24545 <cell alignment="left" valignment="top" usebox="none">
24548 \begin_layout Plain Layout
24554 <cell alignment="center" valignment="top" usebox="none">
24557 \begin_layout Plain Layout
24563 <cell alignment="center" valignment="top" usebox="none">
24566 \begin_layout Plain Layout
24572 <cell alignment="center" valignment="top" usebox="none">
24575 \begin_layout Plain Layout
24581 <cell alignment="center" valignment="top" usebox="none">
24584 \begin_layout Plain Layout
24592 <cell alignment="left" valignment="top" usebox="none">
24595 \begin_layout Plain Layout
24601 <cell alignment="left" valignment="top" usebox="none">
24604 \begin_layout Plain Layout
24610 <cell alignment="left" valignment="top" usebox="none">
24613 \begin_layout Plain Layout
24619 <cell alignment="left" valignment="top" usebox="none">
24622 \begin_layout Plain Layout
24628 <cell alignment="center" valignment="top" usebox="none">
24631 \begin_layout Plain Layout
24637 <cell alignment="center" valignment="top" usebox="none">
24640 \begin_layout Plain Layout
24646 <cell alignment="center" valignment="top" usebox="none">
24649 \begin_layout Plain Layout
24655 <cell alignment="center" valignment="top" usebox="none">
24658 \begin_layout Plain Layout
24666 <cell alignment="left" valignment="top" usebox="none">
24669 \begin_layout Plain Layout
24675 <cell alignment="left" valignment="top" usebox="none">
24678 \begin_layout Plain Layout
24684 <cell alignment="left" valignment="top" usebox="none">
24687 \begin_layout Plain Layout
24693 <cell alignment="left" valignment="top" usebox="none">
24696 \begin_layout Plain Layout
24702 <cell alignment="center" valignment="top" usebox="none">
24705 \begin_layout Plain Layout
24711 <cell alignment="center" valignment="top" usebox="none">
24714 \begin_layout Plain Layout
24720 <cell alignment="center" valignment="top" usebox="none">
24723 \begin_layout Plain Layout
24729 <cell alignment="center" valignment="top" usebox="none">
24732 \begin_layout Plain Layout
24740 <cell alignment="left" valignment="top" usebox="none">
24743 \begin_layout Plain Layout
24749 <cell alignment="left" valignment="top" usebox="none">
24752 \begin_layout Plain Layout
24758 <cell alignment="left" valignment="top" usebox="none">
24761 \begin_layout Plain Layout
24767 <cell alignment="left" valignment="top" usebox="none">
24770 \begin_layout Plain Layout
24776 <cell alignment="center" valignment="top" usebox="none">
24779 \begin_layout Plain Layout
24785 <cell alignment="center" valignment="top" usebox="none">
24788 \begin_layout Plain Layout
24794 <cell alignment="center" valignment="top" usebox="none">
24797 \begin_layout Plain Layout
24803 <cell alignment="center" valignment="top" usebox="none">
24806 \begin_layout Plain Layout
24814 <cell alignment="left" valignment="top" usebox="none">
24817 \begin_layout Plain Layout
24823 <cell alignment="left" valignment="top" usebox="none">
24826 \begin_layout Plain Layout
24832 <cell alignment="left" valignment="top" usebox="none">
24835 \begin_layout Plain Layout
24841 <cell alignment="left" valignment="top" usebox="none">
24844 \begin_layout Plain Layout
24850 <cell alignment="center" valignment="top" usebox="none">
24853 \begin_layout Plain Layout
24859 <cell alignment="center" valignment="top" usebox="none">
24862 \begin_layout Plain Layout
24868 <cell alignment="center" valignment="top" usebox="none">
24871 \begin_layout Plain Layout
24877 <cell alignment="center" valignment="top" usebox="none">
24880 \begin_layout Plain Layout
24888 <cell alignment="left" valignment="top" usebox="none">
24891 \begin_layout Plain Layout
24897 <cell alignment="left" valignment="top" usebox="none">
24900 \begin_layout Plain Layout
24906 <cell alignment="left" valignment="top" usebox="none">
24909 \begin_layout Plain Layout
24915 <cell alignment="left" valignment="top" usebox="none">
24918 \begin_layout Plain Layout
24924 <cell alignment="center" valignment="top" usebox="none">
24927 \begin_layout Plain Layout
24933 <cell alignment="center" valignment="top" usebox="none">
24936 \begin_layout Plain Layout
24942 <cell alignment="center" valignment="top" usebox="none">
24945 \begin_layout Plain Layout
24951 <cell alignment="center" valignment="top" usebox="none">
24954 \begin_layout Plain Layout
24962 <cell alignment="left" valignment="top" usebox="none">
24965 \begin_layout Plain Layout
24971 <cell alignment="left" valignment="top" usebox="none">
24974 \begin_layout Plain Layout
24980 <cell alignment="left" valignment="top" usebox="none">
24983 \begin_layout Plain Layout
24989 <cell alignment="left" valignment="top" usebox="none">
24992 \begin_layout Plain Layout
24998 <cell alignment="center" valignment="top" usebox="none">
25001 \begin_layout Plain Layout
25007 <cell alignment="center" valignment="top" usebox="none">
25010 \begin_layout Plain Layout
25016 <cell alignment="center" valignment="top" usebox="none">
25019 \begin_layout Plain Layout
25025 <cell alignment="center" valignment="top" usebox="none">
25028 \begin_layout Plain Layout
25036 <cell alignment="center" valignment="top" usebox="none">
25039 \begin_layout Plain Layout
25045 <cell alignment="center" valignment="top" usebox="none">
25048 \begin_layout Plain Layout
25054 <cell alignment="center" valignment="top" usebox="none">
25057 \begin_layout Plain Layout
25063 <cell alignment="center" valignment="top" usebox="none">
25066 \begin_layout Plain Layout
25072 <cell alignment="center" valignment="top" usebox="none">
25075 \begin_layout Plain Layout
25081 <cell alignment="center" valignment="top" usebox="none">
25084 \begin_layout Plain Layout
25090 <cell alignment="center" valignment="top" usebox="none">
25093 \begin_layout Plain Layout
25099 <cell alignment="center" valignment="top" usebox="none">
25102 \begin_layout Plain Layout
25116 \begin_layout Chapter
25117 Names of available colors to be used in layouts
25118 \begin_inset CommandInset label
25120 name "chap:Names-of-colors"
25127 \begin_layout Standard
25128 The colors listed here are the standard colors and the those that you can
25129 adjust in the \SpecialChar LyX
25133 \begin_layout Description
25146 No particular color – clear or default
25149 \begin_layout Description
25153 \begin_layout Description
25157 \begin_layout Description
25161 \begin_layout Description
25165 \begin_layout Description
25169 \begin_layout Description
25173 \begin_layout Description
25177 \begin_layout Description
25181 \begin_layout Description
25182 added_space Added space marker color
25185 \begin_layout Description
25186 addedtext Added text color
25189 \begin_layout Description
25190 appendix Appendix marker color
25193 \begin_layout Description
25194 background Background color
25197 \begin_layout Description
25198 bottomarea Bottom area color
25201 \begin_layout Description
25202 branchlabel Label color for branches
25205 \begin_layout Description
25206 buttonbg Color used for bottom background
25209 \begin_layout Description
25210 buttonhoverbg Color used for button background under focus
25213 \begin_layout Description
25214 buttonframe Color for inset button frames
25217 \begin_layout Description
25218 changebar Changebar color
25221 \begin_layout Description
25222 changedtextauthor1 Changed text color author 1
25225 \begin_layout Description
25226 changedtextauthor2 Changed text color author 2
25229 \begin_layout Description
25230 changedtextauthor3 Changed text color author 3
25233 \begin_layout Description
25234 changedtextauthor4 Changed text color author 4
25237 \begin_layout Description
25238 changedtextauthor5 Changed text color author 5
25241 \begin_layout Description
25242 collapsable_inset_frame Collapsable insets framecolor
25245 \begin_layout Description
25246 collapsable_inset_text Collapsable insets text color
25249 \begin_layout Description
25250 command Text color for command insets
25253 \begin_layout Description
25254 commandbg Background color for command insets
25257 \begin_layout Description
25258 commandframe Frame color for command insets
25261 \begin_layout Description
25262 comment color for comments
25265 \begin_layout Description
25266 commentbg Background color of comments
25269 \begin_layout Description
25270 cursor Cursor color
25273 \begin_layout Description
25274 deletedtext Deleted text color
25277 \begin_layout Description
25278 deletedtextmodifier Deleted text modifying color
25281 \begin_layout Description
25282 depthbar Color for the depth bars in the margin
25285 \begin_layout Description
25286 eolmarker End of line marker color
25289 \begin_layout Description
25290 error Color of the \SpecialChar LaTeX
25294 \begin_layout Description
25295 footlabel Label color for footnotes
25298 \begin_layout Description
25299 graphicsbg Graphics inset background color
25302 \begin_layout Description
25303 greyedout Label color for greyedout insets
25306 \begin_layout Description
25307 greyedoutbg Background color of greyedout inset
25310 \begin_layout Description
25311 greyedouttext Color for greyedout inset text
25314 \begin_layout Description
25315 indexlabel Label color for index insets
25318 \begin_layout Description
25319 ignore The color is ignored
25322 \begin_layout Description
25323 inherit The color is inherited
25326 \begin_layout Description
25327 inlinecompletion Inline completion color
25330 \begin_layout Description
25331 insetbg Inset marker background color
25334 \begin_layout Description
25335 insetframe Inset marker frame color
25338 \begin_layout Description
25339 language Color for marking foreign language words
25342 \begin_layout Description
25343 latex Text color in \SpecialChar LaTeX
25347 \begin_layout Description
25348 listingsbg Background color of listings inset
25351 \begin_layout Description
25352 marginlabel Label color for margin notes
25355 \begin_layout Description
25356 math Math inset text color
25359 \begin_layout Description
25360 mathbg Math inset background color
25363 \begin_layout Description
25364 mathcorners Math inset frame color not under focus
25367 \begin_layout Description
25368 mathframe Math inset frame color under focus
25371 \begin_layout Description
25372 mathline Math line color
25375 \begin_layout Description
25376 mathmacrobg Macro math inset background color
25379 \begin_layout Description
25380 mathmacroblend Macro math blended color
25383 \begin_layout Description
25384 mathmacroframe Macro math frame color
25387 \begin_layout Description
25388 mathmacrohoverbg Macro math inset background color hovered
25391 \begin_layout Description
25392 mathmacrolabel Macro math label color
25395 \begin_layout Description
25396 mathmacronewarg Macro template color for new parameters
25399 \begin_layout Description
25400 mathmacrooldarg Macro template color for old parameters
25403 \begin_layout Description
25404 newpage New page color
25407 \begin_layout Description
25408 nonunique_inlinecompletion Inline completion color for the non-unique part
25411 \begin_layout Description
25412 notebg Background color of notes
25415 \begin_layout Description
25416 notelabel Label color for notes
25419 \begin_layout Description
25420 pagebreak Page break/line break color
25423 \begin_layout Description
25424 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25427 \begin_layout Description
25428 phantomtext Text color for phantom insets
25431 \begin_layout Description
25432 preview The color used for previews
25435 \begin_layout Description
25436 previewframe Preview frame color
25439 \begin_layout Description
25440 regexpframe Color for regexp frame
25443 \begin_layout Description
25444 selection Background color of selected text
25447 \begin_layout Description
25448 selectiontext Foreground color of selected text
25451 \begin_layout Description
25452 shadedbg Background color of shaded box
25455 \begin_layout Description
25456 special Special chars text color
25459 \begin_layout Description
25460 tabularline Table line color
25463 \begin_layout Description
25464 tabularonoffline Table line color
25467 \begin_layout Description
25468 urllabel Label color for URL insets
25471 \begin_layout Description
25472 urltext Color for URL inset text