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
11443 \begin_inset Flex Code
11446 \begin_layout Plain Layout
11448 \change_inserted -712698321 1431070522
11455 \begin_inset Flex Code
11458 \begin_layout Plain Layout
11460 \change_inserted -712698321 1431070522
11461 string of characters
11470 Defines individual characters that should be output in raw form, meaning
11471 without special translations that \SpecialChar LaTeX
11473 Note that, contrary to PassThru, this needs to be explicitly defined for
11475 That is, arguments do not inherit PassThruChars from their parent inset
11481 \begin_layout Standard
11482 By default, the text entered in the \SpecialChar LyX
11483 workarea in the respective layout is
11484 the last (mandatory) argument of a command if the
11485 \begin_inset Flex Code
11488 \begin_layout Plain Layout
11495 \begin_inset Flex Code
11498 \begin_layout Plain Layout
11505 However, arguments with the prefix
11506 \begin_inset Flex Code
11509 \begin_layout Plain Layout
11515 are output after this workarea argument.
11516 Note that post-argument numbering restarts at 1, so the first argument
11517 following the workarea argument is
11518 \begin_inset Flex Code
11521 \begin_layout Plain Layout
11528 Post-arguments are ignored in any other
11529 \begin_inset Flex Code
11532 \begin_layout Plain Layout
11539 \begin_inset Flex Code
11542 \begin_layout Plain Layout
11551 \begin_layout Standard
11553 \begin_inset Flex Code
11556 \begin_layout Plain Layout
11565 \begin_inset Flex Code
11568 \begin_layout Plain Layout
11577 \begin_inset Flex Code
11580 \begin_layout Plain Layout
11586 followed by the number (e.
11587 \begin_inset space \thinspace{}
11591 \begin_inset space \space{}
11595 \begin_inset Flex Code
11598 \begin_layout Plain Layout
11608 \begin_layout Description
11609 \begin_inset Flex Code
11612 \begin_layout Plain Layout
11618 Note that this will completely override any prior
11619 \begin_inset Flex Code
11622 \begin_layout Plain Layout
11628 declaration for this style.
11630 \begin_inset Quotes eld
11634 \begin_inset Flex Code
11637 \begin_layout Plain Layout
11644 \begin_inset Quotes erd
11649 \begin_inset CommandInset ref
11651 reference "sub:I18n"
11655 for details on its use.
11658 \begin_layout Description
11659 \begin_inset Flex Code
11662 \begin_layout Plain Layout
11669 \begin_inset Flex Code
11672 \begin_layout Plain Layout
11682 \begin_layout Plain Layout
11683 Note that a `float' here is a real number, such as: 1.5.
11688 The vertical space with which the last of a chain of paragraphs with this
11689 style is separated from the following paragraph.
11690 If the next paragraph has another style, the separations are not simply
11691 added, but the maximum is taken.
11694 \begin_layout Description
11695 \begin_inset Flex Code
11698 \begin_layout Plain Layout
11705 \begin_inset Flex Code
11708 \begin_layout Plain Layout
11714 ] The category for this style.
11715 This is used to group related styles in the style combobox on the toolbar.
11716 Any string can be used, but you may want to use existing categories with
11721 \begin_layout Description
11722 \begin_inset Flex Code
11725 \begin_layout Plain Layout
11731 Depth of XML command.
11732 Used only with XML-type formats.
11735 \begin_layout Description
11736 \begin_inset Flex Code
11739 \begin_layout Plain Layout
11746 \begin_inset Flex Code
11749 \begin_layout Plain Layout
11755 ] Copies all the features of an existing style into the current one.
11759 \begin_layout Description
11760 \begin_inset Flex Code
11763 \begin_layout Plain Layout
11770 \begin_inset Flex Code
11773 \begin_layout Plain Layout
11779 ] The name of a style whose preamble should be output
11784 This allows to ensure some ordering of the preamble snippets when macros
11785 definitions depend on one another.
11789 \begin_layout Plain Layout
11790 Note that, besides that functionality, there is no way to ensure any ordering
11792 The ordering that you see in a given version of \SpecialChar LyX
11793 may change without warning
11802 \begin_layout Description
11803 \begin_inset Flex Code
11806 \begin_layout Plain Layout
11813 \begin_inset Flex Code
11816 \begin_layout Plain Layout
11821 , Box, Filled_Box, Static
11826 ] The type of label that stands at the end of the paragraph (or sequence
11828 \begin_inset Flex Code
11831 \begin_layout Plain Layout
11838 \begin_inset Newline newline
11842 \begin_inset Flex Code
11845 \begin_layout Plain Layout
11852 \begin_inset Flex Code
11855 \begin_layout Plain Layout
11862 \begin_inset Flex Code
11865 \begin_layout Plain Layout
11873 \begin_inset Flex Code
11876 \begin_layout Plain Layout
11883 \begin_inset Quotes eld
11887 \begin_inset Quotes erd
11891 \begin_inset Flex Code
11894 \begin_layout Plain Layout
11901 \begin_inset space \space{}
11905 \begin_inset Flex Code
11908 \begin_layout Plain Layout
11914 ) is a white (resp.
11915 \begin_inset space ~
11918 black) square suitable for end of proof markers,
11919 \begin_inset Flex Code
11922 \begin_layout Plain Layout
11928 is an explicit text string.
11931 \begin_layout Description
11932 \begin_inset Flex Code
11935 \begin_layout Plain Layout
11942 \begin_inset Flex Code
11945 \begin_layout Plain Layout
11951 ] The string used for a label with a
11952 \begin_inset Flex Code
11955 \begin_layout Plain Layout
11962 \begin_inset Newline newline
11966 \begin_inset Flex Code
11969 \begin_layout Plain Layout
11979 \begin_layout Description
11980 \begin_inset Flex Code
11983 \begin_layout Plain Layout
11989 The font used for both the text body
11995 \begin_inset CommandInset ref
11997 reference "sub:Font-description"
12002 Note that defining this font automatically defines the
12003 \begin_inset Flex Code
12006 \begin_layout Plain Layout
12013 So you should define this one first if you also want to define
12014 \begin_inset Flex Code
12017 \begin_layout Plain Layout
12026 \begin_layout Description
12027 \begin_inset Flex Code
12030 \begin_layout Plain Layout
12037 \begin_inset Flex Code
12040 \begin_layout Plain Layout
12046 ] Used for backporting new styles to stable \SpecialChar LyX
12048 The first stable version that supports this tag is \SpecialChar LyX
12050 The argument is a number which may either be 0, -1 or any value greater
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12062 flag of a style is greater than zero, it will always be written to the
12064 If a .lyx file is read, the style definitions from the document header are
12065 added to the document class.
12066 Therefore even older \SpecialChar LyX
12067 versions can handle the style.
12069 \begin_inset Flex Code
12072 \begin_layout Plain Layout
12078 is a version number: If the style is read, and the version number is less
12079 than the version number of the already existing style in the document class,
12080 the new style is ignored.
12081 If the version number is greater, the new style replaces the existing style.
12082 A value of -1 means an infinite version number, i.
12083 \begin_inset space \thinspace{}
12087 \begin_inset space \space{}
12090 the style is always used.
12093 \begin_layout Description
12094 \begin_inset Flex Code
12097 \begin_layout Plain Layout
12104 \begin_inset Flex Code
12107 \begin_layout Plain Layout
12116 \begin_inset space \thinspace{}
12120 \begin_inset Flex Code
12123 \begin_layout Plain Layout
12129 ] Usually \SpecialChar LyX
12130 does not allow you to insert more than one space between words,
12131 since a space is considered as the separation between two words, not a
12132 character or symbol of its own.
12133 This is a very fine thing but sometimes annoying, for example, when typing
12134 program code or plain \SpecialChar LaTeX
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12147 Note that \SpecialChar LyX
12148 will create protected blanks for the additional blanks when
12149 in another mode than \SpecialChar LaTeX
12153 \begin_layout Description
12154 \begin_inset Flex Code
12157 \begin_layout Plain Layout
12163 These tags are used with XHTML output.
12165 \begin_inset CommandInset ref
12167 reference "sub:Paragraph-Style-XHTML"
12174 \begin_layout Description
12175 \begin_inset Flex Code
12178 \begin_layout Plain Layout
12184 [FIXME] (Used only with XML-type formats.)
12187 \begin_layout Description
12188 \begin_inset Flex Code
12191 \begin_layout Plain Layout
12198 \begin_inset Flex Code
12201 \begin_layout Plain Layout
12210 \begin_inset space \thinspace{}
12214 \begin_inset Flex Code
12217 \begin_layout Plain Layout
12224 \begin_inset Flex Code
12227 \begin_layout Plain Layout
12233 , marks the style as to be included in the document preamble and not in
12235 This is useful for document classes that want such information as the title
12236 and author to appear in the preamble.
12237 Note that this works only for styles for which the
12238 \begin_inset Flex Code
12241 \begin_layout Plain Layout
12248 \begin_inset Flex Code
12251 \begin_layout Plain Layout
12258 \begin_inset Flex Code
12261 \begin_layout Plain Layout
12270 \begin_layout Description
12271 \begin_inset Flex Code
12274 \begin_layout Plain Layout
12281 \begin_inset Flex Code
12284 \begin_layout Plain Layout
12293 \begin_inset space \thinspace{}
12297 \begin_inset Flex Code
12300 \begin_layout Plain Layout
12307 \begin_inset Flex Code
12310 \begin_layout Plain Layout
12316 , marks the style as being part of a title block (see also the
12317 \begin_inset Flex Code
12320 \begin_layout Plain Layout
12327 \begin_inset Flex Code
12330 \begin_layout Plain Layout
12339 \begin_layout Description
12340 \begin_inset Flex Code
12343 \begin_layout Plain Layout
12350 \begin_inset Flex Code
12353 \begin_layout Plain Layout
12359 ] The \SpecialChar LaTeX
12360 command sequence declaring an item in a list.
12361 The command is to be defined without the preceding backslash (the default
12363 \begin_inset Quotes eld
12367 \begin_inset Quotes erd
12371 \begin_inset Flex Code
12374 \begin_layout Plain Layout
12382 in the \SpecialChar LaTeX
12386 \begin_layout Description
12387 \begin_inset Flex Code
12390 \begin_layout Plain Layout
12397 \begin_inset Flex Code
12400 \begin_layout Plain Layout
12406 ] This provides extra space between paragraphs that have the same style.
12407 If you put other styles into an environment, each is separated with the
12409 \begin_inset Flex Code
12412 \begin_layout Plain Layout
12419 But the whole items of the environment are additionally separated with
12421 \begin_inset Flex Code
12424 \begin_layout Plain Layout
12431 Note that this is a
12436 \begin_layout Description
12437 \begin_inset Flex Code
12440 \begin_layout Plain Layout
12446 [FIXME] (Used only with XML-type formats.)
12449 \begin_layout Description
12450 \begin_inset Flex Code
12453 \begin_layout Plain Layout
12460 \begin_inset Flex Code
12463 \begin_layout Plain Layout
12472 \begin_inset space \thinspace{}
12476 \begin_inset Flex Code
12479 \begin_layout Plain Layout
12485 ] Usually \SpecialChar LyX
12486 does not allow you to leave a paragraph empty, since it would
12487 lead to empty \SpecialChar LaTeX
12489 There are some cases where this could be desirable however: in a letter
12490 template, the required fields can be provided as empty fields, so that
12491 people do not forget them; in some special classes, a style can be used
12492 as some kind of break, which does not contain actual text.
12495 \begin_layout Description
12496 \begin_inset Flex Code
12499 \begin_layout Plain Layout
12506 \begin_inset Flex Code
12509 \begin_layout Plain Layout
12515 ] The vertical space between the label and the text body.
12516 Only used for labels that are above the text body (
12517 \begin_inset Flex Code
12520 \begin_layout Plain Layout
12527 \begin_inset Newline newline
12531 \begin_inset Flex Code
12534 \begin_layout Plain Layout
12535 Centered_Top_Environment
12543 \begin_layout Description
12544 \begin_inset Flex Code
12547 \begin_layout Plain Layout
12554 \begin_inset Flex Code
12557 \begin_layout Plain Layout
12563 ] The name of the counter for automatic numbering.
12564 In order to have the counter appear with your label, you will need to reference
12566 \begin_inset Flex Code
12569 \begin_layout Plain Layout
12578 This will work with
12579 \begin_inset Flex Code
12582 \begin_layout Plain Layout
12589 \begin_inset Flex Code
12592 \begin_layout Plain Layout
12599 \begin_inset Flex Code
12602 \begin_layout Plain Layout
12609 \begin_inset Flex Code
12612 \begin_layout Plain Layout
12619 \begin_inset Newline newline
12627 \begin_inset Flex Code
12630 \begin_layout Plain Layout
12637 \begin_inset Flex Code
12640 \begin_layout Plain Layout
12646 , though this case is a bit complicated.
12647 Suppose you declare
12648 \begin_inset Quotes eld
12652 \begin_inset Flex Code
12655 \begin_layout Plain Layout
12656 LabelCounter myenum
12662 \begin_inset Quotes erd
12666 Then the actual counters used are
12667 \begin_inset Flex Code
12670 \begin_layout Plain Layout
12677 \begin_inset Flex Code
12680 \begin_layout Plain Layout
12687 \begin_inset Flex Code
12690 \begin_layout Plain Layout
12697 \begin_inset Flex Code
12700 \begin_layout Plain Layout
12706 , much as in \SpecialChar LaTeX
12708 These counters must all be declared separately.
12709 \begin_inset Newline newline
12713 \begin_inset CommandInset ref
12715 reference "sub:Counters"
12719 for details on counters.
12722 \begin_layout Description
12723 \begin_inset Flex Code
12726 \begin_layout Plain Layout
12732 The font used for the label.
12734 \begin_inset CommandInset ref
12736 reference "sub:Font-description"
12743 \begin_layout Description
12744 \begin_inset Flex Code
12747 \begin_layout Plain Layout
12754 \begin_inset Flex Code
12757 \begin_layout Plain Layout
12763 ] Text that indicates how far a label should be indented.
12766 \begin_layout Description
12767 \begin_inset Flex Code
12770 \begin_layout Plain Layout
12777 \begin_inset Flex Code
12780 \begin_layout Plain Layout
12786 ] Text that indicates the amount of horizontal space between the label and
12788 Only used for labels that are not above the text body.
12791 \begin_layout Description
12792 \begin_inset Flex Code
12795 \begin_layout Plain Layout
12802 \begin_inset Flex Code
12805 \begin_layout Plain Layout
12811 ] The string used for the label.
12813 \begin_inset Flex Code
12816 \begin_layout Plain Layout
12822 is set, this string can be contain the special formatting commands described
12824 \begin_inset CommandInset ref
12826 reference "sub:Counters"
12833 \begin_layout Description
12834 \begin_inset Flex Code
12837 \begin_layout Plain Layout
12838 LabelStringAppendix
12844 \begin_inset Flex Code
12847 \begin_layout Plain Layout
12853 ] This is used inside the appendix instead of
12854 \begin_inset Newline newline
12858 \begin_inset Flex Code
12861 \begin_layout Plain Layout
12869 \begin_inset Flex Code
12872 \begin_layout Plain Layout
12879 \begin_inset Newline newline
12883 \begin_inset Flex Code
12886 \begin_layout Plain Layout
12887 LabelStringAppendix
12895 \begin_layout Description
12896 \begin_inset Flex Code
12899 \begin_layout Plain Layout
12905 [FIXME] (Used only with XML-type formats.)
12908 \begin_layout Description
12909 \begin_inset Flex Code
12912 \begin_layout Plain Layout
12919 \begin_inset Flex Code
12922 \begin_layout Plain Layout
12927 , Manual, Static, Above,
12928 \begin_inset Newline newline
12931 Centered, Sensitive, Enumerate,
12932 \begin_inset Newline newline
12935 Itemize, Bibliography
12941 \begin_inset Separator parbreak
12948 \begin_layout Description
12949 \begin_inset Flex Code
12952 \begin_layout Plain Layout
12958 means the label is the very first word (up to the first real blank).
12959 Use protected spaces if you want more than one word as the label.
12963 \begin_layout Description
12964 \begin_inset Flex Code
12967 \begin_layout Plain Layout
12973 means the label is simply what is declared as
12974 \begin_inset Flex Code
12977 \begin_layout Plain Layout
12984 This will be displayed
12985 \begin_inset Quotes eld
12989 \begin_inset Quotes erd
12992 , at the beginning of the paragraph.
12994 \begin_inset Flex Code
12997 \begin_layout Plain Layout
13004 \begin_inset Flex Code
13007 \begin_layout Plain Layout
13013 , then it will be displayed only in the first paragraph of any sequence
13014 of paragraphs with the same
13015 \begin_inset Flex Code
13018 \begin_layout Plain Layout
13027 \begin_layout Description
13028 \begin_inset Flex Code
13031 \begin_layout Plain Layout
13038 \begin_inset space ~
13042 \begin_inset space ~
13046 \begin_inset Flex Code
13049 \begin_layout Plain Layout
13055 are special cases of
13056 \begin_inset Flex Code
13059 \begin_layout Plain Layout
13066 The label will be printed above the paragraph either at the beginning of
13067 the line or centered.
13070 \begin_layout Description
13071 \begin_inset Flex Code
13074 \begin_layout Plain Layout
13080 is a special case for the caption-labels
13081 \begin_inset Quotes eld
13085 \begin_inset Quotes erd
13089 \begin_inset Quotes eld
13093 \begin_inset Quotes erd
13097 \begin_inset Newline newline
13101 \begin_inset Flex Code
13104 \begin_layout Plain Layout
13110 means the (hardcoded) label string depends on the kind of float: It is
13111 hardcoded to be `FloatType N', where N is the value of the counter associated
13113 For the case that a caption is inserted outside of a float the
13114 \begin_inset Flex Code
13117 \begin_layout Plain Layout
13124 \begin_inset Quotes eld
13128 \begin_inset Quotes erd
13134 \begin_layout Description
13135 \begin_inset Flex Code
13138 \begin_layout Plain Layout
13144 produces the usual sort of enumeration labels.
13145 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13146 small Roman numerals, and uppercase letters for the four possible depths.
13149 \begin_layout Description
13150 \begin_inset Flex Code
13153 \begin_layout Plain Layout
13159 produces various bullets at the different levels.
13160 It is also hardcoded.
13163 \begin_layout Description
13164 \begin_inset Flex Code
13167 \begin_layout Plain Layout
13173 should be used only with
13174 \begin_inset Flex Code
13177 \begin_layout Plain Layout
13178 LatexType BibEnvironment
13187 \begin_layout Description
13188 \begin_inset Flex Code
13191 \begin_layout Plain Layout
13197 Note that this will completely override any prior
13198 \begin_inset Flex Code
13201 \begin_layout Plain Layout
13207 declaration for this style.
13209 \begin_inset Quotes eld
13213 \begin_inset Flex Code
13216 \begin_layout Plain Layout
13223 \begin_inset Quotes erd
13228 \begin_inset CommandInset ref
13230 reference "sub:I18n"
13234 for details on its use.
13237 \begin_layout Description
13238 \begin_inset Flex Code
13241 \begin_layout Plain Layout
13248 \begin_inset Flex Code
13251 \begin_layout Plain Layout
13257 ] The name of the corresponding \SpecialChar LaTeX
13259 Either the environment or command name.
13262 \begin_layout Description
13263 \begin_inset Flex Code
13266 \begin_layout Plain Layout
13273 \begin_inset Flex Code
13276 \begin_layout Plain Layout
13282 ] An optional parameter for the corresponding
13283 \begin_inset Flex Code
13286 \begin_layout Plain Layout
13293 This parameter cannot be changed from within \SpecialChar LyX
13295 \begin_inset Flex Code
13298 \begin_layout Plain Layout
13304 for customizable parameters).
13305 This will be output as is after all \SpecialChar LaTeX
13307 \begin_inset Flex Code
13310 \begin_layout Plain Layout
13319 \begin_layout Description
13320 \begin_inset Flex Code
13323 \begin_layout Plain Layout
13330 \begin_inset Flex Code
13333 \begin_layout Plain Layout
13338 , Command, Environment, Item_Environment,
13339 \begin_inset Newline newline
13342 List_Environment, Bib_Environment
13347 ] How the style should be translated into \SpecialChar LaTeX
13352 \begin_layout Plain Layout
13353 \begin_inset Flex Code
13356 \begin_layout Plain Layout
13362 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13363 Visit the SGML class files for specific examples.
13369 \begin_inset Separator parbreak
13376 \begin_layout Description
13377 \begin_inset Flex Code
13380 \begin_layout Plain Layout
13386 means nothing special.
13389 \begin_layout Description
13390 \begin_inset Flex Code
13393 \begin_layout Plain Layout
13400 \begin_inset Flex Code
13403 \begin_layout Plain Layout
13410 {\SpecialChar ldots
13419 \begin_layout Description
13420 \begin_inset Flex Code
13423 \begin_layout Plain Layout
13430 \begin_inset Flex Code
13433 \begin_layout Plain Layout
13440 }\SpecialChar ldots
13456 \begin_layout Description
13457 \begin_inset Flex Code
13460 \begin_layout Plain Layout
13467 \begin_inset Flex Code
13470 \begin_layout Plain Layout
13477 \begin_inset Flex Code
13480 \begin_layout Plain Layout
13488 is generated for each paragraph of this environment.
13492 \begin_layout Description
13493 \begin_inset Flex Code
13496 \begin_layout Plain Layout
13503 \begin_inset Flex Code
13506 \begin_layout Plain Layout
13513 \begin_inset Newline newline
13517 \begin_inset Flex Code
13520 \begin_layout Plain Layout
13526 is passed as an argument to the environment.
13527 \begin_inset Newline newline
13531 \begin_inset Flex Code
13534 \begin_layout Plain Layout
13540 can be defined in the
13541 \begin_inset Flex MenuItem
13544 \begin_layout Plain Layout
13545 Edit\SpecialChar menuseparator
13547 \begin_inset space ~
13558 \begin_layout Description
13559 \begin_inset Flex Code
13562 \begin_layout Plain Layout
13569 \begin_inset Flex Code
13572 \begin_layout Plain Layout
13578 but adds additionally the necessary mandatory argument (the longest label)
13579 to the begin statement of the bibliography environment:
13580 \begin_inset Newline newline
13584 \begin_inset Flex Code
13587 \begin_layout Plain Layout
13590 begin{thebibliography}{99}
13595 It is therefore only useful for bibliography environments.
13596 The default longest label
13597 \begin_inset Quotes eld
13601 \begin_inset Quotes erd
13604 can be changed by the user in the paragraph settings of a bibliography
13608 \begin_layout Standard
13609 Putting the last few things together, the \SpecialChar LaTeX
13610 output will be either:
13613 \begin_layout LyX-Code
13616 LatexName[LatexParam]{\SpecialChar ldots
13620 \begin_layout Standard
13624 \begin_layout LyX-Code
13627 begin{LatexName}[LatexParam] \SpecialChar ldots
13633 \begin_layout Standard
13634 depending upon the \SpecialChar LaTeX
13639 \begin_layout Description
13640 \begin_inset Flex Code
13643 \begin_layout Plain Layout
13650 \begin_inset Flex Code
13653 \begin_layout Plain Layout
13659 ] A string that is put at the beginning of the style content.
13660 A line break in the output can be indicated by
13661 \begin_inset Flex Code
13664 \begin_layout Plain Layout
13673 \begin_layout Description
13674 \begin_inset Flex Code
13677 \begin_layout Plain Layout
13684 \begin_inset Flex Code
13687 \begin_layout Plain Layout
13693 ] If you put styles into environments, the different
13694 \begin_inset Flex Code
13697 \begin_layout Plain Layout
13703 are not simply added, but added with a factor
13704 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13708 Note that this parameter is also used when
13709 \begin_inset Flex Code
13712 \begin_layout Plain Layout
13719 \begin_inset Flex Code
13722 \begin_layout Plain Layout
13729 \begin_inset Flex Code
13732 \begin_layout Plain Layout
13739 Then it is added to the manual or dynamic margin.
13740 \begin_inset Newline newline
13744 \begin_inset Quotes eld
13748 \begin_inset Flex Code
13751 \begin_layout Plain Layout
13758 \begin_inset Quotes erd
13761 means that the paragraph is indented with the width of
13762 \begin_inset Quotes eld
13766 \begin_inset Flex Code
13769 \begin_layout Plain Layout
13776 \begin_inset Quotes erd
13779 in the normal font.
13780 You can get a negative width by prefixing the string with
13781 \begin_inset Quotes eld
13785 \begin_inset Flex Code
13788 \begin_layout Plain Layout
13795 \begin_inset Quotes erd
13799 This way was chosen so that the look is the same with each used screen
13803 \begin_layout Description
13804 \begin_inset Flex Code
13807 \begin_layout Plain Layout
13814 \begin_inset Flex Code
13817 \begin_layout Plain Layout
13822 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13828 \begin_inset Newline newline
13831 The kind of margin that the style has on the left side.
13832 \begin_inset Separator parbreak
13839 \begin_layout Description
13840 \begin_inset Flex Code
13843 \begin_layout Plain Layout
13849 just means a fixed margin.
13852 \begin_layout Description
13853 \begin_inset Flex Code
13856 \begin_layout Plain Layout
13862 means that the left margin depends on the string entered in the
13863 \begin_inset Flex MenuItem
13866 \begin_layout Plain Layout
13867 Edit\SpecialChar menuseparator
13869 \begin_inset space ~
13878 This is used to typeset nice lists without tabulators.
13881 \begin_layout Description
13882 \begin_inset Flex Code
13885 \begin_layout Plain Layout
13891 means that the margin depends on the size of the label.
13892 This is used for automatic enumerated headlines.
13893 It is obvious that the headline
13894 \begin_inset Quotes eld
13897 5.4.3.2.1 Very long headline
13898 \begin_inset Quotes erd
13901 must have a wider left margin (as wide as
13902 \begin_inset Quotes eld
13906 \begin_inset Quotes erd
13909 plus the space) than
13910 \begin_inset Quotes eld
13913 3.2 Very long headline
13914 \begin_inset Quotes erd
13918 \begin_inset Quotes eld
13922 \begin_inset Quotes erd
13925 are not able to do this.
13928 \begin_layout Description
13929 \begin_inset Flex Code
13932 \begin_layout Plain Layout
13938 is similar, but only the very first row of the paragraph is dynamic, while
13939 the others are static; this is used, for example, for descriptions.
13942 \begin_layout Description
13943 \begin_inset Flex Code
13946 \begin_layout Plain Layout
13952 means the margin is chosen in a way that the longest row of this paragraph
13953 fits to the right margin.
13954 This is used to typeset an address on the right edge of the page.
13958 \begin_layout Description
13959 \begin_inset Flex Code
13962 \begin_layout Plain Layout
13969 \begin_inset Flex Code
13972 \begin_layout Plain Layout
13981 \begin_inset space \thinspace{}
13985 \begin_inset Flex Code
13988 \begin_layout Plain Layout
13994 ] Whether fragile commands in this style should be
13995 \begin_inset Flex Code
13998 \begin_layout Plain Layout
14011 whether this command should itself be protected.)
14014 \begin_layout Description
14015 \begin_inset Flex Code
14018 \begin_layout Plain Layout
14025 \begin_inset Flex Code
14028 \begin_layout Plain Layout
14035 \begin_inset space \thinspace{}
14039 \begin_inset Flex Code
14042 \begin_layout Plain Layout
14050 ] Whether newlines are translated into \SpecialChar LaTeX
14052 \begin_inset Flex Code
14055 \begin_layout Plain Layout
14066 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
14068 inside \SpecialChar LyX
14072 \begin_layout Description
14073 \begin_inset Flex Code
14076 \begin_layout Plain Layout
14083 \begin_inset Flex Code
14086 \begin_layout Plain Layout
14095 \begin_inset space \thinspace{}
14099 \begin_inset Flex Code
14102 \begin_layout Plain Layout
14108 ] If set to true, and if
14109 \begin_inset Flex Code
14112 \begin_layout Plain Layout
14119 \begin_inset Flex Code
14122 \begin_layout Plain Layout
14128 ) paragraphs are being indented, then the indentation of such a paragraph
14129 following one of this type will be suppressed.
14130 (So this will not affect the display of non-default paragraphs.)
14133 \begin_layout Description
14134 \begin_inset Flex Code
14137 \begin_layout Plain Layout
14144 \begin_inset Flex Code
14147 \begin_layout Plain Layout
14153 ] Name of a style that has replaced this style.
14154 This is used to rename a style, while keeping backward compatibility.
14157 \begin_layout Description
14158 \begin_inset Flex Code
14161 \begin_layout Plain Layout
14168 \begin_inset Flex Code
14171 \begin_layout Plain Layout
14180 \begin_inset space \thinspace{}
14184 \begin_inset Flex Code
14187 \begin_layout Plain Layout
14193 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14195 but only by a line break; together with
14196 \begin_inset Flex Code
14199 \begin_layout Plain Layout
14205 , this allows to emulate a plain text editor (like the ERT inset).
14208 \begin_layout Description
14209 \begin_inset Flex Code
14212 \begin_layout Plain Layout
14219 \begin_inset Flex Code
14222 \begin_layout Plain Layout
14228 ] The indent of the very first line of a paragraph.
14230 \begin_inset Newline newline
14234 \begin_inset Flex Code
14237 \begin_layout Plain Layout
14243 will be fixed for a certain style.
14244 The exception is the default style, since the indentation for these paragraphs
14245 can be prohibited with
14246 \begin_inset Flex Code
14249 \begin_layout Plain Layout
14257 \begin_inset Flex Code
14260 \begin_layout Plain Layout
14266 style paragraphs inside environments use the
14267 \begin_inset Flex Code
14270 \begin_layout Plain Layout
14276 of the environment, not their native one.
14278 \begin_inset Flex Code
14281 \begin_layout Plain Layout
14287 paragraphs inside an enumeration are not indented.
14290 \begin_layout Description
14291 \begin_inset Flex Code
14294 \begin_layout Plain Layout
14301 \begin_inset Flex Code
14304 \begin_layout Plain Layout
14310 ] The vertical space between two paragraphs of this style.
14313 \begin_layout Description
14314 \begin_inset Flex Code
14317 \begin_layout Plain Layout
14324 \begin_inset Flex Code
14327 \begin_layout Plain Layout
14334 allows the user to choose either
14335 \begin_inset Quotes eld
14339 \begin_inset Quotes erd
14343 \begin_inset Quotes eld
14347 \begin_inset Quotes erd
14350 to separate paragraphs.
14352 \begin_inset Quotes eld
14356 \begin_inset Quotes erd
14360 \begin_inset Flex Code
14363 \begin_layout Plain Layout
14371 \begin_inset Quotes eld
14375 \begin_inset Quotes erd
14379 \begin_inset Flex Code
14382 \begin_layout Plain Layout
14388 is ignored and all paragraphs are separated by the
14389 \begin_inset Flex Code
14392 \begin_layout Plain Layout
14399 The vertical space is calculated with
14400 \begin_inset Flex Code
14403 \begin_layout Plain Layout
14405 \begin_inset space ~
14414 \begin_inset Flex Code
14417 \begin_layout Plain Layout
14423 is the height of a row with the normal font.
14424 This way, the look stays the same with different screen fonts.
14427 \begin_layout Description
14428 \begin_inset Flex Code
14431 \begin_layout Plain Layout
14438 \begin_inset Flex Code
14441 \begin_layout Plain Layout
14450 \begin_inset space \thinspace{}
14454 \begin_inset Flex Code
14457 \begin_layout Plain Layout
14463 ] Whether the contents of this paragraph should be output in raw form, meaning
14464 without special translations that \SpecialChar LaTeX
14466 \change_inserted 155139281 1429534178
14470 \begin_layout Description
14472 \change_inserted 155139281 1429534242
14475 \begin_inset Flex Code
14478 \begin_layout Plain Layout
14480 \change_inserted 155139281 1429534178
14489 \begin_inset Flex Code
14492 \begin_layout Plain Layout
14494 \change_inserted 155139281 1429534178
14495 string of characters
14504 Defines individual characters that should be output in raw form, meaning
14505 without special translations that \SpecialChar LaTeX
14511 \begin_layout Description
14512 \begin_inset Flex Code
14515 \begin_layout Plain Layout
14521 Information to be included in the \SpecialChar LaTeX
14522 preamble when this style is used.
14523 Used to define macros, load packages, etc., required by this particular
14526 \begin_inset Quotes eld
14530 \begin_inset Flex Code
14533 \begin_layout Plain Layout
14540 \begin_inset Quotes erd
14546 \begin_layout Description
14547 \begin_inset Flex Code
14550 \begin_layout Plain Layout
14557 \begin_inset Flex Code
14560 \begin_layout Plain Layout
14566 ] The prefix to use when creating labels referring to paragraphs of this
14568 This allows the use of formatted references.
14571 \begin_layout Description
14572 \begin_inset Flex Code
14575 \begin_layout Plain Layout
14582 \begin_inset Flex Code
14585 \begin_layout Plain Layout
14591 ] Whether the style requires the feature
14592 \begin_inset Flex Code
14595 \begin_layout Plain Layout
14602 See the description of
14603 \begin_inset Flex Code
14606 \begin_layout Plain Layout
14613 \begin_inset CommandInset ref
14615 reference "sub:General-text-class"
14619 ) for information on `features'.
14622 \begin_layout Description
14623 \begin_inset Flex Code
14626 \begin_layout Plain Layout
14633 \begin_inset Flex Code
14636 \begin_layout Plain Layout
14645 \begin_inset Flex Code
14648 \begin_layout Plain Layout
14654 ] Resets the \SpecialChar LaTeX
14655 arguments of this style (as defined via the
14656 \begin_inset Flex Code
14659 \begin_layout Plain Layout
14666 This is useful if you have copied a style via
14667 \begin_inset Flex Code
14670 \begin_layout Plain Layout
14676 , but you do not want to inherit its (required and optional) arguments.
14679 \begin_layout Description
14680 \begin_inset Flex Code
14683 \begin_layout Plain Layout
14690 \begin_inset Flex Code
14693 \begin_layout Plain Layout
14699 ] A string that is put at the end of the layout content.
14700 A line break in the output can be indicated by
14701 \begin_inset Flex Code
14704 \begin_layout Plain Layout
14713 \begin_layout Description
14714 \begin_inset Flex Code
14717 \begin_layout Plain Layout
14724 \begin_inset Flex Code
14727 \begin_layout Plain Layout
14734 \begin_inset Flex Code
14737 \begin_layout Plain Layout
14746 \begin_layout Description
14747 \begin_inset Flex Code
14750 \begin_layout Plain Layout
14757 \begin_inset Flex Code
14760 \begin_layout Plain Layout
14769 \begin_inset Flex Code
14772 \begin_layout Plain Layout
14779 \begin_inset Flex Code
14782 \begin_layout Plain Layout
14789 \begin_inset Flex Code
14792 \begin_layout Plain Layout
14794 \begin_inset space ~
14802 ] This defines what the default spacing should be in the style.
14804 \begin_inset Flex Code
14807 \begin_layout Plain Layout
14814 \begin_inset Flex Code
14817 \begin_layout Plain Layout
14824 \begin_inset Flex Code
14827 \begin_layout Plain Layout
14833 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14834 If you specify the argument
14835 \begin_inset Flex Code
14838 \begin_layout Plain Layout
14844 , then you must also provide a value argument which will be the actual multiplie
14846 Note that, contrary to other parameters,
14847 \begin_inset Flex Code
14850 \begin_layout Plain Layout
14856 implies the generation of specific \SpecialChar LaTeX
14857 code, using the \SpecialChar LaTeX
14861 \begin_inset Flex Code
14864 \begin_layout Plain Layout
14873 \begin_layout Description
14874 \begin_inset Flex Code
14877 \begin_layout Plain Layout
14884 \begin_inset Flex Code
14887 \begin_layout Plain Layout
14894 \begin_inset space \thinspace{}
14898 \begin_inset Flex Code
14901 \begin_layout Plain Layout
14909 ] Allow spell-checking paragraphs of this style.
14913 \begin_layout Description
14914 \begin_inset Flex Code
14917 \begin_layout Plain Layout
14923 The font used for the text body .
14925 \begin_inset CommandInset ref
14927 reference "sub:Font-description"
14934 \begin_layout Description
14935 \begin_inset Flex Code
14938 \begin_layout Plain Layout
14947 \begin_inset Flex Code
14950 \begin_layout Plain Layout
14960 The level of the style in the table of contents.
14961 This is used for automatic numbering of section headings.
14962 \change_inserted -712698321 1401363541
14966 \begin_layout Description
14968 \change_inserted -712698321 1401363906
14969 \begin_inset Flex Code
14972 \begin_layout Plain Layout
14974 \change_inserted -712698321 1401363547
14983 \begin_inset Flex Code
14986 \begin_layout Plain Layout
14988 \change_inserted -712698321 1401363664
15001 \begin_inset Flex Code
15004 \begin_layout Plain Layout
15006 \change_inserted -712698321 1401363669
15015 \begin_inset Flex Code
15018 \begin_layout Plain Layout
15020 \change_inserted -712698321 1401363675
15028 ] This tag determines whether the first line indentation of this paragraph
15029 can be toggled via the Paragraph settings dialog.
15033 \begin_inset Flex Code
15036 \begin_layout Plain Layout
15038 \change_inserted -712698321 1401363761
15048 is set, indentation can be toggled if the document settings use
15049 \begin_inset Quotes eld
15053 \begin_inset Quotes erd
15056 paragraph style, with
15057 \begin_inset Flex Code
15060 \begin_layout Plain Layout
15062 \change_inserted -712698321 1401363844
15068 , indentation can always be toggled, notwithstanding the document settings,
15070 \begin_inset Flex Code
15073 \begin_layout Plain Layout
15075 \change_inserted -712698321 1401363901
15081 , indentation can never be toggled.
15086 \begin_layout Description
15087 \begin_inset Flex Code
15090 \begin_layout Plain Layout
15097 \begin_inset Flex Code
15100 \begin_layout Plain Layout
15106 ] The vertical space with which the very first of a chain of paragraphs
15107 with this style is separated from the previous paragraph.
15108 If the previous paragraph has another style, the separations are not simply
15109 added, but the maximum is taken.
15112 \begin_layout Subsection
15113 \begin_inset CommandInset label
15119 Internationalization of Paragraph Styles
15122 \begin_layout Standard
15124 has long supported internationalization of layout information, but, until
15125 version 2.0, this applied only to the user interface and not to, say, PDF
15127 Thus, French authors were forced to resort to ugly hacks if they wanted
15132 1' instead of `Theorem 1'.
15133 Thanks to Georg Baum, that is no longer the case.
15136 \begin_layout Standard
15138 \begin_inset Flex Code
15141 \begin_layout Plain Layout
15147 defines text that is to appear in the typeset document, it may use
15148 \begin_inset Flex Code
15151 \begin_layout Plain Layout
15158 \begin_inset Flex Code
15161 \begin_layout Plain Layout
15167 to support non-English and even multi-language documents correctly.
15168 The following excerpt (from the
15169 \begin_inset Flex Code
15172 \begin_layout Plain Layout
15178 file) shows how this works:
15181 \begin_layout LyX-Code
15183 \begin_inset Separator parbreak
15190 \begin_layout LyX-Code
15193 theoremstyle{remark}
15196 \begin_layout LyX-Code
15199 newtheorem{claim}[thm]{
15206 \begin_layout LyX-Code
15210 \begin_layout LyX-Code
15214 \begin_layout LyX-Code
15219 claimname}{_(Claim)}
15222 \begin_layout LyX-Code
15226 \begin_layout LyX-Code
15230 \begin_layout LyX-Code
15239 claimname}{_(Claim)}}
15242 \begin_layout LyX-Code
15247 \begin_layout Standard
15248 In principle, any legal \SpecialChar LaTeX
15250 \begin_inset Flex Code
15253 \begin_layout Plain Layout
15260 \begin_inset Flex Code
15263 \begin_layout Plain Layout
15269 tags, but in practice they will typically look as they do here.
15270 The key to correct translation of the typeset text is the definition of
15271 the \SpecialChar LaTeX
15273 \begin_inset Flex Code
15276 \begin_layout Plain Layout
15285 \begin_inset Flex Code
15288 \begin_layout Plain Layout
15300 \begin_layout Standard
15302 \begin_inset Flex Code
15305 \begin_layout Plain Layout
15311 tag provides for internationalization based upon the overall language of
15313 The contents of the tag will be included in the preamble, just as with
15315 \begin_inset Flex Code
15318 \begin_layout Plain Layout
15325 What makes it special is the use of the
15326 \begin_inset Quotes eld
15330 \begin_inset Quotes erd
15334 \begin_inset Flex Code
15337 \begin_layout Plain Layout
15343 , which will be replaced, when \SpecialChar LyX
15344 produces \SpecialChar LaTeX
15345 output, with the translation of
15346 its argument into the document language.
15349 \begin_layout Standard
15351 \begin_inset Flex Code
15354 \begin_layout Plain Layout
15360 tag is more complex, since it is meant to provide support for multi-language
15361 documents and so offers an interface to the
15362 \begin_inset Flex Code
15365 \begin_layout Plain Layout
15372 Its contents will be added to the preamble once for each language that
15373 appears in the document.
15374 In this case, the argument to
15375 \begin_inset Flex Code
15378 \begin_layout Plain Layout
15384 will be replaced with its translation into the language in question; the
15386 \begin_inset Flex Code
15389 \begin_layout Plain Layout
15395 is replaced by the language name (as used by the babel package).
15398 \begin_layout Standard
15399 A German document that also included a French section would thus have the
15400 following in the preamble:
15403 \begin_layout LyX-Code
15412 claimname}{Affirmation}}
15413 \begin_inset Newline newline
15424 claimname}{Behauptung}}
15425 \begin_inset Newline newline
15432 claimname}{Behauptung}
15435 \begin_layout Standard
15438 \begin_inset Flex Code
15441 \begin_layout Plain Layout
15447 will then conspire to produce the correct text in the output.
15450 \begin_layout Standard
15451 One important point to note here is that the translations are provided by
15453 itself, through the file
15454 \begin_inset Flex Code
15457 \begin_layout Plain Layout
15464 This means, in effect, that
15465 \begin_inset Flex Code
15468 \begin_layout Plain Layout
15475 \begin_inset Flex Code
15478 \begin_layout Plain Layout
15484 are really only of use in layout files that are provided with \SpecialChar LyX
15486 entered in user-created layout files will not be seen by \SpecialChar LyX
15487 's internationalizatio
15488 n routines unless the
15489 \begin_inset Flex Code
15492 \begin_layout Plain Layout
15498 file is modified accordingly.
15499 That said, however, any layout created with the intention that it will
15500 be included with \SpecialChar LyX
15501 should use these tags where appropriate.
15502 Please note that the paragraph style translations provided by \SpecialChar LyX
15504 change with a minor update (e.
15505 \begin_inset space \thinspace{}
15509 \begin_inset space \space{}
15512 from version 2.1.x to 2.1.y).
15513 It is however quite likely that a major update (e.
15514 \begin_inset space \thinspace{}
15518 \begin_inset space \space{}
15521 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15524 \begin_layout Subsection
15526 \begin_inset CommandInset label
15535 \begin_layout Standard
15536 It is necessary to define the floats (
15537 \begin_inset Flex MenuItem
15540 \begin_layout Plain Layout
15547 \begin_inset Flex MenuItem
15550 \begin_layout Plain Layout
15556 , \SpecialChar ldots
15557 ) in the text class itself.
15558 Standard floats are included in the file
15559 \begin_inset Flex Code
15562 \begin_layout Plain Layout
15568 , so you may have to do no more than add
15571 \begin_layout LyX-Code
15572 Input stdfloats.inc
15575 \begin_layout Standard
15576 to your layout file.
15577 If you want to implement a text class that proposes some other float types
15578 (like the AGU class bundled with \SpecialChar LyX
15579 ), the information below will hopefully
15583 \begin_layout Description
15584 \begin_inset Flex Code
15587 \begin_layout Plain Layout
15594 \begin_inset Flex Code
15597 \begin_layout Plain Layout
15604 \begin_inset Quotes erd
15608 \begin_inset Quotes erd
15611 ] The file name extension of an auxiliary file for the list of figures (or
15614 writes the captions to this file.
15617 \begin_layout Description
15618 \begin_inset Flex Code
15621 \begin_layout Plain Layout
15628 \begin_inset Flex Code
15631 \begin_layout Plain Layout
15638 \begin_inset Quotes erd
15642 \begin_inset Quotes erd
15645 ] The string that will be used in the menus and also for the caption.
15646 This is translated to the current language if babel is used.
15649 \begin_layout Description
15650 \begin_inset Flex Code
15653 \begin_layout Plain Layout
15659 These tags control the XHTML output.
15661 \begin_inset CommandInset ref
15663 reference "sec:Tags-for-XHTML"
15670 \begin_layout Description
15671 \begin_inset Flex Code
15674 \begin_layout Plain Layout
15683 \begin_inset Flex Code
15686 \begin_layout Plain Layout
15695 \begin_inset space \thinspace{}
15699 \begin_inset Flex Code
15702 \begin_layout Plain Layout
15708 ] Indicates whether the float is already defined in the document class or
15709 if instead the \SpecialChar LaTeX
15711 \begin_inset Flex Code
15714 \begin_layout Plain Layout
15720 needs to be loaded to define it on-the-fly.
15722 \begin_inset Flex Code
15725 \begin_layout Plain Layout
15732 \begin_inset Flex Code
15735 \begin_layout Plain Layout
15742 It should be set to
15743 \begin_inset Flex Code
15746 \begin_layout Plain Layout
15752 if the float is already defined by the \SpecialChar LaTeX
15756 \begin_layout Description
15757 \begin_inset Flex Code
15760 \begin_layout Plain Layout
15767 \begin_inset Flex Code
15770 \begin_layout Plain Layout
15777 \begin_inset Quotes erd
15781 \begin_inset Quotes erd
15784 ] The command used to generate a list of floats of this type; the leading
15793 \begin_inset Flex Code
15796 \begin_layout Plain Layout
15802 is false, since there is no standard way to generate this command.
15804 \begin_inset Flex Code
15807 \begin_layout Plain Layout
15813 is true, since in that case there is a standard way to define the command.
15816 \begin_layout Description
15817 \begin_inset Flex Code
15820 \begin_layout Plain Layout
15827 \begin_inset Flex Code
15830 \begin_layout Plain Layout
15837 \begin_inset Quotes erd
15841 \begin_inset Quotes erd
15844 ] A title for a list of floats of this kind (list of figures, tables, or
15846 It is used for the screen label within \SpecialChar LyX
15847 , it is used by \SpecialChar LaTeX
15849 it is used as the title in the XHTML output.
15850 It will be translated to the document language.
15853 \begin_layout Description
15854 \begin_inset Flex Code
15857 \begin_layout Plain Layout
15864 \begin_inset Flex Code
15867 \begin_layout Plain Layout
15874 \begin_inset Quotes erd
15878 \begin_inset Quotes erd
15881 ] This (optional) argument determines whether floats of this class will
15882 be numbered within some sectional unit of the document.
15884 \begin_inset Flex Code
15887 \begin_layout Plain Layout
15894 \begin_inset Quotes eld
15898 \begin_inset Flex Code
15901 \begin_layout Plain Layout
15908 \begin_inset Quotes erd
15911 , the floats will be numbered within chapters.
15915 \begin_layout Description
15916 \begin_inset Flex Code
15919 \begin_layout Plain Layout
15926 \begin_inset Flex Code
15929 \begin_layout Plain Layout
15936 \begin_inset Quotes erd
15940 \begin_inset Quotes erd
15943 ] The default placement for the given class of floats.
15944 The string should be as in standard \SpecialChar LaTeX
15946 \begin_inset Flex Code
15949 \begin_layout Plain Layout
15956 \begin_inset Flex Code
15959 \begin_layout Plain Layout
15966 \begin_inset Flex Code
15969 \begin_layout Plain Layout
15976 \begin_inset Flex Code
15979 \begin_layout Plain Layout
15985 for top, bottom, page, and here, respectively.
15989 \begin_layout Plain Layout
15990 Note that the order of these letters in the string is irrelevant, like in
15997 On top of that there is a new type,
15998 \begin_inset Flex Code
16001 \begin_layout Plain Layout
16007 , which does not really correspond to a float, since it means: put it
16008 \begin_inset Quotes eld
16012 \begin_inset Quotes erd
16016 Note however that the
16017 \begin_inset Flex Code
16020 \begin_layout Plain Layout
16026 specifier is special and, because of implementation details, cannot be
16027 used in non-built in float types.
16028 If you do not understand what this means, just use
16029 \begin_inset Quotes eld
16033 \begin_inset Flex Code
16036 \begin_layout Plain Layout
16043 \begin_inset Quotes erd
16049 \begin_layout Description
16050 \begin_inset Flex Code
16053 \begin_layout Plain Layout
16060 \begin_inset Flex Code
16063 \begin_layout Plain Layout
16069 ] The prefix to use when creating labels referring to floats of this type.
16070 This allows the use of formatted references.
16071 Note that you can remove any
16072 \begin_inset Flex Code
16075 \begin_layout Plain Layout
16081 set by a copied style by using the special value
16082 \begin_inset Quotes eld
16086 \begin_inset Quotes erd
16089 , which must be all caps.
16092 \begin_layout Description
16093 \begin_inset Flex Code
16096 \begin_layout Plain Layout
16103 \begin_inset Flex Code
16106 \begin_layout Plain Layout
16113 \begin_inset Quotes erd
16117 \begin_inset Quotes erd
16120 ] The style used when defining the float using
16121 \begin_inset Flex Code
16124 \begin_layout Plain Layout
16135 \begin_layout Description
16136 \begin_inset Flex Code
16139 \begin_layout Plain Layout
16146 \begin_inset Flex Code
16149 \begin_layout Plain Layout
16156 \begin_inset Quotes erd
16160 \begin_inset Quotes erd
16164 \begin_inset Quotes eld
16168 \begin_inset Quotes erd
16171 of the new class of floats, like program or algorithm.
16172 After the appropriate
16173 \begin_inset Flex Code
16176 \begin_layout Plain Layout
16185 \begin_inset Flex Code
16188 \begin_layout Plain Layout
16197 \begin_inset Flex Code
16200 \begin_layout Plain Layout
16211 \begin_layout Description
16212 \begin_inset Flex Code
16215 \begin_layout Plain Layout
16222 \begin_inset Flex Code
16225 \begin_layout Plain Layout
16232 \begin_inset space \thinspace{}
16236 \begin_inset Flex Code
16239 \begin_layout Plain Layout
16247 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16249 \begin_inset Flex Code
16252 \begin_layout Plain Layout
16258 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16262 \begin_layout Standard
16263 Note that defining a float with type
16264 \begin_inset Flex Code
16267 \begin_layout Plain Layout
16275 automatically defines the corresponding counter with name
16276 \begin_inset Flex Code
16279 \begin_layout Plain Layout
16290 \begin_layout Subsection
16291 Flex insets and InsetLayout
16292 \begin_inset CommandInset label
16294 name "sub:Flex-insets-and"
16301 \begin_layout Standard
16302 Flex insets come in three different kinds:
16305 \begin_layout Itemize
16307 \begin_inset Flex Code
16310 \begin_layout Plain Layout
16316 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16318 \begin_inset Flex Code
16321 \begin_layout Plain Layout
16330 \begin_inset Flex Code
16333 \begin_layout Plain Layout
16344 \begin_layout Itemize
16346 \begin_inset Flex Code
16349 \begin_layout Plain Layout
16355 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16357 footnote, and the like.
16358 An obvious example is an endnote inset, which is defined in the
16359 \begin_inset Flex Code
16362 \begin_layout Plain Layout
16371 \begin_layout Itemize
16373 \begin_inset Flex Code
16376 \begin_layout Plain Layout
16382 ): For use with DocBook classes.
16385 \begin_layout Standard
16386 Flex insets are defined using the
16387 \begin_inset Flex Code
16390 \begin_layout Plain Layout
16396 tag, which shall be explained in a moment.
16399 \begin_layout Standard
16401 \begin_inset Flex Code
16404 \begin_layout Plain Layout
16410 tag also serves another function: It can be used to customize the general
16411 layout of many different types of insets.
16413 \begin_inset Flex Code
16416 \begin_layout Plain Layout
16422 can be used to customize the layout parameters for footnotes, marginal
16423 notes, note insets, \SpecialChar TeX
16424 code (ERT) insets, branches, listings, indexes, boxes,
16425 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16428 \begin_layout Standard
16430 \begin_inset Flex Code
16433 \begin_layout Plain Layout
16439 definition must begin with a line of the form:
16442 \begin_layout LyX-Code
16446 \begin_layout Standard
16448 \begin_inset Flex Code
16451 \begin_layout Plain Layout
16457 indicates the inset whose layout is being defined, and here there are four
16461 \begin_layout Enumerate
16462 The layout for a pre-existing inset is being modified.
16463 In this case, can be
16464 \begin_inset Flex Code
16467 \begin_layout Plain Layout
16473 any one of the following:
16474 \begin_inset Flex Code
16477 \begin_layout Plain Layout
16484 \begin_inset Flex Code
16487 \begin_layout Plain Layout
16494 \begin_inset Flex Code
16497 \begin_layout Plain Layout
16504 \begin_inset Flex Code
16507 \begin_layout Plain Layout
16514 \begin_inset Flex Code
16517 \begin_layout Plain Layout
16524 \begin_inset Flex Code
16527 \begin_layout Plain Layout
16534 \begin_inset Flex Code
16537 \begin_layout Plain Layout
16544 \begin_inset Flex Code
16547 \begin_layout Plain Layout
16554 \begin_inset Flex Code
16557 \begin_layout Plain Layout
16564 \begin_inset Flex Code
16567 \begin_layout Plain Layout
16574 \begin_inset Flex Code
16577 \begin_layout Plain Layout
16584 \begin_inset Flex Code
16587 \begin_layout Plain Layout
16594 \begin_inset Flex Code
16597 \begin_layout Plain Layout
16604 \begin_inset Flex Code
16607 \begin_layout Plain Layout
16614 \begin_inset Flex Code
16617 \begin_layout Plain Layout
16624 \begin_inset Flex Code
16627 \begin_layout Plain Layout
16634 \begin_inset Flex Code
16637 \begin_layout Plain Layout
16644 \begin_inset Flex Code
16647 \begin_layout Plain Layout
16654 \begin_inset Flex Code
16657 \begin_layout Plain Layout
16664 \begin_inset Flex Code
16667 \begin_layout Plain Layout
16676 \begin_layout Enumerate
16677 The layout for a Flex inset is being defined.
16679 \begin_inset Flex Code
16682 \begin_layout Plain Layout
16688 must be of the form
16689 \begin_inset Quotes eld
16693 \begin_inset Flex Code
16696 \begin_layout Plain Layout
16703 \begin_inset Quotes erd
16707 \begin_inset Flex Code
16710 \begin_layout Plain Layout
16716 may be be any valid identifier not used by a pre-existing Flex inset.
16717 The identifier may include spaces, but in that case the whole thing must
16718 be wrapped in quotes.
16719 Note that the definition of a flex inset
16724 \begin_inset Flex Code
16727 \begin_layout Plain Layout
16734 entry, declaring which type of inset it defines.
16737 \begin_layout Enumerate
16738 The layout for user specific branch is being defined.
16740 \begin_inset Flex Code
16743 \begin_layout Plain Layout
16749 must be of the form
16750 \begin_inset Quotes eld
16754 \begin_inset Flex Code
16757 \begin_layout Plain Layout
16764 \begin_inset Quotes erd
16768 \begin_inset Flex Code
16771 \begin_layout Plain Layout
16777 may be be any valid identifier of branch defined in user's document.
16778 The identifier may include spaces, but in that case the whole thing must
16779 be wrapped in quotes.
16780 The main purpose of this feature is to allow \SpecialChar LaTeX
16781 wrapping around specific
16782 branches as user needs.
16785 \begin_layout Enumerate
16786 The layout of a user (or class) specific caption is being defined.
16788 \begin_inset Flex Code
16791 \begin_layout Plain Layout
16797 must be of the form
16798 \begin_inset Quotes eld
16802 \begin_inset Flex Code
16805 \begin_layout Plain Layout
16812 \begin_inset Quotes erd
16816 \begin_inset Flex Code
16819 \begin_layout Plain Layout
16825 specifies the name of the caption as it appears in the menu.
16826 Have a look at the standard caption (
16827 \begin_inset Flex Code
16830 \begin_layout Plain Layout
16836 ), the specific captions of the KOMA-Script classes (
16837 \begin_inset Flex Code
16840 \begin_layout Plain Layout
16847 \begin_inset Flex Code
16850 \begin_layout Plain Layout
16859 \begin_inset space ~
16865 \begin_inset Flex Code
16868 \begin_layout Plain Layout
16874 ) for applications.
16877 \begin_layout Standard
16879 \begin_inset Flex Code
16882 \begin_layout Plain Layout
16888 definition can contain the following entries:
16891 \begin_layout Description
16892 \begin_inset Flex Code
16895 \begin_layout Plain Layout
16902 \begin_inset Flex Code
16905 \begin_layout Plain Layout
16911 ] Defines argument number of a command\SpecialChar breakableslash
16912 environment associated with the current
16914 The definition must end with
16915 \begin_inset Flex Code
16918 \begin_layout Plain Layout
16926 \begin_inset CommandInset ref
16928 reference "sub:Paragraph-Styles"
16935 \begin_layout Description
16936 \begin_inset Flex Code
16939 \begin_layout Plain Layout
16945 Preamble for changing language commands; see
16946 \begin_inset CommandInset ref
16948 reference "sub:I18n"
16955 \begin_layout Description
16956 \begin_inset Flex Code
16959 \begin_layout Plain Layout
16966 \begin_inset Flex Code
16969 \begin_layout Plain Layout
16975 ] The color for the inset's background.
16977 \begin_inset CommandInset ref
16979 reference "chap:Names-of-colors"
16983 for a list of the available color names.
16986 \begin_layout Description
16987 \begin_inset Flex Code
16990 \begin_layout Plain Layout
16997 \begin_inset Flex Code
17000 \begin_layout Plain Layout
17009 \begin_inset space \thinspace{}
17013 \begin_inset Flex Code
17016 \begin_layout Plain Layout
17022 ] Whether to use the content of the inset as the label, when the inset is
17027 \begin_layout Description
17028 \begin_inset Flex Code
17031 \begin_layout Plain Layout
17038 \begin_inset Flex Code
17041 \begin_layout Plain Layout
17047 ] As with paragraph styles, see
17048 \begin_inset CommandInset ref
17050 reference "sub:Paragraph-Styles"
17055 Note that you need to specify the complete type, e.
17056 \begin_inset space \thinspace{}
17060 \begin_inset space ~
17064 \begin_inset Flex Code
17067 \begin_layout Plain Layout
17068 CopyStyle Flex:<name>
17076 \begin_layout Description
17077 \begin_inset Flex Code
17080 \begin_layout Plain Layout
17087 \begin_inset Flex Code
17090 \begin_layout Plain Layout
17099 \begin_inset space \thinspace{}
17103 \begin_inset Flex Code
17106 \begin_layout Plain Layout
17112 ] Indicates whether the user may employ the Paragraph Settings dialog to
17113 customize the paragraph.
17116 \begin_layout Description
17117 \begin_inset Flex Code
17120 \begin_layout Plain Layout
17127 \begin_inset Flex Code
17130 \begin_layout Plain Layout
17137 \begin_inset Flex Code
17140 \begin_layout Plain Layout
17147 \begin_inset Flex Code
17150 \begin_layout Plain Layout
17156 , describing the rendering style used for the inset's frame and buttons.
17157 Footnotes generally use
17158 \begin_inset Flex Code
17161 \begin_layout Plain Layout
17167 , ERT insets generally
17168 \begin_inset Flex Code
17171 \begin_layout Plain Layout
17177 , and character styles
17178 \begin_inset Flex Code
17181 \begin_layout Plain Layout
17190 \begin_layout Description
17191 \begin_inset Flex Code
17194 \begin_layout Plain Layout
17201 \begin_inset Flex Code
17204 \begin_layout Plain Layout
17213 \begin_inset space \thinspace{}
17219 \begin_inset Flex Code
17222 \begin_layout Plain Layout
17231 \begin_inset Flex Code
17234 \begin_layout Plain Layout
17241 \begin_inset Flex Code
17244 \begin_layout Plain Layout
17251 Indicates whether the environment will stand on its own in the output or
17252 will appear inline with the surrounding text.
17253 If set to false, it is supposed that the \SpecialChar LaTeX
17254 environment ignores white space
17255 (including one newline character) after the
17256 \begin_inset Flex Code
17259 \begin_layout Plain Layout
17272 \begin_inset Flex Code
17275 \begin_layout Plain Layout
17291 \begin_layout Description
17292 \begin_inset Flex Code
17295 \begin_layout Plain Layout
17301 Required at the end of the
17302 \begin_inset Flex Code
17305 \begin_layout Plain Layout
17314 \begin_layout Description
17315 \begin_inset Flex Code
17318 \begin_layout Plain Layout
17324 The font used for both the text body
17330 \begin_inset CommandInset ref
17332 reference "sub:Font-description"
17337 Note that defining this font automatically defines the
17338 \begin_inset Flex Code
17341 \begin_layout Plain Layout
17347 to the same value, so define this first and define
17348 \begin_inset Flex Code
17351 \begin_layout Plain Layout
17357 later if you want them to be different.
17358 \change_inserted -195340706 1421002157
17362 \begin_layout Description
17364 \change_inserted -195340706 1421002157
17365 \begin_inset Flex Code
17368 \begin_layout Plain Layout
17370 \change_inserted -195340706 1421002157
17371 FixedWidthPreambleEncoding
17377 \begin_inset Flex Code
17380 \begin_layout Plain Layout
17382 \change_inserted -195340706 1421002157
17391 \begin_inset space \thinspace{}
17395 \begin_inset Flex Code
17398 \begin_layout Plain Layout
17400 \change_inserted -195340706 1421002157
17406 ] Force a fixed width encoding for the translated contents of
17407 \begin_inset Flex Code
17410 \begin_layout Plain Layout
17412 \change_inserted -195340706 1421002157
17419 \begin_inset Flex Code
17422 \begin_layout Plain Layout
17424 \change_inserted -195340706 1421002157
17430 code generated by this layout.
17431 This is needed for special packages like the listings package that do not
17432 work with variable width encodings such as utf8.
17434 This setting is ignored if fully unicode aware \SpecialChar LaTeX
17435 backends such as Xe\SpecialChar LaTeX
17442 \begin_layout Description
17443 \begin_inset Flex Code
17446 \begin_layout Plain Layout
17447 ForceLocalFontSwitch
17453 \begin_inset Flex Code
17456 \begin_layout Plain Layout
17465 \begin_inset space \thinspace{}
17469 \begin_inset Flex Code
17472 \begin_layout Plain Layout
17478 ] When using babel, always use a local font switch (
17479 \begin_inset Flex Code
17482 \begin_layout Plain Layout
17490 ), never a global one (such as
17491 \begin_inset Flex Code
17494 \begin_layout Plain Layout
17505 \begin_layout Description
17506 \begin_inset Flex Code
17509 \begin_layout Plain Layout
17516 \begin_inset Flex Code
17519 \begin_layout Plain Layout
17528 \begin_inset space \thinspace{}
17532 \begin_inset Flex Code
17535 \begin_layout Plain Layout
17542 \begin_inset Quotes eld
17546 \begin_inset Quotes erd
17549 language, leading to Left-to-Right (Latin) output, e.
17550 \begin_inset space \thinspace{}
17554 \begin_inset space \space{}
17557 in \SpecialChar TeX
17560 \change_inserted -712698321 1417441977
17564 \begin_layout Description
17566 \change_inserted -712698321 1417442090
17567 \begin_inset Flex Code
17570 \begin_layout Plain Layout
17572 \change_inserted -712698321 1417441983
17579 \begin_inset Flex Code
17582 \begin_layout Plain Layout
17584 \change_inserted -712698321 1417441978
17593 \begin_inset space \thinspace{}
17597 \begin_inset Flex Code
17600 \begin_layout Plain Layout
17602 \change_inserted -712698321 1417441978
17608 ] Force a a line break in the \SpecialChar LaTeX
17609 output before the inset starts and after
17611 This assures the inset itself is output on its own lines, for parsing purposes.
17613 \change_inserted 274215730 1419105878
17619 \begin_layout Description
17620 \begin_inset Flex Code
17623 \begin_layout Plain Layout
17630 \begin_inset Flex Code
17633 \begin_layout Plain Layout
17642 \begin_inset space \thinspace{}
17646 \begin_inset Flex Code
17649 \begin_layout Plain Layout
17655 ] Indicates whether the
17656 \begin_inset Flex Code
17659 \begin_layout Plain Layout
17665 should be used or, instead, the user can change the paragraph style used
17670 \begin_layout Description
17671 \begin_inset Flex Code
17674 \begin_layout Plain Layout
17681 \begin_inset Flex Code
17684 \begin_layout Plain Layout
17693 \begin_inset space \thinspace{}
17697 \begin_inset Flex Code
17700 \begin_layout Plain Layout
17706 ] As with paragraph styles, see
17707 \begin_inset CommandInset ref
17709 reference "sub:Paragraph-Styles"
17716 \begin_layout Description
17717 \begin_inset Flex Code
17720 \begin_layout Plain Layout
17726 These tags control the XHTML output.
17728 \begin_inset CommandInset ref
17730 reference "sec:Tags-for-XHTML"
17737 \begin_layout Description
17738 \begin_inset Flex Code
17741 \begin_layout Plain Layout
17748 \begin_inset Flex Code
17751 \begin_layout Plain Layout
17760 \begin_inset space \thinspace{}
17764 \begin_inset Flex Code
17767 \begin_layout Plain Layout
17773 ] Whether to include the contents of this inset in the strings generated
17774 for the `Outline' pane.
17775 One would not, for example, want the content of a footnote in a section
17776 header to be included in the TOC displayed in the outline, but one would
17777 normally want the content of a character style displayed.
17778 Default is false: not to include.
17781 \begin_layout Description
17782 \begin_inset Flex Code
17785 \begin_layout Plain Layout
17794 \begin_inset Flex Code
17797 \begin_layout Plain Layout
17806 \begin_inset space \thinspace{}
17810 \begin_inset Flex Code
17813 \begin_layout Plain Layout
17819 ] As with paragraph styles, see
17820 \begin_inset CommandInset ref
17822 reference "sub:Paragraph-Styles"
17829 \begin_layout Description
17830 \begin_inset Flex Code
17833 \begin_layout Plain Layout
17839 The font used for the label.
17841 \begin_inset CommandInset ref
17843 reference "sub:Font-description"
17848 Note that this definition can never appear before
17849 \begin_inset Flex Code
17852 \begin_layout Plain Layout
17858 , lest it be ineffective.
17861 \begin_layout Description
17862 \begin_inset Flex Code
17865 \begin_layout Plain Layout
17872 \begin_inset Flex Code
17875 \begin_layout Plain Layout
17882 \begin_inset Quotes erd
17886 \begin_inset Quotes erd
17889 ] What will be displayed on the button or elsewhere as the inset label.
17891 \begin_inset Flex Code
17894 \begin_layout Plain Layout
17902 \begin_inset Flex Code
17905 \begin_layout Plain Layout
17911 ) modify this label on the fly.
17914 \begin_layout Description
17915 \begin_inset Flex Code
17918 \begin_layout Plain Layout
17924 Language dependent preamble; see
17925 \begin_inset CommandInset ref
17927 reference "sub:I18n"
17934 \begin_layout Description
17935 \begin_inset Flex Code
17938 \begin_layout Plain Layout
17945 \begin_inset Flex Code
17948 \begin_layout Plain Layout
17954 ] The name of the corresponding \SpecialChar LaTeX
17956 Either the environment or command name.
17959 \begin_layout Description
17960 \begin_inset Flex Code
17963 \begin_layout Plain Layout
17970 \begin_inset Flex Code
17973 \begin_layout Plain Layout
17979 ] The optional parameter for the corresponding
17980 \begin_inset Flex Code
17983 \begin_layout Plain Layout
17989 stuff, including possible bracket pairs like
17990 \begin_inset Flex Code
17993 \begin_layout Plain Layout
18000 This parameter cannot be changed from within \SpecialChar LyX
18002 \begin_inset Flex Code
18005 \begin_layout Plain Layout
18011 for customizable parameters).
18012 It will be output as is after all \SpecialChar LaTeX
18014 \begin_inset Flex Code
18017 \begin_layout Plain Layout
18026 \begin_layout Description
18027 \begin_inset Flex Code
18030 \begin_layout Plain Layout
18037 \begin_inset Flex Code
18040 \begin_layout Plain Layout
18041 Command, Environment, None
18046 ] How the style should be translated into \SpecialChar LaTeX
18051 \begin_layout Plain Layout
18052 \begin_inset Flex Code
18055 \begin_layout Plain Layout
18061 is perhaps a bit misleading, since these rules apply to SGML classes too.
18062 Visit the SGML class files for specific examples.
18068 \begin_inset Separator parbreak
18075 \begin_layout Description
18076 \begin_inset Flex Code
18079 \begin_layout Plain Layout
18085 means nothing special
18088 \begin_layout Description
18089 \begin_inset Flex Code
18092 \begin_layout Plain Layout
18099 \begin_inset Flex Code
18102 \begin_layout Plain Layout
18109 {\SpecialChar ldots
18118 \begin_layout Description
18119 \begin_inset Flex Code
18122 \begin_layout Plain Layout
18129 \begin_inset Flex Code
18132 \begin_layout Plain Layout
18139 }\SpecialChar ldots
18154 \begin_layout Standard
18155 Putting the last few things together, the \SpecialChar LaTeX
18156 output will be either:
18159 \begin_layout LyX-Code
18162 LatexName[LatexParam]{\SpecialChar ldots
18166 \begin_layout Standard
18170 \begin_layout LyX-Code
18173 begin{LatexName}[LatexParam] \SpecialChar ldots
18179 \begin_layout Standard
18180 depending upon the \SpecialChar LaTeX
18185 \begin_layout Description
18186 \begin_inset Flex Code
18189 \begin_layout Plain Layout
18196 \begin_inset Flex Code
18199 \begin_layout Plain Layout
18205 ] A string that is put at the beginning of the layout content.
18206 A line break in the output can be indicated by
18207 \begin_inset Flex Code
18210 \begin_layout Plain Layout
18219 \begin_layout Description
18220 \begin_inset Flex Code
18223 \begin_layout Plain Layout
18230 \begin_inset Flex Code
18233 \begin_layout Plain Layout
18240 \begin_inset Flex Code
18243 \begin_layout Plain Layout
18250 \begin_inset Flex Code
18253 \begin_layout Plain Layout
18260 \begin_inset Flex Code
18263 \begin_layout Plain Layout
18269 (indicating a dummy definition ending definitions of charstyles, etc).
18270 This entry is required in and is only meaningful for Flex insets.
18271 Among other things, it determines on which menu this inset will appear.
18273 \begin_inset Flex Code
18276 \begin_layout Plain Layout
18284 \begin_inset Flex Code
18287 \begin_layout Plain Layout
18293 will automatically set
18294 \begin_inset Flex Code
18297 \begin_layout Plain Layout
18305 \begin_inset Flex Code
18308 \begin_layout Plain Layout
18314 can be set to true for
18315 \begin_inset Flex Code
18318 \begin_layout Plain Layout
18324 insets by setting it
18329 \begin_inset Flex Code
18332 \begin_layout Plain Layout
18342 \begin_layout Description
18343 \begin_inset Flex Code
18346 \begin_layout Plain Layout
18353 \begin_inset Flex Code
18356 \begin_layout Plain Layout
18365 \begin_inset space \thinspace{}
18369 \begin_inset Flex Code
18372 \begin_layout Plain Layout
18378 ] Whether multiple paragraphs are permitted in this inset.
18380 \begin_inset Flex Code
18383 \begin_layout Plain Layout
18389 to the same value and
18390 \begin_inset Flex Code
18393 \begin_layout Plain Layout
18399 to the opposite value.
18400 These can be reset to other values, if they are used
18405 \begin_inset Flex Code
18408 \begin_layout Plain Layout
18418 \begin_layout Description
18419 \begin_inset Flex Code
18422 \begin_layout Plain Layout
18429 \begin_inset Flex Code
18432 \begin_layout Plain Layout
18441 \begin_inset space \thinspace{}
18445 \begin_inset Flex Code
18448 \begin_layout Plain Layout
18454 ] Whether fragile commands in this inset should be
18455 \begin_inset Flex Code
18458 \begin_layout Plain Layout
18471 whether the command should itself be protected.) Default is false.
18474 \begin_layout Description
18475 \begin_inset Flex Code
18478 \begin_layout Plain Layout
18485 \begin_inset Flex Code
18488 \begin_layout Plain Layout
18494 ] Deletes an existing
18495 \begin_inset Flex Code
18498 \begin_layout Plain Layout
18505 \change_inserted -712698321 1417953494
18509 \begin_layout Description
18511 \change_inserted -712698321 1417953559
18512 \begin_inset Flex Code
18515 \begin_layout Plain Layout
18517 \change_inserted -712698321 1417953494
18524 \begin_inset Flex Code
18527 \begin_layout Plain Layout
18529 \change_inserted -712698321 1417953574
18536 \begin_inset Flex Code
18539 \begin_layout Plain Layout
18541 \change_inserted -712698321 1417953533
18547 that has replaced this
18548 \begin_inset Flex Code
18551 \begin_layout Plain Layout
18553 \change_inserted -712698321 1417953551
18560 This is used to rename an
18561 \begin_inset Flex Code
18564 \begin_layout Plain Layout
18566 \change_inserted -712698321 1417953559
18572 , while keeping backward compatibility.
18577 \begin_layout Description
18578 \begin_inset Flex Code
18581 \begin_layout Plain Layout
18588 \begin_inset Flex Code
18591 \begin_layout Plain Layout
18600 \begin_inset space \thinspace{}
18604 \begin_inset Flex Code
18607 \begin_layout Plain Layout
18613 ] As with paragraph styles, see
18614 \begin_inset CommandInset ref
18616 reference "sub:Paragraph-Styles"
18624 \begin_layout Description
18625 \begin_inset Flex Code
18628 \begin_layout Plain Layout
18635 \begin_inset Flex Code
18638 \begin_layout Plain Layout
18647 \begin_inset space \thinspace{}
18651 \begin_inset Flex Code
18654 \begin_layout Plain Layout
18660 ] As with paragraph styles, see
18661 \begin_inset CommandInset ref
18663 reference "sub:Paragraph-Styles"
18671 \begin_layout Description
18672 \begin_inset Flex Code
18675 \begin_layout Plain Layout
18681 As with paragraph styles, see
18682 \begin_inset CommandInset ref
18684 reference "sub:Paragraph-Styles"
18691 \begin_layout Description
18692 \begin_inset Flex Code
18695 \begin_layout Plain Layout
18702 \begin_inset Flex Code
18705 \begin_layout Plain Layout
18711 ] The prefix to use when creating labels referring to insets of this type.
18712 This allows the use of formatted references.
18715 \begin_layout Description
18716 \begin_inset Flex Code
18719 \begin_layout Plain Layout
18726 \begin_inset Flex Code
18729 \begin_layout Plain Layout
18735 ] As with paragraph styles, see
18736 \begin_inset CommandInset ref
18738 reference "sub:Paragraph-Styles"
18745 \begin_layout Description
18746 \begin_inset Flex Code
18749 \begin_layout Plain Layout
18756 \begin_inset Flex Code
18759 \begin_layout Plain Layout
18768 \begin_inset space \thinspace{}
18772 \begin_inset Flex Code
18775 \begin_layout Plain Layout
18781 ] Resets the \SpecialChar LaTeX
18782 arguments of this layout (as defined via the
18783 \begin_inset Flex Code
18786 \begin_layout Plain Layout
18793 This is useful if you have copied a style via
18794 \begin_inset Flex Code
18797 \begin_layout Plain Layout
18803 , but you do not want to inherit its (required and optional) arguments.
18806 \begin_layout Description
18807 \begin_inset Flex Code
18810 \begin_layout Plain Layout
18817 \begin_inset Flex Code
18820 \begin_layout Plain Layout
18827 \begin_inset space \thinspace{}
18831 \begin_inset Flex Code
18834 \begin_layout Plain Layout
18842 ] Whether this inset should use the font of its surrounding environment
18844 Default is false: use the font of the surrounding environment.
18847 \begin_layout Description
18848 \begin_inset Flex Code
18851 \begin_layout Plain Layout
18858 \begin_inset Flex Code
18861 \begin_layout Plain Layout
18867 ] A string that is put at the end of the layout content.
18868 A line break in the output can be indicated by
18869 \begin_inset Flex Code
18872 \begin_layout Plain Layout
18881 \begin_layout Description
18882 \begin_inset Flex Code
18885 \begin_layout Plain Layout
18892 \begin_inset Flex Code
18895 \begin_layout Plain Layout
18902 \begin_inset space \thinspace{}
18906 \begin_inset Flex Code
18909 \begin_layout Plain Layout
18917 ] Allow spell-checking the contents of this inset.
18921 \begin_layout Subsection
18923 \begin_inset CommandInset label
18925 name "sub:Counters"
18932 \begin_layout Standard
18933 It is necessary to define the counters (
18934 \begin_inset Flex MenuItem
18937 \begin_layout Plain Layout
18944 \begin_inset Flex MenuItem
18947 \begin_layout Plain Layout
18953 , \SpecialChar ldots
18954 ) in the text class itself.
18955 The standard counters are defined in the file
18956 \begin_inset Flex Code
18959 \begin_layout Plain Layout
18965 , so you may have to do no more than add
18968 \begin_layout LyX-Code
18969 Input stdcounters.inc
18972 \begin_layout Standard
18973 to your layout file to get them to work.
18974 But if you want to define custom counters, then you can do so.
18975 The counter declaration must begin with:
18978 \begin_layout LyX-Code
18979 Counter CounterName
18982 \begin_layout Standard
18984 \begin_inset Flex Code
18987 \begin_layout Plain Layout
18993 ' is replaced by the name of the counter.
18994 And it must end with
18995 \begin_inset Quotes eld
18999 \begin_inset Flex Code
19002 \begin_layout Plain Layout
19009 \begin_inset Quotes erd
19013 The following parameters can also be used:
19016 \begin_layout Description
19017 \begin_inset Flex Code
19020 \begin_layout Plain Layout
19027 \begin_inset Flex Code
19030 \begin_layout Plain Layout
19036 ] Sets the initial value for the counter, to which it will be reset whenever
19038 Normally, one will want the default, 1.
19041 \begin_layout Description
19042 \begin_inset Flex Code
19045 \begin_layout Plain Layout
19052 \begin_inset Flex Code
19055 \begin_layout Plain Layout
19062 \begin_inset Quotes erd
19066 \begin_inset Quotes erd
19069 ] When defined, this string defines how the counter is displayed.
19070 Setting this value sets
19071 \begin_inset Flex Code
19074 \begin_layout Plain Layout
19075 LabelStringAppendix
19081 The following special constructs can be used in the string:
19082 \begin_inset Separator parbreak
19089 \begin_layout Itemize
19090 \begin_inset Flex Code
19093 \begin_layout Plain Layout
19101 will be replaced by the expansion of the
19102 \begin_inset Flex Code
19105 \begin_layout Plain Layout
19112 \begin_inset Flex Code
19115 \begin_layout Plain Layout
19116 LabelStringAppendix
19122 \begin_inset Flex Code
19125 \begin_layout Plain Layout
19135 \begin_layout Itemize
19136 counter values can be expressed using \SpecialChar LaTeX
19138 \begin_inset Newline newline
19142 \begin_inset Flex Code
19145 \begin_layout Plain Layout
19162 \begin_inset Flex Code
19165 \begin_layout Plain Layout
19177 \begin_layout Plain Layout
19187 Actually, the situation is a bit more complicated: any
19206 other than those described below will produce arabic numerals.
19207 It would not be surprising to see this change in the future.
19213 \begin_inset Flex Code
19216 \begin_layout Plain Layout
19222 : 1, 2, 3,\SpecialChar ldots
19224 \begin_inset Flex Code
19227 \begin_layout Plain Layout
19233 for lower-case letters: a, b, c, \SpecialChar ldots
19235 \begin_inset Flex Code
19238 \begin_layout Plain Layout
19244 for upper-case letters: A, B, C, \SpecialChar ldots
19246 \begin_inset Flex Code
19249 \begin_layout Plain Layout
19255 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19257 \begin_inset Flex Code
19260 \begin_layout Plain Layout
19266 for upper-case roman numerals: I, II, III\SpecialChar ldots
19268 \begin_inset Flex Code
19271 \begin_layout Plain Layout
19277 for hebrew numerals.
19281 \begin_layout Standard
19282 If LabelString is not defined, a default value is constructed as follows:
19283 if the counter has a master counter
19284 \begin_inset Flex Code
19287 \begin_layout Plain Layout
19294 \begin_inset Flex Code
19297 \begin_layout Plain Layout
19304 \begin_inset Newline newline
19308 \begin_inset Flex Code
19311 \begin_layout Plain Layout
19321 is used; otherwise the string
19322 \begin_inset Flex Code
19325 \begin_layout Plain Layout
19336 \begin_layout Description
19337 \begin_inset Flex Code
19340 \begin_layout Plain Layout
19341 LabelStringAppendix
19347 \begin_inset Flex Code
19350 \begin_layout Plain Layout
19357 \begin_inset Quotes erd
19361 \begin_inset Quotes erd
19365 \begin_inset Flex Code
19368 \begin_layout Plain Layout
19374 , but for use in the Appendix.
19377 \begin_layout Description
19378 \begin_inset Flex Code
19381 \begin_layout Plain Layout
19388 \begin_inset Flex Code
19391 \begin_layout Plain Layout
19398 \begin_inset Quotes erd
19402 \begin_inset Quotes erd
19405 ] A format for use with formatted references to this counter.
19406 For example, one might want to have references to section numbers appear
19408 \begin_inset Quotes eld
19412 \begin_inset Quotes erd
19416 The string should contain
19417 \begin_inset Quotes eld
19421 \begin_inset Quotes erd
19425 This will be replaced by the counter number itself.
19426 So, for sections, it would be: Section ##.
19429 \begin_layout Description
19430 \begin_inset Flex Code
19433 \begin_layout Plain Layout
19440 \begin_inset Flex Code
19443 \begin_layout Plain Layout
19450 \begin_inset Quotes erd
19454 \begin_inset Quotes erd
19457 ] If this is set to the name of another counter, the present counter will
19458 be reset every time the other one is increased.
19460 \begin_inset Flex Code
19463 \begin_layout Plain Layout
19470 \begin_inset Flex Code
19473 \begin_layout Plain Layout
19482 \begin_layout Subsection
19484 \begin_inset CommandInset label
19486 name "sub:Font-description"
19493 \begin_layout Standard
19494 A font description looks like this:
19497 \begin_layout LyX-Code
19511 \begin_layout LyX-Code
19515 \begin_layout LyX-Code
19519 \begin_layout Standard
19520 The following commands are available:
19523 \begin_layout Description
19524 \begin_inset Flex Code
19527 \begin_layout Plain Layout
19534 \begin_inset Flex Code
19537 \begin_layout Plain Layout
19546 \begin_inset Flex Code
19549 \begin_layout Plain Layout
19556 \begin_inset Flex Code
19559 \begin_layout Plain Layout
19566 \begin_inset Flex Code
19569 \begin_layout Plain Layout
19576 \begin_inset Flex Code
19579 \begin_layout Plain Layout
19586 \begin_inset Flex Code
19589 \begin_layout Plain Layout
19596 \begin_inset Flex Code
19599 \begin_layout Plain Layout
19606 \begin_inset Flex Code
19609 \begin_layout Plain Layout
19616 \begin_inset Flex Code
19619 \begin_layout Plain Layout
19628 \begin_layout Description
19629 \begin_inset Flex Code
19632 \begin_layout Plain Layout
19639 \begin_inset Flex Code
19642 \begin_layout Plain Layout
19651 \begin_inset Flex Code
19654 \begin_layout Plain Layout
19661 \begin_inset Flex Code
19664 \begin_layout Plain Layout
19673 \begin_layout Description
19674 \begin_inset Flex Code
19677 \begin_layout Plain Layout
19684 \begin_inset Flex Code
19687 \begin_layout Plain Layout
19693 ] Valid arguments are:
19694 \begin_inset Flex Code
19697 \begin_layout Plain Layout
19704 \begin_inset Flex Code
19707 \begin_layout Plain Layout
19714 \begin_inset Flex Code
19717 \begin_layout Plain Layout
19724 \begin_inset Flex Code
19727 \begin_layout Plain Layout
19734 \begin_inset Flex Code
19737 \begin_layout Plain Layout
19744 \begin_inset Flex Code
19747 \begin_layout Plain Layout
19754 \begin_inset Flex Code
19757 \begin_layout Plain Layout
19764 \begin_inset Flex Code
19767 \begin_layout Plain Layout
19774 \begin_inset Flex Code
19777 \begin_layout Plain Layout
19784 \begin_inset Flex Code
19787 \begin_layout Plain Layout
19794 \begin_inset Flex Code
19797 \begin_layout Plain Layout
19804 \begin_inset Flex Code
19807 \begin_layout Plain Layout
19814 Each of these turns on or off the corresponding attribute.
19816 \begin_inset Flex Code
19819 \begin_layout Plain Layout
19825 turns on emphasis, and
19826 \begin_inset Flex Code
19829 \begin_layout Plain Layout
19837 \begin_inset Newline newline
19840 If the latter seems puzzling, remember that the font settings for the present
19841 context are generally inherited from the surrounding context.
19843 \begin_inset Flex Code
19846 \begin_layout Plain Layout
19852 would turn off the emphasis that was anyway in effect, say, in a theorem
19856 \begin_layout Description
19857 \begin_inset Flex Code
19860 \begin_layout Plain Layout
19867 \begin_inset Flex Code
19870 \begin_layout Plain Layout
19879 \begin_inset Flex Code
19882 \begin_layout Plain Layout
19891 \begin_layout Description
19892 \begin_inset Flex Code
19895 \begin_layout Plain Layout
19902 \begin_inset Flex Code
19905 \begin_layout Plain Layout
19914 \begin_inset Flex Code
19917 \begin_layout Plain Layout
19924 \begin_inset Flex Code
19927 \begin_layout Plain Layout
19934 \begin_inset Flex Code
19937 \begin_layout Plain Layout
19946 \begin_layout Description
19947 \begin_inset Flex Code
19950 \begin_layout Plain Layout
19957 \begin_inset Flex Code
19960 \begin_layout Plain Layout
19967 \begin_inset Flex Code
19970 \begin_layout Plain Layout
19977 \begin_inset Flex Code
19980 \begin_layout Plain Layout
19989 \begin_inset Flex Code
19992 \begin_layout Plain Layout
19999 \begin_inset Flex Code
20002 \begin_layout Plain Layout
20009 \begin_inset Flex Code
20012 \begin_layout Plain Layout
20019 \begin_inset Flex Code
20022 \begin_layout Plain Layout
20029 \begin_inset Flex Code
20032 \begin_layout Plain Layout
20041 \begin_layout Subsection
20042 \begin_inset CommandInset label
20044 name "sub:Citation-format-description"
20048 Citation format description
20051 \begin_layout Standard
20053 \begin_inset Flex Code
20056 \begin_layout Plain Layout
20062 blocks are used to describe how bibliographic information should be displayed,
20063 both within \SpecialChar LyX
20064 itself (in the citation dialog and in tooltips, for example)
20065 and in XHTML output.
20066 Such a block might look like this:
20069 \begin_layout LyX-Code
20073 \begin_layout LyX-Code
20077 \begin_layout LyX-Code
20081 \begin_layout LyX-Code
20085 \begin_layout Standard
20086 The individual lines define how the bibliographic information associated
20087 with an article or book, respectively, is to be displayed, and such a definitio
20088 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20091 defines a default format in the source code that will be used if no specific
20092 definition has been given.
20094 predefines several formats in the file
20095 \begin_inset Flex Code
20098 \begin_layout Plain Layout
20104 , which is included in most of \SpecialChar LyX
20105 's document classes.
20108 \begin_layout Standard
20109 The definitions use a simple language that allows Bib\SpecialChar TeX
20110 keys to be replaced
20112 Keys should be enclosed in
20113 \begin_inset Flex Code
20116 \begin_layout Plain Layout
20123 \begin_inset Flex Code
20126 \begin_layout Plain Layout
20133 So a simple definition might look like this:
20136 \begin_layout LyX-Code
20138 \begin_inset Quotes eld
20142 \begin_inset Quotes erd
20148 \begin_layout Standard
20149 This would print the author, followed by a comma, followed by the title,
20150 in quotes, followed by a period.
20153 \begin_layout Standard
20154 Of course, sometimes you may want to print a key only if it exists.
20155 This can be done by using a conditional construction, such as:
20156 \begin_inset Flex Code
20159 \begin_layout Plain Layout
20161 \begin_inset space ~
20171 \begin_inset Flex Code
20174 \begin_layout Plain Layout
20180 key exists, then print
20181 \begin_inset Quotes eld
20185 \begin_inset space ~
20189 \begin_inset Quotes erd
20192 followed by the volume key.
20193 It is also possible to have an else clause in the conditional, such as:
20194 \begin_inset Newline newline
20198 \begin_inset Flex Code
20201 \begin_layout Plain Layout
20202 {%author%[[%author%]][[%editor%, ed.]]}
20208 \begin_inset Newline newline
20212 \begin_inset Flex Code
20215 \begin_layout Plain Layout
20221 key is printed if it exists; otherwise, the editor key is printed, followed
20223 \begin_inset Quotes eld
20227 \begin_inset space ~
20231 \begin_inset Quotes erd
20234 Note that the key is again enclosed in
20235 \begin_inset Flex Code
20238 \begin_layout Plain Layout
20244 signs; the entire conditional is enclosed in braces; and the if and else
20245 clauses are enclosed in double brackets,
20246 \begin_inset Quotes eld
20250 \begin_inset Flex Code
20253 \begin_layout Plain Layout
20260 \begin_inset Quotes eld
20264 \begin_inset Quotes eld
20268 \begin_inset Flex Code
20271 \begin_layout Plain Layout
20278 \begin_inset Quotes erd
20282 There must be no space between any of these.
20285 \begin_layout Standard
20286 There is one other piece of syntax available in definitions, which looks
20288 \begin_inset Flex Code
20291 \begin_layout Plain Layout
20298 This defines a piece of formatting information that is to be used when
20300 \begin_inset Quotes eld
20304 \begin_inset Quotes erd
20308 Obviously, we do not want to output HTML tags when writing plain text,
20309 so they should be wrapped in
20310 \begin_inset Quotes eld
20314 \begin_inset Quotes erd
20318 \begin_inset Quotes eld
20322 \begin_inset Quotes erd
20328 \begin_layout Standard
20329 Two special sorts of definitions are also possible in a
20330 \begin_inset Flex Code
20333 \begin_layout Plain Layout
20340 An example of the first would be:
20343 \begin_layout LyX-Code
20345 \begin_inset Quotes eld
20349 \begin_inset Quotes erd
20355 \begin_layout Standard
20356 This is an abbreviation, or macro, and it can be used by treating it as
20358 \begin_inset Flex Code
20361 \begin_layout Plain Layout
20370 \begin_inset Flex Code
20373 \begin_layout Plain Layout
20379 exactly as it would treat its definition.
20380 So, let us issue the obvious
20388 \begin_layout LyX-Code
20392 \begin_layout Standard
20393 or anything like it.
20395 shouldn't go into an infinite loop, but it may go into a long one before
20399 \begin_layout Standard
20400 The second sort of special definition might look like this:
20403 \begin_layout LyX-Code
20407 \begin_layout Standard
20408 This defines a translatable piece of text, which allows relevant parts of
20409 the bibliography to be translated.
20410 It can be included in a definition by treating it as a key:
20411 \begin_inset Flex Code
20414 \begin_layout Plain Layout
20421 Several of these are predefined in
20422 \begin_inset Flex Code
20425 \begin_layout Plain Layout
20432 Note that these are not macros, in the sense just defined.
20433 They will not be expanded.
20436 \begin_layout Standard
20437 So here then is an example that use all these features:
20438 \begin_inset VSpace defskip
20444 \begin_layout Standard
20448 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20451 \begin_layout Standard
20452 \begin_inset VSpace defskip
20455 This defines a macro that prints the author, followed by a comma, if the
20457 \begin_inset Flex Code
20460 \begin_layout Plain Layout
20466 key is defined, or else prints the name of the editor, followed by the
20468 \begin_inset Flex Code
20471 \begin_layout Plain Layout
20477 or its translation (it is by default
20478 \begin_inset Quotes eld
20482 \begin_inset Quotes erd
20486 \begin_inset Flex Code
20489 \begin_layout Plain Layout
20496 Note that this is in fact defined in
20497 \begin_inset Flex Code
20500 \begin_layout Plain Layout
20506 , so you can use it in your own definitions, or re-definitions, if you load
20510 \begin_layout Section
20511 \begin_inset CommandInset label
20513 name "sec:Tags-for-XHTML"
20517 Tags for XHTML output
20520 \begin_layout Standard
20521 As with \SpecialChar LaTeX
20522 or DocBook, the format of \SpecialChar LyX
20523 's XHTML output is also controlled by
20524 layout information.
20525 In general, \SpecialChar LyX
20526 provides sensible defaults and, as mentioned earlier, it will
20527 even construct default CSS style rules from the other layout tags.
20528 For example, \SpecialChar LyX
20529 will attempt to use the information provided in the
20530 \begin_inset Flex Code
20533 \begin_layout Plain Layout
20539 declaration for the Chapter style to write CSS that will appropriately
20540 format chapter headings.
20543 \begin_layout Standard
20544 In many cases, then, you may not have to do anything at all to get acceptable
20545 XHTML output for your own environments, custom insets, and so forth.
20546 But in some cases you will, and so \SpecialChar LyX
20547 provides a number of layout tags that
20548 can be used to customize the XHTML and CSS that are generated.
20551 \begin_layout Standard
20552 Note that there are two tags,
20553 \begin_inset Flex Code
20556 \begin_layout Plain Layout
20563 \begin_inset Flex Code
20566 \begin_layout Plain Layout
20572 that may appear outside style and inset declarations.
20574 \begin_inset CommandInset ref
20576 reference "sub:General-text-class"
20580 for details on these.
20583 \begin_layout Subsection
20584 \begin_inset CommandInset label
20586 name "sub:Paragraph-Style-XHTML"
20593 \begin_layout Standard
20594 The sort of XHTML \SpecialChar LyX
20595 outputs for a paragraph depends upon whether we are dealing
20596 with a normal paragraph, a command, or an environment, where this is itself
20597 determined by the contents of the corresponding
20598 \begin_inset Flex Code
20601 \begin_layout Plain Layout
20612 \begin_layout Standard
20613 For a command or normal paragraph, the output XHTML has the following form:
20616 \begin_layout LyX-Code
20618 \begin_inset Quotes erd
20622 \begin_inset Quotes erd
20628 \begin_layout LyX-Code
20630 \begin_inset Quotes erd
20634 \begin_inset Quotes erd
20640 \begin_layout LyX-Code
20641 Contents of the paragraph.
20644 \begin_layout LyX-Code
20648 \begin_layout Standard
20649 The label tags are of course omitted if the paragraph does not have a label.
20652 \begin_layout Standard
20653 For an environment that is not some sort of list, the XHTML takes this form:
20656 \begin_layout LyX-Code
20658 \begin_inset Quotes erd
20662 \begin_inset Quotes erd
20668 \begin_layout LyX-Code
20670 \begin_inset Quotes erd
20674 \begin_inset Quotes erd
20678 \begin_inset Quotes erd
20682 \begin_inset Quotes erd
20685 >Environment Label</labeltag>First paragraph.</itemtag>
20688 \begin_layout LyX-Code
20689 <itemtag>Second paragraph.</itemtag>
20692 \begin_layout LyX-Code
20696 \begin_layout Standard
20697 Note that the label is output only for the first paragraph, as it should
20698 be for a theorem, for example.
20702 \begin_layout Standard
20703 For a list, we have one of these forms:
20706 \begin_layout LyX-Code
20708 \begin_inset Quotes erd
20712 \begin_inset Quotes erd
20718 \begin_layout LyX-Code
20720 \begin_inset Quotes erd
20724 \begin_inset Quotes erd
20728 \begin_inset Quotes erd
20732 \begin_inset Quotes erd
20735 >List Label</labeltag>First item.</itemtag>
20738 \begin_layout LyX-Code
20740 \begin_inset Quotes erd
20744 \begin_inset Quotes erd
20748 \begin_inset Quotes erd
20752 \begin_inset Quotes erd
20755 >List Label</labeltag>Second item.</itemtag>
20758 \begin_layout LyX-Code
20762 \begin_layout LyX-Code
20766 \begin_layout LyX-Code
20768 \begin_inset Quotes erd
20772 \begin_inset Quotes erd
20778 \begin_layout LyX-Code
20780 \begin_inset Quotes erd
20784 \begin_inset Quotes erd
20787 >List Label</labeltag><itemtag attr=
20788 \begin_inset Quotes erd
20792 \begin_inset Quotes erd
20795 >First item.</itemtag>
20798 \begin_layout LyX-Code
20800 \begin_inset Quotes erd
20804 \begin_inset Quotes erd
20807 >List Label</labeltag><itemtag attr=
20808 \begin_inset Quotes erd
20812 \begin_inset Quotes erd
20815 >Second item.</itemtag>
20818 \begin_layout LyX-Code
20822 \begin_layout Standard
20823 Note the different orders of
20824 \begin_inset Flex Code
20827 \begin_layout Plain Layout
20834 \begin_inset Flex Code
20837 \begin_layout Plain Layout
20844 Which order we get depends upon the setting of
20845 \begin_inset Flex Code
20848 \begin_layout Plain Layout
20855 \begin_inset Flex Code
20858 \begin_layout Plain Layout
20864 is false (the default), you get the first of these, with the label within
20865 the item; if true, you get the second, with the label outside the item.
20868 \begin_layout Standard
20869 The specific tags and attributes output for each paragraph type can be controlle
20870 d by means of the layout tags we are about to describe.
20871 As mentioned earlier, however, \SpecialChar LyX
20872 uses sensible defaults for many of these,
20873 so you often may not need to do very much to get good XHTML output.
20874 Think of the available tags as there so you can tweak things to your liking.
20877 \begin_layout Description
20878 \begin_inset Flex Code
20881 \begin_layout Plain Layout
20888 \begin_inset Flex Code
20891 \begin_layout Plain Layout
20897 ] Specifies attribute information to be output with the main tag.
20899 \begin_inset Quotes eld
20903 \begin_inset Flex Code
20906 \begin_layout Plain Layout
20913 \begin_inset Quotes erd
20917 By default, \SpecialChar LyX
20919 \begin_inset Quotes eld
20923 \begin_inset Flex Code
20926 \begin_layout Plain Layout
20933 \begin_inset Quotes erd
20937 \begin_inset Flex Code
20940 \begin_layout Plain Layout
20946 is the \SpecialChar LyX
20947 name of the layout, made lowercase, for example: chapter.
20952 contain any style information.
20954 \begin_inset Flex Code
20957 \begin_layout Plain Layout
20966 \begin_layout Description
20967 \begin_inset Flex Code
20970 \begin_layout Plain Layout
20977 \begin_inset Flex Code
20980 \begin_layout Plain Layout
20990 ] Whether to output the default CSS information \SpecialChar LyX
20991 generates for this layout,
20992 even if additional information is explicitly provided via
20993 \begin_inset Flex Code
20996 \begin_layout Plain Layout
21004 \begin_inset Flex Code
21007 \begin_layout Plain Layout
21013 allows you to alter or augment the generated CSS, rather than to override
21016 \begin_inset Flex Code
21019 \begin_layout Plain Layout
21028 \begin_layout Description
21029 \begin_inset Flex Code
21032 \begin_layout Plain Layout
21039 \begin_inset Flex Code
21042 \begin_layout Plain Layout
21048 ] The tag to be used for individual paragraphs of environments, replacing
21050 \begin_inset Flex Code
21053 \begin_layout Plain Layout
21059 in the examples above.
21061 \begin_inset Flex Code
21064 \begin_layout Plain Layout
21073 \begin_layout Description
21074 \begin_inset Flex Code
21077 \begin_layout Plain Layout
21084 \begin_inset Flex Code
21087 \begin_layout Plain Layout
21093 ] Attributes for the item tag.
21095 \begin_inset Quotes eld
21099 \begin_inset Flex Code
21102 \begin_layout Plain Layout
21103 class=`layoutname_item'
21109 \begin_inset Quotes erd
21117 contain any style information.
21119 \begin_inset Flex Code
21122 \begin_layout Plain Layout
21131 \begin_layout Description
21132 \begin_inset Flex Code
21135 \begin_layout Plain Layout
21142 \begin_inset Flex Code
21145 \begin_layout Plain Layout
21151 ] The tag to be used for paragraph and item labels, replacing
21152 \begin_inset Flex Code
21155 \begin_layout Plain Layout
21161 in the examples above.
21163 \begin_inset Flex Code
21166 \begin_layout Plain Layout
21173 \begin_inset Flex Code
21176 \begin_layout Plain Layout
21183 \begin_inset Flex Code
21186 \begin_layout Plain Layout
21193 \begin_inset Flex Code
21196 \begin_layout Plain Layout
21197 Centered_Top_Environment
21202 , in which case it defaults to
21203 \begin_inset Flex Code
21206 \begin_layout Plain Layout
21215 \begin_layout Description
21216 \begin_inset Flex Code
21219 \begin_layout Plain Layout
21226 \begin_inset Flex Code
21229 \begin_layout Plain Layout
21235 ] Attributes for the label tag.
21237 \begin_inset Quotes eld
21241 \begin_inset Flex Code
21244 \begin_layout Plain Layout
21245 class=`layoutname_label'
21251 \begin_inset Quotes erd
21259 contain any style information.
21261 \begin_inset Flex Code
21264 \begin_layout Plain Layout
21273 \begin_layout Description
21274 \begin_inset Flex Code
21277 \begin_layout Plain Layout
21284 \begin_inset Flex Code
21287 \begin_layout Plain Layout
21297 ] Meaningful only for list-like environments, this tag controls whether
21298 the label tag is output before or inside the item tag.
21299 This is used, for example, in the description environment, where we want
21301 \begin_inset Flex Code
21304 \begin_layout Plain Layout
21305 <dt>\SpecialChar ldots
21306 </dt><dd>\SpecialChar ldots
21314 \begin_inset Flex Code
21317 \begin_layout Plain Layout
21323 : The label tag is output inside the item tag.
21326 \begin_layout Description
21327 \begin_inset Flex Code
21330 \begin_layout Plain Layout
21336 Information to be output in the
21337 \begin_inset Flex Code
21340 \begin_layout Plain Layout
21346 section when this style is used.
21347 This might, for example, be used to include a
21348 \begin_inset Flex Code
21351 \begin_layout Plain Layout
21358 \begin_inset Flex Code
21361 \begin_layout Plain Layout
21370 \begin_layout Description
21371 \begin_inset Flex Code
21374 \begin_layout Plain Layout
21380 CSS style information to be included when this style is used.
21381 Note that this will automatically be wrapped in a layout-generated
21382 \begin_inset Flex Code
21385 \begin_layout Plain Layout
21391 block, so only the CSS itself need be included.
21393 \begin_inset Flex Code
21396 \begin_layout Plain Layout
21405 \begin_layout Description
21406 \begin_inset Flex Code
21409 \begin_layout Plain Layout
21416 \begin_inset Flex Code
21419 \begin_layout Plain Layout
21425 ] The tag to be used for the main label, replacing
21426 \begin_inset Flex Code
21429 \begin_layout Plain Layout
21435 in the examples above.
21437 \begin_inset Flex Code
21440 \begin_layout Plain Layout
21449 \begin_layout Description
21450 \begin_inset Flex Code
21453 \begin_layout Plain Layout
21460 \begin_inset Flex Code
21463 \begin_layout Plain Layout
21473 ] Marks this style as the one to be used to generate the
21474 \begin_inset Flex Code
21477 \begin_layout Plain Layout
21483 tag for the XHTML file.
21484 By default, it is false.
21486 \begin_inset Flex Code
21489 \begin_layout Plain Layout
21495 file sets it to true for the
21496 \begin_inset Flex Code
21499 \begin_layout Plain Layout
21509 \begin_layout Subsection
21513 \begin_layout Standard
21514 The XHTML output of insets can also be controlled by information in layout
21519 \begin_layout Plain Layout
21520 At present, this is true only for
21521 \begin_inset Quotes eld
21525 \begin_inset Quotes erd
21528 insets (insets you can type into) and is not true for
21529 \begin_inset Quotes eld
21533 \begin_inset Quotes erd
21536 insets (insets that are associated with dialog boxes).
21541 Here, too, \SpecialChar LyX
21542 tries to provide sensible defaults, and it constructs default
21544 But everything can be customized.
21547 \begin_layout Standard
21548 The XHTML \SpecialChar LyX
21549 outputs for an inset has the following form:
21552 \begin_layout LyX-Code
21554 \begin_inset Quotes erd
21558 \begin_inset Quotes erd
21564 \begin_layout LyX-Code
21565 <labeltag>Label</labeltag>
21568 \begin_layout LyX-Code
21570 \begin_inset Quotes erd
21574 \begin_inset Quotes erd
21577 >Contents of the inset.</innertag>
21580 \begin_layout LyX-Code
21584 \begin_layout Standard
21585 If the inset permits multiple paragraphs—that is, if
21586 \begin_inset Flex Code
21589 \begin_layout Plain Layout
21595 is true—then the contents of the inset will itself be output as paragraphs
21596 formatted according to the styles used for those paragraphs (standard,
21597 quote, and the like).
21598 The label tag is of course omitted if the paragraph does not have a label
21599 and, at present, is always
21600 \begin_inset Flex Code
21603 \begin_layout Plain Layout
21610 The inner tag is optional and, by default, does not appear.
21613 \begin_layout Standard
21614 The specific tags and attributes output for each inset can be controlled
21615 by means of the following layout tags.
21618 \begin_layout Description
21619 \begin_inset Flex Code
21622 \begin_layout Plain Layout
21629 \begin_inset Flex Code
21632 \begin_layout Plain Layout
21638 ] Specifies attribute information to be output with the main tag.
21640 \begin_inset Quotes eld
21644 \begin_inset Flex Code
21647 \begin_layout Plain Layout
21648 class=`myinset' onclick=`\SpecialChar ldots
21655 \begin_inset Quotes erd
21659 By default, \SpecialChar LyX
21661 \begin_inset Quotes eld
21665 \begin_inset Flex Code
21668 \begin_layout Plain Layout
21675 \begin_inset Quotes erd
21679 \begin_inset Flex Code
21682 \begin_layout Plain Layout
21688 is the \SpecialChar LyX
21689 name of the inset, made lowercase and with non-alphanumeric characters
21690 converted to underscores, for example: footnote.
21693 \begin_layout Description
21694 \begin_inset Flex Code
21697 \begin_layout Plain Layout
21704 \begin_inset Flex Code
21707 \begin_layout Plain Layout
21717 ] Whether to output the default CSS information \SpecialChar LyX
21718 generates for this layout,
21719 even if additional information is explicitly provided via
21720 \begin_inset Flex Code
21723 \begin_layout Plain Layout
21731 \begin_inset Flex Code
21734 \begin_layout Plain Layout
21740 allows you to alter or augment the generated CSS, rather than to override
21745 \begin_layout Description
21746 \begin_inset Flex Code
21749 \begin_layout Plain Layout
21756 \begin_inset Flex Code
21759 \begin_layout Plain Layout
21765 ] Attributes for the inner tag.
21767 \begin_inset Quotes eld
21771 \begin_inset Flex Code
21774 \begin_layout Plain Layout
21775 class=`insetname_inner'
21781 \begin_inset Quotes erd
21787 \begin_layout Description
21788 \begin_inset Flex Code
21791 \begin_layout Plain Layout
21798 \begin_inset Flex Code
21801 \begin_layout Plain Layout
21807 ] The inner tag, replacing
21808 \begin_inset Flex Code
21811 \begin_layout Plain Layout
21817 in the examples above.
21818 By default, there is none.
21821 \begin_layout Description
21822 \begin_inset Flex Code
21825 \begin_layout Plain Layout
21832 \begin_inset Flex Code
21835 \begin_layout Plain Layout
21843 ] Whether this inset represents a standalone block of text (such as a footnote)
21844 or instead represents material that is included in the surrounding text
21845 (such as a branch).
21849 \begin_layout Description
21850 \begin_inset Flex Code
21853 \begin_layout Plain Layout
21860 \begin_inset Flex Code
21863 \begin_layout Plain Layout
21869 ] A label for this inset, possibly including a reference to a counter.
21870 For example, for footnote, it might be:
21871 \begin_inset Flex Code
21874 \begin_layout Plain Layout
21883 This is optional, and there is no default.
21886 \begin_layout Description
21887 \begin_inset Flex Code
21890 \begin_layout Plain Layout
21896 Information to be output in the
21897 \begin_inset Flex Code
21900 \begin_layout Plain Layout
21906 section when this style is used.
21907 This might, for example, be used to include a
21908 \begin_inset Flex Code
21911 \begin_layout Plain Layout
21918 \begin_inset Flex Code
21921 \begin_layout Plain Layout
21930 \begin_layout Description
21931 \begin_inset Flex Code
21934 \begin_layout Plain Layout
21940 CSS style information to be included when this style is used.
21941 Note that this will automatically be wrapped in a layout-generated
21942 \begin_inset Flex Code
21945 \begin_layout Plain Layout
21951 block, so only the CSS itself need be included.
21954 \begin_layout Description
21955 \begin_inset Flex Code
21958 \begin_layout Plain Layout
21965 \begin_inset Flex Code
21968 \begin_layout Plain Layout
21974 ] The tag to be used for the main label, replacing
21975 \begin_inset Flex Code
21978 \begin_layout Plain Layout
21984 in the examples above.
21985 The default depends upon the setting of
21986 \begin_inset Flex Code
21989 \begin_layout Plain Layout
21996 \begin_inset Flex Code
21999 \begin_layout Plain Layout
22005 is true, the default is
22006 \begin_inset Flex Code
22009 \begin_layout Plain Layout
22015 ; if it is false, the default is
22016 \begin_inset Flex Code
22019 \begin_layout Plain Layout
22028 \begin_layout Subsection
22032 \begin_layout Standard
22033 The XHTML output for floats too can be controlled by layout information.
22034 The output has the following form:
22037 \begin_layout LyX-Code
22039 \begin_inset Quotes erd
22043 \begin_inset Quotes erd
22049 \begin_layout LyX-Code
22050 Contents of the float.
22053 \begin_layout LyX-Code
22057 \begin_layout Standard
22058 The caption, if there is one, is a separate inset and will be output as
22060 Its appearance can be controlled via the InsetLayout for caption insets.
22064 \begin_layout Description
22065 \begin_inset Flex Code
22068 \begin_layout Plain Layout
22075 \begin_inset Flex Code
22078 \begin_layout Plain Layout
22084 ] Specifies attribute information to be output with the main tag.
22086 \begin_inset Quotes eld
22090 \begin_inset Flex Code
22093 \begin_layout Plain Layout
22094 class=`myfloat' onclick=`\SpecialChar ldots
22101 \begin_inset Quotes erd
22105 By default, \SpecialChar LyX
22107 \begin_inset Quotes eld
22111 \begin_inset Flex Code
22114 \begin_layout Plain Layout
22115 class=`float float-floattype'
22121 \begin_inset Quotes erd
22125 \begin_inset Flex Code
22128 \begin_layout Plain Layout
22134 is \SpecialChar LyX
22135 's name for this type of float, as determined by the float declaration
22137 \begin_inset CommandInset ref
22139 reference "sub:Floats"
22143 ), though made lowercase and with non-alphanumeric characters converted
22144 to underscores, for example: float-table.
22147 \begin_layout Description
22148 \begin_inset Flex Code
22151 \begin_layout Plain Layout
22157 CSS style information to be included when this float is used.
22158 Note that this will automatically be wrapped in a layout-generated
22159 \begin_inset Flex Code
22162 \begin_layout Plain Layout
22168 block, so only the CSS itself need be included.
22171 \begin_layout Description
22172 \begin_inset Flex Code
22175 \begin_layout Plain Layout
22182 \begin_inset Flex Code
22185 \begin_layout Plain Layout
22191 ] The tag to be used for this float, replacing
22192 \begin_inset Quotes eld
22196 \begin_inset Flex Code
22199 \begin_layout Plain Layout
22206 \begin_inset Quotes erd
22209 in the example above.
22211 \begin_inset Flex Code
22214 \begin_layout Plain Layout
22220 and will rarely need changing.
22223 \begin_layout Subsection
22224 Bibliography formatting
22227 \begin_layout Standard
22228 The bibliography can be formatted using
22229 \begin_inset Flex Code
22232 \begin_layout Plain Layout
22240 \begin_inset CommandInset ref
22242 reference "sub:Citation-format-description"
22249 \begin_layout Subsection
22254 \begin_layout Standard
22255 We have several times mentioned that \SpecialChar LyX
22256 will generate default CSS style rules
22257 for both insets and paragraph styles, based upon the other layout information
22259 In this section, we shall say a word about which layout information \SpecialChar LyX
22264 \begin_layout Standard
22265 At present, \SpecialChar LyX
22266 auto-generates CSS only for font information, making use of
22268 \begin_inset Flex Code
22271 \begin_layout Plain Layout
22278 \begin_inset Flex Code
22281 \begin_layout Plain Layout
22288 \begin_inset Flex Code
22291 \begin_layout Plain Layout
22298 \begin_inset Flex Code
22301 \begin_layout Plain Layout
22308 \begin_inset Flex Code
22311 \begin_layout Plain Layout
22318 \begin_inset CommandInset ref
22320 reference "sub:Font-description"
22325 The translation is mostly straightforward and obvious.
22327 \begin_inset Quotes eld
22331 \begin_inset Flex Code
22334 \begin_layout Plain Layout
22341 \begin_inset Quotes erd
22345 \begin_inset Quotes eld
22349 \begin_inset Flex Code
22352 \begin_layout Plain Layout
22353 font-family: sans-serif;
22359 \begin_inset Quotes erd
22363 The correspondence of \SpecialChar LyX
22364 sizes and CSS sizes is a little less obvious but
22365 nonetheless intuitive.
22367 \begin_inset Flex Code
22370 \begin_layout Plain Layout
22377 \begin_inset Flex URL
22380 \begin_layout Plain Layout
22390 \begin_layout Chapter
22391 Including External Material
22392 \begin_inset CommandInset label
22394 name "chap:Including-External-Material"
22401 \begin_layout Standard
22402 \begin_inset Box Shadowbox
22412 height_special "totalheight"
22415 \begin_layout Plain Layout
22416 WARNING: This portion of the documentation has not been updated for some
22418 We certainly hope that it is still accurate, but there are no guarantees.
22426 \begin_layout Standard
22427 The use of material from sources external to \SpecialChar LyX
22428 is covered in detail in the
22434 This part of the manual covers what needs to happen behind the scenes for
22435 new sorts of material to be included.
22438 \begin_layout Section
22442 \begin_layout Standard
22443 The external material feature is based on the concept of a
22448 A template is a specification of how \SpecialChar LyX
22449 should interface with a certain kind
22451 As bundled, \SpecialChar LyX
22452 comes with predefined templates for Xfig figures, various
22453 raster format images, chess diagrams, and LilyPond music notation.
22454 You can check the actual list by using the menu
22455 \begin_inset Flex MenuItem
22458 \begin_layout Plain Layout
22459 Insert\SpecialChar menuseparator
22460 File\SpecialChar menuseparator
22467 Furthermore, it is possible to roll your own template to support a specific
22469 Later we'll describe in more detail what is involved, and hopefully you
22470 will submit all the templates you create so we can include them in a later
22475 \begin_layout Standard
22476 Another basic idea of the external material feature is to distinguish between
22477 the original file that serves as a base for final material and the produced
22478 file that is included in your exported or printed document.
22479 For example, consider the case of a figure produced with
22480 \begin_inset Flex Code
22483 \begin_layout Plain Layout
22490 The Xfig application itself works on an original file with the
22491 \begin_inset Flex Code
22494 \begin_layout Plain Layout
22501 Within Xfig, you create and change your figure, and when you are done,
22503 \begin_inset Flex Code
22506 \begin_layout Plain Layout
22513 When you want to include the figure in your document, you invoke
22514 \begin_inset Flex Code
22517 \begin_layout Plain Layout
22523 in order to create a PostScript file that can readily be included in your
22527 \begin_inset Flex Code
22530 \begin_layout Plain Layout
22536 file is the original file, and the PostScript file is the produced file.
22539 \begin_layout Standard
22540 This distinction is important in order to allow updating of the material
22541 while you are in the process of writing the document.
22542 Furthermore, it provides us with the flexibility that is needed to support
22543 multiple export formats.
22544 For instance, in the case of a plain text file, it is not exactly an award-winn
22545 ing idea to include the figure as raw PostScript.
22546 Instead, you would either prefer to just include a reference to the figure
22547 or try to invoke some graphics to ASCII converter to make the final result
22548 look similar to the real graphics.
22549 The external material management allows you to do this, because it is parametri
22550 zed on the different export formats that \SpecialChar LyX
22554 \begin_layout Standard
22555 Besides supporting the production of different products according to the
22556 exported format, it supports tight integration with editing and viewing
22558 In the case of an Xfig figure, you are able to invoke Xfig on the original
22559 file with a single click from within the external material dialog in \SpecialChar LyX
22561 and also preview the produced PostScript file with Ghostview with another
22563 No more fiddling around with the command line and/or file browsers to locate
22564 and manipulate the original or produced files.
22565 In this way, you are finally able to take full advantage of the many different
22566 applications that are relevant to use when you write your documents, and
22567 ultimately be more productive.
22570 \begin_layout Section
22571 The external template configuration file
22574 \begin_layout Standard
22575 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22577 However, be aware that doing this in an careless manner most probably
22581 introduce an easily exploitable security hole.
22582 So before you do this, please read the discussion about security in
22583 \begin_inset CommandInset ref
22585 reference "sec:Security-discussion"
22592 \begin_layout Standard
22593 Having said that, we encourage you to submit any interesting templates that
22598 \begin_layout Standard
22599 The external templates are defined in the
22600 \begin_inset Flex Code
22603 \begin_layout Plain Layout
22605 Dir/lib/external_templates
22611 You can place your own version in
22612 \begin_inset Flex Code
22615 \begin_layout Plain Layout
22616 UserDir/external_templates
22624 \begin_layout Standard
22625 A typical template looks like this:
22628 \begin_layout LyX-Code
22632 \begin_layout LyX-Code
22633 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22636 \begin_layout LyX-Code
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
22657 AutomaticProduction true
22660 \begin_layout LyX-Code
22664 \begin_layout LyX-Code
22668 \begin_layout LyX-Code
22669 Format \SpecialChar LaTeX
22673 \begin_layout LyX-Code
22674 TransformCommand Rotate RotationLatexCommand
22677 \begin_layout LyX-Code
22678 TransformCommand Resize ResizeLatexCommand
22681 \begin_layout LyX-Code
22682 Product "$$RotateFront$$ResizeFront
22685 \begin_layout LyX-Code
22690 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22693 \begin_layout LyX-Code
22694 $$ResizeBack$$RotateBack"
22697 \begin_layout LyX-Code
22701 \begin_layout LyX-Code
22702 UpdateResult "$$AbsPath$$Basename.pstex_t"
22705 \begin_layout LyX-Code
22706 Requirement "graphicx"
22709 \begin_layout LyX-Code
22710 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22713 \begin_layout LyX-Code
22714 ReferencedFile latex "$$AbsPath$$Basename.eps"
22717 \begin_layout LyX-Code
22718 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22721 \begin_layout LyX-Code
22725 \begin_layout LyX-Code
22726 Format PDF\SpecialChar LaTeX
22730 \begin_layout LyX-Code
22731 TransformCommand Rotate RotationLatexCommand
22734 \begin_layout LyX-Code
22735 TransformCommand Resize ResizeLatexCommand
22738 \begin_layout LyX-Code
22739 Product "$$RotateFront$$ResizeFront
22742 \begin_layout LyX-Code
22747 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22750 \begin_layout LyX-Code
22751 $$ResizeBack$$RotateBack"
22754 \begin_layout LyX-Code
22755 UpdateFormat pdftex
22758 \begin_layout LyX-Code
22759 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22762 \begin_layout LyX-Code
22763 Requirement "graphicx"
22766 \begin_layout LyX-Code
22767 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22770 \begin_layout LyX-Code
22771 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22774 \begin_layout LyX-Code
22778 \begin_layout LyX-Code
22782 \begin_layout LyX-Code
22783 Product "$$Contents(
22785 "$$AbsPath$$Basename.asc
22790 \begin_layout LyX-Code
22791 UpdateFormat asciixfig
22794 \begin_layout LyX-Code
22795 UpdateResult "$$AbsPath$$Basename.asc"
22798 \begin_layout LyX-Code
22802 \begin_layout LyX-Code
22806 \begin_layout LyX-Code
22807 Product "<graphic fileref=
22809 "$$AbsOrRelPathMaster$$Basename.eps
22814 \begin_layout LyX-Code
22818 \begin_layout LyX-Code
22822 \begin_layout LyX-Code
22823 UpdateResult "$$AbsPath$$Basename.eps"
22826 \begin_layout LyX-Code
22827 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22830 \begin_layout LyX-Code
22831 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22834 \begin_layout LyX-Code
22838 \begin_layout LyX-Code
22839 Product "[XFig: $$FName]"
22842 \begin_layout LyX-Code
22846 \begin_layout LyX-Code
22850 \begin_layout Standard
22851 As you can see, the template is enclosed in
22852 \begin_inset Flex Code
22855 \begin_layout Plain Layout
22863 \begin_inset Flex Code
22866 \begin_layout Plain Layout
22873 It contains a header specifying some general settings and, for each supported
22874 primary document file format, a section
22875 \begin_inset Flex Code
22878 \begin_layout Plain Layout
22886 \begin_inset Flex Code
22889 \begin_layout Plain Layout
22898 \begin_layout Subsection
22899 The template header
22902 \begin_layout Description
22903 \begin_inset Flex Code
22906 \begin_layout Plain Layout
22907 AutomaticProduction
22908 \begin_inset space ~
22916 Whether the file represented by the template must be generated by \SpecialChar LyX
22918 This command must occur exactly once.
22921 \begin_layout Description
22922 \begin_inset Flex Code
22925 \begin_layout Plain Layout
22927 \begin_inset space ~
22935 A glob pattern that is used in the file dialog to filter out the desired
22937 If there is more than one possible file extension (e.
22938 \begin_inset space \thinspace{}
22942 \begin_inset space \space{}
22946 \begin_inset Flex Code
22949 \begin_layout Plain Layout
22956 \begin_inset Flex Code
22959 \begin_layout Plain Layout
22965 ), use something like
22966 \begin_inset Flex Code
22969 \begin_layout Plain Layout
22976 This command must occur exactly once.
22979 \begin_layout Description
22980 \begin_inset Flex Code
22983 \begin_layout Plain Layout
22985 \begin_inset space ~
22993 The text that is displayed on the button.
22994 This command must occur exactly once.
22997 \begin_layout Description
22998 \begin_inset Flex Code
23001 \begin_layout Plain Layout
23003 \begin_inset space ~
23007 \begin_inset space ~
23015 The help text that is used in the External dialog.
23016 Provide enough information to explain to the user just what the template
23017 can provide him with.
23018 This command must occur exactly once.
23021 \begin_layout Description
23022 \begin_inset Flex Code
23025 \begin_layout Plain Layout
23027 \begin_inset space ~
23035 The file format of the original file.
23036 This must be the name of a format that is known to \SpecialChar LyX
23038 \begin_inset CommandInset ref
23040 reference "sec:Formats"
23046 \begin_inset Quotes eld
23050 \begin_inset Flex Code
23053 \begin_layout Plain Layout
23060 \begin_inset Quotes erd
23063 if the template can handle original files of more than one format.
23065 will attempt to interrogate the file itself in order to deduce its format
23067 This command must occur exactly once.
23070 \begin_layout Description
23071 \begin_inset Flex Code
23074 \begin_layout Plain Layout
23076 \begin_inset space ~
23084 A unique name for the template.
23085 It must not contain substitution macros (see below).
23088 \begin_layout Description
23089 \begin_inset Flex Code
23092 \begin_layout Plain Layout
23094 \begin_inset space ~
23097 Rotate|Resize|Clip|Extra
23102 This command specifies which transformations are supported by this template.
23103 It may occur zero or more times.
23104 This command enables the corresponding tabs in the external dialog.
23106 \begin_inset Flex Code
23109 \begin_layout Plain Layout
23115 command must have either a corresponding
23116 \begin_inset Flex Code
23119 \begin_layout Plain Layout
23126 \begin_inset Flex Code
23129 \begin_layout Plain Layout
23136 \begin_inset Flex Code
23139 \begin_layout Plain Layout
23146 Otherwise the transformation will not be supported by that format.
23149 \begin_layout Subsection
23153 \begin_layout Description
23154 \begin_inset Flex Code
23157 \begin_layout Plain Layout
23159 \begin_inset space ~
23163 |PDF\SpecialChar LaTeX
23169 The primary document file format that this format definition is for.
23170 Not every template has a sensible representation in all document file formats.
23171 Please define nevertheless a
23172 \begin_inset Flex Code
23175 \begin_layout Plain Layout
23181 section for all templates.
23182 Use a dummy text when no representation is available.
23183 Then you can at least see a reference to the external material in the exported
23187 \begin_layout Description
23188 \begin_inset Flex Code
23191 \begin_layout Plain Layout
23193 \begin_inset space ~
23197 \begin_inset space ~
23205 This command defines an additional macro
23206 \begin_inset Flex Code
23209 \begin_layout Plain Layout
23215 for substitution in
23216 \begin_inset Flex Code
23219 \begin_layout Plain Layout
23227 \begin_inset Flex Code
23230 \begin_layout Plain Layout
23236 itself may contain substitution macros.
23237 The advantage over using
23238 \begin_inset Flex Code
23241 \begin_layout Plain Layout
23248 \begin_inset Flex Code
23251 \begin_layout Plain Layout
23257 is that the substituted value of
23258 \begin_inset Flex Code
23261 \begin_layout Plain Layout
23267 is sanitized so that it is a valid optional argument in the document format.
23268 This command may occur zero or more times.
23271 \begin_layout Description
23272 \begin_inset Flex Code
23275 \begin_layout Plain Layout
23277 \begin_inset space ~
23285 The text that is inserted in the exported document.
23286 This is actually the most important command and can be quite complex.
23287 This command must occur exactly once.
23290 \begin_layout Description
23291 \begin_inset Flex Code
23294 \begin_layout Plain Layout
23296 \begin_inset space ~
23304 This command specifies a preamble snippet that will be included in the
23307 It has to be defined using
23308 \begin_inset Flex Code
23311 \begin_layout Plain Layout
23319 \begin_inset Flex Code
23322 \begin_layout Plain Layout
23329 This command may occur zero or more times.
23332 \begin_layout Description
23333 \begin_inset Flex Code
23336 \begin_layout Plain Layout
23338 \begin_inset space ~
23342 \begin_inset space ~
23350 This command denotes files that are created by the conversion process and
23351 are needed for a particular export format.
23352 If the filename is relative, it is interpreted relative to the master document.
23353 This command may be given zero or more times.
23356 \begin_layout Description
23357 \begin_inset Flex Code
23360 \begin_layout Plain Layout
23362 \begin_inset space ~
23370 The name of a required \SpecialChar LaTeX
23372 The package is included via
23373 \begin_inset Flex Code
23376 \begin_layout Plain Layout
23384 in the \SpecialChar LaTeX
23386 This command may occur zero or more times.
23389 \begin_layout Description
23390 \begin_inset Flex Code
23393 \begin_layout Plain Layout
23395 \begin_inset space ~
23399 \begin_inset space ~
23402 RotationLatexCommand
23407 This command specifies that the built in \SpecialChar LaTeX
23408 command should be used for rotation.
23409 This command may occur once or not at all.
23412 \begin_layout Description
23413 \begin_inset Flex Code
23416 \begin_layout Plain Layout
23418 \begin_inset space ~
23422 \begin_inset space ~
23430 This command specifies that the built in \SpecialChar LaTeX
23431 command should be used for resizing.
23432 This command may occur once or not at all.
23435 \begin_layout Description
23436 \begin_inset Flex Code
23439 \begin_layout Plain Layout
23441 \begin_inset space ~
23445 \begin_inset space ~
23448 RotationLatexOption
23453 This command specifies that rotation is done via an optional argument.
23454 This command may occur once or not at all.
23457 \begin_layout Description
23458 \begin_inset Flex Code
23461 \begin_layout Plain Layout
23463 \begin_inset space ~
23467 \begin_inset space ~
23475 This command specifies that resizing is done via an optional argument.
23476 This command may occur once or not at all.
23479 \begin_layout Description
23480 \begin_inset Flex Code
23483 \begin_layout Plain Layout
23485 \begin_inset space ~
23489 \begin_inset space ~
23497 This command specifies that clipping is done via an optional argument.
23498 This command may occur once or not at all.
23501 \begin_layout Description
23502 \begin_inset Flex Code
23505 \begin_layout Plain Layout
23507 \begin_inset space ~
23511 \begin_inset space ~
23519 This command specifies that an extra optional argument is used.
23520 This command may occur once or not at all.
23523 \begin_layout Description
23524 \begin_inset Flex Code
23527 \begin_layout Plain Layout
23529 \begin_inset space ~
23537 The file format of the converted file.
23538 This must be the name of a format that is known to \SpecialChar LyX
23540 \begin_inset Flex MenuItem
23543 \begin_layout Plain Layout
23544 Tools\SpecialChar menuseparator
23545 Preferences\SpecialChar menuseparator
23546 File Handling\SpecialChar menuseparator
23553 This command must occur exactly once.
23554 If the resulting file format is PDF, you need to specify the format
23555 \begin_inset Flex Code
23558 \begin_layout Plain Layout
23565 This is the PDF format used for including graphics.
23566 The other defined PDF formats are for document export.
23569 \begin_layout Description
23570 \begin_inset Flex Code
23573 \begin_layout Plain Layout
23575 \begin_inset space ~
23583 The file name of the converted file.
23584 The file name must be absolute.
23585 This command must occur exactly once.
23588 \begin_layout Subsection
23589 Preamble definitions
23592 \begin_layout Standard
23593 The external template configuration file may contain additional preamble
23594 definitions enclosed by
23595 \begin_inset Flex Code
23598 \begin_layout Plain Layout
23606 \begin_inset Flex Code
23609 \begin_layout Plain Layout
23616 They can be used by the templates in the
23617 \begin_inset Flex Code
23620 \begin_layout Plain Layout
23629 \begin_layout Section
23630 The substitution mechanism
23633 \begin_layout Standard
23634 When the external material facility invokes an external program, it is done
23635 on the basis of a command defined in the template configuration file.
23636 These commands can contain various macros that are expanded before execution.
23637 Execution always take place in the directory of the containing document.
23640 \begin_layout Standard
23641 Also, whenever external material is to be displayed, the name will be produced
23642 by the substitution mechanism, and most other commands in the template
23643 definition support substitution as well.
23646 \begin_layout Standard
23647 The available macros are the following:
23650 \begin_layout Description
23651 \begin_inset Flex Code
23654 \begin_layout Plain Layout
23655 $$AbsOrRelPathMaster
23660 The file path, absolute or relative to the master \SpecialChar LyX
23664 \begin_layout Description
23665 \begin_inset Flex Code
23668 \begin_layout Plain Layout
23669 $$AbsOrRelPathParent
23674 The file path, absolute or relative to the \SpecialChar LyX
23678 \begin_layout Description
23679 \begin_inset Flex Code
23682 \begin_layout Plain Layout
23688 The absolute file path.
23691 \begin_layout Description
23692 \begin_inset Flex Code
23695 \begin_layout Plain Layout
23701 The filename without path and without the extension.
23704 \begin_layout Description
23705 \begin_inset Flex Code
23708 \begin_layout Plain Layout
23710 \begin_inset Quotes eld
23714 \begin_inset Quotes erd
23722 This macro will expand to the contents of the file with the name
23723 \begin_inset Flex Code
23726 \begin_layout Plain Layout
23735 \begin_layout Description
23736 \begin_inset Flex Code
23739 \begin_layout Plain Layout
23745 The file extension (including the dot).
23748 \begin_layout Description
23749 \begin_inset Flex Code
23752 \begin_layout Plain Layout
23758 The filename of the file specified in the external material dialog.
23759 This is either an absolute name, or it is relative to the \SpecialChar LyX
23763 \begin_layout Description
23764 \begin_inset Flex Code
23767 \begin_layout Plain Layout
23774 \begin_inset Flex Code
23777 \begin_layout Plain Layout
23783 (absolute name or relative to the \SpecialChar LyX
23787 \begin_layout Description
23788 \begin_inset Flex Code
23791 \begin_layout Plain Layout
23797 The file path, relative to the master \SpecialChar LyX
23801 \begin_layout Description
23802 \begin_inset Flex Code
23805 \begin_layout Plain Layout
23811 The file path, relative to the \SpecialChar LyX
23815 \begin_layout Description
23816 \begin_inset Flex Code
23819 \begin_layout Plain Layout
23825 This macro will expand to the absolute path of the system directory.
23826 This is typically used to point to the various helper scripts that are
23827 bundled with \SpecialChar LyX
23831 \begin_layout Description
23832 \begin_inset Flex Code
23835 \begin_layout Plain Layout
23841 A name and full path to a temporary file which will be automatically deleted
23842 whenever the containing document is closed, or the external material insertion
23846 \begin_layout Standard
23847 All path macros contain a trailing directory separator, so you can construct
23849 \begin_inset space \thinspace{}
23853 \begin_inset space \space{}
23856 the absolute filename with
23857 \begin_inset Flex Code
23860 \begin_layout Plain Layout
23861 $$AbsPath$$Basename$$Extension
23869 \begin_layout Standard
23870 The macros above are substituted in all commands unless otherwise noted.
23872 \begin_inset Flex Code
23875 \begin_layout Plain Layout
23881 supports additionally the following substitutions if they are enabled by
23883 \begin_inset Flex Code
23886 \begin_layout Plain Layout
23893 \begin_inset Flex Code
23896 \begin_layout Plain Layout
23905 \begin_layout Description
23906 \begin_inset Flex Code
23909 \begin_layout Plain Layout
23915 The front part of the resize command.
23918 \begin_layout Description
23919 \begin_inset Flex Code
23922 \begin_layout Plain Layout
23928 The back part of the resize command.
23931 \begin_layout Description
23932 \begin_inset Flex Code
23935 \begin_layout Plain Layout
23941 The front part of the rotation command.
23944 \begin_layout Description
23945 \begin_inset Flex Code
23948 \begin_layout Plain Layout
23954 The back part of the rotation command.
23957 \begin_layout Standard
23958 The value string of the
23959 \begin_inset Flex Code
23962 \begin_layout Plain Layout
23968 command supports additionally the following substitutions if they are enabled
23970 \begin_inset Flex Code
23973 \begin_layout Plain Layout
23980 \begin_inset Flex Code
23983 \begin_layout Plain Layout
23992 \begin_layout Description
23993 \begin_inset Flex Code
23996 \begin_layout Plain Layout
24005 \begin_layout Description
24006 \begin_inset Flex Code
24009 \begin_layout Plain Layout
24018 \begin_layout Description
24019 \begin_inset Flex Code
24022 \begin_layout Plain Layout
24031 \begin_layout Description
24032 \begin_inset Flex Code
24035 \begin_layout Plain Layout
24041 The rotation option.
24044 \begin_layout Standard
24045 You may ask why there are so many path macros.
24046 There are mainly two reasons:
24049 \begin_layout Enumerate
24050 Relative and absolute file names should remain relative or absolute, respectivel
24052 Users may have reasons to prefer either form.
24053 Relative names are useful for portable documents that should work on different
24054 machines, for example.
24055 Absolute names may be required by some programs.
24058 \begin_layout Enumerate
24060 treats relative file names differently than \SpecialChar LyX
24061 and other programs in nested
24063 For \SpecialChar LyX
24064 , a relative file name is always relative to the document that contains
24066 For \SpecialChar LaTeX
24067 , it is always relative to the master document.
24068 These two definitions are identical if you have only one document, but
24069 differ if you have a master document that includes part documents.
24070 That means that relative filenames must be transformed when presented to
24073 Fortunately \SpecialChar LyX
24074 does this automatically for you if you choose the right macros.
24077 \begin_layout Standard
24078 So which path macro should be used in new template definitions? The rule
24082 \begin_layout Itemize
24084 \begin_inset Flex Code
24087 \begin_layout Plain Layout
24093 if an absolute path is required.
24096 \begin_layout Itemize
24098 \begin_inset Flex Code
24101 \begin_layout Plain Layout
24102 $$AbsOrRelPathMaster
24107 if the substituted string is some kind of \SpecialChar LaTeX
24111 \begin_layout Itemize
24113 \begin_inset Flex Code
24116 \begin_layout Plain Layout
24117 $$AbsOrRelPathParent
24122 in order to preserve the user's choice.
24125 \begin_layout Standard
24126 There are special cases where this rule does not work and e.
24127 \begin_inset space \thinspace{}
24131 \begin_inset space \space{}
24134 relative names are needed, but normally it will work just fine.
24135 One example for such a case is the command
24136 \begin_inset Flex Code
24139 \begin_layout Plain Layout
24140 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24145 in the XFig template above: We can't use the absolute name because the
24147 \begin_inset Flex Code
24150 \begin_layout Plain Layout
24156 files needs the relative name in order to rewrite the file content.
24159 \begin_layout Section
24160 Security discussion
24161 \begin_inset CommandInset label
24163 name "sec:Security-discussion"
24170 \begin_layout Standard
24171 The external material feature interfaces with a lot of external programs
24172 and does so automatically, so we have to consider the security implications
24174 In particular, since you have the option of including your own filenames
24175 and/or parameter strings and those are expanded into a command, it seems
24176 that it would be possible to create a malicious document which executes
24177 arbitrary commands when a user views or prints the document.
24178 This is something we definitely want to avoid.
24181 \begin_layout Standard
24182 However, since the external program commands are specified in the template
24183 configuration file only, there are no security issues if \SpecialChar LyX
24184 is properly configure
24185 d with safe templates only.
24186 This is so because the external programs are invoked with the
24187 \begin_inset Flex Code
24190 \begin_layout Plain Layout
24196 -system call rather than the
24197 \begin_inset Flex Code
24200 \begin_layout Plain Layout
24206 system-call, so it's not possible to execute arbitrary commands from the
24207 filename or parameter section via the shell.
24210 \begin_layout Standard
24211 This also implies that you are restricted in what command strings you can
24212 use in the external material templates.
24213 In particular, pipes and redirection are not readily available.
24214 This has to be so if \SpecialChar LyX
24215 should remain safe.
24216 If you want to use some of the shell features, you should write a safe
24217 script to do this in a controlled manner, and then invoke the script from
24218 the command string.
24222 \begin_layout Standard
24223 It is possible to design a template that interacts directly with the shell,
24224 but since this would allow a malicious user to execute arbitrary commands
24225 by writing clever filenames and/or parameters, we generally recommend that
24226 you only use safe scripts that work with the
24227 \begin_inset Flex Code
24230 \begin_layout Plain Layout
24236 system call in a controlled manner.
24237 Of course, for use in a controlled environment, it can be tempting to just
24238 fall back to use ordinary shell scripts.
24239 If you do so, be aware that you
24243 provide an easily exploitable security hole in your system.
24244 Of course it stands to reason that such unsafe templates will never be
24245 included in the standard \SpecialChar LyX
24246 distribution, although we do encourage people
24247 to submit new templates in the open source tradition.
24248 But \SpecialChar LyX
24249 as shipped from the official distribution channels will never have
24253 \begin_layout Standard
24254 Including external material provides a lot of power, and you have to be
24255 careful not to introduce security hazards with this power.
24256 A subtle error in a single line in an innocent looking script can open
24257 the door to huge security problems.
24258 So if you do not fully understand the issues, we recommend that you consult
24259 a knowledgeable security professional or the \SpecialChar LyX
24260 development team if you have
24261 any questions about whether a given template is safe or not.
24262 And do this before you use it in an uncontrolled environment.
24265 \begin_layout Chapter
24267 List of supported \SpecialChar LyX
24268 functions to be used in layouts
24269 \begin_inset CommandInset label
24271 name "chap:List-of-functions"
24278 \begin_layout Standard
24280 \begin_inset Tabular
24281 <lyxtabular version="3" rows="11" columns="8">
24282 <features tabularvalignment="middle">
24283 <column alignment="left" valignment="top">
24284 <column alignment="left" valignment="top">
24285 <column alignment="left" valignment="top">
24286 <column alignment="left" valignment="top">
24287 <column alignment="left" valignment="top">
24288 <column alignment="left" valignment="top">
24289 <column alignment="left" valignment="top">
24290 <column alignment="left" valignment="top">
24292 <cell alignment="left" valignment="top" usebox="none">
24295 \begin_layout Plain Layout
24301 <cell alignment="left" valignment="top" usebox="none">
24304 \begin_layout Plain Layout
24310 <cell alignment="left" valignment="top" usebox="none">
24313 \begin_layout Plain Layout
24319 <cell alignment="left" valignment="top" usebox="none">
24322 \begin_layout Plain Layout
24328 <cell alignment="center" valignment="top" usebox="none">
24331 \begin_layout Plain Layout
24337 <cell alignment="center" valignment="top" usebox="none">
24340 \begin_layout Plain Layout
24346 <cell alignment="center" valignment="top" usebox="none">
24349 \begin_layout Plain Layout
24355 <cell alignment="center" valignment="top" usebox="none">
24358 \begin_layout Plain Layout
24366 <cell alignment="left" valignment="top" usebox="none">
24369 \begin_layout Plain Layout
24375 <cell alignment="left" valignment="top" usebox="none">
24378 \begin_layout Plain Layout
24384 <cell alignment="left" valignment="top" usebox="none">
24387 \begin_layout Plain Layout
24393 <cell alignment="left" valignment="top" usebox="none">
24396 \begin_layout Plain Layout
24402 <cell alignment="center" valignment="top" usebox="none">
24405 \begin_layout Plain Layout
24411 <cell alignment="center" valignment="top" usebox="none">
24414 \begin_layout Plain Layout
24420 <cell alignment="center" valignment="top" usebox="none">
24423 \begin_layout Plain Layout
24429 <cell alignment="center" valignment="top" usebox="none">
24432 \begin_layout Plain Layout
24440 <cell alignment="left" valignment="top" usebox="none">
24443 \begin_layout Plain Layout
24449 <cell alignment="left" valignment="top" usebox="none">
24452 \begin_layout Plain Layout
24458 <cell alignment="left" valignment="top" usebox="none">
24461 \begin_layout Plain Layout
24467 <cell alignment="left" valignment="top" usebox="none">
24470 \begin_layout Plain Layout
24476 <cell alignment="center" valignment="top" usebox="none">
24479 \begin_layout Plain Layout
24485 <cell alignment="center" valignment="top" usebox="none">
24488 \begin_layout Plain Layout
24494 <cell alignment="center" valignment="top" usebox="none">
24497 \begin_layout Plain Layout
24503 <cell alignment="center" valignment="top" usebox="none">
24506 \begin_layout Plain Layout
24514 <cell alignment="left" valignment="top" usebox="none">
24517 \begin_layout Plain Layout
24523 <cell alignment="left" valignment="top" usebox="none">
24526 \begin_layout Plain Layout
24532 <cell alignment="left" valignment="top" usebox="none">
24535 \begin_layout Plain Layout
24541 <cell alignment="left" valignment="top" usebox="none">
24544 \begin_layout Plain Layout
24550 <cell alignment="center" valignment="top" usebox="none">
24553 \begin_layout Plain Layout
24559 <cell alignment="center" valignment="top" usebox="none">
24562 \begin_layout Plain Layout
24568 <cell alignment="center" valignment="top" usebox="none">
24571 \begin_layout Plain Layout
24577 <cell alignment="center" valignment="top" usebox="none">
24580 \begin_layout Plain Layout
24588 <cell alignment="left" valignment="top" usebox="none">
24591 \begin_layout Plain Layout
24597 <cell alignment="left" valignment="top" usebox="none">
24600 \begin_layout Plain Layout
24606 <cell alignment="left" valignment="top" usebox="none">
24609 \begin_layout Plain Layout
24615 <cell alignment="left" valignment="top" usebox="none">
24618 \begin_layout Plain Layout
24624 <cell alignment="center" valignment="top" usebox="none">
24627 \begin_layout Plain Layout
24633 <cell alignment="center" valignment="top" usebox="none">
24636 \begin_layout Plain Layout
24642 <cell alignment="center" valignment="top" usebox="none">
24645 \begin_layout Plain Layout
24651 <cell alignment="center" valignment="top" usebox="none">
24654 \begin_layout Plain Layout
24662 <cell alignment="left" valignment="top" usebox="none">
24665 \begin_layout Plain Layout
24671 <cell alignment="left" valignment="top" usebox="none">
24674 \begin_layout Plain Layout
24680 <cell alignment="left" valignment="top" usebox="none">
24683 \begin_layout Plain Layout
24689 <cell alignment="left" valignment="top" usebox="none">
24692 \begin_layout Plain Layout
24698 <cell alignment="center" valignment="top" usebox="none">
24701 \begin_layout Plain Layout
24707 <cell alignment="center" valignment="top" usebox="none">
24710 \begin_layout Plain Layout
24716 <cell alignment="center" valignment="top" usebox="none">
24719 \begin_layout Plain Layout
24725 <cell alignment="center" valignment="top" usebox="none">
24728 \begin_layout Plain Layout
24736 <cell alignment="left" valignment="top" usebox="none">
24739 \begin_layout Plain Layout
24745 <cell alignment="left" valignment="top" usebox="none">
24748 \begin_layout Plain Layout
24754 <cell alignment="left" valignment="top" usebox="none">
24757 \begin_layout Plain Layout
24763 <cell alignment="left" valignment="top" usebox="none">
24766 \begin_layout Plain Layout
24772 <cell alignment="center" valignment="top" usebox="none">
24775 \begin_layout Plain Layout
24781 <cell alignment="center" valignment="top" usebox="none">
24784 \begin_layout Plain Layout
24790 <cell alignment="center" valignment="top" usebox="none">
24793 \begin_layout Plain Layout
24799 <cell alignment="center" valignment="top" usebox="none">
24802 \begin_layout Plain Layout
24810 <cell alignment="left" valignment="top" usebox="none">
24813 \begin_layout Plain Layout
24819 <cell alignment="left" valignment="top" usebox="none">
24822 \begin_layout Plain Layout
24828 <cell alignment="left" valignment="top" usebox="none">
24831 \begin_layout Plain Layout
24837 <cell alignment="left" valignment="top" usebox="none">
24840 \begin_layout Plain Layout
24846 <cell alignment="center" valignment="top" usebox="none">
24849 \begin_layout Plain Layout
24855 <cell alignment="center" valignment="top" usebox="none">
24858 \begin_layout Plain Layout
24864 <cell alignment="center" valignment="top" usebox="none">
24867 \begin_layout Plain Layout
24873 <cell alignment="center" valignment="top" usebox="none">
24876 \begin_layout Plain Layout
24884 <cell alignment="left" valignment="top" usebox="none">
24887 \begin_layout Plain Layout
24893 <cell alignment="left" valignment="top" usebox="none">
24896 \begin_layout Plain Layout
24902 <cell alignment="left" valignment="top" usebox="none">
24905 \begin_layout Plain Layout
24911 <cell alignment="left" valignment="top" usebox="none">
24914 \begin_layout Plain Layout
24920 <cell alignment="center" valignment="top" usebox="none">
24923 \begin_layout Plain Layout
24929 <cell alignment="center" valignment="top" usebox="none">
24932 \begin_layout Plain Layout
24938 <cell alignment="center" valignment="top" usebox="none">
24941 \begin_layout Plain Layout
24947 <cell alignment="center" valignment="top" usebox="none">
24950 \begin_layout Plain Layout
24958 <cell alignment="left" valignment="top" usebox="none">
24961 \begin_layout Plain Layout
24967 <cell alignment="left" valignment="top" usebox="none">
24970 \begin_layout Plain Layout
24976 <cell alignment="left" valignment="top" usebox="none">
24979 \begin_layout Plain Layout
24985 <cell alignment="left" valignment="top" usebox="none">
24988 \begin_layout Plain Layout
24994 <cell alignment="center" valignment="top" usebox="none">
24997 \begin_layout Plain Layout
25003 <cell alignment="center" valignment="top" usebox="none">
25006 \begin_layout Plain Layout
25012 <cell alignment="center" valignment="top" usebox="none">
25015 \begin_layout Plain Layout
25021 <cell alignment="center" valignment="top" usebox="none">
25024 \begin_layout Plain Layout
25032 <cell alignment="center" valignment="top" usebox="none">
25035 \begin_layout Plain Layout
25041 <cell alignment="center" valignment="top" usebox="none">
25044 \begin_layout Plain Layout
25050 <cell alignment="center" valignment="top" usebox="none">
25053 \begin_layout Plain Layout
25059 <cell alignment="center" valignment="top" usebox="none">
25062 \begin_layout Plain Layout
25068 <cell alignment="center" valignment="top" usebox="none">
25071 \begin_layout Plain Layout
25077 <cell alignment="center" valignment="top" usebox="none">
25080 \begin_layout Plain Layout
25086 <cell alignment="center" valignment="top" usebox="none">
25089 \begin_layout Plain Layout
25095 <cell alignment="center" valignment="top" usebox="none">
25098 \begin_layout Plain Layout
25112 \begin_layout Chapter
25113 Names of available colors to be used in layouts
25114 \begin_inset CommandInset label
25116 name "chap:Names-of-colors"
25123 \begin_layout Standard
25124 The colors listed here are the standard colors and the those that you can
25125 adjust in the \SpecialChar LyX
25129 \begin_layout Description
25142 No particular color – clear or default
25145 \begin_layout Description
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
25178 added_space Added space marker color
25181 \begin_layout Description
25182 addedtext Added text color
25185 \begin_layout Description
25186 appendix Appendix marker color
25189 \begin_layout Description
25190 background Background color
25193 \begin_layout Description
25194 bottomarea Bottom area color
25197 \begin_layout Description
25198 branchlabel Label color for branches
25201 \begin_layout Description
25202 buttonbg Color used for bottom background
25205 \begin_layout Description
25206 buttonhoverbg Color used for button background under focus
25209 \begin_layout Description
25210 buttonframe Color for inset button frames
25213 \begin_layout Description
25214 changebar Changebar color
25217 \begin_layout Description
25218 changedtextauthor1 Changed text color author 1
25221 \begin_layout Description
25222 changedtextauthor2 Changed text color author 2
25225 \begin_layout Description
25226 changedtextauthor3 Changed text color author 3
25229 \begin_layout Description
25230 changedtextauthor4 Changed text color author 4
25233 \begin_layout Description
25234 changedtextauthor5 Changed text color author 5
25237 \begin_layout Description
25238 collapsable_inset_frame Collapsable insets framecolor
25241 \begin_layout Description
25242 collapsable_inset_text Collapsable insets text color
25245 \begin_layout Description
25246 command Text color for command insets
25249 \begin_layout Description
25250 commandbg Background color for command insets
25253 \begin_layout Description
25254 commandframe Frame color for command insets
25257 \begin_layout Description
25258 comment color for comments
25261 \begin_layout Description
25262 commentbg Background color of comments
25265 \begin_layout Description
25266 cursor Cursor color
25269 \begin_layout Description
25270 deletedtext Deleted text color
25273 \begin_layout Description
25274 deletedtextmodifier Deleted text modifying color
25277 \begin_layout Description
25278 depthbar Color for the depth bars in the margin
25281 \begin_layout Description
25282 eolmarker End of line marker color
25285 \begin_layout Description
25286 error Color of the \SpecialChar LaTeX
25290 \begin_layout Description
25291 footlabel Label color for footnotes
25294 \begin_layout Description
25295 graphicsbg Graphics inset background color
25298 \begin_layout Description
25299 greyedout Label color for greyedout insets
25302 \begin_layout Description
25303 greyedoutbg Background color of greyedout inset
25306 \begin_layout Description
25307 greyedouttext Color for greyedout inset text
25310 \begin_layout Description
25311 indexlabel Label color for index insets
25314 \begin_layout Description
25315 ignore The color is ignored
25318 \begin_layout Description
25319 inherit The color is inherited
25322 \begin_layout Description
25323 inlinecompletion Inline completion color
25326 \begin_layout Description
25327 insetbg Inset marker background color
25330 \begin_layout Description
25331 insetframe Inset marker frame color
25334 \begin_layout Description
25335 language Color for marking foreign language words
25338 \begin_layout Description
25339 latex Text color in \SpecialChar LaTeX
25343 \begin_layout Description
25344 listingsbg Background color of listings inset
25347 \begin_layout Description
25348 marginlabel Label color for margin notes
25351 \begin_layout Description
25352 math Math inset text color
25355 \begin_layout Description
25356 mathbg Math inset background color
25359 \begin_layout Description
25360 mathcorners Math inset frame color not under focus
25363 \begin_layout Description
25364 mathframe Math inset frame color under focus
25367 \begin_layout Description
25368 mathline Math line color
25371 \begin_layout Description
25372 mathmacrobg Macro math inset background color
25375 \begin_layout Description
25376 mathmacroblend Macro math blended color
25379 \begin_layout Description
25380 mathmacroframe Macro math frame color
25383 \begin_layout Description
25384 mathmacrohoverbg Macro math inset background color hovered
25387 \begin_layout Description
25388 mathmacrolabel Macro math label color
25391 \begin_layout Description
25392 mathmacronewarg Macro template color for new parameters
25395 \begin_layout Description
25396 mathmacrooldarg Macro template color for old parameters
25399 \begin_layout Description
25400 newpage New page color
25403 \begin_layout Description
25404 nonunique_inlinecompletion Inline completion color for the non-unique part
25407 \begin_layout Description
25408 notebg Background color of notes
25411 \begin_layout Description
25412 notelabel Label color for notes
25415 \begin_layout Description
25416 pagebreak Page break/line break color
25419 \begin_layout Description
25420 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25423 \begin_layout Description
25424 phantomtext Text color for phantom insets
25427 \begin_layout Description
25428 preview The color used for previews
25431 \begin_layout Description
25432 previewframe Preview frame color
25435 \begin_layout Description
25436 regexpframe Color for regexp frame
25439 \begin_layout Description
25440 selection Background color of selected text
25443 \begin_layout Description
25444 selectiontext Foreground color of selected text
25447 \begin_layout Description
25448 shadedbg Background color of shaded box
25451 \begin_layout Description
25452 special Special chars text color
25455 \begin_layout Description
25456 tabularline Table line color
25459 \begin_layout Description
25460 tabularonoffline Table line color
25463 \begin_layout Description
25464 urllabel Label color for URL insets
25467 \begin_layout Description
25468 urltext Color for URL inset text