1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \origin /home/jspitz/lyx/lyx-devel/lib/doc/
8 % DO NOT ALTER THIS PREAMBLE!!!
10 % This preamble is designed to ensure that this document prints
11 % out as advertised. If you mess with this preamble,
12 % parts of this document may not print out as expected. If you
13 % have problems LaTeXing this file, please contact
14 % the documentation team
15 % email: lyx-docs@lists.lyx.org
17 \usepackage{ifpdf} % part of the hyperref bundle
18 \ifpdf % if pdflatex is used
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC is numbered roman
27 % and a pdf-bookmark for the TOC is added
28 \let\myTOC\tableofcontents
29 \renewcommand\tableofcontents{%
31 \pdfbookmark[1]{\contentsname}{}
35 % increase link area for cross-references and autoname them,
36 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
37 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
38 \addto\extrasenglish{%
39 \renewcommand*{\equationautorefname}[1]{}%
40 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
41 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
42 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
45 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
46 \use_default_options false
50 \maintain_unincluded_children false
53 InsetLayout Flex:MenuItem
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
65 # In case we need to do with sans...
66 #InsetLayout CharStyle:Code
71 #\renewcommand{\code}[1]{{\sffamily #1}}
76 \language_package default
81 \font_typewriter default
83 \font_default_family default
84 \use_non_tex_fonts false
90 \default_output_format default
92 \bibtex_command default
93 \index_command default
97 \pdf_title "LyX Configuration Manual"
98 \pdf_author "LyX Team"
99 \pdf_subject "LyX-documentation Customization"
100 \pdf_keywords "LyX, documentation, customization"
102 \pdf_bookmarksnumbered true
103 \pdf_bookmarksopen true
104 \pdf_bookmarksopenlevel 1
105 \pdf_breaklinks false
109 \pdf_pdfusetitle false
110 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
113 \use_package amsmath 0
114 \use_package amssymb 0
115 \use_package cancel 0
117 \use_package mathdots 1
118 \use_package mathtools 0
119 \use_package mhchem 0
120 \use_package stackrel 0
121 \use_package stmaryrd 0
122 \use_package undertilde 0
124 \cite_engine_type default
128 \paperorientation portrait
143 \paragraph_separation indent
144 \paragraph_indentation default
145 \quotes_language english
148 \paperpagestyle headings
149 \tracking_changes true
150 \output_changes false
154 \author -712698321 "Jürgen Spitzmüller"
155 \author -195340706 "Georg Baum"
156 \author 155139281 "Jrgen Spitzmller"
157 \author 274215730 "scott"
163 Customizing \SpecialChar LyX
164 : Features for the Advanced User
168 by the \SpecialChar LyX
173 \begin_layout Plain Layout
175 If you have comments or error corrections, please send them to the \SpecialChar LyX
178 \begin_inset CommandInset href
180 target "lyx-docs@lists.lyx.org"
187 \begin_inset Quotes eld
191 \begin_inset Quotes erd
194 in the subject header, and please cc the current maintainer of this file,
195 Richard Heck <rgheck@comcast.net>.
201 \begin_inset Newline newline
205 \begin_inset Newline newline
211 \begin_layout Standard
212 \begin_inset CommandInset toc
213 LatexCommand tableofcontents
220 \begin_layout Standard
221 \begin_inset Note Note
224 \begin_layout Plain Layout
225 Please use change tracking when modifying this document.
226 This makes it easier for our translators to recognize things that have
227 been changed, and it helps the maintainer keep up-to-date with what's been
236 \begin_layout Chapter
240 \begin_layout Standard
241 This manual covers the customization features present in \SpecialChar LyX
243 In it, we discuss issues like keyboard shortcuts, screen previewing options,
244 printer options, sending commands to \SpecialChar LyX
245 via the \SpecialChar LyX
246 Server, internationalization,
247 installing new \SpecialChar LaTeX
248 classes and \SpecialChar LyX
250 We can't possibly hope to touch on everything you can change—our developers
251 add new features faster than we can document them—but we will explain the
252 most common customizations and hopefully point you in the right direction
253 for some of the more obscure ones.
256 \begin_layout Standard
257 \begin_inset Branch OutDated
260 \begin_layout Standard
261 Information from previous versions of this document that now seems to be
262 outdated is contained in the OutDated branch of this document.
263 By default, this information will not appear in the \SpecialChar LaTeX
272 \begin_layout Chapter
277 \begin_layout Standard
278 This chapter aims to help you to find your way through the \SpecialChar LyX
281 Before continuing to read this chapter, you should find out where your
283 library and user directories are by using
284 \begin_inset Flex MenuItem
287 \begin_layout Plain Layout
288 Help\SpecialChar menuseparator
300 The library directory is the place where \SpecialChar LyX
301 places its system-wide configuration
302 files; the user directory is where you can place your modified versions.
303 We will call the former
304 \begin_inset Flex Code
307 \begin_layout Plain Layout
315 \begin_inset Flex MenuItem
318 \begin_layout Plain Layout
324 in the remainder of this document.
328 \begin_layout Section
330 \begin_inset Flex Code
333 \begin_layout Plain Layout
343 \begin_layout Standard
344 \begin_inset Flex Code
347 \begin_layout Plain Layout
354 and its sub-directories contain a number of files and that can be used
355 to customize \SpecialChar LyX
357 You can change many of these files from within \SpecialChar LyX
359 \begin_inset Flex MenuItem
362 \begin_layout Plain Layout
363 Tools\SpecialChar menuseparator
370 Most customization that you will want to do in \SpecialChar LyX
371 is possible through this
373 However, many other inner aspects of \SpecialChar LyX
374 can be customized by modifying the
376 \begin_inset Flex Code
379 \begin_layout Plain Layout
387 These files fall in different categories, described in the following subsection
391 \begin_layout Subsection
392 Automatically generated files
395 \begin_layout Standard
396 The files, which are to be found in
397 \begin_inset Flex MenuItem
400 \begin_layout Plain Layout
406 , are generated when you configure \SpecialChar LyX
408 They contain various default values that are guessed by inspection.
409 In general, it is not a good idea to modify them, since they might be overwritt
413 \begin_layout Labeling
414 \labelwidthstring 00.00.0000
415 \begin_inset Flex Code
418 \begin_layout Plain Layout
424 contains defaults for various commands.
427 \begin_layout Labeling
428 \labelwidthstring 00.00.0000
429 \begin_inset Flex Code
432 \begin_layout Plain Layout
438 contains the list of packages that have been recognized by \SpecialChar LyX
440 It is currently unused by the \SpecialChar LyX
441 program itself, but the information extracted,
442 and more, is made available with
443 \begin_inset Flex MenuItem
446 \begin_layout Plain Layout
447 Help\SpecialChar menuseparator
461 \begin_layout Labeling
462 \labelwidthstring 00.00.0000
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
472 the list of text classes that have been found in your
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 directories, along with the associated \SpecialChar LaTeX
483 document class and their description.
486 \begin_layout Labeling
487 \labelwidthstring 00.00.0000
488 \begin_inset Flex Code
491 \begin_layout Plain Layout
497 the list of layout modules found in your
498 \begin_inset Flex Code
501 \begin_layout Plain Layout
510 \begin_layout Labeling
511 \labelwidthstring 00.00.0000
512 \begin_inset Flex Code
515 \begin_layout Plain Layout
521 lists of various sorts of \SpecialChar LaTeX
522 -related files found on your system
525 \begin_layout Labeling
526 \labelwidthstring 00.00.0000
527 \begin_inset Flex Code
530 \begin_layout Plain Layout
531 doc/\SpecialChar LaTeX
537 is automatically generated during configuration from the file
538 \begin_inset Flex Code
541 \begin_layout Plain Layout
549 It contains information on your \SpecialChar LaTeX
553 \begin_layout Subsection
557 \begin_layout Standard
558 These directories are duplicated between
559 \begin_inset Flex Code
562 \begin_layout Plain Layout
570 \begin_inset Flex Code
573 \begin_layout Plain Layout
580 If a particular files exists in both places, the one in
581 \begin_inset Flex Code
584 \begin_layout Plain Layout
593 \begin_layout Labeling
594 \labelwidthstring 00.00.0000
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
604 this directory contains files with the extension
605 \begin_inset Flex Code
608 \begin_layout Plain Layout
614 that define the keybindings used in \SpecialChar LyX
616 If there exists an internationalized version of the bind file named
617 \begin_inset Flex Code
620 \begin_layout Plain Layout
626 , that will be used first.
629 \begin_layout Labeling
630 \labelwidthstring 00.00.0000
631 \begin_inset Flex Code
634 \begin_layout Plain Layout
640 contains graphics files that can be included in documents.
644 \begin_layout Labeling
645 \labelwidthstring 00.00.0000
646 \begin_inset Flex Code
649 \begin_layout Plain Layout
655 contains \SpecialChar LyX
656 documentation files (including the one you are currently reading).
658 \begin_inset Flex Code
661 \begin_layout Plain Layout
668 deserves special attention, as noted above.
669 The internationalized help docs are in subdirectories
670 \begin_inset Flex Code
673 \begin_layout Plain Layout
680 \begin_inset Quotes eld
684 \begin_inset Quotes erd
687 is the ISO language code.
689 \begin_inset CommandInset ref
691 reference "cha:Internationalizing-LyX"
698 \begin_layout Labeling
699 \labelwidthstring 00.00.0000
700 \begin_inset Flex Code
703 \begin_layout Plain Layout
709 contains example files that explain how to use some features.
710 In the file browser, press the
711 \begin_inset Flex MenuItem
714 \begin_layout Plain Layout
723 \begin_layout Labeling
724 \labelwidthstring 00.00.0000
725 \begin_inset Flex Code
728 \begin_layout Plain Layout
734 contains image files that are used by the
735 \begin_inset Flex MenuItem
738 \begin_layout Plain Layout
745 In addition, it also contains the individual icons used in the toolbar
746 and the banners that can be shown when \SpecialChar LyX
750 \begin_layout Labeling
751 \labelwidthstring 00.00.0000
752 \begin_inset Flex Code
755 \begin_layout Plain Layout
761 contains keyboard keymapping files.
763 \begin_inset CommandInset ref
765 reference "sec:International-Keymap-Stuff"
772 \begin_layout Labeling
773 \labelwidthstring 00.00.0000
774 \begin_inset Flex Code
777 \begin_layout Plain Layout
783 contains the text class and module files described in
784 \begin_inset CommandInset ref
786 reference "cha:Installing-New-Document"
793 \begin_layout Labeling
794 \labelwidthstring 00.00.0000
795 \begin_inset Flex Code
798 \begin_layout Plain Layout
805 \begin_inset Flex Code
808 \begin_layout Plain Layout
814 Python scripts used to convert between \SpecialChar LyX
816 These can be run from the command line if, say, you want to batch-convert
820 \begin_layout Labeling
821 \labelwidthstring 00.00.0000
822 \begin_inset Flex Code
825 \begin_layout Plain Layout
831 contains some files that demonstrate the capabilities of the
832 \begin_inset Flex MenuItem
835 \begin_layout Plain Layout
846 Also contains some scripts used by \SpecialChar LyX
850 \begin_layout Labeling
851 \labelwidthstring 00.00.0000
852 \begin_inset Flex Code
855 \begin_layout Plain Layout
861 contains the standard \SpecialChar LyX
862 template files described in
863 \begin_inset CommandInset ref
865 reference "sub:Creating-Templates"
872 \begin_layout Labeling
873 \labelwidthstring 00.00.0000
874 \begin_inset Flex Code
877 \begin_layout Plain Layout
883 contains files with the extension
884 \begin_inset Flex Code
887 \begin_layout Plain Layout
893 that define the user interface to \SpecialChar LyX
895 That is, the files define which items appear in which menus and the items
896 appearing on the toolbar.
899 \begin_layout Subsection
900 Files you don't want to modify
903 \begin_layout Standard
904 These files are used internally by \SpecialChar LyX
905 and you generally do not need to modify
906 them unless you are a developer.
909 \begin_layout Labeling
910 \labelwidthstring 00.00.0000
911 \begin_inset Flex Code
914 \begin_layout Plain Layout
920 this file contains the list of \SpecialChar LyX
922 The contents are displayed with the menu entry
923 \begin_inset Flex MenuItem
926 \begin_layout Plain Layout
927 Help\SpecialChar menuseparator
941 \begin_layout Labeling
942 \labelwidthstring 00.00.0000
943 \begin_inset Flex Code
946 \begin_layout Plain Layout
952 this is a \SpecialChar LaTeX
953 script used during the configuration process.
957 \begin_layout Labeling
958 \labelwidthstring 00.00.0000
959 \begin_inset Flex Code
962 \begin_layout Plain Layout
968 this is a Python script that is used to re-configure \SpecialChar LyX
970 It creates configuration files in the directory it was run from.
973 \begin_layout Subsection
974 Other files needing a line or two
977 \begin_layout Labeling
978 \labelwidthstring 00.00.0000
979 \begin_inset Flex Code
982 \begin_layout Plain Layout
988 this contains tables describing how different character encodings can be
992 \begin_layout Labeling
993 \labelwidthstring 00.00.0000
994 \begin_inset Flex Code
997 \begin_layout Plain Layout
1003 this file contains the templates available to the new
1004 \begin_inset Flex MenuItem
1007 \begin_layout Plain Layout
1009 \begin_inset space ~
1018 \begin_inset CommandInset ref
1020 reference "chap:Including-External-Material"
1027 \begin_layout Labeling
1028 \labelwidthstring 00.00.0000
1029 \begin_inset Flex Code
1032 \begin_layout Plain Layout
1038 this file contains a list of all the languages currently supported by \SpecialChar LyX
1042 \begin_layout Labeling
1043 \labelwidthstring 00.00.0000
1044 \begin_inset Flex Code
1047 \begin_layout Plain Layout
1053 contains information about the supported fonts.
1056 \begin_layout Labeling
1057 \labelwidthstring 00.00.0000
1058 \begin_inset Flex Code
1061 \begin_layout Plain Layout
1067 this file contains translations for internationalized paragraph styles
1069 \begin_inset CommandInset ref
1071 reference "sub:I18n"
1078 \begin_layout Labeling
1079 \labelwidthstring 00.00.0000
1080 \begin_inset Flex Code
1083 \begin_layout Plain Layout
1089 this file contains information about unicode-encoded glyphs and the way
1090 they are supported by \SpecialChar LyX
1091 via \SpecialChar LaTeX
1095 \begin_layout Section
1096 Your local configuration directory
1099 \begin_layout Standard
1100 Even if you are using \SpecialChar LyX
1101 as an unprivileged user, you might want to change
1103 configuration for your own use.
1105 \begin_inset Flex Code
1108 \begin_layout Plain Layout
1114 directory contains all your personal configuration files.
1115 This is the directory described as
1116 \begin_inset Quotes eld
1120 \begin_inset Quotes erd
1124 \begin_inset Flex MenuItem
1127 \begin_layout Plain Layout
1128 Help\SpecialChar menuseparator
1130 \begin_inset space ~
1140 This directory is used as a mirror of
1141 \begin_inset Flex Code
1144 \begin_layout Plain Layout
1151 , which means that every file in
1152 \begin_inset Flex Code
1155 \begin_layout Plain Layout
1161 is a replacement for the corresponding file in
1162 \begin_inset Flex Code
1165 \begin_layout Plain Layout
1173 Any configuration file described in the above sections can be placed either
1174 in the system-wide directory, in which case it will affect all users, or
1175 in your local directory for your own use.
1178 \begin_layout Standard
1179 To make things clearer, let's provide a few examples:
1182 \begin_layout Itemize
1183 The preferences set in the
1184 \begin_inset Flex MenuItem
1187 \begin_layout Plain Layout
1188 Tools\SpecialChar menuseparator
1194 dialog are saved to a file
1195 \begin_inset Flex Code
1198 \begin_layout Plain Layout
1205 \begin_inset Flex Code
1208 \begin_layout Plain Layout
1217 \begin_layout Itemize
1218 When you reconfigure using
1219 \begin_inset Flex MenuItem
1222 \begin_layout Plain Layout
1223 Tools\SpecialChar menuseparator
1231 \begin_inset Flex Code
1234 \begin_layout Plain Layout
1240 script, and the resulting files are written in your local configuration
1242 This means that any additional text class file that you might have added
1244 \begin_inset Flex Code
1247 \begin_layout Plain Layout
1253 will be added to the list of classes in the
1254 \begin_inset Flex MenuItem
1257 \begin_layout Plain Layout
1258 Document\SpecialChar menuseparator
1267 \begin_layout Itemize
1268 If you get some updated documentation from \SpecialChar LyX
1269 ftp site and cannot install
1270 it because you do not have sysadmin rights on your system, you can just
1272 \begin_inset Flex Code
1275 \begin_layout Plain Layout
1281 and the items in the
1282 \begin_inset Flex MenuItem
1285 \begin_layout Plain Layout
1291 menu will open them!
1294 \begin_layout Section
1295 Running \SpecialChar LyX
1296 with multiple configurations
1299 \begin_layout Standard
1300 The configuration freedom of the local configuration directory may not suffice
1301 if you want to have more than one configuration at your disposal.
1302 For example, you may want to be use different key bindings or printer settings
1304 You can achieve this by having several such directories.
1305 You then specify which directory to use at run-time.
1308 \begin_layout Standard
1309 Invoking \SpecialChar LyX
1310 with the command line switch
1311 \begin_inset Flex Code
1314 \begin_layout Plain Layout
1324 instructs the program to read the configuration from that directory, and
1325 not from the default directory.
1326 (You can determine the default directory by running \SpecialChar LyX
1328 \begin_inset Flex Code
1331 \begin_layout Plain Layout
1337 switch.) If the specified directory does not exist, \SpecialChar LyX
1339 for you, just like it does for the default directory on the first time
1340 you run the program.
1341 You can modify the configuration options in this additional user directory
1342 exactly as you would for the default directory.
1343 These directories are completely independent (but read on).
1344 Note that setting the environment variable
1345 \begin_inset Flex Code
1348 \begin_layout Plain Layout
1354 to some value has exactly the same effect.
1357 \begin_layout Standard
1358 Having several configurations also requires more maintenance: if you want
1359 to add a new layout to
1360 \begin_inset Flex Code
1363 \begin_layout Plain Layout
1369 which you want available from all your configurations, you must add it
1370 to each directory separately.
1371 You can avoid this with the following trick: after \SpecialChar LyX
1372 creates the additional
1373 directory, most of the subdirectories (see above) are empty.
1374 If you want the new configuration to mirror an existing one, replace the
1375 empty subdirectory with a symbolic link to the matching subdirectory in
1376 the existing configuration.
1378 \begin_inset Flex Code
1381 \begin_layout Plain Layout
1387 subdirectory, however, since it contains a file written by the configuration
1388 script (also accessible through
1389 \begin_inset Flex MenuItem
1392 \begin_layout Plain Layout
1393 Tools\SpecialChar menuseparator
1399 ) which is configuration-specific.
1402 \begin_layout Chapter
1403 The Preferences dialog
1406 \begin_layout Standard
1407 All options of the preferences dialog are described in the Appendix
1409 The Preferences Dialog
1416 For some options you might find here more details.
1419 \begin_layout Section
1421 \begin_inset CommandInset label
1430 \begin_layout Standard
1431 The first step is to define your file formats if they are not already defined.
1433 \begin_inset Flex MenuItem
1436 \begin_layout Plain Layout
1437 Tools\SpecialChar menuseparator
1445 \begin_inset Flex MenuItem
1448 \begin_layout Plain Layout
1449 File Handling\SpecialChar menuseparator
1456 \begin_inset Flex MenuItem
1459 \begin_layout Plain Layout
1465 button to define your new format.
1467 \begin_inset Flex MenuItem
1470 \begin_layout Plain Layout
1476 field contains the name used to identify the format in the GUI.
1478 \begin_inset Flex MenuItem
1481 \begin_layout Plain Layout
1487 is used to identify the format internally.
1488 You will also need to enter a file extension.
1489 These are all required.
1491 \begin_inset Flex MenuItem
1494 \begin_layout Plain Layout
1500 field is used to provide a keyboard shortcut on the menus.
1501 (For example, pressing
1502 \begin_inset Flex MenuItem
1505 \begin_layout Plain Layout
1512 \begin_inset Flex MenuItem
1515 \begin_layout Plain Layout
1516 Document\SpecialChar menuseparator
1517 View (Other Formats)\SpecialChar menuseparator
1526 \begin_layout Standard
1528 \begin_inset Flex MenuItem
1531 \begin_layout Plain Layout
1538 \begin_inset Flex MenuItem
1541 \begin_layout Plain Layout
1548 For example, you might want to use
1549 \begin_inset Flex MenuItem
1552 \begin_layout Plain Layout
1558 to view PostScript files.
1559 You can enter the command needed to start the program in the corresponding
1561 In defining this command, you can use the four variables listed in the
1563 The viewer is launched when you view an image in \SpecialChar LyX
1565 \begin_inset Flex MenuItem
1568 \begin_layout Plain Layout
1569 Document\SpecialChar menuseparator
1576 The editor is for example launched when you right-click on an image and
1578 \begin_inset Flex MenuItem
1581 \begin_layout Plain Layout
1587 in the appearing context menu.
1590 \begin_layout Standard
1592 \begin_inset Flex MenuItem
1595 \begin_layout Plain Layout
1601 type of a format is optional, but if it is specified, it must be unique
1603 It is used to detect files of this format from the file contents.
1604 For some important file formats there is no MIME type officially registered
1606 \begin_inset CommandInset href
1609 target "http://www.iana.org/assignments/media-types/"
1614 Therefore \SpecialChar LyX
1615 uses the extended list of MIME types as specified by
1616 \begin_inset CommandInset href
1618 name "freedesktop.org"
1619 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1626 \begin_layout Standard
1628 \begin_inset Flex MenuItem
1631 \begin_layout Plain Layout
1637 option tells \SpecialChar LyX
1638 that a format is suitable for document export.
1639 If this is set and if a suitable conversion route exists (see
1640 \begin_inset CommandInset ref
1642 reference "sec:Converters"
1646 ), the format will appear in the
1647 \begin_inset Flex MenuItem
1650 \begin_layout Plain Layout
1651 File\SpecialChar menuseparator
1658 The format will also appear in the
1659 \begin_inset Flex MenuItem
1662 \begin_layout Plain Layout
1663 Document\SpecialChar menuseparator
1669 menu if a viewer is specified for the format.
1670 Pure image formats, such as
1671 \begin_inset Flex Code
1674 \begin_layout Plain Layout
1680 , should not use this option.
1681 Formats that can both represent vector graphics and documents like
1682 \begin_inset Flex Code
1685 \begin_layout Plain Layout
1694 \begin_layout Standard
1696 \begin_inset Flex MenuItem
1699 \begin_layout Plain Layout
1700 Vector graphics format
1705 tells \SpecialChar LyX
1706 that a format can contain vector graphics.
1707 This information is used to determine the target format of included graphics
1709 \begin_inset Flex MenuItem
1712 \begin_layout Plain Layout
1719 Included graphics may need to be converted to either
1720 \begin_inset Flex MenuItem
1723 \begin_layout Plain Layout
1730 \begin_inset Flex MenuItem
1733 \begin_layout Plain Layout
1740 \begin_inset Flex MenuItem
1743 \begin_layout Plain Layout
1750 \begin_inset Flex MenuItem
1753 \begin_layout Plain Layout
1759 cannot handle other image formats.
1760 If an included graphic is not already in
1761 \begin_inset Flex MenuItem
1764 \begin_layout Plain Layout
1771 \begin_inset Flex MenuItem
1774 \begin_layout Plain Layout
1781 \begin_inset Flex MenuItem
1784 \begin_layout Plain Layout
1790 format, it is converted to
1791 \begin_inset Flex MenuItem
1794 \begin_layout Plain Layout
1800 if the vector format option is set, and otherwise to
1801 \begin_inset Flex MenuItem
1804 \begin_layout Plain Layout
1813 \begin_layout Section
1817 \begin_layout Standard
1818 Since all conversions from one format to another take place in \SpecialChar LyX
1820 directory, it is sometimes necessary to modify a file before copying it
1821 to the temporary directory in order that the conversion may be performed.
1825 \begin_layout Plain Layout
1826 For example, the file may refer to other files—images, for example—using
1827 relative file names, and these may become invalid when the file is copied
1828 to the temporary directory.
1833 This is done by a Copier: It copies a file to (or from) the temporary directory
1834 and may modify it in the process.
1837 \begin_layout Standard
1838 The definitions of the copiers may use four variables:
1841 \begin_layout Labeling
1842 \labelwidthstring 00.00.0000
1843 \begin_inset Flex Code
1846 \begin_layout Plain Layout
1852 The \SpecialChar LyX
1853 system directory (e.
1854 \begin_inset space \thinspace{}
1858 \begin_inset space \space{}
1862 \begin_inset Flex MenuItem
1865 \begin_layout Plain Layout
1874 \begin_layout Labeling
1875 \labelwidthstring 00.00.0000
1876 \begin_inset Flex Code
1879 \begin_layout Plain Layout
1888 \begin_layout Labeling
1889 \labelwidthstring 00.00.0000
1890 \begin_inset Flex Code
1893 \begin_layout Plain Layout
1902 \begin_layout Labeling
1903 \labelwidthstring 00.00.0000
1904 \begin_inset Flex Code
1907 \begin_layout Plain Layout
1913 The base name (without filename extension) in the \SpecialChar LyX
1917 \begin_layout Labeling
1918 \labelwidthstring 00.00.0000
1919 \begin_inset Flex Code
1922 \begin_layout Plain Layout
1928 The full directory path of the \SpecialChar LyX
1932 \begin_layout Labeling
1933 \labelwidthstring 00.00.0000
1934 \begin_inset Flex Code
1937 \begin_layout Plain Layout
1943 The full pathname to the original \SpecialChar LyX
1944 file being processed
1947 \begin_layout Labeling
1948 \labelwidthstring 00.00.0000
1949 \begin_inset Flex Code
1952 \begin_layout Plain Layout
1958 The filename (without any directory path) of the \SpecialChar LyX
1962 \begin_layout Labeling
1963 \labelwidthstring 00.00.0000
1964 \begin_inset Flex Code
1967 \begin_layout Plain Layout
1973 The `\SpecialChar LaTeX
1977 \begin_layout Standard
1978 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1986 It is relevant only when exporting files suitable for such inclusion.
1989 \begin_layout Standard
1990 Copiers can be used to do almost anything with output files.
1991 For example, suppose you want generated pdf files to be copied to a special
1993 \begin_inset Flex Code
1996 \begin_layout Plain Layout
2003 Then you could write a shell script such as this one:
2006 \begin_layout Standard
2007 \begin_inset listings
2011 \begin_layout Plain Layout
2016 \begin_layout Plain Layout
2021 \begin_layout Plain Layout
2023 TOFILE=`basename $2`
2026 \begin_layout Plain Layout
2028 cp $FROMFILE /home/you/pdf/$TOFILE
2033 Save it in your local \SpecialChar LyX
2035 \begin_inset Flex Code
2038 \begin_layout Plain Layout
2039 /home/you/.lyx/scripts/pdfcopier.sh
2044 —and make it executable, if you need to do so on your platform.
2046 \begin_inset Flex MenuItem
2049 \begin_layout Plain Layout
2050 Tools\SpecialChar menuseparator
2056 dialog, select under
2057 \begin_inset Flex MenuItem
2060 \begin_layout Plain Layout
2061 File Handling\SpecialChar menuseparator
2068 \begin_inset Flex MenuItem
2071 \begin_layout Plain Layout
2077 format—or one of the other pdf formats—and enter
2078 \begin_inset Flex Code
2081 \begin_layout Plain Layout
2082 pdfcopier.sh $$i $$o
2088 \begin_inset Flex MenuItem
2091 \begin_layout Plain Layout
2101 \begin_layout Standard
2102 Copiers are used by \SpecialChar LyX
2103 in various of its own conversions.
2104 For example, if appropriate programs are found, \SpecialChar LyX
2105 will automatically install
2107 \begin_inset Flex MenuItem
2110 \begin_layout Plain Layout
2117 \begin_inset Flex MenuItem
2120 \begin_layout Plain Layout
2122 \begin_inset space ~
2131 When these formats are exported, the copier sees that not just the main
2132 HTML file but various associated files (style files, images, etc.) are also
2134 All these files are written to a subdirectory of the directory in which
2135 the original \SpecialChar LyX
2140 \begin_layout Plain Layout
2141 This copier can be customized.
2143 \begin_inset Quotes eld
2147 \begin_inset Quotes erd
2150 argument takes a comma-separated list of extensions to be copied; if it
2151 is omitted, all files will be copied.
2153 \begin_inset Quotes eld
2157 \begin_inset Quotes erd
2160 argument determines the extension added to the generated directory.
2162 \begin_inset Quotes eld
2166 \begin_inset Flex MenuItem
2169 \begin_layout Plain Layout
2177 \begin_inset Quotes erd
2180 , so HTML generated from
2181 \begin_inset Flex MenuItem
2184 \begin_layout Plain Layout
2185 /path/to/filename.lyx
2191 \begin_inset Flex MenuItem
2194 \begin_layout Plain Layout
2195 /path/to/filename.html.\SpecialChar LyX
2210 \begin_layout Section
2212 \begin_inset CommandInset label
2214 name "sec:Converters"
2221 \begin_layout Standard
2222 You can define your own Converters to convert files between different formats.
2224 \begin_inset Flex MenuItem
2227 \begin_layout Plain Layout
2228 Tools\SpecialChar menuseparator
2229 Preferences\SpecialChar menuseparator
2230 File Handling\SpecialChar menuseparator
2239 \begin_layout Standard
2240 To define a new converter, select the
2241 \begin_inset Flex MenuItem
2244 \begin_layout Plain Layout
2246 \begin_inset space ~
2255 \begin_inset Flex MenuItem
2258 \begin_layout Plain Layout
2260 \begin_inset space ~
2268 from the drop-down lists, enter the command needed for the conversion,
2270 \begin_inset Flex MenuItem
2273 \begin_layout Plain Layout
2280 Several variables can be used in the definition of converters:
2283 \begin_layout Labeling
2284 \labelwidthstring 00.00.0000
2285 \begin_inset Flex Code
2288 \begin_layout Plain Layout
2294 The \SpecialChar LyX
2298 \begin_layout Labeling
2299 \labelwidthstring 00.00.0000
2300 \begin_inset Flex Code
2303 \begin_layout Plain Layout
2312 \begin_layout Labeling
2313 \labelwidthstring 00.00.0000
2314 \begin_inset Flex Code
2317 \begin_layout Plain Layout
2326 \begin_layout Labeling
2327 \labelwidthstring 00.00.0000
2328 \begin_inset Flex Code
2331 \begin_layout Plain Layout
2337 The base filename of the input file (i.
2338 \begin_inset space \thinspace{}
2341 g., without the extension)
2344 \begin_layout Labeling
2345 \labelwidthstring 00.00.0000
2346 \begin_inset Flex Code
2349 \begin_layout Plain Layout
2355 The path to the input file
2358 \begin_layout Labeling
2359 \labelwidthstring 00.00.0000
2360 \begin_inset Flex Code
2363 \begin_layout Plain Layout
2369 The path to the original input file (this is different from $$p when a
2370 chain of converters is called)
2373 \begin_layout Labeling
2374 \labelwidthstring 00.00.0000
2375 \begin_inset Flex Code
2378 \begin_layout Plain Layout
2384 The iconv name for the encoding of the document.
2387 \begin_layout Standard
2389 \begin_inset Flex MenuItem
2392 \begin_layout Plain Layout
2394 \begin_inset space ~
2402 field you can enter the following flags, separated by commas:
2405 \begin_layout Labeling
2406 \labelwidthstring 00.00.0000
2407 \begin_inset Flex Code
2410 \begin_layout Plain Layout
2416 This converter runs some form of \SpecialChar LaTeX
2418 This will make \SpecialChar LyX
2419 's \SpecialChar LaTeX
2420 error logs available.
2423 \begin_layout Labeling
2424 \labelwidthstring 00.00.0000
2425 \begin_inset Flex Code
2428 \begin_layout Plain Layout
2434 Needs the \SpecialChar LaTeX
2436 \begin_inset Flex MenuItem
2439 \begin_layout Plain Layout
2445 file for the conversion.
2448 \begin_layout Labeling
2449 \labelwidthstring 00.00.0000
2450 \begin_inset Flex Code
2453 \begin_layout Plain Layout
2460 \begin_inset Quotes eld
2464 \begin_inset Quotes erd
2467 file from the backend, which in practice means a \SpecialChar LaTeX
2468 file like the one we
2469 would export, without
2470 \begin_inset Flex Code
2473 \begin_layout Plain Layout
2482 \begin_layout Labeling
2483 \labelwidthstring 00.00.0000
2484 \begin_inset Flex Code
2487 \begin_layout Plain Layout
2496 \begin_layout Standard
2497 The following three flags are not really flags at all because they take
2499 \begin_inset Flex MenuItem
2502 \begin_layout Plain Layout
2504 \begin_inset space ~
2508 \begin_inset space ~
2519 \begin_layout Labeling
2520 \labelwidthstring 00.00.0000
2521 \begin_inset Flex Code
2524 \begin_layout Plain Layout
2530 If set, the converter's standard error will be redirected to a file
2531 \begin_inset Flex Code
2534 \begin_layout Plain Layout
2540 , and the script given as argument will be run as:
2541 \begin_inset Flex Code
2544 \begin_layout Plain Layout
2545 script < infile.out > infile.log
2551 The argument may contain
2552 \begin_inset Flex Code
2555 \begin_layout Plain Layout
2564 \begin_layout Labeling
2565 \labelwidthstring 00.00.0000
2566 \begin_inset Flex Code
2569 \begin_layout Plain Layout
2575 The name of the directory in which the converter will dump the generated
2578 will not create this directory, and it does not copy anything into it,
2579 though it will copy this directory to the destination.
2580 The argument may contain
2581 \begin_inset Flex Code
2584 \begin_layout Plain Layout
2590 , which will be replaced by the base name of the input and output files,
2591 respectively, when the directory is copied.
2592 \begin_inset Newline newline
2595 Note that resultdir and usetempdir make no sense together.
2596 The latter will be ignored if the former is given.
2599 \begin_layout Labeling
2600 \labelwidthstring 00.00.0000
2601 \begin_inset Flex Code
2604 \begin_layout Plain Layout
2610 Determines the output file name and may, contain
2611 \begin_inset Flex Code
2614 \begin_layout Plain Layout
2621 Sensible only with resultdir and optional even then; if not given, it defaults
2625 \begin_layout Standard
2626 None of these last three are presently used in any of the converters that
2627 are installed with \SpecialChar LyX
2632 \begin_layout Standard
2633 You do not have to define converters for all formats between which you want
2635 For example, you will note that there is no `\SpecialChar LyX
2636 to PostScript' converter,
2637 but \SpecialChar LyX
2638 will export PostScript.
2639 It does so by first creating a \SpecialChar LaTeX
2640 file (no converter needs to be defined
2641 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2643 and finally converting the resulting DVI file to PostScript.
2645 finds such `chains' of converters automatically, and it will always choose
2646 the shortest possible chain.
2647 You can, though, still define multiple conversion methods between file
2649 For example, the standard \SpecialChar LyX
2650 configuration provides five ways to convert
2655 \begin_layout Enumerate
2657 \begin_inset Flex MenuItem
2660 \begin_layout Plain Layout
2669 \begin_layout Enumerate
2670 via (DVI and) PostScript, using
2671 \begin_inset Flex MenuItem
2674 \begin_layout Plain Layout
2683 \begin_layout Enumerate
2685 \begin_inset Flex MenuItem
2688 \begin_layout Plain Layout
2697 \begin_layout Enumerate
2699 \begin_inset Flex MenuItem
2702 \begin_layout Plain Layout
2712 \begin_layout Enumerate
2714 \begin_inset Flex MenuItem
2717 \begin_layout Plain Layout
2727 \begin_layout Standard
2728 To define such alternate chains, you must define multiple target `file formats',
2730 \begin_inset CommandInset ref
2732 reference "sec:Formats"
2737 For example, in the standard configuration, the formats named
2738 \begin_inset Flex MenuItem
2741 \begin_layout Plain Layout
2748 \begin_inset Flex MenuItem
2751 \begin_layout Plain Layout
2758 \begin_inset Flex MenuItem
2761 \begin_layout Plain Layout
2768 \begin_inset Flex MenuItem
2771 \begin_layout Plain Layout
2778 \begin_inset Flex MenuItem
2781 \begin_layout Plain Layout
2788 \begin_inset Flex MenuItem
2791 \begin_layout Plain Layout
2798 \begin_inset Flex MenuItem
2801 \begin_layout Plain Layout
2808 \begin_inset Flex MenuItem
2811 \begin_layout Plain Layout
2819 \begin_inset Flex MenuItem
2822 \begin_layout Plain Layout
2829 \begin_inset Flex MenuItem
2832 \begin_layout Plain Layout
2839 ) are defined, all of which share the extension
2840 \begin_inset Flex MenuItem
2843 \begin_layout Plain Layout
2849 , and which correspond to the conversion methods just mentioned.
2852 \begin_layout Chapter
2853 Internationalizing \SpecialChar LyX
2855 \begin_inset CommandInset label
2857 name "cha:Internationalizing-LyX"
2864 \begin_layout Standard
2866 supports using a translated interface.
2867 Last time we checked, \SpecialChar LyX
2868 provided text in thirty languages.
2869 The language of choice is called your
2874 (For further reading on locale settings, see also the documentation for
2875 locale that comes with your operating system.
2876 For Linux, the manual page for
2877 \begin_inset Flex Code
2880 \begin_layout Plain Layout
2886 could be a good place to start).
2889 \begin_layout Standard
2890 Notice that these translations will work, but do contain a few flaws.
2891 In particular, all dialogs have been designed with the English text in
2892 mind, which means that some of the translated text will be too large to
2893 fit within the space allocated.
2894 This is only a display problem and will not cause any harm.
2895 Also, you will find that some of the translations do not define shortcut
2896 keys for everything.
2897 Sometimes, there are simply not enough free letters to do it.
2898 Other times, the translator just hasn't got around to doing it yet.
2899 Our localization team, which you may wish to join,
2903 \begin_layout Plain Layout
2904 If you are a fluent speaker of a language other than English, joining these
2905 teams is a great way to give back to the \SpecialChar LyX
2911 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2915 \begin_layout Section
2916 Translating \SpecialChar LyX
2920 \begin_layout Subsection
2921 Translating the graphical user interface (text messages).
2924 \begin_layout Standard
2927 \begin_inset Flex Code
2930 \begin_layout Plain Layout
2936 library to handle the internationalization of the interface.
2937 To have \SpecialChar LyX
2938 speak your favorite language in all menus and dialogs, you need
2940 \begin_inset Flex Code
2943 \begin_layout Plain Layout
2949 -file for that language.
2950 When this is available, you'll have to generate a
2951 \begin_inset Flex Code
2954 \begin_layout Plain Layout
2960 -file from it and install the
2961 \begin_inset Flex Code
2964 \begin_layout Plain Layout
2971 The process of doing all of this is explained in the documentation for
2973 \begin_inset Flex Code
2976 \begin_layout Plain Layout
2983 It is possible to do this just for yourself, but if you're going to do
2984 it, you might as well share the results of your labors with the rest of
2985 the \SpecialChar LyX
2987 Send a message to the \SpecialChar LyX
2988 developers' list for more information about how
2992 \begin_layout Standard
2993 In short, this is what you should do (xx denotes the language code):
2996 \begin_layout Itemize
2997 Check out the \SpecialChar LyX
3000 \begin_inset CommandInset href
3002 name "information on the web"
3003 target "http://www.lyx.org/HowToUseSVN"
3010 \begin_layout Itemize
3012 \begin_inset Flex Code
3015 \begin_layout Plain Layout
3021 to the folder of the
3022 \begin_inset Flex Code
3025 \begin_layout Plain Layout
3033 \begin_inset Flex Code
3036 \begin_layout Plain Layout
3044 \begin_inset Flex Code
3047 \begin_layout Plain Layout
3053 doesn't exist anywhere, it can be remade with the console command
3054 \begin_inset Flex Code
3057 \begin_layout Plain Layout
3063 in that directory, or you can use an existing po-file for some other language
3067 \begin_layout Itemize
3069 \begin_inset Flex Code
3072 \begin_layout Plain Layout
3082 \begin_layout Plain Layout
3083 This is just a text file, so it can be edited in any text editor.
3084 But there are also specialized programs that support such editing, such
3089 (for all platforms) or
3098 contains a `mode' for editing
3099 \begin_inset Flex Code
3102 \begin_layout Plain Layout
3113 For some menu- and widget-labels, there are also shortcut keys that should
3115 Those keys are marked after a `|', and should be translated according to
3116 the words and phrases of the language.
3117 You should also fill also out the information at the beginning of the new
3119 \begin_inset Flex Code
3122 \begin_layout Plain Layout
3128 -file with your email-address, etc., so people know where to reach you with
3129 suggestions and entertaining flames.
3132 \begin_layout Standard
3133 If you are just doing this on your own, then:
3136 \begin_layout Itemize
3138 \begin_inset Flex Code
3141 \begin_layout Plain Layout
3148 This can be done with
3149 \begin_inset Flex Code
3152 \begin_layout Plain Layout
3153 msgfmt -o xx.mo < xx.po
3161 \begin_layout Itemize
3163 \begin_inset Flex Code
3166 \begin_layout Plain Layout
3172 -file to your locale-tree, at the correct directory for application messages
3177 xx, and under the name
3178 \begin_inset Flex Code
3181 \begin_layout Plain Layout
3188 \begin_inset space \thinspace{}
3192 \begin_inset space \space{}
3196 \begin_inset Flex Code
3199 \begin_layout Plain Layout
3200 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3210 \begin_layout Standard
3211 As said, however, it would be best if the new
3212 \begin_inset Flex Code
3215 \begin_layout Plain Layout
3221 -file could be added to the \SpecialChar LyX
3222 distribution, so others can use it.
3223 Adding it involves making additional changes to \SpecialChar LyX
3225 So send an email to the developers' mailing list if you're interested in
3229 \begin_layout Subsubsection
3233 \begin_layout Standard
3234 Sometimes it turns out that one English message needs to be translated into
3235 different messages in the target language.
3236 One example is the message
3237 \begin_inset Flex Code
3240 \begin_layout Plain Layout
3246 which has the German translation
3254 , depending upon exactly what the English
3255 \begin_inset Quotes eld
3259 \begin_inset Quotes erd
3264 \begin_inset Flex Code
3267 \begin_layout Plain Layout
3273 does not handle such ambiguous translations.
3274 Therefore you have to add some context information to the message: Instead
3276 \begin_inset Flex Code
3279 \begin_layout Plain Layout
3286 \begin_inset Flex Code
3289 \begin_layout Plain Layout
3290 To[[as in 'From format x to format y']]
3296 \begin_inset Flex Code
3299 \begin_layout Plain Layout
3300 To[[as in 'From page x to page y']].
3305 Now the two occurrences of
3306 \begin_inset Flex Code
3309 \begin_layout Plain Layout
3316 \begin_inset Flex Code
3319 \begin_layout Plain Layout
3325 and can be translated correctly to
3336 \begin_layout Standard
3337 Of course the context information needs to be stripped off the original
3338 message when no translation is used.
3339 Therefore you have to put it in double square brackets at the end of the
3340 message (see the example above).
3341 The translation mechanism of \SpecialChar LyX
3342 ensures that everything in double square
3343 brackets at the end of messages is removed before displaying the message.
3346 \begin_layout Subsection
3347 Translating the documentation.
3350 \begin_layout Standard
3351 The online documentation (in the
3352 \begin_inset Flex MenuItem
3355 \begin_layout Plain Layout
3361 -menu) can (and should!) be translated.
3362 If there are translated versions of the documentation available
3366 \begin_layout Plain Layout
3367 As of March 2008, at least some of the documents have been translated into
3368 fourteen languages, with the Tutorial available in a few more.
3373 and the locale is set accordingly, these will be used automagically by
3377 looks for translated versions as
3378 \begin_inset Flex Code
3381 \begin_layout Plain Layout
3383 Dir/doc/xx/DocName.lyx
3389 \begin_inset Flex Code
3392 \begin_layout Plain Layout
3398 is the code for the language currently in use.
3399 If there are no translated documents, the default English versions will
3401 Note that the translated versions must have the same filenames (
3402 \begin_inset Flex Code
3405 \begin_layout Plain Layout
3411 above) as the original.
3412 If you feel up to translating the documentation (an excellent way to proof-read
3413 the original documentation by the way!), there are a few things you should
3417 \begin_layout Itemize
3418 Check out the documentation translation web page at
3419 \begin_inset CommandInset href
3421 name "http://www.lyx.org/Translation"
3422 target "http://www.lyx.org/Translation"
3427 That way, you can find out which (if any) documents have already been translate
3428 d into your language.
3429 You can also find out who (if anyone) is organizing the effort to translate
3430 the documentation into your language.
3431 If no one is organizing the effort, please let us know that you're interested.
3434 \begin_layout Standard
3435 Once you get to actually translating, here's a few hints for you that may
3439 \begin_layout Itemize
3440 Join the documentation team! There is information on how to do that in
3441 \begin_inset Flex Code
3444 \begin_layout Plain Layout
3451 \begin_inset Flex MenuItem
3454 \begin_layout Plain Layout
3455 Help\SpecialChar menuseparator
3461 ), which by the way is the first document you should translate.
3464 \begin_layout Itemize
3465 Learn the typographic conventions for the language you are translating to.
3466 Typography is an ancient art and over the centuries, a great variety of
3467 conventions have developed throughout different parts of the world.
3468 Also study the professional terminology amongst typographers in your country.
3469 Inventing your own terminology will only confuse the users.
3472 (Warning! Typography is addictive!)
3475 \begin_layout Itemize
3476 Make a copy of the document.
3477 This will be your working copy.
3478 You can use this as your personal translated help-file by placing it in
3480 \begin_inset Flex Code
3483 \begin_layout Plain Layout
3492 \begin_layout Itemize
3493 Sometimes the original document (from the \SpecialChar LyX
3494 -team) will be updated.
3495 Use the source viewer at
3496 \begin_inset CommandInset href
3498 name "http://www.lyx.org/trac/timeline"
3499 target "http://www.lyx.org/trac/timeline"
3503 to see what has been changed.
3504 That way you can easily see which parts of the translated document need
3508 \begin_layout Standard
3509 If you ever find an error in the original document, fix it and notify the
3510 rest of the documentation team of the changes! (You didn't forget to join
3511 the documentation team, did you?)
3514 \begin_layout Standard
3515 \begin_inset Branch OutDated
3518 \begin_layout Section
3519 International Keyboard Support
3522 \begin_layout Standard
3525 [Editor's Note: The following section is by
3533 It needs to be fixed to conform to the new Documentation Style sheet and
3534 to make use of the new v1.0 features.
3535 The whole thing also needs to be merged with the section following it.-jw
3536 It may also be badly out of date.-rh (2008)]
3539 \begin_layout Subsection
3540 Defining Own Keymaps: Keymap File Format
3543 \begin_layout Standard
3544 Let's look at a keyboard definition file a little closer.
3545 It is a plain text file defining
3548 \begin_layout Itemize
3549 key-to-key or key-to-string translations
3552 \begin_layout Itemize
3556 \begin_layout Itemize
3557 dead keys exceptions
3560 \begin_layout Standard
3561 To define key-to-key or key-to-string translation, use this command:
3564 \begin_layout Quotation
3565 \begin_inset Flex Code
3568 \begin_layout Plain Layout
3577 \begin_inset Flex Code
3580 \begin_layout Plain Layout
3589 \begin_layout Standard
3591 \begin_inset Flex Code
3594 \begin_layout Plain Layout
3600 is the key to be translated and
3601 \begin_inset Flex Code
3604 \begin_layout Plain Layout
3610 is the string to be inserted into the document.
3611 To define dead keys, use:
3614 \begin_layout Quotation
3615 \begin_inset Flex Code
3618 \begin_layout Plain Layout
3627 \begin_inset Flex Code
3630 \begin_layout Plain Layout
3639 \begin_layout Standard
3641 \begin_inset Flex Code
3644 \begin_layout Plain Layout
3650 is a keyboard key and
3651 \begin_inset Flex Code
3654 \begin_layout Plain Layout
3661 The following dead keys are supported (shortcut name is in parentheses):
3664 \begin_layout Quotation
3668 \begin_inset space \hfill{}
3674 \begin_layout Quotation
3676 \begin_inset space \hfill{}
3682 \begin_layout Quotation
3684 \begin_inset space \hfill{}
3690 \begin_layout Quotation
3692 \begin_inset space \hfill{}
3698 \begin_layout Quotation
3700 \begin_inset space \hfill{}
3706 \begin_layout Quotation
3708 \begin_inset space \hfill{}
3715 \begin_layout Plain Layout
3727 \begin_layout Quotation
3729 \begin_inset space \hfill{}
3735 \begin_layout Quotation
3737 \begin_inset space \hfill{}
3744 \begin_layout Plain Layout
3756 \begin_layout Quotation
3758 \begin_inset space \hfill{}
3764 \begin_layout Quotation
3766 \begin_inset space \hfill{}
3772 \begin_layout Quotation
3774 \begin_inset space \hfill{}
3781 \begin_layout Plain Layout
3793 \begin_layout Quotation
3795 \begin_inset space \hfill{}
3802 \begin_layout Plain Layout
3814 \begin_layout Quotation
3816 \begin_inset space \hfill{}
3822 \begin_layout Quotation
3823 hungarian umlaut (hug)
3824 \begin_inset space \hfill{}
3830 \begin_layout Quotation
3832 \begin_inset space \hfill{}
3838 \begin_layout Quotation
3840 \begin_inset space \hfill{}
3847 \begin_layout Plain Layout
3859 \begin_layout Standard
3860 Since in many international keyboards there are exceptions to what some
3861 dead keys should do, you can define them using
3864 \begin_layout Quotation
3865 \begin_inset Flex Code
3868 \begin_layout Plain Layout
3876 deadkey key outstring
3879 \begin_layout Standard
3880 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3884 \begin_layout Quotation
3885 \begin_inset Flex Code
3888 \begin_layout Plain Layout
3901 \begin_layout Standard
3902 to make it work correctly.
3903 Also, you have to define as exceptions dead keys over i and j, to remove
3904 the dot from them before inserting an accent mark.
3905 I will change this when the time comes, but so far I haven't had time.
3908 \begin_layout Standard
3909 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3912 \begin_inset Flex Code
3915 \begin_layout Plain Layout
3921 have different meaning.
3923 \begin_inset Flex Code
3926 \begin_layout Plain Layout
3932 marks comments, quotes start and end \SpecialChar LaTeX
3934 To enter quote, you'll need to use
3935 \begin_inset Flex Code
3938 \begin_layout Plain Layout
3947 \begin_inset Flex Code
3950 \begin_layout Plain Layout
3957 \begin_inset Flex Code
3960 \begin_layout Plain Layout
3971 \begin_layout Standard
3972 If you make a keyboard description file that works for your language, please
3973 mail it to me, so I can include it in the next keymap distribution.
3976 \begin_layout Standard
3977 More keywords will be supported in keymap configuration file in future,
3981 \begin_layout Itemize
3982 \begin_inset Flex Code
3985 \begin_layout Plain Layout
3996 \begin_inset space \hfill{}
4000 \begin_inset Flex Code
4003 \begin_layout Plain Layout
4012 \begin_layout Itemize
4013 \begin_inset Flex Code
4016 \begin_layout Plain Layout
4027 \begin_inset space \hfill{}
4031 \begin_inset Flex Code
4034 \begin_layout Plain Layout
4040 an external keymap translation program
4043 \begin_layout Standard
4044 Also, it should look into
4045 \begin_inset Flex Code
4048 \begin_layout Plain Layout
4054 file for defaults, too (for example, a
4055 \begin_inset Flex Code
4058 \begin_layout Plain Layout
4066 option to include default keyboard).
4074 \begin_layout Section
4075 International Keymap Stuff
4076 \begin_inset CommandInset label
4078 name "sec:International-Keymap-Stuff"
4085 \begin_layout Standard
4086 \begin_inset Note Note
4089 \begin_layout Plain Layout
4090 In doing the revisions on this document in March 2008, I did not look over
4091 this stuff, as I do not understand it.
4092 It would be good if someone else could do so.
4101 \begin_layout Standard
4102 The next two sections describe the
4103 \begin_inset Flex Code
4106 \begin_layout Plain Layout
4115 \begin_inset Flex Code
4118 \begin_layout Plain Layout
4126 file syntax in detail.
4127 These sections should help you design your own key map if the ones provided
4128 do not meet your needs.
4131 \begin_layout Subsection
4135 \begin_layout Standard
4139 \begin_inset Flex Code
4142 \begin_layout Plain Layout
4148 file maps keystrokes to characters or strings.
4149 As the name suggests, it sets a keyboard mapping.
4151 \begin_inset Flex Code
4154 \begin_layout Plain Layout
4165 \begin_inset Flex Code
4168 \begin_layout Plain Layout
4183 \begin_inset Flex Code
4186 \begin_layout Plain Layout
4199 \begin_inset Flex Code
4202 \begin_layout Plain Layout
4211 \begin_inset Flex Code
4214 \begin_layout Plain Layout
4222 are described in this section.
4225 \begin_layout Labeling
4226 \labelwidthstring 00.00.0000
4227 \begin_inset Flex Code
4230 \begin_layout Plain Layout
4238 Map a character to a string
4241 \begin_layout LyX-Code
4256 \begin_layout Standard
4289 the double-quote (")
4306 must be escaped with a preceding backslash (
4317 \begin_layout Standard
4319 \begin_inset Flex MenuItem
4322 \begin_layout Plain Layout
4330 statement to cause the symbol
4331 \begin_inset Flex MenuItem
4334 \begin_layout Plain Layout
4342 to be output for the keystroke
4343 \begin_inset Flex MenuItem
4346 \begin_layout Plain Layout
4357 \begin_layout LyX-Code
4363 \begin_layout Labeling
4364 \labelwidthstring 00.00.0000
4365 \begin_inset Flex Code
4368 \begin_layout Plain Layout
4376 Specify an accent character
4379 \begin_layout LyX-Code
4388 \begin_layout Standard
4389 This will make the cha
4427 This is the dead key
4431 \begin_layout Plain Layout
4438 refers to a key that does not produce a character by itself, but when followed
4439 with another key, produces the desired accent character.
4440 For example, a German characte
4442 r with an umlaut like
4452 can be produced in this manner.
4461 \begin_layout Standard
4474 and then another key not in
4491 followed by the other, not allowed key, as output.
4495 \begin_inset Flex MenuItem
4498 \begin_layout Plain Layout
4506 cancels a dead key, so if
4517 \begin_inset Flex MenuItem
4520 \begin_layout Plain Layout
4529 , the cursor will not go one position backwards but will instead cancel
4545 might have had on the next keystroke.
4549 \begin_layout Standard
4550 The following example specifies that the character ' is to be an acute accent,
4551 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4554 \begin_layout LyX-Code
4557 kmod ' acute aeiouAEIOU
4560 \begin_layout Labeling
4561 \labelwidthstring 00.00.0000
4562 \begin_inset Flex Code
4565 \begin_layout Plain Layout
4571 Specify an exception to the accent character
4574 \begin_layout LyX-Code
4583 \begin_layout Standard
4584 This defines an exce
4625 have been assigned a keystroke with a previous
4628 \begin_inset Flex Code
4631 \begin_layout Plain Layout
4655 must not belong in the
4702 If such a declaration does not exist in
4710 \begin_inset Flex Code
4713 \begin_layout Plain Layout
4747 \begin_inset Flex Code
4750 \begin_layout Plain Layout
4764 \begin_layout Standard
4765 The following command produces causes äi to be produced when you enter acute-i
4769 \begin_layout LyX-Code
4783 \begin_layout Labeling
4784 \labelwidthstring 00.00.0000
4785 \begin_inset Flex Code
4788 \begin_layout Plain Layout
4794 Combine two accent characters
4797 \begin_layout LyX-Code
4803 accent1 accent2 allowed
4806 \begin_layout Standard
4807 This one is getting pretty esoteric.
4808 It allows you to combine the effect
4864 \begin_inset Flex Code
4867 \begin_layout Plain Layout
4895 \begin_layout Standard
4896 Consider this example from the
4897 \begin_inset Flex Code
4900 \begin_layout Plain Layout
4911 \begin_layout LyX-Code
4914 kmod ; acute aeioyvhAEIOYVH
4918 kcomb acute umlaut iyIY
4921 \begin_layout Standard
4922 This allows you to press
4923 \begin_inset Flex MenuItem
4926 \begin_layout Plain Layout
4934 and get the effect of
4935 \begin_inset Flex Code
4938 \begin_layout Plain Layout
4957 in this case cancels the last dead key, so if you press
4958 \begin_inset Flex MenuItem
4961 \begin_layout Plain Layout
4970 \begin_inset Flex Code
4973 \begin_layout Plain Layout
4986 \begin_layout Subsection
4990 \begin_layout Standard
4992 \begin_inset Flex Code
4995 \begin_layout Plain Layout
5003 mapping is performed, a
5004 \begin_inset Flex Code
5007 \begin_layout Plain Layout
5017 file maps the strings that the symbols generate to characters in the current
5019 The \SpecialChar LyX
5020 distribution currently includes at least the
5021 \begin_inset Flex Code
5024 \begin_layout Plain Layout
5033 \begin_inset Flex Code
5036 \begin_layout Plain Layout
5047 \begin_layout Standard
5049 \begin_inset Flex Code
5052 \begin_layout Plain Layout
5060 file is a sequence of declarations of the form
5063 \begin_layout LyX-Code
5076 \begin_layout Standard
5077 For example, in order to map
5078 \begin_inset Flex MenuItem
5081 \begin_layout Plain Layout
5091 to the corresponding character in the iso-8859-1 set (233), the following
5095 \begin_layout LyX-Code
5103 \begin_layout Standard
5105 \begin_inset Flex Code
5108 \begin_layout Plain Layout
5117 \begin_inset Flex Code
5120 \begin_layout Plain Layout
5138 the same character can apply to more than one string.
5140 \begin_inset Flex Code
5143 \begin_layout Plain Layout
5154 \begin_layout LyX-Code
5166 \begin_inset Newline newline
5182 \begin_layout Standard
5184 cannot find a mapping for the string produced by the keystroke or a
5185 deadkey sequence, it will check if it looks like an accented char and try
5186 to draw an accent over the character on screen.
5189 \begin_layout Subsection
5193 \begin_layout Standard
5194 There is a second way to add support for international characters through
5195 so-called dead-keys.
5196 A dead-key works in combination with a letter to produce an accented character.
5197 Here, we'll explain how to create a really simple dead-key to illustrate
5201 \begin_layout Standard
5202 Suppose you happen to need the circumflex character,
5203 \begin_inset Quotes eld
5207 \begin_inset Quotes erd
5212 \begin_inset Flex MenuItem
5215 \begin_layout Plain Layout
5222 \begin_inset space ~
5226 \begin_inset Flex MenuItem
5229 \begin_layout Plain Layout
5235 ] to the \SpecialChar LyX
5237 \begin_inset Flex Code
5240 \begin_layout Plain Layout
5247 \begin_inset Flex Code
5250 \begin_layout Plain Layout
5257 Now, whenever you type the
5258 \begin_inset Flex MenuItem
5261 \begin_layout Plain Layout
5267 -key followed by a letter, that letter will have a circumflex accent on
5269 For example, the sequence
5270 \begin_inset Quotes eld
5274 \begin_inset Flex MenuItem
5277 \begin_layout Plain Layout
5284 \begin_inset Quotes erd
5287 produces the letter:
5288 \begin_inset Quotes eld
5292 \begin_inset Quotes erd
5296 If you tried to type
5297 \begin_inset Quotes eld
5301 \begin_inset Flex MenuItem
5304 \begin_layout Plain Layout
5311 \begin_inset Quotes erd
5314 , however, \SpecialChar LyX
5315 will complain with a beep, since a
5316 \begin_inset Quotes eld
5320 \begin_inset Flex MenuItem
5323 \begin_layout Plain Layout
5330 \begin_inset Quotes erd
5333 never takes a circumflex accent.
5335 \begin_inset Flex MenuItem
5338 \begin_layout Plain Layout
5344 after a dead-key produces the bare-accent.
5345 Please note this last point! If you bind a key to a dead-key, you'll need
5346 to rebind the character on that key to yet another key.
5348 \begin_inset Flex MenuItem
5351 \begin_layout Plain Layout
5357 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5360 \begin_layout Standard
5361 One common way to bind dead-keys is to use
5362 \begin_inset Flex MenuItem
5365 \begin_layout Plain Layout
5372 \begin_inset Flex MenuItem
5375 \begin_layout Plain Layout
5382 \begin_inset Flex MenuItem
5385 \begin_layout Plain Layout
5391 in combination with an accent, like
5392 \begin_inset Quotes eld
5396 \begin_inset Flex MenuItem
5399 \begin_layout Plain Layout
5406 \begin_inset Quotes erd
5410 \begin_inset Quotes eld
5414 \begin_inset Flex MenuItem
5417 \begin_layout Plain Layout
5424 \begin_inset Quotes erd
5428 \begin_inset Quotes eld
5432 \begin_inset Flex MenuItem
5435 \begin_layout Plain Layout
5442 \begin_inset Quotes erd
5446 Another way involves using
5447 \begin_inset Flex Code
5450 \begin_layout Plain Layout
5457 \begin_inset Flex Code
5460 \begin_layout Plain Layout
5466 to set up the special
5467 \begin_inset Flex Code
5470 \begin_layout Plain Layout
5478 \begin_inset Flex Code
5481 \begin_layout Plain Layout
5487 acts in some ways just like
5488 \begin_inset Flex MenuItem
5491 \begin_layout Plain Layout
5497 and permits you to bind keys to accented characters.
5498 You can also turn keys into dead-keys by binding them to something like
5500 \begin_inset Flex Code
5503 \begin_layout Plain Layout
5509 and then binding this symbolic key to the corresponding \SpecialChar LyX
5514 \begin_layout Plain Layout
5519 : This is exactly what I do in my
5520 \begin_inset Flex Code
5523 \begin_layout Plain Layout
5530 \begin_inset Flex Code
5533 \begin_layout Plain Layout
5541 \begin_inset Flex MenuItem
5544 \begin_layout Plain Layout
5546 \begin_inset space ~
5555 \begin_inset Flex Code
5558 \begin_layout Plain Layout
5564 and a bunch of these
5565 \begin_inset Quotes eld
5569 \begin_inset Flex Code
5572 \begin_layout Plain Layout
5579 \begin_inset Quotes erd
5582 symbolic keys bound such things as
5583 \begin_inset Flex MenuItem
5586 \begin_layout Plain Layout
5588 \begin_inset space ~
5597 \begin_inset Flex MenuItem
5600 \begin_layout Plain Layout
5602 \begin_inset space ~
5611 This is how I produce my accented characters.
5616 You can make just about anything into the
5617 \begin_inset Flex Code
5620 \begin_layout Plain Layout
5627 \begin_inset Flex MenuItem
5630 \begin_layout Plain Layout
5636 keys, a spare function key, etc.
5637 As for the \SpecialChar LyX
5638 commands that produce accents, check the entry for
5639 \begin_inset Flex Code
5642 \begin_layout Plain Layout
5653 You'll find the complete list there.
5656 \begin_layout Subsection
5657 Saving your Language Configuration
5660 \begin_layout Standard
5661 You can edit your preferences so that your desired language environment
5662 is automatically configured when \SpecialChar LyX
5664 \begin_inset Flex MenuItem
5667 \begin_layout Plain Layout
5668 Edit\SpecialChar menuseparator
5677 \begin_layout Chapter
5678 Installing New Document Classes, Layouts, and Templates
5679 \begin_inset CommandInset label
5681 name "cha:Installing-New-Document"
5686 \begin_inset Argument 1
5689 \begin_layout Plain Layout
5690 Installing New Document Classes
5698 \begin_layout Standard
5699 In this chapter, we describe the procedures for creating and installing
5700 new \SpecialChar LyX
5701 layout and template files, as well as offer a refresher on correctly
5702 installing new \SpecialChar LaTeX
5707 \begin_layout Standard
5708 First, let us a say a few words about how one ought to think about the relation
5709 between \SpecialChar LyX
5710 and \SpecialChar LaTeX
5712 The thing to understand is that, in a certain sense, \SpecialChar LyX
5713 doesn't know anything
5714 about \SpecialChar LaTeX
5716 Indeed, from \SpecialChar LyX
5717 's point of view, \SpecialChar LaTeX
5718 is just one of several
5719 \begin_inset Quotes eld
5723 \begin_inset Quotes erd
5726 in which it is capable of producing output.
5727 Other such formats are DocBook, plaintext, and XHTML.
5729 is, of course, a particularly important format, but very little of the
5730 information \SpecialChar LyX
5731 has about \SpecialChar LaTeX
5732 is actually contained in the program itself.
5736 \begin_layout Plain Layout
5737 Some commands are sufficiently complex that they are
5738 \begin_inset Quotes eld
5742 \begin_inset Quotes erd
5745 into \SpecialChar LyX
5747 But the developers generally regard this as a Bad Thing.
5752 Rather, that information, even for the standard classes like
5753 \begin_inset Flex Code
5756 \begin_layout Plain Layout
5762 , is contained in `layout files'.
5763 Similarly, \SpecialChar LyX
5764 itself does not know much about DocBook or XHTML.
5765 What it knows is contained in layout files.
5768 \begin_layout Standard
5769 You can think of the layout file for a given document class as a translation
5770 manual between \SpecialChar LyX
5771 constructs—paragraphs with their corresponding styles,
5772 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5775 Almost everything \SpecialChar LyX
5777 \begin_inset Flex Code
5780 \begin_layout Plain Layout
5786 , for example, is contained in the file
5787 \begin_inset Flex Code
5790 \begin_layout Plain Layout
5796 and in various other files it includes.
5797 For this reason, anyone intending to write layout files should plan to
5798 study the existing files.
5799 A good place to start is with
5800 \begin_inset Flex Code
5803 \begin_layout Plain Layout
5809 , which is included in
5810 \begin_inset Flex Code
5813 \begin_layout Plain Layout
5820 \begin_inset Flex Code
5823 \begin_layout Plain Layout
5829 , and many of the other layout files for document classes.
5830 This file is where sections and the like are defined:
5831 \begin_inset Flex Code
5834 \begin_layout Plain Layout
5840 tells \SpecialChar LyX
5841 how paragraphs that are marked with the Section, Subsection, etc,
5842 styles can be translated into corresponding \SpecialChar LaTeX
5843 , DocBook, and XHTML commands
5846 \begin_inset Flex Code
5849 \begin_layout Plain Layout
5855 file basically just includes several of these
5856 \begin_inset Flex Code
5859 \begin_layout Plain Layout
5868 \begin_layout Standard
5869 Defining the \SpecialChar LyX
5871 correspondence is not the only thing layout files do, though.
5872 Their other job is to define how the \SpecialChar LyX
5873 constructs themselves will appear
5875 The fact that layout files have these two jobs is often a source of confusion,
5876 because they are completely separate.
5877 Telling \SpecialChar LyX
5878 how to translate a certain paragraph style into \SpecialChar LaTeX
5881 how to display it; conversely, telling \SpecialChar LyX
5882 how to display a certain paragraph
5883 style does not tell \SpecialChar LyX
5884 how to translate it into \SpecialChar LaTeX
5885 (let alone tell \SpecialChar LaTeX
5888 So, in general, when you define a new \SpecialChar LyX
5889 construct, you must always do two
5890 quite separate things: (i)
5891 \begin_inset space ~
5894 tell \SpecialChar LyX
5895 how to translate it into \SpecialChar LaTeX
5897 \begin_inset space ~
5900 tell \SpecialChar LyX
5904 \begin_layout Standard
5905 Much the same is true, of course, as regards \SpecialChar LyX
5906 's other backend formats, though
5907 XHTML is in some ways different, because in that case \SpecialChar LyX
5912 able, to some extent, to use information about how it should display a
5913 paragraph on the screen to output information (in the form of CSS) about
5914 how the paragraph should be displayed in a browser.
5915 Even in this case, however, the distinction between what \SpecialChar LyX
5917 and how things are rendered externally remains in force, and the two can
5918 be controlled separately.
5920 \begin_inset CommandInset ref
5922 reference "sec:Tags-for-XHTML"
5929 \begin_layout Section
5930 Installing new \SpecialChar LaTeX
5934 \begin_layout Standard
5935 Some installations may not include a \SpecialChar LaTeX
5936 package or class file that you would
5937 like to use within \SpecialChar LyX
5939 For example, you might need Foil\SpecialChar TeX
5940 , a package for preparing slides for overhead
5942 Modern \SpecialChar LaTeX
5943 distributions like \SpecialChar TeX
5944 Live (2008 or newer) or MiK\SpecialChar TeX
5945 provide a user interface
5946 for installing such packages.
5947 For example, with MiK\SpecialChar TeX
5948 , you start the program
5949 \begin_inset Quotes eld
5953 \begin_inset space ~
5957 \begin_inset Quotes erd
5960 to get a list of available packages.
5961 To install one of them, right click on it or use the corresponding toolbar
5965 \begin_layout Standard
5966 If your \SpecialChar LaTeX
5967 distribution does not provide such a `package manager', or if the
5968 package is not available from your distribution, then follow these steps
5969 to install it manually:
5972 \begin_layout Enumerate
5973 Get the package from
5974 \begin_inset CommandInset href
5977 target "http://www.ctan.org/"
5984 \begin_layout Enumerate
5985 If the package contains a file with the ending
5986 \begin_inset Quotes eld
5990 \begin_inset Flex Code
5993 \begin_layout Plain Layout
6000 \begin_inset Quotes erd
6003 (is the case for Foil\SpecialChar TeX
6004 ) then open a console, change to the folder of this
6005 file and execute the command
6006 \begin_inset Flex Code
6009 \begin_layout Plain Layout
6016 You have now unpacked the package and have all files to install it.
6017 Most \SpecialChar LaTeX
6018 -packages are not packed and you can skip this step.
6021 \begin_layout Enumerate
6022 Now you need to decide if the package should be available for all users
6024 \begin_inset Separator parbreak
6031 \begin_layout Enumerate
6032 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
6033 for all users on your system, then install it in your `local' \SpecialChar TeX
6035 install it in your own `user' \SpecialChar TeX
6037 Where these trees should be created, if they do not already exist, depends
6039 To find this out, look in the file
6040 \begin_inset Flex Code
6043 \begin_layout Plain Layout
6053 \begin_layout Plain Layout
6054 This is usually in the directory
6055 \begin_inset Flex Code
6058 \begin_layout Plain Layout
6064 , though you can execute the command
6065 \begin_inset Flex Code
6068 \begin_layout Plain Layout
6079 The location of the `local' \SpecialChar TeX
6080 tree is defined by the
6081 \begin_inset Flex Code
6084 \begin_layout Plain Layout
6090 variable; this is usually somewhere like
6091 \begin_inset Flex Code
6094 \begin_layout Plain Layout
6095 /usr/local/share/texmf
6101 The location of the `user' \SpecialChar TeX
6103 \begin_inset Flex Code
6106 \begin_layout Plain Layout
6113 \begin_inset Flex Code
6116 \begin_layout Plain Layout
6123 (If these variables are not predefined, you have to define them.) You'll
6124 probably need root permissions to create or modify the `local' tree, but
6125 not for your `user' tree.
6126 \begin_inset Newline newline
6129 In general, it is recommended to install in the user tree because your user
6130 will not be modified or even overwritten when you upgrade your system.
6131 It will typically also be backed up together with everything else when
6132 you backup your home directory (which, of course, you do on a regular basis).
6135 \begin_layout Enumerate
6136 On Windows, if you want the new package to be available for all users on
6137 your system, change to the folder where \SpecialChar LaTeX
6138 is installed and then change to
6140 \begin_inset Flex Code
6143 \begin_layout Plain Layout
6154 (For MiK\SpecialChar TeX
6155 , this would be by default the folder
6156 \begin_inset Flex Code
6159 \begin_layout Plain Layout
6178 \begin_layout Plain Layout
6179 Note that this will be the correct path only on English installations.
6180 On a German one, it would be
6181 \begin_inset Flex Code
6184 \begin_layout Plain Layout
6199 , and similarly for other languages.
6204 Create there a new folder
6205 \begin_inset Flex Code
6208 \begin_layout Plain Layout
6214 and copy all files of the package into it.
6216 \begin_inset Newline newline
6219 If the package should only available for you or you don't have admin permissions
6220 , do the same, but in the local \SpecialChar LaTeX
6223 \begin_inset space \thinspace{}
6226 g., for MiK\SpecialChar TeX
6228 \begin_inset space ~
6231 2.8 under Windows XP, this would be the folder:
6232 \begin_inset Newline newline
6238 \begin_inset Flex Code
6241 \begin_layout Plain Layout
6244 Documents and Settings
6256 \begin_inset Newline newline
6262 \begin_inset Phantom HPhantom
6265 \begin_layout Plain Layout
6276 \begin_inset Flex Code
6279 \begin_layout Plain Layout
6293 \begin_inset Newline newline
6296 On Vista, it would be:
6297 \begin_inset Newline newline
6301 \begin_inset Flex Code
6304 \begin_layout Plain Layout
6331 \begin_layout Enumerate
6332 Now one only need to tell \SpecialChar LaTeX
6333 that there are new files.
6334 This depends on the used \SpecialChar LaTeX
6336 \begin_inset Separator parbreak
6343 \begin_layout Enumerate
6344 For \SpecialChar TeX
6345 Live execute the command
6346 \begin_inset Flex Code
6349 \begin_layout Plain Layout
6356 If you installed the package for all users, then you will probably need
6357 to have root permissions for that.
6360 \begin_layout Enumerate
6361 For MiK\SpecialChar TeX
6362 , if you have installed the package for all users, start the program
6364 \begin_inset Quotes eld
6368 \begin_inset space ~
6372 \begin_inset Quotes erd
6375 and press the button marked
6376 \begin_inset Quotes eld
6380 \begin_inset Quotes erd
6384 Otherwise start the program
6385 \begin_inset Quotes eld
6389 \begin_inset Quotes erd
6396 \begin_layout Enumerate
6397 Finally, you need to tell \SpecialChar LyX
6398 that there are new packages available.
6399 So, in \SpecialChar LyX
6401 \begin_inset Flex MenuItem
6404 \begin_layout Plain Layout
6407 \SpecialChar menuseparator
6413 and then restart \SpecialChar LyX
6417 \begin_layout Standard
6418 Now the package is installed.
6419 In our example, the document class
6420 \begin_inset Flex Code
6423 \begin_layout Plain Layout
6425 \begin_inset space ~
6432 \begin_layout Plain Layout
6444 will now be available under
6445 \begin_inset Flex MenuItem
6448 \begin_layout Plain Layout
6449 Document\SpecialChar menuseparator
6450 Settings\SpecialChar menuseparator
6460 \begin_layout Standard
6461 If you would like to use a \SpecialChar LaTeX
6462 document class that is not even listed in the
6464 \begin_inset Flex MenuItem
6467 \begin_layout Plain Layout
6468 Document\SpecialChar menuseparator
6469 Settings\SpecialChar menuseparator
6475 , then you need to create a `layout' file for it.
6476 That is the topic of the next section.
6479 \begin_layout Section
6480 Types of layout files
6483 \begin_layout Standard
6484 This section describes the various sorts of \SpecialChar LyX
6485 files that contain layout informati
6487 These files describe various paragraph and character styles, determining
6488 how \SpecialChar LyX
6489 should display them and how they should be translated into \SpecialChar LaTeX
6491 XHTML, or whatever output format is being used.
6495 \begin_layout Standard
6496 We shall try to provide a thorough description of the process of writing
6498 However, there are so many different types of documents supported even
6499 by just \SpecialChar LaTeX
6500 that we can't hope to cover every different possibility or problem
6501 you might encounter.
6502 The \SpecialChar LyX
6503 users' list is frequented by people with lots of experience with layout
6504 design who are willing to share what they've learned, so please feel free
6505 to ask questions there.
6508 \begin_layout Standard
6509 As you prepare to write a new layout, it is extremely helpful to look at
6510 the layouts distributed with \SpecialChar LyX
6512 If you write a \SpecialChar LyX
6513 layout for a \SpecialChar LaTeX
6514 document class that might also be used by
6515 others, or write a module that might be useful to others, then you should
6516 consider posting your layout to the
6517 \begin_inset CommandInset href
6519 name "layout section on the LyX wiki"
6520 target "http://wiki.lyx.org/Layouts/Layouts"
6524 or even to the \SpecialChar LyX
6525 developers' list, so that it might be included in \SpecialChar LyX
6530 \begin_layout Plain Layout
6531 Note that \SpecialChar LyX
6532 is licensed under the General Public License, so any material
6533 that is contributed to \SpecialChar LyX
6534 must be similarly licensed.
6542 \begin_layout Subsection
6544 \begin_inset CommandInset label
6546 name "sub:Layout-modules"
6553 \begin_layout Standard
6554 We have spoken to this point about `layout files'.
6555 But there are different sorts of files that contain layout information.
6556 Layout files, strictly so called, have the
6557 \begin_inset Flex Code
6560 \begin_layout Plain Layout
6566 extension and provide \SpecialChar LyX
6567 with information about document classes.
6568 Since \SpecialChar LyX
6569 1.6 layout information can also be contained in layout
6574 \begin_inset Flex Code
6577 \begin_layout Plain Layout
6584 Modules are to \SpecialChar LaTeX
6585 packages much as layouts are to \SpecialChar LaTeX
6586 classes, and some modules—such
6588 \begin_inset Flex Code
6591 \begin_layout Plain Layout
6597 module—specifically provide support for one package.
6598 In a sense, layout modules are similar to included
6602 \begin_layout Plain Layout
6603 These can have any extension, but by convention have the
6604 \begin_inset Flex Code
6607 \begin_layout Plain Layout
6619 \begin_inset Flex Code
6622 \begin_layout Plain Layout
6628 —in that modules are not specific to a given document class but may be used
6629 with many different classes.
6630 The difference is that using an included file with
6631 \begin_inset Flex Code
6634 \begin_layout Plain Layout
6640 requires editing that file.
6641 Modules, by contrast, are selected in the
6642 \begin_inset Flex MenuItem
6645 \begin_layout Plain Layout
6646 Document\SpecialChar menuseparator
6655 \begin_layout Standard
6656 Building modules is the easiest way to get started with layout editing,
6657 since it can be as simple as adding a single new paragraph style or flex
6659 But modules may, in principle, contain anything a layout file can contain.
6662 \begin_layout Standard
6663 After creating a new module and copying it to the
6664 \begin_inset Flex Code
6667 \begin_layout Plain Layout
6673 folder, you will need to reconfigure and then restart \SpecialChar LyX
6676 However, changes you make to the module will be seen immediately, if you
6678 \begin_inset Flex MenuItem
6681 \begin_layout Plain Layout
6682 Document\SpecialChar menuseparator
6688 , highlight something, and then hit
6689 \begin_inset Quotes eld
6693 \begin_inset Quotes erd
6699 It is strongly recommended that you save your work before doing this
6704 it is strongly recommended that you not attempt to edit modules while simultaneo
6705 usly working on actual documents
6708 Though of course the developers strive to keep \SpecialChar LyX
6709 stable in such situations,
6710 syntax errors and the like in your module file could cause strange behavior.
6713 \begin_layout Subsubsection
6717 \begin_layout Standard
6718 Modules are to \SpecialChar LyX
6719 as packages are to \SpecialChar LaTeX
6721 Sometimes, however, you find yourself wanting a specific inset or character
6722 style just for one document and writing a module that will also be available
6723 to other documents makes little sense.
6724 What you need is \SpecialChar LyX
6726 \begin_inset Quotes eld
6730 \begin_inset Quotes erd
6736 \begin_layout Standard
6737 You will find it under
6739 Document\SpecialChar menuseparator
6740 Settings\SpecialChar menuseparator
6744 The large text box allows you to enter anything that you might enter in
6745 a layout file or module.
6746 You can think of a document's local layout, in fact, as a module that belongs
6748 So, in particular, you must enter a
6749 \begin_inset Flex Code
6752 \begin_layout Plain Layout
6759 Any format is acceptable, but one would normally use the format current
6761 (In \SpecialChar LyX
6762 2.1, the current layout format is 48.) You should be aware that local
6763 layout is not supported by versions of \SpecialChar LyX
6764 prior to 1.6, so you should not
6765 use it if you want to be able to export your document to \SpecialChar LyX
6767 (without, that is, losing the local layout information).
6768 If you wish to be able to export to 1.6—local layout is supported in 1.6,
6769 though there is no UI for it—then you should use format 11 and, of course,
6770 use only layout constructs that were available in \SpecialChar LyX
6774 \begin_layout Standard
6775 When you have entered something in the
6776 \begin_inset Flex Code
6779 \begin_layout Plain Layout
6785 pane, \SpecialChar LyX
6787 \begin_inset Quotes eld
6791 \begin_inset Quotes erd
6794 button at the bottom.
6795 Clicking this button will cause \SpecialChar LyX
6796 to determine whether what you have entered
6797 is valid layout information for the chosen format.
6799 will report the result but, unfortunately, will not tell you what errors
6800 there might have been.
6801 These will be written to the terminal, however, if \SpecialChar LyX
6802 is started from a terminal.
6803 You will not be permitted to save your local layout until you have entered
6807 \begin_layout Standard
6808 The warnings at the end of the previous section apply here, too.
6809 Do not play with local layout while you are actually working, especially
6810 if you have not saved your document.
6811 That said, using local layout with a test document can be a very convenient
6812 way to try out layout ideas, or even to start developing a module.
6815 \begin_layout Subsection
6817 \begin_inset Flex MenuItem
6820 \begin_layout Plain Layout
6829 \begin_layout Standard
6830 There are two situations you are likely to encounter when wanting to support
6831 a new \SpecialChar LaTeX
6832 document class, involving style (
6833 \begin_inset Flex Code
6836 \begin_layout Plain Layout
6842 ) files and \SpecialChar LaTeX2e
6844 \begin_inset Flex Code
6847 \begin_layout Plain Layout
6854 Supporting a style file is usually fairly easy.
6855 Supporting a new class file is a bit harder.
6856 We'll discuss the former in this section and the latter in the next.
6857 Similar remarks apply, of course, if you want to support a new DocBook
6861 \begin_layout Standard
6862 The easier case is the one in which your new document class is provided
6863 as a style file that is to be used in conjunction with an already supported
6865 For the sake of the example, we'll assume that the style file is called
6867 \begin_inset Flex MenuItem
6870 \begin_layout Plain Layout
6876 and that it is meant to be used with
6877 \begin_inset Flex MenuItem
6880 \begin_layout Plain Layout
6886 , which is a standard class.
6890 \begin_layout Standard
6891 Start by copying the existing class's layout file into your local directory:
6895 \begin_layout Plain Layout
6896 Of course, which directory is your local directory will vary by platform,
6897 and \SpecialChar LyX
6898 allows you to specify your local directory on startup, too, using
6900 \begin_inset Flex Code
6903 \begin_layout Plain Layout
6917 \begin_layout LyX-Code
6918 cp report.layout ~/.lyx/layouts/myclass.layout
6921 \begin_layout Standard
6923 \begin_inset Flex Code
6926 \begin_layout Plain Layout
6932 and change the line:
6935 \begin_layout LyX-Code
6938 Declare\SpecialChar LaTeX
6942 \begin_layout Standard
6946 \begin_layout LyX-Code
6949 Declare\SpecialChar LaTeX
6950 Class[report, myclass.sty]{report (myclass)}
6953 \begin_layout Standard
6957 \begin_layout LyX-Code
6959 \begin_inset Newline newline
6965 \begin_inset Newline newline
6971 \begin_layout Standard
6972 near the top of the file.
6975 \begin_layout Standard
6976 Start \SpecialChar LyX
6978 \begin_inset Flex MenuItem
6981 \begin_layout Plain Layout
6982 Tools\SpecialChar menuseparator
6989 Then restart \SpecialChar LyX
6990 and try creating a new document.
6992 \begin_inset Flex MenuItem
6995 \begin_layout Plain Layout
7001 " as a document class option in the
7002 \begin_inset Flex MenuItem
7005 \begin_layout Plain Layout
7006 Document\SpecialChar menuseparator
7013 It is likely that some of the sectioning commands and such in your new
7014 class will work differently from how they worked in the base class—
7015 \begin_inset Flex Code
7018 \begin_layout Plain Layout
7024 in this example—so you can fiddle around with the settings for the different
7025 sections if you wish.
7026 The layout information for sections is contained in
7027 \begin_inset Flex Code
7030 \begin_layout Plain Layout
7036 , but you do not need to copy and change this file.
7037 Instead, you can simply add your changes to your layout file, after the
7039 \begin_inset Flex Code
7042 \begin_layout Plain Layout
7048 , which itself includes
7049 \begin_inset Flex Code
7052 \begin_layout Plain Layout
7059 For example, you might add these lines:
7062 \begin_layout LyX-Code
7066 \begin_layout LyX-Code
7070 \begin_layout LyX-Code
7074 \begin_layout LyX-Code
7078 \begin_layout LyX-Code
7082 \begin_layout Standard
7083 to change the font for chapter headings to sans-serif.
7084 This will override (or, in this case, add to) the existing declaration
7085 for the Chapter style.
7089 \begin_layout Standard
7090 Your new package may also provide commands or environments not present in
7092 In this case, you will want to add these to the layout file.
7094 \begin_inset CommandInset ref
7096 reference "sec:TextClass"
7100 for information on how to do so.
7103 \begin_layout Standard
7105 \begin_inset Flex MenuItem
7108 \begin_layout Plain Layout
7114 can be used with several different document classes, and even if it cannot,
7115 you might find it easiest just to write a module that you can load with
7117 The simplest possible such module would be:
7120 \begin_layout LyX-Code
7123 Declare\SpecialChar LyX
7127 \begin_layout LyX-Code
7131 \begin_layout LyX-Code
7132 #Support for mypkg.sty.
7135 \begin_layout LyX-Code
7137 \begin_inset Newline newline
7143 \begin_layout LyX-Code
7145 \begin_inset Newline newline
7151 \begin_layout LyX-Code
7153 \begin_inset Newline newline
7159 \begin_inset Newline newline
7165 \begin_layout Standard
7166 A more complex module might modify the behavior of some existing constructs
7167 or define some new ones.
7169 \begin_inset CommandInset ref
7171 reference "sec:TextClass"
7178 \begin_layout Subsection
7180 \begin_inset Flex MenuItem
7183 \begin_layout Plain Layout
7192 \begin_layout Standard
7193 There are two possibilities here.
7194 One is that the class file is itself based upon an existing document class.
7195 For example, many thesis classes are based upon
7196 \begin_inset Flex MenuItem
7199 \begin_layout Plain Layout
7206 To see whether yours is, look for a line like
7209 \begin_layout LyX-Code
7215 \begin_layout Standard
7217 If so, then you may proceed largely as in the previous section, though
7219 \begin_inset Flex Code
7222 \begin_layout Plain Layout
7223 Declare\SpecialChar LaTeX
7229 line will be different.
7230 If your new class is
7231 \begin_inset Flex Code
7234 \begin_layout Plain Layout
7240 and it is based upon
7241 \begin_inset Flex Code
7244 \begin_layout Plain Layout
7250 , then the line should read:
7254 \begin_layout Plain Layout
7255 And it will be easiest if you save the file to
7256 \begin_inset Flex Code
7259 \begin_layout Plain Layout
7266 assumes that the document class has the same name as the layout file.
7275 \begin_layout LyX-Code
7278 Declare\SpecialChar LaTeX
7279 Class[thesis,book]{thesis}
7282 \begin_layout Standard
7283 If, on the other hand, the new class is not based upon an existing class,
7284 you will probably have to
7285 \begin_inset Quotes eld
7289 \begin_inset Quotes erd
7293 We strongly suggest copying an existing layout file which uses a similar
7295 class and then modifying it, if you can do so.
7296 At least use an existing file as a starting point so you can find out what
7297 items you need to worry about.
7298 Again, the specifics are covered below.
7301 \begin_layout Subsection
7303 \begin_inset CommandInset label
7305 name "sub:Creating-Templates"
7312 \begin_layout Standard
7313 Once you have written a layout file for a new document class, you might
7314 want to consider writing a
7319 A template acts as a kind of tutorial for your layout, showing how it might
7320 be used, though containing dummy content.
7321 You can of course look at the various templates included with \SpecialChar LyX
7325 \begin_layout Standard
7326 Templates are created just like usual documents: using \SpecialChar LyX
7328 The only difference is that usual documents contain all possible settings,
7329 including the font scheme and the paper size.
7330 Usually a user doesn't want a template to overwrite his preferred settings
7331 for such parameters.
7332 For that reason, the designer of a template should remove the corresponding
7334 \begin_inset Flex Code
7337 \begin_layout Plain Layout
7346 \begin_inset Flex Code
7349 \begin_layout Plain Layout
7357 from the template \SpecialChar LyX
7359 This can be done with any simple text-editor, for example
7360 \begin_inset Flex Code
7363 \begin_layout Plain Layout
7370 \begin_inset Flex Code
7373 \begin_layout Plain Layout
7382 \begin_layout Standard
7383 Put the edited template files you create in
7384 \begin_inset Flex Code
7387 \begin_layout Plain Layout
7393 , copy the ones you use from the global template directory in
7394 \begin_inset Flex Code
7397 \begin_layout Plain Layout
7404 to the same place, and redefine the template path in the
7405 \begin_inset Flex MenuItem
7408 \begin_layout Plain Layout
7409 Tools\SpecialChar menuseparator
7410 Preferences\SpecialChar menuseparator
7419 \begin_layout Standard
7420 Note, by the way, that there is a template which has a particular meaning:
7422 \begin_inset Flex Code
7425 \begin_layout Plain Layout
7432 This template is loaded every time you create a new document with
7433 \begin_inset Flex MenuItem
7436 \begin_layout Plain Layout
7437 File\SpecialChar menuseparator
7443 in order to provide useful defaults.
7444 To create this template from inside \SpecialChar LyX
7445 , all you have to do is to open a document
7446 with the correct settings, and use the
7447 \begin_inset Flex MenuItem
7450 \begin_layout Plain Layout
7451 Save as Document Defaults
7459 \begin_layout Subsection
7460 Upgrading old layout files
7463 \begin_layout Standard
7464 The format of layout files changes with each \SpecialChar LyX
7465 release, so old layout files
7466 need to be converted to the new format.
7468 reads a layout file in an older format, it automatically calls the
7470 \begin_inset Flex Code
7473 \begin_layout Plain Layout
7479 to convert it to a temporary file in current format.
7480 The original file is left untouched.
7481 If you use the layout file often, then, you may want to convert it permanently,
7482 so that \SpecialChar LyX
7483 does not have to do so itself every time.
7484 To do this, you can call the converter manually:
7487 \begin_layout Enumerate
7489 \begin_inset Flex Code
7492 \begin_layout Plain Layout
7499 \begin_inset Flex Code
7502 \begin_layout Plain Layout
7511 \begin_layout Enumerate
7513 \begin_inset Newline newline
7517 \begin_inset Flex Code
7520 \begin_layout Plain Layout
7521 python \SpecialChar LyX
7522 Dir/scripts/layout2layout.py myclass.old myclass.layout
7528 \begin_inset Newline newline
7532 \begin_inset Flex Code
7535 \begin_layout Plain Layout
7542 is the name of your \SpecialChar LyX
7546 \begin_layout Standard
7547 Note that manual conversion does not affect included files, so these will
7548 have to be converted separately.
7551 \begin_layout Section
7552 \begin_inset CommandInset label
7554 name "sec:TextClass"
7558 The layout file format
7561 \begin_layout Standard
7562 The following sections describe how layout files are structured and written.
7563 Our advice is to go slowly, save and test often.
7564 It is really not that hard, except that the multitude of options can become
7565 overwhelming, especially if you try to check out too many at once.
7566 It becomes easier if you use existing layouts of \SpecialChar LyX
7567 as examples/reference
7568 or if you modify an existing layout to your needs.
7571 \begin_layout Standard
7572 Note that all the tags used in layout files are case-insensitive.
7574 \begin_inset Flex Code
7577 \begin_layout Plain Layout
7584 \begin_inset Flex Code
7587 \begin_layout Plain Layout
7594 \begin_inset Flex Code
7597 \begin_layout Plain Layout
7603 are really the same tag.
7604 The possible arguments are printed in brackets after the tag's name.
7605 The default argument is typeset
7606 \begin_inset Flex Code
7609 \begin_layout Plain Layout
7618 If the argument has a data type like
7619 \begin_inset Quotes eld
7623 \begin_inset Quotes erd
7627 \begin_inset Quotes eld
7631 \begin_inset Quotes erd
7634 , the default is shown like this:
7635 \begin_inset Flex Code
7638 \begin_layout Plain Layout
7649 \begin_layout Subsection
7650 The document class declaration and classification
7653 \begin_layout Standard
7654 Lines in a layout file which begin with
7655 \begin_inset Flex Code
7658 \begin_layout Plain Layout
7665 There is one exception to this rule.
7667 \begin_inset Flex Code
7670 \begin_layout Plain Layout
7676 files should begin with lines like:
7679 \begin_layout LyX-Code
7682 #% Do not delete the line below; configure depends on this
7685 \begin_layout LyX-Code
7696 \begin_layout Plain Layout
7705 eXClass{Article (Standard Class)}
7708 \begin_layout LyX-Code
7713 DeclareCategory{Articles}
7716 \begin_layout Standard
7717 The second and third lines are used when you (re)configure \SpecialChar LyX
7719 The layout file is read by the \SpecialChar LaTeX
7721 \begin_inset Flex Code
7724 \begin_layout Plain Layout
7730 , in a special mode where
7731 \begin_inset Flex Code
7734 \begin_layout Plain Layout
7741 The first line is just a \SpecialChar LaTeX
7742 comment, the second one contains the mandatory
7743 declaration of the text class and the third line contains the optional
7744 classification of the class.
7745 If these lines appear in a file named
7746 \begin_inset Flex Code
7749 \begin_layout Plain Layout
7755 , then they define a text class of name
7756 \begin_inset Flex Code
7759 \begin_layout Plain Layout
7765 (the name of the layout file) which uses the \SpecialChar LaTeX
7767 \begin_inset Flex Code
7770 \begin_layout Plain Layout
7776 (the default is to use the same name as the layout).
7778 \begin_inset Quotes eld
7781 Article (Standard Class)
7782 \begin_inset Quotes erd
7785 that appears above is used as a description of the text class in the
7786 \begin_inset Flex MenuItem
7789 \begin_layout Plain Layout
7790 Document\SpecialChar menuseparator
7798 \begin_inset Quotes eld
7802 \begin_inset Quotes erd
7805 in the example) is also used in the
7806 \begin_inset Flex MenuItem
7809 \begin_layout Plain Layout
7810 Document\SpecialChar menuseparator
7816 dialog: the text classes are grouped by these categories (which are usually
7817 genres, so typical categories are
7818 \begin_inset Quotes eld
7822 \begin_inset Quotes erd
7826 \begin_inset Quotes eld
7830 \begin_inset Quotes erd
7834 \begin_inset Quotes eld
7838 \begin_inset Quotes erd
7842 \begin_inset Quotes eld
7846 \begin_inset Quotes erd
7850 \begin_inset Quotes eld
7854 \begin_inset Quotes erd
7858 \begin_inset Quotes eld
7862 \begin_inset Quotes erd
7866 If no category has been declared, the class will be put in the
7867 \begin_inset Quotes eld
7871 \begin_inset Quotes erd
7877 \begin_layout Standard
7878 Let's assume that you wrote your own text class that uses the
7879 \begin_inset Flex Code
7882 \begin_layout Plain Layout
7888 document class, but where you changed the appearance of the section headings.
7889 If you put it in a file
7890 \begin_inset Flex Code
7893 \begin_layout Plain Layout
7899 , the header of this file should be:
7902 \begin_layout LyX-Code
7905 #% Do not delete the line below; configure depends on this
7908 \begin_layout LyX-Code
7919 \begin_layout Plain Layout
7928 eXClass[article]{Article (with My Own Headings)}
7931 \begin_layout LyX-Code
7936 DeclareCategory{Articles}
7939 \begin_layout Standard
7940 This declares a text class
7941 \begin_inset Flex Code
7944 \begin_layout Plain Layout
7950 , associated with the \SpecialChar LaTeX
7952 \begin_inset Flex Code
7955 \begin_layout Plain Layout
7962 \begin_inset Quotes eld
7965 Article (with My Own Headings)
7966 \begin_inset Quotes erd
7970 If your text class depends on several packages, you can declare it as:
7973 \begin_layout LyX-Code
7976 #% Do not delete the line below; configure depends on this
7979 \begin_layout LyX-Code
7990 \begin_layout Plain Layout
7999 eXClass[article,foo.sty]{Article (with My Own Headings)}
8002 \begin_layout LyX-Code
8007 DeclareCategory{Articles}
8010 \begin_layout Standard
8011 This indicates that your text class uses the
8012 \begin_inset Flex Code
8015 \begin_layout Plain Layout
8022 Finally, it is also possible to declare classes for DocBook code.
8023 Typical declarations will look like:
8026 \begin_layout LyX-Code
8029 #% Do not delete the line below; configure depends on this
8032 \begin_layout LyX-Code
8037 DeclareDocBookClass[article]{SGML (DocBook Article)}
8040 \begin_layout LyX-Code
8045 DeclareCategory{Articles (DocBook)}
8048 \begin_layout Standard
8049 Note that these declarations can also be given an optional parameter declaring
8050 the name of the document class (but not a list).
8053 \begin_layout Standard
8054 So, to be as explicit as possible, the form of the layout declaration is:
8057 \begin_layout LyX-Code
8068 \begin_layout Plain Layout
8077 eXClass[class,package.sty]{layout description}
8080 \begin_layout LyX-Code
8085 DeclareCategory{category}
8088 \begin_layout Standard
8089 The class need only be specified if the name of the \SpecialChar LaTeX
8091 name of the layout file are different or if there are packages to load.
8092 If the name of the class file is not specified, then \SpecialChar LyX
8094 that it is the same as the name of the layout file.
8097 \begin_layout Standard
8098 When the text class has been modified to your taste, all you have to do
8099 is to copy it either to
8100 \begin_inset Flex Code
8103 \begin_layout Plain Layout
8111 \begin_inset Flex Code
8114 \begin_layout Plain Layout
8121 \begin_inset Flex MenuItem
8124 \begin_layout Plain Layout
8125 Tools\SpecialChar menuseparator
8131 , exit \SpecialChar LyX
8133 Then your new text class should be available along with the others.
8136 \begin_layout Standard
8137 Once the layout file is installed, you can edit it and see your changes
8138 without having to reconfigure or to restart \SpecialChar LyX
8144 \begin_layout Plain Layout
8145 In versions of \SpecialChar LyX
8146 prior to 1.6, this was not true.
8147 As a result, editing layout files was very time consuming, since you had
8148 constantly to restart \SpecialChar LyX
8154 You can force a reload of the current layout by using the \SpecialChar LyX
8156 \begin_inset Flex MenuItem
8159 \begin_layout Plain Layout
8166 There is no default binding for this function—though, of course, you can
8167 bind it to a key yourself.
8168 But you will normally use this function simply by entering it in the mini-buffe
8173 \begin_layout Standard
8179 \begin_inset Flex MenuItem
8182 \begin_layout Plain Layout
8188 is very much an `advanced feature'.
8193 recommended that you save your work before using this function.
8198 recommended that you not attempt to edit layout information while simultaneousl
8199 y working on a document that you care about.
8200 Use a test document.
8201 Syntax errors and the like in your layout file could cause peculiar behavior.
8202 In particular, such errors could cause \SpecialChar LyX
8203 to regard the current layout as
8204 invalid and to attempt to switch to some other layout.
8208 \begin_layout Plain Layout
8209 Really bad syntax errors may even caused \SpecialChar LyX
8211 This is because certain sorts of errors may make \SpecialChar LyX
8222 The \SpecialChar LyX
8223 team strives to keep \SpecialChar LyX
8224 stable in such situations, but safe is better
8229 \begin_layout Plain Layout
8230 While we're giving advice: make regular backups.
8231 And be nice to your mother.
8239 \begin_layout Subsection
8240 The Module declaration
8243 \begin_layout Standard
8244 A module must begin with a line like the following:
8247 \begin_layout LyX-Code
8254 \begin_layout Plain Layout
8261 yXModule[endnotes.sty]{Endnotes}
8264 \begin_layout Standard
8265 The mandatory argument, in curly brackets, is the name of the module, as
8267 \begin_inset Flex MenuItem
8270 \begin_layout Plain Layout
8271 Document\SpecialChar menuseparator
8272 Settings\SpecialChar menuseparator
8279 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8281 on which the module depends.
8282 It is also possible to use the form
8283 \begin_inset Flex MenuItem
8286 \begin_layout Plain Layout
8292 as an optional argument, which declares that the module can only be used
8293 when there exists a conversion chain between the formats `
8294 \begin_inset Flex Code
8297 \begin_layout Plain Layout
8304 \begin_inset Flex Code
8307 \begin_layout Plain Layout
8316 \begin_layout Standard
8317 The module declaration should then be followed by lines like the following
8321 \begin_layout Plain Layout
8322 Preferably in English if the module should be published with \SpecialChar LyX
8324 This description will appear in the list of messages to be translated and
8325 will be thus translated with the next interface update.
8333 \begin_layout LyX-Code
8337 \begin_layout LyX-Code
8338 #Adds an endnote command, in addition to footnotes.
8342 \begin_layout LyX-Code
8343 #You will need to add
8345 theendnotes in \SpecialChar TeX
8349 \begin_layout LyX-Code
8350 #want the endnotes to appear.
8354 \begin_layout LyX-Code
8358 \begin_layout LyX-Code
8359 #Requires: somemodule | othermodule
8362 \begin_layout LyX-Code
8363 #Excludes: badmodule
8366 \begin_layout Standard
8367 The description is used in
8368 \begin_inset Flex MenuItem
8371 \begin_layout Plain Layout
8372 Document\SpecialChar menuseparator
8373 Settings\SpecialChar menuseparator
8379 to provide the user with information about what the module does.
8381 \begin_inset Flex Code
8384 \begin_layout Plain Layout
8390 line is used to identify other modules with which this one must be used;
8392 \begin_inset Flex Code
8395 \begin_layout Plain Layout
8401 line is used to identify modules with which this one may not be used.
8402 Both are optional, and, as shown, multiple modules should be separated
8403 with the pipe symbol: |.
8404 Note that the required modules are treated disjunctively:
8408 of the required modules must be used.
8413 excluded module may be used.
8414 Note that modules are identified here by their filenames without the
8415 \begin_inset Flex Code
8418 \begin_layout Plain Layout
8426 \begin_inset Flex Code
8429 \begin_layout Plain Layout
8436 \begin_inset Flex Code
8439 \begin_layout Plain Layout
8448 \begin_layout Subsection
8452 \begin_layout Standard
8453 The first non-comment line of any layout file, included file, or module
8458 contain the file format number:
8461 \begin_layout Description
8462 \begin_inset Flex Code
8465 \begin_layout Plain Layout
8472 \begin_inset Flex Code
8475 \begin_layout Plain Layout
8481 ] The format number of the layout file.
8484 \begin_layout Standard
8485 This tag was introduced with \SpecialChar LyX
8487 \begin_inset space ~
8491 Layout files from older \SpecialChar LyX
8492 versions do not have an explicit file format and
8493 are considered to have
8494 \begin_inset Flex Code
8497 \begin_layout Plain Layout
8499 \begin_inset space ~
8508 The format for the present version of \SpecialChar LyX
8510 But each version of \SpecialChar LyX
8511 is capable of reading earlier versions' layout files,
8512 just as they are capable of reading files produced by earlier versions
8515 There is, however, no provision for converting to earlier formats.
8518 \begin_layout Subsection
8519 \begin_inset CommandInset label
8521 name "sub:General-text-class"
8525 General text class parameters
8528 \begin_layout Standard
8529 These are general parameters that govern the behavior of an entire document
8535 mean that they must appear in
8536 \begin_inset Flex Code
8539 \begin_layout Plain Layout
8545 files rather than in modules.
8546 A module can contain any layout tag.)
8549 \begin_layout Description
8550 \begin_inset Flex Code
8553 \begin_layout Plain Layout
8559 Adds information that will be output in the
8560 \begin_inset Flex Code
8563 \begin_layout Plain Layout
8569 block when the document is output to XHTML.
8570 Typically, this would be used to output CSS style information, but it can
8571 be used for anything that can appear in
8572 \begin_inset Flex Code
8575 \begin_layout Plain Layout
8583 \begin_inset Quotes eld
8587 \begin_inset Flex Code
8590 \begin_layout Plain Layout
8597 \begin_inset Quotes erd
8603 \begin_layout Description
8604 \begin_inset Flex Code
8607 \begin_layout Plain Layout
8613 Adds information to the document preamble.
8615 \begin_inset Newline newline
8619 \begin_inset Quotes eld
8623 \begin_inset Flex Code
8626 \begin_layout Plain Layout
8633 \begin_inset Quotes erd
8639 \begin_layout Description
8640 \begin_inset Flex Code
8643 \begin_layout Plain Layout
8649 Defines formats for use in the display of bibliographic information.
8651 \begin_inset CommandInset ref
8653 reference "sub:Citation-format-description"
8659 \begin_inset Quotes eld
8663 \begin_inset Flex Code
8666 \begin_layout Plain Layout
8673 \begin_inset Quotes erd
8679 \begin_layout Description
8680 \begin_inset Flex Code
8683 \begin_layout Plain Layout
8689 Describes various global options supported by the document class.
8691 \begin_inset CommandInset ref
8693 reference "sub:ClassOptions"
8699 \begin_inset Quotes eld
8703 \begin_inset Flex Code
8706 \begin_layout Plain Layout
8713 \begin_inset Quotes erd
8719 \begin_layout Description
8720 \begin_inset Flex Code
8723 \begin_layout Plain Layout
8730 \begin_inset Flex Code
8733 \begin_layout Plain Layout
8742 \begin_inset space \thinspace{}
8746 \begin_inset Flex Code
8749 \begin_layout Plain Layout
8755 ] Whether the class should
8759 to having one or two columns.
8760 Can be changed in the
8761 \begin_inset Flex MenuItem
8764 \begin_layout Plain Layout
8765 Document\SpecialChar menuseparator
8774 \begin_layout Description
8775 \begin_inset Flex Code
8778 \begin_layout Plain Layout
8785 \begin_inset Flex Code
8788 \begin_layout Plain Layout
8794 ] This sequence defines the properties for a counter.
8795 If the counter does not yet exist, it is created; if it does exist, it
8798 \begin_inset Quotes eld
8802 \begin_inset Flex Code
8805 \begin_layout Plain Layout
8812 \begin_inset Quotes erd
8816 \begin_inset Newline newline
8820 \begin_inset CommandInset ref
8822 reference "sub:Counters"
8826 for details on counters.
8829 \begin_layout Description
8830 \begin_inset Flex Code
8833 \begin_layout Plain Layout
8839 Sets the default font used to display the document.
8841 \begin_inset CommandInset ref
8843 reference "sub:Font-description"
8847 for how to declare fonts.
8849 \begin_inset Quotes eld
8853 \begin_inset Flex Code
8856 \begin_layout Plain Layout
8863 \begin_inset Quotes erd
8869 \begin_layout Description
8870 \begin_inset Flex Code
8873 \begin_layout Plain Layout
8880 \begin_inset Flex Code
8883 \begin_layout Plain Layout
8889 ] Specifies a module to be included by default with this document class.
8890 The module is specified as filename without the
8891 \begin_inset Flex Code
8894 \begin_layout Plain Layout
8901 The user can still remove the module, but it will be active at the outset.
8902 (This applies only when new files are created, or when this class is chosen
8903 for an existing document.)
8906 \begin_layout Description
8907 \begin_inset Flex Code
8910 \begin_layout Plain Layout
8917 \begin_inset Flex Code
8920 \begin_layout Plain Layout
8926 ] This is the style that will be assigned to new paragraphs, usually
8927 \begin_inset Flex MenuItem
8930 \begin_layout Plain Layout
8937 This will default to the first defined style if not given, but you are
8938 encouraged to use this directive.
8941 \begin_layout Description
8942 \begin_inset Flex Code
8945 \begin_layout Plain Layout
8952 \begin_inset Flex Code
8955 \begin_layout Plain Layout
8961 ] This tag indicates that the module (which is specified by filename without
8963 \begin_inset Flex Code
8966 \begin_layout Plain Layout
8972 extension) cannot be used with this document class.
8973 This might be used in a journal-specific layout file to prevent, say, the
8975 \begin_inset Flex Code
8978 \begin_layout Plain Layout
8984 module that numbers theorems by section.
8989 be used in a module.
8990 Modules have their own way of excluding other modules (see
8991 \begin_inset CommandInset ref
8993 reference "sub:Layout-modules"
9000 \begin_layout Description
9001 \begin_inset Flex Code
9004 \begin_layout Plain Layout
9010 Defines a new float.
9012 \begin_inset CommandInset ref
9014 reference "sub:Floats"
9020 \begin_inset Quotes eld
9024 \begin_inset Flex Code
9027 \begin_layout Plain Layout
9034 \begin_inset Quotes erd
9040 \begin_layout Description
9041 \begin_inset Flex Code
9044 \begin_layout Plain Layout
9050 Sets the information that will be output in the
9051 \begin_inset Flex Code
9054 \begin_layout Plain Layout
9060 block when this document class is output to XHTML.
9061 Note that this will completely override any prior
9062 \begin_inset Flex Code
9065 \begin_layout Plain Layout
9072 \begin_inset Flex Code
9075 \begin_layout Plain Layout
9083 \begin_inset Newline newline
9087 \begin_inset Flex Code
9090 \begin_layout Plain Layout
9096 if you just want to add material to the preamble.) Must end with
9097 \begin_inset Quotes eld
9101 \begin_inset Flex Code
9104 \begin_layout Plain Layout
9111 \begin_inset Quotes erd
9117 \begin_layout Description
9118 \begin_inset Flex Code
9121 \begin_layout Plain Layout
9128 \begin_inset Flex Code
9131 \begin_layout Plain Layout
9137 ] The style to use for the table of contents, bibliography, and so forth,
9138 when the document is output to HTML.
9139 For articles, this should normally be
9140 \begin_inset Flex Code
9143 \begin_layout Plain Layout
9150 \begin_inset Flex Code
9153 \begin_layout Plain Layout
9160 If it is not given, then \SpecialChar LyX
9161 will attempt to figure out which layout to use.
9164 \begin_layout Description
9165 \begin_inset Flex Code
9168 \begin_layout Plain Layout
9175 \begin_inset Flex Code
9178 \begin_layout Plain Layout
9184 ] Modifies the properties of the given counter.
9185 If the counter does not exist, the statement is ignored.
9187 \begin_inset Quotes eld
9191 \begin_inset Flex Code
9194 \begin_layout Plain Layout
9201 \begin_inset Quotes erd
9205 \begin_inset Newline newline
9209 \begin_inset CommandInset ref
9211 reference "sub:Counters"
9215 for details on counters.
9218 \begin_layout Description
9219 \begin_inset Flex Code
9222 \begin_layout Plain Layout
9229 \begin_inset Flex Code
9232 \begin_layout Plain Layout
9238 ] Modifies the properties of the given paragraph style.
9239 If the style does not exist, the statement is ignored.
9241 \begin_inset Quotes eld
9245 \begin_inset Flex Code
9248 \begin_layout Plain Layout
9255 \begin_inset Quotes erd
9261 \begin_layout Description
9262 \begin_inset Flex Code
9265 \begin_layout Plain Layout
9272 \begin_inset Flex Code
9275 \begin_layout Plain Layout
9281 ] This allows you to include another layout definition file within yours
9282 to avoid duplicating commands.
9283 Common examples are the standard layout files, for example,
9284 \begin_inset Flex Code
9287 \begin_layout Plain Layout
9293 , which contains most of the basic layouts.
9296 \begin_layout Description
9297 \begin_inset Flex Code
9300 \begin_layout Plain Layout
9307 \begin_inset Flex Code
9310 \begin_layout Plain Layout
9316 ] This section (re-)defines the layout of an inset.
9317 It can be applied to an existing inset or to a new, user-defined inset,
9318 e.g., a new character style.
9320 \begin_inset Quotes eld
9324 \begin_inset Flex Code
9327 \begin_layout Plain Layout
9334 \begin_inset Quotes erd
9338 \begin_inset Newline newline
9342 \begin_inset CommandInset ref
9344 reference "sub:Flex-insets-and"
9348 for more information.
9352 \begin_layout Description
9353 \begin_inset Flex Code
9356 \begin_layout Plain Layout
9363 \begin_inset Flex Code
9366 \begin_layout Plain Layout
9372 ] A string that indicates the width of the left margin on the screen, for
9374 \begin_inset Quotes eld
9378 \begin_inset Flex Code
9381 \begin_layout Plain Layout
9388 \begin_inset Quotes erd
9392 (Note that this is not a `length', like
9393 \begin_inset Quotes eld
9397 \begin_inset Quotes erd
9403 \begin_layout Description
9404 \begin_inset Flex Code
9407 \begin_layout Plain Layout
9414 \begin_inset Flex Code
9417 \begin_layout Plain Layout
9423 ] Deletes an existing counter, usually one defined in an included file.
9426 \begin_layout Description
9427 \begin_inset Flex Code
9430 \begin_layout Plain Layout
9437 \begin_inset Flex Code
9440 \begin_layout Plain Layout
9446 ] Deletes an existing float.
9447 This is particularly useful when you want to suppress a float that has
9448 been defined in an input file.
9451 \begin_layout Description
9452 \begin_inset Flex Code
9455 \begin_layout Plain Layout
9462 \begin_inset Flex Code
9465 \begin_layout Plain Layout
9471 ] Deletes an existing style.
9474 \begin_layout Description
9475 \begin_inset Flex Code
9478 \begin_layout Plain Layout
9485 \begin_inset Flex Code
9488 \begin_layout Plain Layout
9494 ] The file format (as defined in the \SpecialChar LyX
9495 preferences) produced by this document
9497 It is mainly useful when
9498 \begin_inset Flex Code
9501 \begin_layout Plain Layout
9508 \begin_inset Flex Code
9511 \begin_layout Plain Layout
9517 and one wants to define a new type of literate document.
9518 The format is reset to
9519 \begin_inset Quotes eld
9523 \begin_inset Flex Code
9526 \begin_layout Plain Layout
9533 \begin_inset Quotes erd
9537 \begin_inset Quotes eld
9541 \begin_inset Flex Code
9544 \begin_layout Plain Layout
9551 \begin_inset Quotes erd
9554 when the corresponding
9555 \begin_inset Flex Code
9558 \begin_layout Plain Layout
9564 parameter is encountered.
9567 \begin_layout Description
9568 \begin_inset Flex Code
9571 \begin_layout Plain Layout
9578 \begin_inset Flex Code
9581 \begin_layout Plain Layout
9592 \begin_inset Flex Code
9595 \begin_layout Plain Layout
9602 \begin_inset Flex Code
9605 \begin_layout Plain Layout
9611 ] Specifies what sort of output documents using this class will produce.
9614 \begin_layout Description
9615 \begin_inset Flex Code
9618 \begin_layout Plain Layout
9625 \begin_inset Flex Code
9628 \begin_layout Plain Layout
9635 \begin_inset Flex Code
9638 \begin_layout Plain Layout
9644 ] Specifies options, given in the second string, for the package named by
9647 \begin_inset Quotes eld
9651 \begin_inset Flex Code
9654 \begin_layout Plain Layout
9655 PackageOptions natbib square
9661 \begin_inset Quotes erd
9665 \begin_inset Flex Code
9668 \begin_layout Plain Layout
9674 to be loaded with the
9675 \begin_inset Flex Code
9678 \begin_layout Plain Layout
9685 (For \SpecialChar TeX
9686 perts, this causes \SpecialChar LyX
9688 \begin_inset Flex Code
9691 \begin_layout Plain Layout
9694 PassOptionsToPackage{natbib}{square}
9700 \begin_inset Flex Code
9703 \begin_layout Plain Layout
9712 \begin_layout Description
9713 \begin_inset Flex Code
9716 \begin_layout Plain Layout
9723 \begin_inset Flex Code
9726 \begin_layout Plain Layout
9735 \begin_inset Flex Code
9738 \begin_layout Plain Layout
9745 \begin_inset Flex Code
9748 \begin_layout Plain Layout
9754 ] The default pagestyle.
9755 Can be changed in the
9756 \begin_inset Flex MenuItem
9759 \begin_layout Plain Layout
9760 Document\SpecialChar menuseparator
9769 \begin_layout Description
9770 \begin_inset Flex Code
9773 \begin_layout Plain Layout
9779 Sets the preamble for the \SpecialChar LaTeX
9781 Note that this will completely override any prior
9782 \begin_inset Flex Code
9785 \begin_layout Plain Layout
9792 \begin_inset Flex Code
9795 \begin_layout Plain Layout
9803 \begin_inset Flex Code
9806 \begin_layout Plain Layout
9812 if you just want to add material to the preamble.) Must end with
9813 \begin_inset Quotes eld
9817 \begin_inset Flex Code
9820 \begin_layout Plain Layout
9827 \begin_inset Quotes erd
9833 \begin_layout Description
9834 \begin_inset Flex Code
9837 \begin_layout Plain Layout
9844 \begin_inset Flex Code
9847 \begin_layout Plain Layout
9854 \begin_inset Flex Code
9857 \begin_layout Plain Layout
9866 \begin_inset space \thinspace{}
9870 \begin_inset Flex Code
9873 \begin_layout Plain Layout
9879 ] Whether the class already provides the feature
9880 \begin_inset Flex Code
9883 \begin_layout Plain Layout
9890 A feature is in general the name of a package (e.
9891 \begin_inset space \thinspace{}
9895 \begin_inset space \space{}
9899 \begin_inset Flex Code
9902 \begin_layout Plain Layout
9909 \begin_inset Flex Code
9912 \begin_layout Plain Layout
9919 \begin_inset space \thinspace{}
9923 \begin_inset space \space{}
9927 \begin_inset Flex Code
9930 \begin_layout Plain Layout
9937 \begin_inset Flex Code
9940 \begin_layout Plain Layout
9948 \begin_inset CommandInset ref
9950 reference "chap:List-of-functions"
9954 for the list of features.
9957 \begin_layout Description
9958 \begin_inset Flex Code
9961 \begin_layout Plain Layout
9968 \begin_inset Flex Code
9971 \begin_layout Plain Layout
9977 ] Indicates that this layout provides the functionality of the module mentioned,
9978 which should be specified by the filename without the
9979 \begin_inset Flex Code
9982 \begin_layout Plain Layout
9989 This will typically be used if the layout includes the module directly,
9990 rather than using the
9991 \begin_inset Flex Code
9994 \begin_layout Plain Layout
10000 tag to indicate that it ought to be used.
10001 It could also be used in a module that provided an alternate implementation
10002 of the same functionality.
10005 \begin_layout Description
10006 \begin_inset Flex Code
10009 \begin_layout Plain Layout
10016 \begin_inset Flex Code
10019 \begin_layout Plain Layout
10025 ] Whether the class requires the feature
10026 \begin_inset Flex Code
10029 \begin_layout Plain Layout
10036 Multiple features must be separated by commas.
10037 Note that you can only request supported features.
10039 \begin_inset CommandInset ref
10041 reference "chap:List-of-functions"
10045 for the list of features.)
10048 \begin_layout Description
10049 \begin_inset Flex Code
10052 \begin_layout Plain Layout
10059 \begin_inset Flex Code
10062 \begin_layout Plain Layout
10068 ] A string that indicates the width of the right margin on the screen, for
10070 \begin_inset Quotes eld
10074 \begin_inset Flex Code
10077 \begin_layout Plain Layout
10084 \begin_inset Quotes erd
10090 \begin_layout Description
10091 \begin_inset Flex Code
10094 \begin_layout Plain Layout
10101 \begin_inset Flex Code
10104 \begin_layout Plain Layout
10110 ] Sets which divisions get numbered.
10112 \begin_inset Newline newline
10116 \begin_inset Flex Code
10119 \begin_layout Plain Layout
10125 counter in \SpecialChar LaTeX
10129 \begin_layout Description
10130 \begin_inset Flex Code
10133 \begin_layout Plain Layout
10140 \begin_inset Flex Code
10143 \begin_layout Plain Layout
10152 \begin_inset space \thinspace{}
10156 \begin_inset Flex Code
10159 \begin_layout Plain Layout
10165 ] Whether the class-default should be printing on one or both sides of the
10167 Can be changed in the
10168 \begin_inset Flex MenuItem
10171 \begin_layout Plain Layout
10172 Document\SpecialChar menuseparator
10181 \begin_layout Description
10182 \begin_inset Flex Code
10185 \begin_layout Plain Layout
10192 \begin_inset Flex Code
10195 \begin_layout Plain Layout
10201 ] This sequence defines a paragraph style.
10202 If the style does not yet exist, it is created; if it does exist, its parameter
10205 \begin_inset Quotes eld
10209 \begin_inset Flex Code
10212 \begin_layout Plain Layout
10219 \begin_inset Quotes erd
10223 \begin_inset Newline newline
10227 \begin_inset CommandInset ref
10229 reference "sub:Paragraph-Styles"
10233 for details on paragraph styles.
10236 \begin_layout Description
10237 \begin_inset Flex Code
10240 \begin_layout Plain Layout
10247 \begin_inset Flex Code
10250 \begin_layout Plain Layout
10256 ] The name of the command or environment to be used with
10257 \begin_inset Flex Code
10260 \begin_layout Plain Layout
10269 \begin_layout Description
10270 \begin_inset Flex Code
10273 \begin_layout Plain Layout
10280 \begin_inset Flex Code
10283 \begin_layout Plain Layout
10292 \begin_inset Flex Code
10295 \begin_layout Plain Layout
10301 ] Indicates what kind of markup is used to define the title of a document.
10303 \begin_inset Flex Code
10306 \begin_layout Plain Layout
10312 means that the macro with name
10313 \begin_inset Flex Code
10316 \begin_layout Plain Layout
10322 will be inserted after the last layout which has
10323 \begin_inset Quotes eld
10327 \begin_inset Flex Code
10330 \begin_layout Plain Layout
10332 \begin_inset space ~
10341 \begin_inset Quotes erd
10346 \begin_inset Flex Code
10349 \begin_layout Plain Layout
10355 corresponds to the case where all layouts which have
10356 \begin_inset Quotes eld
10360 \begin_inset Flex Code
10363 \begin_layout Plain Layout
10365 \begin_inset space ~
10374 \begin_inset Quotes erd
10377 should be enclosed into the
10378 \begin_inset Flex Code
10381 \begin_layout Plain Layout
10390 \begin_layout Description
10391 \begin_inset Flex Code
10394 \begin_layout Plain Layout
10401 \begin_inset Flex Code
10404 \begin_layout Plain Layout
10410 ] Sets which divisions are included in the table of contents.
10412 \begin_inset Flex Code
10415 \begin_layout Plain Layout
10421 counter in \SpecialChar LaTeX
10425 \begin_layout Subsection
10426 \begin_inset Flex Code
10429 \begin_layout Plain Layout
10436 \begin_inset CommandInset label
10438 name "sub:ClassOptions"
10445 \begin_layout Standard
10447 \begin_inset Flex Code
10450 \begin_layout Plain Layout
10456 section can contain the following entries:
10459 \begin_layout Description
10460 \begin_inset Flex Code
10463 \begin_layout Plain Layout
10470 \begin_inset Flex Code
10473 \begin_layout Plain Layout
10479 ] The list of available font sizes for the document's main font, separated
10481 \begin_inset Quotes eld
10485 \begin_inset Flex Code
10488 \begin_layout Plain Layout
10495 \begin_inset Quotes erd
10501 \begin_layout Description
10502 \begin_inset Flex Code
10505 \begin_layout Plain Layout
10511 Used to set the DTD line with XML-based output classes.
10513 \begin_inset space \thinspace{}
10517 \begin_inset Quotes eld
10520 -//OASIS//DTD DocBook V4.2//EN
10521 \begin_inset Quotes erd
10527 \begin_layout Description
10528 \begin_inset Flex Code
10531 \begin_layout Plain Layout
10538 \begin_inset Flex Code
10541 \begin_layout Plain Layout
10542 string="empty|plain|headings|fancy"
10547 ] The list of available page sty\SpecialChar softhyphen
10549 \begin_inset Quotes eld
10553 \begin_inset Flex Code
10556 \begin_layout Plain Layout
10563 \begin_inset Quotes erd
10569 \begin_layout Description
10570 \begin_inset Flex Code
10573 \begin_layout Plain Layout
10580 \begin_inset Flex Code
10583 \begin_layout Plain Layout
10589 ] Some document class options, separated by a comma, that will be added
10590 to the optional part of the
10591 \begin_inset Flex Code
10594 \begin_layout Plain Layout
10605 \begin_layout Standard
10607 \begin_inset Flex Code
10610 \begin_layout Plain Layout
10616 section must end with
10617 \begin_inset Quotes eld
10621 \begin_inset Flex Code
10624 \begin_layout Plain Layout
10631 \begin_inset Quotes erd
10637 \begin_layout Subsection
10639 \begin_inset CommandInset label
10641 name "sub:Paragraph-Styles"
10648 \begin_layout Standard
10649 A paragraph style description looks like this:
10653 \begin_layout Plain Layout
10654 Note that this will either define a new style or modify an existing one.
10662 \begin_layout LyX-Code
10669 \begin_layout LyX-Code
10673 \begin_layout LyX-Code
10677 \begin_layout Standard
10678 where the following commands are allowed:
10681 \begin_layout Description
10682 \begin_inset Flex Code
10685 \begin_layout Plain Layout
10692 \begin_inset Flex Code
10695 \begin_layout Plain Layout
10700 , left, right, center
10705 ] Paragraph alignment.
10708 \begin_layout Description
10709 \begin_inset Flex Code
10712 \begin_layout Plain Layout
10719 \begin_inset Flex Code
10722 \begin_layout Plain Layout
10727 , left, right, center
10732 ] A comma separated list of permitted alignments.
10733 (Some \SpecialChar LaTeX
10734 styles prohibit certain alignments, since those wouldn't make sense.
10735 For example a right-aligned or centered enumeration isn't possible.)
10738 \begin_layout Description
10739 \begin_inset Flex Code
10742 \begin_layout Plain Layout
10749 \begin_inset Flex Code
10752 \begin_layout Plain Layout
10758 ] Defines argument number <int> of a command\SpecialChar breakableslash
10759 environment associated with
10761 This is useful for things like section headings, and only makes sense with
10764 Every (optional or required) argument of a command or environment – except
10765 for the required argument that is associated with the content of the paragraph
10766 itself – has a separate definition, where the number specifies the order
10768 The definition must end with
10769 \begin_inset Flex Code
10772 \begin_layout Plain Layout
10779 So a command with two optional arguments has:
10780 \begin_inset Separator parbreak
10787 \begin_layout Quote
10793 \begin_layout Quote
10799 \begin_layout Quote
10805 \begin_layout Quote
10811 \begin_layout Quote
10817 \begin_layout Quote
10823 \begin_layout Standard
10825 \begin_inset Flex Code
10828 \begin_layout Plain Layout
10834 definition, the following specifications are possible:
10837 \begin_layout Itemize
10838 \begin_inset Flex Code
10841 \begin_layout Plain Layout
10848 \begin_inset Flex Code
10851 \begin_layout Plain Layout
10857 The string that will appear both in the menu (to insert this argument)
10858 and on the argument inset button (unless you also specify a separate
10859 \begin_inset Flex Code
10862 \begin_layout Plain Layout
10869 For the menu, you can define an accelerator by appending the respective
10870 character to the string, divided by
10871 \begin_inset Quotes eld
10875 \begin_inset Quotes erd
10879 \begin_inset space \thinspace{}
10883 \begin_inset space \space{}
10887 \begin_inset Quotes eld
10891 \begin_inset Flex Code
10894 \begin_layout Plain Layout
10901 \begin_inset Quotes erd
10907 \begin_layout Itemize
10908 \begin_inset Flex Code
10911 \begin_layout Plain Layout
10918 \begin_inset Flex Code
10921 \begin_layout Plain Layout
10927 A separate string for the menu.
10928 You can define an accelerator by appending the respective character to
10929 the string, divided by
10930 \begin_inset Quotes eld
10934 \begin_inset Quotes erd
10938 \begin_inset space \thinspace{}
10942 \begin_inset space \space{}
10946 \begin_inset Quotes eld
10950 \begin_inset Flex Code
10953 \begin_layout Plain Layout
10960 \begin_inset Quotes erd
10964 This specification is optional.
10965 If it is not given the
10966 \begin_inset Flex Code
10969 \begin_layout Plain Layout
10975 will be used instead for the menu.
10978 \begin_layout Itemize
10979 \begin_inset Flex Code
10982 \begin_layout Plain Layout
10989 \begin_inset Flex Code
10992 \begin_layout Plain Layout
10998 A longer explanatory text that appears in the tooltip when hovering over
10999 the argument inset.
11002 \begin_layout Itemize
11003 \begin_inset Flex Code
11006 \begin_layout Plain Layout
11013 \begin_inset Flex Code
11016 \begin_layout Plain Layout
11025 \begin_inset space \thinspace{}
11029 \begin_inset Flex Code
11032 \begin_layout Plain Layout
11038 ] Declare if this is a mandatory (1) or an optional (0) argument.
11039 Mandatory arguments will be output empty if not given, while optional arguments
11040 will not be output at all.
11041 By default, mandatory arguments are delimited by
11042 \begin_inset Flex Code
11045 \begin_layout Plain Layout
11051 , while optional arguments are delimited by
11052 \begin_inset Flex Code
11055 \begin_layout Plain Layout
11064 \begin_layout Itemize
11065 \begin_inset Flex Code
11068 \begin_layout Plain Layout
11075 \begin_inset Flex Code
11078 \begin_layout Plain Layout
11084 defines another argument (by its number) which this argument requires to
11085 be output if it is itself output.
11087 \begin_inset space \thinspace{}
11090 g., in \SpecialChar LaTeX
11091 commands, optional arguments often require previous optional arguments
11092 to be output (at least empty), as in
11093 \begin_inset Flex Code
11096 \begin_layout Plain Layout
11099 command[][argument]{text}
11105 This can be achieved by the statement
11106 \begin_inset Flex Code
11109 \begin_layout Plain Layout
11116 \begin_inset Flex Code
11119 \begin_layout Plain Layout
11128 \begin_layout Itemize
11129 \begin_inset Flex Code
11132 \begin_layout Plain Layout
11139 \begin_inset Flex Code
11142 \begin_layout Plain Layout
11148 defines a custom left delimiter (instead of
11149 \begin_inset Flex Code
11152 \begin_layout Plain Layout
11159 \begin_inset Flex Code
11162 \begin_layout Plain Layout
11169 A line break in the output can be indicated by
11170 \begin_inset Flex Code
11173 \begin_layout Plain Layout
11182 \begin_layout Itemize
11183 \begin_inset Flex Code
11186 \begin_layout Plain Layout
11193 \begin_inset Flex Code
11196 \begin_layout Plain Layout
11202 defines a custom right delimiter (instead of
11203 \begin_inset Flex Code
11206 \begin_layout Plain Layout
11213 \begin_inset Flex Code
11216 \begin_layout Plain Layout
11223 A line break in the output can be indicated by
11224 \begin_inset Flex Code
11227 \begin_layout Plain Layout
11236 \begin_layout Itemize
11237 \begin_inset Flex Code
11240 \begin_layout Plain Layout
11247 \begin_inset Flex Code
11250 \begin_layout Plain Layout
11256 defines an argument that is inserted if and only if no user-specified arguments
11258 \begin_inset space \thinspace{}
11262 \begin_inset space \space{}
11265 if no argument inset has been inserted (note that also an empty argument
11266 inset omits the DefaultArg).
11267 Multiple arguments need to be separated by comma.
11270 \begin_layout Itemize
11271 \begin_inset Flex Code
11274 \begin_layout Plain Layout
11281 \begin_inset Flex Code
11284 \begin_layout Plain Layout
11290 defines an argument that is inserted in any case (alone or in addition
11291 to user-specified arguments).
11292 Multiple arguments need to be separated by comma.
11295 \begin_layout Itemize
11296 \begin_inset Flex Code
11299 \begin_layout Plain Layout
11305 The font used for the argument content, see
11306 \begin_inset CommandInset ref
11308 reference "sub:Font-description"
11315 \begin_layout Itemize
11316 \begin_inset Flex Code
11319 \begin_layout Plain Layout
11325 The font used for the label; see
11326 \begin_inset CommandInset ref
11328 reference "sub:Font-description"
11335 \begin_layout Itemize
11336 \begin_inset Flex Code
11339 \begin_layout Plain Layout
11346 \begin_inset Flex Code
11349 \begin_layout Plain Layout
11354 , Minimalistic, Conglomerate
11359 ] describes the rendering style used for the inset's frame and buttons.
11362 \begin_layout Itemize
11363 \begin_inset Flex Code
11366 \begin_layout Plain Layout
11373 \begin_inset Flex Code
11376 \begin_layout Plain Layout
11383 \begin_inset Flex Code
11386 \begin_layout Plain Layout
11392 , this argument is automatically inserted when the respective style is selected.
11393 Currently, only one argument per style\SpecialChar breakableslash
11394 layout can be automatically inserted.
11395 \change_inserted -712698321 1431166542
11399 \begin_layout Itemize
11401 \change_inserted -712698321 1431166604
11402 \begin_inset Flex Code
11405 \begin_layout Plain Layout
11407 \change_inserted -712698321 1431166548
11414 \begin_inset Flex Code
11417 \begin_layout Plain Layout
11419 \change_inserted -712698321 1431166543
11426 \begin_inset Flex Code
11429 \begin_layout Plain Layout
11431 \change_inserted -712698321 1431166543
11437 , this argument will bei inserted with a copy of the co-text (either selected
11438 text or the whole paragraph) as content.
11441 \begin_layout Itemize
11443 \change_inserted -712698321 1431070588
11444 \begin_inset Flex Code
11447 \begin_layout Plain Layout
11449 \change_inserted -712698321 1431070522
11456 \begin_inset Flex Code
11459 \begin_layout Plain Layout
11461 \change_inserted -712698321 1431070522
11462 string of characters
11471 Defines individual characters that should be output in raw form, meaning
11472 without special translations that \SpecialChar LaTeX
11474 Note that, contrary to PassThru, this needs to be explicitly defined for
11476 That is, arguments do not inherit PassThruChars from their parent inset
11482 \begin_layout Standard
11483 By default, the text entered in the \SpecialChar LyX
11484 workarea in the respective layout is
11485 the last (mandatory) argument of a command if the
11486 \begin_inset Flex Code
11489 \begin_layout Plain Layout
11496 \begin_inset Flex Code
11499 \begin_layout Plain Layout
11506 However, arguments with the prefix
11507 \begin_inset Flex Code
11510 \begin_layout Plain Layout
11516 are output after this workarea argument.
11517 Note that post-argument numbering restarts at 1, so the first argument
11518 following the workarea argument is
11519 \begin_inset Flex Code
11522 \begin_layout Plain Layout
11529 Post-arguments are ignored in any other
11530 \begin_inset Flex Code
11533 \begin_layout Plain Layout
11540 \begin_inset Flex Code
11543 \begin_layout Plain Layout
11552 \begin_layout Standard
11554 \begin_inset Flex Code
11557 \begin_layout Plain Layout
11566 \begin_inset Flex Code
11569 \begin_layout Plain Layout
11578 \begin_inset Flex Code
11581 \begin_layout Plain Layout
11587 followed by the number (e.
11588 \begin_inset space \thinspace{}
11592 \begin_inset space \space{}
11596 \begin_inset Flex Code
11599 \begin_layout Plain Layout
11609 \begin_layout Description
11610 \begin_inset Flex Code
11613 \begin_layout Plain Layout
11619 Note that this will completely override any prior
11620 \begin_inset Flex Code
11623 \begin_layout Plain Layout
11629 declaration for this style.
11631 \begin_inset Quotes eld
11635 \begin_inset Flex Code
11638 \begin_layout Plain Layout
11645 \begin_inset Quotes erd
11650 \begin_inset CommandInset ref
11652 reference "sub:I18n"
11656 for details on its use.
11659 \begin_layout Description
11660 \begin_inset Flex Code
11663 \begin_layout Plain Layout
11670 \begin_inset Flex Code
11673 \begin_layout Plain Layout
11683 \begin_layout Plain Layout
11684 Note that a `float' here is a real number, such as: 1.5.
11689 The vertical space with which the last of a chain of paragraphs with this
11690 style is separated from the following paragraph.
11691 If the next paragraph has another style, the separations are not simply
11692 added, but the maximum is taken.
11695 \begin_layout Description
11696 \begin_inset Flex Code
11699 \begin_layout Plain Layout
11706 \begin_inset Flex Code
11709 \begin_layout Plain Layout
11715 ] The category for this style.
11716 This is used to group related styles in the style combobox on the toolbar.
11717 Any string can be used, but you may want to use existing categories with
11722 \begin_layout Description
11723 \begin_inset Flex Code
11726 \begin_layout Plain Layout
11732 Depth of XML command.
11733 Used only with XML-type formats.
11736 \begin_layout Description
11737 \begin_inset Flex Code
11740 \begin_layout Plain Layout
11747 \begin_inset Flex Code
11750 \begin_layout Plain Layout
11756 ] Copies all the features of an existing style into the current one.
11760 \begin_layout Description
11761 \begin_inset Flex Code
11764 \begin_layout Plain Layout
11771 \begin_inset Flex Code
11774 \begin_layout Plain Layout
11780 ] The name of a style whose preamble should be output
11785 This allows to ensure some ordering of the preamble snippets when macros
11786 definitions depend on one another.
11790 \begin_layout Plain Layout
11791 Note that, besides that functionality, there is no way to ensure any ordering
11793 The ordering that you see in a given version of \SpecialChar LyX
11794 may change without warning
11803 \begin_layout Description
11804 \begin_inset Flex Code
11807 \begin_layout Plain Layout
11814 \begin_inset Flex Code
11817 \begin_layout Plain Layout
11822 , Box, Filled_Box, Static
11827 ] The type of label that stands at the end of the paragraph (or sequence
11829 \begin_inset Flex Code
11832 \begin_layout Plain Layout
11839 \begin_inset Newline newline
11843 \begin_inset Flex Code
11846 \begin_layout Plain Layout
11853 \begin_inset Flex Code
11856 \begin_layout Plain Layout
11863 \begin_inset Flex Code
11866 \begin_layout Plain Layout
11874 \begin_inset Flex Code
11877 \begin_layout Plain Layout
11884 \begin_inset Quotes eld
11888 \begin_inset Quotes erd
11892 \begin_inset Flex Code
11895 \begin_layout Plain Layout
11902 \begin_inset space \space{}
11906 \begin_inset Flex Code
11909 \begin_layout Plain Layout
11915 ) is a white (resp.
11916 \begin_inset space ~
11919 black) square suitable for end of proof markers,
11920 \begin_inset Flex Code
11923 \begin_layout Plain Layout
11929 is an explicit text string.
11932 \begin_layout Description
11933 \begin_inset Flex Code
11936 \begin_layout Plain Layout
11943 \begin_inset Flex Code
11946 \begin_layout Plain Layout
11952 ] The string used for a label with a
11953 \begin_inset Flex Code
11956 \begin_layout Plain Layout
11963 \begin_inset Newline newline
11967 \begin_inset Flex Code
11970 \begin_layout Plain Layout
11980 \begin_layout Description
11981 \begin_inset Flex Code
11984 \begin_layout Plain Layout
11990 The font used for both the text body
11996 \begin_inset CommandInset ref
11998 reference "sub:Font-description"
12003 Note that defining this font automatically defines the
12004 \begin_inset Flex Code
12007 \begin_layout Plain Layout
12014 So you should define this one first if you also want to define
12015 \begin_inset Flex Code
12018 \begin_layout Plain Layout
12027 \begin_layout Description
12028 \begin_inset Flex Code
12031 \begin_layout Plain Layout
12038 \begin_inset Flex Code
12041 \begin_layout Plain Layout
12047 ] Used for backporting new styles to stable \SpecialChar LyX
12049 The first stable version that supports this tag is \SpecialChar LyX
12051 The argument is a number which may either be 0, -1 or any value greater
12054 \begin_inset Flex Code
12057 \begin_layout Plain Layout
12063 flag of a style is greater than zero, it will always be written to the
12065 If a .lyx file is read, the style definitions from the document header are
12066 added to the document class.
12067 Therefore even older \SpecialChar LyX
12068 versions can handle the style.
12070 \begin_inset Flex Code
12073 \begin_layout Plain Layout
12079 is a version number: If the style is read, and the version number is less
12080 than the version number of the already existing style in the document class,
12081 the new style is ignored.
12082 If the version number is greater, the new style replaces the existing style.
12083 A value of -1 means an infinite version number, i.
12084 \begin_inset space \thinspace{}
12088 \begin_inset space \space{}
12091 the style is always used.
12094 \begin_layout Description
12095 \begin_inset Flex Code
12098 \begin_layout Plain Layout
12105 \begin_inset Flex Code
12108 \begin_layout Plain Layout
12117 \begin_inset space \thinspace{}
12121 \begin_inset Flex Code
12124 \begin_layout Plain Layout
12130 ] Usually \SpecialChar LyX
12131 does not allow you to insert more than one space between words,
12132 since a space is considered as the separation between two words, not a
12133 character or symbol of its own.
12134 This is a very fine thing but sometimes annoying, for example, when typing
12135 program code or plain \SpecialChar LaTeX
12138 \begin_inset Flex Code
12141 \begin_layout Plain Layout
12148 Note that \SpecialChar LyX
12149 will create protected blanks for the additional blanks when
12150 in another mode than \SpecialChar LaTeX
12154 \begin_layout Description
12155 \begin_inset Flex Code
12158 \begin_layout Plain Layout
12164 These tags are used with XHTML output.
12166 \begin_inset CommandInset ref
12168 reference "sub:Paragraph-Style-XHTML"
12175 \begin_layout Description
12176 \begin_inset Flex Code
12179 \begin_layout Plain Layout
12185 [FIXME] (Used only with XML-type formats.)
12188 \begin_layout Description
12189 \begin_inset Flex Code
12192 \begin_layout Plain Layout
12199 \begin_inset Flex Code
12202 \begin_layout Plain Layout
12211 \begin_inset space \thinspace{}
12215 \begin_inset Flex Code
12218 \begin_layout Plain Layout
12225 \begin_inset Flex Code
12228 \begin_layout Plain Layout
12234 , marks the style as to be included in the document preamble and not in
12236 This is useful for document classes that want such information as the title
12237 and author to appear in the preamble.
12238 Note that this works only for styles for which the
12239 \begin_inset Flex Code
12242 \begin_layout Plain Layout
12249 \begin_inset Flex Code
12252 \begin_layout Plain Layout
12259 \begin_inset Flex Code
12262 \begin_layout Plain Layout
12271 \begin_layout Description
12272 \begin_inset Flex Code
12275 \begin_layout Plain Layout
12282 \begin_inset Flex Code
12285 \begin_layout Plain Layout
12294 \begin_inset space \thinspace{}
12298 \begin_inset Flex Code
12301 \begin_layout Plain Layout
12308 \begin_inset Flex Code
12311 \begin_layout Plain Layout
12317 , marks the style as being part of a title block (see also the
12318 \begin_inset Flex Code
12321 \begin_layout Plain Layout
12328 \begin_inset Flex Code
12331 \begin_layout Plain Layout
12340 \begin_layout Description
12341 \begin_inset Flex Code
12344 \begin_layout Plain Layout
12351 \begin_inset Flex Code
12354 \begin_layout Plain Layout
12360 ] The \SpecialChar LaTeX
12361 command sequence declaring an item in a list.
12362 The command is to be defined without the preceding backslash (the default
12364 \begin_inset Quotes eld
12368 \begin_inset Quotes erd
12372 \begin_inset Flex Code
12375 \begin_layout Plain Layout
12383 in the \SpecialChar LaTeX
12387 \begin_layout Description
12388 \begin_inset Flex Code
12391 \begin_layout Plain Layout
12398 \begin_inset Flex Code
12401 \begin_layout Plain Layout
12407 ] This provides extra space between paragraphs that have the same style.
12408 If you put other styles into an environment, each is separated with the
12410 \begin_inset Flex Code
12413 \begin_layout Plain Layout
12420 But the whole items of the environment are additionally separated with
12422 \begin_inset Flex Code
12425 \begin_layout Plain Layout
12432 Note that this is a
12437 \begin_layout Description
12438 \begin_inset Flex Code
12441 \begin_layout Plain Layout
12447 [FIXME] (Used only with XML-type formats.)
12450 \begin_layout Description
12451 \begin_inset Flex Code
12454 \begin_layout Plain Layout
12461 \begin_inset Flex Code
12464 \begin_layout Plain Layout
12473 \begin_inset space \thinspace{}
12477 \begin_inset Flex Code
12480 \begin_layout Plain Layout
12486 ] Usually \SpecialChar LyX
12487 does not allow you to leave a paragraph empty, since it would
12488 lead to empty \SpecialChar LaTeX
12490 There are some cases where this could be desirable however: in a letter
12491 template, the required fields can be provided as empty fields, so that
12492 people do not forget them; in some special classes, a style can be used
12493 as some kind of break, which does not contain actual text.
12496 \begin_layout Description
12497 \begin_inset Flex Code
12500 \begin_layout Plain Layout
12507 \begin_inset Flex Code
12510 \begin_layout Plain Layout
12516 ] The vertical space between the label and the text body.
12517 Only used for labels that are above the text body (
12518 \begin_inset Flex Code
12521 \begin_layout Plain Layout
12528 \begin_inset Newline newline
12532 \begin_inset Flex Code
12535 \begin_layout Plain Layout
12536 Centered_Top_Environment
12544 \begin_layout Description
12545 \begin_inset Flex Code
12548 \begin_layout Plain Layout
12555 \begin_inset Flex Code
12558 \begin_layout Plain Layout
12564 ] The name of the counter for automatic numbering.
12565 In order to have the counter appear with your label, you will need to reference
12567 \begin_inset Flex Code
12570 \begin_layout Plain Layout
12579 This will work with
12580 \begin_inset Flex Code
12583 \begin_layout Plain Layout
12590 \begin_inset Flex Code
12593 \begin_layout Plain Layout
12600 \begin_inset Flex Code
12603 \begin_layout Plain Layout
12610 \begin_inset Flex Code
12613 \begin_layout Plain Layout
12620 \begin_inset Newline newline
12628 \begin_inset Flex Code
12631 \begin_layout Plain Layout
12638 \begin_inset Flex Code
12641 \begin_layout Plain Layout
12647 , though this case is a bit complicated.
12648 Suppose you declare
12649 \begin_inset Quotes eld
12653 \begin_inset Flex Code
12656 \begin_layout Plain Layout
12657 LabelCounter myenum
12663 \begin_inset Quotes erd
12667 Then the actual counters used are
12668 \begin_inset Flex Code
12671 \begin_layout Plain Layout
12678 \begin_inset Flex Code
12681 \begin_layout Plain Layout
12688 \begin_inset Flex Code
12691 \begin_layout Plain Layout
12698 \begin_inset Flex Code
12701 \begin_layout Plain Layout
12707 , much as in \SpecialChar LaTeX
12709 These counters must all be declared separately.
12710 \begin_inset Newline newline
12714 \begin_inset CommandInset ref
12716 reference "sub:Counters"
12720 for details on counters.
12723 \begin_layout Description
12724 \begin_inset Flex Code
12727 \begin_layout Plain Layout
12733 The font used for the label.
12735 \begin_inset CommandInset ref
12737 reference "sub:Font-description"
12744 \begin_layout Description
12745 \begin_inset Flex Code
12748 \begin_layout Plain Layout
12755 \begin_inset Flex Code
12758 \begin_layout Plain Layout
12764 ] Text that indicates how far a label should be indented.
12767 \begin_layout Description
12768 \begin_inset Flex Code
12771 \begin_layout Plain Layout
12778 \begin_inset Flex Code
12781 \begin_layout Plain Layout
12787 ] Text that indicates the amount of horizontal space between the label and
12789 Only used for labels that are not above the text body.
12792 \begin_layout Description
12793 \begin_inset Flex Code
12796 \begin_layout Plain Layout
12803 \begin_inset Flex Code
12806 \begin_layout Plain Layout
12812 ] The string used for the label.
12814 \begin_inset Flex Code
12817 \begin_layout Plain Layout
12823 is set, this string can be contain the special formatting commands described
12825 \begin_inset CommandInset ref
12827 reference "sub:Counters"
12834 \begin_layout Description
12835 \begin_inset Flex Code
12838 \begin_layout Plain Layout
12839 LabelStringAppendix
12845 \begin_inset Flex Code
12848 \begin_layout Plain Layout
12854 ] This is used inside the appendix instead of
12855 \begin_inset Newline newline
12859 \begin_inset Flex Code
12862 \begin_layout Plain Layout
12870 \begin_inset Flex Code
12873 \begin_layout Plain Layout
12880 \begin_inset Newline newline
12884 \begin_inset Flex Code
12887 \begin_layout Plain Layout
12888 LabelStringAppendix
12896 \begin_layout Description
12897 \begin_inset Flex Code
12900 \begin_layout Plain Layout
12906 [FIXME] (Used only with XML-type formats.)
12909 \begin_layout Description
12910 \begin_inset Flex Code
12913 \begin_layout Plain Layout
12920 \begin_inset Flex Code
12923 \begin_layout Plain Layout
12928 , Manual, Static, Above,
12929 \begin_inset Newline newline
12932 Centered, Sensitive, Enumerate,
12933 \begin_inset Newline newline
12936 Itemize, Bibliography
12942 \begin_inset Separator parbreak
12949 \begin_layout Description
12950 \begin_inset Flex Code
12953 \begin_layout Plain Layout
12959 means the label is the very first word (up to the first real blank).
12960 Use protected spaces if you want more than one word as the label.
12964 \begin_layout Description
12965 \begin_inset Flex Code
12968 \begin_layout Plain Layout
12974 means the label is simply what is declared as
12975 \begin_inset Flex Code
12978 \begin_layout Plain Layout
12985 This will be displayed
12986 \begin_inset Quotes eld
12990 \begin_inset Quotes erd
12993 , at the beginning of the paragraph.
12995 \begin_inset Flex Code
12998 \begin_layout Plain Layout
13005 \begin_inset Flex Code
13008 \begin_layout Plain Layout
13014 , then it will be displayed only in the first paragraph of any sequence
13015 of paragraphs with the same
13016 \begin_inset Flex Code
13019 \begin_layout Plain Layout
13028 \begin_layout Description
13029 \begin_inset Flex Code
13032 \begin_layout Plain Layout
13039 \begin_inset space ~
13043 \begin_inset space ~
13047 \begin_inset Flex Code
13050 \begin_layout Plain Layout
13056 are special cases of
13057 \begin_inset Flex Code
13060 \begin_layout Plain Layout
13067 The label will be printed above the paragraph either at the beginning of
13068 the line or centered.
13071 \begin_layout Description
13072 \begin_inset Flex Code
13075 \begin_layout Plain Layout
13081 is a special case for the caption-labels
13082 \begin_inset Quotes eld
13086 \begin_inset Quotes erd
13090 \begin_inset Quotes eld
13094 \begin_inset Quotes erd
13098 \begin_inset Newline newline
13102 \begin_inset Flex Code
13105 \begin_layout Plain Layout
13111 means the (hardcoded) label string depends on the kind of float: It is
13112 hardcoded to be `FloatType N', where N is the value of the counter associated
13114 For the case that a caption is inserted outside of a float the
13115 \begin_inset Flex Code
13118 \begin_layout Plain Layout
13125 \begin_inset Quotes eld
13129 \begin_inset Quotes erd
13135 \begin_layout Description
13136 \begin_inset Flex Code
13139 \begin_layout Plain Layout
13145 produces the usual sort of enumeration labels.
13146 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13147 small Roman numerals, and uppercase letters for the four possible depths.
13150 \begin_layout Description
13151 \begin_inset Flex Code
13154 \begin_layout Plain Layout
13160 produces various bullets at the different levels.
13161 It is also hardcoded.
13164 \begin_layout Description
13165 \begin_inset Flex Code
13168 \begin_layout Plain Layout
13174 should be used only with
13175 \begin_inset Flex Code
13178 \begin_layout Plain Layout
13179 LatexType BibEnvironment
13188 \begin_layout Description
13189 \begin_inset Flex Code
13192 \begin_layout Plain Layout
13198 Note that this will completely override any prior
13199 \begin_inset Flex Code
13202 \begin_layout Plain Layout
13208 declaration for this style.
13210 \begin_inset Quotes eld
13214 \begin_inset Flex Code
13217 \begin_layout Plain Layout
13224 \begin_inset Quotes erd
13229 \begin_inset CommandInset ref
13231 reference "sub:I18n"
13235 for details on its use.
13238 \begin_layout Description
13239 \begin_inset Flex Code
13242 \begin_layout Plain Layout
13249 \begin_inset Flex Code
13252 \begin_layout Plain Layout
13258 ] The name of the corresponding \SpecialChar LaTeX
13260 Either the environment or command name.
13263 \begin_layout Description
13264 \begin_inset Flex Code
13267 \begin_layout Plain Layout
13274 \begin_inset Flex Code
13277 \begin_layout Plain Layout
13283 ] An optional parameter for the corresponding
13284 \begin_inset Flex Code
13287 \begin_layout Plain Layout
13294 This parameter cannot be changed from within \SpecialChar LyX
13296 \begin_inset Flex Code
13299 \begin_layout Plain Layout
13305 for customizable parameters).
13306 This will be output as is after all \SpecialChar LaTeX
13308 \begin_inset Flex Code
13311 \begin_layout Plain Layout
13320 \begin_layout Description
13321 \begin_inset Flex Code
13324 \begin_layout Plain Layout
13331 \begin_inset Flex Code
13334 \begin_layout Plain Layout
13339 , Command, Environment, Item_Environment,
13340 \begin_inset Newline newline
13343 List_Environment, Bib_Environment
13348 ] How the style should be translated into \SpecialChar LaTeX
13353 \begin_layout Plain Layout
13354 \begin_inset Flex Code
13357 \begin_layout Plain Layout
13363 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13364 Visit the SGML class files for specific examples.
13370 \begin_inset Separator parbreak
13377 \begin_layout Description
13378 \begin_inset Flex Code
13381 \begin_layout Plain Layout
13387 means nothing special.
13390 \begin_layout Description
13391 \begin_inset Flex Code
13394 \begin_layout Plain Layout
13401 \begin_inset Flex Code
13404 \begin_layout Plain Layout
13411 {\SpecialChar ldots
13420 \begin_layout Description
13421 \begin_inset Flex Code
13424 \begin_layout Plain Layout
13431 \begin_inset Flex Code
13434 \begin_layout Plain Layout
13441 }\SpecialChar ldots
13457 \begin_layout Description
13458 \begin_inset Flex Code
13461 \begin_layout Plain Layout
13468 \begin_inset Flex Code
13471 \begin_layout Plain Layout
13478 \begin_inset Flex Code
13481 \begin_layout Plain Layout
13489 is generated for each paragraph of this environment.
13493 \begin_layout Description
13494 \begin_inset Flex Code
13497 \begin_layout Plain Layout
13504 \begin_inset Flex Code
13507 \begin_layout Plain Layout
13514 \begin_inset Newline newline
13518 \begin_inset Flex Code
13521 \begin_layout Plain Layout
13527 is passed as an argument to the environment.
13528 \begin_inset Newline newline
13532 \begin_inset Flex Code
13535 \begin_layout Plain Layout
13541 can be defined in the
13542 \begin_inset Flex MenuItem
13545 \begin_layout Plain Layout
13546 Edit\SpecialChar menuseparator
13548 \begin_inset space ~
13559 \begin_layout Description
13560 \begin_inset Flex Code
13563 \begin_layout Plain Layout
13570 \begin_inset Flex Code
13573 \begin_layout Plain Layout
13579 but adds additionally the necessary mandatory argument (the longest label)
13580 to the begin statement of the bibliography environment:
13581 \begin_inset Newline newline
13585 \begin_inset Flex Code
13588 \begin_layout Plain Layout
13591 begin{thebibliography}{99}
13596 It is therefore only useful for bibliography environments.
13597 The default longest label
13598 \begin_inset Quotes eld
13602 \begin_inset Quotes erd
13605 can be changed by the user in the paragraph settings of a bibliography
13609 \begin_layout Standard
13610 Putting the last few things together, the \SpecialChar LaTeX
13611 output will be either:
13614 \begin_layout LyX-Code
13617 LatexName[LatexParam]{\SpecialChar ldots
13621 \begin_layout Standard
13625 \begin_layout LyX-Code
13628 begin{LatexName}[LatexParam] \SpecialChar ldots
13634 \begin_layout Standard
13635 depending upon the \SpecialChar LaTeX
13640 \begin_layout Description
13641 \begin_inset Flex Code
13644 \begin_layout Plain Layout
13651 \begin_inset Flex Code
13654 \begin_layout Plain Layout
13660 ] A string that is put at the beginning of the style content.
13661 A line break in the output can be indicated by
13662 \begin_inset Flex Code
13665 \begin_layout Plain Layout
13674 \begin_layout Description
13675 \begin_inset Flex Code
13678 \begin_layout Plain Layout
13685 \begin_inset Flex Code
13688 \begin_layout Plain Layout
13694 ] If you put styles into environments, the different
13695 \begin_inset Flex Code
13698 \begin_layout Plain Layout
13704 are not simply added, but added with a factor
13705 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13709 Note that this parameter is also used when
13710 \begin_inset Flex Code
13713 \begin_layout Plain Layout
13720 \begin_inset Flex Code
13723 \begin_layout Plain Layout
13730 \begin_inset Flex Code
13733 \begin_layout Plain Layout
13740 Then it is added to the manual or dynamic margin.
13741 \begin_inset Newline newline
13745 \begin_inset Quotes eld
13749 \begin_inset Flex Code
13752 \begin_layout Plain Layout
13759 \begin_inset Quotes erd
13762 means that the paragraph is indented with the width of
13763 \begin_inset Quotes eld
13767 \begin_inset Flex Code
13770 \begin_layout Plain Layout
13777 \begin_inset Quotes erd
13780 in the normal font.
13781 You can get a negative width by prefixing the string with
13782 \begin_inset Quotes eld
13786 \begin_inset Flex Code
13789 \begin_layout Plain Layout
13796 \begin_inset Quotes erd
13800 This way was chosen so that the look is the same with each used screen
13804 \begin_layout Description
13805 \begin_inset Flex Code
13808 \begin_layout Plain Layout
13815 \begin_inset Flex Code
13818 \begin_layout Plain Layout
13823 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13829 \begin_inset Newline newline
13832 The kind of margin that the style has on the left side.
13833 \begin_inset Separator parbreak
13840 \begin_layout Description
13841 \begin_inset Flex Code
13844 \begin_layout Plain Layout
13850 just means a fixed margin.
13853 \begin_layout Description
13854 \begin_inset Flex Code
13857 \begin_layout Plain Layout
13863 means that the left margin depends on the string entered in the
13864 \begin_inset Flex MenuItem
13867 \begin_layout Plain Layout
13868 Edit\SpecialChar menuseparator
13870 \begin_inset space ~
13879 This is used to typeset nice lists without tabulators.
13882 \begin_layout Description
13883 \begin_inset Flex Code
13886 \begin_layout Plain Layout
13892 means that the margin depends on the size of the label.
13893 This is used for automatic enumerated headlines.
13894 It is obvious that the headline
13895 \begin_inset Quotes eld
13898 5.4.3.2.1 Very long headline
13899 \begin_inset Quotes erd
13902 must have a wider left margin (as wide as
13903 \begin_inset Quotes eld
13907 \begin_inset Quotes erd
13910 plus the space) than
13911 \begin_inset Quotes eld
13914 3.2 Very long headline
13915 \begin_inset Quotes erd
13919 \begin_inset Quotes eld
13923 \begin_inset Quotes erd
13926 are not able to do this.
13929 \begin_layout Description
13930 \begin_inset Flex Code
13933 \begin_layout Plain Layout
13939 is similar, but only the very first row of the paragraph is dynamic, while
13940 the others are static; this is used, for example, for descriptions.
13943 \begin_layout Description
13944 \begin_inset Flex Code
13947 \begin_layout Plain Layout
13953 means the margin is chosen in a way that the longest row of this paragraph
13954 fits to the right margin.
13955 This is used to typeset an address on the right edge of the page.
13959 \begin_layout Description
13960 \begin_inset Flex Code
13963 \begin_layout Plain Layout
13970 \begin_inset Flex Code
13973 \begin_layout Plain Layout
13982 \begin_inset space \thinspace{}
13986 \begin_inset Flex Code
13989 \begin_layout Plain Layout
13995 ] Whether fragile commands in this style should be
13996 \begin_inset Flex Code
13999 \begin_layout Plain Layout
14012 whether this command should itself be protected.)
14015 \begin_layout Description
14016 \begin_inset Flex Code
14019 \begin_layout Plain Layout
14026 \begin_inset Flex Code
14029 \begin_layout Plain Layout
14036 \begin_inset space \thinspace{}
14040 \begin_inset Flex Code
14043 \begin_layout Plain Layout
14051 ] Whether newlines are translated into \SpecialChar LaTeX
14053 \begin_inset Flex Code
14056 \begin_layout Plain Layout
14067 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
14069 inside \SpecialChar LyX
14073 \begin_layout Description
14074 \begin_inset Flex Code
14077 \begin_layout Plain Layout
14084 \begin_inset Flex Code
14087 \begin_layout Plain Layout
14096 \begin_inset space \thinspace{}
14100 \begin_inset Flex Code
14103 \begin_layout Plain Layout
14109 ] If set to true, and if
14110 \begin_inset Flex Code
14113 \begin_layout Plain Layout
14120 \begin_inset Flex Code
14123 \begin_layout Plain Layout
14129 ) paragraphs are being indented, then the indentation of such a paragraph
14130 following one of this type will be suppressed.
14131 (So this will not affect the display of non-default paragraphs.)
14134 \begin_layout Description
14135 \begin_inset Flex Code
14138 \begin_layout Plain Layout
14145 \begin_inset Flex Code
14148 \begin_layout Plain Layout
14154 ] Name of a style that has replaced this style.
14155 This is used to rename a style, while keeping backward compatibility.
14158 \begin_layout Description
14159 \begin_inset Flex Code
14162 \begin_layout Plain Layout
14169 \begin_inset Flex Code
14172 \begin_layout Plain Layout
14181 \begin_inset space \thinspace{}
14185 \begin_inset Flex Code
14188 \begin_layout Plain Layout
14194 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14196 but only by a line break; together with
14197 \begin_inset Flex Code
14200 \begin_layout Plain Layout
14206 , this allows to emulate a plain text editor (like the ERT inset).
14209 \begin_layout Description
14210 \begin_inset Flex Code
14213 \begin_layout Plain Layout
14220 \begin_inset Flex Code
14223 \begin_layout Plain Layout
14229 ] The indent of the very first line of a paragraph.
14231 \begin_inset Newline newline
14235 \begin_inset Flex Code
14238 \begin_layout Plain Layout
14244 will be fixed for a certain style.
14245 The exception is the default style, since the indentation for these paragraphs
14246 can be prohibited with
14247 \begin_inset Flex Code
14250 \begin_layout Plain Layout
14258 \begin_inset Flex Code
14261 \begin_layout Plain Layout
14267 style paragraphs inside environments use the
14268 \begin_inset Flex Code
14271 \begin_layout Plain Layout
14277 of the environment, not their native one.
14279 \begin_inset Flex Code
14282 \begin_layout Plain Layout
14288 paragraphs inside an enumeration are not indented.
14291 \begin_layout Description
14292 \begin_inset Flex Code
14295 \begin_layout Plain Layout
14302 \begin_inset Flex Code
14305 \begin_layout Plain Layout
14311 ] The vertical space between two paragraphs of this style.
14314 \begin_layout Description
14315 \begin_inset Flex Code
14318 \begin_layout Plain Layout
14325 \begin_inset Flex Code
14328 \begin_layout Plain Layout
14335 allows the user to choose either
14336 \begin_inset Quotes eld
14340 \begin_inset Quotes erd
14344 \begin_inset Quotes eld
14348 \begin_inset Quotes erd
14351 to separate paragraphs.
14353 \begin_inset Quotes eld
14357 \begin_inset Quotes erd
14361 \begin_inset Flex Code
14364 \begin_layout Plain Layout
14372 \begin_inset Quotes eld
14376 \begin_inset Quotes erd
14380 \begin_inset Flex Code
14383 \begin_layout Plain Layout
14389 is ignored and all paragraphs are separated by the
14390 \begin_inset Flex Code
14393 \begin_layout Plain Layout
14400 The vertical space is calculated with
14401 \begin_inset Flex Code
14404 \begin_layout Plain Layout
14406 \begin_inset space ~
14415 \begin_inset Flex Code
14418 \begin_layout Plain Layout
14424 is the height of a row with the normal font.
14425 This way, the look stays the same with different screen fonts.
14428 \begin_layout Description
14429 \begin_inset Flex Code
14432 \begin_layout Plain Layout
14439 \begin_inset Flex Code
14442 \begin_layout Plain Layout
14451 \begin_inset space \thinspace{}
14455 \begin_inset Flex Code
14458 \begin_layout Plain Layout
14464 ] Whether the contents of this paragraph should be output in raw form, meaning
14465 without special translations that \SpecialChar LaTeX
14467 \change_inserted 155139281 1429534178
14471 \begin_layout Description
14473 \change_inserted 155139281 1429534242
14476 \begin_inset Flex Code
14479 \begin_layout Plain Layout
14481 \change_inserted 155139281 1429534178
14490 \begin_inset Flex Code
14493 \begin_layout Plain Layout
14495 \change_inserted 155139281 1429534178
14496 string of characters
14505 Defines individual characters that should be output in raw form, meaning
14506 without special translations that \SpecialChar LaTeX
14512 \begin_layout Description
14513 \begin_inset Flex Code
14516 \begin_layout Plain Layout
14522 Information to be included in the \SpecialChar LaTeX
14523 preamble when this style is used.
14524 Used to define macros, load packages, etc., required by this particular
14527 \begin_inset Quotes eld
14531 \begin_inset Flex Code
14534 \begin_layout Plain Layout
14541 \begin_inset Quotes erd
14547 \begin_layout Description
14548 \begin_inset Flex Code
14551 \begin_layout Plain Layout
14558 \begin_inset Flex Code
14561 \begin_layout Plain Layout
14567 ] The prefix to use when creating labels referring to paragraphs of this
14569 This allows the use of formatted references.
14572 \begin_layout Description
14573 \begin_inset Flex Code
14576 \begin_layout Plain Layout
14583 \begin_inset Flex Code
14586 \begin_layout Plain Layout
14592 ] Whether the style requires the feature
14593 \begin_inset Flex Code
14596 \begin_layout Plain Layout
14603 See the description of
14604 \begin_inset Flex Code
14607 \begin_layout Plain Layout
14614 \begin_inset CommandInset ref
14616 reference "sub:General-text-class"
14620 ) for information on `features'.
14623 \begin_layout Description
14624 \begin_inset Flex Code
14627 \begin_layout Plain Layout
14634 \begin_inset Flex Code
14637 \begin_layout Plain Layout
14646 \begin_inset Flex Code
14649 \begin_layout Plain Layout
14655 ] Resets the \SpecialChar LaTeX
14656 arguments of this style (as defined via the
14657 \begin_inset Flex Code
14660 \begin_layout Plain Layout
14667 This is useful if you have copied a style via
14668 \begin_inset Flex Code
14671 \begin_layout Plain Layout
14677 , but you do not want to inherit its (required and optional) arguments.
14680 \begin_layout Description
14681 \begin_inset Flex Code
14684 \begin_layout Plain Layout
14691 \begin_inset Flex Code
14694 \begin_layout Plain Layout
14700 ] A string that is put at the end of the layout content.
14701 A line break in the output can be indicated by
14702 \begin_inset Flex Code
14705 \begin_layout Plain Layout
14714 \begin_layout Description
14715 \begin_inset Flex Code
14718 \begin_layout Plain Layout
14725 \begin_inset Flex Code
14728 \begin_layout Plain Layout
14735 \begin_inset Flex Code
14738 \begin_layout Plain Layout
14747 \begin_layout Description
14748 \begin_inset Flex Code
14751 \begin_layout Plain Layout
14758 \begin_inset Flex Code
14761 \begin_layout Plain Layout
14770 \begin_inset Flex Code
14773 \begin_layout Plain Layout
14780 \begin_inset Flex Code
14783 \begin_layout Plain Layout
14790 \begin_inset Flex Code
14793 \begin_layout Plain Layout
14795 \begin_inset space ~
14803 ] This defines what the default spacing should be in the style.
14805 \begin_inset Flex Code
14808 \begin_layout Plain Layout
14815 \begin_inset Flex Code
14818 \begin_layout Plain Layout
14825 \begin_inset Flex Code
14828 \begin_layout Plain Layout
14834 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14835 If you specify the argument
14836 \begin_inset Flex Code
14839 \begin_layout Plain Layout
14845 , then you must also provide a value argument which will be the actual multiplie
14847 Note that, contrary to other parameters,
14848 \begin_inset Flex Code
14851 \begin_layout Plain Layout
14857 implies the generation of specific \SpecialChar LaTeX
14858 code, using the \SpecialChar LaTeX
14862 \begin_inset Flex Code
14865 \begin_layout Plain Layout
14874 \begin_layout Description
14875 \begin_inset Flex Code
14878 \begin_layout Plain Layout
14885 \begin_inset Flex Code
14888 \begin_layout Plain Layout
14895 \begin_inset space \thinspace{}
14899 \begin_inset Flex Code
14902 \begin_layout Plain Layout
14910 ] Allow spell-checking paragraphs of this style.
14914 \begin_layout Description
14915 \begin_inset Flex Code
14918 \begin_layout Plain Layout
14924 The font used for the text body .
14926 \begin_inset CommandInset ref
14928 reference "sub:Font-description"
14935 \begin_layout Description
14936 \begin_inset Flex Code
14939 \begin_layout Plain Layout
14948 \begin_inset Flex Code
14951 \begin_layout Plain Layout
14961 The level of the style in the table of contents.
14962 This is used for automatic numbering of section headings.
14963 \change_inserted -712698321 1401363541
14967 \begin_layout Description
14969 \change_inserted -712698321 1401363906
14970 \begin_inset Flex Code
14973 \begin_layout Plain Layout
14975 \change_inserted -712698321 1401363547
14984 \begin_inset Flex Code
14987 \begin_layout Plain Layout
14989 \change_inserted -712698321 1401363664
15002 \begin_inset Flex Code
15005 \begin_layout Plain Layout
15007 \change_inserted -712698321 1401363669
15016 \begin_inset Flex Code
15019 \begin_layout Plain Layout
15021 \change_inserted -712698321 1401363675
15029 ] This tag determines whether the first line indentation of this paragraph
15030 can be toggled via the Paragraph settings dialog.
15034 \begin_inset Flex Code
15037 \begin_layout Plain Layout
15039 \change_inserted -712698321 1401363761
15049 is set, indentation can be toggled if the document settings use
15050 \begin_inset Quotes eld
15054 \begin_inset Quotes erd
15057 paragraph style, with
15058 \begin_inset Flex Code
15061 \begin_layout Plain Layout
15063 \change_inserted -712698321 1401363844
15069 , indentation can always be toggled, notwithstanding the document settings,
15071 \begin_inset Flex Code
15074 \begin_layout Plain Layout
15076 \change_inserted -712698321 1401363901
15082 , indentation can never be toggled.
15087 \begin_layout Description
15088 \begin_inset Flex Code
15091 \begin_layout Plain Layout
15098 \begin_inset Flex Code
15101 \begin_layout Plain Layout
15107 ] The vertical space with which the very first of a chain of paragraphs
15108 with this style is separated from the previous paragraph.
15109 If the previous paragraph has another style, the separations are not simply
15110 added, but the maximum is taken.
15113 \begin_layout Subsection
15114 \begin_inset CommandInset label
15120 Internationalization of Paragraph Styles
15123 \begin_layout Standard
15125 has long supported internationalization of layout information, but, until
15126 version 2.0, this applied only to the user interface and not to, say, PDF
15128 Thus, French authors were forced to resort to ugly hacks if they wanted
15133 1' instead of `Theorem 1'.
15134 Thanks to Georg Baum, that is no longer the case.
15137 \begin_layout Standard
15139 \begin_inset Flex Code
15142 \begin_layout Plain Layout
15148 defines text that is to appear in the typeset document, it may use
15149 \begin_inset Flex Code
15152 \begin_layout Plain Layout
15159 \begin_inset Flex Code
15162 \begin_layout Plain Layout
15168 to support non-English and even multi-language documents correctly.
15169 The following excerpt (from the
15170 \begin_inset Flex Code
15173 \begin_layout Plain Layout
15179 file) shows how this works:
15182 \begin_layout LyX-Code
15184 \begin_inset Separator parbreak
15191 \begin_layout LyX-Code
15194 theoremstyle{remark}
15197 \begin_layout LyX-Code
15200 newtheorem{claim}[thm]{
15207 \begin_layout LyX-Code
15211 \begin_layout LyX-Code
15215 \begin_layout LyX-Code
15220 claimname}{_(Claim)}
15223 \begin_layout LyX-Code
15227 \begin_layout LyX-Code
15231 \begin_layout LyX-Code
15240 claimname}{_(Claim)}}
15243 \begin_layout LyX-Code
15248 \begin_layout Standard
15249 In principle, any legal \SpecialChar LaTeX
15251 \begin_inset Flex Code
15254 \begin_layout Plain Layout
15261 \begin_inset Flex Code
15264 \begin_layout Plain Layout
15270 tags, but in practice they will typically look as they do here.
15271 The key to correct translation of the typeset text is the definition of
15272 the \SpecialChar LaTeX
15274 \begin_inset Flex Code
15277 \begin_layout Plain Layout
15286 \begin_inset Flex Code
15289 \begin_layout Plain Layout
15301 \begin_layout Standard
15303 \begin_inset Flex Code
15306 \begin_layout Plain Layout
15312 tag provides for internationalization based upon the overall language of
15314 The contents of the tag will be included in the preamble, just as with
15316 \begin_inset Flex Code
15319 \begin_layout Plain Layout
15326 What makes it special is the use of the
15327 \begin_inset Quotes eld
15331 \begin_inset Quotes erd
15335 \begin_inset Flex Code
15338 \begin_layout Plain Layout
15344 , which will be replaced, when \SpecialChar LyX
15345 produces \SpecialChar LaTeX
15346 output, with the translation of
15347 its argument into the document language.
15350 \begin_layout Standard
15352 \begin_inset Flex Code
15355 \begin_layout Plain Layout
15361 tag is more complex, since it is meant to provide support for multi-language
15362 documents and so offers an interface to the
15363 \begin_inset Flex Code
15366 \begin_layout Plain Layout
15373 Its contents will be added to the preamble once for each language that
15374 appears in the document.
15375 In this case, the argument to
15376 \begin_inset Flex Code
15379 \begin_layout Plain Layout
15385 will be replaced with its translation into the language in question; the
15387 \begin_inset Flex Code
15390 \begin_layout Plain Layout
15396 is replaced by the language name (as used by the babel package).
15399 \begin_layout Standard
15400 A German document that also included a French section would thus have the
15401 following in the preamble:
15404 \begin_layout LyX-Code
15413 claimname}{Affirmation}}
15414 \begin_inset Newline newline
15425 claimname}{Behauptung}}
15426 \begin_inset Newline newline
15433 claimname}{Behauptung}
15436 \begin_layout Standard
15439 \begin_inset Flex Code
15442 \begin_layout Plain Layout
15448 will then conspire to produce the correct text in the output.
15451 \begin_layout Standard
15452 One important point to note here is that the translations are provided by
15454 itself, through the file
15455 \begin_inset Flex Code
15458 \begin_layout Plain Layout
15465 This means, in effect, that
15466 \begin_inset Flex Code
15469 \begin_layout Plain Layout
15476 \begin_inset Flex Code
15479 \begin_layout Plain Layout
15485 are really only of use in layout files that are provided with \SpecialChar LyX
15487 entered in user-created layout files will not be seen by \SpecialChar LyX
15488 's internationalizatio
15489 n routines unless the
15490 \begin_inset Flex Code
15493 \begin_layout Plain Layout
15499 file is modified accordingly.
15500 That said, however, any layout created with the intention that it will
15501 be included with \SpecialChar LyX
15502 should use these tags where appropriate.
15503 Please note that the paragraph style translations provided by \SpecialChar LyX
15505 change with a minor update (e.
15506 \begin_inset space \thinspace{}
15510 \begin_inset space \space{}
15513 from version 2.1.x to 2.1.y).
15514 It is however quite likely that a major update (e.
15515 \begin_inset space \thinspace{}
15519 \begin_inset space \space{}
15522 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15525 \begin_layout Subsection
15527 \begin_inset CommandInset label
15536 \begin_layout Standard
15537 It is necessary to define the floats (
15538 \begin_inset Flex MenuItem
15541 \begin_layout Plain Layout
15548 \begin_inset Flex MenuItem
15551 \begin_layout Plain Layout
15557 , \SpecialChar ldots
15558 ) in the text class itself.
15559 Standard floats are included in the file
15560 \begin_inset Flex Code
15563 \begin_layout Plain Layout
15569 , so you may have to do no more than add
15572 \begin_layout LyX-Code
15573 Input stdfloats.inc
15576 \begin_layout Standard
15577 to your layout file.
15578 If you want to implement a text class that proposes some other float types
15579 (like the AGU class bundled with \SpecialChar LyX
15580 ), the information below will hopefully
15582 \change_inserted -712698321 1432283506
15586 \begin_layout Description
15588 \change_inserted -712698321 1432283705
15589 \begin_inset Flex Code
15592 \begin_layout Plain Layout
15594 \change_inserted -712698321 1432283514
15601 \begin_inset Flex Code
15604 \begin_layout Plain Layout
15606 \change_inserted -712698321 1432283507
15612 =!htbpH] Allowed placement options for this float type.
15613 The value is a string of placement characters.
15614 Possible characters include:
15619 \begin_inset Quotes eld
15623 \begin_inset Quotes erd
15631 \begin_inset Quotes eld
15635 \begin_inset Quotes erd
15643 \begin_inset Quotes eld
15647 \begin_inset Quotes erd
15655 \begin_inset Quotes eld
15659 \begin_inset Quotes erd
15667 \begin_inset Quotes eld
15671 \begin_inset Quotes erd
15679 \begin_inset Quotes eld
15683 \begin_inset Quotes erd
15687 The order of the characters in the string does not matter.
15688 If no placement options are allowed, use the string
15697 \begin_layout Description
15698 \begin_inset Flex Code
15701 \begin_layout Plain Layout
15708 \begin_inset Flex Code
15711 \begin_layout Plain Layout
15718 \begin_inset Quotes erd
15722 \begin_inset Quotes erd
15725 ] The file name extension of an auxiliary file for the list of figures (or
15728 writes the captions to this file.
15731 \begin_layout Description
15732 \begin_inset Flex Code
15735 \begin_layout Plain Layout
15742 \begin_inset Flex Code
15745 \begin_layout Plain Layout
15752 \begin_inset Quotes erd
15756 \begin_inset Quotes erd
15759 ] The string that will be used in the menus and also for the caption.
15760 This is translated to the current language if babel is used.
15763 \begin_layout Description
15764 \begin_inset Flex Code
15767 \begin_layout Plain Layout
15773 These tags control the XHTML output.
15775 \begin_inset CommandInset ref
15777 reference "sec:Tags-for-XHTML"
15784 \begin_layout Description
15785 \begin_inset Flex Code
15788 \begin_layout Plain Layout
15797 \begin_inset Flex Code
15800 \begin_layout Plain Layout
15809 \begin_inset space \thinspace{}
15813 \begin_inset Flex Code
15816 \begin_layout Plain Layout
15822 ] Indicates whether the float is already defined in the document class or
15823 if instead the \SpecialChar LaTeX
15825 \begin_inset Flex Code
15828 \begin_layout Plain Layout
15834 needs to be loaded to define it on-the-fly.
15836 \begin_inset Flex Code
15839 \begin_layout Plain Layout
15846 \begin_inset Flex Code
15849 \begin_layout Plain Layout
15856 It should be set to
15857 \begin_inset Flex Code
15860 \begin_layout Plain Layout
15866 if the float is already defined by the \SpecialChar LaTeX
15870 \begin_layout Description
15871 \begin_inset Flex Code
15874 \begin_layout Plain Layout
15881 \begin_inset Flex Code
15884 \begin_layout Plain Layout
15891 \begin_inset Quotes erd
15895 \begin_inset Quotes erd
15898 ] The command used to generate a list of floats of this type; the leading
15907 \begin_inset Flex Code
15910 \begin_layout Plain Layout
15916 is false, since there is no standard way to generate this command.
15918 \begin_inset Flex Code
15921 \begin_layout Plain Layout
15927 is true, since in that case there is a standard way to define the command.
15930 \begin_layout Description
15931 \begin_inset Flex Code
15934 \begin_layout Plain Layout
15941 \begin_inset Flex Code
15944 \begin_layout Plain Layout
15951 \begin_inset Quotes erd
15955 \begin_inset Quotes erd
15958 ] A title for a list of floats of this kind (list of figures, tables, or
15960 It is used for the screen label within \SpecialChar LyX
15961 , it is used by \SpecialChar LaTeX
15963 it is used as the title in the XHTML output.
15964 It will be translated to the document language.
15967 \begin_layout Description
15968 \begin_inset Flex Code
15971 \begin_layout Plain Layout
15978 \begin_inset Flex Code
15981 \begin_layout Plain Layout
15988 \begin_inset Quotes erd
15992 \begin_inset Quotes erd
15995 ] This (optional) argument determines whether floats of this class will
15996 be numbered within some sectional unit of the document.
15998 \begin_inset Flex Code
16001 \begin_layout Plain Layout
16008 \begin_inset Quotes eld
16012 \begin_inset Flex Code
16015 \begin_layout Plain Layout
16022 \begin_inset Quotes erd
16025 , the floats will be numbered within chapters.
16029 \begin_layout Description
16030 \begin_inset Flex Code
16033 \begin_layout Plain Layout
16040 \begin_inset Flex Code
16043 \begin_layout Plain Layout
16050 \begin_inset Quotes erd
16054 \begin_inset Quotes erd
16057 ] The default placement for the given class of floats.
16058 The string should be as in standard \SpecialChar LaTeX
16060 \begin_inset Flex Code
16063 \begin_layout Plain Layout
16070 \begin_inset Flex Code
16073 \begin_layout Plain Layout
16080 \begin_inset Flex Code
16083 \begin_layout Plain Layout
16090 \begin_inset Flex Code
16093 \begin_layout Plain Layout
16099 for top, bottom, page, and here, respectively.
16103 \begin_layout Plain Layout
16104 Note that the order of these letters in the string is irrelevant, like in
16111 On top of that there is a new type,
16112 \begin_inset Flex Code
16115 \begin_layout Plain Layout
16121 , which does not really correspond to a float, since it means: put it
16122 \begin_inset Quotes eld
16126 \begin_inset Quotes erd
16130 Note however that the
16131 \begin_inset Flex Code
16134 \begin_layout Plain Layout
16140 specifier is special and, because of implementation details, cannot be
16141 used in non-built in float types.
16142 If you do not understand what this means, just use
16143 \begin_inset Quotes eld
16147 \begin_inset Flex Code
16150 \begin_layout Plain Layout
16157 \begin_inset Quotes erd
16163 \begin_layout Description
16164 \begin_inset Flex Code
16167 \begin_layout Plain Layout
16174 \begin_inset Flex Code
16177 \begin_layout Plain Layout
16183 ] The prefix to use when creating labels referring to floats of this type.
16184 This allows the use of formatted references.
16185 Note that you can remove any
16186 \begin_inset Flex Code
16189 \begin_layout Plain Layout
16195 set by a copied style by using the special value
16196 \begin_inset Quotes eld
16200 \begin_inset Quotes erd
16203 , which must be all caps.
16206 \begin_layout Description
16207 \begin_inset Flex Code
16210 \begin_layout Plain Layout
16217 \begin_inset Flex Code
16220 \begin_layout Plain Layout
16227 \begin_inset Quotes erd
16231 \begin_inset Quotes erd
16234 ] The style used when defining the float using
16235 \begin_inset Flex Code
16238 \begin_layout Plain Layout
16249 \begin_layout Description
16250 \begin_inset Flex Code
16253 \begin_layout Plain Layout
16260 \begin_inset Flex Code
16263 \begin_layout Plain Layout
16270 \begin_inset Quotes erd
16274 \begin_inset Quotes erd
16278 \begin_inset Quotes eld
16282 \begin_inset Quotes erd
16285 of the new class of floats, like program or algorithm.
16286 After the appropriate
16287 \begin_inset Flex Code
16290 \begin_layout Plain Layout
16299 \begin_inset Flex Code
16302 \begin_layout Plain Layout
16311 \begin_inset Flex Code
16314 \begin_layout Plain Layout
16325 \begin_layout Description
16326 \begin_inset Flex Code
16329 \begin_layout Plain Layout
16336 \begin_inset Flex Code
16339 \begin_layout Plain Layout
16346 \begin_inset space \thinspace{}
16350 \begin_inset Flex Code
16353 \begin_layout Plain Layout
16361 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16363 \begin_inset Flex Code
16366 \begin_layout Plain Layout
16372 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16376 \begin_layout Standard
16377 Note that defining a float with type
16378 \begin_inset Flex Code
16381 \begin_layout Plain Layout
16389 automatically defines the corresponding counter with name
16390 \begin_inset Flex Code
16393 \begin_layout Plain Layout
16404 \begin_layout Subsection
16405 Flex insets and InsetLayout
16406 \begin_inset CommandInset label
16408 name "sub:Flex-insets-and"
16415 \begin_layout Standard
16416 Flex insets come in three different kinds:
16419 \begin_layout Itemize
16421 \begin_inset Flex Code
16424 \begin_layout Plain Layout
16430 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16432 \begin_inset Flex Code
16435 \begin_layout Plain Layout
16444 \begin_inset Flex Code
16447 \begin_layout Plain Layout
16458 \begin_layout Itemize
16460 \begin_inset Flex Code
16463 \begin_layout Plain Layout
16469 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16471 footnote, and the like.
16472 An obvious example is an endnote inset, which is defined in the
16473 \begin_inset Flex Code
16476 \begin_layout Plain Layout
16485 \begin_layout Itemize
16487 \begin_inset Flex Code
16490 \begin_layout Plain Layout
16496 ): For use with DocBook classes.
16499 \begin_layout Standard
16500 Flex insets are defined using the
16501 \begin_inset Flex Code
16504 \begin_layout Plain Layout
16510 tag, which shall be explained in a moment.
16513 \begin_layout Standard
16515 \begin_inset Flex Code
16518 \begin_layout Plain Layout
16524 tag also serves another function: It can be used to customize the general
16525 layout of many different types of insets.
16527 \begin_inset Flex Code
16530 \begin_layout Plain Layout
16536 can be used to customize the layout parameters for footnotes, marginal
16537 notes, note insets, \SpecialChar TeX
16538 code (ERT) insets, branches, listings, indexes, boxes,
16539 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16542 \begin_layout Standard
16544 \begin_inset Flex Code
16547 \begin_layout Plain Layout
16553 definition must begin with a line of the form:
16556 \begin_layout LyX-Code
16560 \begin_layout Standard
16562 \begin_inset Flex Code
16565 \begin_layout Plain Layout
16571 indicates the inset whose layout is being defined, and here there are four
16575 \begin_layout Enumerate
16576 The layout for a pre-existing inset is being modified.
16577 In this case, can be
16578 \begin_inset Flex Code
16581 \begin_layout Plain Layout
16587 any one of the following:
16588 \begin_inset Flex Code
16591 \begin_layout Plain Layout
16598 \begin_inset Flex Code
16601 \begin_layout Plain Layout
16608 \begin_inset Flex Code
16611 \begin_layout Plain Layout
16618 \begin_inset Flex Code
16621 \begin_layout Plain Layout
16628 \begin_inset Flex Code
16631 \begin_layout Plain Layout
16638 \begin_inset Flex Code
16641 \begin_layout Plain Layout
16648 \begin_inset Flex Code
16651 \begin_layout Plain Layout
16658 \begin_inset Flex Code
16661 \begin_layout Plain Layout
16668 \begin_inset Flex Code
16671 \begin_layout Plain Layout
16678 \begin_inset Flex Code
16681 \begin_layout Plain Layout
16688 \begin_inset Flex Code
16691 \begin_layout Plain Layout
16698 \begin_inset Flex Code
16701 \begin_layout Plain Layout
16708 \begin_inset Flex Code
16711 \begin_layout Plain Layout
16718 \begin_inset Flex Code
16721 \begin_layout Plain Layout
16728 \begin_inset Flex Code
16731 \begin_layout Plain Layout
16738 \begin_inset Flex Code
16741 \begin_layout Plain Layout
16748 \begin_inset Flex Code
16751 \begin_layout Plain Layout
16758 \begin_inset Flex Code
16761 \begin_layout Plain Layout
16768 \begin_inset Flex Code
16771 \begin_layout Plain Layout
16778 \begin_inset Flex Code
16781 \begin_layout Plain Layout
16790 \begin_layout Enumerate
16791 The layout for a Flex inset is being defined.
16793 \begin_inset Flex Code
16796 \begin_layout Plain Layout
16802 must be of the form
16803 \begin_inset Quotes eld
16807 \begin_inset Flex Code
16810 \begin_layout Plain Layout
16817 \begin_inset Quotes erd
16821 \begin_inset Flex Code
16824 \begin_layout Plain Layout
16830 may be be any valid identifier not used by a pre-existing Flex inset.
16831 The identifier may include spaces, but in that case the whole thing must
16832 be wrapped in quotes.
16833 Note that the definition of a flex inset
16838 \begin_inset Flex Code
16841 \begin_layout Plain Layout
16848 entry, declaring which type of inset it defines.
16851 \begin_layout Enumerate
16852 The layout for user specific branch is being defined.
16854 \begin_inset Flex Code
16857 \begin_layout Plain Layout
16863 must be of the form
16864 \begin_inset Quotes eld
16868 \begin_inset Flex Code
16871 \begin_layout Plain Layout
16878 \begin_inset Quotes erd
16882 \begin_inset Flex Code
16885 \begin_layout Plain Layout
16891 may be be any valid identifier of branch defined in user's document.
16892 The identifier may include spaces, but in that case the whole thing must
16893 be wrapped in quotes.
16894 The main purpose of this feature is to allow \SpecialChar LaTeX
16895 wrapping around specific
16896 branches as user needs.
16899 \begin_layout Enumerate
16900 The layout of a user (or class) specific caption is being defined.
16902 \begin_inset Flex Code
16905 \begin_layout Plain Layout
16911 must be of the form
16912 \begin_inset Quotes eld
16916 \begin_inset Flex Code
16919 \begin_layout Plain Layout
16926 \begin_inset Quotes erd
16930 \begin_inset Flex Code
16933 \begin_layout Plain Layout
16939 specifies the name of the caption as it appears in the menu.
16940 Have a look at the standard caption (
16941 \begin_inset Flex Code
16944 \begin_layout Plain Layout
16950 ), the specific captions of the KOMA-Script classes (
16951 \begin_inset Flex Code
16954 \begin_layout Plain Layout
16961 \begin_inset Flex Code
16964 \begin_layout Plain Layout
16973 \begin_inset space ~
16979 \begin_inset Flex Code
16982 \begin_layout Plain Layout
16988 ) for applications.
16991 \begin_layout Standard
16993 \begin_inset Flex Code
16996 \begin_layout Plain Layout
17002 definition can contain the following entries:
17005 \begin_layout Description
17006 \begin_inset Flex Code
17009 \begin_layout Plain Layout
17016 \begin_inset Flex Code
17019 \begin_layout Plain Layout
17025 ] Defines argument number of a command\SpecialChar breakableslash
17026 environment associated with the current
17028 The definition must end with
17029 \begin_inset Flex Code
17032 \begin_layout Plain Layout
17040 \begin_inset CommandInset ref
17042 reference "sub:Paragraph-Styles"
17049 \begin_layout Description
17050 \begin_inset Flex Code
17053 \begin_layout Plain Layout
17059 Preamble for changing language commands; see
17060 \begin_inset CommandInset ref
17062 reference "sub:I18n"
17069 \begin_layout Description
17070 \begin_inset Flex Code
17073 \begin_layout Plain Layout
17080 \begin_inset Flex Code
17083 \begin_layout Plain Layout
17089 ] The color for the inset's background.
17091 \begin_inset CommandInset ref
17093 reference "chap:Names-of-colors"
17097 for a list of the available color names.
17100 \begin_layout Description
17101 \begin_inset Flex Code
17104 \begin_layout Plain Layout
17111 \begin_inset Flex Code
17114 \begin_layout Plain Layout
17123 \begin_inset space \thinspace{}
17127 \begin_inset Flex Code
17130 \begin_layout Plain Layout
17136 ] Whether to use the content of the inset as the label, when the inset is
17141 \begin_layout Description
17142 \begin_inset Flex Code
17145 \begin_layout Plain Layout
17152 \begin_inset Flex Code
17155 \begin_layout Plain Layout
17161 ] As with paragraph styles, see
17162 \begin_inset CommandInset ref
17164 reference "sub:Paragraph-Styles"
17169 Note that you need to specify the complete type, e.
17170 \begin_inset space \thinspace{}
17174 \begin_inset space ~
17178 \begin_inset Flex Code
17181 \begin_layout Plain Layout
17182 CopyStyle Flex:<name>
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{}
17217 \begin_inset Flex Code
17220 \begin_layout Plain Layout
17226 ] Indicates whether the user may employ the Paragraph Settings dialog to
17227 customize the paragraph.
17230 \begin_layout Description
17231 \begin_inset Flex Code
17234 \begin_layout Plain Layout
17241 \begin_inset Flex Code
17244 \begin_layout Plain Layout
17251 \begin_inset Flex Code
17254 \begin_layout Plain Layout
17261 \begin_inset Flex Code
17264 \begin_layout Plain Layout
17270 , describing the rendering style used for the inset's frame and buttons.
17271 Footnotes generally use
17272 \begin_inset Flex Code
17275 \begin_layout Plain Layout
17281 , ERT insets generally
17282 \begin_inset Flex Code
17285 \begin_layout Plain Layout
17291 , and character styles
17292 \begin_inset Flex Code
17295 \begin_layout Plain Layout
17304 \begin_layout Description
17305 \begin_inset Flex Code
17308 \begin_layout Plain Layout
17315 \begin_inset Flex Code
17318 \begin_layout Plain Layout
17327 \begin_inset space \thinspace{}
17333 \begin_inset Flex Code
17336 \begin_layout Plain Layout
17345 \begin_inset Flex Code
17348 \begin_layout Plain Layout
17355 \begin_inset Flex Code
17358 \begin_layout Plain Layout
17365 Indicates whether the environment will stand on its own in the output or
17366 will appear inline with the surrounding text.
17367 If set to false, it is supposed that the \SpecialChar LaTeX
17368 environment ignores white space
17369 (including one newline character) after the
17370 \begin_inset Flex Code
17373 \begin_layout Plain Layout
17386 \begin_inset Flex Code
17389 \begin_layout Plain Layout
17405 \begin_layout Description
17406 \begin_inset Flex Code
17409 \begin_layout Plain Layout
17415 Required at the end of the
17416 \begin_inset Flex Code
17419 \begin_layout Plain Layout
17428 \begin_layout Description
17429 \begin_inset Flex Code
17432 \begin_layout Plain Layout
17438 The font used for both the text body
17444 \begin_inset CommandInset ref
17446 reference "sub:Font-description"
17451 Note that defining this font automatically defines the
17452 \begin_inset Flex Code
17455 \begin_layout Plain Layout
17461 to the same value, so define this first and define
17462 \begin_inset Flex Code
17465 \begin_layout Plain Layout
17471 later if you want them to be different.
17472 \change_inserted -195340706 1421002157
17476 \begin_layout Description
17478 \change_inserted -195340706 1421002157
17479 \begin_inset Flex Code
17482 \begin_layout Plain Layout
17484 \change_inserted -195340706 1421002157
17485 FixedWidthPreambleEncoding
17491 \begin_inset Flex Code
17494 \begin_layout Plain Layout
17496 \change_inserted -195340706 1421002157
17505 \begin_inset space \thinspace{}
17509 \begin_inset Flex Code
17512 \begin_layout Plain Layout
17514 \change_inserted -195340706 1421002157
17520 ] Force a fixed width encoding for the translated contents of
17521 \begin_inset Flex Code
17524 \begin_layout Plain Layout
17526 \change_inserted -195340706 1421002157
17533 \begin_inset Flex Code
17536 \begin_layout Plain Layout
17538 \change_inserted -195340706 1421002157
17544 code generated by this layout.
17545 This is needed for special packages like the listings package that do not
17546 work with variable width encodings such as utf8.
17548 This setting is ignored if fully unicode aware \SpecialChar LaTeX
17549 backends such as Xe\SpecialChar LaTeX
17556 \begin_layout Description
17557 \begin_inset Flex Code
17560 \begin_layout Plain Layout
17561 ForceLocalFontSwitch
17567 \begin_inset Flex Code
17570 \begin_layout Plain Layout
17579 \begin_inset space \thinspace{}
17583 \begin_inset Flex Code
17586 \begin_layout Plain Layout
17592 ] When using babel, always use a local font switch (
17593 \begin_inset Flex Code
17596 \begin_layout Plain Layout
17604 ), never a global one (such as
17605 \begin_inset Flex Code
17608 \begin_layout Plain Layout
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
17656 \begin_inset Quotes eld
17660 \begin_inset Quotes erd
17663 language, leading to Left-to-Right (Latin) output, e.
17664 \begin_inset space \thinspace{}
17668 \begin_inset space \space{}
17671 in \SpecialChar TeX
17674 \change_inserted -712698321 1417441977
17678 \begin_layout Description
17680 \change_inserted -712698321 1417442090
17681 \begin_inset Flex Code
17684 \begin_layout Plain Layout
17686 \change_inserted -712698321 1417441983
17693 \begin_inset Flex Code
17696 \begin_layout Plain Layout
17698 \change_inserted -712698321 1417441978
17707 \begin_inset space \thinspace{}
17711 \begin_inset Flex Code
17714 \begin_layout Plain Layout
17716 \change_inserted -712698321 1417441978
17722 ] Force a a line break in the \SpecialChar LaTeX
17723 output before the inset starts and after
17725 This assures the inset itself is output on its own lines, for parsing purposes.
17727 \change_inserted 274215730 1419105878
17733 \begin_layout Description
17734 \begin_inset Flex Code
17737 \begin_layout Plain Layout
17744 \begin_inset Flex Code
17747 \begin_layout Plain Layout
17756 \begin_inset space \thinspace{}
17760 \begin_inset Flex Code
17763 \begin_layout Plain Layout
17769 ] Indicates whether the
17770 \begin_inset Flex Code
17773 \begin_layout Plain Layout
17779 should be used or, instead, the user can change the paragraph style used
17784 \begin_layout Description
17785 \begin_inset Flex Code
17788 \begin_layout Plain Layout
17795 \begin_inset Flex Code
17798 \begin_layout Plain Layout
17807 \begin_inset space \thinspace{}
17811 \begin_inset Flex Code
17814 \begin_layout Plain Layout
17820 ] As with paragraph styles, see
17821 \begin_inset CommandInset ref
17823 reference "sub:Paragraph-Styles"
17830 \begin_layout Description
17831 \begin_inset Flex Code
17834 \begin_layout Plain Layout
17840 These tags control the XHTML output.
17842 \begin_inset CommandInset ref
17844 reference "sec:Tags-for-XHTML"
17851 \begin_layout Description
17852 \begin_inset Flex Code
17855 \begin_layout Plain Layout
17862 \begin_inset Flex Code
17865 \begin_layout Plain Layout
17874 \begin_inset space \thinspace{}
17878 \begin_inset Flex Code
17881 \begin_layout Plain Layout
17887 ] Whether to include the contents of this inset in the strings generated
17888 for the `Outline' pane.
17889 One would not, for example, want the content of a footnote in a section
17890 header to be included in the TOC displayed in the outline, but one would
17891 normally want the content of a character style displayed.
17892 Default is false: not to include.
17895 \begin_layout Description
17896 \begin_inset Flex Code
17899 \begin_layout Plain Layout
17908 \begin_inset Flex Code
17911 \begin_layout Plain Layout
17920 \begin_inset space \thinspace{}
17924 \begin_inset Flex Code
17927 \begin_layout Plain Layout
17933 ] As with paragraph styles, see
17934 \begin_inset CommandInset ref
17936 reference "sub:Paragraph-Styles"
17943 \begin_layout Description
17944 \begin_inset Flex Code
17947 \begin_layout Plain Layout
17953 The font used for the label.
17955 \begin_inset CommandInset ref
17957 reference "sub:Font-description"
17962 Note that this definition can never appear before
17963 \begin_inset Flex Code
17966 \begin_layout Plain Layout
17972 , lest it be ineffective.
17975 \begin_layout Description
17976 \begin_inset Flex Code
17979 \begin_layout Plain Layout
17986 \begin_inset Flex Code
17989 \begin_layout Plain Layout
17996 \begin_inset Quotes erd
18000 \begin_inset Quotes erd
18003 ] What will be displayed on the button or elsewhere as the inset label.
18005 \begin_inset Flex Code
18008 \begin_layout Plain Layout
18016 \begin_inset Flex Code
18019 \begin_layout Plain Layout
18025 ) modify this label on the fly.
18028 \begin_layout Description
18029 \begin_inset Flex Code
18032 \begin_layout Plain Layout
18038 Language dependent preamble; see
18039 \begin_inset CommandInset ref
18041 reference "sub:I18n"
18048 \begin_layout Description
18049 \begin_inset Flex Code
18052 \begin_layout Plain Layout
18059 \begin_inset Flex Code
18062 \begin_layout Plain Layout
18068 ] The name of the corresponding \SpecialChar LaTeX
18070 Either the environment or command name.
18073 \begin_layout Description
18074 \begin_inset Flex Code
18077 \begin_layout Plain Layout
18084 \begin_inset Flex Code
18087 \begin_layout Plain Layout
18093 ] The optional parameter for the corresponding
18094 \begin_inset Flex Code
18097 \begin_layout Plain Layout
18103 stuff, including possible bracket pairs like
18104 \begin_inset Flex Code
18107 \begin_layout Plain Layout
18114 This parameter cannot be changed from within \SpecialChar LyX
18116 \begin_inset Flex Code
18119 \begin_layout Plain Layout
18125 for customizable parameters).
18126 It will be output as is after all \SpecialChar LaTeX
18128 \begin_inset Flex Code
18131 \begin_layout Plain Layout
18140 \begin_layout Description
18141 \begin_inset Flex Code
18144 \begin_layout Plain Layout
18151 \begin_inset Flex Code
18154 \begin_layout Plain Layout
18155 Command, Environment, None
18160 ] How the style should be translated into \SpecialChar LaTeX
18165 \begin_layout Plain Layout
18166 \begin_inset Flex Code
18169 \begin_layout Plain Layout
18175 is perhaps a bit misleading, since these rules apply to SGML classes too.
18176 Visit the SGML class files for specific examples.
18182 \begin_inset Separator parbreak
18189 \begin_layout Description
18190 \begin_inset Flex Code
18193 \begin_layout Plain Layout
18199 means nothing special
18202 \begin_layout Description
18203 \begin_inset Flex Code
18206 \begin_layout Plain Layout
18213 \begin_inset Flex Code
18216 \begin_layout Plain Layout
18223 {\SpecialChar ldots
18232 \begin_layout Description
18233 \begin_inset Flex Code
18236 \begin_layout Plain Layout
18243 \begin_inset Flex Code
18246 \begin_layout Plain Layout
18253 }\SpecialChar ldots
18268 \begin_layout Standard
18269 Putting the last few things together, the \SpecialChar LaTeX
18270 output will be either:
18273 \begin_layout LyX-Code
18276 LatexName[LatexParam]{\SpecialChar ldots
18280 \begin_layout Standard
18284 \begin_layout LyX-Code
18287 begin{LatexName}[LatexParam] \SpecialChar ldots
18293 \begin_layout Standard
18294 depending upon the \SpecialChar LaTeX
18299 \begin_layout Description
18300 \begin_inset Flex Code
18303 \begin_layout Plain Layout
18310 \begin_inset Flex Code
18313 \begin_layout Plain Layout
18319 ] A string that is put at the beginning of the layout content.
18320 A line break in the output can be indicated by
18321 \begin_inset Flex Code
18324 \begin_layout Plain Layout
18333 \begin_layout Description
18334 \begin_inset Flex Code
18337 \begin_layout Plain Layout
18344 \begin_inset Flex Code
18347 \begin_layout Plain Layout
18354 \begin_inset Flex Code
18357 \begin_layout Plain Layout
18364 \begin_inset Flex Code
18367 \begin_layout Plain Layout
18374 \begin_inset Flex Code
18377 \begin_layout Plain Layout
18383 (indicating a dummy definition ending definitions of charstyles, etc).
18384 This entry is required in and is only meaningful for Flex insets.
18385 Among other things, it determines on which menu this inset will appear.
18387 \begin_inset Flex Code
18390 \begin_layout Plain Layout
18398 \begin_inset Flex Code
18401 \begin_layout Plain Layout
18407 will automatically set
18408 \begin_inset Flex Code
18411 \begin_layout Plain Layout
18419 \begin_inset Flex Code
18422 \begin_layout Plain Layout
18428 can be set to true for
18429 \begin_inset Flex Code
18432 \begin_layout Plain Layout
18438 insets by setting it
18443 \begin_inset Flex Code
18446 \begin_layout Plain Layout
18456 \begin_layout Description
18457 \begin_inset Flex Code
18460 \begin_layout Plain Layout
18467 \begin_inset Flex Code
18470 \begin_layout Plain Layout
18479 \begin_inset space \thinspace{}
18483 \begin_inset Flex Code
18486 \begin_layout Plain Layout
18492 ] Whether multiple paragraphs are permitted in this inset.
18494 \begin_inset Flex Code
18497 \begin_layout Plain Layout
18503 to the same value and
18504 \begin_inset Flex Code
18507 \begin_layout Plain Layout
18513 to the opposite value.
18514 These can be reset to other values, if they are used
18519 \begin_inset Flex Code
18522 \begin_layout Plain Layout
18532 \begin_layout Description
18533 \begin_inset Flex Code
18536 \begin_layout Plain Layout
18543 \begin_inset Flex Code
18546 \begin_layout Plain Layout
18555 \begin_inset space \thinspace{}
18559 \begin_inset Flex Code
18562 \begin_layout Plain Layout
18568 ] Whether fragile commands in this inset should be
18569 \begin_inset Flex Code
18572 \begin_layout Plain Layout
18585 whether the command should itself be protected.) Default is false.
18588 \begin_layout Description
18589 \begin_inset Flex Code
18592 \begin_layout Plain Layout
18599 \begin_inset Flex Code
18602 \begin_layout Plain Layout
18608 ] Deletes an existing
18609 \begin_inset Flex Code
18612 \begin_layout Plain Layout
18619 \change_inserted -712698321 1417953494
18623 \begin_layout Description
18625 \change_inserted -712698321 1417953559
18626 \begin_inset Flex Code
18629 \begin_layout Plain Layout
18631 \change_inserted -712698321 1417953494
18638 \begin_inset Flex Code
18641 \begin_layout Plain Layout
18643 \change_inserted -712698321 1417953574
18650 \begin_inset Flex Code
18653 \begin_layout Plain Layout
18655 \change_inserted -712698321 1417953533
18661 that has replaced this
18662 \begin_inset Flex Code
18665 \begin_layout Plain Layout
18667 \change_inserted -712698321 1417953551
18674 This is used to rename an
18675 \begin_inset Flex Code
18678 \begin_layout Plain Layout
18680 \change_inserted -712698321 1417953559
18686 , while keeping backward compatibility.
18691 \begin_layout Description
18692 \begin_inset Flex Code
18695 \begin_layout Plain Layout
18702 \begin_inset Flex Code
18705 \begin_layout Plain Layout
18714 \begin_inset space \thinspace{}
18718 \begin_inset Flex Code
18721 \begin_layout Plain Layout
18727 ] As with paragraph styles, see
18728 \begin_inset CommandInset ref
18730 reference "sub:Paragraph-Styles"
18738 \begin_layout Description
18739 \begin_inset Flex Code
18742 \begin_layout Plain Layout
18749 \begin_inset Flex Code
18752 \begin_layout Plain Layout
18761 \begin_inset space \thinspace{}
18765 \begin_inset Flex Code
18768 \begin_layout Plain Layout
18774 ] As with paragraph styles, see
18775 \begin_inset CommandInset ref
18777 reference "sub:Paragraph-Styles"
18785 \begin_layout Description
18786 \begin_inset Flex Code
18789 \begin_layout Plain Layout
18795 As with paragraph styles, see
18796 \begin_inset CommandInset ref
18798 reference "sub:Paragraph-Styles"
18805 \begin_layout Description
18806 \begin_inset Flex Code
18809 \begin_layout Plain Layout
18816 \begin_inset Flex Code
18819 \begin_layout Plain Layout
18825 ] The prefix to use when creating labels referring to insets of this type.
18826 This allows the use of formatted references.
18829 \begin_layout Description
18830 \begin_inset Flex Code
18833 \begin_layout Plain Layout
18840 \begin_inset Flex Code
18843 \begin_layout Plain Layout
18849 ] As with paragraph styles, see
18850 \begin_inset CommandInset ref
18852 reference "sub:Paragraph-Styles"
18859 \begin_layout Description
18860 \begin_inset Flex Code
18863 \begin_layout Plain Layout
18870 \begin_inset Flex Code
18873 \begin_layout Plain Layout
18882 \begin_inset space \thinspace{}
18886 \begin_inset Flex Code
18889 \begin_layout Plain Layout
18895 ] Resets the \SpecialChar LaTeX
18896 arguments of this layout (as defined via the
18897 \begin_inset Flex Code
18900 \begin_layout Plain Layout
18907 This is useful if you have copied a style via
18908 \begin_inset Flex Code
18911 \begin_layout Plain Layout
18917 , but you do not want to inherit its (required and optional) arguments.
18920 \begin_layout Description
18921 \begin_inset Flex Code
18924 \begin_layout Plain Layout
18931 \begin_inset Flex Code
18934 \begin_layout Plain Layout
18941 \begin_inset space \thinspace{}
18945 \begin_inset Flex Code
18948 \begin_layout Plain Layout
18956 ] Whether this inset should use the font of its surrounding environment
18958 Default is false: use the font of the surrounding environment.
18961 \begin_layout Description
18962 \begin_inset Flex Code
18965 \begin_layout Plain Layout
18972 \begin_inset Flex Code
18975 \begin_layout Plain Layout
18981 ] A string that is put at the end of the layout content.
18982 A line break in the output can be indicated by
18983 \begin_inset Flex Code
18986 \begin_layout Plain Layout
18995 \begin_layout Description
18996 \begin_inset Flex Code
18999 \begin_layout Plain Layout
19006 \begin_inset Flex Code
19009 \begin_layout Plain Layout
19016 \begin_inset space \thinspace{}
19020 \begin_inset Flex Code
19023 \begin_layout Plain Layout
19031 ] Allow spell-checking the contents of this inset.
19035 \begin_layout Subsection
19037 \begin_inset CommandInset label
19039 name "sub:Counters"
19046 \begin_layout Standard
19047 It is necessary to define the counters (
19048 \begin_inset Flex MenuItem
19051 \begin_layout Plain Layout
19058 \begin_inset Flex MenuItem
19061 \begin_layout Plain Layout
19067 , \SpecialChar ldots
19068 ) in the text class itself.
19069 The standard counters are defined in the file
19070 \begin_inset Flex Code
19073 \begin_layout Plain Layout
19079 , so you may have to do no more than add
19082 \begin_layout LyX-Code
19083 Input stdcounters.inc
19086 \begin_layout Standard
19087 to your layout file to get them to work.
19088 But if you want to define custom counters, then you can do so.
19089 The counter declaration must begin with:
19092 \begin_layout LyX-Code
19093 Counter CounterName
19096 \begin_layout Standard
19098 \begin_inset Flex Code
19101 \begin_layout Plain Layout
19107 ' is replaced by the name of the counter.
19108 And it must end with
19109 \begin_inset Quotes eld
19113 \begin_inset Flex Code
19116 \begin_layout Plain Layout
19123 \begin_inset Quotes erd
19127 The following parameters can also be used:
19130 \begin_layout Description
19131 \begin_inset Flex Code
19134 \begin_layout Plain Layout
19141 \begin_inset Flex Code
19144 \begin_layout Plain Layout
19150 ] Sets the initial value for the counter, to which it will be reset whenever
19152 Normally, one will want the default, 1.
19155 \begin_layout Description
19156 \begin_inset Flex Code
19159 \begin_layout Plain Layout
19166 \begin_inset Flex Code
19169 \begin_layout Plain Layout
19176 \begin_inset Quotes erd
19180 \begin_inset Quotes erd
19183 ] When defined, this string defines how the counter is displayed.
19184 Setting this value sets
19185 \begin_inset Flex Code
19188 \begin_layout Plain Layout
19189 LabelStringAppendix
19195 The following special constructs can be used in the string:
19196 \begin_inset Separator parbreak
19203 \begin_layout Itemize
19204 \begin_inset Flex Code
19207 \begin_layout Plain Layout
19215 will be replaced by the expansion of the
19216 \begin_inset Flex Code
19219 \begin_layout Plain Layout
19226 \begin_inset Flex Code
19229 \begin_layout Plain Layout
19230 LabelStringAppendix
19236 \begin_inset Flex Code
19239 \begin_layout Plain Layout
19249 \begin_layout Itemize
19250 counter values can be expressed using \SpecialChar LaTeX
19252 \begin_inset Newline newline
19256 \begin_inset Flex Code
19259 \begin_layout Plain Layout
19276 \begin_inset Flex Code
19279 \begin_layout Plain Layout
19291 \begin_layout Plain Layout
19301 Actually, the situation is a bit more complicated: any
19320 other than those described below will produce arabic numerals.
19321 It would not be surprising to see this change in the future.
19327 \begin_inset Flex Code
19330 \begin_layout Plain Layout
19336 : 1, 2, 3,\SpecialChar ldots
19338 \begin_inset Flex Code
19341 \begin_layout Plain Layout
19347 for lower-case letters: a, b, c, \SpecialChar ldots
19349 \begin_inset Flex Code
19352 \begin_layout Plain Layout
19358 for upper-case letters: A, B, C, \SpecialChar ldots
19360 \begin_inset Flex Code
19363 \begin_layout Plain Layout
19369 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19371 \begin_inset Flex Code
19374 \begin_layout Plain Layout
19380 for upper-case roman numerals: I, II, III\SpecialChar ldots
19382 \begin_inset Flex Code
19385 \begin_layout Plain Layout
19391 for hebrew numerals.
19395 \begin_layout Standard
19396 If LabelString is not defined, a default value is constructed as follows:
19397 if the counter has a master counter
19398 \begin_inset Flex Code
19401 \begin_layout Plain Layout
19408 \begin_inset Flex Code
19411 \begin_layout Plain Layout
19418 \begin_inset Newline newline
19422 \begin_inset Flex Code
19425 \begin_layout Plain Layout
19435 is used; otherwise the string
19436 \begin_inset Flex Code
19439 \begin_layout Plain Layout
19450 \begin_layout Description
19451 \begin_inset Flex Code
19454 \begin_layout Plain Layout
19455 LabelStringAppendix
19461 \begin_inset Flex Code
19464 \begin_layout Plain Layout
19471 \begin_inset Quotes erd
19475 \begin_inset Quotes erd
19479 \begin_inset Flex Code
19482 \begin_layout Plain Layout
19488 , but for use in the Appendix.
19491 \begin_layout Description
19492 \begin_inset Flex Code
19495 \begin_layout Plain Layout
19502 \begin_inset Flex Code
19505 \begin_layout Plain Layout
19512 \begin_inset Quotes erd
19516 \begin_inset Quotes erd
19519 ] A format for use with formatted references to this counter.
19520 For example, one might want to have references to section numbers appear
19522 \begin_inset Quotes eld
19526 \begin_inset Quotes erd
19530 The string should contain
19531 \begin_inset Quotes eld
19535 \begin_inset Quotes erd
19539 This will be replaced by the counter number itself.
19540 So, for sections, it would be: Section ##.
19543 \begin_layout Description
19544 \begin_inset Flex Code
19547 \begin_layout Plain Layout
19554 \begin_inset Flex Code
19557 \begin_layout Plain Layout
19564 \begin_inset Quotes erd
19568 \begin_inset Quotes erd
19571 ] If this is set to the name of another counter, the present counter will
19572 be reset every time the other one is increased.
19574 \begin_inset Flex Code
19577 \begin_layout Plain Layout
19584 \begin_inset Flex Code
19587 \begin_layout Plain Layout
19596 \begin_layout Subsection
19598 \begin_inset CommandInset label
19600 name "sub:Font-description"
19607 \begin_layout Standard
19608 A font description looks like this:
19611 \begin_layout LyX-Code
19625 \begin_layout LyX-Code
19629 \begin_layout LyX-Code
19633 \begin_layout Standard
19634 The following commands are available:
19637 \begin_layout Description
19638 \begin_inset Flex Code
19641 \begin_layout Plain Layout
19648 \begin_inset Flex Code
19651 \begin_layout Plain Layout
19660 \begin_inset Flex Code
19663 \begin_layout Plain Layout
19670 \begin_inset Flex Code
19673 \begin_layout Plain Layout
19680 \begin_inset Flex Code
19683 \begin_layout Plain Layout
19690 \begin_inset Flex Code
19693 \begin_layout Plain Layout
19700 \begin_inset Flex Code
19703 \begin_layout Plain Layout
19710 \begin_inset Flex Code
19713 \begin_layout Plain Layout
19720 \begin_inset Flex Code
19723 \begin_layout Plain Layout
19730 \begin_inset Flex Code
19733 \begin_layout Plain Layout
19742 \begin_layout Description
19743 \begin_inset Flex Code
19746 \begin_layout Plain Layout
19753 \begin_inset Flex Code
19756 \begin_layout Plain Layout
19765 \begin_inset Flex Code
19768 \begin_layout Plain Layout
19775 \begin_inset Flex Code
19778 \begin_layout Plain Layout
19787 \begin_layout Description
19788 \begin_inset Flex Code
19791 \begin_layout Plain Layout
19798 \begin_inset Flex Code
19801 \begin_layout Plain Layout
19807 ] Valid arguments are:
19808 \begin_inset Flex Code
19811 \begin_layout Plain Layout
19818 \begin_inset Flex Code
19821 \begin_layout Plain Layout
19828 \begin_inset Flex Code
19831 \begin_layout Plain Layout
19838 \begin_inset Flex Code
19841 \begin_layout Plain Layout
19848 \begin_inset Flex Code
19851 \begin_layout Plain Layout
19858 \begin_inset Flex Code
19861 \begin_layout Plain Layout
19868 \begin_inset Flex Code
19871 \begin_layout Plain Layout
19878 \begin_inset Flex Code
19881 \begin_layout Plain Layout
19888 \begin_inset Flex Code
19891 \begin_layout Plain Layout
19898 \begin_inset Flex Code
19901 \begin_layout Plain Layout
19908 \begin_inset Flex Code
19911 \begin_layout Plain Layout
19918 \begin_inset Flex Code
19921 \begin_layout Plain Layout
19928 Each of these turns on or off the corresponding attribute.
19930 \begin_inset Flex Code
19933 \begin_layout Plain Layout
19939 turns on emphasis, and
19940 \begin_inset Flex Code
19943 \begin_layout Plain Layout
19951 \begin_inset Newline newline
19954 If the latter seems puzzling, remember that the font settings for the present
19955 context are generally inherited from the surrounding context.
19957 \begin_inset Flex Code
19960 \begin_layout Plain Layout
19966 would turn off the emphasis that was anyway in effect, say, in a theorem
19970 \begin_layout Description
19971 \begin_inset Flex Code
19974 \begin_layout Plain Layout
19981 \begin_inset Flex Code
19984 \begin_layout Plain Layout
19993 \begin_inset Flex Code
19996 \begin_layout Plain Layout
20005 \begin_layout Description
20006 \begin_inset Flex Code
20009 \begin_layout Plain Layout
20016 \begin_inset Flex Code
20019 \begin_layout Plain Layout
20028 \begin_inset Flex Code
20031 \begin_layout Plain Layout
20038 \begin_inset Flex Code
20041 \begin_layout Plain Layout
20048 \begin_inset Flex Code
20051 \begin_layout Plain Layout
20060 \begin_layout Description
20061 \begin_inset Flex Code
20064 \begin_layout Plain Layout
20071 \begin_inset Flex Code
20074 \begin_layout Plain Layout
20081 \begin_inset Flex Code
20084 \begin_layout Plain Layout
20091 \begin_inset Flex Code
20094 \begin_layout Plain Layout
20103 \begin_inset Flex Code
20106 \begin_layout Plain Layout
20113 \begin_inset Flex Code
20116 \begin_layout Plain Layout
20123 \begin_inset Flex Code
20126 \begin_layout Plain Layout
20133 \begin_inset Flex Code
20136 \begin_layout Plain Layout
20143 \begin_inset Flex Code
20146 \begin_layout Plain Layout
20155 \begin_layout Subsection
20156 \begin_inset CommandInset label
20158 name "sub:Citation-format-description"
20162 Citation format description
20165 \begin_layout Standard
20167 \begin_inset Flex Code
20170 \begin_layout Plain Layout
20176 blocks are used to describe how bibliographic information should be displayed,
20177 both within \SpecialChar LyX
20178 itself (in the citation dialog and in tooltips, for example)
20179 and in XHTML output.
20180 Such a block might look like this:
20183 \begin_layout LyX-Code
20187 \begin_layout LyX-Code
20191 \begin_layout LyX-Code
20195 \begin_layout LyX-Code
20199 \begin_layout Standard
20200 The individual lines define how the bibliographic information associated
20201 with an article or book, respectively, is to be displayed, and such a definitio
20202 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20205 defines a default format in the source code that will be used if no specific
20206 definition has been given.
20208 predefines several formats in the file
20209 \begin_inset Flex Code
20212 \begin_layout Plain Layout
20218 , which is included in most of \SpecialChar LyX
20219 's document classes.
20222 \begin_layout Standard
20223 The definitions use a simple language that allows Bib\SpecialChar TeX
20224 keys to be replaced
20226 Keys should be enclosed in
20227 \begin_inset Flex Code
20230 \begin_layout Plain Layout
20237 \begin_inset Flex Code
20240 \begin_layout Plain Layout
20247 So a simple definition might look like this:
20250 \begin_layout LyX-Code
20252 \begin_inset Quotes eld
20256 \begin_inset Quotes erd
20262 \begin_layout Standard
20263 This would print the author, followed by a comma, followed by the title,
20264 in quotes, followed by a period.
20267 \begin_layout Standard
20268 Of course, sometimes you may want to print a key only if it exists.
20269 This can be done by using a conditional construction, such as:
20270 \begin_inset Flex Code
20273 \begin_layout Plain Layout
20275 \begin_inset space ~
20285 \begin_inset Flex Code
20288 \begin_layout Plain Layout
20294 key exists, then print
20295 \begin_inset Quotes eld
20299 \begin_inset space ~
20303 \begin_inset Quotes erd
20306 followed by the volume key.
20307 It is also possible to have an else clause in the conditional, such as:
20308 \begin_inset Newline newline
20312 \begin_inset Flex Code
20315 \begin_layout Plain Layout
20316 {%author%[[%author%]][[%editor%, ed.]]}
20322 \begin_inset Newline newline
20326 \begin_inset Flex Code
20329 \begin_layout Plain Layout
20335 key is printed if it exists; otherwise, the editor key is printed, followed
20337 \begin_inset Quotes eld
20341 \begin_inset space ~
20345 \begin_inset Quotes erd
20348 Note that the key is again enclosed in
20349 \begin_inset Flex Code
20352 \begin_layout Plain Layout
20358 signs; the entire conditional is enclosed in braces; and the if and else
20359 clauses are enclosed in double brackets,
20360 \begin_inset Quotes eld
20364 \begin_inset Flex Code
20367 \begin_layout Plain Layout
20374 \begin_inset Quotes eld
20378 \begin_inset Quotes eld
20382 \begin_inset Flex Code
20385 \begin_layout Plain Layout
20392 \begin_inset Quotes erd
20396 There must be no space between any of these.
20399 \begin_layout Standard
20400 There is one other piece of syntax available in definitions, which looks
20402 \begin_inset Flex Code
20405 \begin_layout Plain Layout
20412 This defines a piece of formatting information that is to be used when
20414 \begin_inset Quotes eld
20418 \begin_inset Quotes erd
20422 Obviously, we do not want to output HTML tags when writing plain text,
20423 so they should be wrapped in
20424 \begin_inset Quotes eld
20428 \begin_inset Quotes erd
20432 \begin_inset Quotes eld
20436 \begin_inset Quotes erd
20442 \begin_layout Standard
20443 Two special sorts of definitions are also possible in a
20444 \begin_inset Flex Code
20447 \begin_layout Plain Layout
20454 An example of the first would be:
20457 \begin_layout LyX-Code
20459 \begin_inset Quotes eld
20463 \begin_inset Quotes erd
20469 \begin_layout Standard
20470 This is an abbreviation, or macro, and it can be used by treating it as
20472 \begin_inset Flex Code
20475 \begin_layout Plain Layout
20484 \begin_inset Flex Code
20487 \begin_layout Plain Layout
20493 exactly as it would treat its definition.
20494 So, let us issue the obvious
20502 \begin_layout LyX-Code
20506 \begin_layout Standard
20507 or anything like it.
20509 shouldn't go into an infinite loop, but it may go into a long one before
20513 \begin_layout Standard
20514 The second sort of special definition might look like this:
20517 \begin_layout LyX-Code
20521 \begin_layout Standard
20522 This defines a translatable piece of text, which allows relevant parts of
20523 the bibliography to be translated.
20524 It can be included in a definition by treating it as a key:
20525 \begin_inset Flex Code
20528 \begin_layout Plain Layout
20535 Several of these are predefined in
20536 \begin_inset Flex Code
20539 \begin_layout Plain Layout
20546 Note that these are not macros, in the sense just defined.
20547 They will not be expanded.
20550 \begin_layout Standard
20551 So here then is an example that use all these features:
20552 \begin_inset VSpace defskip
20558 \begin_layout Standard
20562 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20565 \begin_layout Standard
20566 \begin_inset VSpace defskip
20569 This defines a macro that prints the author, followed by a comma, if the
20571 \begin_inset Flex Code
20574 \begin_layout Plain Layout
20580 key is defined, or else prints the name of the editor, followed by the
20582 \begin_inset Flex Code
20585 \begin_layout Plain Layout
20591 or its translation (it is by default
20592 \begin_inset Quotes eld
20596 \begin_inset Quotes erd
20600 \begin_inset Flex Code
20603 \begin_layout Plain Layout
20610 Note that this is in fact defined in
20611 \begin_inset Flex Code
20614 \begin_layout Plain Layout
20620 , so you can use it in your own definitions, or re-definitions, if you load
20624 \begin_layout Section
20625 \begin_inset CommandInset label
20627 name "sec:Tags-for-XHTML"
20631 Tags for XHTML output
20634 \begin_layout Standard
20635 As with \SpecialChar LaTeX
20636 or DocBook, the format of \SpecialChar LyX
20637 's XHTML output is also controlled by
20638 layout information.
20639 In general, \SpecialChar LyX
20640 provides sensible defaults and, as mentioned earlier, it will
20641 even construct default CSS style rules from the other layout tags.
20642 For example, \SpecialChar LyX
20643 will attempt to use the information provided in the
20644 \begin_inset Flex Code
20647 \begin_layout Plain Layout
20653 declaration for the Chapter style to write CSS that will appropriately
20654 format chapter headings.
20657 \begin_layout Standard
20658 In many cases, then, you may not have to do anything at all to get acceptable
20659 XHTML output for your own environments, custom insets, and so forth.
20660 But in some cases you will, and so \SpecialChar LyX
20661 provides a number of layout tags that
20662 can be used to customize the XHTML and CSS that are generated.
20665 \begin_layout Standard
20666 Note that there are two tags,
20667 \begin_inset Flex Code
20670 \begin_layout Plain Layout
20677 \begin_inset Flex Code
20680 \begin_layout Plain Layout
20686 that may appear outside style and inset declarations.
20688 \begin_inset CommandInset ref
20690 reference "sub:General-text-class"
20694 for details on these.
20697 \begin_layout Subsection
20698 \begin_inset CommandInset label
20700 name "sub:Paragraph-Style-XHTML"
20707 \begin_layout Standard
20708 The sort of XHTML \SpecialChar LyX
20709 outputs for a paragraph depends upon whether we are dealing
20710 with a normal paragraph, a command, or an environment, where this is itself
20711 determined by the contents of the corresponding
20712 \begin_inset Flex Code
20715 \begin_layout Plain Layout
20726 \begin_layout Standard
20727 For a command or normal paragraph, the output XHTML has the following form:
20730 \begin_layout LyX-Code
20732 \begin_inset Quotes erd
20736 \begin_inset Quotes erd
20742 \begin_layout LyX-Code
20744 \begin_inset Quotes erd
20748 \begin_inset Quotes erd
20754 \begin_layout LyX-Code
20755 Contents of the paragraph.
20758 \begin_layout LyX-Code
20762 \begin_layout Standard
20763 The label tags are of course omitted if the paragraph does not have a label.
20766 \begin_layout Standard
20767 For an environment that is not some sort of list, the XHTML takes this form:
20770 \begin_layout LyX-Code
20772 \begin_inset Quotes erd
20776 \begin_inset Quotes erd
20782 \begin_layout LyX-Code
20784 \begin_inset Quotes erd
20788 \begin_inset Quotes erd
20792 \begin_inset Quotes erd
20796 \begin_inset Quotes erd
20799 >Environment Label</labeltag>First paragraph.</itemtag>
20802 \begin_layout LyX-Code
20803 <itemtag>Second paragraph.</itemtag>
20806 \begin_layout LyX-Code
20810 \begin_layout Standard
20811 Note that the label is output only for the first paragraph, as it should
20812 be for a theorem, for example.
20816 \begin_layout Standard
20817 For a list, we have one of these forms:
20820 \begin_layout LyX-Code
20822 \begin_inset Quotes erd
20826 \begin_inset Quotes erd
20832 \begin_layout LyX-Code
20834 \begin_inset Quotes erd
20838 \begin_inset Quotes erd
20842 \begin_inset Quotes erd
20846 \begin_inset Quotes erd
20849 >List Label</labeltag>First item.</itemtag>
20852 \begin_layout LyX-Code
20854 \begin_inset Quotes erd
20858 \begin_inset Quotes erd
20862 \begin_inset Quotes erd
20866 \begin_inset Quotes erd
20869 >List Label</labeltag>Second item.</itemtag>
20872 \begin_layout LyX-Code
20876 \begin_layout LyX-Code
20880 \begin_layout LyX-Code
20882 \begin_inset Quotes erd
20886 \begin_inset Quotes erd
20892 \begin_layout LyX-Code
20894 \begin_inset Quotes erd
20898 \begin_inset Quotes erd
20901 >List Label</labeltag><itemtag attr=
20902 \begin_inset Quotes erd
20906 \begin_inset Quotes erd
20909 >First item.</itemtag>
20912 \begin_layout LyX-Code
20914 \begin_inset Quotes erd
20918 \begin_inset Quotes erd
20921 >List Label</labeltag><itemtag attr=
20922 \begin_inset Quotes erd
20926 \begin_inset Quotes erd
20929 >Second item.</itemtag>
20932 \begin_layout LyX-Code
20936 \begin_layout Standard
20937 Note the different orders of
20938 \begin_inset Flex Code
20941 \begin_layout Plain Layout
20948 \begin_inset Flex Code
20951 \begin_layout Plain Layout
20958 Which order we get depends upon the setting of
20959 \begin_inset Flex Code
20962 \begin_layout Plain Layout
20969 \begin_inset Flex Code
20972 \begin_layout Plain Layout
20978 is false (the default), you get the first of these, with the label within
20979 the item; if true, you get the second, with the label outside the item.
20982 \begin_layout Standard
20983 The specific tags and attributes output for each paragraph type can be controlle
20984 d by means of the layout tags we are about to describe.
20985 As mentioned earlier, however, \SpecialChar LyX
20986 uses sensible defaults for many of these,
20987 so you often may not need to do very much to get good XHTML output.
20988 Think of the available tags as there so you can tweak things to your liking.
20991 \begin_layout Description
20992 \begin_inset Flex Code
20995 \begin_layout Plain Layout
21002 \begin_inset Flex Code
21005 \begin_layout Plain Layout
21011 ] Specifies attribute information to be output with the main tag.
21013 \begin_inset Quotes eld
21017 \begin_inset Flex Code
21020 \begin_layout Plain Layout
21027 \begin_inset Quotes erd
21031 By default, \SpecialChar LyX
21033 \begin_inset Quotes eld
21037 \begin_inset Flex Code
21040 \begin_layout Plain Layout
21047 \begin_inset Quotes erd
21051 \begin_inset Flex Code
21054 \begin_layout Plain Layout
21060 is the \SpecialChar LyX
21061 name of the layout, made lowercase, for example: chapter.
21066 contain any style information.
21068 \begin_inset Flex Code
21071 \begin_layout Plain Layout
21080 \begin_layout Description
21081 \begin_inset Flex Code
21084 \begin_layout Plain Layout
21091 \begin_inset Flex Code
21094 \begin_layout Plain Layout
21104 ] Whether to output the default CSS information \SpecialChar LyX
21105 generates for this layout,
21106 even if additional information is explicitly provided via
21107 \begin_inset Flex Code
21110 \begin_layout Plain Layout
21118 \begin_inset Flex Code
21121 \begin_layout Plain Layout
21127 allows you to alter or augment the generated CSS, rather than to override
21130 \begin_inset Flex Code
21133 \begin_layout Plain Layout
21142 \begin_layout Description
21143 \begin_inset Flex Code
21146 \begin_layout Plain Layout
21153 \begin_inset Flex Code
21156 \begin_layout Plain Layout
21162 ] The tag to be used for individual paragraphs of environments, replacing
21164 \begin_inset Flex Code
21167 \begin_layout Plain Layout
21173 in the examples above.
21175 \begin_inset Flex Code
21178 \begin_layout Plain Layout
21187 \begin_layout Description
21188 \begin_inset Flex Code
21191 \begin_layout Plain Layout
21198 \begin_inset Flex Code
21201 \begin_layout Plain Layout
21207 ] Attributes for the item tag.
21209 \begin_inset Quotes eld
21213 \begin_inset Flex Code
21216 \begin_layout Plain Layout
21217 class=`layoutname_item'
21223 \begin_inset Quotes erd
21231 contain any style information.
21233 \begin_inset Flex Code
21236 \begin_layout Plain Layout
21245 \begin_layout Description
21246 \begin_inset Flex Code
21249 \begin_layout Plain Layout
21256 \begin_inset Flex Code
21259 \begin_layout Plain Layout
21265 ] The tag to be used for paragraph and item labels, replacing
21266 \begin_inset Flex Code
21269 \begin_layout Plain Layout
21275 in the examples above.
21277 \begin_inset Flex Code
21280 \begin_layout Plain Layout
21287 \begin_inset Flex Code
21290 \begin_layout Plain Layout
21297 \begin_inset Flex Code
21300 \begin_layout Plain Layout
21307 \begin_inset Flex Code
21310 \begin_layout Plain Layout
21311 Centered_Top_Environment
21316 , in which case it defaults to
21317 \begin_inset Flex Code
21320 \begin_layout Plain Layout
21329 \begin_layout Description
21330 \begin_inset Flex Code
21333 \begin_layout Plain Layout
21340 \begin_inset Flex Code
21343 \begin_layout Plain Layout
21349 ] Attributes for the label tag.
21351 \begin_inset Quotes eld
21355 \begin_inset Flex Code
21358 \begin_layout Plain Layout
21359 class=`layoutname_label'
21365 \begin_inset Quotes erd
21373 contain any style information.
21375 \begin_inset Flex Code
21378 \begin_layout Plain Layout
21387 \begin_layout Description
21388 \begin_inset Flex Code
21391 \begin_layout Plain Layout
21398 \begin_inset Flex Code
21401 \begin_layout Plain Layout
21411 ] Meaningful only for list-like environments, this tag controls whether
21412 the label tag is output before or inside the item tag.
21413 This is used, for example, in the description environment, where we want
21415 \begin_inset Flex Code
21418 \begin_layout Plain Layout
21419 <dt>\SpecialChar ldots
21420 </dt><dd>\SpecialChar ldots
21428 \begin_inset Flex Code
21431 \begin_layout Plain Layout
21437 : The label tag is output inside the item tag.
21440 \begin_layout Description
21441 \begin_inset Flex Code
21444 \begin_layout Plain Layout
21450 Information to be output in the
21451 \begin_inset Flex Code
21454 \begin_layout Plain Layout
21460 section when this style is used.
21461 This might, for example, be used to include a
21462 \begin_inset Flex Code
21465 \begin_layout Plain Layout
21472 \begin_inset Flex Code
21475 \begin_layout Plain Layout
21484 \begin_layout Description
21485 \begin_inset Flex Code
21488 \begin_layout Plain Layout
21494 CSS style information to be included when this style is used.
21495 Note that this will automatically be wrapped in a layout-generated
21496 \begin_inset Flex Code
21499 \begin_layout Plain Layout
21505 block, so only the CSS itself need be included.
21507 \begin_inset Flex Code
21510 \begin_layout Plain Layout
21519 \begin_layout Description
21520 \begin_inset Flex Code
21523 \begin_layout Plain Layout
21530 \begin_inset Flex Code
21533 \begin_layout Plain Layout
21539 ] The tag to be used for the main label, replacing
21540 \begin_inset Flex Code
21543 \begin_layout Plain Layout
21549 in the examples above.
21551 \begin_inset Flex Code
21554 \begin_layout Plain Layout
21563 \begin_layout Description
21564 \begin_inset Flex Code
21567 \begin_layout Plain Layout
21574 \begin_inset Flex Code
21577 \begin_layout Plain Layout
21587 ] Marks this style as the one to be used to generate the
21588 \begin_inset Flex Code
21591 \begin_layout Plain Layout
21597 tag for the XHTML file.
21598 By default, it is false.
21600 \begin_inset Flex Code
21603 \begin_layout Plain Layout
21609 file sets it to true for the
21610 \begin_inset Flex Code
21613 \begin_layout Plain Layout
21623 \begin_layout Subsection
21627 \begin_layout Standard
21628 The XHTML output of insets can also be controlled by information in layout
21633 \begin_layout Plain Layout
21634 At present, this is true only for
21635 \begin_inset Quotes eld
21639 \begin_inset Quotes erd
21642 insets (insets you can type into) and is not true for
21643 \begin_inset Quotes eld
21647 \begin_inset Quotes erd
21650 insets (insets that are associated with dialog boxes).
21655 Here, too, \SpecialChar LyX
21656 tries to provide sensible defaults, and it constructs default
21658 But everything can be customized.
21661 \begin_layout Standard
21662 The XHTML \SpecialChar LyX
21663 outputs for an inset has the following form:
21666 \begin_layout LyX-Code
21668 \begin_inset Quotes erd
21672 \begin_inset Quotes erd
21678 \begin_layout LyX-Code
21679 <labeltag>Label</labeltag>
21682 \begin_layout LyX-Code
21684 \begin_inset Quotes erd
21688 \begin_inset Quotes erd
21691 >Contents of the inset.</innertag>
21694 \begin_layout LyX-Code
21698 \begin_layout Standard
21699 If the inset permits multiple paragraphs—that is, if
21700 \begin_inset Flex Code
21703 \begin_layout Plain Layout
21709 is true—then the contents of the inset will itself be output as paragraphs
21710 formatted according to the styles used for those paragraphs (standard,
21711 quote, and the like).
21712 The label tag is of course omitted if the paragraph does not have a label
21713 and, at present, is always
21714 \begin_inset Flex Code
21717 \begin_layout Plain Layout
21724 The inner tag is optional and, by default, does not appear.
21727 \begin_layout Standard
21728 The specific tags and attributes output for each inset can be controlled
21729 by means of the following layout tags.
21732 \begin_layout Description
21733 \begin_inset Flex Code
21736 \begin_layout Plain Layout
21743 \begin_inset Flex Code
21746 \begin_layout Plain Layout
21752 ] Specifies attribute information to be output with the main tag.
21754 \begin_inset Quotes eld
21758 \begin_inset Flex Code
21761 \begin_layout Plain Layout
21762 class=`myinset' onclick=`\SpecialChar ldots
21769 \begin_inset Quotes erd
21773 By default, \SpecialChar LyX
21775 \begin_inset Quotes eld
21779 \begin_inset Flex Code
21782 \begin_layout Plain Layout
21789 \begin_inset Quotes erd
21793 \begin_inset Flex Code
21796 \begin_layout Plain Layout
21802 is the \SpecialChar LyX
21803 name of the inset, made lowercase and with non-alphanumeric characters
21804 converted to underscores, for example: footnote.
21807 \begin_layout Description
21808 \begin_inset Flex Code
21811 \begin_layout Plain Layout
21818 \begin_inset Flex Code
21821 \begin_layout Plain Layout
21831 ] Whether to output the default CSS information \SpecialChar LyX
21832 generates for this layout,
21833 even if additional information is explicitly provided via
21834 \begin_inset Flex Code
21837 \begin_layout Plain Layout
21845 \begin_inset Flex Code
21848 \begin_layout Plain Layout
21854 allows you to alter or augment the generated CSS, rather than to override
21859 \begin_layout Description
21860 \begin_inset Flex Code
21863 \begin_layout Plain Layout
21870 \begin_inset Flex Code
21873 \begin_layout Plain Layout
21879 ] Attributes for the inner tag.
21881 \begin_inset Quotes eld
21885 \begin_inset Flex Code
21888 \begin_layout Plain Layout
21889 class=`insetname_inner'
21895 \begin_inset Quotes erd
21901 \begin_layout Description
21902 \begin_inset Flex Code
21905 \begin_layout Plain Layout
21912 \begin_inset Flex Code
21915 \begin_layout Plain Layout
21921 ] The inner tag, replacing
21922 \begin_inset Flex Code
21925 \begin_layout Plain Layout
21931 in the examples above.
21932 By default, there is none.
21935 \begin_layout Description
21936 \begin_inset Flex Code
21939 \begin_layout Plain Layout
21946 \begin_inset Flex Code
21949 \begin_layout Plain Layout
21957 ] Whether this inset represents a standalone block of text (such as a footnote)
21958 or instead represents material that is included in the surrounding text
21959 (such as a branch).
21963 \begin_layout Description
21964 \begin_inset Flex Code
21967 \begin_layout Plain Layout
21974 \begin_inset Flex Code
21977 \begin_layout Plain Layout
21983 ] A label for this inset, possibly including a reference to a counter.
21984 For example, for footnote, it might be:
21985 \begin_inset Flex Code
21988 \begin_layout Plain Layout
21997 This is optional, and there is no default.
22000 \begin_layout Description
22001 \begin_inset Flex Code
22004 \begin_layout Plain Layout
22010 Information to be output in the
22011 \begin_inset Flex Code
22014 \begin_layout Plain Layout
22020 section when this style is used.
22021 This might, for example, be used to include a
22022 \begin_inset Flex Code
22025 \begin_layout Plain Layout
22032 \begin_inset Flex Code
22035 \begin_layout Plain Layout
22044 \begin_layout Description
22045 \begin_inset Flex Code
22048 \begin_layout Plain Layout
22054 CSS style information to be included when this style is used.
22055 Note that this will automatically be wrapped in a layout-generated
22056 \begin_inset Flex Code
22059 \begin_layout Plain Layout
22065 block, so only the CSS itself need be included.
22068 \begin_layout Description
22069 \begin_inset Flex Code
22072 \begin_layout Plain Layout
22079 \begin_inset Flex Code
22082 \begin_layout Plain Layout
22088 ] The tag to be used for the main label, replacing
22089 \begin_inset Flex Code
22092 \begin_layout Plain Layout
22098 in the examples above.
22099 The default depends upon the setting of
22100 \begin_inset Flex Code
22103 \begin_layout Plain Layout
22110 \begin_inset Flex Code
22113 \begin_layout Plain Layout
22119 is true, the default is
22120 \begin_inset Flex Code
22123 \begin_layout Plain Layout
22129 ; if it is false, the default is
22130 \begin_inset Flex Code
22133 \begin_layout Plain Layout
22142 \begin_layout Subsection
22146 \begin_layout Standard
22147 The XHTML output for floats too can be controlled by layout information.
22148 The output has the following form:
22151 \begin_layout LyX-Code
22153 \begin_inset Quotes erd
22157 \begin_inset Quotes erd
22163 \begin_layout LyX-Code
22164 Contents of the float.
22167 \begin_layout LyX-Code
22171 \begin_layout Standard
22172 The caption, if there is one, is a separate inset and will be output as
22174 Its appearance can be controlled via the InsetLayout for caption insets.
22178 \begin_layout Description
22179 \begin_inset Flex Code
22182 \begin_layout Plain Layout
22189 \begin_inset Flex Code
22192 \begin_layout Plain Layout
22198 ] Specifies attribute information to be output with the main tag.
22200 \begin_inset Quotes eld
22204 \begin_inset Flex Code
22207 \begin_layout Plain Layout
22208 class=`myfloat' onclick=`\SpecialChar ldots
22215 \begin_inset Quotes erd
22219 By default, \SpecialChar LyX
22221 \begin_inset Quotes eld
22225 \begin_inset Flex Code
22228 \begin_layout Plain Layout
22229 class=`float float-floattype'
22235 \begin_inset Quotes erd
22239 \begin_inset Flex Code
22242 \begin_layout Plain Layout
22248 is \SpecialChar LyX
22249 's name for this type of float, as determined by the float declaration
22251 \begin_inset CommandInset ref
22253 reference "sub:Floats"
22257 ), though made lowercase and with non-alphanumeric characters converted
22258 to underscores, for example: float-table.
22261 \begin_layout Description
22262 \begin_inset Flex Code
22265 \begin_layout Plain Layout
22271 CSS style information to be included when this float is used.
22272 Note that this will automatically be wrapped in a layout-generated
22273 \begin_inset Flex Code
22276 \begin_layout Plain Layout
22282 block, so only the CSS itself need be included.
22285 \begin_layout Description
22286 \begin_inset Flex Code
22289 \begin_layout Plain Layout
22296 \begin_inset Flex Code
22299 \begin_layout Plain Layout
22305 ] The tag to be used for this float, replacing
22306 \begin_inset Quotes eld
22310 \begin_inset Flex Code
22313 \begin_layout Plain Layout
22320 \begin_inset Quotes erd
22323 in the example above.
22325 \begin_inset Flex Code
22328 \begin_layout Plain Layout
22334 and will rarely need changing.
22337 \begin_layout Subsection
22338 Bibliography formatting
22341 \begin_layout Standard
22342 The bibliography can be formatted using
22343 \begin_inset Flex Code
22346 \begin_layout Plain Layout
22354 \begin_inset CommandInset ref
22356 reference "sub:Citation-format-description"
22363 \begin_layout Subsection
22368 \begin_layout Standard
22369 We have several times mentioned that \SpecialChar LyX
22370 will generate default CSS style rules
22371 for both insets and paragraph styles, based upon the other layout information
22373 In this section, we shall say a word about which layout information \SpecialChar LyX
22378 \begin_layout Standard
22379 At present, \SpecialChar LyX
22380 auto-generates CSS only for font information, making use of
22382 \begin_inset Flex Code
22385 \begin_layout Plain Layout
22392 \begin_inset Flex Code
22395 \begin_layout Plain Layout
22402 \begin_inset Flex Code
22405 \begin_layout Plain Layout
22412 \begin_inset Flex Code
22415 \begin_layout Plain Layout
22422 \begin_inset Flex Code
22425 \begin_layout Plain Layout
22432 \begin_inset CommandInset ref
22434 reference "sub:Font-description"
22439 The translation is mostly straightforward and obvious.
22441 \begin_inset Quotes eld
22445 \begin_inset Flex Code
22448 \begin_layout Plain Layout
22455 \begin_inset Quotes erd
22459 \begin_inset Quotes eld
22463 \begin_inset Flex Code
22466 \begin_layout Plain Layout
22467 font-family: sans-serif;
22473 \begin_inset Quotes erd
22477 The correspondence of \SpecialChar LyX
22478 sizes and CSS sizes is a little less obvious but
22479 nonetheless intuitive.
22481 \begin_inset Flex Code
22484 \begin_layout Plain Layout
22491 \begin_inset Flex URL
22494 \begin_layout Plain Layout
22504 \begin_layout Chapter
22505 Including External Material
22506 \begin_inset CommandInset label
22508 name "chap:Including-External-Material"
22515 \begin_layout Standard
22516 \begin_inset Box Shadowbox
22526 height_special "totalheight"
22531 backgroundcolor "none"
22534 \begin_layout Plain Layout
22535 WARNING: This portion of the documentation has not been updated for some
22537 We certainly hope that it is still accurate, but there are no guarantees.
22545 \begin_layout Standard
22546 The use of material from sources external to \SpecialChar LyX
22547 is covered in detail in the
22553 This part of the manual covers what needs to happen behind the scenes for
22554 new sorts of material to be included.
22557 \begin_layout Section
22561 \begin_layout Standard
22562 The external material feature is based on the concept of a
22567 A template is a specification of how \SpecialChar LyX
22568 should interface with a certain kind
22570 As bundled, \SpecialChar LyX
22571 comes with predefined templates for Xfig figures, various
22572 raster format images, chess diagrams, and LilyPond music notation.
22573 You can check the actual list by using the menu
22574 \begin_inset Flex MenuItem
22577 \begin_layout Plain Layout
22578 Insert\SpecialChar menuseparator
22579 File\SpecialChar menuseparator
22586 Furthermore, it is possible to roll your own template to support a specific
22588 Later we'll describe in more detail what is involved, and hopefully you
22589 will submit all the templates you create so we can include them in a later
22594 \begin_layout Standard
22595 Another basic idea of the external material feature is to distinguish between
22596 the original file that serves as a base for final material and the produced
22597 file that is included in your exported or printed document.
22598 For example, consider the case of a figure produced with
22599 \begin_inset Flex Code
22602 \begin_layout Plain Layout
22609 The Xfig application itself works on an original file with the
22610 \begin_inset Flex Code
22613 \begin_layout Plain Layout
22620 Within Xfig, you create and change your figure, and when you are done,
22622 \begin_inset Flex Code
22625 \begin_layout Plain Layout
22632 When you want to include the figure in your document, you invoke
22633 \begin_inset Flex Code
22636 \begin_layout Plain Layout
22642 in order to create a PostScript file that can readily be included in your
22646 \begin_inset Flex Code
22649 \begin_layout Plain Layout
22655 file is the original file, and the PostScript file is the produced file.
22658 \begin_layout Standard
22659 This distinction is important in order to allow updating of the material
22660 while you are in the process of writing the document.
22661 Furthermore, it provides us with the flexibility that is needed to support
22662 multiple export formats.
22663 For instance, in the case of a plain text file, it is not exactly an award-winn
22664 ing idea to include the figure as raw PostScript.
22665 Instead, you would either prefer to just include a reference to the figure
22666 or try to invoke some graphics to ASCII converter to make the final result
22667 look similar to the real graphics.
22668 The external material management allows you to do this, because it is parametri
22669 zed on the different export formats that \SpecialChar LyX
22673 \begin_layout Standard
22674 Besides supporting the production of different products according to the
22675 exported format, it supports tight integration with editing and viewing
22677 In the case of an Xfig figure, you are able to invoke Xfig on the original
22678 file with a single click from within the external material dialog in \SpecialChar LyX
22680 and also preview the produced PostScript file with Ghostview with another
22682 No more fiddling around with the command line and/or file browsers to locate
22683 and manipulate the original or produced files.
22684 In this way, you are finally able to take full advantage of the many different
22685 applications that are relevant to use when you write your documents, and
22686 ultimately be more productive.
22689 \begin_layout Section
22690 The external template configuration file
22693 \begin_layout Standard
22694 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22696 However, be aware that doing this in an careless manner most probably
22700 introduce an easily exploitable security hole.
22701 So before you do this, please read the discussion about security in
22702 \begin_inset CommandInset ref
22704 reference "sec:Security-discussion"
22711 \begin_layout Standard
22712 Having said that, we encourage you to submit any interesting templates that
22717 \begin_layout Standard
22718 The external templates are defined in the
22719 \begin_inset Flex Code
22722 \begin_layout Plain Layout
22724 Dir/lib/external_templates
22730 You can place your own version in
22731 \begin_inset Flex Code
22734 \begin_layout Plain Layout
22735 UserDir/external_templates
22743 \begin_layout Standard
22744 A typical template looks like this:
22747 \begin_layout LyX-Code
22751 \begin_layout LyX-Code
22752 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22755 \begin_layout LyX-Code
22759 \begin_layout LyX-Code
22763 \begin_layout LyX-Code
22767 \begin_layout LyX-Code
22771 \begin_layout LyX-Code
22775 \begin_layout LyX-Code
22776 AutomaticProduction true
22779 \begin_layout LyX-Code
22783 \begin_layout LyX-Code
22787 \begin_layout LyX-Code
22788 Format \SpecialChar LaTeX
22792 \begin_layout LyX-Code
22793 TransformCommand Rotate RotationLatexCommand
22796 \begin_layout LyX-Code
22797 TransformCommand Resize ResizeLatexCommand
22800 \begin_layout LyX-Code
22801 Product "$$RotateFront$$ResizeFront
22804 \begin_layout LyX-Code
22809 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22812 \begin_layout LyX-Code
22813 $$ResizeBack$$RotateBack"
22816 \begin_layout LyX-Code
22820 \begin_layout LyX-Code
22821 UpdateResult "$$AbsPath$$Basename.pstex_t"
22824 \begin_layout LyX-Code
22825 Requirement "graphicx"
22828 \begin_layout LyX-Code
22829 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22832 \begin_layout LyX-Code
22833 ReferencedFile latex "$$AbsPath$$Basename.eps"
22836 \begin_layout LyX-Code
22837 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22840 \begin_layout LyX-Code
22844 \begin_layout LyX-Code
22845 Format PDF\SpecialChar LaTeX
22849 \begin_layout LyX-Code
22850 TransformCommand Rotate RotationLatexCommand
22853 \begin_layout LyX-Code
22854 TransformCommand Resize ResizeLatexCommand
22857 \begin_layout LyX-Code
22858 Product "$$RotateFront$$ResizeFront
22861 \begin_layout LyX-Code
22866 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22869 \begin_layout LyX-Code
22870 $$ResizeBack$$RotateBack"
22873 \begin_layout LyX-Code
22874 UpdateFormat pdftex
22877 \begin_layout LyX-Code
22878 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22881 \begin_layout LyX-Code
22882 Requirement "graphicx"
22885 \begin_layout LyX-Code
22886 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22889 \begin_layout LyX-Code
22890 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22893 \begin_layout LyX-Code
22897 \begin_layout LyX-Code
22901 \begin_layout LyX-Code
22902 Product "$$Contents(
22904 "$$AbsPath$$Basename.asc
22909 \begin_layout LyX-Code
22910 UpdateFormat asciixfig
22913 \begin_layout LyX-Code
22914 UpdateResult "$$AbsPath$$Basename.asc"
22917 \begin_layout LyX-Code
22921 \begin_layout LyX-Code
22925 \begin_layout LyX-Code
22926 Product "<graphic fileref=
22928 "$$AbsOrRelPathMaster$$Basename.eps
22933 \begin_layout LyX-Code
22937 \begin_layout LyX-Code
22941 \begin_layout LyX-Code
22942 UpdateResult "$$AbsPath$$Basename.eps"
22945 \begin_layout LyX-Code
22946 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22949 \begin_layout LyX-Code
22950 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22953 \begin_layout LyX-Code
22957 \begin_layout LyX-Code
22958 Product "[XFig: $$FName]"
22961 \begin_layout LyX-Code
22965 \begin_layout LyX-Code
22969 \begin_layout Standard
22970 As you can see, the template is enclosed in
22971 \begin_inset Flex Code
22974 \begin_layout Plain Layout
22982 \begin_inset Flex Code
22985 \begin_layout Plain Layout
22992 It contains a header specifying some general settings and, for each supported
22993 primary document file format, a section
22994 \begin_inset Flex Code
22997 \begin_layout Plain Layout
23005 \begin_inset Flex Code
23008 \begin_layout Plain Layout
23017 \begin_layout Subsection
23018 The template header
23021 \begin_layout Description
23022 \begin_inset Flex Code
23025 \begin_layout Plain Layout
23026 AutomaticProduction
23027 \begin_inset space ~
23035 Whether the file represented by the template must be generated by \SpecialChar LyX
23037 This command must occur exactly once.
23040 \begin_layout Description
23041 \begin_inset Flex Code
23044 \begin_layout Plain Layout
23046 \begin_inset space ~
23054 A glob pattern that is used in the file dialog to filter out the desired
23056 If there is more than one possible file extension (e.
23057 \begin_inset space \thinspace{}
23061 \begin_inset space \space{}
23065 \begin_inset Flex Code
23068 \begin_layout Plain Layout
23075 \begin_inset Flex Code
23078 \begin_layout Plain Layout
23084 ), use something like
23085 \begin_inset Flex Code
23088 \begin_layout Plain Layout
23095 This command must occur exactly once.
23098 \begin_layout Description
23099 \begin_inset Flex Code
23102 \begin_layout Plain Layout
23104 \begin_inset space ~
23112 The text that is displayed on the button.
23113 This command must occur exactly once.
23116 \begin_layout Description
23117 \begin_inset Flex Code
23120 \begin_layout Plain Layout
23122 \begin_inset space ~
23126 \begin_inset space ~
23134 The help text that is used in the External dialog.
23135 Provide enough information to explain to the user just what the template
23136 can provide him with.
23137 This command must occur exactly once.
23140 \begin_layout Description
23141 \begin_inset Flex Code
23144 \begin_layout Plain Layout
23146 \begin_inset space ~
23154 The file format of the original file.
23155 This must be the name of a format that is known to \SpecialChar LyX
23157 \begin_inset CommandInset ref
23159 reference "sec:Formats"
23165 \begin_inset Quotes eld
23169 \begin_inset Flex Code
23172 \begin_layout Plain Layout
23179 \begin_inset Quotes erd
23182 if the template can handle original files of more than one format.
23184 will attempt to interrogate the file itself in order to deduce its format
23186 This command must occur exactly once.
23189 \begin_layout Description
23190 \begin_inset Flex Code
23193 \begin_layout Plain Layout
23195 \begin_inset space ~
23203 A unique name for the template.
23204 It must not contain substitution macros (see below).
23207 \begin_layout Description
23208 \begin_inset Flex Code
23211 \begin_layout Plain Layout
23213 \begin_inset space ~
23216 Rotate|Resize|Clip|Extra
23221 This command specifies which transformations are supported by this template.
23222 It may occur zero or more times.
23223 This command enables the corresponding tabs in the external dialog.
23225 \begin_inset Flex Code
23228 \begin_layout Plain Layout
23234 command must have either a corresponding
23235 \begin_inset Flex Code
23238 \begin_layout Plain Layout
23245 \begin_inset Flex Code
23248 \begin_layout Plain Layout
23255 \begin_inset Flex Code
23258 \begin_layout Plain Layout
23265 Otherwise the transformation will not be supported by that format.
23268 \begin_layout Subsection
23272 \begin_layout Description
23273 \begin_inset Flex Code
23276 \begin_layout Plain Layout
23278 \begin_inset space ~
23282 |PDF\SpecialChar LaTeX
23288 The primary document file format that this format definition is for.
23289 Not every template has a sensible representation in all document file formats.
23290 Please define nevertheless a
23291 \begin_inset Flex Code
23294 \begin_layout Plain Layout
23300 section for all templates.
23301 Use a dummy text when no representation is available.
23302 Then you can at least see a reference to the external material in the exported
23306 \begin_layout Description
23307 \begin_inset Flex Code
23310 \begin_layout Plain Layout
23312 \begin_inset space ~
23316 \begin_inset space ~
23324 This command defines an additional macro
23325 \begin_inset Flex Code
23328 \begin_layout Plain Layout
23334 for substitution in
23335 \begin_inset Flex Code
23338 \begin_layout Plain Layout
23346 \begin_inset Flex Code
23349 \begin_layout Plain Layout
23355 itself may contain substitution macros.
23356 The advantage over using
23357 \begin_inset Flex Code
23360 \begin_layout Plain Layout
23367 \begin_inset Flex Code
23370 \begin_layout Plain Layout
23376 is that the substituted value of
23377 \begin_inset Flex Code
23380 \begin_layout Plain Layout
23386 is sanitized so that it is a valid optional argument in the document format.
23387 This command may occur zero or more times.
23390 \begin_layout Description
23391 \begin_inset Flex Code
23394 \begin_layout Plain Layout
23396 \begin_inset space ~
23404 The text that is inserted in the exported document.
23405 This is actually the most important command and can be quite complex.
23406 This command must occur exactly once.
23409 \begin_layout Description
23410 \begin_inset Flex Code
23413 \begin_layout Plain Layout
23415 \begin_inset space ~
23423 This command specifies a preamble snippet that will be included in the
23426 It has to be defined using
23427 \begin_inset Flex Code
23430 \begin_layout Plain Layout
23438 \begin_inset Flex Code
23441 \begin_layout Plain Layout
23448 This command may occur zero or more times.
23451 \begin_layout Description
23452 \begin_inset Flex Code
23455 \begin_layout Plain Layout
23457 \begin_inset space ~
23461 \begin_inset space ~
23469 This command denotes files that are created by the conversion process and
23470 are needed for a particular export format.
23471 If the filename is relative, it is interpreted relative to the master document.
23472 This command may be given zero or more times.
23475 \begin_layout Description
23476 \begin_inset Flex Code
23479 \begin_layout Plain Layout
23481 \begin_inset space ~
23489 The name of a required \SpecialChar LaTeX
23491 The package is included via
23492 \begin_inset Flex Code
23495 \begin_layout Plain Layout
23503 in the \SpecialChar LaTeX
23505 This command may occur zero or more times.
23508 \begin_layout Description
23509 \begin_inset Flex Code
23512 \begin_layout Plain Layout
23514 \begin_inset space ~
23518 \begin_inset space ~
23521 RotationLatexCommand
23526 This command specifies that the built in \SpecialChar LaTeX
23527 command should be used for rotation.
23528 This command may occur once or not at all.
23531 \begin_layout Description
23532 \begin_inset Flex Code
23535 \begin_layout Plain Layout
23537 \begin_inset space ~
23541 \begin_inset space ~
23549 This command specifies that the built in \SpecialChar LaTeX
23550 command should be used for resizing.
23551 This command may occur once or not at all.
23554 \begin_layout Description
23555 \begin_inset Flex Code
23558 \begin_layout Plain Layout
23560 \begin_inset space ~
23564 \begin_inset space ~
23567 RotationLatexOption
23572 This command specifies that rotation is done via an optional argument.
23573 This command may occur once or not at all.
23576 \begin_layout Description
23577 \begin_inset Flex Code
23580 \begin_layout Plain Layout
23582 \begin_inset space ~
23586 \begin_inset space ~
23594 This command specifies that resizing is done via an optional argument.
23595 This command may occur once or not at all.
23598 \begin_layout Description
23599 \begin_inset Flex Code
23602 \begin_layout Plain Layout
23604 \begin_inset space ~
23608 \begin_inset space ~
23616 This command specifies that clipping is done via an optional argument.
23617 This command may occur once or not at all.
23620 \begin_layout Description
23621 \begin_inset Flex Code
23624 \begin_layout Plain Layout
23626 \begin_inset space ~
23630 \begin_inset space ~
23638 This command specifies that an extra optional argument is used.
23639 This command may occur once or not at all.
23642 \begin_layout Description
23643 \begin_inset Flex Code
23646 \begin_layout Plain Layout
23648 \begin_inset space ~
23656 The file format of the converted file.
23657 This must be the name of a format that is known to \SpecialChar LyX
23659 \begin_inset Flex MenuItem
23662 \begin_layout Plain Layout
23663 Tools\SpecialChar menuseparator
23664 Preferences\SpecialChar menuseparator
23665 File Handling\SpecialChar menuseparator
23672 This command must occur exactly once.
23673 If the resulting file format is PDF, you need to specify the format
23674 \begin_inset Flex Code
23677 \begin_layout Plain Layout
23684 This is the PDF format used for including graphics.
23685 The other defined PDF formats are for document export.
23688 \begin_layout Description
23689 \begin_inset Flex Code
23692 \begin_layout Plain Layout
23694 \begin_inset space ~
23702 The file name of the converted file.
23703 The file name must be absolute.
23704 This command must occur exactly once.
23707 \begin_layout Subsection
23708 Preamble definitions
23711 \begin_layout Standard
23712 The external template configuration file may contain additional preamble
23713 definitions enclosed by
23714 \begin_inset Flex Code
23717 \begin_layout Plain Layout
23725 \begin_inset Flex Code
23728 \begin_layout Plain Layout
23735 They can be used by the templates in the
23736 \begin_inset Flex Code
23739 \begin_layout Plain Layout
23748 \begin_layout Section
23749 The substitution mechanism
23752 \begin_layout Standard
23753 When the external material facility invokes an external program, it is done
23754 on the basis of a command defined in the template configuration file.
23755 These commands can contain various macros that are expanded before execution.
23756 Execution always take place in the directory of the containing document.
23759 \begin_layout Standard
23760 Also, whenever external material is to be displayed, the name will be produced
23761 by the substitution mechanism, and most other commands in the template
23762 definition support substitution as well.
23765 \begin_layout Standard
23766 The available macros are the following:
23769 \begin_layout Description
23770 \begin_inset Flex Code
23773 \begin_layout Plain Layout
23774 $$AbsOrRelPathMaster
23779 The file path, absolute or relative to the master \SpecialChar LyX
23783 \begin_layout Description
23784 \begin_inset Flex Code
23787 \begin_layout Plain Layout
23788 $$AbsOrRelPathParent
23793 The file path, absolute or relative to the \SpecialChar LyX
23797 \begin_layout Description
23798 \begin_inset Flex Code
23801 \begin_layout Plain Layout
23807 The absolute file path.
23810 \begin_layout Description
23811 \begin_inset Flex Code
23814 \begin_layout Plain Layout
23820 The filename without path and without the extension.
23823 \begin_layout Description
23824 \begin_inset Flex Code
23827 \begin_layout Plain Layout
23829 \begin_inset Quotes eld
23833 \begin_inset Quotes erd
23841 This macro will expand to the contents of the file with the name
23842 \begin_inset Flex Code
23845 \begin_layout Plain Layout
23854 \begin_layout Description
23855 \begin_inset Flex Code
23858 \begin_layout Plain Layout
23864 The file extension (including the dot).
23867 \begin_layout Description
23868 \begin_inset Flex Code
23871 \begin_layout Plain Layout
23877 The filename of the file specified in the external material dialog.
23878 This is either an absolute name, or it is relative to the \SpecialChar LyX
23882 \begin_layout Description
23883 \begin_inset Flex Code
23886 \begin_layout Plain Layout
23893 \begin_inset Flex Code
23896 \begin_layout Plain Layout
23902 (absolute name or relative to the \SpecialChar LyX
23906 \begin_layout Description
23907 \begin_inset Flex Code
23910 \begin_layout Plain Layout
23916 The file path, relative to the master \SpecialChar LyX
23920 \begin_layout Description
23921 \begin_inset Flex Code
23924 \begin_layout Plain Layout
23930 The file path, relative to the \SpecialChar LyX
23934 \begin_layout Description
23935 \begin_inset Flex Code
23938 \begin_layout Plain Layout
23944 This macro will expand to the absolute path of the system directory.
23945 This is typically used to point to the various helper scripts that are
23946 bundled with \SpecialChar LyX
23950 \begin_layout Description
23951 \begin_inset Flex Code
23954 \begin_layout Plain Layout
23960 A name and full path to a temporary file which will be automatically deleted
23961 whenever the containing document is closed, or the external material insertion
23965 \begin_layout Standard
23966 All path macros contain a trailing directory separator, so you can construct
23968 \begin_inset space \thinspace{}
23972 \begin_inset space \space{}
23975 the absolute filename with
23976 \begin_inset Flex Code
23979 \begin_layout Plain Layout
23980 $$AbsPath$$Basename$$Extension
23988 \begin_layout Standard
23989 The macros above are substituted in all commands unless otherwise noted.
23991 \begin_inset Flex Code
23994 \begin_layout Plain Layout
24000 supports additionally the following substitutions if they are enabled by
24002 \begin_inset Flex Code
24005 \begin_layout Plain Layout
24012 \begin_inset Flex Code
24015 \begin_layout Plain Layout
24024 \begin_layout Description
24025 \begin_inset Flex Code
24028 \begin_layout Plain Layout
24034 The front part of the resize command.
24037 \begin_layout Description
24038 \begin_inset Flex Code
24041 \begin_layout Plain Layout
24047 The back part of the resize command.
24050 \begin_layout Description
24051 \begin_inset Flex Code
24054 \begin_layout Plain Layout
24060 The front part of the rotation command.
24063 \begin_layout Description
24064 \begin_inset Flex Code
24067 \begin_layout Plain Layout
24073 The back part of the rotation command.
24076 \begin_layout Standard
24077 The value string of the
24078 \begin_inset Flex Code
24081 \begin_layout Plain Layout
24087 command supports additionally the following substitutions if they are enabled
24089 \begin_inset Flex Code
24092 \begin_layout Plain Layout
24099 \begin_inset Flex Code
24102 \begin_layout Plain Layout
24111 \begin_layout Description
24112 \begin_inset Flex Code
24115 \begin_layout Plain Layout
24124 \begin_layout Description
24125 \begin_inset Flex Code
24128 \begin_layout Plain Layout
24137 \begin_layout Description
24138 \begin_inset Flex Code
24141 \begin_layout Plain Layout
24150 \begin_layout Description
24151 \begin_inset Flex Code
24154 \begin_layout Plain Layout
24160 The rotation option.
24163 \begin_layout Standard
24164 You may ask why there are so many path macros.
24165 There are mainly two reasons:
24168 \begin_layout Enumerate
24169 Relative and absolute file names should remain relative or absolute, respectivel
24171 Users may have reasons to prefer either form.
24172 Relative names are useful for portable documents that should work on different
24173 machines, for example.
24174 Absolute names may be required by some programs.
24177 \begin_layout Enumerate
24179 treats relative file names differently than \SpecialChar LyX
24180 and other programs in nested
24182 For \SpecialChar LyX
24183 , a relative file name is always relative to the document that contains
24185 For \SpecialChar LaTeX
24186 , it is always relative to the master document.
24187 These two definitions are identical if you have only one document, but
24188 differ if you have a master document that includes part documents.
24189 That means that relative filenames must be transformed when presented to
24192 Fortunately \SpecialChar LyX
24193 does this automatically for you if you choose the right macros.
24196 \begin_layout Standard
24197 So which path macro should be used in new template definitions? The rule
24201 \begin_layout Itemize
24203 \begin_inset Flex Code
24206 \begin_layout Plain Layout
24212 if an absolute path is required.
24215 \begin_layout Itemize
24217 \begin_inset Flex Code
24220 \begin_layout Plain Layout
24221 $$AbsOrRelPathMaster
24226 if the substituted string is some kind of \SpecialChar LaTeX
24230 \begin_layout Itemize
24232 \begin_inset Flex Code
24235 \begin_layout Plain Layout
24236 $$AbsOrRelPathParent
24241 in order to preserve the user's choice.
24244 \begin_layout Standard
24245 There are special cases where this rule does not work and e.
24246 \begin_inset space \thinspace{}
24250 \begin_inset space \space{}
24253 relative names are needed, but normally it will work just fine.
24254 One example for such a case is the command
24255 \begin_inset Flex Code
24258 \begin_layout Plain Layout
24259 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24264 in the XFig template above: We can't use the absolute name because the
24266 \begin_inset Flex Code
24269 \begin_layout Plain Layout
24275 files needs the relative name in order to rewrite the file content.
24278 \begin_layout Section
24279 Security discussion
24280 \begin_inset CommandInset label
24282 name "sec:Security-discussion"
24289 \begin_layout Standard
24290 The external material feature interfaces with a lot of external programs
24291 and does so automatically, so we have to consider the security implications
24293 In particular, since you have the option of including your own filenames
24294 and/or parameter strings and those are expanded into a command, it seems
24295 that it would be possible to create a malicious document which executes
24296 arbitrary commands when a user views or prints the document.
24297 This is something we definitely want to avoid.
24300 \begin_layout Standard
24301 However, since the external program commands are specified in the template
24302 configuration file only, there are no security issues if \SpecialChar LyX
24303 is properly configure
24304 d with safe templates only.
24305 This is so because the external programs are invoked with the
24306 \begin_inset Flex Code
24309 \begin_layout Plain Layout
24315 -system call rather than the
24316 \begin_inset Flex Code
24319 \begin_layout Plain Layout
24325 system-call, so it's not possible to execute arbitrary commands from the
24326 filename or parameter section via the shell.
24329 \begin_layout Standard
24330 This also implies that you are restricted in what command strings you can
24331 use in the external material templates.
24332 In particular, pipes and redirection are not readily available.
24333 This has to be so if \SpecialChar LyX
24334 should remain safe.
24335 If you want to use some of the shell features, you should write a safe
24336 script to do this in a controlled manner, and then invoke the script from
24337 the command string.
24341 \begin_layout Standard
24342 It is possible to design a template that interacts directly with the shell,
24343 but since this would allow a malicious user to execute arbitrary commands
24344 by writing clever filenames and/or parameters, we generally recommend that
24345 you only use safe scripts that work with the
24346 \begin_inset Flex Code
24349 \begin_layout Plain Layout
24355 system call in a controlled manner.
24356 Of course, for use in a controlled environment, it can be tempting to just
24357 fall back to use ordinary shell scripts.
24358 If you do so, be aware that you
24362 provide an easily exploitable security hole in your system.
24363 Of course it stands to reason that such unsafe templates will never be
24364 included in the standard \SpecialChar LyX
24365 distribution, although we do encourage people
24366 to submit new templates in the open source tradition.
24367 But \SpecialChar LyX
24368 as shipped from the official distribution channels will never have
24372 \begin_layout Standard
24373 Including external material provides a lot of power, and you have to be
24374 careful not to introduce security hazards with this power.
24375 A subtle error in a single line in an innocent looking script can open
24376 the door to huge security problems.
24377 So if you do not fully understand the issues, we recommend that you consult
24378 a knowledgeable security professional or the \SpecialChar LyX
24379 development team if you have
24380 any questions about whether a given template is safe or not.
24381 And do this before you use it in an uncontrolled environment.
24384 \begin_layout Chapter
24386 List of supported \SpecialChar LyX
24387 functions to be used in layouts
24388 \begin_inset CommandInset label
24390 name "chap:List-of-functions"
24397 \begin_layout Standard
24399 \begin_inset Tabular
24400 <lyxtabular version="3" rows="11" columns="8">
24401 <features tabularvalignment="middle">
24402 <column alignment="left" valignment="top">
24403 <column alignment="left" valignment="top">
24404 <column alignment="left" valignment="top">
24405 <column alignment="left" valignment="top">
24406 <column alignment="left" valignment="top">
24407 <column alignment="left" valignment="top">
24408 <column alignment="left" valignment="top">
24409 <column alignment="left" valignment="top">
24411 <cell alignment="left" valignment="top" usebox="none">
24414 \begin_layout Plain Layout
24420 <cell alignment="left" valignment="top" usebox="none">
24423 \begin_layout Plain Layout
24429 <cell alignment="left" valignment="top" usebox="none">
24432 \begin_layout Plain Layout
24438 <cell alignment="left" valignment="top" usebox="none">
24441 \begin_layout Plain Layout
24447 <cell alignment="center" valignment="top" usebox="none">
24450 \begin_layout Plain Layout
24456 <cell alignment="center" valignment="top" usebox="none">
24459 \begin_layout Plain Layout
24465 <cell alignment="center" valignment="top" usebox="none">
24468 \begin_layout Plain Layout
24474 <cell alignment="center" valignment="top" usebox="none">
24477 \begin_layout Plain Layout
24485 <cell alignment="left" valignment="top" usebox="none">
24488 \begin_layout Plain Layout
24494 <cell alignment="left" valignment="top" usebox="none">
24497 \begin_layout Plain Layout
24503 <cell alignment="left" valignment="top" usebox="none">
24506 \begin_layout Plain Layout
24512 <cell alignment="left" valignment="top" usebox="none">
24515 \begin_layout Plain Layout
24521 <cell alignment="center" valignment="top" usebox="none">
24524 \begin_layout Plain Layout
24530 <cell alignment="center" valignment="top" usebox="none">
24533 \begin_layout Plain Layout
24539 <cell alignment="center" valignment="top" usebox="none">
24542 \begin_layout Plain Layout
24548 <cell alignment="center" valignment="top" usebox="none">
24551 \begin_layout Plain Layout
24559 <cell alignment="left" valignment="top" usebox="none">
24562 \begin_layout Plain Layout
24568 <cell alignment="left" valignment="top" usebox="none">
24571 \begin_layout Plain Layout
24577 <cell alignment="left" valignment="top" usebox="none">
24580 \begin_layout Plain Layout
24586 <cell alignment="left" valignment="top" usebox="none">
24589 \begin_layout Plain Layout
24595 <cell alignment="center" valignment="top" usebox="none">
24598 \begin_layout Plain Layout
24604 <cell alignment="center" valignment="top" usebox="none">
24607 \begin_layout Plain Layout
24613 <cell alignment="center" valignment="top" usebox="none">
24616 \begin_layout Plain Layout
24622 <cell alignment="center" valignment="top" usebox="none">
24625 \begin_layout Plain Layout
24633 <cell alignment="left" valignment="top" usebox="none">
24636 \begin_layout Plain Layout
24642 <cell alignment="left" valignment="top" usebox="none">
24645 \begin_layout Plain Layout
24651 <cell alignment="left" valignment="top" usebox="none">
24654 \begin_layout Plain Layout
24660 <cell alignment="left" valignment="top" usebox="none">
24663 \begin_layout Plain Layout
24669 <cell alignment="center" valignment="top" usebox="none">
24672 \begin_layout Plain Layout
24678 <cell alignment="center" valignment="top" usebox="none">
24681 \begin_layout Plain Layout
24687 <cell alignment="center" valignment="top" usebox="none">
24690 \begin_layout Plain Layout
24696 <cell alignment="center" valignment="top" usebox="none">
24699 \begin_layout Plain Layout
24707 <cell alignment="left" valignment="top" usebox="none">
24710 \begin_layout Plain Layout
24716 <cell alignment="left" valignment="top" usebox="none">
24719 \begin_layout Plain Layout
24725 <cell alignment="left" valignment="top" usebox="none">
24728 \begin_layout Plain Layout
24734 <cell alignment="left" valignment="top" usebox="none">
24737 \begin_layout Plain Layout
24743 <cell alignment="center" valignment="top" usebox="none">
24746 \begin_layout Plain Layout
24752 <cell alignment="center" valignment="top" usebox="none">
24755 \begin_layout Plain Layout
24761 <cell alignment="center" valignment="top" usebox="none">
24764 \begin_layout Plain Layout
24770 <cell alignment="center" valignment="top" usebox="none">
24773 \begin_layout Plain Layout
24781 <cell alignment="left" valignment="top" usebox="none">
24784 \begin_layout Plain Layout
24790 <cell alignment="left" valignment="top" usebox="none">
24793 \begin_layout Plain Layout
24799 <cell alignment="left" valignment="top" usebox="none">
24802 \begin_layout Plain Layout
24808 <cell alignment="left" valignment="top" usebox="none">
24811 \begin_layout Plain Layout
24817 <cell alignment="center" valignment="top" usebox="none">
24820 \begin_layout Plain Layout
24826 <cell alignment="center" valignment="top" usebox="none">
24829 \begin_layout Plain Layout
24835 <cell alignment="center" valignment="top" usebox="none">
24838 \begin_layout Plain Layout
24844 <cell alignment="center" valignment="top" usebox="none">
24847 \begin_layout Plain Layout
24855 <cell alignment="left" valignment="top" usebox="none">
24858 \begin_layout Plain Layout
24864 <cell alignment="left" valignment="top" usebox="none">
24867 \begin_layout Plain Layout
24873 <cell alignment="left" valignment="top" usebox="none">
24876 \begin_layout Plain Layout
24882 <cell alignment="left" valignment="top" usebox="none">
24885 \begin_layout Plain Layout
24891 <cell alignment="center" valignment="top" usebox="none">
24894 \begin_layout Plain Layout
24900 <cell alignment="center" valignment="top" usebox="none">
24903 \begin_layout Plain Layout
24909 <cell alignment="center" valignment="top" usebox="none">
24912 \begin_layout Plain Layout
24918 <cell alignment="center" valignment="top" usebox="none">
24921 \begin_layout Plain Layout
24929 <cell alignment="left" valignment="top" usebox="none">
24932 \begin_layout Plain Layout
24938 <cell alignment="left" valignment="top" usebox="none">
24941 \begin_layout Plain Layout
24947 <cell alignment="left" valignment="top" usebox="none">
24950 \begin_layout Plain Layout
24956 <cell alignment="left" valignment="top" usebox="none">
24959 \begin_layout Plain Layout
24965 <cell alignment="center" valignment="top" usebox="none">
24968 \begin_layout Plain Layout
24974 <cell alignment="center" valignment="top" usebox="none">
24977 \begin_layout Plain Layout
24983 <cell alignment="center" valignment="top" usebox="none">
24986 \begin_layout Plain Layout
24992 <cell alignment="center" valignment="top" usebox="none">
24995 \begin_layout Plain Layout
25003 <cell alignment="left" valignment="top" usebox="none">
25006 \begin_layout Plain Layout
25012 <cell alignment="left" valignment="top" usebox="none">
25015 \begin_layout Plain Layout
25021 <cell alignment="left" valignment="top" usebox="none">
25024 \begin_layout Plain Layout
25030 <cell alignment="left" valignment="top" usebox="none">
25033 \begin_layout Plain Layout
25039 <cell alignment="center" valignment="top" usebox="none">
25042 \begin_layout Plain Layout
25048 <cell alignment="center" valignment="top" usebox="none">
25051 \begin_layout Plain Layout
25057 <cell alignment="center" valignment="top" usebox="none">
25060 \begin_layout Plain Layout
25066 <cell alignment="center" valignment="top" usebox="none">
25069 \begin_layout Plain Layout
25077 <cell alignment="left" valignment="top" usebox="none">
25080 \begin_layout Plain Layout
25086 <cell alignment="left" valignment="top" usebox="none">
25089 \begin_layout Plain Layout
25095 <cell alignment="left" valignment="top" usebox="none">
25098 \begin_layout Plain Layout
25104 <cell alignment="left" valignment="top" usebox="none">
25107 \begin_layout Plain Layout
25113 <cell alignment="center" valignment="top" usebox="none">
25116 \begin_layout Plain Layout
25122 <cell alignment="center" valignment="top" usebox="none">
25125 \begin_layout Plain Layout
25131 <cell alignment="center" valignment="top" usebox="none">
25134 \begin_layout Plain Layout
25140 <cell alignment="center" valignment="top" usebox="none">
25143 \begin_layout Plain Layout
25151 <cell alignment="center" valignment="top" usebox="none">
25154 \begin_layout Plain Layout
25160 <cell alignment="center" valignment="top" usebox="none">
25163 \begin_layout Plain Layout
25169 <cell alignment="center" valignment="top" usebox="none">
25172 \begin_layout Plain Layout
25178 <cell alignment="center" valignment="top" usebox="none">
25181 \begin_layout Plain Layout
25187 <cell alignment="center" valignment="top" usebox="none">
25190 \begin_layout Plain Layout
25196 <cell alignment="center" valignment="top" usebox="none">
25199 \begin_layout Plain Layout
25205 <cell alignment="center" valignment="top" usebox="none">
25208 \begin_layout Plain Layout
25214 <cell alignment="center" valignment="top" usebox="none">
25217 \begin_layout Plain Layout
25231 \begin_layout Chapter
25232 Names of available colors to be used in layouts
25233 \begin_inset CommandInset label
25235 name "chap:Names-of-colors"
25242 \begin_layout Standard
25243 The colors listed here are the standard colors and the those that you can
25244 adjust in the \SpecialChar LyX
25248 \begin_layout Description
25261 No particular color – clear or default
25264 \begin_layout Description
25268 \begin_layout Description
25272 \begin_layout Description
25276 \begin_layout Description
25280 \begin_layout Description
25284 \begin_layout Description
25288 \begin_layout Description
25292 \begin_layout Description
25296 \begin_layout Description
25297 added_space Added space marker color
25300 \begin_layout Description
25301 addedtext Added text color
25304 \begin_layout Description
25305 appendix Appendix marker color
25308 \begin_layout Description
25309 background Background color
25312 \begin_layout Description
25313 bottomarea Bottom area color
25316 \begin_layout Description
25317 branchlabel Label color for branches
25320 \begin_layout Description
25321 buttonbg Color used for bottom background
25324 \begin_layout Description
25325 buttonhoverbg Color used for button background under focus
25328 \begin_layout Description
25329 buttonframe Color for inset button frames
25332 \begin_layout Description
25333 changebar Changebar color
25336 \begin_layout Description
25337 changedtextauthor1 Changed text color author 1
25340 \begin_layout Description
25341 changedtextauthor2 Changed text color author 2
25344 \begin_layout Description
25345 changedtextauthor3 Changed text color author 3
25348 \begin_layout Description
25349 changedtextauthor4 Changed text color author 4
25352 \begin_layout Description
25353 changedtextauthor5 Changed text color author 5
25356 \begin_layout Description
25357 collapsable_inset_frame Collapsable insets framecolor
25360 \begin_layout Description
25361 collapsable_inset_text Collapsable insets text color
25364 \begin_layout Description
25365 command Text color for command insets
25368 \begin_layout Description
25369 commandbg Background color for command insets
25372 \begin_layout Description
25373 commandframe Frame color for command insets
25376 \begin_layout Description
25377 comment color for comments
25380 \begin_layout Description
25381 commentbg Background color of comments
25384 \begin_layout Description
25385 cursor Cursor color
25388 \begin_layout Description
25389 deletedtext Deleted text color
25392 \begin_layout Description
25393 deletedtextmodifier Deleted text modifying color
25396 \begin_layout Description
25397 depthbar Color for the depth bars in the margin
25400 \begin_layout Description
25401 eolmarker End of line marker color
25404 \begin_layout Description
25405 error Color of the \SpecialChar LaTeX
25409 \begin_layout Description
25410 footlabel Label color for footnotes
25413 \begin_layout Description
25414 graphicsbg Graphics inset background color
25417 \begin_layout Description
25418 greyedout Label color for greyedout insets
25421 \begin_layout Description
25422 greyedoutbg Background color of greyedout inset
25425 \begin_layout Description
25426 greyedouttext Color for greyedout inset text
25429 \begin_layout Description
25430 indexlabel Label color for index insets
25433 \begin_layout Description
25434 ignore The color is ignored
25437 \begin_layout Description
25438 inherit The color is inherited
25441 \begin_layout Description
25442 inlinecompletion Inline completion color
25445 \begin_layout Description
25446 insetbg Inset marker background color
25449 \begin_layout Description
25450 insetframe Inset marker frame color
25453 \begin_layout Description
25454 language Color for marking foreign language words
25457 \begin_layout Description
25458 latex Text color in \SpecialChar LaTeX
25462 \begin_layout Description
25463 listingsbg Background color of listings inset
25466 \begin_layout Description
25467 marginlabel Label color for margin notes
25470 \begin_layout Description
25471 math Math inset text color
25474 \begin_layout Description
25475 mathbg Math inset background color
25478 \begin_layout Description
25479 mathcorners Math inset frame color not under focus
25482 \begin_layout Description
25483 mathframe Math inset frame color under focus
25486 \begin_layout Description
25487 mathline Math line color
25490 \begin_layout Description
25491 mathmacrobg Macro math inset background color
25494 \begin_layout Description
25495 mathmacroblend Macro math blended color
25498 \begin_layout Description
25499 mathmacroframe Macro math frame color
25502 \begin_layout Description
25503 mathmacrohoverbg Macro math inset background color hovered
25506 \begin_layout Description
25507 mathmacrolabel Macro math label color
25510 \begin_layout Description
25511 mathmacronewarg Macro template color for new parameters
25514 \begin_layout Description
25515 mathmacrooldarg Macro template color for old parameters
25518 \begin_layout Description
25519 newpage New page color
25522 \begin_layout Description
25523 nonunique_inlinecompletion Inline completion color for the non-unique part
25526 \begin_layout Description
25527 notebg Background color of notes
25530 \begin_layout Description
25531 notelabel Label color for notes
25534 \begin_layout Description
25535 pagebreak Page break/line break color
25538 \begin_layout Description
25539 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25542 \begin_layout Description
25543 phantomtext Text color for phantom insets
25546 \begin_layout Description
25547 preview The color used for previews
25550 \begin_layout Description
25551 previewframe Preview frame color
25554 \begin_layout Description
25555 regexpframe Color for regexp frame
25558 \begin_layout Description
25559 selection Background color of selected text
25562 \begin_layout Description
25563 selectiontext Foreground color of selected text
25566 \begin_layout Description
25567 shadedbg Background color of shaded box
25570 \begin_layout Description
25571 special Special chars text color
25574 \begin_layout Description
25575 tabularline Table line color
25578 \begin_layout Description
25579 tabularonoffline Table line color
25582 \begin_layout Description
25583 urllabel Label color for URL insets
25586 \begin_layout Description
25587 urltext Color for URL inset text