1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 % increase link area for cross-references and autoname them,
35 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
36 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
37 \addto\extrasenglish{%
38 \renewcommand*{\equationautorefname}[1]{}%
39 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
40 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
41 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
44 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
45 \use_default_options false
49 \maintain_unincluded_children false
52 InsetLayout Flex:MenuItem
61 \newcommand*{\menuitem}[1]{{\sffamily #1}}
64 # In case we need to do with sans...
65 #InsetLayout CharStyle:Code
70 #\renewcommand{\code}[1]{{\sffamily #1}}
75 \language_package default
80 \font_typewriter default
82 \font_default_family default
83 \use_non_tex_fonts false
89 \default_output_format default
91 \bibtex_command default
92 \index_command default
96 \pdf_title "LyX Configuration Manual"
97 \pdf_author "LyX Team"
98 \pdf_subject "LyX-documentation Customization"
99 \pdf_keywords "LyX, documentation, customization"
101 \pdf_bookmarksnumbered true
102 \pdf_bookmarksopen true
103 \pdf_bookmarksopenlevel 1
104 \pdf_breaklinks false
108 \pdf_pdfusetitle false
109 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
112 \use_package amsmath 0
113 \use_package amssymb 0
114 \use_package cancel 0
116 \use_package mathdots 1
117 \use_package mathtools 0
118 \use_package mhchem 0
119 \use_package stackrel 0
120 \use_package stmaryrd 0
121 \use_package undertilde 0
123 \cite_engine_type default
127 \paperorientation portrait
142 \paragraph_separation indent
143 \paragraph_indentation default
144 \quotes_language english
147 \paperpagestyle headings
148 \tracking_changes true
149 \output_changes false
153 \author -712698321 "Jürgen Spitzmüller"
154 \author -195340706 "Georg Baum"
156 \author 155139281 "Jrgen Spitzmller"
157 \author 1414654397 "Richard Heck"
158 \author 2090807402 "usti"
164 Customizing LyX: Features for the Advanced User
172 \begin_layout Plain Layout
174 If you have comments or error corrections, please send them to the LyX Documenta
176 \begin_inset CommandInset href
178 target "lyx-docs@lists.lyx.org"
185 \begin_inset Quotes eld
189 \begin_inset Quotes erd
192 in the subject header, and please cc the current maintainer of this file,
193 Richard Heck <rgheck@comcast.net>.
199 \begin_inset Newline newline
203 \begin_inset Newline newline
209 \begin_layout Standard
210 \begin_inset CommandInset toc
211 LatexCommand tableofcontents
218 \begin_layout Standard
219 \begin_inset Note Note
222 \begin_layout Plain Layout
223 Please use change tracking when modifying this document.
224 This makes it easier for our translators to recognize things that have
225 been changed, and it helps the maintainer keep up-to-date with what's been
234 \begin_layout Chapter
238 \begin_layout Standard
239 This manual covers the customization features present in LyX.
240 In it, we discuss issues like keyboard shortcuts, screen previewing options,
241 printer options, sending commands to LyX via the LyX Server, internationalizati
242 on, installing new LaTeX classes and LyX layouts, etc.
243 We can't possibly hope to touch on everything you can change—our developers
244 add new features faster than we can document them—but we will explain the
245 most common customizations and hopefully point you in the right direction
246 for some of the more obscure ones.
249 \begin_layout Standard
250 \begin_inset Branch OutDated
253 \begin_layout Standard
254 Information from previous versions of this document that now seems to be
255 outdated is contained in the OutDated branch of this document.
256 By default, this information will not appear in the LaTeX output.
264 \begin_layout Chapter
265 LyX configuration files
268 \begin_layout Standard
269 This chapter aims to help you to find your way through the LyX configuration
271 Before continuing to read this chapter, you should find out where your
272 LyX library and user directories are by using
273 \begin_inset Flex MenuItem
276 \begin_layout Plain Layout
277 Help\SpecialChar \menuseparator
288 The library directory is the place where LyX places its system-wide configurati
289 on files; the user directory is where you can place your modified versions.
290 We will call the former
291 \begin_inset Flex Code
294 \begin_layout Plain Layout
301 \begin_inset Flex MenuItem
304 \begin_layout Plain Layout
310 in the remainder of this document.
314 \begin_layout Section
316 \begin_inset Flex Code
319 \begin_layout Plain Layout
328 \begin_layout Standard
329 \begin_inset Flex Code
332 \begin_layout Plain Layout
338 and its sub-directories contain a number of files and that can be used
339 to customize LyX's behavior.
340 You can change many of these files from within LyX itself through the
341 \begin_inset Flex MenuItem
344 \begin_layout Plain Layout
345 Tools\SpecialChar \menuseparator
352 Most customization that you will want to do in LyX is possible through
354 However, many other inner aspects of LyX can be customized by modifying
356 \begin_inset Flex Code
359 \begin_layout Plain Layout
366 These files fall in different categories, described in the following subsection
370 \begin_layout Subsection
371 Automatically generated files
374 \begin_layout Standard
375 The files, which are to be found in
376 \begin_inset Flex MenuItem
379 \begin_layout Plain Layout
385 , are generated when you configure LyX.
386 They contain various default values that are guessed by inspection.
387 In general, it is not a good idea to modify them, since they might be overwritt
391 \begin_layout Labeling
392 \labelwidthstring 00.00.0000
393 \begin_inset Flex Code
396 \begin_layout Plain Layout
402 contains defaults for various commands.
405 \begin_layout Labeling
406 \labelwidthstring 00.00.0000
407 \begin_inset Flex Code
410 \begin_layout Plain Layout
416 contains the list of packages that have been recognized by LyX.
417 It is currently unused by the LyX program itself, but the information extracted
418 , and more, is made available with
419 \begin_inset Flex MenuItem
422 \begin_layout Plain Layout
423 Help\SpecialChar \menuseparator
436 \begin_layout Labeling
437 \labelwidthstring 00.00.0000
438 \begin_inset Flex Code
441 \begin_layout Plain Layout
447 the list of text classes that have been found in your
448 \begin_inset Flex Code
451 \begin_layout Plain Layout
457 directories, along with the associated LaTeX document class and their descripti
461 \begin_layout Labeling
462 \labelwidthstring 00.00.0000
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
472 the list of layout modules found in your
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
485 \begin_layout Labeling
486 \labelwidthstring 00.00.0000
487 \begin_inset Flex Code
490 \begin_layout Plain Layout
496 lists of various sorts of LaTeX-related files found on your system
499 \begin_layout Labeling
500 \labelwidthstring 00.00.0000
501 \begin_inset Flex Code
504 \begin_layout Plain Layout
510 is automatically generated during configuration from the file
511 \begin_inset Flex Code
514 \begin_layout Plain Layout
521 It contains information on your LaTeX configuration.
524 \begin_layout Subsection
528 \begin_layout Standard
529 These directories are duplicated between
530 \begin_inset Flex Code
533 \begin_layout Plain Layout
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
550 If a particular files exists in both places, the one in
551 \begin_inset Flex Code
554 \begin_layout Plain Layout
563 \begin_layout Labeling
564 \labelwidthstring 00.00.0000
565 \begin_inset Flex Code
568 \begin_layout Plain Layout
574 this directory contains files with the extension
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 that define the keybindings used in LyX.
585 If there exists an internationalized version of the bind file named
586 \begin_inset Flex Code
589 \begin_layout Plain Layout
595 , that will be used first.
598 \begin_layout Labeling
599 \labelwidthstring 00.00.0000
600 \begin_inset Flex Code
603 \begin_layout Plain Layout
609 contains graphics files that can be included in documents.
613 \begin_layout Labeling
614 \labelwidthstring 00.00.0000
615 \begin_inset Flex Code
618 \begin_layout Plain Layout
624 contains LyX documentation files (including the one you are currently reading).
626 \begin_inset Flex Code
629 \begin_layout Plain Layout
635 deserves special attention, as noted above.
636 The internationalized help docs are in subdirectories
637 \begin_inset Flex Code
640 \begin_layout Plain Layout
647 \begin_inset Quotes eld
651 \begin_inset Quotes erd
654 is the ISO language code.
660 \begin_inset CommandInset ref
662 reference "cha:Internationalizing-LyX"
669 \begin_layout Labeling
670 \labelwidthstring 00.00.0000
671 \begin_inset Flex Code
674 \begin_layout Plain Layout
680 contains example files that explain how to use some features.
681 In the file browser, press the
682 \begin_inset Flex MenuItem
685 \begin_layout Plain Layout
694 \begin_layout Labeling
695 \labelwidthstring 00.00.0000
696 \begin_inset Flex Code
699 \begin_layout Plain Layout
705 contains image files that are used by the
706 \begin_inset Flex MenuItem
709 \begin_layout Plain Layout
716 In addition, it also contains the individual icons used in the toolbar
717 and the banners that can be shown when LyX is launched.
720 \begin_layout Labeling
721 \labelwidthstring 00.00.0000
722 \begin_inset Flex Code
725 \begin_layout Plain Layout
731 contains keyboard keymapping files.
737 \begin_inset CommandInset ref
739 reference "sec:International-Keymap-Stuff"
746 \begin_layout Labeling
747 \labelwidthstring 00.00.0000
748 \begin_inset Flex Code
751 \begin_layout Plain Layout
757 contains the text class and module files described in Chapter
762 \begin_inset CommandInset ref
764 reference "cha:Installing-New-Document"
771 \begin_layout Labeling
772 \labelwidthstring 00.00.0000
773 \begin_inset Flex Code
776 \begin_layout Plain Layout
783 \begin_inset Flex Code
786 \begin_layout Plain Layout
792 Python scripts used to convert between LyX versions.
793 These can be run from the command line if, say, you want to batch-convert
797 \begin_layout Labeling
798 \labelwidthstring 00.00.0000
799 \begin_inset Flex Code
802 \begin_layout Plain Layout
808 contains some files that demonstrate the capabilities of the
809 \begin_inset Flex MenuItem
812 \begin_layout Plain Layout
823 Also contains some scripts used by LyX itself.
826 \begin_layout Labeling
827 \labelwidthstring 00.00.0000
828 \begin_inset Flex Code
831 \begin_layout Plain Layout
837 contains the standard LyX template files described in Chapter
842 \begin_inset CommandInset ref
844 reference "sub:Creating-Templates"
851 \begin_layout Labeling
852 \labelwidthstring 00.00.0000
853 \begin_inset Flex Code
856 \begin_layout Plain Layout
862 contains files with the extension
863 \begin_inset Flex Code
866 \begin_layout Plain Layout
872 that define the user interface to LyX.
873 That is, the files define which items appear in which menus and the items
874 appearing on the toolbar.
877 \begin_layout Subsection
878 Files you don't want to modify
881 \begin_layout Standard
882 These files are used internally by LyX and you generally do not need to
883 modify them unless you are a developer.
886 \begin_layout Labeling
887 \labelwidthstring 00.00.0000
888 \begin_inset Flex Code
891 \begin_layout Plain Layout
897 this file contains the list of LyX developers.
898 The contents are displayed with the menu entry
899 \begin_inset Flex MenuItem
902 \begin_layout Plain Layout
903 Help\SpecialChar \menuseparator
916 \begin_layout Labeling
917 \labelwidthstring 00.00.0000
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
927 this is a LaTeX script used during the configuration process.
931 \begin_layout Labeling
932 \labelwidthstring 00.00.0000
933 \begin_inset Flex Code
936 \begin_layout Plain Layout
942 this is the script that is used to re-configure LyX.
943 It creates configuration files in the directory it was run from.
946 \begin_layout Subsection
947 Other files needing a line or two
950 \begin_layout Labeling
951 \labelwidthstring 00.00.0000
952 \begin_inset Flex Code
955 \begin_layout Plain Layout
961 this contains tables describing how different character encodings can be
965 \begin_layout Labeling
966 \labelwidthstring 00.00.0000
967 \begin_inset Flex Code
970 \begin_layout Plain Layout
976 this file contains the templates available to the new
977 \begin_inset Flex MenuItem
980 \begin_layout Plain Layout
991 \begin_inset CommandInset ref
993 reference "chap:Including-External-Material"
1000 \begin_layout Labeling
1001 \labelwidthstring 00.00.0000
1002 \begin_inset Flex Code
1005 \begin_layout Plain Layout
1011 this file contains a list of all the languages currently supported by LyX.
1014 \begin_layout Labeling
1015 \labelwidthstring 00.00.0000
1016 \begin_inset Flex Code
1019 \begin_layout Plain Layout
1025 contains information about the supported fonts.
1028 \begin_layout Labeling
1029 \labelwidthstring 00.00.0000
1030 \begin_inset Flex Code
1033 \begin_layout Plain Layout
1039 this file contains translations for internationalized paragraph styles
1041 \begin_inset CommandInset ref
1043 reference "sub:I18n"
1050 \begin_layout Labeling
1051 \labelwidthstring 00.00.0000
1052 \begin_inset Flex Code
1055 \begin_layout Plain Layout
1061 this file contains information about unicode-encoded glyphs and the way
1062 they are supported by LyX via LaTeX.
1065 \begin_layout Section
1066 Your local configuration directory
1069 \begin_layout Standard
1070 Even if you are using LyX as an unprivileged user, you might want to change
1071 LyX configuration for your own use.
1073 \begin_inset Flex Code
1076 \begin_layout Plain Layout
1082 directory contains all your personal configuration files.
1083 This is the directory described as
1084 \begin_inset Quotes eld
1088 \begin_inset Quotes erd
1092 \begin_inset Flex MenuItem
1095 \begin_layout Plain Layout
1096 Help\SpecialChar \menuseparator
1098 \begin_inset space ~
1107 This directory is used as a mirror of
1108 \begin_inset Flex Code
1111 \begin_layout Plain Layout
1117 , which means that every file in
1118 \begin_inset Flex Code
1121 \begin_layout Plain Layout
1127 is a replacement for the corresponding file in
1128 \begin_inset Flex Code
1131 \begin_layout Plain Layout
1138 Any configuration file described in the above sections can be placed either
1139 in the system-wide directory, in which case it will affect all users, or
1140 in your local directory for your own use.
1143 \begin_layout Standard
1144 To make things clearer, let's provide a few examples:
1147 \begin_layout Itemize
1148 The preferences set in the
1149 \begin_inset Flex MenuItem
1152 \begin_layout Plain Layout
1153 Tools\SpecialChar \menuseparator
1159 dialog are saved to a file
1160 \begin_inset Flex Code
1163 \begin_layout Plain Layout
1170 \begin_inset Flex Code
1173 \begin_layout Plain Layout
1182 \begin_layout Itemize
1183 When you reconfigure using
1184 \begin_inset Flex MenuItem
1187 \begin_layout Plain Layout
1188 Tools\SpecialChar \menuseparator
1195 \begin_inset Flex Code
1198 \begin_layout Plain Layout
1204 script, and the resulting files are written in your local configuration
1206 This means that any additional text class file that you might have added
1208 \begin_inset Flex Code
1211 \begin_layout Plain Layout
1217 will be added to the list of classes in the
1218 \begin_inset Flex MenuItem
1221 \begin_layout Plain Layout
1222 Document\SpecialChar \menuseparator
1231 \begin_layout Itemize
1232 If you get some updated documentation from LyX ftp site and cannot install
1233 it because you do not have sysadmin rights on your system, you can just
1235 \begin_inset Flex Code
1238 \begin_layout Plain Layout
1244 and the items in the
1245 \begin_inset Flex MenuItem
1248 \begin_layout Plain Layout
1254 menu will open them!
1257 \begin_layout Section
1258 Running LyX with multiple configurations
1261 \begin_layout Standard
1262 The configuration freedom of the local configuration directory may not suffice
1263 if you want to have more than one configuration at your disposal.
1264 For example, you may want to be use different key bindings or printer settings
1266 You can achieve this by having several such directories.
1267 You then specify which directory to use at run-time.
1270 \begin_layout Standard
1271 Invoking LyX with the command line switch
1272 \begin_inset Flex Code
1275 \begin_layout Plain Layout
1285 instructs the program to read the configuration from that directory, and
1286 not from the default directory.
1287 (You can determine the default directory by running LyX without the
1288 \begin_inset Flex Code
1291 \begin_layout Plain Layout
1297 switch.) If the specified directory does not exist, LyX offers to create
1298 it for you, just like it does for the default directory on the first time
1299 you run the program.
1300 You can modify the configuration options in this additional user directory
1301 exactly as you would for the default directory.
1302 These directories are completely independent (but read on).
1303 Note that setting the environment variable
1304 \begin_inset Flex Code
1307 \begin_layout Plain Layout
1313 to some value has exactly the same effect.
1316 \begin_layout Standard
1317 Having several configurations also requires more maintenance: if you want
1318 to add a new layout to
1319 \begin_inset Flex Code
1322 \begin_layout Plain Layout
1328 which you want available from all your configurations, you must add it
1329 to each directory separately.
1330 You can avoid this with the following trick: after LyX creates the additional
1331 directory, most of the subdirectories (see above) are empty.
1332 If you want the new configuration to mirror an existing one, replace the
1333 empty subdirectory with a symbolic link to the matching subdirectory in
1334 the existing configuration.
1336 \begin_inset Flex Code
1339 \begin_layout Plain Layout
1345 subdirectory, however, since it contains a file written by the configuration
1346 script (also accessible through
1347 \begin_inset Flex MenuItem
1350 \begin_layout Plain Layout
1351 Tools\SpecialChar \menuseparator
1357 ) which is configuration-specific.
1360 \begin_layout Chapter
1361 The Preferences dialog
1364 \begin_layout Standard
1365 All options of the preferences dialog are described in the Appendix
1367 The Preferences Dialog
1374 For some options you might find here more details.
1377 \begin_layout Section
1379 \begin_inset CommandInset label
1388 \begin_layout Standard
1389 The first step is to define your file formats if they are not already defined.
1391 \begin_inset Flex MenuItem
1394 \begin_layout Plain Layout
1395 Tools\SpecialChar \menuseparator
1403 \begin_inset Flex MenuItem
1406 \begin_layout Plain Layout
1407 File Handling\SpecialChar \menuseparator
1414 \begin_inset Flex MenuItem
1417 \begin_layout Plain Layout
1423 button to define your new format.
1425 \begin_inset Flex MenuItem
1428 \begin_layout Plain Layout
1434 field contains the name used to identify the format in the GUI.
1436 \begin_inset Flex MenuItem
1439 \begin_layout Plain Layout
1445 is used to identify the format internally.
1446 You will also need to enter a file extension.
1447 These are all required.
1449 \begin_inset Flex MenuItem
1452 \begin_layout Plain Layout
1458 field is used to provide a keyboard shortcut on the menus.
1459 (For example, pressing
1460 \begin_inset Flex MenuItem
1463 \begin_layout Plain Layout
1470 \begin_inset Flex MenuItem
1473 \begin_layout Plain Layout
1474 View\SpecialChar \menuseparator
1475 View (Other Formats)\SpecialChar \menuseparator
1484 \begin_layout Standard
1486 \begin_inset Flex MenuItem
1489 \begin_layout Plain Layout
1496 \begin_inset Flex MenuItem
1499 \begin_layout Plain Layout
1506 For example, you might want to use
1507 \begin_inset Flex MenuItem
1510 \begin_layout Plain Layout
1516 to view PostScript files.
1517 You can enter the command needed to start the program in the corresponding
1519 In defining this command, you can use the four variables listed in the
1521 The viewer is launched when you view an image in LyX or use the
1522 \begin_inset Flex MenuItem
1525 \begin_layout Plain Layout
1532 The editor is for example launched when you right-click on an image and
1534 \begin_inset Flex MenuItem
1537 \begin_layout Plain Layout
1543 in the appearing context menu.
1546 \begin_layout Standard
1548 \begin_inset Flex MenuItem
1551 \begin_layout Plain Layout
1557 type of a format is optional, but if it is specified, it must be unique
1559 It is used to detect files of this format from the file contents.
1560 For some important file formats there is no MIME type officially registered
1562 \begin_inset CommandInset href
1565 target "http://www.iana.org/assignments/media-types/"
1570 Therefore LyX uses the extended list of MIME types as specified by
1571 \begin_inset CommandInset href
1573 name "freedesktop.org"
1574 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1581 \begin_layout Standard
1583 \begin_inset Flex MenuItem
1586 \begin_layout Plain Layout
1592 option tells LyX that a format is suitable for document export.
1593 If this is set and if a suitable conversion route exists (see
1594 \begin_inset CommandInset ref
1596 reference "sec:Converters"
1600 ), the format will appear in the
1601 \begin_inset Flex MenuItem
1604 \begin_layout Plain Layout
1605 File\SpecialChar \menuseparator
1612 The format will also appear in the
1613 \begin_inset Flex MenuItem
1616 \begin_layout Plain Layout
1622 menu if a viewer is specified for the format.
1623 Pure image formats, such as
1624 \begin_inset Flex Code
1627 \begin_layout Plain Layout
1633 , should not use this option.
1634 Formats that can both represent vector graphics and documents like
1635 \begin_inset Flex Code
1638 \begin_layout Plain Layout
1647 \begin_layout Standard
1649 \begin_inset Flex MenuItem
1652 \begin_layout Plain Layout
1653 Vector graphics format
1658 tells LyX that a format can contain vector graphics.
1659 This information is used to determine the target format of included graphics
1661 \begin_inset Flex MenuItem
1664 \begin_layout Plain Layout
1671 Included graphics may need to be converted to either
1672 \begin_inset Flex MenuItem
1675 \begin_layout Plain Layout
1682 \begin_inset Flex MenuItem
1685 \begin_layout Plain Layout
1692 \begin_inset Flex MenuItem
1695 \begin_layout Plain Layout
1702 \begin_inset Flex MenuItem
1705 \begin_layout Plain Layout
1711 cannot handle other image formats.
1712 If an included graphic is not already in
1713 \begin_inset Flex MenuItem
1716 \begin_layout Plain Layout
1723 \begin_inset Flex MenuItem
1726 \begin_layout Plain Layout
1733 \begin_inset Flex MenuItem
1736 \begin_layout Plain Layout
1742 format, it is converted to
1743 \begin_inset Flex MenuItem
1746 \begin_layout Plain Layout
1752 if the vector format option is set, and otherwise to
1753 \begin_inset Flex MenuItem
1756 \begin_layout Plain Layout
1765 \begin_layout Section
1769 \begin_layout Standard
1770 Since all conversions from one format to another take place in LyX's temporary
1771 directory, it is sometimes necessary to modify a file before copying it
1772 to the temporary directory in order that the conversion may be performed.
1776 \begin_layout Plain Layout
1777 For example, the file may refer to other files—images, for example—using
1778 relative file names, and these may become invalid when the file is copied
1779 to the temporary directory.
1784 This is done by a Copier: It copies a file to (or from) the temporary directory
1785 and may modify it in the process.
1788 \begin_layout Standard
1789 The definitions of the copiers may use four variables:
1792 \begin_layout Labeling
1793 \labelwidthstring 00.00.0000
1794 \begin_inset Flex Code
1797 \begin_layout Plain Layout
1803 The LyX system directory (e.
1804 \begin_inset space \thinspace{}
1808 \begin_inset space \space{}
1812 \begin_inset Flex MenuItem
1815 \begin_layout Plain Layout
1824 \begin_layout Labeling
1825 \labelwidthstring 00.00.0000
1826 \begin_inset Flex Code
1829 \begin_layout Plain Layout
1838 \begin_layout Labeling
1839 \labelwidthstring 00.00.0000
1840 \begin_inset Flex Code
1843 \begin_layout Plain Layout
1852 \begin_layout Labeling
1853 \labelwidthstring 00.00.0000
1854 \begin_inset Flex Code
1857 \begin_layout Plain Layout
1863 The base name (without filename extension) in the LyX temporary directory
1866 \begin_layout Labeling
1867 \labelwidthstring 00.00.0000
1868 \begin_inset Flex Code
1871 \begin_layout Plain Layout
1877 The full directory path of the LyX temporary directory
1880 \begin_layout Labeling
1881 \labelwidthstring 00.00.0000
1882 \begin_inset Flex Code
1885 \begin_layout Plain Layout
1891 The full pathname to the original LyX file being processed
1894 \begin_layout Labeling
1895 \labelwidthstring 00.00.0000
1896 \begin_inset Flex Code
1899 \begin_layout Plain Layout
1905 The filename (without any directory path) of the LyX file.
1908 \begin_layout Labeling
1909 \labelwidthstring 00.00.0000
1910 \begin_inset Flex Code
1913 \begin_layout Plain Layout
1922 \begin_layout Standard
1923 The latter should be the filename as it would be used in a LaTeX's
1930 It is relevant only when exporting files suitable for such inclusion.
1933 \begin_layout Standard
1934 Copiers can be used to do almost anything with output files.
1935 For example, suppose you want generated pdf files to be copied to a special
1937 \begin_inset Flex Code
1940 \begin_layout Plain Layout
1947 Then you could write a shell script such as this one:
1950 \begin_layout Standard
1951 \begin_inset listings
1955 \begin_layout Plain Layout
1960 \begin_layout Plain Layout
1965 \begin_layout Plain Layout
1967 TOFILE=`basename $2`
1970 \begin_layout Plain Layout
1972 cp $FROMFILE /home/you/pdf/$TOFILE
1977 Save it in your local LyX directory—say,
1978 \begin_inset Flex Code
1981 \begin_layout Plain Layout
1982 /home/you/.lyx/scripts/pdfcopier.sh
1987 —and make it executable, if you need to do so on your platform.
1989 \begin_inset Flex MenuItem
1992 \begin_layout Plain Layout
1993 Tools\SpecialChar \menuseparator
1999 dialog, select under
2000 \begin_inset Flex MenuItem
2003 \begin_layout Plain Layout
2004 File Handling\SpecialChar \menuseparator
2011 \begin_inset Flex MenuItem
2014 \begin_layout Plain Layout
2020 format—or one of the other pdf formats—and enter
2021 \begin_inset Flex Code
2024 \begin_layout Plain Layout
2025 pdfcopier.sh $$i $$o
2031 \begin_inset Flex MenuItem
2034 \begin_layout Plain Layout
2044 \begin_layout Standard
2045 Copiers are used by LyX in various of its own conversions.
2046 For example, if appropriate programs are found, LyX will automatically
2047 install copiers for the
2048 \begin_inset Flex MenuItem
2051 \begin_layout Plain Layout
2058 \begin_inset Flex MenuItem
2061 \begin_layout Plain Layout
2063 \begin_inset space ~
2072 When these formats are exported, the copier sees that not just the main
2073 HTML file but various associated files (style files, images, etc.) are also
2075 All these files are written to a subdirectory of the directory in which
2076 the original LyX file was found.
2080 \begin_layout Plain Layout
2081 This copier can be customized.
2083 \begin_inset Quotes eld
2087 \begin_inset Quotes erd
2090 argument takes a comma-separated list of extensions to be copied; if it
2091 is omitted, all files will be copied.
2093 \begin_inset Quotes eld
2097 \begin_inset Quotes erd
2100 argument determines the extension added to the generated directory.
2102 \begin_inset Quotes eld
2106 \begin_inset Flex MenuItem
2109 \begin_layout Plain Layout
2116 \begin_inset Quotes erd
2119 , so HTML generated from
2120 \begin_inset Flex MenuItem
2123 \begin_layout Plain Layout
2124 /path/to/filename.lyx
2130 \begin_inset Flex MenuItem
2133 \begin_layout Plain Layout
2134 /path/to/filename.html.LyXconv
2148 \begin_layout Section
2150 \begin_inset CommandInset label
2152 name "sec:Converters"
2159 \begin_layout Standard
2160 You can define your own Converters to convert files between different formats.
2162 \begin_inset Flex MenuItem
2165 \begin_layout Plain Layout
2166 Tools\SpecialChar \menuseparator
2167 Preferences\SpecialChar \menuseparator
2168 File Handling\SpecialChar \menuseparator
2177 \begin_layout Standard
2178 To define a new converter, select the
2179 \begin_inset Flex MenuItem
2182 \begin_layout Plain Layout
2184 \begin_inset space ~
2193 \begin_inset Flex MenuItem
2196 \begin_layout Plain Layout
2198 \begin_inset space ~
2206 from the drop-down lists, enter the command needed for the conversion,
2208 \begin_inset Flex MenuItem
2211 \begin_layout Plain Layout
2218 Several variables can be used in the definition of converters:
2221 \begin_layout Labeling
2222 \labelwidthstring 00.00.0000
2223 \begin_inset Flex Code
2226 \begin_layout Plain Layout
2232 The LyX system directory
2235 \begin_layout Labeling
2236 \labelwidthstring 00.00.0000
2237 \begin_inset Flex Code
2240 \begin_layout Plain Layout
2249 \begin_layout Labeling
2250 \labelwidthstring 00.00.0000
2251 \begin_inset Flex Code
2254 \begin_layout Plain Layout
2263 \begin_layout Labeling
2264 \labelwidthstring 00.00.0000
2265 \begin_inset Flex Code
2268 \begin_layout Plain Layout
2274 The base filename of the input file (i.
2275 \begin_inset space \thinspace{}
2278 g., without the extension)
2281 \begin_layout Labeling
2282 \labelwidthstring 00.00.0000
2283 \begin_inset Flex Code
2286 \begin_layout Plain Layout
2292 The path to the input file
2295 \begin_layout Labeling
2296 \labelwidthstring 00.00.0000
2297 \begin_inset Flex Code
2300 \begin_layout Plain Layout
2306 The path to the original input file (this is different from $$p when a
2307 chain of converters is called)
2310 \begin_layout Labeling
2311 \labelwidthstring 00.00.0000
2312 \begin_inset Flex Code
2315 \begin_layout Plain Layout
2321 The iconv name for the encoding of the document.
2324 \begin_layout Standard
2326 \begin_inset Flex MenuItem
2329 \begin_layout Plain Layout
2331 \begin_inset space ~
2339 field you can enter the following flags, separated by commas:
2342 \begin_layout Labeling
2343 \labelwidthstring 00.00.0000
2344 \begin_inset Flex Code
2347 \begin_layout Plain Layout
2353 This converter runs some form of LaTeX.
2354 This will make LyX's LaTeX error logs available.
2357 \begin_layout Labeling
2358 \labelwidthstring 00.00.0000
2359 \begin_inset Flex Code
2362 \begin_layout Plain Layout
2369 \begin_inset Flex MenuItem
2372 \begin_layout Plain Layout
2378 file for the conversion.
2381 \begin_layout Labeling
2382 \labelwidthstring 00.00.0000
2383 \begin_inset Flex Code
2386 \begin_layout Plain Layout
2393 \begin_inset Quotes eld
2397 \begin_inset Quotes erd
2400 file from the backend, which in practice means a LaTeX file like the one
2401 we would export, without
2402 \begin_inset Flex Code
2405 \begin_layout Plain Layout
2414 \begin_layout Labeling
2415 \labelwidthstring 00.00.0000
2416 \begin_inset Flex Code
2419 \begin_layout Plain Layout
2428 \begin_layout Standard
2429 The following three flags are not really flags at all because they take
2431 \begin_inset Flex MenuItem
2434 \begin_layout Plain Layout
2436 \begin_inset space ~
2440 \begin_inset space ~
2451 \begin_layout Labeling
2452 \labelwidthstring 00.00.0000
2453 \begin_inset Flex Code
2456 \begin_layout Plain Layout
2462 If set, the converter's standard error will be redirected to a file
2463 \begin_inset Flex Code
2466 \begin_layout Plain Layout
2472 , and the script given as argument will be run as:
2473 \begin_inset Flex Code
2476 \begin_layout Plain Layout
2477 script < infile.out > infile.log
2483 The argument may contain
2484 \begin_inset Flex Code
2487 \begin_layout Plain Layout
2496 \begin_layout Labeling
2497 \labelwidthstring 00.00.0000
2498 \begin_inset Flex Code
2501 \begin_layout Plain Layout
2507 The name of the directory in which the converter will dump the generated
2509 LyX will not create this directory, and it does not copy anything into
2510 it, though it will copy this directory to the destination.
2511 The argument may contain
2512 \begin_inset Flex Code
2515 \begin_layout Plain Layout
2521 , which will be replaced by the base name of the input and output files,
2522 respectively, when the directory is copied.
2523 \begin_inset Newline newline
2526 Note that resultdir and usetempdir make no sense together.
2527 The latter will be ignored if the former is given.
2530 \begin_layout Labeling
2531 \labelwidthstring 00.00.0000
2532 \begin_inset Flex Code
2535 \begin_layout Plain Layout
2541 Determines the output file name and may, contain
2542 \begin_inset Flex Code
2545 \begin_layout Plain Layout
2552 Sensible only with resultdir and optional even then; if not given, it defaults
2556 \begin_layout Standard
2557 None of these last three are presently used in any of the converters that
2558 are installed with LyX.
2562 \begin_layout Standard
2563 You do not have to define converters for all formats between which you want
2565 For example, you will note that there is no `LyX to PostScript' converter,
2566 but LyX will export PostScript.
2567 It does so by first creating a LaTeX file (no converter needs to be defined
2568 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2569 and finally converting the resulting DVI file to PostScript.
2570 LyX finds such `chains' of converters automatically, and it will always
2571 choose the shortest possible chain.
2572 You can, though, still define multiple conversion methods between file
2574 For example, the standard LyX configuration provides five ways to convert
2578 \begin_layout Enumerate
2580 \begin_inset Flex MenuItem
2583 \begin_layout Plain Layout
2592 \begin_layout Enumerate
2593 via (DVI and) PostScript, using
2594 \begin_inset Flex MenuItem
2597 \begin_layout Plain Layout
2606 \begin_layout Enumerate
2608 \begin_inset Flex MenuItem
2611 \begin_layout Plain Layout
2620 \begin_layout Enumerate
2622 \begin_inset Flex MenuItem
2625 \begin_layout Plain Layout
2634 \begin_layout Enumerate
2636 \begin_inset Flex MenuItem
2639 \begin_layout Plain Layout
2648 \begin_layout Standard
2649 To define such alternate chains, you must define multiple target `file formats',
2651 \begin_inset CommandInset ref
2653 reference "sec:Formats"
2658 For example, in the standard configuration, the formats named
2659 \begin_inset Flex MenuItem
2662 \begin_layout Plain Layout
2669 \begin_inset Flex MenuItem
2672 \begin_layout Plain Layout
2679 \begin_inset Flex MenuItem
2682 \begin_layout Plain Layout
2689 \begin_inset Flex MenuItem
2692 \begin_layout Plain Layout
2699 \begin_inset Flex MenuItem
2702 \begin_layout Plain Layout
2709 \begin_inset Flex MenuItem
2712 \begin_layout Plain Layout
2719 \begin_inset Flex MenuItem
2722 \begin_layout Plain Layout
2729 \begin_inset Flex MenuItem
2732 \begin_layout Plain Layout
2739 \begin_inset Flex MenuItem
2742 \begin_layout Plain Layout
2749 \begin_inset Flex MenuItem
2752 \begin_layout Plain Layout
2758 ) are defined, all of which share the extension
2759 \begin_inset Flex MenuItem
2762 \begin_layout Plain Layout
2768 , and which correspond to the conversion methods just mentioned.
2771 \begin_layout Chapter
2772 Internationalizing LyX
2773 \begin_inset CommandInset label
2775 name "cha:Internationalizing-LyX"
2782 \begin_layout Standard
2783 LyX supports using a translated interface.
2784 Last time we checked, LyX provided text in thirty languages.
2785 The language of choice is called your
2790 (For further reading on locale settings, see also the documentation for
2791 locale that comes with your operating system.
2792 For Linux, the manual page for
2793 \begin_inset Flex Code
2796 \begin_layout Plain Layout
2802 could be a good place to start).
2805 \begin_layout Standard
2806 Notice that these translations will work, but do contain a few flaws.
2807 In particular, all dialogs have been designed with the English text in
2808 mind, which means that some of the translated text will be too large to
2809 fit within the space allocated.
2810 This is only a display problem and will not cause any harm.
2811 Also, you will find that some of the translations do not define shortcut
2812 keys for everything.
2813 Sometimes, there are simply not enough free letters to do it.
2814 Other times, the translator just hasn't got around to doing it yet.
2815 Our localization team, which you may wish to join,
2819 \begin_layout Plain Layout
2820 If you are a fluent speaker of a language other than English, joining these
2821 teams is a great way to give back to the LyX community!
2826 will of course try to fix these shortcomings in future versions of LyX.
2829 \begin_layout Section
2833 \begin_layout Subsection
2834 Translating the graphical user interface (text messages).
2837 \begin_layout Standard
2839 \begin_inset Flex Code
2842 \begin_layout Plain Layout
2848 library to handle the internationalization of the interface.
2849 To have LyX speak your favorite language in all menus and dialogs, you
2851 \begin_inset Flex Code
2854 \begin_layout Plain Layout
2860 -file for that language.
2861 When this is available, you'll have to generate a
2862 \begin_inset Flex Code
2865 \begin_layout Plain Layout
2871 -file from it and install the
2872 \begin_inset Flex Code
2875 \begin_layout Plain Layout
2882 The process of doing all of this is explained in the documentation for
2884 \begin_inset Flex Code
2887 \begin_layout Plain Layout
2894 It is possible to do this just for yourself, but if you're going to do
2895 it, you might as well share the results of your labors with the rest of
2897 Send a message to the LyX developers' list for more information about how
2901 \begin_layout Standard
2902 In short, this is what you should do (xx denotes the language code):
2905 \begin_layout Itemize
2906 Check out the LyX source code.
2908 \begin_inset CommandInset href
2910 name "information on the web"
2911 target "http://www.lyx.org/HowToUseSVN"
2918 \begin_layout Itemize
2920 \begin_inset Flex Code
2923 \begin_layout Plain Layout
2929 to the folder of the
2930 \begin_inset Flex Code
2933 \begin_layout Plain Layout
2941 \begin_inset Flex Code
2944 \begin_layout Plain Layout
2952 \begin_inset Flex Code
2955 \begin_layout Plain Layout
2961 doesn't exist anywhere, it can be remade with the console command
2962 \begin_inset Flex Code
2965 \begin_layout Plain Layout
2971 in that directory, or you can use an existing po-file for some other language
2975 \begin_layout Itemize
2977 \begin_inset Flex Code
2980 \begin_layout Plain Layout
2990 \begin_layout Plain Layout
2991 This is just a text file, so it can be edited in any text editor.
2992 But there are also specialized programs that support such editing, such
2997 (for all platforms) or
3006 contains a `mode' for editing
3007 \begin_inset Flex Code
3010 \begin_layout Plain Layout
3021 For some menu- and widget-labels, there are also shortcut keys that should
3023 Those keys are marked after a `|', and should be translated according to
3024 the words and phrases of the language.
3025 You should also fill also out the information at the beginning of the new
3027 \begin_inset Flex Code
3030 \begin_layout Plain Layout
3036 -file with your email-address, etc., so people know where to reach you with
3037 suggestions and entertaining flames.
3040 \begin_layout Standard
3041 If you are just doing this on your own, then:
3044 \begin_layout Itemize
3046 \begin_inset Flex Code
3049 \begin_layout Plain Layout
3056 This can be done with
3057 \begin_inset Flex Code
3060 \begin_layout Plain Layout
3061 msgfmt -o xx.mo < xx.po
3069 \begin_layout Itemize
3071 \begin_inset Flex Code
3074 \begin_layout Plain Layout
3080 -file to your locale-tree, at the correct directory for application messages
3085 xx, and under the name
3086 \begin_inset Flex Code
3089 \begin_layout Plain Layout
3096 \begin_inset space \thinspace{}
3100 \begin_inset space \space{}
3104 \begin_inset Flex Code
3107 \begin_layout Plain Layout
3108 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3118 \begin_layout Standard
3119 As said, however, it would be best if the new
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3129 -file could be added to the LyX distribution, so others can use it.
3130 Adding it involves making additional changes to LyX.
3131 So send an email to the developers' mailing list if you're interested in
3135 \begin_layout Subsubsection
3139 \begin_layout Standard
3140 Sometimes it turns out that one English message needs to be translated into
3141 different messages in the target language.
3142 One example is the message
3143 \begin_inset Flex Code
3146 \begin_layout Plain Layout
3152 which has the German translation
3160 , depending upon exactly what the English
3161 \begin_inset Quotes eld
3165 \begin_inset Quotes erd
3170 \begin_inset Flex Code
3173 \begin_layout Plain Layout
3179 does not handle such ambiguous translations.
3180 Therefore you have to add some context information to the message: Instead
3182 \begin_inset Flex Code
3185 \begin_layout Plain Layout
3192 \begin_inset Flex Code
3195 \begin_layout Plain Layout
3196 To[[as in 'From format x to format y']]
3202 \begin_inset Flex Code
3205 \begin_layout Plain Layout
3206 To[[as in 'From page x to page y']].
3211 Now the two occurrences of
3212 \begin_inset Flex Code
3215 \begin_layout Plain Layout
3222 \begin_inset Flex Code
3225 \begin_layout Plain Layout
3231 and can be translated correctly to
3242 \begin_layout Standard
3243 Of course the context information needs to be stripped off the original
3244 message when no translation is used.
3245 Therefore you have to put it in double square brackets at the end of the
3246 message (see the example above).
3247 The translation mechanism of LyX ensures that everything in double square
3248 brackets at the end of messages is removed before displaying the message.
3251 \begin_layout Subsection
3252 Translating the documentation.
3255 \begin_layout Standard
3256 The online documentation (in the
3257 \begin_inset Flex MenuItem
3260 \begin_layout Plain Layout
3266 -menu) can (and should!) be translated.
3267 If there are translated versions of the documentation available
3271 \begin_layout Plain Layout
3272 As of March 2008, at least some of the documents have been translated into
3273 fourteen languages, with the Tutorial available in a few more.
3278 and the locale is set accordingly, these will be used automagically by
3280 LyX looks for translated versions as
3281 \begin_inset Flex Code
3284 \begin_layout Plain Layout
3285 LyXDir/doc/xx/DocName.lyx
3291 \begin_inset Flex Code
3294 \begin_layout Plain Layout
3300 is the code for the language currently in use.
3301 If there are no translated documents, the default English versions will
3303 Note that the translated versions must have the same filenames (
3304 \begin_inset Flex Code
3307 \begin_layout Plain Layout
3313 above) as the original.
3314 If you feel up to translating the documentation (an excellent way to proof-read
3315 the original documentation by the way!), there are a few things you should
3319 \begin_layout Itemize
3320 Check out the documentation translation web page at
3321 \begin_inset CommandInset href
3323 name "http://www.lyx.org/Translation"
3324 target "http://www.lyx.org/Translation"
3329 That way, you can find out which (if any) documents have already been translate
3330 d into your language.
3331 You can also find out who (if anyone) is organizing the effort to translate
3332 the documentation into your language.
3333 If no one is organizing the effort, please let us know that you're interested.
3336 \begin_layout Standard
3337 Once you get to actually translating, here's a few hints for you that may
3341 \begin_layout Itemize
3342 Join the documentation team! There is information on how to do that in
3343 \begin_inset Flex Code
3346 \begin_layout Plain Layout
3353 \begin_inset Flex MenuItem
3356 \begin_layout Plain Layout
3357 Help\SpecialChar \menuseparator
3363 ), which by the way is the first document you should translate.
3366 \begin_layout Itemize
3367 Learn the typographic conventions for the language you are translating to.
3368 Typography is an ancient art and over the centuries, a great variety of
3369 conventions have developed throughout different parts of the world.
3370 Also study the professional terminology amongst typographers in your country.
3371 Inventing your own terminology will only confuse the users.
3374 (Warning! Typography is addictive!)
3377 \begin_layout Itemize
3378 Make a copy of the document.
3379 This will be your working copy.
3380 You can use this as your personal translated help-file by placing it in
3382 \begin_inset Flex Code
3385 \begin_layout Plain Layout
3394 \begin_layout Itemize
3395 Sometimes the original document (from the LyX-team) will be updated.
3396 Use the source viewer at
3397 \begin_inset CommandInset href
3399 name "http://www.lyx.org/trac/timeline"
3400 target "http://www.lyx.org/trac/timeline"
3404 to see what has been changed.
3405 That way you can easily see which parts of the translated document need
3409 \begin_layout Standard
3410 If you ever find an error in the original document, fix it and notify the
3411 rest of the documentation team of the changes! (You didn't forget to join
3412 the documentation team, did you?)
3415 \begin_layout Standard
3416 \begin_inset Branch OutDated
3419 \begin_layout Section
3420 International Keyboard Support
3423 \begin_layout Standard
3426 [Editor's Note: The following section is by
3434 It needs to be fixed to conform to the new Documentation Style sheet and
3435 to make use of the new v1.0 features.
3436 The whole thing also needs to be merged with the section following it.-jw
3437 It may also be badly out of date.-rh (2008)]
3440 \begin_layout Subsection
3441 Defining Own Keymaps: Keymap File Format
3444 \begin_layout Standard
3445 Let's look at a keyboard definition file a little closer.
3446 It is a plain text file defining
3449 \begin_layout Itemize
3450 key-to-key or key-to-string translations
3453 \begin_layout Itemize
3457 \begin_layout Itemize
3458 dead keys exceptions
3461 \begin_layout Standard
3462 To define key-to-key or key-to-string translation, use this command:
3465 \begin_layout Quotation
3466 \begin_inset Flex Code
3469 \begin_layout Plain Layout
3478 \begin_inset Flex Code
3481 \begin_layout Plain Layout
3490 \begin_layout Standard
3492 \begin_inset Flex Code
3495 \begin_layout Plain Layout
3501 is the key to be translated and
3502 \begin_inset Flex Code
3505 \begin_layout Plain Layout
3511 is the string to be inserted into the document.
3512 To define dead keys, use:
3515 \begin_layout Quotation
3516 \begin_inset Flex Code
3519 \begin_layout Plain Layout
3528 \begin_inset Flex Code
3531 \begin_layout Plain Layout
3540 \begin_layout Standard
3542 \begin_inset Flex Code
3545 \begin_layout Plain Layout
3551 is a keyboard key and
3552 \begin_inset Flex Code
3555 \begin_layout Plain Layout
3562 The following dead keys are supported (shortcut name is in parentheses):
3565 \begin_layout Quotation
3569 \begin_inset space \hfill{}
3575 \begin_layout Quotation
3577 \begin_inset space \hfill{}
3583 \begin_layout Quotation
3585 \begin_inset space \hfill{}
3591 \begin_layout Quotation
3593 \begin_inset space \hfill{}
3599 \begin_layout Quotation
3601 \begin_inset space \hfill{}
3607 \begin_layout Quotation
3609 \begin_inset space \hfill{}
3616 \begin_layout Plain Layout
3628 \begin_layout Quotation
3630 \begin_inset space \hfill{}
3636 \begin_layout Quotation
3638 \begin_inset space \hfill{}
3645 \begin_layout Plain Layout
3657 \begin_layout Quotation
3659 \begin_inset space \hfill{}
3665 \begin_layout Quotation
3667 \begin_inset space \hfill{}
3673 \begin_layout Quotation
3675 \begin_inset space \hfill{}
3682 \begin_layout Plain Layout
3694 \begin_layout Quotation
3696 \begin_inset space \hfill{}
3703 \begin_layout Plain Layout
3715 \begin_layout Quotation
3717 \begin_inset space \hfill{}
3723 \begin_layout Quotation
3724 hungarian umlaut (hug)
3725 \begin_inset space \hfill{}
3731 \begin_layout Quotation
3733 \begin_inset space \hfill{}
3739 \begin_layout Quotation
3741 \begin_inset space \hfill{}
3748 \begin_layout Plain Layout
3760 \begin_layout Standard
3761 Since in many international keyboards there are exceptions to what some
3762 dead keys should do, you can define them using
3765 \begin_layout Quotation
3766 \begin_inset Flex Code
3769 \begin_layout Plain Layout
3777 deadkey key outstring
3780 \begin_layout Standard
3781 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3785 \begin_layout Quotation
3786 \begin_inset Flex Code
3789 \begin_layout Plain Layout
3802 \begin_layout Standard
3803 to make it work correctly.
3804 Also, you have to define as exceptions dead keys over i and j, to remove
3805 the dot from them before inserting an accent mark.
3806 I will change this when the time comes, but so far I haven't had time.
3809 \begin_layout Standard
3810 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3813 \begin_inset Flex Code
3816 \begin_layout Plain Layout
3822 have different meaning.
3824 \begin_inset Flex Code
3827 \begin_layout Plain Layout
3833 marks comments, quotes start and end LaTeX-style commands.
3834 To enter quote, you'll need to use
3835 \begin_inset Flex Code
3838 \begin_layout Plain Layout
3847 \begin_inset Flex Code
3850 \begin_layout Plain Layout
3857 \begin_inset Flex Code
3860 \begin_layout Plain Layout
3871 \begin_layout Standard
3872 If you make a keyboard description file that works for your language, please
3873 mail it to me, so I can include it in the next keymap distribution.
3876 \begin_layout Standard
3877 More keywords will be supported in keymap configuration file in future,
3881 \begin_layout Itemize
3882 \begin_inset Flex Code
3885 \begin_layout Plain Layout
3896 \begin_inset space \hfill{}
3900 \begin_inset Flex Code
3903 \begin_layout Plain Layout
3912 \begin_layout Itemize
3913 \begin_inset Flex Code
3916 \begin_layout Plain Layout
3927 \begin_inset space \hfill{}
3931 \begin_inset Flex Code
3934 \begin_layout Plain Layout
3940 an external keymap translation program
3943 \begin_layout Standard
3944 Also, it should look into
3945 \begin_inset Flex Code
3948 \begin_layout Plain Layout
3954 file for defaults, too (for example, a
3955 \begin_inset Flex Code
3958 \begin_layout Plain Layout
3966 option to include default keyboard).
3974 \begin_layout Section
3975 International Keymap Stuff
3976 \begin_inset CommandInset label
3978 name "sec:International-Keymap-Stuff"
3985 \begin_layout Standard
3986 \begin_inset Note Note
3989 \begin_layout Plain Layout
3990 In doing the revisions on this document in March 2008, I did not look over
3991 this stuff, as I do not understand it.
3992 It would be good if someone else could do so.
4001 \begin_layout Standard
4002 The next two sections describe the
4003 \begin_inset Flex Code
4006 \begin_layout Plain Layout
4015 \begin_inset Flex Code
4018 \begin_layout Plain Layout
4026 file syntax in detail.
4027 These sections should help you design your own key map if the ones provided
4028 do not meet your needs.
4031 \begin_layout Subsection
4035 \begin_layout Standard
4039 \begin_inset Flex Code
4042 \begin_layout Plain Layout
4048 file maps keystrokes to characters or strings.
4049 As the name suggests, it sets a keyboard mapping.
4051 \begin_inset Flex Code
4054 \begin_layout Plain Layout
4065 \begin_inset Flex Code
4068 \begin_layout Plain Layout
4083 \begin_inset Flex Code
4086 \begin_layout Plain Layout
4099 \begin_inset Flex Code
4102 \begin_layout Plain Layout
4111 \begin_inset Flex Code
4114 \begin_layout Plain Layout
4122 are described in this section.
4125 \begin_layout Labeling
4126 \labelwidthstring 00.00.0000
4127 \begin_inset Flex Code
4130 \begin_layout Plain Layout
4138 Map a character to a string
4141 \begin_layout LyX-Code
4156 \begin_layout Standard
4189 the double-quote (")
4206 must be escaped with a preceding backslash (
4217 \begin_layout Standard
4219 \begin_inset Flex MenuItem
4222 \begin_layout Plain Layout
4230 statement to cause the symbol
4231 \begin_inset Flex MenuItem
4234 \begin_layout Plain Layout
4242 to be output for the keystroke
4243 \begin_inset Flex MenuItem
4246 \begin_layout Plain Layout
4257 \begin_layout LyX-Code
4263 \begin_layout Labeling
4264 \labelwidthstring 00.00.0000
4265 \begin_inset Flex Code
4268 \begin_layout Plain Layout
4276 Specify an accent character
4279 \begin_layout LyX-Code
4288 \begin_layout Standard
4289 This will make the cha
4327 This is the dead key
4331 \begin_layout Plain Layout
4338 refers to a key that does not produce a character by itself, but when followed
4339 with another key, produces the desired accent character.
4340 For example, a German characte
4342 r with an umlaut like
4352 can be produced in this manner.
4361 \begin_layout Standard
4374 and then another key not in
4391 followed by the other, not allowed key, as output.
4395 \begin_inset Flex MenuItem
4398 \begin_layout Plain Layout
4406 cancels a dead key, so if
4417 \begin_inset Flex MenuItem
4420 \begin_layout Plain Layout
4429 , the cursor will not go one position backwards but will instead cancel
4445 might have had on the next keystroke.
4449 \begin_layout Standard
4450 The following example specifies that the character ' is to be an acute accent,
4451 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4454 \begin_layout LyX-Code
4457 kmod ' acute aeiouAEIOU
4460 \begin_layout Labeling
4461 \labelwidthstring 00.00.0000
4462 \begin_inset Flex Code
4465 \begin_layout Plain Layout
4471 Specify an exception to the accent character
4474 \begin_layout LyX-Code
4483 \begin_layout Standard
4484 This defines an exce
4525 have been assigned a keystroke with a previous
4528 \begin_inset Flex Code
4531 \begin_layout Plain Layout
4555 must not belong in the
4602 If such a declaration does not exist in
4610 \begin_inset Flex Code
4613 \begin_layout Plain Layout
4647 \begin_inset Flex Code
4650 \begin_layout Plain Layout
4664 \begin_layout Standard
4665 The following command produces causes äi to be produced when you enter acute-i
4669 \begin_layout LyX-Code
4683 \begin_layout Labeling
4684 \labelwidthstring 00.00.0000
4685 \begin_inset Flex Code
4688 \begin_layout Plain Layout
4694 Combine two accent characters
4697 \begin_layout LyX-Code
4703 accent1 accent2 allowed
4706 \begin_layout Standard
4707 This one is getting pretty esoteric.
4708 It allows you to combine the effect
4764 \begin_inset Flex Code
4767 \begin_layout Plain Layout
4795 \begin_layout Standard
4796 Consider this example from the
4797 \begin_inset Flex Code
4800 \begin_layout Plain Layout
4811 \begin_layout LyX-Code
4814 kmod ; acute aeioyvhAEIOYVH
4818 kcomb acute umlaut iyIY
4821 \begin_layout Standard
4822 This allows you to press
4823 \begin_inset Flex MenuItem
4826 \begin_layout Plain Layout
4834 and get the effect of
4835 \begin_inset Flex Code
4838 \begin_layout Plain Layout
4857 in this case cancels the last dead key, so if you press
4858 \begin_inset Flex MenuItem
4861 \begin_layout Plain Layout
4870 \begin_inset Flex Code
4873 \begin_layout Plain Layout
4886 \begin_layout Subsection
4890 \begin_layout Standard
4892 \begin_inset Flex Code
4895 \begin_layout Plain Layout
4903 mapping is performed, a
4904 \begin_inset Flex Code
4907 \begin_layout Plain Layout
4917 file maps the strings that the symbols generate to characters in the current
4919 The LyX distribution currently includes at least the
4920 \begin_inset Flex Code
4923 \begin_layout Plain Layout
4932 \begin_inset Flex Code
4935 \begin_layout Plain Layout
4946 \begin_layout Standard
4948 \begin_inset Flex Code
4951 \begin_layout Plain Layout
4959 file is a sequence of declarations of the form
4962 \begin_layout LyX-Code
4975 \begin_layout Standard
4976 For example, in order to map
4977 \begin_inset Flex MenuItem
4980 \begin_layout Plain Layout
4990 to the corresponding character in the iso-8859-1 set (233), the following
4994 \begin_layout LyX-Code
5002 \begin_layout Standard
5004 \begin_inset Flex Code
5007 \begin_layout Plain Layout
5016 \begin_inset Flex Code
5019 \begin_layout Plain Layout
5037 the same character can apply to more than one string.
5039 \begin_inset Flex Code
5042 \begin_layout Plain Layout
5053 \begin_layout LyX-Code
5065 \begin_inset Newline newline
5081 \begin_layout Standard
5082 If LyX cannot find a mapping for the string produced by the keystroke or
5083 a deadkey sequence, it will check if it looks like an accented char and
5084 try to draw an accent over the character on screen.
5087 \begin_layout Subsection
5091 \begin_layout Standard
5092 There is a second way to add support for international characters through
5093 so-called dead-keys.
5094 A dead-key works in combination with a letter to produce an accented character.
5095 Here, we'll explain how to create a really simple dead-key to illustrate
5099 \begin_layout Standard
5100 Suppose you happen to need the circumflex character,
5101 \begin_inset Quotes eld
5105 \begin_inset Quotes erd
5110 \begin_inset Flex MenuItem
5113 \begin_layout Plain Layout
5120 \begin_inset space ~
5124 \begin_inset Flex MenuItem
5127 \begin_layout Plain Layout
5133 ] to the LyX command
5134 \begin_inset Flex Code
5137 \begin_layout Plain Layout
5144 \begin_inset Flex Code
5147 \begin_layout Plain Layout
5154 Now, whenever you type the
5155 \begin_inset Flex MenuItem
5158 \begin_layout Plain Layout
5164 -key followed by a letter, that letter will have a circumflex accent on
5166 For example, the sequence
5167 \begin_inset Quotes eld
5171 \begin_inset Flex MenuItem
5174 \begin_layout Plain Layout
5181 \begin_inset Quotes erd
5184 produces the letter:
5185 \begin_inset Quotes eld
5189 \begin_inset Quotes erd
5193 If you tried to type
5194 \begin_inset Quotes eld
5198 \begin_inset Flex MenuItem
5201 \begin_layout Plain Layout
5208 \begin_inset Quotes erd
5211 , however, LyX will complain with a beep, since a
5212 \begin_inset Quotes eld
5216 \begin_inset Flex MenuItem
5219 \begin_layout Plain Layout
5226 \begin_inset Quotes erd
5229 never takes a circumflex accent.
5231 \begin_inset Flex MenuItem
5234 \begin_layout Plain Layout
5240 after a dead-key produces the bare-accent.
5241 Please note this last point! If you bind a key to a dead-key, you'll need
5242 to rebind the character on that key to yet another key.
5244 \begin_inset Flex MenuItem
5247 \begin_layout Plain Layout
5253 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5256 \begin_layout Standard
5257 One common way to bind dead-keys is to use
5258 \begin_inset Flex MenuItem
5261 \begin_layout Plain Layout
5268 \begin_inset Flex MenuItem
5271 \begin_layout Plain Layout
5278 \begin_inset Flex MenuItem
5281 \begin_layout Plain Layout
5287 in combination with an accent, like
5288 \begin_inset Quotes eld
5292 \begin_inset Flex MenuItem
5295 \begin_layout Plain Layout
5302 \begin_inset Quotes erd
5306 \begin_inset Quotes eld
5310 \begin_inset Flex MenuItem
5313 \begin_layout Plain Layout
5320 \begin_inset Quotes erd
5324 \begin_inset Quotes eld
5328 \begin_inset Flex MenuItem
5331 \begin_layout Plain Layout
5338 \begin_inset Quotes erd
5342 Another way involves using
5343 \begin_inset Flex Code
5346 \begin_layout Plain Layout
5353 \begin_inset Flex Code
5356 \begin_layout Plain Layout
5362 to set up the special
5363 \begin_inset Flex Code
5366 \begin_layout Plain Layout
5374 \begin_inset Flex Code
5377 \begin_layout Plain Layout
5383 acts in some ways just like
5384 \begin_inset Flex MenuItem
5387 \begin_layout Plain Layout
5393 and permits you to bind keys to accented characters.
5394 You can also turn keys into dead-keys by binding them to something like
5396 \begin_inset Flex Code
5399 \begin_layout Plain Layout
5405 and then binding this symbolic key to the corresponding LyX command.
5409 \begin_layout Plain Layout
5414 : This is exactly what I do in my
5415 \begin_inset Flex Code
5418 \begin_layout Plain Layout
5425 \begin_inset Flex Code
5428 \begin_layout Plain Layout
5436 \begin_inset Flex MenuItem
5439 \begin_layout Plain Layout
5441 \begin_inset space ~
5450 \begin_inset Flex Code
5453 \begin_layout Plain Layout
5459 and a bunch of these
5460 \begin_inset Quotes eld
5464 \begin_inset Flex Code
5467 \begin_layout Plain Layout
5474 \begin_inset Quotes erd
5477 symbolic keys bound such things as
5478 \begin_inset Flex MenuItem
5481 \begin_layout Plain Layout
5483 \begin_inset space ~
5492 \begin_inset Flex MenuItem
5495 \begin_layout Plain Layout
5497 \begin_inset space ~
5506 This is how I produce my accented characters.
5511 You can make just about anything into the
5512 \begin_inset Flex Code
5515 \begin_layout Plain Layout
5522 \begin_inset Flex MenuItem
5525 \begin_layout Plain Layout
5531 keys, a spare function key, etc.
5532 As for the LyX commands that produce accents, check the entry for
5533 \begin_inset Flex Code
5536 \begin_layout Plain Layout
5547 You'll find the complete list there.
5550 \begin_layout Subsection
5551 Saving your Language Configuration
5554 \begin_layout Standard
5555 You can edit your preferences so that your desired language environment
5556 is automatically configured when LyX starts up, via the
5557 \begin_inset Flex MenuItem
5560 \begin_layout Plain Layout
5561 Edit\SpecialChar \menuseparator
5570 \begin_layout Chapter
5571 Installing New Document Classes, Layouts, and Templates
5572 \begin_inset CommandInset label
5574 name "cha:Installing-New-Document"
5579 \begin_inset Argument 1
5582 \begin_layout Plain Layout
5583 Installing New Document Classes
5591 \begin_layout Standard
5592 In this chapter, we describe the procedures for creating and installing
5593 new LyX layout and template files, as well as offer a refresher on correctly
5594 installing new LaTeX document classes.
5598 \begin_layout Standard
5599 First, let us a say a few words about how one ought to think about the relation
5600 between LyX and LaTeX.
5601 The thing to understand is that, in a certain sense, LyX doesn't know anything
5603 Indeed, from LyX's point of view, LaTeX is just one of several
5604 \begin_inset Quotes eld
5608 \begin_inset Quotes erd
5611 in which it is capable of producing output.
5612 Other such formats are DocBook, plaintext, and XHTML.
5613 LaTeX is, of course, a particularly important format, but very little of
5614 the information LyX has about LaTeX is actually contained in the program
5619 \begin_layout Plain Layout
5620 Some commands are sufficiently complex that they are
5621 \begin_inset Quotes eld
5625 \begin_inset Quotes erd
5629 But the developers generally regard this as a Bad Thing.
5634 Rather, that information, even for the standard classes like
5635 \begin_inset Flex Code
5638 \begin_layout Plain Layout
5644 , is contained in `layout files'.
5645 Similarly, LyX itself does not know much about DocBook or XHTML.
5646 What it knows is contained in layout files.
5649 \begin_layout Standard
5650 You can think of the layout file for a given document class as a translation
5651 manual between LyX constructs---paragraphs with their corresponding styles,
5652 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5654 Almost everything LyX knows about
5655 \begin_inset Flex Code
5658 \begin_layout Plain Layout
5664 , for example, is contained in the file
5665 \begin_inset Flex Code
5668 \begin_layout Plain Layout
5674 and in various other files it includes.
5675 For this reason, anyone intending to write layout files should plan to
5676 study the existing files.
5677 A good place to start is with
5678 \begin_inset Flex Code
5681 \begin_layout Plain Layout
5687 , which is included in
5688 \begin_inset Flex Code
5691 \begin_layout Plain Layout
5698 \begin_inset Flex Code
5701 \begin_layout Plain Layout
5707 , and many of the other layout files for document classes.
5708 This file is where sections and the like are defined:
5709 \begin_inset Flex Code
5712 \begin_layout Plain Layout
5718 tells LyX how paragraphs that are marked with the Section, Subsection,
5719 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5722 \begin_inset Flex Code
5725 \begin_layout Plain Layout
5731 file basically just includes several of these
5732 \begin_inset Flex Code
5735 \begin_layout Plain Layout
5744 \begin_layout Standard
5745 Defining the LyX--LaTeX correspondence is not the only thing layout files
5747 Their other job is to define how the LyX constructs themselves will appear
5749 The fact that layout files have these two jobs is often a source of confusion,
5750 because they are completely separate.
5751 Telling LyX how to translate a certain paragraph style into LaTeX does
5752 not tell LyX how to display it; conversely, telling LyX how to display
5753 a certain paragraph style does not tell LyX how to translate it into LaTeX
5754 (let alone tell LaTeX how to display it).
5755 So, in general, when you define a new LyX construct, you must always do
5756 two quite separate things: (i)
5757 \begin_inset space ~
5760 tell LyX how to translate it into LaTeX and (ii)
5761 \begin_inset space ~
5764 tell LyX how to display it.
5767 \begin_layout Standard
5768 Much the same is true, of course, as regards LyX's other backend formats,
5769 though XHTML is in some ways different, because in that case LyX
5773 able, to some extent, to use information about how it should display a
5774 paragraph on the screen to output information (in the form of CSS) about
5775 how the paragraph should be displayed in a browser.
5776 Even in this case, however, the distinction between what LyX does internally
5777 and how things are rendered externally remains in force, and the two can
5778 be controlled separately.
5780 \begin_inset CommandInset ref
5782 reference "sec:Tags-for-XHTML"
5789 \begin_layout Section
5790 Installing new LaTeX files
5793 \begin_layout Standard
5794 Some installations may not include a LaTeX package or class file that you
5795 would like to use within LyX.
5796 For example, you might need FoilTeX, a package for preparing slides for
5797 overhead projectors.
5798 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5799 a user interface for installing such packages.
5800 For example, with MiKTeX, you start the program
5801 \begin_inset Quotes eld
5805 \begin_inset space ~
5809 \begin_inset Quotes erd
5812 to get a list of available packages.
5813 To install one of them, right click on it or use the corresponding toolbar
5817 \begin_layout Standard
5818 If your LaTeX distribution does not provide such a `package manager', or
5819 if the package is not available from your distribution, then follow these
5820 steps to install it manually:
5823 \begin_layout Enumerate
5824 Get the package from
5825 \begin_inset CommandInset href
5828 target "http://www.ctan.org/"
5835 \begin_layout Enumerate
5836 If the package contains a file with the ending
5837 \begin_inset Quotes eld
5841 \begin_inset Flex Code
5844 \begin_layout Plain Layout
5851 \begin_inset Quotes erd
5854 (is the case for FoilTeX) then open a console, change to the folder of
5855 this file and execute the command
5856 \begin_inset Flex Code
5859 \begin_layout Plain Layout
5866 You have now unpacked the package and have all files to install it.
5867 Most LaTeX-packages are not packed and you can skip this step.
5870 \begin_layout Enumerate
5871 Now you need to decide if the package should be available for all users
5876 \begin_layout Enumerate
5877 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5878 for all users on your system, then install it in your `local' TeX tree,
5879 otherwise install it in your own `user' TeX tree.
5880 Where these trees should be created, if they do not already exist, depends
5882 To find this out, look in the file
5883 \begin_inset Flex Code
5886 \begin_layout Plain Layout
5896 \begin_layout Plain Layout
5897 This is usually in the directory
5898 \begin_inset Flex Code
5901 \begin_layout Plain Layout
5907 , though you can execute the command
5908 \begin_inset Flex Code
5911 \begin_layout Plain Layout
5922 The location of the `local' TeX tree is defined by the
5923 \begin_inset Flex Code
5926 \begin_layout Plain Layout
5932 variable; this is usually somewhere like
5933 \begin_inset Flex Code
5936 \begin_layout Plain Layout
5937 /usr/local/share/texmf
5943 The location of the `user' TeX tree is defined by
5944 \begin_inset Flex Code
5947 \begin_layout Plain Layout
5954 \begin_inset Flex Code
5957 \begin_layout Plain Layout
5964 (If these variables are not predefined, you have to define them.) You'll
5965 probably need root permissions to create or modify the `local' tree, but
5966 not for your `user' tree.
5967 \begin_inset Newline newline
5970 In general, it is recommended to install in the user tree because your user
5971 will not be modified or even overwritten when you upgrade your system.
5972 It will typically also be backed up together with everything else when
5973 you backup your home directory (which, of course, you do on a regular basis).
5976 \begin_layout Enumerate
5977 On Windows, if you want the new package to be available for all users on
5978 your system, change to the folder where LaTeX is installed and then change
5980 \begin_inset Flex Code
5983 \begin_layout Plain Layout
5994 (For MiKTeX, this would be by default the folder
5995 \begin_inset Flex Code
5998 \begin_layout Plain Layout
6016 \begin_layout Plain Layout
6017 Note that this will be the correct path only on English installations.
6018 On a German one, it would be
6019 \begin_inset Flex Code
6022 \begin_layout Plain Layout
6036 , and similarly for other languages.
6041 Create there a new folder
6042 \begin_inset Flex Code
6045 \begin_layout Plain Layout
6051 and copy all files of the package into it.
6053 \begin_inset Newline newline
6056 If the package should only available for you or you don't have admin permissions
6057 , do the same, but in the local LaTeX folder.
6059 \begin_inset space \thinspace{}
6063 \begin_inset space ~
6066 2.8 under Windows XP, this would be the folder:
6067 \begin_inset Newline newline
6073 \begin_inset Flex Code
6076 \begin_layout Plain Layout
6079 Documents and Settings
6091 \begin_inset Newline newline
6097 \begin_inset Phantom HPhantom
6100 \begin_layout Plain Layout
6111 \begin_inset Flex Code
6114 \begin_layout Plain Layout
6127 \begin_inset Newline newline
6130 On Vista, it would be:
6131 \begin_inset Newline newline
6135 \begin_inset Flex Code
6138 \begin_layout Plain Layout
6164 \begin_layout Enumerate
6165 Now one only need to tell LaTeX that there are new files.
6166 This depends on the used LaTeX-Distribution:
6170 \begin_layout Enumerate
6171 For TeXLive execute the command
6172 \begin_inset Flex Code
6175 \begin_layout Plain Layout
6182 If you installed the package for all users, then you will probably need
6183 to have root permissions for that.
6186 \begin_layout Enumerate
6187 For MiKTeX, if you have installed the package for all users, start the program
6189 \begin_inset Quotes eld
6193 \begin_inset space ~
6197 \begin_inset Quotes erd
6200 and press the button marked
6201 \begin_inset Quotes eld
6205 \begin_inset Quotes erd
6209 Otherwise start the program
6210 \begin_inset Quotes eld
6214 \begin_inset Quotes erd
6221 \begin_layout Enumerate
6222 Finally, you need to tell LyX that there are new packages available.
6223 So, in LyX, use the menu
6224 \begin_inset Flex MenuItem
6227 \begin_layout Plain Layout
6230 \SpecialChar \menuseparator
6236 and then restart LyX.
6239 \begin_layout Standard
6240 Now the package is installed.
6241 In our example, the document class
6242 \begin_inset Flex Code
6245 \begin_layout Plain Layout
6247 \begin_inset space ~
6254 \begin_layout Plain Layout
6266 will now be available under
6267 \begin_inset Flex MenuItem
6270 \begin_layout Plain Layout
6271 Document\SpecialChar \menuseparator
6272 Settings\SpecialChar \menuseparator
6282 \begin_layout Standard
6283 If you would like to use a LaTeX document class that is not even listed
6285 \begin_inset Flex MenuItem
6288 \begin_layout Plain Layout
6289 Document\SpecialChar \menuseparator
6290 Settings\SpecialChar \menuseparator
6296 , then you need to create a `layout' file for it.
6297 That is the topic of the next section.
6300 \begin_layout Section
6301 Types of layout files
6304 \begin_layout Standard
6305 This section describes the various sorts of LyX files that contain layout
6307 These files describe various paragraph and character styles, determining
6308 how LyX should display them and how they should be translated into LaTeX,
6309 DocBook, XHTML, or whatever output format is being used.
6313 \begin_layout Standard
6314 We shall try to provide a thorough description of the process of writing
6316 However, there are so many different types of documents supported even
6317 by just LaTeX that we can't hope to cover every different possibility or
6318 problem you might encounter.
6319 The LyX users' list is frequented by people with lots of experience with
6320 layout design who are willing to share what they've learned, so please
6321 feel free to ask questions there.
6324 \begin_layout Standard
6325 As you prepare to write a new layout, it is extremely helpful to look at
6326 the layouts distributed with LyX.
6327 If you write a LyX layout for a LaTeX document class that might also be
6328 used by others, or write a module that might be useful to others, then
6329 you should consider posting your layout to the
6330 \begin_inset CommandInset href
6332 name "layout section on the LyX wiki"
6333 target "http://wiki.lyx.org/Layouts/Layouts"
6337 or even to the LyX developers' list, so that it might be included in LyX
6342 \begin_layout Plain Layout
6343 Note that LyX is licensed under the General Public License, so any material
6344 that is contributed to LyX must be similarly licensed.
6352 \begin_layout Subsection
6354 \begin_inset CommandInset label
6356 name "sub:Layout-modules"
6363 \begin_layout Standard
6364 We have spoken to this point about `layout files'.
6365 But there are different sorts of files that contain layout information.
6366 Layout files, strictly so called, have the
6367 \begin_inset Flex Code
6370 \begin_layout Plain Layout
6376 extension and provide LyX with information about document classes.
6377 Since LyX 1.6 layout information can also be contained in layout
6382 \begin_inset Flex Code
6385 \begin_layout Plain Layout
6392 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6393 some modules—such as the
6394 \begin_inset Flex Code
6397 \begin_layout Plain Layout
6403 module—specifically provide support for one package.
6404 In a sense, layout modules are similar to included
6408 \begin_layout Plain Layout
6409 These can have any extension, but by convention have the
6410 \begin_inset Flex Code
6413 \begin_layout Plain Layout
6425 \begin_inset Flex Code
6428 \begin_layout Plain Layout
6434 —in that modules are not specific to a given document class but may be used
6435 with many different classes.
6436 The difference is that using an included file with
6437 \begin_inset Flex Code
6440 \begin_layout Plain Layout
6446 requires editing that file.
6447 Modules, by contrast, are selected in the
6448 \begin_inset Flex MenuItem
6451 \begin_layout Plain Layout
6452 Document\SpecialChar \menuseparator
6461 \begin_layout Standard
6462 Building modules is the easiest way to get started with layout editing,
6463 since it can be as simple as adding a single new paragraph style or flex
6465 But modules may, in principle, contain anything a layout file can contain.
6468 \begin_layout Standard
6469 After creating a new module and copying it to the
6470 \begin_inset Flex Code
6473 \begin_layout Plain Layout
6479 folder, you will need to reconfigure and then restart LyX for the module
6480 to appear in the menu.
6481 However, changes you make to the module will be seen immediately, if you
6483 \begin_inset Flex MenuItem
6486 \begin_layout Plain Layout
6487 Document\SpecialChar \menuseparator
6493 , highlight something, and then hit
6494 \begin_inset Quotes eld
6498 \begin_inset Quotes erd
6504 It is strongly recommended that you save your work before doing this
6509 it is strongly recommended that you not attempt to edit modules while simultaneo
6510 usly working on actual documents
6513 Though of course the developers strive to keep LyX stable in such situations,
6514 syntax errors and the like in your module file could cause strange behavior.
6517 \begin_layout Subsubsection
6521 \begin_layout Standard
6522 Modules are to LyX as packages are to LaTeX.
6523 Sometimes, however, you find yourself wanting a specific inset or character
6524 style just for one document and writing a module that will also be available
6525 to other documents makes little sense.
6526 What you need is LyX's
6527 \begin_inset Quotes eld
6531 \begin_inset Quotes erd
6537 \begin_layout Standard
6538 You will find it under
6540 Document\SpecialChar \menuseparator
6541 Settings\SpecialChar \menuseparator
6545 The large text box allows you to enter anything that you might enter in
6546 a layout file or module.
6547 You can think of a document's local layout, in fact, as a module that belongs
6549 So, in particular, you must enter a
6550 \begin_inset Flex Code
6553 \begin_layout Plain Layout
6560 Any format is acceptable, but one would normally use the format current
6563 \change_inserted 2090807402 1370141351
6565 \change_deleted 2090807402 1370141352
6568 , the current layout format is 35
6569 \change_inserted 2090807402 1370141354
6572 .) You should be aware that local layout is not supported by versions of
6573 LyX prior to 1.6, so you should not use it if you want to be able to export
6574 your document to LyX 1.5 or earlier (without, that is, losing the local
6575 layout information).
6576 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6577 though there is no UI for it---then you should use format 11 and, of course,
6578 use only layout constructs that were available in LyX 1.6.
6581 \begin_layout Standard
6582 When you have entered something in the
6583 \begin_inset Flex Code
6586 \begin_layout Plain Layout
6592 pane, LyX will enable the
6593 \begin_inset Quotes eld
6597 \begin_inset Quotes erd
6600 button at the bottom.
6601 Clicking this button will cause LyX to determine whether what you have
6602 entered is valid layout information for the chosen format.
6603 LyX will report the result but, unfortunately, will not tell you what errors
6604 there might have been.
6605 These will be written to the terminal, however, if LyX is started from
6607 You will not be permitted to save your local layout until you have entered
6611 \begin_layout Standard
6612 The warnings at the end of the previous section apply here, too.
6613 Do not play with local layout while you are actually working, especially
6614 if you have not saved your document.
6615 That said, using local layout with a test document can be a very convenient
6616 way to try out layout ideas, or even to start developing a module.
6619 \begin_layout Subsection
6621 \begin_inset Flex MenuItem
6624 \begin_layout Plain Layout
6633 \begin_layout Standard
6634 There are two situations you are likely to encounter when wanting to support
6635 a new LaTeX document class, involving style (
6636 \begin_inset Flex Code
6639 \begin_layout Plain Layout
6645 ) files and LaTeX2e class (
6646 \begin_inset Flex Code
6649 \begin_layout Plain Layout
6656 Supporting a style file is usually fairly easy.
6657 Supporting a new class file is a bit harder.
6658 We'll discuss the former in this section and the latter in the next.
6659 Similar remarks apply, of course, if you want to support a new DocBook
6663 \begin_layout Standard
6664 The easier case is the one in which your new document class is provided
6665 as a style file that is to be used in conjunction with an already supported
6667 For the sake of the example, we'll assume that the style file is called
6669 \begin_inset Flex MenuItem
6672 \begin_layout Plain Layout
6678 and that it is meant to be used with
6679 \begin_inset Flex MenuItem
6682 \begin_layout Plain Layout
6688 , which is a standard class.
6692 \begin_layout Standard
6693 Start by copying the existing class's layout file into your local directory:
6697 \begin_layout Plain Layout
6698 Of course, which directory is your local directory will vary by platform,
6699 and LyX allows you to specify your local directory on startup, too, using
6701 \begin_inset Flex Code
6704 \begin_layout Plain Layout
6718 \begin_layout LyX-Code
6719 cp report.layout ~/.lyx/layouts/myclass.layout
6722 \begin_layout Standard
6724 \begin_inset Flex Code
6727 \begin_layout Plain Layout
6733 and change the line:
6736 \begin_layout LyX-Code
6739 DeclareLaTeXClass{report}
6742 \begin_layout Standard
6746 \begin_layout LyX-Code
6749 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6752 \begin_layout Standard
6756 \begin_layout LyX-Code
6758 \begin_inset Newline newline
6764 \begin_inset Newline newline
6770 \begin_layout Standard
6771 near the top of the file.
6774 \begin_layout Standard
6775 Start LyX and select
6776 \begin_inset Flex MenuItem
6779 \begin_layout Plain Layout
6780 Tools\SpecialChar \menuseparator
6787 Then restart LyX and try creating a new document.
6789 \begin_inset Flex MenuItem
6792 \begin_layout Plain Layout
6798 " as a document class option in the
6799 \begin_inset Flex MenuItem
6802 \begin_layout Plain Layout
6803 Document\SpecialChar \menuseparator
6810 It is likely that some of the sectioning commands and such in your new
6811 class will work differently from how they worked in the base class—
6812 \begin_inset Flex Code
6815 \begin_layout Plain Layout
6821 in this example—so you can fiddle around with the settings for the different
6822 sections if you wish.
6823 The layout information for sections is contained in
6824 \begin_inset Flex Code
6827 \begin_layout Plain Layout
6833 , but you do not need to copy and change this file.
6834 Instead, you can simply add your changes to your layout file, after the
6836 \begin_inset Flex Code
6839 \begin_layout Plain Layout
6845 , which itself includes
6846 \begin_inset Flex Code
6849 \begin_layout Plain Layout
6856 For example, you might add these lines:
6859 \begin_layout LyX-Code
6863 \begin_layout LyX-Code
6867 \begin_layout LyX-Code
6871 \begin_layout LyX-Code
6875 \begin_layout LyX-Code
6879 \begin_layout Standard
6880 to change the font for chapter headings to sans-serif.
6881 This will override (or, in this case, add to) the existing declaration
6882 for the Chapter style.
6886 \begin_layout Standard
6887 Your new package may also provide commands or environments not present in
6889 In this case, you will want to add these to the layout file.
6891 \begin_inset CommandInset ref
6893 reference "sec:TextClass"
6897 for information on how to do so.
6900 \begin_layout Standard
6902 \begin_inset Flex MenuItem
6905 \begin_layout Plain Layout
6911 can be used with several different document classes, and even if it cannot,
6912 you might find it easiest just to write a module that you can load with
6914 The simplest possible such module would be:
6917 \begin_layout LyX-Code
6920 DeclareLyXModule{My Package}
6923 \begin_layout LyX-Code
6927 \begin_layout LyX-Code
6928 #Support for mypkg.sty.
6931 \begin_layout LyX-Code
6933 \begin_inset Newline newline
6939 \begin_layout LyX-Code
6941 \begin_inset Newline newline
6947 \begin_layout LyX-Code
6949 \begin_inset Newline newline
6955 \begin_inset Newline newline
6961 \begin_layout Standard
6962 A more complex module might modify the behavior of some existing constructs
6963 or define some new ones.
6965 \begin_inset CommandInset ref
6967 reference "sec:TextClass"
6974 \begin_layout Subsection
6976 \begin_inset Flex MenuItem
6979 \begin_layout Plain Layout
6988 \begin_layout Standard
6989 There are two possibilities here.
6990 One is that the class file is itself based upon an existing document class.
6991 For example, many thesis classes are based upon
6992 \begin_inset Flex MenuItem
6995 \begin_layout Plain Layout
7002 To see whether yours is, look for a line like
7005 \begin_layout LyX-Code
7011 \begin_layout Standard
7013 If so, then you may proceed largely as in the previous section, though
7015 \begin_inset Flex Code
7018 \begin_layout Plain Layout
7024 line will be different.
7025 If your new class is
7026 \begin_inset Flex Code
7029 \begin_layout Plain Layout
7035 and it is based upon
7036 \begin_inset Flex Code
7039 \begin_layout Plain Layout
7045 , then the line should read:
7049 \begin_layout Plain Layout
7050 And it will be easiest if you save the file to
7051 \begin_inset Flex Code
7054 \begin_layout Plain Layout
7060 : LyX assumes that the document class has the same name as the layout file.
7069 \begin_layout LyX-Code
7072 DeclareLaTeXClass[thesis,book]{thesis}
7075 \begin_layout Standard
7076 If, on the other hand, the new class is not based upon an existing class,
7077 you will probably have to
7078 \begin_inset Quotes eld
7082 \begin_inset Quotes erd
7086 We strongly suggest copying an existing layout file which uses a similar
7087 LaTeX class and then modifying it, if you can do so.
7088 At least use an existing file as a starting point so you can find out what
7089 items you need to worry about.
7090 Again, the specifics are covered below.
7093 \begin_layout Subsection
7095 \begin_inset CommandInset label
7097 name "sub:Creating-Templates"
7104 \begin_layout Standard
7105 Once you have written a layout file for a new document class, you might
7106 want to consider writing a
7111 A template acts as a kind of tutorial for your layout, showing how it might
7112 be used, though containing dummy content.
7113 You can of course look at the various templates included with LyX for ideas.
7116 \begin_layout Standard
7117 Templates are created just like usual documents: using LyX.
7118 The only difference is that usual documents contain all possible settings,
7119 including the font scheme and the paper size.
7120 Usually a user doesn't want a template to overwrite his preferred settings
7121 for such parameters.
7122 For that reason, the designer of a template should remove the corresponding
7124 \begin_inset Flex Code
7127 \begin_layout Plain Layout
7136 \begin_inset Flex Code
7139 \begin_layout Plain Layout
7147 from the template LyX file.
7148 This can be done with any simple text-editor, for example
7149 \begin_inset Flex Code
7152 \begin_layout Plain Layout
7159 \begin_inset Flex Code
7162 \begin_layout Plain Layout
7171 \begin_layout Standard
7172 Put the edited template files you create in
7173 \begin_inset Flex Code
7176 \begin_layout Plain Layout
7182 , copy the ones you use from the global template directory in
7183 \begin_inset Flex Code
7186 \begin_layout Plain Layout
7192 to the same place, and redefine the template path in the
7193 \begin_inset Flex MenuItem
7196 \begin_layout Plain Layout
7197 Tools\SpecialChar \menuseparator
7198 Preferences\SpecialChar \menuseparator
7207 \begin_layout Standard
7208 Note, by the way, that there is a template which has a particular meaning:
7210 \begin_inset Flex Code
7213 \begin_layout Plain Layout
7220 This template is loaded every time you create a new document with
7221 \begin_inset Flex MenuItem
7224 \begin_layout Plain Layout
7225 File\SpecialChar \menuseparator
7231 in order to provide useful defaults.
7232 To create this template from inside LyX, all you have to do is to open
7233 a document with the correct settings, and use the
7234 \begin_inset Flex MenuItem
7237 \begin_layout Plain Layout
7238 Save as Document Defaults
7246 \begin_layout Subsection
7247 Upgrading old layout files
7250 \begin_layout Standard
7251 The format of layout files changes with each LyX release, so old layout
7252 files need to be converted to the new format.
7253 If LyX reads a layout file in an older format, it automatically calls the
7255 \begin_inset Flex Code
7258 \begin_layout Plain Layout
7264 to convert it to a temporary file in current format.
7265 The original file is left untouched.
7266 If you use the layout file often, then, you may want to convert it permanently,
7267 so that LyX does not have to do so itself every time.
7268 To do this, you can call the converter manually:
7271 \begin_layout Enumerate
7273 \begin_inset Flex Code
7276 \begin_layout Plain Layout
7283 \begin_inset Flex Code
7286 \begin_layout Plain Layout
7295 \begin_layout Enumerate
7297 \begin_inset Newline newline
7301 \begin_inset Flex Code
7304 \begin_layout Plain Layout
7305 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7311 \begin_inset Newline newline
7315 \begin_inset Flex Code
7318 \begin_layout Plain Layout
7324 is the name of your LyX system directory.
7327 \begin_layout Standard
7328 Note that manual conversion does not affect included files, so these will
7329 have to be converted separately.
7332 \begin_layout Section
7333 \begin_inset CommandInset label
7335 name "sec:TextClass"
7339 The layout file format
7342 \begin_layout Standard
7343 The following sections describe how layout files are structured and written.
7344 Our advice is to go slowly, save and test often.
7345 It is really not that hard, except that the multitude of options can become
7346 overwhelming, especially if you try to check out too many at once.
7347 It becomes easier if you use existing layouts of LyX as examples/reference
7348 or if you modify an existing layout to your needs.
7351 \begin_layout Standard
7352 Note that all the tags used in layout files are case-insensitive.
7354 \begin_inset Flex Code
7357 \begin_layout Plain Layout
7364 \begin_inset Flex Code
7367 \begin_layout Plain Layout
7374 \begin_inset Flex Code
7377 \begin_layout Plain Layout
7383 are really the same tag.
7384 The possible arguments are printed in brackets after the tag's name.
7385 The default argument is typeset
7386 \begin_inset Flex Code
7389 \begin_layout Plain Layout
7398 If the argument has a data type like
7399 \begin_inset Quotes eld
7403 \begin_inset Quotes erd
7407 \begin_inset Quotes eld
7411 \begin_inset Quotes erd
7414 , the default is shown like this:
7415 \begin_inset Flex Code
7418 \begin_layout Plain Layout
7429 \begin_layout Subsection
7430 The document class declaration and classification
7433 \begin_layout Standard
7434 Lines in a layout file which begin with
7435 \begin_inset Flex Code
7438 \begin_layout Plain Layout
7445 There is one exception to this rule.
7447 \begin_inset Flex Code
7450 \begin_layout Plain Layout
7456 files should begin with lines like:
7459 \begin_layout LyX-Code
7462 #% Do not delete the line below; configure depends on this
7465 \begin_layout LyX-Code
7476 \begin_layout Plain Layout
7485 eXClass{Article (Standard Class)}
7488 \begin_layout LyX-Code
7493 DeclareCategory{Articles}
7496 \begin_layout Standard
7497 The second and third lines are used when you (re)configure LyX.
7498 The layout file is read by the LaTeX script
7499 \begin_inset Flex Code
7502 \begin_layout Plain Layout
7508 , in a special mode where
7509 \begin_inset Flex Code
7512 \begin_layout Plain Layout
7519 The first line is just a LaTeX comment, the second one contains the mandatory
7520 declaration of the text class and the third line contains the optional
7521 classification of the class.
7522 If these lines appear in a file named
7523 \begin_inset Flex Code
7526 \begin_layout Plain Layout
7532 , then they define a text class of name
7533 \begin_inset Flex Code
7536 \begin_layout Plain Layout
7542 (the name of the layout file) which uses the LaTeX document class
7543 \begin_inset Flex Code
7546 \begin_layout Plain Layout
7552 (the default is to use the same name as the layout).
7554 \begin_inset Quotes eld
7557 Article (Standard Class)
7558 \begin_inset Quotes erd
7561 that appears above is used as a description of the text class in the
7562 \begin_inset Flex MenuItem
7565 \begin_layout Plain Layout
7566 Document\SpecialChar \menuseparator
7574 \begin_inset Quotes eld
7578 \begin_inset Quotes erd
7581 in the example) is also used in the
7582 \begin_inset Flex MenuItem
7585 \begin_layout Plain Layout
7586 Document\SpecialChar \menuseparator
7592 dialog: the text classes are grouped by these categories (which are usually
7593 genres, so typical categories are
7594 \begin_inset Quotes eld
7598 \begin_inset Quotes erd
7602 \begin_inset Quotes eld
7606 \begin_inset Quotes erd
7610 \begin_inset Quotes eld
7614 \begin_inset Quotes erd
7618 \begin_inset Quotes eld
7622 \begin_inset Quotes erd
7626 \begin_inset Quotes eld
7630 \begin_inset Quotes erd
7634 \begin_inset Quotes eld
7638 \begin_inset Quotes erd
7642 If no category has been declared, the class will be put in the
7643 \begin_inset Quotes eld
7647 \begin_inset Quotes erd
7653 \begin_layout Standard
7654 Let's assume that you wrote your own text class that uses the
7655 \begin_inset Flex Code
7658 \begin_layout Plain Layout
7664 document class, but where you changed the appearance of the section headings.
7665 If you put it in a file
7666 \begin_inset Flex Code
7669 \begin_layout Plain Layout
7675 , the header of this file should be:
7678 \begin_layout LyX-Code
7681 #% Do not delete the line below; configure depends on this
7684 \begin_layout LyX-Code
7695 \begin_layout Plain Layout
7704 eXClass[article]{Article (with My Own Headings)}
7707 \begin_layout LyX-Code
7712 DeclareCategory{Articles}
7715 \begin_layout Standard
7716 This declares a text class
7717 \begin_inset Flex Code
7720 \begin_layout Plain Layout
7726 , associated with the LaTeX document class
7727 \begin_inset Flex Code
7730 \begin_layout Plain Layout
7737 \begin_inset Quotes eld
7740 Article (with My Own Headings)
7741 \begin_inset Quotes erd
7745 If your text class depends on several packages, you can declare it as:
7748 \begin_layout LyX-Code
7751 #% Do not delete the line below; configure depends on this
7754 \begin_layout LyX-Code
7765 \begin_layout Plain Layout
7774 eXClass[article,foo.sty]{Article (with My Own Headings)}
7777 \begin_layout LyX-Code
7782 DeclareCategory{Articles}
7785 \begin_layout Standard
7786 This indicates that your text class uses the
7787 \begin_inset Flex Code
7790 \begin_layout Plain Layout
7797 Finally, it is also possible to declare classes for DocBook code.
7798 Typical declarations will look like:
7801 \begin_layout LyX-Code
7804 #% Do not delete the line below; configure depends on this
7807 \begin_layout LyX-Code
7812 DeclareDocBookClass[article]{SGML (DocBook Article)}
7815 \begin_layout LyX-Code
7820 DeclareCategory{Articles (DocBook)}
7823 \begin_layout Standard
7824 Note that these declarations can also be given an optional parameter declaring
7825 the name of the document class (but not a list).
7828 \begin_layout Standard
7829 So, to be as explicit as possible, the form of the layout declaration is:
7832 \begin_layout LyX-Code
7843 \begin_layout Plain Layout
7852 eXClass[class,package.sty]{layout description}
7855 \begin_layout LyX-Code
7860 DeclareCategory{category}
7863 \begin_layout Standard
7864 The class need only be specified if the name of the LaTeX class file and
7865 the name of the layout file are different or if there are packages to load.
7866 If the name of the class file is not specified, then LyX will simply assume
7867 that it is the same as the name of the layout file.
7870 \begin_layout Standard
7871 When the text class has been modified to your taste, all you have to do
7872 is to copy it either to
7873 \begin_inset Flex Code
7876 \begin_layout Plain Layout
7883 \begin_inset Flex Code
7886 \begin_layout Plain Layout
7893 \begin_inset Flex MenuItem
7896 \begin_layout Plain Layout
7897 Tools\SpecialChar \menuseparator
7903 , exit LyX and restart.
7904 Then your new text class should be available along with the others.
7907 \begin_layout Standard
7908 Once the layout file is installed, you can edit it and see your changes
7909 without having to reconfigure or to restart LyX.
7914 \begin_layout Plain Layout
7915 In versions of LyX prior to 1.6, this was not true.
7916 As a result, editing layout files was very time consuming, since you had
7917 constantly to restart LyX to see changes.
7922 You can force a reload of the current layout by using the LyX function
7924 \begin_inset Flex MenuItem
7927 \begin_layout Plain Layout
7934 There is no default binding for this function—though, of course, you can
7935 bind it to a key yourself.
7936 But you will normally use this function simply by entering it in the mini-buffe
7941 \begin_layout Standard
7947 \begin_inset Flex MenuItem
7950 \begin_layout Plain Layout
7956 is very much an `advanced feature'.
7961 recommended that you save your work before using this function.
7966 recommended that you not attempt to edit layout information while simultaneousl
7967 y working on a document that you care about.
7968 Use a test document.
7969 Syntax errors and the like in your layout file could cause peculiar behavior.
7970 In particular, such errors could cause LyX to regard the current layout
7971 as invalid and to attempt to switch to some other layout.
7975 \begin_layout Plain Layout
7976 Really bad syntax errors may even caused LyX to exit.
7977 This is because certain sorts of errors may make LyX unable to read
7987 The LyX team strives to keep LyX stable in such situations, but safe is
7992 \begin_layout Plain Layout
7993 While we're giving advice: make regular backups.
7994 And be nice to your mother.
8002 \begin_layout Subsection
8003 The Module declaration
8006 \begin_layout Standard
8007 A module must begin with a line like the following:
8010 \begin_layout LyX-Code
8017 \begin_layout Plain Layout
8024 yXModule[endnotes.sty]{Endnotes}
8027 \begin_layout Standard
8028 The mandatory argument, in curly brackets, is the name of the module, as
8030 \begin_inset Flex MenuItem
8033 \begin_layout Plain Layout
8034 Document\SpecialChar \menuseparator
8035 Settings\SpecialChar \menuseparator
8042 The argument in square brackets is optional: It declares any LaTeX packages
8043 on which the module depends.
8044 It is also possible to use the form
8045 \begin_inset Flex MenuItem
8048 \begin_layout Plain Layout
8054 as an optional argument, which declares that the module can only be used
8055 when there exists a conversion chain between the formats `
8056 \begin_inset Flex Code
8059 \begin_layout Plain Layout
8066 \begin_inset Flex Code
8069 \begin_layout Plain Layout
8078 \begin_layout Standard
8079 The module declaration should then be followed by lines like the following
8083 \begin_layout Plain Layout
8084 Preferably in English if the module should be published with LyX.
8085 This description will appear in the list of messages to be translated and
8086 will be thus translated with the next interface update.
8094 \begin_layout LyX-Code
8098 \begin_layout LyX-Code
8099 #Adds an endnote command, in addition to footnotes.
8103 \begin_layout LyX-Code
8104 #You will need to add
8106 theendnotes in TeX code where you
8109 \begin_layout LyX-Code
8110 #want the endnotes to appear.
8114 \begin_layout LyX-Code
8118 \begin_layout LyX-Code
8119 #Requires: somemodule | othermodule
8122 \begin_layout LyX-Code
8123 #Excludes: badmodule
8126 \begin_layout Standard
8127 The description is used in
8128 \begin_inset Flex MenuItem
8131 \begin_layout Plain Layout
8132 Document\SpecialChar \menuseparator
8133 Settings\SpecialChar \menuseparator
8139 to provide the user with information about what the module does.
8141 \begin_inset Flex Code
8144 \begin_layout Plain Layout
8150 line is used to identify other modules with which this one must be used;
8152 \begin_inset Flex Code
8155 \begin_layout Plain Layout
8161 line is used to identify modules with which this one may not be used.
8162 Both are optional, and, as shown, multiple modules should be separated
8163 with the pipe symbol: |.
8164 Note that the required modules are treated disjunctively:
8168 of the required modules must be used.
8173 excluded module may be used.
8174 Note that modules are identified here by their filenames without the
8175 \begin_inset Flex Code
8178 \begin_layout Plain Layout
8186 \begin_inset Flex Code
8189 \begin_layout Plain Layout
8196 \begin_inset Flex Code
8199 \begin_layout Plain Layout
8208 \begin_layout Subsection
8212 \begin_layout Standard
8213 The first non-comment line of any layout file, included file, or module
8218 contain the file format number:
8221 \begin_layout Description
8222 \begin_inset Flex Code
8225 \begin_layout Plain Layout
8232 \begin_inset Flex Code
8235 \begin_layout Plain Layout
8241 ] The format number of the layout file.
8244 \begin_layout Standard
8245 This tag was introduced with LyX
8246 \begin_inset space ~
8250 Layout files from older LyX versions do not have an explicit file format
8251 and are considered to have
8252 \begin_inset Flex Code
8255 \begin_layout Plain Layout
8257 \begin_inset space ~
8266 The format for the present version of LyX is format 35.
8267 But each version of LyX is capable of reading earlier versions' layout
8268 files, just as they are capable of reading files produced by earlier versions
8270 There is, however, no provision for converting to earlier formats.
8273 \begin_layout Subsection
8274 \begin_inset CommandInset label
8276 name "sub:General-text-class"
8280 General text class parameters
8283 \begin_layout Standard
8284 These are general parameters that govern the behavior of an entire document
8290 mean that they must appear in
8291 \begin_inset Flex Code
8294 \begin_layout Plain Layout
8300 files rather than in modules.
8301 A module can contain any layout tag.)
8304 \begin_layout Description
8305 \begin_inset Flex Code
8308 \begin_layout Plain Layout
8314 Adds information that will be output in the
8315 \begin_inset Flex Code
8318 \begin_layout Plain Layout
8324 block when the document is output to XHTML.
8325 Typically, this would be used to output CSS style information, but it can
8326 be used for anything that can appear in
8327 \begin_inset Flex Code
8330 \begin_layout Plain Layout
8338 \begin_inset Quotes eld
8342 \begin_inset Flex Code
8345 \begin_layout Plain Layout
8352 \begin_inset Quotes erd
8358 \begin_layout Description
8359 \begin_inset Flex Code
8362 \begin_layout Plain Layout
8368 Adds information to the document preamble.
8370 \begin_inset Newline newline
8374 \begin_inset Quotes eld
8378 \begin_inset Flex Code
8381 \begin_layout Plain Layout
8388 \begin_inset Quotes erd
8394 \begin_layout Description
8395 \begin_inset Flex Code
8398 \begin_layout Plain Layout
8404 Defines formats for use in the display of bibliographic information.
8406 \begin_inset CommandInset ref
8408 reference "sub:Citation-format-description"
8414 \begin_inset Quotes eld
8418 \begin_inset Flex Code
8421 \begin_layout Plain Layout
8428 \begin_inset Quotes erd
8434 \begin_layout Description
8435 \begin_inset Flex Code
8438 \begin_layout Plain Layout
8444 Describes various global options supported by the document class.
8446 \begin_inset CommandInset ref
8448 reference "sub:ClassOptions"
8454 \begin_inset Quotes eld
8458 \begin_inset Flex Code
8461 \begin_layout Plain Layout
8468 \begin_inset Quotes erd
8474 \begin_layout Description
8475 \begin_inset Flex Code
8478 \begin_layout Plain Layout
8485 \begin_inset Flex Code
8488 \begin_layout Plain Layout
8497 \begin_inset space \thinspace{}
8501 \begin_inset Flex Code
8504 \begin_layout Plain Layout
8510 ] Whether the class should
8514 to having one or two columns.
8515 Can be changed in the
8516 \begin_inset Flex MenuItem
8519 \begin_layout Plain Layout
8520 Document\SpecialChar \menuseparator
8529 \begin_layout Description
8530 \begin_inset Flex Code
8533 \begin_layout Plain Layout
8540 \begin_inset Flex Code
8543 \begin_layout Plain Layout
8549 ] This sequence defines the properties for a counter.
8550 If the counter does not yet exist, it is created; if it does exist, it
8553 \begin_inset Quotes eld
8557 \begin_inset Flex Code
8560 \begin_layout Plain Layout
8567 \begin_inset Quotes erd
8571 \begin_inset Newline newline
8575 \begin_inset CommandInset ref
8577 reference "sub:Counters"
8581 for details on counters.
8584 \begin_layout Description
8585 \begin_inset Flex Code
8588 \begin_layout Plain Layout
8594 Sets the default font used to display the document.
8596 \begin_inset CommandInset ref
8598 reference "sub:Font-description"
8602 for how to declare fonts.
8604 \begin_inset Quotes eld
8608 \begin_inset Flex Code
8611 \begin_layout Plain Layout
8618 \begin_inset Quotes erd
8624 \begin_layout Description
8625 \begin_inset Flex Code
8628 \begin_layout Plain Layout
8635 \begin_inset Flex Code
8638 \begin_layout Plain Layout
8644 ] Specifies a module to be included by default with this document class.
8645 The module is specified as filename without the
8646 \begin_inset Flex Code
8649 \begin_layout Plain Layout
8656 The user can still remove the module, but it will be active at the outset.
8657 (This applies only when new files are created, or when this class is chosen
8658 for an existing document.)
8661 \begin_layout Description
8662 \begin_inset Flex Code
8665 \begin_layout Plain Layout
8672 \begin_inset Flex Code
8675 \begin_layout Plain Layout
8681 ] This is the style that will be assigned to new paragraphs, usually
8682 \begin_inset Flex MenuItem
8685 \begin_layout Plain Layout
8692 This will default to the first defined style if not given, but you are
8693 encouraged to use this directive.
8696 \begin_layout Description
8697 \begin_inset Flex Code
8700 \begin_layout Plain Layout
8707 \begin_inset Flex Code
8710 \begin_layout Plain Layout
8716 ] This tag indicates that the module (which is specified by filename without
8718 \begin_inset Flex Code
8721 \begin_layout Plain Layout
8727 extension) cannot be used with this document class.
8728 This might be used in a journal-specific layout file to prevent, say, the
8730 \begin_inset Flex Code
8733 \begin_layout Plain Layout
8739 module that numbers theorems by section.
8744 be used in a module.
8745 Modules have their own way of excluding other modules (see
8746 \begin_inset CommandInset ref
8748 reference "sub:Layout-modules"
8755 \begin_layout Description
8756 \begin_inset Flex Code
8759 \begin_layout Plain Layout
8765 Defines a new float.
8767 \begin_inset CommandInset ref
8769 reference "sub:Floats"
8775 \begin_inset Quotes eld
8779 \begin_inset Flex Code
8782 \begin_layout Plain Layout
8789 \begin_inset Quotes erd
8795 \begin_layout Description
8796 \begin_inset Flex Code
8799 \begin_layout Plain Layout
8805 Sets the information that will be output in the
8806 \begin_inset Flex Code
8809 \begin_layout Plain Layout
8815 block when this document class is output to XHTML.
8816 Note that this will completely override any prior
8817 \begin_inset Flex Code
8820 \begin_layout Plain Layout
8827 \begin_inset Flex Code
8830 \begin_layout Plain Layout
8838 \begin_inset Newline newline
8842 \begin_inset Flex Code
8845 \begin_layout Plain Layout
8851 if you just want to add material to the preamble.) Must end with
8852 \begin_inset Quotes eld
8856 \begin_inset Flex Code
8859 \begin_layout Plain Layout
8866 \begin_inset Quotes erd
8872 \begin_layout Description
8873 \begin_inset Flex Code
8876 \begin_layout Plain Layout
8883 \begin_inset Flex Code
8886 \begin_layout Plain Layout
8892 ] The style to use for the table of contents, bibliography, and so forth,
8893 when the document is output to HTML.
8894 For articles, this should normally be
8895 \begin_inset Flex Code
8898 \begin_layout Plain Layout
8905 \begin_inset Flex Code
8908 \begin_layout Plain Layout
8915 If it is not given, then LyX will attempt to figure out which layout to
8919 \begin_layout Description
8920 \begin_inset Flex Code
8923 \begin_layout Plain Layout
8930 \begin_inset Flex Code
8933 \begin_layout Plain Layout
8939 ] Modifies the properties of the given counter.
8940 If the counter does not exist, the statement is ignored.
8942 \begin_inset Quotes eld
8946 \begin_inset Flex Code
8949 \begin_layout Plain Layout
8956 \begin_inset Quotes erd
8960 \begin_inset Newline newline
8964 \begin_inset CommandInset ref
8966 reference "sub:Counters"
8970 for details on counters.
8973 \begin_layout Description
8974 \begin_inset Flex Code
8977 \begin_layout Plain Layout
8984 \begin_inset Flex Code
8987 \begin_layout Plain Layout
8993 ] Modifies the properties of the given paragraph style.
8994 If the style does not exist, the statement is ignored.
8996 \begin_inset Quotes eld
9000 \begin_inset Flex Code
9003 \begin_layout Plain Layout
9010 \begin_inset Quotes erd
9016 \begin_layout Description
9017 \begin_inset Flex Code
9020 \begin_layout Plain Layout
9027 \begin_inset Flex Code
9030 \begin_layout Plain Layout
9036 ] This allows you to include another layout definition file within yours
9037 to avoid duplicating commands.
9038 Common examples are the standard layout files, for example,
9039 \begin_inset Flex Code
9042 \begin_layout Plain Layout
9048 , which contains most of the basic layouts.
9051 \begin_layout Description
9052 \begin_inset Flex Code
9055 \begin_layout Plain Layout
9062 \begin_inset Flex Code
9065 \begin_layout Plain Layout
9071 ] This section (re-)defines the layout of an inset.
9072 It can be applied to an existing inset or to a new, user-defined inset,
9073 e.g., a new character style.
9075 \begin_inset Quotes eld
9079 \begin_inset Flex Code
9082 \begin_layout Plain Layout
9089 \begin_inset Quotes erd
9093 \begin_inset Newline newline
9097 \begin_inset CommandInset ref
9099 reference "sub:Flex-insets-and"
9103 for more information.
9107 \begin_layout Description
9108 \begin_inset Flex Code
9111 \begin_layout Plain Layout
9118 \begin_inset Flex Code
9121 \begin_layout Plain Layout
9127 ] A string that indicates the width of the left margin on the screen, for
9129 \begin_inset Quotes eld
9133 \begin_inset Flex Code
9136 \begin_layout Plain Layout
9143 \begin_inset Quotes erd
9147 (Note that this is not a `length', like
9148 \begin_inset Quotes eld
9152 \begin_inset Quotes erd
9158 \begin_layout Description
9159 \begin_inset Flex Code
9162 \begin_layout Plain Layout
9169 \begin_inset Flex Code
9172 \begin_layout Plain Layout
9178 ] Deletes an existing counter, usually one defined in an included file.
9181 \begin_layout Description
9182 \begin_inset Flex Code
9185 \begin_layout Plain Layout
9192 \begin_inset Flex Code
9195 \begin_layout Plain Layout
9201 ] Deletes an existing float.
9202 This is particularly useful when you want to suppress a float that has
9203 been defined in an input file.
9206 \begin_layout Description
9207 \begin_inset Flex Code
9210 \begin_layout Plain Layout
9217 \begin_inset Flex Code
9220 \begin_layout Plain Layout
9226 ] Deletes an existing style.
9229 \begin_layout Description
9230 \begin_inset Flex Code
9233 \begin_layout Plain Layout
9240 \begin_inset Flex Code
9243 \begin_layout Plain Layout
9249 ] The file format (as defined in the LyX preferences) produced by this document
9251 It is mainly useful when
9252 \begin_inset Flex Code
9255 \begin_layout Plain Layout
9262 \begin_inset Flex Code
9265 \begin_layout Plain Layout
9271 and one wants to define a new type of literate document.
9272 The format is reset to
9273 \begin_inset Quotes eld
9277 \begin_inset Flex Code
9280 \begin_layout Plain Layout
9287 \begin_inset Quotes erd
9291 \begin_inset Quotes eld
9295 \begin_inset Flex Code
9298 \begin_layout Plain Layout
9305 \begin_inset Quotes erd
9308 when the corresponding
9309 \begin_inset Flex Code
9312 \begin_layout Plain Layout
9318 parameter is encountered.
9321 \begin_layout Description
9322 \begin_inset Flex Code
9325 \begin_layout Plain Layout
9332 \begin_inset Flex Code
9335 \begin_layout Plain Layout
9346 \begin_inset Flex Code
9349 \begin_layout Plain Layout
9356 \begin_inset Flex Code
9359 \begin_layout Plain Layout
9365 ] Specifies what sort of output documents using this class will produce.
9368 \begin_layout Description
9369 \begin_inset Flex Code
9372 \begin_layout Plain Layout
9379 \begin_inset Flex Code
9382 \begin_layout Plain Layout
9389 \begin_inset Flex Code
9392 \begin_layout Plain Layout
9398 ] Specifies options, given in the second string, for the package named by
9401 \begin_inset Quotes eld
9405 \begin_inset Flex Code
9408 \begin_layout Plain Layout
9409 PackageOptions natbib square
9415 \begin_inset Quotes erd
9419 \begin_inset Flex Code
9422 \begin_layout Plain Layout
9428 to be loaded with the
9429 \begin_inset Flex Code
9432 \begin_layout Plain Layout
9439 (For TeXperts, this causes LyX to output:
9440 \begin_inset Flex Code
9443 \begin_layout Plain Layout
9446 PassOptionsToPackage{natbib}{square}
9452 \begin_inset Flex Code
9455 \begin_layout Plain Layout
9464 \begin_layout Description
9465 \begin_inset Flex Code
9468 \begin_layout Plain Layout
9475 \begin_inset Flex Code
9478 \begin_layout Plain Layout
9487 \begin_inset Flex Code
9490 \begin_layout Plain Layout
9497 \begin_inset Flex Code
9500 \begin_layout Plain Layout
9506 ] The default pagestyle.
9507 Can be changed in the
9508 \begin_inset Flex MenuItem
9511 \begin_layout Plain Layout
9512 Document\SpecialChar \menuseparator
9521 \begin_layout Description
9522 \begin_inset Flex Code
9525 \begin_layout Plain Layout
9531 Sets the preamble for the LaTeX document.
9532 Note that this will completely override any prior
9533 \begin_inset Flex Code
9536 \begin_layout Plain Layout
9543 \begin_inset Flex Code
9546 \begin_layout Plain Layout
9554 \begin_inset Flex Code
9557 \begin_layout Plain Layout
9563 if you just want to add material to the preamble.) Must end with
9564 \begin_inset Quotes eld
9568 \begin_inset Flex Code
9571 \begin_layout Plain Layout
9578 \begin_inset Quotes erd
9584 \begin_layout Description
9585 \begin_inset Flex Code
9588 \begin_layout Plain Layout
9595 \begin_inset Flex Code
9598 \begin_layout Plain Layout
9605 \begin_inset Flex Code
9608 \begin_layout Plain Layout
9617 \begin_inset space \thinspace{}
9621 \begin_inset Flex Code
9624 \begin_layout Plain Layout
9630 ] Whether the class already provides the feature
9631 \begin_inset Flex Code
9634 \begin_layout Plain Layout
9641 A feature is in general the name of a package (e.
9642 \begin_inset space \thinspace{}
9646 \begin_inset space \space{}
9650 \begin_inset Flex Code
9653 \begin_layout Plain Layout
9660 \begin_inset Flex Code
9663 \begin_layout Plain Layout
9670 \begin_inset space \thinspace{}
9674 \begin_inset space \space{}
9678 \begin_inset Flex Code
9681 \begin_layout Plain Layout
9688 \begin_inset Flex Code
9691 \begin_layout Plain Layout
9699 \begin_inset CommandInset ref
9701 reference "chap:List-of-functions"
9705 for the list of features.
9708 \begin_layout Description
9709 \begin_inset Flex Code
9712 \begin_layout Plain Layout
9719 \begin_inset Flex Code
9722 \begin_layout Plain Layout
9728 ] Indicates that this layout provides the functionality of the module mentioned,
9729 which should be specified by the filename without the
9730 \begin_inset Flex Code
9733 \begin_layout Plain Layout
9740 This will typically be used if the layout includes the module directly,
9741 rather than using the
9742 \begin_inset Flex Code
9745 \begin_layout Plain Layout
9751 tag to indicate that it ought to be used.
9752 It could also be used in a module that provided an alternate implementation
9753 of the same functionality.
9756 \begin_layout Description
9757 \begin_inset Flex Code
9760 \begin_layout Plain Layout
9767 \begin_inset Flex Code
9770 \begin_layout Plain Layout
9776 ] Whether the class requires the feature
9777 \begin_inset Flex Code
9780 \begin_layout Plain Layout
9787 Multiple features must be separated by commas.
9788 Note that you can only request supported features.
9790 \begin_inset CommandInset ref
9792 reference "chap:List-of-functions"
9796 for the list of features.)
9799 \begin_layout Description
9800 \begin_inset Flex Code
9803 \begin_layout Plain Layout
9810 \begin_inset Flex Code
9813 \begin_layout Plain Layout
9819 ] A string that indicates the width of the right margin on the screen, for
9821 \begin_inset Quotes eld
9825 \begin_inset Flex Code
9828 \begin_layout Plain Layout
9835 \begin_inset Quotes erd
9841 \begin_layout Description
9842 \begin_inset Flex Code
9845 \begin_layout Plain Layout
9852 \begin_inset Flex Code
9855 \begin_layout Plain Layout
9861 ] Sets which divisions get numbered.
9863 \begin_inset Newline newline
9867 \begin_inset Flex Code
9870 \begin_layout Plain Layout
9879 \begin_layout Description
9880 \begin_inset Flex Code
9883 \begin_layout Plain Layout
9890 \begin_inset Flex Code
9893 \begin_layout Plain Layout
9902 \begin_inset space \thinspace{}
9906 \begin_inset Flex Code
9909 \begin_layout Plain Layout
9915 ] Whether the class-default should be printing on one or both sides of the
9917 Can be changed in the
9918 \begin_inset Flex MenuItem
9921 \begin_layout Plain Layout
9922 Document\SpecialChar \menuseparator
9931 \begin_layout Description
9932 \begin_inset Flex Code
9935 \begin_layout Plain Layout
9942 \begin_inset Flex Code
9945 \begin_layout Plain Layout
9951 ] This sequence defines a paragraph style.
9952 If the style does not yet exist, it is created; if it does exist, its parameter
9955 \begin_inset Quotes eld
9959 \begin_inset Flex Code
9962 \begin_layout Plain Layout
9969 \begin_inset Quotes erd
9973 \begin_inset Newline newline
9977 \begin_inset CommandInset ref
9979 reference "sub:Paragraph-Styles"
9983 for details on paragraph styles.
9986 \begin_layout Description
9987 \begin_inset Flex Code
9990 \begin_layout Plain Layout
9997 \begin_inset Flex Code
10000 \begin_layout Plain Layout
10006 ] The name of the command or environment to be used with
10007 \begin_inset Flex Code
10010 \begin_layout Plain Layout
10019 \begin_layout Description
10020 \begin_inset Flex Code
10023 \begin_layout Plain Layout
10030 \begin_inset Flex Code
10033 \begin_layout Plain Layout
10042 \begin_inset Flex Code
10045 \begin_layout Plain Layout
10051 ] Indicates what kind of markup is used to define the title of a document.
10053 \begin_inset Flex Code
10056 \begin_layout Plain Layout
10062 means that the macro with name
10063 \begin_inset Flex Code
10066 \begin_layout Plain Layout
10072 will be inserted after the last layout which has
10073 \begin_inset Quotes eld
10077 \begin_inset Flex Code
10080 \begin_layout Plain Layout
10082 \begin_inset space ~
10091 \begin_inset Quotes erd
10096 \begin_inset Flex Code
10099 \begin_layout Plain Layout
10105 corresponds to the case where all layouts which have
10106 \begin_inset Quotes eld
10110 \begin_inset Flex Code
10113 \begin_layout Plain Layout
10115 \begin_inset space ~
10124 \begin_inset Quotes erd
10127 should be enclosed into the
10128 \begin_inset Flex Code
10131 \begin_layout Plain Layout
10140 \begin_layout Description
10141 \begin_inset Flex Code
10144 \begin_layout Plain Layout
10151 \begin_inset Flex Code
10154 \begin_layout Plain Layout
10160 ] Sets which divisions are included in the table of contents.
10162 \begin_inset Flex Code
10165 \begin_layout Plain Layout
10174 \begin_layout Subsection
10175 \begin_inset Flex Code
10178 \begin_layout Plain Layout
10185 \begin_inset CommandInset label
10187 name "sub:ClassOptions"
10194 \begin_layout Standard
10196 \begin_inset Flex Code
10199 \begin_layout Plain Layout
10205 section can contain the following entries:
10208 \begin_layout Description
10209 \begin_inset Flex Code
10212 \begin_layout Plain Layout
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10228 ] The list of available font sizes for the document's main font, separated
10230 \begin_inset Quotes eld
10234 \begin_inset Flex Code
10237 \begin_layout Plain Layout
10244 \begin_inset Quotes erd
10250 \begin_layout Description
10251 \begin_inset Flex Code
10254 \begin_layout Plain Layout
10260 Used to set the DTD line with XML-based output classes.
10262 \begin_inset space \thinspace{}
10266 \begin_inset Quotes eld
10269 -//OASIS//DTD DocBook V4.2//EN
10270 \begin_inset Quotes erd
10276 \begin_layout Description
10277 \begin_inset Flex Code
10280 \begin_layout Plain Layout
10287 \begin_inset Flex Code
10290 \begin_layout Plain Layout
10291 string="empty|plain|headings|fancy"
10296 ] The list of available page sty\SpecialChar \-
10298 \begin_inset Quotes eld
10302 \begin_inset Flex Code
10305 \begin_layout Plain Layout
10312 \begin_inset Quotes erd
10318 \begin_layout Description
10319 \begin_inset Flex Code
10322 \begin_layout Plain Layout
10329 \begin_inset Flex Code
10332 \begin_layout Plain Layout
10338 ] Some document class options, separated by a comma, that will be added
10339 to the optional part of the
10340 \begin_inset Flex Code
10343 \begin_layout Plain Layout
10354 \begin_layout Standard
10356 \begin_inset Flex Code
10359 \begin_layout Plain Layout
10365 section must end with
10366 \begin_inset Quotes eld
10370 \begin_inset Flex Code
10373 \begin_layout Plain Layout
10380 \begin_inset Quotes erd
10386 \begin_layout Subsection
10388 \begin_inset CommandInset label
10390 name "sub:Paragraph-Styles"
10397 \begin_layout Standard
10398 A paragraph style description looks like this:
10402 \begin_layout Plain Layout
10403 Note that this will either define a new style or modify an existing one.
10411 \begin_layout LyX-Code
10418 \begin_layout LyX-Code
10422 \begin_layout LyX-Code
10426 \begin_layout Standard
10427 where the following commands are allowed:
10430 \begin_layout Description
10431 \begin_inset Flex Code
10434 \begin_layout Plain Layout
10441 \begin_inset Flex Code
10444 \begin_layout Plain Layout
10449 , left, right, center
10454 ] Paragraph alignment.
10457 \begin_layout Description
10458 \begin_inset Flex Code
10461 \begin_layout Plain Layout
10468 \begin_inset Flex Code
10471 \begin_layout Plain Layout
10476 , left, right, center
10481 ] A comma separated list of permitted alignments.
10482 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10484 For example a right-aligned or centered enumeration isn't possible.)
10487 \begin_layout Description
10488 \begin_inset Flex Code
10491 \begin_layout Plain Layout
10498 \begin_inset Flex Code
10501 \begin_layout Plain Layout
10507 ] Defines argument number <int> of a command\SpecialChar \slash{}
10508 environment associated with
10510 This is useful for things like section headings, and only makes sense with
10512 Every (optional or required) argument of a command or environment -- except
10513 for the required argument that is associated with the content of the paragraph
10514 itself -- has a separate definition, where the number specifies the order
10516 The definition must end with
10517 \begin_inset Flex Code
10520 \begin_layout Plain Layout
10527 So a command with two optional arguments has:
10531 \begin_layout Quote
10537 \begin_layout Quote
10543 \begin_layout Quote
10549 \begin_layout Quote
10555 \begin_layout Quote
10561 \begin_layout Quote
10567 \begin_layout Standard
10569 \begin_inset Flex Code
10572 \begin_layout Plain Layout
10578 definition, the following specifications are possible:
10581 \begin_layout Itemize
10582 \begin_inset Flex Code
10585 \begin_layout Plain Layout
10592 \begin_inset Flex Code
10595 \begin_layout Plain Layout
10601 The string that will appear both in the menu (to insert this argument)
10602 and on the argument inset button (unless you also specify a separate
10603 \begin_inset Flex Code
10606 \begin_layout Plain Layout
10613 For the menu, you can define an accelerator by appending the respective
10614 character to the string, divided by
10615 \begin_inset Quotes eld
10619 \begin_inset Quotes erd
10623 \begin_inset space \thinspace{}
10627 \begin_inset space \space{}
10631 \begin_inset Quotes eld
10635 \begin_inset Flex Code
10638 \begin_layout Plain Layout
10645 \begin_inset Quotes erd
10651 \begin_layout Itemize
10652 \begin_inset Flex Code
10655 \begin_layout Plain Layout
10662 \begin_inset Flex Code
10665 \begin_layout Plain Layout
10671 A separate string for the menu.
10672 You can define an accelerator by appending the respective character to
10673 the string, divided by
10674 \begin_inset Quotes eld
10678 \begin_inset Quotes erd
10682 \begin_inset space \thinspace{}
10686 \begin_inset space \space{}
10690 \begin_inset Quotes eld
10694 \begin_inset Flex Code
10697 \begin_layout Plain Layout
10704 \begin_inset Quotes erd
10708 This specification is optional.
10709 If it is not given the
10710 \begin_inset Flex Code
10713 \begin_layout Plain Layout
10719 will be used instead for the menu.
10722 \begin_layout Itemize
10723 \begin_inset Flex Code
10726 \begin_layout Plain Layout
10733 \begin_inset Flex Code
10736 \begin_layout Plain Layout
10742 A longer explanatory text that appears in the tooltip when hovering over
10743 the argument inset.
10746 \begin_layout Itemize
10747 \begin_inset Flex Code
10750 \begin_layout Plain Layout
10757 \begin_inset Flex Code
10760 \begin_layout Plain Layout
10769 \begin_inset space \thinspace{}
10773 \begin_inset Flex Code
10776 \begin_layout Plain Layout
10782 ] Declare if this is a mandatory (1) or an optional (0) argument.
10783 Mandatory arguments will be output empty if not given, while optional arguments
10784 will not be output at all.
10785 By default, mandatory arguments are delimited by
10786 \begin_inset Flex Code
10789 \begin_layout Plain Layout
10795 , while optional arguments are delimited by
10796 \begin_inset Flex Code
10799 \begin_layout Plain Layout
10808 \begin_layout Itemize
10809 \begin_inset Flex Code
10812 \begin_layout Plain Layout
10819 \begin_inset Flex Code
10822 \begin_layout Plain Layout
10828 defines another argument (by its number) which this argument requires to
10829 be output if it is itself output.
10831 \begin_inset space \thinspace{}
10834 g., in LaTeX commands, optional arguments often require previous optional
10835 arguments to be output (at least empty), as in
10836 \begin_inset Flex Code
10839 \begin_layout Plain Layout
10842 command[][argument]{text}
10848 This can be achieved by the statement
10849 \begin_inset Flex Code
10852 \begin_layout Plain Layout
10859 \begin_inset Flex Code
10862 \begin_layout Plain Layout
10871 \begin_layout Itemize
10872 \begin_inset Flex Code
10875 \begin_layout Plain Layout
10882 \begin_inset Flex Code
10885 \begin_layout Plain Layout
10891 defines a custom left delimiter (instead of
10892 \begin_inset Flex Code
10895 \begin_layout Plain Layout
10902 \begin_inset Flex Code
10905 \begin_layout Plain Layout
10912 A line break in the output can be indicated by
10913 \begin_inset Flex Code
10916 \begin_layout Plain Layout
10925 \begin_layout Itemize
10926 \begin_inset Flex Code
10929 \begin_layout Plain Layout
10936 \begin_inset Flex Code
10939 \begin_layout Plain Layout
10945 defines a custom right delimiter (instead of
10946 \begin_inset Flex Code
10949 \begin_layout Plain Layout
10956 \begin_inset Flex Code
10959 \begin_layout Plain Layout
10966 A line break in the output can be indicated by
10967 \begin_inset Flex Code
10970 \begin_layout Plain Layout
10979 \begin_layout Itemize
10980 \begin_inset Flex Code
10983 \begin_layout Plain Layout
10990 \begin_inset Flex Code
10993 \begin_layout Plain Layout
10999 defines an argument that is inserted if and only if no user-specified arguments
11001 \begin_inset space \thinspace{}
11005 \begin_inset space \space{}
11008 if no argument inset has been inserted (note that also an empty argument
11009 inset omits the DefaultArg).
11010 Multiple arguments need to be separated by comma.
11013 \begin_layout Itemize
11014 \begin_inset Flex Code
11017 \begin_layout Plain Layout
11024 \begin_inset Flex Code
11027 \begin_layout Plain Layout
11033 defines an argument that is inserted in any case (alone or in addition
11034 to user-specified arguments).
11035 Multiple arguments need to be separated by comma.
11038 \begin_layout Itemize
11039 \begin_inset Flex Code
11042 \begin_layout Plain Layout
11048 The font used for the argument content, see
11049 \begin_inset CommandInset ref
11051 reference "sub:Font-description"
11058 \begin_layout Itemize
11059 \begin_inset Flex Code
11062 \begin_layout Plain Layout
11068 The font used for the label; see
11069 \begin_inset CommandInset ref
11071 reference "sub:Font-description"
11078 \begin_layout Itemize
11079 \begin_inset Flex Code
11082 \begin_layout Plain Layout
11089 \begin_inset Flex Code
11092 \begin_layout Plain Layout
11097 , Minimalistic, Conglomerate
11102 ] describes the rendering style used for the inset's frame and buttons.
11105 \begin_layout Itemize
11106 \begin_inset Flex Code
11109 \begin_layout Plain Layout
11116 \begin_inset Flex Code
11119 \begin_layout Plain Layout
11126 \begin_inset Flex Code
11129 \begin_layout Plain Layout
11135 , this argument is automatically inserted when the respective style is selected.
11136 Currently, only one argument per style\SpecialChar \slash{}
11137 layout can be automatically inserted.
11140 \begin_layout Standard
11141 By default, the text entered in the LyX workarea in the respective layout
11142 is the last (mandatory) argument of a command if the
11143 \begin_inset Flex Code
11146 \begin_layout Plain Layout
11153 \begin_inset Flex Code
11156 \begin_layout Plain Layout
11163 However, arguments with the prefix
11164 \begin_inset Flex Code
11167 \begin_layout Plain Layout
11173 are output after this workarea argument.
11174 Note that post-argument numbering restarts at 1, so the first argument
11175 following the workarea argument is
11176 \begin_inset Flex Code
11179 \begin_layout Plain Layout
11186 Post-arguments are ignored in any other
11187 \begin_inset Flex Code
11190 \begin_layout Plain Layout
11197 \begin_inset Flex Code
11200 \begin_layout Plain Layout
11209 \begin_layout Standard
11211 \begin_inset Flex Code
11214 \begin_layout Plain Layout
11223 \begin_inset Flex Code
11226 \begin_layout Plain Layout
11235 \begin_inset Flex Code
11238 \begin_layout Plain Layout
11244 followed by the number (e.
11245 \begin_inset space \thinspace{}
11249 \begin_inset space \space{}
11253 \begin_inset Flex Code
11256 \begin_layout Plain Layout
11266 \begin_layout Description
11267 \begin_inset Flex Code
11270 \begin_layout Plain Layout
11276 Note that this will completely override any prior
11277 \begin_inset Flex Code
11280 \begin_layout Plain Layout
11286 declaration for this style.
11288 \begin_inset Quotes eld
11292 \begin_inset Flex Code
11295 \begin_layout Plain Layout
11302 \begin_inset Quotes erd
11307 \begin_inset CommandInset ref
11309 reference "sub:I18n"
11313 for details on its use.
11316 \begin_layout Description
11317 \begin_inset Flex Code
11320 \begin_layout Plain Layout
11327 \begin_inset Flex Code
11330 \begin_layout Plain Layout
11340 \begin_layout Plain Layout
11341 Note that a `float' here is a real number, such as: 1.5.
11346 The vertical space with which the last of a chain of paragraphs with this
11347 style is separated from the following paragraph.
11348 If the next paragraph has another style, the separations are not simply
11349 added, but the maximum is taken.
11352 \begin_layout Description
11353 \begin_inset Flex Code
11356 \begin_layout Plain Layout
11363 \begin_inset Flex Code
11366 \begin_layout Plain Layout
11372 ] The category for this style.
11373 This is used to group related styles in the style combobox on the toolbar.
11374 Any string can be used, but you may want to use existing categories with
11379 \begin_layout Description
11380 \begin_inset Flex Code
11383 \begin_layout Plain Layout
11389 Depth of XML command.
11390 Used only with XML-type formats.
11393 \begin_layout Description
11394 \begin_inset Flex Code
11397 \begin_layout Plain Layout
11404 \begin_inset Flex Code
11407 \begin_layout Plain Layout
11413 ] Copies all the features of an existing style into the current one.
11417 \begin_layout Description
11418 \begin_inset Flex Code
11421 \begin_layout Plain Layout
11428 \begin_inset Flex Code
11431 \begin_layout Plain Layout
11437 ] The name of a style whose preamble should be output
11442 This allows to ensure some ordering of the preamble snippets when macros
11443 definitions depend on one another.
11447 \begin_layout Plain Layout
11448 Note that, besides that functionality, there is no way to ensure any ordering
11450 The ordering that you see in a given version of LyX may change without
11451 warning in later versions.
11459 \begin_layout Description
11460 \begin_inset Flex Code
11463 \begin_layout Plain Layout
11470 \begin_inset Flex Code
11473 \begin_layout Plain Layout
11478 , Box, Filled_Box, Static
11483 ] The type of label that stands at the end of the paragraph (or sequence
11485 \begin_inset Flex Code
11488 \begin_layout Plain Layout
11495 \begin_inset Newline newline
11499 \begin_inset Flex Code
11502 \begin_layout Plain Layout
11509 \begin_inset Flex Code
11512 \begin_layout Plain Layout
11519 \begin_inset Flex Code
11522 \begin_layout Plain Layout
11530 \begin_inset Flex Code
11533 \begin_layout Plain Layout
11540 \begin_inset Quotes eld
11544 \begin_inset Quotes erd
11548 \begin_inset Flex Code
11551 \begin_layout Plain Layout
11558 \begin_inset space \space{}
11562 \begin_inset Flex Code
11565 \begin_layout Plain Layout
11571 ) is a white (resp.
11572 \begin_inset space ~
11575 black) square suitable for end of proof markers,
11576 \begin_inset Flex Code
11579 \begin_layout Plain Layout
11585 is an explicit text string.
11588 \begin_layout Description
11589 \begin_inset Flex Code
11592 \begin_layout Plain Layout
11599 \begin_inset Flex Code
11602 \begin_layout Plain Layout
11608 ] The string used for a label with a
11609 \begin_inset Flex Code
11612 \begin_layout Plain Layout
11619 \begin_inset Newline newline
11623 \begin_inset Flex Code
11626 \begin_layout Plain Layout
11636 \begin_layout Description
11637 \begin_inset Flex Code
11640 \begin_layout Plain Layout
11646 The font used for both the text body
11652 \begin_inset CommandInset ref
11654 reference "sub:Font-description"
11659 Note that defining this font automatically defines the
11660 \begin_inset Flex Code
11663 \begin_layout Plain Layout
11670 So you should define this one first if you also want to define
11671 \begin_inset Flex Code
11674 \begin_layout Plain Layout
11681 \change_inserted -195340706 1364753581
11685 \begin_layout Description
11687 \change_inserted -195340706 1364753581
11688 \begin_inset Flex Code
11691 \begin_layout Plain Layout
11693 \change_inserted -195340706 1364753581
11704 \begin_inset Flex Code
11707 \begin_layout Plain Layout
11714 \change_inserted -195340706 1364753581
11715 Used for backporting new styles to stable LyX versions.
11716 The first stable version that supports this tag is LyX 2.1.0.
11720 \change_inserted -195340706 1364753581
11721 is a number which may either be 0, -1 or any value greater than zero.
11723 \begin_inset Flex Code
11726 \begin_layout Plain Layout
11728 \change_inserted -195340706 1364753581
11736 flag of a style is greater than zero, it will always be written to the
11738 If a .lyx file is read, the style definitions from the document header are
11739 added to the document class.
11740 Therefore even older versions can handle the style.
11742 \begin_inset Flex Code
11745 \begin_layout Plain Layout
11747 \change_inserted -195340706 1364753581
11755 is a version number: If such a style is read, and the version number is
11756 less than the version number of the already existing style in the document
11757 class, the new style is ignored.
11758 If the version number is higher, the new style replaces the existing style.
11759 A value of -1 means an infinite version number,
11762 \begin_inset space \thinspace{}
11766 \begin_inset space \space{}
11770 \change_inserted -195340706 1364753581
11776 \begin_layout Description
11777 \begin_inset Flex Code
11780 \begin_layout Plain Layout
11787 \begin_inset Flex Code
11790 \begin_layout Plain Layout
11799 \begin_inset space \thinspace{}
11803 \begin_inset Flex Code
11806 \begin_layout Plain Layout
11812 ] Usually LyX does not allow you to insert more than one space between words,
11813 since a space is considered as the separation between two words, not a
11814 character or symbol of its own.
11815 This is a very fine thing but sometimes annoying, for example, when typing
11816 program code or plain LaTeX code.
11818 \begin_inset Flex Code
11821 \begin_layout Plain Layout
11828 Note that LyX will create protected blanks for the additional blanks when
11829 in another mode than LaTeX-mode.
11832 \begin_layout Description
11833 \begin_inset Flex Code
11836 \begin_layout Plain Layout
11842 These tags are used with XHTML output.
11844 \begin_inset CommandInset ref
11846 reference "sub:Paragraph-Style-XHTML"
11853 \begin_layout Description
11854 \begin_inset Flex Code
11857 \begin_layout Plain Layout
11863 [FIXME] (Used only with XML-type formats.)
11866 \begin_layout Description
11867 \begin_inset Flex Code
11870 \begin_layout Plain Layout
11877 \begin_inset Flex Code
11880 \begin_layout Plain Layout
11889 \begin_inset space \thinspace{}
11893 \begin_inset Flex Code
11896 \begin_layout Plain Layout
11903 \begin_inset Flex Code
11906 \begin_layout Plain Layout
11912 , marks the style as to be included in the document preamble and not in
11914 This is useful for document classes that want such information as the title
11915 and author to appear in the preamble.
11916 Note that this works only for styles for which the
11917 \begin_inset Flex Code
11920 \begin_layout Plain Layout
11927 \begin_inset Flex Code
11930 \begin_layout Plain Layout
11937 \begin_inset Flex Code
11940 \begin_layout Plain Layout
11949 \begin_layout Description
11950 \begin_inset Flex Code
11953 \begin_layout Plain Layout
11960 \begin_inset Flex Code
11963 \begin_layout Plain Layout
11972 \begin_inset space \thinspace{}
11976 \begin_inset Flex Code
11979 \begin_layout Plain Layout
11986 \begin_inset Flex Code
11989 \begin_layout Plain Layout
11995 , marks the style as being part of a title block (see also the
11996 \begin_inset Flex Code
11999 \begin_layout Plain Layout
12006 \begin_inset Flex Code
12009 \begin_layout Plain Layout
12018 \begin_layout Description
12020 \change_inserted -712698321 1355932296
12021 \begin_inset Flex Code
12024 \begin_layout Plain Layout
12026 \change_inserted -712698321 1355932178
12033 \begin_inset Flex Code
12036 \begin_layout Plain Layout
12038 \change_inserted -712698321 1355932181
12044 ] The LaTeX command sequence declaring an item in a list.
12045 The command is to be defined without the preceding backslash (the default
12047 \begin_inset Quotes eld
12051 \begin_inset Quotes erd
12055 \begin_inset Flex Code
12058 \begin_layout Plain Layout
12060 \change_inserted -712698321 1355932279
12070 in the LaTeX output).
12073 \begin_layout Description
12074 \begin_inset Flex Code
12077 \begin_layout Plain Layout
12084 \begin_inset Flex Code
12087 \begin_layout Plain Layout
12093 ] This provides extra space between paragraphs that have the same style.
12094 If you put other styles into an environment, each is separated with the
12096 \begin_inset Flex Code
12099 \begin_layout Plain Layout
12106 But the whole items of the environment are additionally separated with
12108 \begin_inset Flex Code
12111 \begin_layout Plain Layout
12118 Note that this is a
12123 \begin_layout Description
12124 \begin_inset Flex Code
12127 \begin_layout Plain Layout
12133 [FIXME] (Used only with XML-type formats.)
12136 \begin_layout Description
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12147 \begin_inset Flex Code
12150 \begin_layout Plain Layout
12159 \begin_inset space \thinspace{}
12163 \begin_inset Flex Code
12166 \begin_layout Plain Layout
12172 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12173 lead to empty LaTeX output.
12174 There are some cases where this could be desirable however: in a letter
12175 template, the required fields can be provided as empty fields, so that
12176 people do not forget them; in some special classes, a style can be used
12177 as some kind of break, which does not contain actual text.
12180 \begin_layout Description
12181 \begin_inset Flex Code
12184 \begin_layout Plain Layout
12191 \begin_inset Flex Code
12194 \begin_layout Plain Layout
12200 ] The vertical space between the label and the text body.
12201 Only used for labels that are above the text body (
12202 \begin_inset Flex Code
12205 \begin_layout Plain Layout
12212 \begin_inset Newline newline
12216 \begin_inset Flex Code
12219 \begin_layout Plain Layout
12220 Centered_Top_Environment
12228 \begin_layout Description
12229 \begin_inset Flex Code
12232 \begin_layout Plain Layout
12239 \begin_inset Flex Code
12242 \begin_layout Plain Layout
12248 ] The name of the counter for automatic numbering.
12250 \change_inserted 1414654397 1360434581
12251 In order to have the counter appear with your label, you will need to reference
12252 it in the LabelString.
12253 This will work with
12254 \begin_inset Flex Code
12257 \begin_layout Plain Layout
12259 \change_inserted 1414654397 1360434565
12270 \change_inserted 1414654397 1360434581
12272 \begin_inset Flex Code
12275 \begin_layout Plain Layout
12277 \change_inserted 1414654397 1360434569
12286 \begin_inset Flex Code
12289 \begin_layout Plain Layout
12291 \change_inserted 1414654397 1360434574
12300 \begin_inset Flex Code
12303 \begin_layout Plain Layout
12305 \change_inserted 1414654397 1360434578
12316 \begin_inset Newline newline
12320 \change_deleted 1414654397 1360434393
12326 \begin_inset Flex Code
12329 \begin_layout Plain Layout
12336 \begin_inset Flex Code
12339 \begin_layout Plain Layout
12346 In that case, the counter will be stepped each time the style appears.
12347 \begin_inset Newline newline
12357 \begin_inset Flex Code
12360 \begin_layout Plain Layout
12367 \begin_inset Flex Code
12370 \begin_layout Plain Layout
12376 , though this case is a bit complicated.
12377 Suppose you declare
12378 \begin_inset Quotes eld
12382 \begin_inset Flex Code
12385 \begin_layout Plain Layout
12386 LabelCounter myenum
12392 \begin_inset Quotes erd
12396 Then the actual counters used are
12397 \begin_inset Flex Code
12400 \begin_layout Plain Layout
12407 \begin_inset Flex Code
12410 \begin_layout Plain Layout
12417 \begin_inset Flex Code
12420 \begin_layout Plain Layout
12427 \begin_inset Flex Code
12430 \begin_layout Plain Layout
12436 , much as in LaTeX.
12437 These counters must all be declared separately.
12438 \begin_inset Newline newline
12442 \begin_inset CommandInset ref
12444 reference "sub:Counters"
12448 for details on counters.
12451 \begin_layout Description
12452 \begin_inset Flex Code
12455 \begin_layout Plain Layout
12461 The font used for the label.
12463 \begin_inset CommandInset ref
12465 reference "sub:Font-description"
12472 \begin_layout Description
12473 \begin_inset Flex Code
12476 \begin_layout Plain Layout
12483 \begin_inset Flex Code
12486 \begin_layout Plain Layout
12492 ] Text that indicates how far a label should be indented.
12495 \begin_layout Description
12496 \begin_inset Flex Code
12499 \begin_layout Plain Layout
12506 \begin_inset Flex Code
12509 \begin_layout Plain Layout
12515 ] Text that indicates the amount of horizontal space between the label and
12517 Only used for labels that are not above the text body.
12520 \begin_layout Description
12521 \begin_inset Flex Code
12524 \begin_layout Plain Layout
12531 \begin_inset Flex Code
12534 \begin_layout Plain Layout
12540 ] The string used for the label.
12542 \begin_inset Flex Code
12545 \begin_layout Plain Layout
12551 is set, this string can be contain the special formatting commands described
12553 \begin_inset CommandInset ref
12555 reference "sub:Counters"
12562 \begin_layout Description
12563 \begin_inset Flex Code
12566 \begin_layout Plain Layout
12567 LabelStringAppendix
12573 \begin_inset Flex Code
12576 \begin_layout Plain Layout
12582 ] This is used inside the appendix instead of
12583 \begin_inset Newline newline
12587 \begin_inset Flex Code
12590 \begin_layout Plain Layout
12598 \begin_inset Flex Code
12601 \begin_layout Plain Layout
12608 \begin_inset Newline newline
12612 \begin_inset Flex Code
12615 \begin_layout Plain Layout
12616 LabelStringAppendix
12624 \begin_layout Description
12625 \begin_inset Flex Code
12628 \begin_layout Plain Layout
12634 [FIXME] (Used only with XML-type formats.)
12637 \begin_layout Description
12638 \begin_inset Flex Code
12641 \begin_layout Plain Layout
12648 \begin_inset Flex Code
12651 \begin_layout Plain Layout
12657 \change_inserted 1414654397 1360434611
12659 \change_deleted 1414654397 1360434612
12663 \begin_inset Newline newline
12667 \change_inserted 1414654397 1360434627
12669 \change_deleted 1414654397 1360434623
12670 _Top_Environment, Counter,
12672 Sensitive, Enumerate,
12673 \begin_inset Newline newline
12676 Itemize, Bibliography
12685 \begin_layout Description
12686 \begin_inset Flex Code
12689 \begin_layout Plain Layout
12695 means the label is the very first word (up to the first real blank).
12696 Use protected spaces if you want more than one word as the label.
12700 \begin_layout Description
12701 \begin_inset Flex Code
12704 \begin_layout Plain Layout
12710 means the label is simply what is declared as
12711 \begin_inset Flex Code
12714 \begin_layout Plain Layout
12722 \change_deleted 1414654397 1360434660
12723 Note that this really is `static'.
12725 \change_inserted 1414654397 1360434794
12726 This will be displayed
12727 \begin_inset Quotes eld
12731 \begin_inset Quotes erd
12734 , at the beginning of the paragraph.
12736 \begin_inset Flex Code
12739 \begin_layout Plain Layout
12741 \change_inserted 1414654397 1360434743
12750 \begin_inset Flex Code
12753 \begin_layout Plain Layout
12755 \change_inserted 1414654397 1360434747
12763 , then it will be displayed only in the first paragraph in any sequence
12764 of paragraphs with the same
12765 \begin_inset Flex Code
12768 \begin_layout Plain Layout
12770 \change_inserted 1414654397 1360434794
12783 \begin_layout Description
12784 \begin_inset Flex Code
12787 \begin_layout Plain Layout
12789 \change_deleted 1414654397 1360434641
12791 \change_inserted 1414654397 1360434643
12800 \begin_inset space ~
12804 \begin_inset space ~
12808 \begin_inset Flex Code
12811 \begin_layout Plain Layout
12813 \change_deleted 1414654397 1360434649
12821 are special cases of
12822 \begin_inset Flex Code
12825 \begin_layout Plain Layout
12832 The label will be printed above the paragraph
12833 \change_inserted 1414654397 1360434839
12834 either at the beginning of the line or centered
12835 \change_deleted 1414654397 1360434813
12836 , but only at the top of an environment or the top of a chain of paragraphs
12838 This might be used with the
12839 \begin_inset Flex MenuItem
12842 \begin_layout Plain Layout
12853 \begin_layout Description
12854 \begin_inset Flex Code
12857 \begin_layout Plain Layout
12863 is a special case for the caption-labels
12864 \begin_inset Quotes eld
12868 \begin_inset Quotes erd
12872 \begin_inset Quotes eld
12876 \begin_inset Quotes erd
12880 \begin_inset Newline newline
12884 \begin_inset Flex Code
12887 \begin_layout Plain Layout
12893 means the (hardcoded) label string depends on the kind of float: It is
12894 hardcoded to be `FloatType N', where N is the value of the counter associated
12896 For the case that a caption is inserted outside of a float
12897 \change_inserted 1414654397 1360434861
12901 \begin_inset Flex Code
12904 \begin_layout Plain Layout
12911 \change_inserted 1414654397 1360434866
12913 \change_deleted 1414654397 1360434868
12914 should be set to e.
12915 \begin_inset space \thinspace{}
12919 \begin_inset space \space{}
12925 \begin_inset Quotes eld
12929 \begin_inset Quotes erd
12935 \begin_layout Description
12937 \change_deleted 1414654397 1360434875
12938 \begin_inset Flex Code
12941 \begin_layout Plain Layout
12947 defines automatically numbered labels.
12949 \begin_inset Flex Code
12952 \begin_layout Plain Layout
12958 will be expanded to contain any counters: So the result will for example
12960 \begin_inset Quotes eld
12964 \begin_inset Flex Code
12967 \begin_layout Plain Layout
12978 \begin_inset Quotes erd
12983 \begin_inset space ~
12987 \begin_inset CommandInset ref
12989 reference "sub:Counters"
12993 for more information on counters.
12996 \begin_layout Description
12997 \begin_inset Flex Code
13000 \begin_layout Plain Layout
13006 produces the usual sort of enumeration labels.
13007 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13008 small Roman numerals, and uppercase letters for the four possible depths.
13011 \begin_layout Description
13012 \begin_inset Flex Code
13015 \begin_layout Plain Layout
13021 produces various bullets at the different levels.
13022 It is also hardcoded.
13025 \begin_layout Description
13026 \begin_inset Flex Code
13029 \begin_layout Plain Layout
13036 \change_deleted 1414654397 1360434898
13037 is used internally by LyX and
13039 should be used only with
13040 \begin_inset Flex Code
13043 \begin_layout Plain Layout
13044 LatexType BibEnvironment
13053 \begin_layout Description
13054 \begin_inset Flex Code
13057 \begin_layout Plain Layout
13063 Note that this will completely override any prior
13064 \begin_inset Flex Code
13067 \begin_layout Plain Layout
13073 declaration for this style.
13075 \begin_inset Quotes eld
13079 \begin_inset Flex Code
13082 \begin_layout Plain Layout
13089 \begin_inset Quotes erd
13094 \begin_inset CommandInset ref
13096 reference "sub:I18n"
13100 for details on its use.
13103 \begin_layout Description
13104 \begin_inset Flex Code
13107 \begin_layout Plain Layout
13114 \begin_inset Flex Code
13117 \begin_layout Plain Layout
13123 ] The name of the corresponding LaTeX stuff.
13124 Either the environment or command name.
13127 \begin_layout Description
13128 \begin_inset Flex Code
13131 \begin_layout Plain Layout
13138 \begin_inset Flex Code
13141 \begin_layout Plain Layout
13147 ] An optional parameter for the corresponding
13148 \begin_inset Flex Code
13151 \begin_layout Plain Layout
13158 This parameter cannot be changed from within LyX
13159 \change_inserted -712698321 1355144804
13161 \begin_inset Flex Code
13164 \begin_layout Plain Layout
13166 \change_inserted -712698321 1355144804
13174 for customizable parameters)
13178 \change_inserted -712698321 1355144804
13179 This will be output as is after all LaTeX
13180 \begin_inset Flex Code
13183 \begin_layout Plain Layout
13185 \change_inserted -712698321 1355144658
13198 \begin_layout Description
13199 \begin_inset Flex Code
13202 \begin_layout Plain Layout
13209 \begin_inset Flex Code
13212 \begin_layout Plain Layout
13217 , Command, Environment, Item_Environment,
13218 \begin_inset Newline newline
13221 List_Environment, Bib_Environment
13226 ] How the style should be translated into LaTeX.
13230 \begin_layout Plain Layout
13231 \begin_inset Flex Code
13234 \begin_layout Plain Layout
13240 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13241 Visit the SGML class files for specific examples.
13250 \begin_layout Description
13251 \begin_inset Flex Code
13254 \begin_layout Plain Layout
13260 means nothing special.
13263 \begin_layout Description
13264 \begin_inset Flex Code
13267 \begin_layout Plain Layout
13274 \begin_inset Flex Code
13277 \begin_layout Plain Layout
13284 {\SpecialChar \ldots{}
13293 \begin_layout Description
13294 \begin_inset Flex Code
13297 \begin_layout Plain Layout
13304 \begin_inset Flex Code
13307 \begin_layout Plain Layout
13314 }\SpecialChar \ldots{}
13330 \begin_layout Description
13331 \begin_inset Flex Code
13334 \begin_layout Plain Layout
13341 \begin_inset Flex Code
13344 \begin_layout Plain Layout
13351 \begin_inset Flex Code
13354 \begin_layout Plain Layout
13362 is generated for each paragraph of this environment.
13366 \begin_layout Description
13367 \begin_inset Flex Code
13370 \begin_layout Plain Layout
13377 \begin_inset Flex Code
13380 \begin_layout Plain Layout
13387 \begin_inset Newline newline
13391 \begin_inset Flex Code
13394 \begin_layout Plain Layout
13400 is passed as an argument to the environment.
13401 \begin_inset Newline newline
13405 \begin_inset Flex Code
13408 \begin_layout Plain Layout
13414 can be defined in the
13415 \begin_inset Flex MenuItem
13418 \begin_layout Plain Layout
13419 Edit\SpecialChar \menuseparator
13421 \begin_inset space ~
13432 \begin_layout Description
13433 \begin_inset Flex Code
13436 \begin_layout Plain Layout
13443 \begin_inset Flex Code
13446 \begin_layout Plain Layout
13452 but adds additionally the necessary mandatory argument (the longest label)
13453 to the begin statement of the bibliography environment:
13454 \begin_inset Newline newline
13458 \begin_inset Flex Code
13461 \begin_layout Plain Layout
13464 begin{thebibliography}{99}
13469 It is therefore only useful for bibliography environments.
13470 The default longest label
13471 \begin_inset Quotes eld
13475 \begin_inset Quotes erd
13478 can be changed by the user in the paragraph settings of a bibliography
13482 \begin_layout Standard
13483 Putting the last few things together, the LaTeX output will be either:
13486 \begin_layout LyX-Code
13489 LatexName[LatexParam]{\SpecialChar \ldots{}
13493 \begin_layout Standard
13497 \begin_layout LyX-Code
13500 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13506 \begin_layout Standard
13507 depending upon the LaTeX type.
13511 \begin_layout Description
13513 \change_inserted -712698321 1354263086
13514 \begin_inset Flex Code
13517 \begin_layout Plain Layout
13519 \change_inserted -712698321 1353866852
13528 \begin_inset Flex Code
13531 \begin_layout Plain Layout
13533 \change_inserted -712698321 1353866852
13541 ] A string that is put at the beginning of the style content.
13542 A line break in the output can be indicated by
13543 \begin_inset Flex Code
13546 \begin_layout Plain Layout
13548 \change_inserted -712698321 1354263086
13561 \begin_layout Description
13562 \begin_inset Flex Code
13565 \begin_layout Plain Layout
13572 \begin_inset Flex Code
13575 \begin_layout Plain Layout
13581 ] If you put styles into environments, the different
13582 \begin_inset Flex Code
13585 \begin_layout Plain Layout
13591 are not simply added, but added with a factor
13592 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13596 Note that this parameter is also used when
13597 \begin_inset Flex Code
13600 \begin_layout Plain Layout
13607 \begin_inset Flex Code
13610 \begin_layout Plain Layout
13617 \begin_inset Flex Code
13620 \begin_layout Plain Layout
13627 Then it is added to the manual or dynamic margin.
13628 \begin_inset Newline newline
13632 \begin_inset Quotes eld
13636 \begin_inset Flex Code
13639 \begin_layout Plain Layout
13646 \begin_inset Quotes erd
13649 means that the paragraph is indented with the width of
13650 \begin_inset Quotes eld
13654 \begin_inset Flex Code
13657 \begin_layout Plain Layout
13664 \begin_inset Quotes erd
13667 in the normal font.
13668 You can get a negative width by prefixing the string with
13669 \begin_inset Quotes eld
13673 \begin_inset Flex Code
13676 \begin_layout Plain Layout
13683 \begin_inset Quotes erd
13687 This way was chosen so that the look is the same with each used screen
13691 \begin_layout Description
13692 \begin_inset Flex Code
13695 \begin_layout Plain Layout
13702 \begin_inset Flex Code
13705 \begin_layout Plain Layout
13710 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13716 \begin_inset Newline newline
13719 The kind of margin that the style has on the left side.
13723 \begin_layout Description
13724 \begin_inset Flex Code
13727 \begin_layout Plain Layout
13733 just means a fixed margin.
13736 \begin_layout Description
13737 \begin_inset Flex Code
13740 \begin_layout Plain Layout
13746 means that the left margin depends on the string entered in the
13747 \begin_inset Flex MenuItem
13750 \begin_layout Plain Layout
13751 Edit\SpecialChar \menuseparator
13753 \begin_inset space ~
13762 This is used to typeset nice lists without tabulators.
13765 \begin_layout Description
13766 \begin_inset Flex Code
13769 \begin_layout Plain Layout
13775 means that the margin depends on the size of the label.
13776 This is used for automatic enumerated headlines.
13777 It is obvious that the headline
13778 \begin_inset Quotes eld
13781 5.4.3.2.1 Very long headline
13782 \begin_inset Quotes erd
13785 must have a wider left margin (as wide as
13786 \begin_inset Quotes eld
13790 \begin_inset Quotes erd
13793 plus the space) than
13794 \begin_inset Quotes eld
13797 3.2 Very long headline
13798 \begin_inset Quotes erd
13802 \begin_inset Quotes eld
13806 \begin_inset Quotes erd
13809 are not able to do this.
13812 \begin_layout Description
13813 \begin_inset Flex Code
13816 \begin_layout Plain Layout
13822 is similar, but only the very first row of the paragraph is dynamic, while
13823 the others are static; this is used, for example, for descriptions.
13826 \begin_layout Description
13827 \begin_inset Flex Code
13830 \begin_layout Plain Layout
13836 means the margin is chosen in a way that the longest row of this paragraph
13837 fits to the right margin.
13838 This is used to typeset an address on the right edge of the page.
13842 \begin_layout Description
13843 \begin_inset Flex Code
13846 \begin_layout Plain Layout
13853 \begin_inset Flex Code
13856 \begin_layout Plain Layout
13865 \begin_inset space \thinspace{}
13869 \begin_inset Flex Code
13872 \begin_layout Plain Layout
13878 ] Whether fragile commands in this style should be
13879 \begin_inset Flex Code
13882 \begin_layout Plain Layout
13895 whether this command should itself be protected.)
13898 \begin_layout Description
13899 \begin_inset Flex Code
13902 \begin_layout Plain Layout
13909 \begin_inset Flex Code
13912 \begin_layout Plain Layout
13919 \begin_inset space \thinspace{}
13923 \begin_inset Flex Code
13926 \begin_layout Plain Layout
13934 ] Whether newlines are translated into LaTeX newlines (
13935 \begin_inset Flex Code
13938 \begin_layout Plain Layout
13949 The translation can be switched off to allow more comfortable LaTeX editing
13953 \begin_layout Description
13954 \begin_inset Flex Code
13957 \begin_layout Plain Layout
13964 \begin_inset Flex Code
13967 \begin_layout Plain Layout
13976 \begin_inset space \thinspace{}
13980 \begin_inset Flex Code
13983 \begin_layout Plain Layout
13989 ] If set to true, and if
13990 \begin_inset Flex Code
13993 \begin_layout Plain Layout
14000 \begin_inset Flex Code
14003 \begin_layout Plain Layout
14009 ) paragraphs are being indented, then the indentation of such a paragraph
14010 following one of this type will be suppressed.
14011 (So this will not affect the display of non-default paragraphs.)
14014 \begin_layout Description
14015 \begin_inset Flex Code
14018 \begin_layout Plain Layout
14025 \begin_inset Flex Code
14028 \begin_layout Plain Layout
14034 ] Name of a style that has replaced this style.
14035 This is used to rename a style, while keeping backward compatibility.
14038 \begin_layout Description
14040 \change_deleted -712698321 1353679722
14041 \begin_inset Flex Code
14044 \begin_layout Plain Layout
14051 \begin_inset Flex Code
14054 \begin_layout Plain Layout
14060 ] The number of optional arguments that can be used with this style.
14061 This is useful for things like section headings, and only makes sense with
14063 Note that, on output, the optional arguments will all precede any required
14064 arguments (see below).
14065 So one can have constructs like:
14069 \begin_layout LyX-Code
14071 \change_deleted -712698321 1353679722
14074 mycmd[opt1]{req1}{contents of paragraph}
14077 \begin_layout Standard
14079 \change_deleted -712698321 1353679722
14080 but one cannot have things like:
14083 \begin_layout LyX-Code
14085 \change_deleted -712698321 1353679722
14088 mycmd[opt1]{req1}[opt2]{contents of paragraph}
14091 \begin_layout Standard
14093 \change_deleted -712698321 1353679722
14094 at least, not without ERT (with which you can have anything).
14101 \begin_layout Description
14102 \begin_inset Flex Code
14105 \begin_layout Plain Layout
14112 \begin_inset Flex Code
14115 \begin_layout Plain Layout
14124 \begin_inset space \thinspace{}
14128 \begin_inset Flex Code
14131 \begin_layout Plain Layout
14137 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
14138 output, but only by a line break; together with
14139 \begin_inset Flex Code
14142 \begin_layout Plain Layout
14148 , this allows to emulate a plain text editor (like the ERT inset).
14151 \begin_layout Description
14152 \begin_inset Flex Code
14155 \begin_layout Plain Layout
14162 \begin_inset Flex Code
14165 \begin_layout Plain Layout
14171 ] The indent of the very first line of a paragraph.
14173 \begin_inset Newline newline
14177 \begin_inset Flex Code
14180 \begin_layout Plain Layout
14186 will be fixed for a certain style.
14187 The exception is the default style, since the indentation for these paragraphs
14188 can be prohibited with
14189 \begin_inset Flex Code
14192 \begin_layout Plain Layout
14200 \begin_inset Flex Code
14203 \begin_layout Plain Layout
14209 style paragraphs inside environments use the
14210 \begin_inset Flex Code
14213 \begin_layout Plain Layout
14219 of the environment, not their native one.
14221 \begin_inset Flex Code
14224 \begin_layout Plain Layout
14230 paragraphs inside an enumeration are not indented.
14233 \begin_layout Description
14234 \begin_inset Flex Code
14237 \begin_layout Plain Layout
14244 \begin_inset Flex Code
14247 \begin_layout Plain Layout
14253 ] The vertical space between two paragraphs of this style.
14256 \begin_layout Description
14257 \begin_inset Flex Code
14260 \begin_layout Plain Layout
14267 \begin_inset Flex Code
14270 \begin_layout Plain Layout
14276 ] LyX allows the user to choose either
14277 \begin_inset Quotes eld
14281 \begin_inset Quotes erd
14285 \begin_inset Quotes eld
14289 \begin_inset Quotes erd
14292 to separate paragraphs.
14294 \begin_inset Quotes eld
14298 \begin_inset Quotes erd
14302 \begin_inset Flex Code
14305 \begin_layout Plain Layout
14313 \begin_inset Quotes eld
14317 \begin_inset Quotes erd
14321 \begin_inset Flex Code
14324 \begin_layout Plain Layout
14330 is ignored and all paragraphs are separated by the
14331 \begin_inset Flex Code
14334 \begin_layout Plain Layout
14341 The vertical space is calculated with
14342 \begin_inset Flex Code
14345 \begin_layout Plain Layout
14347 \begin_inset space ~
14356 \begin_inset Flex Code
14359 \begin_layout Plain Layout
14365 is the height of a row with the normal font.
14366 This way, the look stays the same with different screen fonts.
14369 \begin_layout Description
14370 \begin_inset Flex Code
14373 \begin_layout Plain Layout
14380 \begin_inset Flex Code
14383 \begin_layout Plain Layout
14392 \begin_inset space \thinspace{}
14396 \begin_inset Flex Code
14399 \begin_layout Plain Layout
14405 ] Whether the contents of this paragraph should be output in raw form, meaning
14406 without special translations that LaTeX would require.
14409 \begin_layout Description
14410 \begin_inset Flex Code
14413 \begin_layout Plain Layout
14419 Information to be included in the LaTeX preamble when this style is used.
14420 Used to define macros, load packages, etc., required by this particular
14423 \begin_inset Quotes eld
14427 \begin_inset Flex Code
14430 \begin_layout Plain Layout
14437 \begin_inset Quotes erd
14443 \begin_layout Description
14444 \begin_inset Flex Code
14447 \begin_layout Plain Layout
14454 \begin_inset Flex Code
14457 \begin_layout Plain Layout
14463 ] The prefix to use when creating labels referring to paragraphs of this
14465 This allows the use of formatted references.
14468 \begin_layout Description
14470 \change_deleted -712698321 1353681258
14471 \begin_inset Flex Code
14474 \begin_layout Plain Layout
14481 \begin_inset Flex Code
14484 \begin_layout Plain Layout
14490 ] The number of required arguments that the LaTeX command or environment
14491 corresponding to this style expects.
14492 In the case of a command, these are required arguments
14496 that associated with the content of the paragraph itself.
14497 These do not actually have to be provided: LyX will output empty arguments
14499 Note that optional arguments will be output before required arguments.
14500 See the discussion of the
14501 \begin_inset Flex Code
14504 \begin_layout Plain Layout
14510 tag above for more information.
14515 \begin_layout Description
14516 \begin_inset Flex Code
14519 \begin_layout Plain Layout
14526 \begin_inset Flex Code
14529 \begin_layout Plain Layout
14535 ] Whether the style requires the feature
14536 \begin_inset Flex Code
14539 \begin_layout Plain Layout
14546 See the description of
14547 \begin_inset Flex Code
14550 \begin_layout Plain Layout
14557 \begin_inset CommandInset ref
14559 reference "sub:General-text-class"
14563 ) for information on `features'.
14566 \begin_layout Description
14568 \change_inserted -712698321 1353693371
14569 \begin_inset Flex Code
14572 \begin_layout Plain Layout
14574 \change_inserted -712698321 1353693146
14583 \begin_inset Flex Code
14586 \begin_layout Plain Layout
14588 \change_inserted -712698321 1353693235
14599 \begin_inset Flex Code
14602 \begin_layout Plain Layout
14604 \change_inserted -712698321 1353693235
14612 ] Resets the LaTeX arguments of this style (as defined via the
14613 \begin_inset Flex Code
14616 \begin_layout Plain Layout
14618 \change_inserted -712698321 1353693371
14627 This is useful if you have copied a style via
14628 \begin_inset Flex Code
14631 \begin_layout Plain Layout
14633 \change_inserted -712698321 1353693302
14641 , but you do not want to inherit its (required and optional) arguments.
14646 \begin_layout Description
14648 \change_inserted -712698321 1354263074
14649 \begin_inset Flex Code
14652 \begin_layout Plain Layout
14654 \change_inserted -712698321 1353866876
14663 \begin_inset Flex Code
14666 \begin_layout Plain Layout
14668 \change_inserted -712698321 1353866873
14676 ] A string that is put at the end of the layout content.
14677 A line break in the output can be indicated by
14678 \begin_inset Flex Code
14681 \begin_layout Plain Layout
14683 \change_inserted -712698321 1354263069
14694 \begin_layout Description
14695 \begin_inset Flex Code
14698 \begin_layout Plain Layout
14705 \begin_inset Flex Code
14708 \begin_layout Plain Layout
14715 \begin_inset Flex Code
14718 \begin_layout Plain Layout
14727 \begin_layout Description
14728 \begin_inset Flex Code
14731 \begin_layout Plain Layout
14738 \begin_inset Flex Code
14741 \begin_layout Plain Layout
14750 \begin_inset Flex Code
14753 \begin_layout Plain Layout
14760 \begin_inset Flex Code
14763 \begin_layout Plain Layout
14770 \begin_inset Flex Code
14773 \begin_layout Plain Layout
14775 \begin_inset space ~
14783 ] This defines what the default spacing should be in the style.
14785 \begin_inset Flex Code
14788 \begin_layout Plain Layout
14795 \begin_inset Flex Code
14798 \begin_layout Plain Layout
14805 \begin_inset Flex Code
14808 \begin_layout Plain Layout
14814 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14815 If you specify the argument
14816 \begin_inset Flex Code
14819 \begin_layout Plain Layout
14825 , then you must also provide a value argument which will be the actual multiplie
14827 Note that, contrary to other parameters,
14828 \begin_inset Flex Code
14831 \begin_layout Plain Layout
14837 implies the generation of specific LaTeX code, using the LaTeX package
14841 \begin_inset Flex Code
14844 \begin_layout Plain Layout
14853 \begin_layout Description
14854 \begin_inset Flex Code
14857 \begin_layout Plain Layout
14864 \begin_inset Flex Code
14867 \begin_layout Plain Layout
14874 \begin_inset space \thinspace{}
14878 \begin_inset Flex Code
14881 \begin_layout Plain Layout
14889 ] Allow spell-checking paragraphs of this style.
14893 \begin_layout Description
14894 \begin_inset Flex Code
14897 \begin_layout Plain Layout
14903 The font used for the text body .
14905 \begin_inset CommandInset ref
14907 reference "sub:Font-description"
14914 \begin_layout Description
14915 \begin_inset Flex Code
14918 \begin_layout Plain Layout
14927 \begin_inset Flex Code
14930 \begin_layout Plain Layout
14940 The level of the style in the table of contents.
14941 This is used for automatic numbering of section headings.
14944 \begin_layout Description
14945 \begin_inset Flex Code
14948 \begin_layout Plain Layout
14955 \begin_inset Flex Code
14958 \begin_layout Plain Layout
14964 ] The vertical space with which the very first of a chain of paragraphs
14965 with this style is separated from the previous paragraph.
14966 If the previous paragraph has another style, the separations are not simply
14967 added, but the maximum is taken.
14970 \begin_layout Subsection
14971 \begin_inset CommandInset label
14977 Internationalization of Paragraph Styles
14980 \begin_layout Standard
14981 LyX has long supported internationalization of layout information, but,
14982 until version 2.0, this applied only to the user interface and not to, say,
14984 Thus, French authors were forced to resort to ugly hacks if they wanted
14989 1' instead of `Theorem 1'.
14990 Thanks to Georg Baum, that is no longer the case.
14993 \begin_layout Standard
14995 \begin_inset Flex Code
14998 \begin_layout Plain Layout
15004 defines text that is to appear in the typeset document, it may use
15005 \begin_inset Flex Code
15008 \begin_layout Plain Layout
15015 \begin_inset Flex Code
15018 \begin_layout Plain Layout
15024 to support non-English and even multi-language documents correctly.
15025 The following excerpt (from the
15026 \begin_inset Flex Code
15029 \begin_layout Plain Layout
15035 file) shows how this works:
15038 \begin_layout LyX-Code
15043 \begin_layout LyX-Code
15046 theoremstyle{remark}
15049 \begin_layout LyX-Code
15052 newtheorem{claim}[thm]{
15059 \begin_layout LyX-Code
15063 \begin_layout LyX-Code
15067 \begin_layout LyX-Code
15072 claimname}{_(Claim)}
15075 \begin_layout LyX-Code
15079 \begin_layout LyX-Code
15083 \begin_layout LyX-Code
15092 claimname}{_(Claim)}}
15095 \begin_layout LyX-Code
15100 \begin_layout Standard
15101 In principle, any legal LaTeX may appear in the
15102 \begin_inset Flex Code
15105 \begin_layout Plain Layout
15112 \begin_inset Flex Code
15115 \begin_layout Plain Layout
15121 tags, but in practice they will typically look as they do here.
15122 The key to correct translation of the typeset text is the definition of
15124 \begin_inset Flex Code
15127 \begin_layout Plain Layout
15136 \begin_inset Flex Code
15139 \begin_layout Plain Layout
15151 \begin_layout Standard
15153 \begin_inset Flex Code
15156 \begin_layout Plain Layout
15162 tag provides for internationalization based upon the overall language of
15164 The contents of the tag will be included in the preamble, just as with
15166 \begin_inset Flex Code
15169 \begin_layout Plain Layout
15176 What makes it special is the use of the
15177 \begin_inset Quotes eld
15181 \begin_inset Quotes erd
15185 \begin_inset Flex Code
15188 \begin_layout Plain Layout
15194 , which will be replaced, when LyX produces LaTeX output, with the translation
15195 of its argument into the document language.
15198 \begin_layout Standard
15200 \begin_inset Flex Code
15203 \begin_layout Plain Layout
15209 tag is more complex, since it is meant to provide support for multi-language
15210 documents and so offers an interface to the
15211 \begin_inset Flex Code
15214 \begin_layout Plain Layout
15221 Its contents will be added to the preamble once for each language that
15222 appears in the document.
15223 In this case, the argument to
15224 \begin_inset Flex Code
15227 \begin_layout Plain Layout
15233 will be replaced with its translation into the language in question; the
15235 \begin_inset Flex Code
15238 \begin_layout Plain Layout
15244 is replaced by the language name (as used by the babel package).
15247 \begin_layout Standard
15248 A German document that also included a French section would thus have the
15249 following in the preamble:
15252 \begin_layout LyX-Code
15261 claimname}{Affirmation}}
15262 \begin_inset Newline newline
15273 claimname}{Behauptung}}
15274 \begin_inset Newline newline
15281 claimname}{Behauptung}
15284 \begin_layout Standard
15286 \begin_inset Flex Code
15289 \begin_layout Plain Layout
15295 will then conspire to produce the correct text in the output.
15298 \begin_layout Standard
15299 One important point to note here is that the translations are provided by
15300 LyX itself, through the
15301 \change_inserted -195340706 1334775793
15303 \begin_inset Flex Code
15306 \begin_layout Plain Layout
15308 \change_inserted -195340706 1334775793
15315 \change_deleted -195340706 1334775793
15316 same mechanism it uses for internationalization of the user interface
15319 This means, in effect, that
15320 \begin_inset Flex Code
15323 \begin_layout Plain Layout
15330 \begin_inset Flex Code
15333 \begin_layout Plain Layout
15339 are really only of use in layout files that are provided with LyX, since
15340 text entered in user-created layout files will not be seen by LyX's internation
15342 \change_inserted -195340706 1334775793
15344 \begin_inset Flex Code
15347 \begin_layout Plain Layout
15349 \change_inserted -195340706 1334775793
15355 file is modified accordingly
15358 That said, however, any layout created with the intention that it will
15359 be included with LyX should use these tags where appropriate.
15361 \change_inserted -195340706 1334775793
15362 Please note that the paragraph style translations provided by LyX will
15363 never change with a minor update (e.g.
15364 from version 2.1.x to 2.1.y).
15365 It is however quite likely that a major update (e.g.
15366 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15371 \begin_layout Subsection
15373 \begin_inset CommandInset label
15382 \begin_layout Standard
15383 It is necessary to define the floats (
15384 \begin_inset Flex MenuItem
15387 \begin_layout Plain Layout
15394 \begin_inset Flex MenuItem
15397 \begin_layout Plain Layout
15403 , \SpecialChar \ldots{}
15404 ) in the text class itself.
15405 Standard floats are included in the file
15406 \begin_inset Flex Code
15409 \begin_layout Plain Layout
15415 , so you may have to do no more than add
15418 \begin_layout LyX-Code
15419 Input stdfloats.inc
15422 \begin_layout Standard
15423 to your layout file.
15424 If you want to implement a text class that proposes some other float types
15425 (like the AGU class bundled with LyX), the information below will hopefully
15429 \begin_layout Description
15430 \begin_inset Flex Code
15433 \begin_layout Plain Layout
15440 \begin_inset Flex Code
15443 \begin_layout Plain Layout
15450 \begin_inset Quotes erd
15454 \begin_inset Quotes erd
15457 ] The file name extension of an auxiliary file for the list of figures (or
15459 LaTeX writes the captions to this file.
15462 \begin_layout Description
15463 \begin_inset Flex Code
15466 \begin_layout Plain Layout
15473 \begin_inset Flex Code
15476 \begin_layout Plain Layout
15483 \begin_inset Quotes erd
15487 \begin_inset Quotes erd
15490 ] The string that will be used in the menus and also for the caption.
15491 This is translated to the current language if babel is used.
15494 \begin_layout Description
15495 \begin_inset Flex Code
15498 \begin_layout Plain Layout
15504 These tags control the XHTML output.
15506 \begin_inset CommandInset ref
15508 reference "sec:Tags-for-XHTML"
15515 \begin_layout Description
15516 \begin_inset Flex Code
15519 \begin_layout Plain Layout
15528 \begin_inset Flex Code
15531 \begin_layout Plain Layout
15540 \begin_inset space \thinspace{}
15544 \begin_inset Flex Code
15547 \begin_layout Plain Layout
15553 ] Indicates whether the float is already defined in the document class or
15554 if instead the LaTeX package
15555 \begin_inset Flex Code
15558 \begin_layout Plain Layout
15564 needs to be loaded to define it on-the-fly.
15566 \begin_inset Flex Code
15569 \begin_layout Plain Layout
15576 \begin_inset Flex Code
15579 \begin_layout Plain Layout
15586 It should be set to
15587 \begin_inset Flex Code
15590 \begin_layout Plain Layout
15596 if the float is already defined by the LaTeX document class.
15599 \begin_layout Description
15600 \begin_inset Flex Code
15603 \begin_layout Plain Layout
15610 \begin_inset Flex Code
15613 \begin_layout Plain Layout
15620 \begin_inset Quotes erd
15624 \begin_inset Quotes erd
15627 ] The command used to generate a list of floats of this type; the leading
15636 \begin_inset Flex Code
15639 \begin_layout Plain Layout
15645 is false, since there is no standard way to generate this command.
15647 \begin_inset Flex Code
15650 \begin_layout Plain Layout
15656 is true, since in that case there is a standard way to define the command.
15659 \begin_layout Description
15660 \begin_inset Flex Code
15663 \begin_layout Plain Layout
15670 \begin_inset Flex Code
15673 \begin_layout Plain Layout
15680 \begin_inset Quotes erd
15684 \begin_inset Quotes erd
15687 ] A title for a list of floats of this kind (list of figures, tables, or
15689 It is used for the screen label within LyX, it is used by LaTeX for the
15690 title and it is used as the title in the XHTML output.
15691 It will be translated to the document language.
15694 \begin_layout Description
15695 \begin_inset Flex Code
15698 \begin_layout Plain Layout
15705 \begin_inset Flex Code
15708 \begin_layout Plain Layout
15715 \begin_inset Quotes erd
15719 \begin_inset Quotes erd
15722 ] This (optional) argument determines whether floats of this class will
15723 be numbered within some sectional unit of the document.
15725 \begin_inset Flex Code
15728 \begin_layout Plain Layout
15735 \begin_inset Quotes eld
15739 \begin_inset Flex Code
15742 \begin_layout Plain Layout
15749 \begin_inset Quotes erd
15752 , the floats will be numbered within chapters.
15756 \begin_layout Description
15757 \begin_inset Flex Code
15760 \begin_layout Plain Layout
15767 \begin_inset Flex Code
15770 \begin_layout Plain Layout
15777 \begin_inset Quotes erd
15781 \begin_inset Quotes erd
15784 ] The default placement for the given class of floats.
15785 The string should be as in standard LaTeX:
15786 \begin_inset Flex Code
15789 \begin_layout Plain Layout
15796 \begin_inset Flex Code
15799 \begin_layout Plain Layout
15806 \begin_inset Flex Code
15809 \begin_layout Plain Layout
15816 \begin_inset Flex Code
15819 \begin_layout Plain Layout
15825 for top, bottom, page, and here, respectively.
15829 \begin_layout Plain Layout
15830 Note that the order of these letters in the string is irrelevant, like in
15836 On top of that there is a new type,
15837 \begin_inset Flex Code
15840 \begin_layout Plain Layout
15846 , which does not really correspond to a float, since it means: put it
15847 \begin_inset Quotes eld
15851 \begin_inset Quotes erd
15855 Note however that the
15856 \begin_inset Flex Code
15859 \begin_layout Plain Layout
15865 specifier is special and, because of implementation details, cannot be
15866 used in non-built in float types.
15867 If you do not understand what this means, just use
15868 \begin_inset Quotes eld
15872 \begin_inset Flex Code
15875 \begin_layout Plain Layout
15882 \begin_inset Quotes erd
15888 \begin_layout Description
15889 \begin_inset Flex Code
15892 \begin_layout Plain Layout
15899 \begin_inset Flex Code
15902 \begin_layout Plain Layout
15908 ] The prefix to use when creating labels referring to floats of this type.
15909 This allows the use of formatted references.
15910 Note that you can remove any
15911 \begin_inset Flex Code
15914 \begin_layout Plain Layout
15920 set by a copied style by using the special value
15921 \begin_inset Quotes eld
15925 \begin_inset Quotes erd
15928 , which must be all caps.
15931 \begin_layout Description
15932 \begin_inset Flex Code
15935 \begin_layout Plain Layout
15942 \begin_inset Flex Code
15945 \begin_layout Plain Layout
15952 \begin_inset Quotes erd
15956 \begin_inset Quotes erd
15959 ] The style used when defining the float using
15960 \begin_inset Flex Code
15963 \begin_layout Plain Layout
15974 \begin_layout Description
15975 \begin_inset Flex Code
15978 \begin_layout Plain Layout
15985 \begin_inset Flex Code
15988 \begin_layout Plain Layout
15995 \begin_inset Quotes erd
15999 \begin_inset Quotes erd
16003 \begin_inset Quotes eld
16007 \begin_inset Quotes erd
16010 of the new class of floats, like program or algorithm.
16011 After the appropriate
16012 \begin_inset Flex Code
16015 \begin_layout Plain Layout
16024 \begin_inset Flex Code
16027 \begin_layout Plain Layout
16036 \begin_inset Flex Code
16039 \begin_layout Plain Layout
16050 \begin_layout Description
16051 \begin_inset Flex Code
16054 \begin_layout Plain Layout
16061 \begin_inset Flex Code
16064 \begin_layout Plain Layout
16071 \begin_inset space \thinspace{}
16075 \begin_inset Flex Code
16078 \begin_layout Plain Layout
16086 ] Specifies whether this float is defined using the LaTeX package
16087 \begin_inset Flex Code
16090 \begin_layout Plain Layout
16096 , either by the class file, another package or on-the-fly by LyX itself.
16099 \begin_layout Standard
16100 Note that defining a float with type
16101 \begin_inset Flex Code
16104 \begin_layout Plain Layout
16112 automatically defines the corresponding counter with name
16113 \begin_inset Flex Code
16116 \begin_layout Plain Layout
16127 \begin_layout Subsection
16128 Flex insets and InsetLayout
16129 \begin_inset CommandInset label
16131 name "sub:Flex-insets-and"
16138 \begin_layout Standard
16139 Flex insets come in three different kinds:
16142 \begin_layout Itemize
16144 \begin_inset Flex Code
16147 \begin_layout Plain Layout
16153 ): These define semantic markup corresponding to such LaTeX commands as
16155 \begin_inset Flex Code
16158 \begin_layout Plain Layout
16167 \begin_inset Flex Code
16170 \begin_layout Plain Layout
16181 \begin_layout Itemize
16183 \begin_inset Flex Code
16186 \begin_layout Plain Layout
16192 ): These can be used to define custom collapsible insets, similar to TeX
16193 code, footnote, and the like.
16194 An obvious example is an endnote inset, which is defined in the
16195 \begin_inset Flex Code
16198 \begin_layout Plain Layout
16207 \begin_layout Itemize
16209 \begin_inset Flex Code
16212 \begin_layout Plain Layout
16218 ): For use with DocBook classes.
16221 \begin_layout Standard
16222 Flex insets are defined using the
16223 \begin_inset Flex Code
16226 \begin_layout Plain Layout
16232 tag, which shall be explained in a moment.
16235 \begin_layout Standard
16237 \begin_inset Flex Code
16240 \begin_layout Plain Layout
16246 tag also serves another function: It can be used to customize the general
16247 layout of many different types of insets.
16249 \begin_inset Flex Code
16252 \begin_layout Plain Layout
16258 can be used to customize the layout parameters for footnotes, marginal
16259 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16260 boxes, tables, algorithms, URLs, and
16261 \change_deleted -712698321 1356964515
16263 \change_inserted -712698321 1356964516
16266 s, as well as to define Flex insets.
16269 \begin_layout Standard
16271 \begin_inset Flex Code
16274 \begin_layout Plain Layout
16280 definition must begin with a line of the form:
16283 \begin_layout LyX-Code
16287 \begin_layout Standard
16289 \begin_inset Flex Code
16292 \begin_layout Plain Layout
16298 indicates the inset whose layout is being defined, and here there are
16299 \change_deleted -712698321 1356964888
16301 \change_inserted -712698321 1356964888
16303 \change_deleted 5863208 1334489267
16309 \begin_layout Enumerate
16310 The layout for a pre-existing inset is being modified.
16311 In this case, can be
16312 \begin_inset Flex Code
16315 \begin_layout Plain Layout
16321 any one of the following:
16322 \begin_inset Flex Code
16325 \begin_layout Plain Layout
16332 \begin_inset Flex Code
16335 \begin_layout Plain Layout
16342 \begin_inset Flex Code
16345 \begin_layout Plain Layout
16352 \begin_inset Flex Code
16355 \begin_layout Plain Layout
16362 \change_inserted -712698321 1356964563
16364 \begin_inset Flex Code
16367 \begin_layout Plain Layout
16369 \change_inserted -712698321 1356964560
16380 \begin_inset Flex Code
16383 \begin_layout Plain Layout
16390 \begin_inset Flex Code
16393 \begin_layout Plain Layout
16400 \begin_inset Flex Code
16403 \begin_layout Plain Layout
16410 \begin_inset Flex Code
16413 \begin_layout Plain Layout
16420 \begin_inset Flex Code
16423 \begin_layout Plain Layout
16430 \begin_inset Flex Code
16433 \begin_layout Plain Layout
16440 \begin_inset Flex Code
16443 \begin_layout Plain Layout
16450 \begin_inset Flex Code
16453 \begin_layout Plain Layout
16460 \begin_inset Flex Code
16463 \begin_layout Plain Layout
16470 \begin_inset Flex Code
16473 \begin_layout Plain Layout
16480 \begin_inset Flex Code
16483 \begin_layout Plain Layout
16490 \begin_inset Flex Code
16493 \begin_layout Plain Layout
16500 \begin_inset Flex Code
16503 \begin_layout Plain Layout
16510 \change_deleted -712698321 1356964592
16512 \begin_inset Flex Code
16515 \begin_layout Plain Layout
16517 \change_deleted -712698321 1353866704
16521 \change_inserted -712698321 1353866707
16532 \begin_inset Flex Code
16535 \begin_layout Plain Layout
16542 \begin_inset Flex Code
16545 \begin_layout Plain Layout
16554 \begin_layout Enumerate
16555 The layout for a Flex inset is being defined.
16557 \begin_inset Flex Code
16560 \begin_layout Plain Layout
16566 must be of the form
16567 \begin_inset Quotes eld
16571 \begin_inset Flex Code
16574 \begin_layout Plain Layout
16581 \begin_inset Quotes erd
16585 \begin_inset Flex Code
16588 \begin_layout Plain Layout
16594 may be be any valid identifier not used by a pre-existing Flex inset.
16595 The identifier may include spaces, but in that case the whole thing must
16596 be wrapped in quotes.
16597 Note that the definition of a flex inset
16602 \begin_inset Flex Code
16605 \begin_layout Plain Layout
16611 entry, declaring which type of inset it defines.
16612 \change_inserted 5863208 1334489312
16616 \begin_layout Enumerate
16618 \change_inserted 5863208 1334492248
16619 The layout for user specific branch is being defined.
16621 \begin_inset Flex Code
16624 \begin_layout Plain Layout
16626 \change_inserted 5863208 1334489384
16632 must be of the form
16633 \begin_inset Quotes eld
16637 \begin_inset Flex Code
16640 \begin_layout Plain Layout
16642 \change_inserted 5863208 1334489392
16649 \begin_inset Quotes erd
16653 \begin_inset Flex Code
16656 \begin_layout Plain Layout
16658 \change_inserted 5863208 1334489384
16664 may be be any valid identifier of branch defined in user's document.
16665 The identifier may include spaces, but in that case the whole thing must
16666 be wrapped in quotes.
16667 The main purpose of this feature is to allow LaTeX wrapping around specific
16668 branches as user needs.
16669 \change_inserted -712698321 1356964893
16673 \begin_layout Enumerate
16675 \change_inserted -712698321 1356965125
16676 The layout of a user (or class) specific caption is being defined.
16678 \begin_inset Flex Code
16681 \begin_layout Plain Layout
16683 \change_inserted -712698321 1356964939
16689 must be of the form
16690 \begin_inset Quotes eld
16694 \begin_inset Flex Code
16697 \begin_layout Plain Layout
16699 \change_inserted -712698321 1356964943
16706 \begin_inset Quotes erd
16710 \begin_inset Flex Code
16713 \begin_layout Plain Layout
16715 \change_inserted -712698321 1356964939
16721 specifies the name of the caption as it appears in the menu.
16722 Have a look at the standard caption (
16723 \begin_inset Flex Code
16726 \begin_layout Plain Layout
16728 \change_inserted -712698321 1356964987
16734 ), the specific captions of the KOMA-Script classes (
16735 \begin_inset Flex Code
16738 \begin_layout Plain Layout
16740 \change_inserted -712698321 1356965018
16747 \begin_inset Flex Code
16750 \begin_layout Plain Layout
16752 \change_inserted -712698321 1356965021
16763 \begin_inset Flex Code
16766 \begin_layout Plain Layout
16768 \change_inserted -712698321 1356965045
16774 ) for applications.
16779 \begin_layout Standard
16781 \begin_inset Flex Code
16784 \begin_layout Plain Layout
16790 definition can contain the following entries:
16793 \begin_layout Description
16795 \change_inserted -712698321 1353681390
16796 \begin_inset Flex Code
16799 \begin_layout Plain Layout
16801 \change_inserted -712698321 1353681344
16808 \begin_inset Flex Code
16811 \begin_layout Plain Layout
16813 \change_inserted -712698321 1353681344
16819 ] Defines argument number <int> of a command\SpecialChar \slash{}
16820 environment associated with
16821 the current layout.
16822 The definition must end with
16823 \begin_inset Flex Code
16826 \begin_layout Plain Layout
16828 \change_inserted -712698321 1353681344
16836 \change_deleted 2090807402 1370133795
16838 \begin_inset space ~
16842 \change_inserted -712698321 1353681390
16844 \begin_inset CommandInset ref
16846 reference "sub:Paragraph-Styles"
16853 \begin_layout Description
16855 \change_inserted -195340706 1333913893
16856 \begin_inset Flex Code
16859 \begin_layout Plain Layout
16865 Preamble for changing languages.
16867 \begin_inset CommandInset ref
16869 reference "sub:I18n"
16876 \begin_layout Description
16877 \begin_inset Flex Code
16880 \begin_layout Plain Layout
16887 \begin_inset Flex Code
16890 \begin_layout Plain Layout
16896 ] The color for the inset's background.
16898 \begin_inset CommandInset ref
16900 reference "chap:Names-of-colors"
16904 for a list of the available color names.
16907 \begin_layout Description
16908 \begin_inset Flex Code
16911 \begin_layout Plain Layout
16918 \begin_inset Flex Code
16921 \begin_layout Plain Layout
16930 \begin_inset space \thinspace{}
16934 \begin_inset Flex Code
16937 \begin_layout Plain Layout
16943 ] Whether to use the content of the inset as the label, when the inset is
16948 \begin_layout Description
16949 \begin_inset Flex Code
16952 \begin_layout Plain Layout
16959 \begin_inset Flex Code
16962 \begin_layout Plain Layout
16968 ] As with paragraph styles, see
16969 \begin_inset CommandInset ref
16971 reference "sub:Paragraph-Styles"
16976 Note that you need to specify the complete type, e.
16977 \begin_inset space \thinspace{}
16981 \begin_inset space ~
16985 \begin_inset Flex Code
16988 \begin_layout Plain Layout
16989 CopyStyle Flex:<name>
16997 \begin_layout Description
16998 \begin_inset Flex Code
17001 \begin_layout Plain Layout
17008 \begin_inset Flex Code
17011 \begin_layout Plain Layout
17020 \begin_inset space \thinspace{}
17024 \begin_inset Flex Code
17027 \begin_layout Plain Layout
17033 ] Indicates whether the user may employ the Paragraph Settings dialog to
17034 customize the paragraph.
17037 \begin_layout Description
17038 \begin_inset Flex Code
17041 \begin_layout Plain Layout
17048 \begin_inset Flex Code
17051 \begin_layout Plain Layout
17058 \begin_inset Flex Code
17061 \begin_layout Plain Layout
17068 \begin_inset Flex Code
17071 \begin_layout Plain Layout
17077 , describing the rendering style used for the inset's frame and buttons.
17078 Footnotes generally use
17079 \begin_inset Flex Code
17082 \begin_layout Plain Layout
17088 , ERT insets generally
17089 \begin_inset Flex Code
17092 \begin_layout Plain Layout
17098 , and character styles
17099 \begin_inset Flex Code
17102 \begin_layout Plain Layout
17111 \begin_layout Description
17112 \begin_inset Flex Code
17115 \begin_layout Plain Layout
17122 \begin_inset Flex Code
17125 \begin_layout Plain Layout
17134 \begin_inset space \thinspace{}
17140 \begin_inset Flex Code
17143 \begin_layout Plain Layout
17152 \begin_inset Flex Code
17155 \begin_layout Plain Layout
17162 \begin_inset Flex Code
17165 \begin_layout Plain Layout
17172 Indicates whether the environment will stand on its own in the output or
17173 will appear inline with the surrounding text.
17174 If set to false, it is supposed that the LaTeX environment ignores white
17175 space (including one newline character) after the
17176 \begin_inset Flex Code
17179 \begin_layout Plain Layout
17192 \begin_inset Flex Code
17195 \begin_layout Plain Layout
17211 \begin_layout Description
17212 \begin_inset Flex Code
17215 \begin_layout Plain Layout
17221 Required at the end of the
17222 \begin_inset Flex Code
17225 \begin_layout Plain Layout
17234 \begin_layout Description
17235 \begin_inset Flex Code
17238 \begin_layout Plain Layout
17244 The font used for both the text body
17250 \begin_inset CommandInset ref
17252 reference "sub:Font-description"
17257 Note that defining this font automatically defines the
17258 \begin_inset Flex Code
17261 \begin_layout Plain Layout
17267 to the same value, so define this first and define
17268 \begin_inset Flex Code
17271 \begin_layout Plain Layout
17277 later if you want them to be different.
17278 \change_inserted 155139281 1354130923
17282 \begin_layout Description
17284 \change_inserted 155139281 1354130923
17285 \begin_inset Flex Code
17288 \begin_layout Plain Layout
17290 \change_inserted 155139281 1354130923
17291 ForceLocalFontSwitch
17297 \begin_inset Flex Code
17300 \begin_layout Plain Layout
17302 \change_inserted 155139281 1354130923
17311 \begin_inset Flex Code
17314 \begin_layout Plain Layout
17316 \change_inserted 155139281 1354130923
17322 ] When using babel, always use a local font switch (
17323 \begin_inset Flex Code
17326 \begin_layout Plain Layout
17328 \change_inserted 155139281 1354130923
17336 ), never a global one (such as
17337 \begin_inset Flex Code
17340 \begin_layout Plain Layout
17342 \change_inserted 155139281 1354130923
17355 \begin_layout Description
17356 \begin_inset Flex Code
17359 \begin_layout Plain Layout
17366 \begin_inset Flex Code
17369 \begin_layout Plain Layout
17378 \begin_inset space \thinspace{}
17382 \begin_inset Flex Code
17385 \begin_layout Plain Layout
17392 \begin_inset Quotes eld
17396 \begin_inset Quotes erd
17399 language, leading to Left-to-Right (Latin) output, e.
17400 \begin_inset space \thinspace{}
17404 \begin_inset space \space{}
17407 in TeX code or URL.
17411 \begin_layout Description
17412 \begin_inset Flex Code
17415 \begin_layout Plain Layout
17422 \begin_inset Flex Code
17425 \begin_layout Plain Layout
17434 \begin_inset space \thinspace{}
17438 \begin_inset Flex Code
17441 \begin_layout Plain Layout
17447 ] Indicates whether the
17448 \begin_inset Flex Code
17451 \begin_layout Plain Layout
17457 should be used or, instead, the user can change the paragraph style used
17462 \begin_layout Description
17463 \begin_inset Flex Code
17466 \begin_layout Plain Layout
17473 \begin_inset Flex Code
17476 \begin_layout Plain Layout
17485 \begin_inset space \thinspace{}
17489 \begin_inset Flex Code
17492 \begin_layout Plain Layout
17498 ] As with paragraph styles, see
17499 \begin_inset CommandInset ref
17501 reference "sub:Paragraph-Styles"
17508 \begin_layout Description
17509 \begin_inset Flex Code
17512 \begin_layout Plain Layout
17518 These tags control the XHTML output.
17520 \begin_inset CommandInset ref
17522 reference "sec:Tags-for-XHTML"
17529 \begin_layout Description
17530 \begin_inset Flex Code
17533 \begin_layout Plain Layout
17540 \begin_inset Flex Code
17543 \begin_layout Plain Layout
17552 \begin_inset space \thinspace{}
17556 \begin_inset Flex Code
17559 \begin_layout Plain Layout
17565 ] Whether to include the contents of this inset in the strings generated
17566 for the `Outline' pane.
17567 One would not, for example, want the content of a footnote in a section
17568 header to be included in the TOC displayed in the outline, but one would
17569 normally want the content of a character style displayed.
17570 Default is false: not to include.
17573 \begin_layout Description
17574 \begin_inset Flex Code
17577 \begin_layout Plain Layout
17586 \begin_inset Flex Code
17589 \begin_layout Plain Layout
17598 \begin_inset space \thinspace{}
17602 \begin_inset Flex Code
17605 \begin_layout Plain Layout
17611 ] As with paragraph styles, see
17612 \begin_inset CommandInset ref
17614 reference "sub:Paragraph-Styles"
17621 \begin_layout Description
17622 \begin_inset Flex Code
17625 \begin_layout Plain Layout
17631 The font used for the label.
17633 \begin_inset CommandInset ref
17635 reference "sub:Font-description"
17640 Note that this definition can never appear before
17641 \begin_inset Flex Code
17644 \begin_layout Plain Layout
17650 , lest it be ineffective.
17653 \begin_layout Description
17654 \begin_inset Flex Code
17657 \begin_layout Plain Layout
17664 \begin_inset Flex Code
17667 \begin_layout Plain Layout
17674 \begin_inset Quotes erd
17678 \begin_inset Quotes erd
17681 ] What will be displayed on the button or elsewhere as the inset label.
17683 \begin_inset Flex Code
17686 \begin_layout Plain Layout
17693 \begin_inset Flex Code
17696 \begin_layout Plain Layout
17702 ) modify this label on the fly.
17705 \begin_layout Description
17707 \change_inserted -195340706 1333913893
17708 \begin_inset Flex Code
17711 \begin_layout Plain Layout
17717 Language dependent preamble.
17719 \begin_inset CommandInset ref
17721 reference "sub:I18n"
17728 \begin_layout Description
17729 \begin_inset Flex Code
17732 \begin_layout Plain Layout
17739 \begin_inset Flex Code
17742 \begin_layout Plain Layout
17748 ] The name of the corresponding LaTeX stuff.
17749 Either the environment or command name.
17752 \begin_layout Description
17753 \begin_inset Flex Code
17756 \begin_layout Plain Layout
17763 \begin_inset Flex Code
17766 \begin_layout Plain Layout
17772 ] The optional parameter for the corresponding
17773 \begin_inset Flex Code
17776 \begin_layout Plain Layout
17782 stuff, including possible bracket pairs like
17783 \begin_inset Flex Code
17786 \begin_layout Plain Layout
17794 \change_inserted -712698321 1355144715
17795 This will be output as is after all LaTeX
17796 \begin_inset Flex Code
17799 \begin_layout Plain Layout
17801 \change_inserted -712698321 1355144713
17810 This parameter cannot be changed from within LyX
17811 \change_inserted -712698321 1355144775
17813 \begin_inset Flex Code
17816 \begin_layout Plain Layout
17818 \change_inserted -712698321 1355144747
17824 for customizable parameters)
17829 \begin_layout Description
17830 \begin_inset Flex Code
17833 \begin_layout Plain Layout
17840 \begin_inset Flex Code
17843 \begin_layout Plain Layout
17845 \change_deleted -712698321 1353867544
17852 Command, Environment,
17853 \change_inserted -712698321 1353867573
17855 \change_deleted -712698321 1353867557
17864 \begin_inset Flex Code
17867 \begin_layout Plain Layout
17869 \change_deleted -712698321 1353867564
17873 \change_deleted -712698321 1353867569
17881 ] How the style should be translated into LaTeX.
17885 \begin_layout Plain Layout
17886 \begin_inset Flex Code
17889 \begin_layout Plain Layout
17895 is perhaps a bit misleading, since these rules apply to SGML classes, too.
17896 Visit the SGML class files for specific examples.
17905 \begin_layout Description
17906 \begin_inset Flex Code
17909 \begin_layout Plain Layout
17911 \change_deleted -712698321 1353867582
17913 \change_inserted -712698321 1353867583
17921 means nothing special.
17925 \begin_layout Description
17926 \begin_inset Flex Code
17929 \begin_layout Plain Layout
17936 \begin_inset Flex Code
17939 \begin_layout Plain Layout
17946 {\SpecialChar \ldots{}
17955 \begin_layout Description
17956 \begin_inset Flex Code
17959 \begin_layout Plain Layout
17966 \begin_inset Flex Code
17969 \begin_layout Plain Layout
17976 }\SpecialChar \ldots{}
17992 \begin_layout Description
17994 \change_deleted -712698321 1353867600
17995 \begin_inset Flex Code
17998 \begin_layout Plain Layout
18005 \begin_inset Flex Code
18008 \begin_layout Plain Layout
18015 \begin_inset Flex Code
18018 \begin_layout Plain Layout
18026 is generated for each paragraph of this environment.
18030 \begin_layout Description
18032 \change_deleted -712698321 1353867600
18033 \begin_inset Flex Code
18036 \begin_layout Plain Layout
18043 \begin_inset Flex Code
18046 \begin_layout Plain Layout
18053 \begin_inset Flex Code
18056 \begin_layout Plain Layout
18062 is passed as an argument to the environment.
18064 \begin_inset Flex Code
18067 \begin_layout Plain Layout
18073 can be defined in the
18074 \begin_inset Flex MenuItem
18077 \begin_layout Plain Layout
18078 Edit\SpecialChar \menuseparator
18080 \begin_inset space ~
18094 \begin_layout Standard
18095 Putting the last few things together, the LaTeX output will be either:
18098 \begin_layout LyX-Code
18102 \change_deleted 2090807402 1356919073
18104 \change_inserted 2090807402 1356919073
18108 \change_deleted 2090807402 1356919073
18110 \change_inserted 2090807402 1356919002
18113 ]{\SpecialChar \ldots{}
18117 \begin_layout Standard
18121 \begin_layout LyX-Code
18125 \change_deleted 2090807402 1356919013
18127 \change_inserted 2090807402 1356919014
18131 \change_deleted 2090807402 1356919013
18133 \change_inserted 2090807402 1356919008
18136 ] \SpecialChar \ldots{}
18140 \change_deleted 2090807402 1356919016
18142 \change_inserted 2090807402 1356919016
18148 \begin_layout Standard
18149 depending upon the LaTeX type.
18153 \begin_layout Description
18155 \change_inserted -712698321 1354263128
18156 \begin_inset Flex Code
18159 \begin_layout Plain Layout
18161 \change_inserted -712698321 1353866742
18170 \begin_inset Flex Code
18173 \begin_layout Plain Layout
18175 \change_inserted -712698321 1353866752
18181 ] A string that is put at the beginning of the layout content.
18182 A line break in the output can be indicated by
18183 \begin_inset Flex Code
18186 \begin_layout Plain Layout
18188 \change_inserted -712698321 1354263128
18199 \begin_layout Description
18200 \begin_inset Flex Code
18203 \begin_layout Plain Layout
18210 \begin_inset Flex Code
18213 \begin_layout Plain Layout
18220 \begin_inset Flex Code
18223 \begin_layout Plain Layout
18230 \begin_inset Flex Code
18233 \begin_layout Plain Layout
18240 \begin_inset Flex Code
18243 \begin_layout Plain Layout
18249 (indicating a dummy definition ending definitions of charstyles, etc).
18250 This entry is required in and is only meaningful for Flex insets.
18251 Among other things, it determines on which menu this inset will appear.
18253 \begin_inset Flex Code
18256 \begin_layout Plain Layout
18263 \begin_inset Flex Code
18266 \begin_layout Plain Layout
18272 will automatically set
18273 \begin_inset Flex Code
18276 \begin_layout Plain Layout
18284 \begin_inset Flex Code
18287 \begin_layout Plain Layout
18293 can be set to true for
18294 \begin_inset Flex Code
18297 \begin_layout Plain Layout
18303 insets by setting it
18308 \begin_inset Flex Code
18311 \begin_layout Plain Layout
18320 \begin_layout Description
18321 \begin_inset Flex Code
18324 \begin_layout Plain Layout
18331 \begin_inset Flex Code
18334 \begin_layout Plain Layout
18343 \begin_inset space \thinspace{}
18347 \begin_inset Flex Code
18350 \begin_layout Plain Layout
18356 ] Whether multiple paragraphs are permitted in this inset.
18358 \begin_inset Flex Code
18361 \begin_layout Plain Layout
18367 to the same value and
18368 \begin_inset Flex Code
18371 \begin_layout Plain Layout
18377 to the opposite value.
18378 These can be reset to other values, if they are used
18383 \begin_inset Flex Code
18386 \begin_layout Plain Layout
18396 \begin_layout Description
18397 \begin_inset Flex Code
18400 \begin_layout Plain Layout
18407 \begin_inset Flex Code
18410 \begin_layout Plain Layout
18419 \begin_inset space \thinspace{}
18423 \begin_inset Flex Code
18426 \begin_layout Plain Layout
18432 ] Whether fragile commands in this inset should be
18433 \begin_inset Flex Code
18436 \begin_layout Plain Layout
18449 whether the command should itself be protected.) Default is false.
18450 \change_inserted 1414654397 1360681873
18454 \begin_layout Description
18456 \change_inserted 1414654397 1360681892
18457 \begin_inset Flex Code
18460 \begin_layout Plain Layout
18462 \change_inserted 1414654397 1360681880
18469 \begin_inset Flex Code
18472 \begin_layout Plain Layout
18474 \change_inserted 1414654397 1360681883
18480 ] Deletes an existing
18481 \begin_inset Flex Code
18484 \begin_layout Plain Layout
18486 \change_inserted 1414654397 1360681892
18497 \begin_layout Description
18498 \begin_inset Flex Code
18501 \begin_layout Plain Layout
18508 \begin_inset Flex Code
18511 \begin_layout Plain Layout
18520 \begin_inset space \thinspace{}
18524 \begin_inset Flex Code
18527 \begin_layout Plain Layout
18533 ] As with paragraph styles, see
18534 \begin_inset CommandInset ref
18536 reference "sub:Paragraph-Styles"
18544 \begin_layout Description
18545 \begin_inset Flex Code
18548 \begin_layout Plain Layout
18555 \begin_inset Flex Code
18558 \begin_layout Plain Layout
18567 \begin_inset space \thinspace{}
18571 \begin_inset Flex Code
18574 \begin_layout Plain Layout
18580 ] As with paragraph styles, see
18581 \begin_inset CommandInset ref
18583 reference "sub:Paragraph-Styles"
18591 \begin_layout Description
18592 \begin_inset Flex Code
18595 \begin_layout Plain Layout
18601 As with paragraph styles, see
18602 \begin_inset CommandInset ref
18604 reference "sub:Paragraph-Styles"
18611 \begin_layout Description
18612 \begin_inset Flex Code
18615 \begin_layout Plain Layout
18622 \begin_inset Flex Code
18625 \begin_layout Plain Layout
18631 ] The prefix to use when creating labels referring to insets of this type.
18632 This allows the use of formatted references.
18635 \begin_layout Description
18636 \begin_inset Flex Code
18639 \begin_layout Plain Layout
18646 \begin_inset Flex Code
18649 \begin_layout Plain Layout
18655 ] As with paragraph styles, see
18656 \begin_inset CommandInset ref
18658 reference "sub:Paragraph-Styles"
18663 \change_inserted -712698321 1354439699
18667 \begin_layout Description
18669 \change_inserted -712698321 1354439705
18670 \begin_inset Flex Code
18673 \begin_layout Plain Layout
18675 \change_inserted -712698321 1354439699
18682 \begin_inset Flex Code
18685 \begin_layout Plain Layout
18687 \change_inserted -712698321 1354439699
18696 \begin_inset Flex Code
18699 \begin_layout Plain Layout
18701 \change_inserted -712698321 1354439699
18707 ] Resets the LaTeX arguments of this layout (as defined via the
18708 \begin_inset Flex Code
18711 \begin_layout Plain Layout
18713 \change_inserted -712698321 1354439699
18720 This is useful if you have copied a style via
18721 \begin_inset Flex Code
18724 \begin_layout Plain Layout
18726 \change_inserted -712698321 1354439699
18732 , but you do not want to inherit its (required and optional) arguments.
18734 \change_deleted -712698321 1354439698
18740 \begin_layout Description
18741 \begin_inset Flex Code
18744 \begin_layout Plain Layout
18751 \begin_inset Flex Code
18754 \begin_layout Plain Layout
18761 \begin_inset space \thinspace{}
18765 \begin_inset Flex Code
18768 \begin_layout Plain Layout
18776 ] Whether this inset should use the font of its surrounding environment
18778 Default is true: uses its own.
18781 \begin_layout Description
18783 \change_inserted -712698321 1354263134
18784 \begin_inset Flex Code
18787 \begin_layout Plain Layout
18789 \change_inserted -712698321 1353866810
18796 \begin_inset Flex Code
18799 \begin_layout Plain Layout
18801 \change_inserted -712698321 1353866806
18807 ] A string that is put at the end of the layout content.
18808 A line break in the output can be indicated by
18809 \begin_inset Flex Code
18812 \begin_layout Plain Layout
18814 \change_inserted -712698321 1354263134
18825 \begin_layout Description
18826 \begin_inset Flex Code
18829 \begin_layout Plain Layout
18836 \begin_inset Flex Code
18839 \begin_layout Plain Layout
18846 \begin_inset space \thinspace{}
18850 \begin_inset Flex Code
18853 \begin_layout Plain Layout
18861 ] Allow spell-checking the contents of this inset.
18865 \begin_layout Subsection
18867 \begin_inset CommandInset label
18869 name "sub:Counters"
18876 \begin_layout Standard
18877 It is necessary to define the counters (
18878 \begin_inset Flex MenuItem
18881 \begin_layout Plain Layout
18888 \begin_inset Flex MenuItem
18891 \begin_layout Plain Layout
18897 , \SpecialChar \ldots{}
18898 ) in the text class itself.
18899 The standard counters are defined in the file
18900 \begin_inset Flex Code
18903 \begin_layout Plain Layout
18909 , so you may have to do no more than add
18912 \begin_layout LyX-Code
18913 Input stdcounters.inc
18916 \begin_layout Standard
18917 to your layout file to get them to work.
18918 But if you want to define custom counters, then you can do so.
18919 The counter declaration must begin with:
18922 \begin_layout LyX-Code
18923 Counter CounterName
18926 \begin_layout Standard
18928 \begin_inset Flex Code
18931 \begin_layout Plain Layout
18937 ' is replaced by the name of the counter.
18938 And it must end with
18939 \begin_inset Quotes eld
18943 \begin_inset Flex Code
18946 \begin_layout Plain Layout
18953 \begin_inset Quotes erd
18957 The following parameters can also be used:
18960 \begin_layout Description
18962 \change_inserted 1414654397 1370012684
18963 \begin_inset Flex Code
18966 \begin_layout Plain Layout
18968 \change_inserted 1414654397 1370012589
18975 \begin_inset Flex Code
18978 \begin_layout Plain Layout
18980 \change_inserted 1414654397 1370012639
18986 =1] Sets the initial value for the counter, to which it will be reset whenever
18988 Normally, one will want the default, 1.
18991 \begin_layout Description
18992 \begin_inset Flex Code
18995 \begin_layout Plain Layout
19002 \begin_inset Flex Code
19005 \begin_layout Plain Layout
19012 \begin_inset Quotes erd
19016 \begin_inset Quotes erd
19019 ] When defined, this string defines how the counter is displayed.
19020 Setting this value sets
19021 \begin_inset Flex Code
19024 \begin_layout Plain Layout
19025 LabelStringAppendix
19031 The following special constructs can be used in the string:
19035 \begin_layout Itemize
19036 \begin_inset Flex Code
19039 \begin_layout Plain Layout
19047 will be replaced by the expansion of the
19048 \begin_inset Flex Code
19051 \begin_layout Plain Layout
19058 \begin_inset Flex Code
19061 \begin_layout Plain Layout
19062 LabelStringAppendix
19068 \begin_inset Flex Code
19071 \begin_layout Plain Layout
19081 \begin_layout Itemize
19082 counter values can be expressed using LaTeX-like macros
19083 \begin_inset Newline newline
19087 \begin_inset Flex Code
19090 \begin_layout Plain Layout
19107 \begin_inset Flex Code
19110 \begin_layout Plain Layout
19122 \begin_layout Plain Layout
19132 Actually, the situation is a bit more complicated: any
19151 other than those described below will produce arabic numerals.
19152 It would not be surprising to see this change in the future.
19158 \begin_inset Flex Code
19161 \begin_layout Plain Layout
19167 : 1, 2, 3,\SpecialChar \ldots{}
19169 \begin_inset Flex Code
19172 \begin_layout Plain Layout
19178 for lower-case letters: a, b, c, \SpecialChar \ldots{}
19180 \begin_inset Flex Code
19183 \begin_layout Plain Layout
19189 for upper-case letters: A, B, C, \SpecialChar \ldots{}
19191 \begin_inset Flex Code
19194 \begin_layout Plain Layout
19200 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
19202 \begin_inset Flex Code
19205 \begin_layout Plain Layout
19211 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
19213 \begin_inset Flex Code
19216 \begin_layout Plain Layout
19222 for hebrew numerals.
19226 \begin_layout Standard
19227 If LabelString is not defined, a default value is constructed as follows:
19228 if the counter has a master counter
19229 \begin_inset Flex Code
19232 \begin_layout Plain Layout
19239 \begin_inset Flex Code
19242 \begin_layout Plain Layout
19249 \begin_inset Newline newline
19253 \begin_inset Flex Code
19256 \begin_layout Plain Layout
19266 is used; otherwise the string
19267 \begin_inset Flex Code
19270 \begin_layout Plain Layout
19281 \begin_layout Description
19282 \begin_inset Flex Code
19285 \begin_layout Plain Layout
19286 LabelStringAppendix
19292 \begin_inset Flex Code
19295 \begin_layout Plain Layout
19302 \begin_inset Quotes erd
19306 \begin_inset Quotes erd
19310 \begin_inset Flex Code
19313 \begin_layout Plain Layout
19319 , but for use in the Appendix.
19322 \begin_layout Description
19323 \begin_inset Flex Code
19326 \begin_layout Plain Layout
19333 \begin_inset Flex Code
19336 \begin_layout Plain Layout
19343 \begin_inset Quotes erd
19347 \begin_inset Quotes erd
19350 ] A format for use with formatted references to this counter.
19351 For example, one might want to have references to section numbers appear
19353 \begin_inset Quotes eld
19357 \begin_inset Quotes erd
19361 The string should contain
19362 \begin_inset Quotes eld
19366 \begin_inset Quotes erd
19370 This will be replaced by the counter number itself.
19371 So, for sections, it would be: Section ##.
19374 \begin_layout Description
19375 \begin_inset Flex Code
19378 \begin_layout Plain Layout
19385 \begin_inset Flex Code
19388 \begin_layout Plain Layout
19395 \begin_inset Quotes erd
19399 \begin_inset Quotes erd
19402 ] If this is set to the name of another counter, the present counter will
19403 be reset every time the other one is increased.
19405 \begin_inset Flex Code
19408 \begin_layout Plain Layout
19415 \begin_inset Flex Code
19418 \begin_layout Plain Layout
19427 \begin_layout Subsection
19429 \begin_inset CommandInset label
19431 name "sub:Font-description"
19438 \begin_layout Standard
19439 A font description looks like this:
19442 \begin_layout LyX-Code
19456 \begin_layout LyX-Code
19460 \begin_layout LyX-Code
19464 \begin_layout Standard
19465 The following commands are available:
19468 \begin_layout Description
19469 \begin_inset Flex Code
19472 \begin_layout Plain Layout
19479 \begin_inset Flex Code
19482 \begin_layout Plain Layout
19491 \begin_inset Flex Code
19494 \begin_layout Plain Layout
19501 \begin_inset Flex Code
19504 \begin_layout Plain Layout
19511 \begin_inset Flex Code
19514 \begin_layout Plain Layout
19521 \begin_inset Flex Code
19524 \begin_layout Plain Layout
19531 \begin_inset Flex Code
19534 \begin_layout Plain Layout
19541 \begin_inset Flex Code
19544 \begin_layout Plain Layout
19551 \begin_inset Flex Code
19554 \begin_layout Plain Layout
19561 \begin_inset Flex Code
19564 \begin_layout Plain Layout
19573 \begin_layout Description
19574 \begin_inset Flex Code
19577 \begin_layout Plain Layout
19584 \begin_inset Flex Code
19587 \begin_layout Plain Layout
19596 \begin_inset Flex Code
19599 \begin_layout Plain Layout
19606 \begin_inset Flex Code
19609 \begin_layout Plain Layout
19618 \begin_layout Description
19619 \begin_inset Flex Code
19622 \begin_layout Plain Layout
19629 \begin_inset Flex Code
19632 \begin_layout Plain Layout
19638 ] Valid arguments are:
19639 \begin_inset Flex Code
19642 \begin_layout Plain Layout
19649 \begin_inset Flex Code
19652 \begin_layout Plain Layout
19659 \begin_inset Flex Code
19662 \begin_layout Plain Layout
19669 \begin_inset Flex Code
19672 \begin_layout Plain Layout
19679 \begin_inset Flex Code
19682 \begin_layout Plain Layout
19689 \begin_inset Flex Code
19692 \begin_layout Plain Layout
19699 \begin_inset Flex Code
19702 \begin_layout Plain Layout
19709 \begin_inset Flex Code
19712 \begin_layout Plain Layout
19719 \begin_inset Flex Code
19722 \begin_layout Plain Layout
19729 \begin_inset Flex Code
19732 \begin_layout Plain Layout
19739 \begin_inset Flex Code
19742 \begin_layout Plain Layout
19749 \begin_inset Flex Code
19752 \begin_layout Plain Layout
19759 Each of these turns on or off the corresponding attribute.
19761 \begin_inset Flex Code
19764 \begin_layout Plain Layout
19770 turns on emphasis, and
19771 \begin_inset Flex Code
19774 \begin_layout Plain Layout
19782 \begin_inset Newline newline
19785 If the latter seems puzzling, remember that the font settings for the present
19786 context are generally inherited from the surrounding context.
19788 \begin_inset Flex Code
19791 \begin_layout Plain Layout
19797 would turn off the emphasis that was anyway in effect, say, in a theorem
19801 \begin_layout Description
19802 \begin_inset Flex Code
19805 \begin_layout Plain Layout
19812 \begin_inset Flex Code
19815 \begin_layout Plain Layout
19824 \begin_inset Flex Code
19827 \begin_layout Plain Layout
19836 \begin_layout Description
19837 \begin_inset Flex Code
19840 \begin_layout Plain Layout
19847 \begin_inset Flex Code
19850 \begin_layout Plain Layout
19859 \begin_inset Flex Code
19862 \begin_layout Plain Layout
19869 \begin_inset Flex Code
19872 \begin_layout Plain Layout
19879 \begin_inset Flex Code
19882 \begin_layout Plain Layout
19891 \begin_layout Description
19892 \begin_inset Flex Code
19895 \begin_layout Plain Layout
19902 \begin_inset Flex Code
19905 \begin_layout Plain Layout
19912 \begin_inset Flex Code
19915 \begin_layout Plain Layout
19922 \begin_inset Flex Code
19925 \begin_layout Plain Layout
19934 \begin_inset Flex Code
19937 \begin_layout Plain Layout
19944 \begin_inset Flex Code
19947 \begin_layout Plain Layout
19954 \begin_inset Flex Code
19957 \begin_layout Plain Layout
19964 \begin_inset Flex Code
19967 \begin_layout Plain Layout
19974 \begin_inset Flex Code
19977 \begin_layout Plain Layout
19986 \begin_layout Subsection
19987 \begin_inset CommandInset label
19989 name "sub:Citation-format-description"
19993 Citation format description
19996 \begin_layout Standard
19998 \begin_inset Flex Code
20001 \begin_layout Plain Layout
20007 blocks are used to describe how bibliographic information should be displayed,
20008 both within LyX itself (in the citation dialog and in tooltips, for example)
20009 and in XHTML output.
20010 Such a block might look like this:
20013 \begin_layout LyX-Code
20017 \begin_layout LyX-Code
20021 \begin_layout LyX-Code
20025 \begin_layout LyX-Code
20029 \begin_layout Standard
20030 The individual lines define how the bibliographic information associated
20031 with an article or book, respectively, is to be displayed, and such a definitio
20032 n can be given for any `entry type' that might be present in a BibTeX file.
20033 LyX defines a default format in the source code that will be used if no
20034 specific definition has been given.
20035 LyX predefines several formats in the file
20036 \begin_inset Flex Code
20039 \begin_layout Plain Layout
20045 , which is included in most of LyX's document classes.
20048 \begin_layout Standard
20049 The definitions use a simple language that allows BibTeX keys to be replaced
20051 Keys should be enclosed in
20052 \begin_inset Flex Code
20055 \begin_layout Plain Layout
20062 \begin_inset Flex Code
20065 \begin_layout Plain Layout
20072 So a simple definition might look like this:
20075 \begin_layout LyX-Code
20077 \begin_inset Quotes eld
20081 \begin_inset Quotes erd
20087 \begin_layout Standard
20088 This would print the author, followed by a comma, followed by the title,
20089 in quotes, followed by a period.
20092 \begin_layout Standard
20093 Of course, sometimes you may want to print a key only if it exists.
20094 This can be done by using a conditional construction, such as:
20095 \begin_inset Flex Code
20098 \begin_layout Plain Layout
20100 \begin_inset space ~
20110 \begin_inset Flex Code
20113 \begin_layout Plain Layout
20119 key exists, then print
20120 \begin_inset Quotes eld
20124 \begin_inset space ~
20128 \begin_inset Quotes erd
20131 followed by the volume key.
20132 It is also possible to have an else clause in the conditional, such as:
20133 \begin_inset Newline newline
20137 \begin_inset Flex Code
20140 \begin_layout Plain Layout
20141 {%author%[[%author%]][[%editor%, ed.]]}
20147 \begin_inset Newline newline
20151 \begin_inset Flex Code
20154 \begin_layout Plain Layout
20160 key is printed if it exists; otherwise, the editor key is printed, followed
20162 \begin_inset Quotes eld
20166 \begin_inset space ~
20170 \begin_inset Quotes erd
20173 Note that the key is again enclosed in
20174 \begin_inset Flex Code
20177 \begin_layout Plain Layout
20183 signs; the entire conditional is enclosed in braces; and the if and else
20184 clauses are enclosed in double brackets,
20185 \begin_inset Quotes eld
20189 \begin_inset Flex Code
20192 \begin_layout Plain Layout
20199 \begin_inset Quotes eld
20203 \begin_inset Quotes eld
20207 \begin_inset Flex Code
20210 \begin_layout Plain Layout
20217 \begin_inset Quotes erd
20221 There must be no space between any of these.
20224 \begin_layout Standard
20225 There is one other piece of syntax available in definitions, which looks
20227 \begin_inset Flex Code
20230 \begin_layout Plain Layout
20237 This defines a piece of formatting information that is to be used when
20239 \begin_inset Quotes eld
20243 \begin_inset Quotes erd
20247 Obviously, we do not want to output HTML tags when writing plain text,
20248 so they should be wrapped in
20249 \begin_inset Quotes eld
20253 \begin_inset Quotes erd
20257 \begin_inset Quotes eld
20261 \begin_inset Quotes erd
20267 \begin_layout Standard
20268 Two special sorts of definitions are also possible in a
20269 \begin_inset Flex Code
20272 \begin_layout Plain Layout
20279 An example of the first would be:
20282 \begin_layout LyX-Code
20284 \begin_inset Quotes eld
20288 \begin_inset Quotes erd
20294 \begin_layout Standard
20295 This is an abbreviation, or macro, and it can be used by treating it as
20297 \begin_inset Flex Code
20300 \begin_layout Plain Layout
20308 \begin_inset Flex Code
20311 \begin_layout Plain Layout
20317 exactly as it would treat its definition.
20318 So, let us issue the obvious
20326 \begin_layout LyX-Code
20330 \begin_layout Standard
20331 or anything like it.
20332 LyX shouldn't go into an infinite loop, but it may go into a long one before
20336 \begin_layout Standard
20337 The second sort of special definition might look like this:
20340 \begin_layout LyX-Code
20344 \begin_layout Standard
20345 This defines a translatable piece of text, which allows relevant parts of
20346 the bibliography to be translated.
20347 It can be included in a definition by treating it as a key:
20348 \begin_inset Flex Code
20351 \begin_layout Plain Layout
20358 Several of these are predefined in
20359 \begin_inset Flex Code
20362 \begin_layout Plain Layout
20369 Note that these are not macros, in the sense just defined.
20370 They will not be expanded.
20373 \begin_layout Standard
20374 So here then is an example that use all these features:
20375 \begin_inset VSpace defskip
20381 \begin_layout Standard
20385 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20388 \begin_layout Standard
20389 \begin_inset VSpace defskip
20392 This defines a macro that prints the author, followed by a comma, if the
20394 \begin_inset Flex Code
20397 \begin_layout Plain Layout
20403 key is defined, or else prints the name of the editor, followed by the
20405 \begin_inset Flex Code
20408 \begin_layout Plain Layout
20414 or its translation (it is by default
20415 \begin_inset Quotes eld
20419 \begin_inset Quotes erd
20423 \begin_inset Flex Code
20426 \begin_layout Plain Layout
20433 Note that this is in fact defined in
20434 \begin_inset Flex Code
20437 \begin_layout Plain Layout
20443 , so you can use it in your own definitions, or re-definitions, if you load
20447 \begin_layout Section
20448 \begin_inset CommandInset label
20450 name "sec:Tags-for-XHTML"
20454 Tags for XHTML output
20457 \begin_layout Standard
20458 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20459 by layout information.
20460 In general, LyX provides sensible defaults and, as mentioned earlier, it
20461 will even construct default CSS style rules from the other layout tags.
20462 For example, LyX will attempt to use the information provided in the
20463 \begin_inset Flex Code
20466 \begin_layout Plain Layout
20472 declaration for the Chapter style to write CSS that will appropriately
20473 format chapter headings.
20476 \begin_layout Standard
20477 In many cases, then, you may not have to do anything at all to get acceptable
20478 XHTML output for your own environments, custom insets, and so forth.
20479 But in some cases you will, and so LyX provides a number of layout tags
20480 that can be used to customize the XHTML and CSS that are generated.
20483 \begin_layout Standard
20484 Note that there are two tags,
20485 \begin_inset Flex Code
20488 \begin_layout Plain Layout
20495 \begin_inset Flex Code
20498 \begin_layout Plain Layout
20504 that may appear outside style and inset declarations.
20506 \begin_inset CommandInset ref
20508 reference "sub:General-text-class"
20512 for details on these.
20515 \begin_layout Subsection
20516 \begin_inset CommandInset label
20518 name "sub:Paragraph-Style-XHTML"
20525 \begin_layout Standard
20526 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20527 dealing with a normal paragraph, a command, or an environment, where this
20528 is itself determined by the contents of the corresponding
20529 \begin_inset Flex Code
20532 \begin_layout Plain Layout
20542 \begin_layout Standard
20543 For a command or normal paragraph, the output XHTML has the following form:
20546 \begin_layout LyX-Code
20548 \begin_inset Quotes erd
20552 \begin_inset Quotes erd
20558 \begin_layout LyX-Code
20560 \begin_inset Quotes erd
20564 \begin_inset Quotes erd
20570 \begin_layout LyX-Code
20571 Contents of the paragraph.
20574 \begin_layout LyX-Code
20578 \begin_layout Standard
20579 The label tags are of course omitted if the paragraph does not have a label.
20582 \begin_layout Standard
20583 For an environment that is not some sort of list, the XHTML takes this form:
20586 \begin_layout LyX-Code
20588 \begin_inset Quotes erd
20592 \begin_inset Quotes erd
20598 \begin_layout LyX-Code
20600 \begin_inset Quotes erd
20604 \begin_inset Quotes erd
20608 \begin_inset Quotes erd
20612 \begin_inset Quotes erd
20615 >Environment Label</labeltag>First paragraph.</itemtag>
20618 \begin_layout LyX-Code
20619 <itemtag>Second paragraph.</itemtag>
20622 \begin_layout LyX-Code
20626 \begin_layout Standard
20627 Note that the label is output only for the first paragraph, as it should
20628 be for a theorem, for example.
20632 \begin_layout Standard
20633 For a list, we have one of these forms:
20636 \begin_layout LyX-Code
20638 \begin_inset Quotes erd
20642 \begin_inset Quotes erd
20648 \begin_layout LyX-Code
20650 \begin_inset Quotes erd
20654 \begin_inset Quotes erd
20658 \begin_inset Quotes erd
20662 \begin_inset Quotes erd
20665 >List Label</labeltag>First item.</itemtag>
20668 \begin_layout LyX-Code
20670 \begin_inset Quotes erd
20674 \begin_inset Quotes erd
20678 \begin_inset Quotes erd
20682 \begin_inset Quotes erd
20685 >List Label</labeltag>Second item.</itemtag>
20688 \begin_layout LyX-Code
20692 \begin_layout LyX-Code
20696 \begin_layout LyX-Code
20698 \begin_inset Quotes erd
20702 \begin_inset Quotes erd
20708 \begin_layout LyX-Code
20710 \begin_inset Quotes erd
20714 \begin_inset Quotes erd
20717 >List Label</labeltag><itemtag attr=
20718 \begin_inset Quotes erd
20722 \begin_inset Quotes erd
20725 >First item.</itemtag>
20728 \begin_layout LyX-Code
20730 \begin_inset Quotes erd
20734 \begin_inset Quotes erd
20737 >List Label</labeltag><itemtag attr=
20738 \begin_inset Quotes erd
20742 \begin_inset Quotes erd
20745 >Second item.</itemtag>
20748 \begin_layout LyX-Code
20752 \begin_layout Standard
20753 Note the different orders of
20754 \begin_inset Flex Code
20757 \begin_layout Plain Layout
20764 \begin_inset Flex Code
20767 \begin_layout Plain Layout
20774 Which order we get depends upon the setting of
20775 \begin_inset Flex Code
20778 \begin_layout Plain Layout
20785 \begin_inset Flex Code
20788 \begin_layout Plain Layout
20794 is false (the default), you get the first of these, with the label within
20795 the item; if true, you get the second, with the label outside the item.
20798 \begin_layout Standard
20799 The specific tags and attributes output for each paragraph type can be controlle
20800 d by means of the layout tags we are about to describe.
20801 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20802 so you often may not need to do very much to get good XHTML output.
20803 Think of the available tags as there so you can tweak things to your liking.
20806 \begin_layout Description
20807 \begin_inset Flex Code
20810 \begin_layout Plain Layout
20817 \begin_inset Flex Code
20820 \begin_layout Plain Layout
20826 ] Specifies attribute information to be output with the main tag.
20828 \begin_inset Quotes eld
20832 \begin_inset Flex Code
20835 \begin_layout Plain Layout
20842 \begin_inset Quotes erd
20846 By default, LyX will output
20847 \begin_inset Quotes eld
20851 \begin_inset Flex Code
20854 \begin_layout Plain Layout
20861 \begin_inset Quotes erd
20865 \begin_inset Flex Code
20868 \begin_layout Plain Layout
20874 is the LyX name of the layout, made lowercase, for example: chapter.
20879 contain any style information.
20881 \begin_inset Flex Code
20884 \begin_layout Plain Layout
20893 \begin_layout Description
20894 \begin_inset Flex Code
20897 \begin_layout Plain Layout
20904 \begin_inset Flex Code
20907 \begin_layout Plain Layout
20917 ] Whether to output the default CSS information LyX generates for this layout,
20918 even if additional information is explicitly provided via
20919 \begin_inset Flex Code
20922 \begin_layout Plain Layout
20930 \begin_inset Flex Code
20933 \begin_layout Plain Layout
20939 allows you to alter or augment the generated CSS, rather than to override
20942 \begin_inset Flex Code
20945 \begin_layout Plain Layout
20954 \begin_layout Description
20955 \begin_inset Flex Code
20958 \begin_layout Plain Layout
20965 \begin_inset Flex Code
20968 \begin_layout Plain Layout
20974 ] The tag to be used for individual paragraphs of environments, replacing
20976 \begin_inset Flex Code
20979 \begin_layout Plain Layout
20985 in the examples above.
20987 \begin_inset Flex Code
20990 \begin_layout Plain Layout
20999 \begin_layout Description
21000 \begin_inset Flex Code
21003 \begin_layout Plain Layout
21010 \begin_inset Flex Code
21013 \begin_layout Plain Layout
21019 ] Attributes for the item tag.
21021 \begin_inset Quotes eld
21025 \begin_inset Flex Code
21028 \begin_layout Plain Layout
21029 class=`layoutname_item'
21035 \begin_inset Quotes erd
21043 contain any style information.
21045 \begin_inset Flex Code
21048 \begin_layout Plain Layout
21057 \begin_layout Description
21058 \begin_inset Flex Code
21061 \begin_layout Plain Layout
21068 \begin_inset Flex Code
21071 \begin_layout Plain Layout
21077 ] The tag to be used for paragraph and item labels, replacing
21078 \begin_inset Flex Code
21081 \begin_layout Plain Layout
21087 in the examples above.
21089 \begin_inset Flex Code
21092 \begin_layout Plain Layout
21099 \begin_inset Flex Code
21102 \begin_layout Plain Layout
21109 \begin_inset Flex Code
21112 \begin_layout Plain Layout
21119 \begin_inset Flex Code
21122 \begin_layout Plain Layout
21123 Centered_Top_Environment
21128 , in which case it defaults to
21129 \begin_inset Flex Code
21132 \begin_layout Plain Layout
21141 \begin_layout Description
21142 \begin_inset Flex Code
21145 \begin_layout Plain Layout
21152 \begin_inset Flex Code
21155 \begin_layout Plain Layout
21161 ] Attributes for the label tag.
21163 \begin_inset Quotes eld
21167 \begin_inset Flex Code
21170 \begin_layout Plain Layout
21171 class=`layoutname_label'
21177 \begin_inset Quotes erd
21185 contain any style information.
21187 \begin_inset Flex Code
21190 \begin_layout Plain Layout
21199 \begin_layout Description
21200 \begin_inset Flex Code
21203 \begin_layout Plain Layout
21210 \begin_inset Flex Code
21213 \begin_layout Plain Layout
21223 ] Meaningful only for list-like environments, this tag controls whether
21224 the label tag is output before or inside the item tag.
21225 This is used, for example, in the description environment, where we want
21227 \begin_inset Flex Code
21230 \begin_layout Plain Layout
21231 <dt>\SpecialChar \ldots{}
21232 </dt><dd>\SpecialChar \ldots{}
21240 \begin_inset Flex Code
21243 \begin_layout Plain Layout
21249 : The label tag is output inside the item tag.
21252 \begin_layout Description
21253 \begin_inset Flex Code
21256 \begin_layout Plain Layout
21262 Information to be output in the
21263 \begin_inset Flex Code
21266 \begin_layout Plain Layout
21272 section when this style is used.
21273 This might, for example, be used to include a
21274 \begin_inset Flex Code
21277 \begin_layout Plain Layout
21284 \begin_inset Flex Code
21287 \begin_layout Plain Layout
21296 \begin_layout Description
21297 \begin_inset Flex Code
21300 \begin_layout Plain Layout
21306 CSS style information to be included when this style is used.
21307 Note that this will automatically be wrapped in a layout-generated
21308 \begin_inset Flex Code
21311 \begin_layout Plain Layout
21317 block, so only the CSS itself need be included.
21319 \change_inserted 1414654397 1364133464
21321 \begin_inset Flex Code
21324 \begin_layout Plain Layout
21326 \change_inserted 1414654397 1364133462
21339 \begin_layout Description
21340 \begin_inset Flex Code
21343 \begin_layout Plain Layout
21350 \begin_inset Flex Code
21353 \begin_layout Plain Layout
21359 ] The tag to be used for the main label, replacing
21360 \begin_inset Flex Code
21363 \begin_layout Plain Layout
21369 in the examples above.
21371 \begin_inset Flex Code
21374 \begin_layout Plain Layout
21383 \begin_layout Description
21384 \begin_inset Flex Code
21387 \begin_layout Plain Layout
21394 \begin_inset Flex Code
21397 \begin_layout Plain Layout
21407 ] Marks this style as the one to be used to generate the
21408 \begin_inset Flex Code
21411 \begin_layout Plain Layout
21417 tag for the XHTML file.
21418 By default, it is false.
21420 \begin_inset Flex Code
21423 \begin_layout Plain Layout
21429 file sets it to true for the
21430 \begin_inset Flex Code
21433 \begin_layout Plain Layout
21443 \begin_layout Subsection
21447 \begin_layout Standard
21448 The XHTML output of insets can also be controlled by information in layout
21453 \begin_layout Plain Layout
21454 At present, this is true only for
21455 \begin_inset Quotes eld
21459 \begin_inset Quotes erd
21462 insets (insets you can type into) and is not true for
21463 \begin_inset Quotes eld
21467 \begin_inset Quotes erd
21470 insets (insets that are associated with dialog boxes).
21475 Here, too, LyX tries to provide sensible defaults, and it constructs default
21477 But everything can be customized.
21480 \begin_layout Standard
21481 The XHTML LyX outputs for an inset has the following form:
21484 \begin_layout LyX-Code
21486 \begin_inset Quotes erd
21490 \begin_inset Quotes erd
21496 \begin_layout LyX-Code
21497 <labeltag>Label</labeltag>
21500 \begin_layout LyX-Code
21502 \begin_inset Quotes erd
21506 \begin_inset Quotes erd
21509 >Contents of the inset.</innertag>
21512 \begin_layout LyX-Code
21516 \begin_layout Standard
21517 If the inset permits multiple paragraphs---that is, if
21518 \begin_inset Flex Code
21521 \begin_layout Plain Layout
21527 is true---then the contents of the inset will itself be output as paragraphs
21528 formatted according to the styles used for those paragraphs (standard,
21529 quote, and the like).
21530 The label tag is of course omitted if the paragraph does not have a label
21531 and, at present, is always
21532 \begin_inset Flex Code
21535 \begin_layout Plain Layout
21542 The inner tag is optional and, by default, does not appear.
21545 \begin_layout Standard
21546 The specific tags and attributes output for each inset can be controlled
21547 by means of the following layout tags.
21550 \begin_layout Description
21551 \begin_inset Flex Code
21554 \begin_layout Plain Layout
21561 \begin_inset Flex Code
21564 \begin_layout Plain Layout
21570 ] Specifies attribute information to be output with the main tag.
21572 \begin_inset Quotes eld
21576 \begin_inset Flex Code
21579 \begin_layout Plain Layout
21580 class=`myinset' onclick=`\SpecialChar \ldots{}
21587 \begin_inset Quotes erd
21591 By default, LyX will output
21592 \begin_inset Quotes eld
21596 \begin_inset Flex Code
21599 \begin_layout Plain Layout
21606 \begin_inset Quotes erd
21610 \begin_inset Flex Code
21613 \begin_layout Plain Layout
21619 is the LyX name of the inset, made lowercase and with non-alphanumeric
21620 characters converted to underscores, for example: footnote.
21623 \begin_layout Description
21624 \begin_inset Flex Code
21627 \begin_layout Plain Layout
21634 \begin_inset Flex Code
21637 \begin_layout Plain Layout
21647 ] Whether to output the default CSS information LyX generates for this layout,
21648 even if additional information is explicitly provided via
21649 \begin_inset Flex Code
21652 \begin_layout Plain Layout
21660 \begin_inset Flex Code
21663 \begin_layout Plain Layout
21669 allows you to alter or augment the generated CSS, rather than to override
21674 \begin_layout Description
21675 \begin_inset Flex Code
21678 \begin_layout Plain Layout
21685 \begin_inset Flex Code
21688 \begin_layout Plain Layout
21694 ] Attributes for the inner tag.
21696 \begin_inset Quotes eld
21700 \begin_inset Flex Code
21703 \begin_layout Plain Layout
21704 class=`insetname_inner'
21710 \begin_inset Quotes erd
21716 \begin_layout Description
21717 \begin_inset Flex Code
21720 \begin_layout Plain Layout
21727 \begin_inset Flex Code
21730 \begin_layout Plain Layout
21736 ] The inner tag, replacing
21737 \begin_inset Flex Code
21740 \begin_layout Plain Layout
21746 in the examples above.
21747 By default, there is none.
21750 \begin_layout Description
21751 \begin_inset Flex Code
21754 \begin_layout Plain Layout
21761 \begin_inset Flex Code
21764 \begin_layout Plain Layout
21772 ] Whether this inset represents a standalone block of text (such as a footnote)
21773 or instead represents material that is included in the surrounding text
21774 (such as a branch).
21778 \begin_layout Description
21779 \begin_inset Flex Code
21782 \begin_layout Plain Layout
21789 \begin_inset Flex Code
21792 \begin_layout Plain Layout
21798 ] A label for this inset, possibly including a reference to a counter.
21799 For example, for footnote, it might be:
21800 \begin_inset Flex Code
21803 \begin_layout Plain Layout
21812 This is optional, and there is no default.
21815 \begin_layout Description
21816 \begin_inset Flex Code
21819 \begin_layout Plain Layout
21825 Information to be output in the
21826 \begin_inset Flex Code
21829 \begin_layout Plain Layout
21835 section when this style is used.
21836 This might, for example, be used to include a
21837 \begin_inset Flex Code
21840 \begin_layout Plain Layout
21847 \begin_inset Flex Code
21850 \begin_layout Plain Layout
21859 \begin_layout Description
21860 \begin_inset Flex Code
21863 \begin_layout Plain Layout
21869 CSS style information to be included when this style is used.
21870 Note that this will automatically be wrapped in a layout-generated
21871 \begin_inset Flex Code
21874 \begin_layout Plain Layout
21880 block, so only the CSS itself need be included.
21883 \begin_layout Description
21884 \begin_inset Flex Code
21887 \begin_layout Plain Layout
21894 \begin_inset Flex Code
21897 \begin_layout Plain Layout
21903 ] The tag to be used for the main label, replacing
21904 \begin_inset Flex Code
21907 \begin_layout Plain Layout
21913 in the examples above.
21914 The default depends upon the setting of
21915 \begin_inset Flex Code
21918 \begin_layout Plain Layout
21925 \begin_inset Flex Code
21928 \begin_layout Plain Layout
21934 is true, the default is
21935 \begin_inset Flex Code
21938 \begin_layout Plain Layout
21944 ; if it is false, the default is
21945 \begin_inset Flex Code
21948 \begin_layout Plain Layout
21957 \begin_layout Subsection
21961 \begin_layout Standard
21962 The XHTML output for floats too can be controlled by layout information.
21963 The output has the following form:
21966 \begin_layout LyX-Code
21968 \begin_inset Quotes erd
21972 \begin_inset Quotes erd
21978 \begin_layout LyX-Code
21979 Contents of the float.
21982 \begin_layout LyX-Code
21986 \begin_layout Standard
21987 The caption, if there is one, is a separate inset and will be output as
21989 Its appearance can be controlled via the InsetLayout for caption insets.
21993 \begin_layout Description
21994 \begin_inset Flex Code
21997 \begin_layout Plain Layout
22004 \begin_inset Flex Code
22007 \begin_layout Plain Layout
22013 ] Specifies attribute information to be output with the main tag.
22015 \begin_inset Quotes eld
22019 \begin_inset Flex Code
22022 \begin_layout Plain Layout
22023 class=`myfloat' onclick=`\SpecialChar \ldots{}
22030 \begin_inset Quotes erd
22034 By default, LyX will output
22035 \begin_inset Quotes eld
22039 \begin_inset Flex Code
22042 \begin_layout Plain Layout
22043 class=`float float-floattype'
22049 \begin_inset Quotes erd
22053 \begin_inset Flex Code
22056 \begin_layout Plain Layout
22062 is LyX's name for this type of float, as determined by the float declaration
22064 \begin_inset CommandInset ref
22066 reference "sub:Floats"
22070 ), though made lowercase and with non-alphanumeric characters converted
22071 to underscores, for example: float-table.
22074 \begin_layout Description
22075 \begin_inset Flex Code
22078 \begin_layout Plain Layout
22084 CSS style information to be included when this float is used.
22085 Note that this will automatically be wrapped in a layout-generated
22086 \begin_inset Flex Code
22089 \begin_layout Plain Layout
22095 block, so only the CSS itself need be included.
22098 \begin_layout Description
22099 \begin_inset Flex Code
22102 \begin_layout Plain Layout
22109 \begin_inset Flex Code
22112 \begin_layout Plain Layout
22118 ] The tag to be used for this float, replacing
22119 \begin_inset Quotes eld
22123 \begin_inset Flex Code
22126 \begin_layout Plain Layout
22133 \begin_inset Quotes erd
22136 in the example above.
22138 \begin_inset Flex Code
22141 \begin_layout Plain Layout
22147 and will rarely need changing.
22150 \begin_layout Subsection
22151 Bibliography formatting
22154 \begin_layout Standard
22155 The bibliography can be formatted using
22156 \begin_inset Flex Code
22159 \begin_layout Plain Layout
22167 \begin_inset CommandInset ref
22169 reference "sub:Citation-format-description"
22176 \begin_layout Subsection
22180 \begin_layout Standard
22181 We have several times mentioned that LyX will generate default CSS style
22182 rules for both insets and paragraph styles, based upon the other layout
22183 information that is provided.
22184 In this section, we shall say a word about which layout information LyX
22188 \begin_layout Standard
22189 At present, LyX auto-generates CSS only for font information, making use
22191 \begin_inset Flex Code
22194 \begin_layout Plain Layout
22201 \begin_inset Flex Code
22204 \begin_layout Plain Layout
22211 \begin_inset Flex Code
22214 \begin_layout Plain Layout
22221 \begin_inset Flex Code
22224 \begin_layout Plain Layout
22231 \begin_inset Flex Code
22234 \begin_layout Plain Layout
22241 \begin_inset CommandInset ref
22243 reference "sub:Font-description"
22248 The translation is mostly straightforward and obvious.
22250 \begin_inset Quotes eld
22254 \begin_inset Flex Code
22257 \begin_layout Plain Layout
22264 \begin_inset Quotes erd
22268 \begin_inset Quotes eld
22272 \begin_inset Flex Code
22275 \begin_layout Plain Layout
22276 font-family: sans-serif;
22282 \begin_inset Quotes erd
22286 The correspondence of LyX sizes and CSS sizes is a little less obvious
22287 but nonetheless intuitive.
22289 \begin_inset Flex Code
22292 \begin_layout Plain Layout
22299 \begin_inset Flex URL
22302 \begin_layout Plain Layout
22312 \begin_layout Chapter
22313 Including External Material
22314 \begin_inset CommandInset label
22316 name "chap:Including-External-Material"
22323 \begin_layout Standard
22324 \begin_inset Box Shadowbox
22334 height_special "totalheight"
22337 \begin_layout Plain Layout
22338 WARNING: This portion of the documentation has not been updated for some
22340 We certainly hope that it is still accurate, but there are no guarantees.
22348 \begin_layout Standard
22349 The use of material from sources external to LyX is covered in detail in
22355 This part of the manual covers what needs to happen behind the scenes for
22356 new sorts of material to be included.
22359 \begin_layout Section
22363 \begin_layout Standard
22364 The external material feature is based on the concept of a
22369 A template is a specification of how LyX should interface with a certain
22371 As bundled, LyX comes with predefined templates for Xfig figures, various
22372 raster format images, chess diagrams, and LilyPond music notation.
22373 You can check the actual list by using the menu
22374 \begin_inset Flex MenuItem
22377 \begin_layout Plain Layout
22378 Insert\SpecialChar \menuseparator
22379 File\SpecialChar \menuseparator
22386 Furthermore, it is possible to roll your own template to support a specific
22388 Later we'll describe in more detail what is involved, and hopefully you
22389 will submit all the templates you create so we can include them in a later
22393 \begin_layout Standard
22394 Another basic idea of the external material feature is to distinguish between
22395 the original file that serves as a base for final material and the produced
22396 file that is included in your exported or printed document.
22397 For example, consider the case of a figure produced with
22398 \begin_inset Flex Code
22401 \begin_layout Plain Layout
22408 The Xfig application itself works on an original file with the
22409 \begin_inset Flex Code
22412 \begin_layout Plain Layout
22419 Within Xfig, you create and change your figure, and when you are done,
22421 \begin_inset Flex Code
22424 \begin_layout Plain Layout
22431 When you want to include the figure in your document, you invoke
22432 \begin_inset Flex Code
22435 \begin_layout Plain Layout
22441 in order to create a PostScript file that can readily be included in your
22444 \begin_inset Flex Code
22447 \begin_layout Plain Layout
22453 file is the original file, and the PostScript file is the produced file.
22456 \begin_layout Standard
22457 This distinction is important in order to allow updating of the material
22458 while you are in the process of writing the document.
22459 Furthermore, it provides us with the flexibility that is needed to support
22460 multiple export formats.
22461 For instance, in the case of a plain text file, it is not exactly an award-winn
22462 ing idea to include the figure as raw PostScript.
22463 Instead, you would either prefer to just include a reference to the figure
22464 or try to invoke some graphics to ASCII converter to make the final result
22465 look similar to the real graphics.
22466 The external material management allows you to do this, because it is parametri
22467 zed on the different export formats that LyX supports.
22470 \begin_layout Standard
22471 Besides supporting the production of different products according to the
22472 exported format, it supports tight integration with editing and viewing
22474 In the case of an Xfig figure, you are able to invoke Xfig on the original
22475 file with a single click from within the external material dialog in LyX,
22476 and also preview the produced PostScript file with Ghostview with another
22478 No more fiddling around with the command line and/or file browsers to locate
22479 and manipulate the original or produced files.
22480 In this way, you are finally able to take full advantage of the many different
22481 applications that are relevant to use when you write your documents, and
22482 ultimately be more productive.
22485 \begin_layout Section
22486 The external template configuration file
22489 \begin_layout Standard
22490 It is relatively easy to add custom external template definitions to LyX.
22491 However, be aware that doing this in an careless manner most probably
22495 introduce an easily exploitable security hole.
22496 So before you do this, please read the discussion about security in
22497 \begin_inset CommandInset ref
22499 reference "sec:Security-discussion"
22506 \begin_layout Standard
22507 Having said that, we encourage you to submit any interesting templates that
22512 \begin_layout Standard
22513 The external templates are defined in the
22514 \begin_inset Flex Code
22517 \begin_layout Plain Layout
22518 LyXDir/lib/external_templates
22524 You can place your own version in
22525 \begin_inset Flex Code
22528 \begin_layout Plain Layout
22529 UserDir/external_templates
22537 \begin_layout Standard
22538 A typical template looks like this:
22541 \begin_layout LyX-Code
22545 \begin_layout LyX-Code
22546 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22549 \begin_layout LyX-Code
22553 \begin_layout LyX-Code
22557 \begin_layout LyX-Code
22561 \begin_layout LyX-Code
22565 \begin_layout LyX-Code
22569 \begin_layout LyX-Code
22570 AutomaticProduction true
22573 \begin_layout LyX-Code
22577 \begin_layout LyX-Code
22581 \begin_layout LyX-Code
22585 \begin_layout LyX-Code
22586 TransformCommand Rotate RotationLatexCommand
22589 \begin_layout LyX-Code
22590 TransformCommand Resize ResizeLatexCommand
22593 \begin_layout LyX-Code
22594 Product "$$RotateFront$$ResizeFront
22597 \begin_layout LyX-Code
22602 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22605 \begin_layout LyX-Code
22606 $$ResizeBack$$RotateBack"
22609 \begin_layout LyX-Code
22613 \begin_layout LyX-Code
22614 UpdateResult "$$AbsPath$$Basename.pstex_t"
22617 \begin_layout LyX-Code
22618 Requirement "graphicx"
22621 \begin_layout LyX-Code
22622 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22625 \begin_layout LyX-Code
22626 ReferencedFile latex "$$AbsPath$$Basename.eps"
22629 \begin_layout LyX-Code
22630 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22633 \begin_layout LyX-Code
22637 \begin_layout LyX-Code
22641 \begin_layout LyX-Code
22642 TransformCommand Rotate RotationLatexCommand
22645 \begin_layout LyX-Code
22646 TransformCommand Resize ResizeLatexCommand
22649 \begin_layout LyX-Code
22650 Product "$$RotateFront$$ResizeFront
22653 \begin_layout LyX-Code
22658 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22661 \begin_layout LyX-Code
22662 $$ResizeBack$$RotateBack"
22665 \begin_layout LyX-Code
22666 UpdateFormat pdftex
22669 \begin_layout LyX-Code
22670 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22673 \begin_layout LyX-Code
22674 Requirement "graphicx"
22677 \begin_layout LyX-Code
22678 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22681 \begin_layout LyX-Code
22682 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22685 \begin_layout LyX-Code
22689 \begin_layout LyX-Code
22693 \begin_layout LyX-Code
22694 Product "$$Contents(
22696 "$$AbsPath$$Basename.asc
22701 \begin_layout LyX-Code
22702 UpdateFormat asciixfig
22705 \begin_layout LyX-Code
22706 UpdateResult "$$AbsPath$$Basename.asc"
22709 \begin_layout LyX-Code
22713 \begin_layout LyX-Code
22717 \begin_layout LyX-Code
22718 Product "<graphic fileref=
22720 "$$AbsOrRelPathMaster$$Basename.eps
22725 \begin_layout LyX-Code
22729 \begin_layout LyX-Code
22733 \begin_layout LyX-Code
22734 UpdateResult "$$AbsPath$$Basename.eps"
22737 \begin_layout LyX-Code
22738 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22741 \begin_layout LyX-Code
22742 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22745 \begin_layout LyX-Code
22749 \begin_layout LyX-Code
22750 Product "[XFig: $$FName]"
22753 \begin_layout LyX-Code
22757 \begin_layout LyX-Code
22761 \begin_layout Standard
22762 As you can see, the template is enclosed in
22763 \begin_inset Flex Code
22766 \begin_layout Plain Layout
22772 \SpecialChar \ldots{}
22774 \begin_inset Flex Code
22777 \begin_layout Plain Layout
22784 It contains a header specifying some general settings and, for each supported
22785 primary document file format, a section
22786 \begin_inset Flex Code
22789 \begin_layout Plain Layout
22795 \SpecialChar \ldots{}
22797 \begin_inset Flex Code
22800 \begin_layout Plain Layout
22809 \begin_layout Subsection
22810 The template header
22813 \begin_layout Description
22814 \begin_inset Flex Code
22817 \begin_layout Plain Layout
22818 AutomaticProduction
22819 \begin_inset space ~
22827 Whether the file represented by the template must be generated by LyX.
22828 This command must occur exactly once.
22831 \begin_layout Description
22832 \begin_inset Flex Code
22835 \begin_layout Plain Layout
22837 \begin_inset space ~
22845 A glob pattern that is used in the file dialog to filter out the desired
22847 If there is more than one possible file extension (e.
22848 \begin_inset space \thinspace{}
22852 \begin_inset space \space{}
22856 \begin_inset Flex Code
22859 \begin_layout Plain Layout
22866 \begin_inset Flex Code
22869 \begin_layout Plain Layout
22875 ), use something like
22876 \begin_inset Flex Code
22879 \begin_layout Plain Layout
22886 This command must occur exactly once.
22889 \begin_layout Description
22890 \begin_inset Flex Code
22893 \begin_layout Plain Layout
22895 \begin_inset space ~
22903 The text that is displayed on the button.
22904 This command must occur exactly once.
22907 \begin_layout Description
22908 \begin_inset Flex Code
22911 \begin_layout Plain Layout
22913 \begin_inset space ~
22917 \begin_inset space ~
22925 The help text that is used in the External dialog.
22926 Provide enough information to explain to the user just what the template
22927 can provide him with.
22928 This command must occur exactly once.
22931 \begin_layout Description
22932 \begin_inset Flex Code
22935 \begin_layout Plain Layout
22937 \begin_inset space ~
22945 The file format of the original file.
22946 This must be the name of a format that is known to LyX (see
22947 \begin_inset CommandInset ref
22949 reference "sec:Formats"
22955 \begin_inset Quotes eld
22959 \begin_inset Flex Code
22962 \begin_layout Plain Layout
22969 \begin_inset Quotes erd
22972 if the template can handle original files of more than one format.
22973 LyX will attempt to interrogate the file itself in order to deduce its
22974 format in this case.
22975 This command must occur exactly once.
22978 \begin_layout Description
22979 \begin_inset Flex Code
22982 \begin_layout Plain Layout
22984 \begin_inset space ~
22992 A unique name for the template.
22993 It must not contain substitution macros (see below).
22996 \begin_layout Description
22997 \begin_inset Flex Code
23000 \begin_layout Plain Layout
23002 \begin_inset space ~
23005 Rotate|Resize|Clip|Extra
23010 This command specifies which transformations are supported by this template.
23011 It may occur zero or more times.
23012 This command enables the corresponding tabs in the external dialog.
23014 \begin_inset Flex Code
23017 \begin_layout Plain Layout
23023 command must have either a corresponding
23024 \begin_inset Flex Code
23027 \begin_layout Plain Layout
23034 \begin_inset Flex Code
23037 \begin_layout Plain Layout
23044 \begin_inset Flex Code
23047 \begin_layout Plain Layout
23054 Otherwise the transformation will not be supported by that format.
23057 \begin_layout Subsection
23061 \begin_layout Description
23062 \begin_inset Flex Code
23065 \begin_layout Plain Layout
23067 \begin_inset space ~
23070 LaTeX|PDFLaTeX|PlainText|DocBook
23075 The primary document file format that this format definition is for.
23076 Not every template has a sensible representation in all document file formats.
23077 Please define nevertheless a
23078 \begin_inset Flex Code
23081 \begin_layout Plain Layout
23087 section for all templates.
23088 Use a dummy text when no representation is available.
23089 Then you can at least see a reference to the external material in the exported
23093 \begin_layout Description
23094 \begin_inset Flex Code
23097 \begin_layout Plain Layout
23099 \begin_inset space ~
23103 \begin_inset space ~
23111 This command defines an additional macro
23112 \begin_inset Flex Code
23115 \begin_layout Plain Layout
23121 for substitution in
23122 \begin_inset Flex Code
23125 \begin_layout Plain Layout
23133 \begin_inset Flex Code
23136 \begin_layout Plain Layout
23142 itself may contain substitution macros.
23143 The advantage over using
23144 \begin_inset Flex Code
23147 \begin_layout Plain Layout
23154 \begin_inset Flex Code
23157 \begin_layout Plain Layout
23163 is that the substituted value of
23164 \begin_inset Flex Code
23167 \begin_layout Plain Layout
23173 is sanitized so that it is a valid optional argument in the document format.
23174 This command may occur zero or more times.
23177 \begin_layout Description
23178 \begin_inset Flex Code
23181 \begin_layout Plain Layout
23183 \begin_inset space ~
23191 The text that is inserted in the exported document.
23192 This is actually the most important command and can be quite complex.
23193 This command must occur exactly once.
23196 \begin_layout Description
23197 \begin_inset Flex Code
23200 \begin_layout Plain Layout
23202 \begin_inset space ~
23210 This command specifies a preamble snippet that will be included in the
23212 It has to be defined using
23213 \begin_inset Flex Code
23216 \begin_layout Plain Layout
23222 \SpecialChar \ldots{}
23224 \begin_inset Flex Code
23227 \begin_layout Plain Layout
23234 This command may occur zero or more times.
23237 \begin_layout Description
23238 \begin_inset Flex Code
23241 \begin_layout Plain Layout
23243 \begin_inset space ~
23247 \begin_inset space ~
23255 This command denotes files that are created by the conversion process and
23256 are needed for a particular export format.
23257 If the filename is relative, it is interpreted relative to the master document.
23258 This command may be given zero or more times.
23261 \begin_layout Description
23262 \begin_inset Flex Code
23265 \begin_layout Plain Layout
23267 \begin_inset space ~
23275 The name of a required LaTeX package.
23276 The package is included via
23277 \begin_inset Flex Code
23280 \begin_layout Plain Layout
23288 in the LaTeX preamble.
23289 This command may occur zero or more times.
23292 \begin_layout Description
23293 \begin_inset Flex Code
23296 \begin_layout Plain Layout
23298 \begin_inset space ~
23302 \begin_inset space ~
23305 RotationLatexCommand
23310 This command specifies that the built in LaTeX command should be used for
23312 This command may occur once or not at all.
23315 \begin_layout Description
23316 \begin_inset Flex Code
23319 \begin_layout Plain Layout
23321 \begin_inset space ~
23325 \begin_inset space ~
23333 This command specifies that the built in LaTeX command should be used for
23335 This command may occur once or not at all.
23338 \begin_layout Description
23339 \begin_inset Flex Code
23342 \begin_layout Plain Layout
23344 \begin_inset space ~
23348 \begin_inset space ~
23351 RotationLatexOption
23356 This command specifies that rotation is done via an optional argument.
23357 This command may occur once or not at all.
23360 \begin_layout Description
23361 \begin_inset Flex Code
23364 \begin_layout Plain Layout
23366 \begin_inset space ~
23370 \begin_inset space ~
23378 This command specifies that resizing is done via an optional argument.
23379 This command may occur once or not at all.
23382 \begin_layout Description
23383 \begin_inset Flex Code
23386 \begin_layout Plain Layout
23388 \begin_inset space ~
23392 \begin_inset space ~
23400 This command specifies that clipping is done via an optional argument.
23401 This command may occur once or not at all.
23404 \begin_layout Description
23405 \begin_inset Flex Code
23408 \begin_layout Plain Layout
23410 \begin_inset space ~
23414 \begin_inset space ~
23422 This command specifies that an extra optional argument is used.
23423 This command may occur once or not at all.
23426 \begin_layout Description
23427 \begin_inset Flex Code
23430 \begin_layout Plain Layout
23432 \begin_inset space ~
23440 The file format of the converted file.
23441 This must be the name of a format that is known to LyX (see the
23442 \begin_inset Flex MenuItem
23445 \begin_layout Plain Layout
23446 Tools\SpecialChar \menuseparator
23447 Preferences\SpecialChar \menuseparator
23448 File Handling\SpecialChar \menuseparator
23455 This command must occur exactly once.
23457 \change_inserted -195340706 1363813305
23458 If the resulting file format is PDF, you need to specify the format
23459 \begin_inset Flex Code
23462 \begin_layout Plain Layout
23464 \change_inserted -195340706 1363813269
23471 This is the PDF format used for including graphics.
23472 The other defined PDF formats are for document export.
23477 \begin_layout Description
23478 \begin_inset Flex Code
23481 \begin_layout Plain Layout
23483 \begin_inset space ~
23491 The file name of the converted file.
23492 The file name must be absolute.
23493 This command must occur exactly once.
23496 \begin_layout Subsection
23497 Preamble definitions
23500 \begin_layout Standard
23501 The external template configuration file may contain additional preamble
23502 definitions enclosed by
23503 \begin_inset Flex Code
23506 \begin_layout Plain Layout
23512 \SpecialChar \ldots{}
23514 \begin_inset Flex Code
23517 \begin_layout Plain Layout
23524 They can be used by the templates in the
23525 \begin_inset Flex Code
23528 \begin_layout Plain Layout
23537 \begin_layout Section
23538 The substitution mechanism
23541 \begin_layout Standard
23542 When the external material facility invokes an external program, it is done
23543 on the basis of a command defined in the template configuration file.
23544 These commands can contain various macros that are expanded before execution.
23545 Execution always take place in the directory of the containing document.
23548 \begin_layout Standard
23549 Also, whenever external material is to be displayed, the name will be produced
23550 by the substitution mechanism, and most other commands in the template
23551 definition support substitution as well.
23554 \begin_layout Standard
23555 The available macros are the following:
23558 \begin_layout Description
23559 \begin_inset Flex Code
23562 \begin_layout Plain Layout
23563 $$AbsOrRelPathMaster
23568 The file path, absolute or relative to the master LyX document.
23571 \begin_layout Description
23572 \begin_inset Flex Code
23575 \begin_layout Plain Layout
23576 $$AbsOrRelPathParent
23581 The file path, absolute or relative to the LyX document.
23584 \begin_layout Description
23585 \begin_inset Flex Code
23588 \begin_layout Plain Layout
23594 The absolute file path.
23597 \begin_layout Description
23598 \begin_inset Flex Code
23601 \begin_layout Plain Layout
23607 The filename without path and without the extension.
23610 \begin_layout Description
23611 \begin_inset Flex Code
23614 \begin_layout Plain Layout
23616 \begin_inset Quotes eld
23620 \begin_inset Quotes erd
23628 This macro will expand to the contents of the file with the name
23629 \begin_inset Flex Code
23632 \begin_layout Plain Layout
23641 \begin_layout Description
23642 \begin_inset Flex Code
23645 \begin_layout Plain Layout
23651 The file extension (including the dot).
23654 \begin_layout Description
23655 \begin_inset Flex Code
23658 \begin_layout Plain Layout
23664 The filename of the file specified in the external material dialog.
23665 This is either an absolute name, or it is relative to the LyX document.
23668 \begin_layout Description
23669 \begin_inset Flex Code
23672 \begin_layout Plain Layout
23679 \begin_inset Flex Code
23682 \begin_layout Plain Layout
23688 (absolute name or relative to the LyX document).
23691 \begin_layout Description
23692 \begin_inset Flex Code
23695 \begin_layout Plain Layout
23701 The file path, relative to the master LyX document.
23704 \begin_layout Description
23705 \begin_inset Flex Code
23708 \begin_layout Plain Layout
23714 The file path, relative to the LyX document.
23717 \begin_layout Description
23718 \begin_inset Flex Code
23721 \begin_layout Plain Layout
23727 This macro will expand to the absolute path of the system directory.
23728 This is typically used to point to the various helper scripts that are
23732 \begin_layout Description
23733 \begin_inset Flex Code
23736 \begin_layout Plain Layout
23742 A name and full path to a temporary file which will be automatically deleted
23743 whenever the containing document is closed, or the external material insertion
23747 \begin_layout Standard
23748 All path macros contain a trailing directory separator, so you can construct
23750 \begin_inset space \thinspace{}
23754 \begin_inset space \space{}
23757 the absolute filename with
23758 \begin_inset Flex Code
23761 \begin_layout Plain Layout
23762 $$AbsPath$$Basename$$Extension
23770 \begin_layout Standard
23771 The macros above are substituted in all commands unless otherwise noted.
23773 \begin_inset Flex Code
23776 \begin_layout Plain Layout
23782 supports additionally the following substitutions if they are enabled by
23784 \begin_inset Flex Code
23787 \begin_layout Plain Layout
23794 \begin_inset Flex Code
23797 \begin_layout Plain Layout
23806 \begin_layout Description
23807 \begin_inset Flex Code
23810 \begin_layout Plain Layout
23816 The front part of the resize command.
23819 \begin_layout Description
23820 \begin_inset Flex Code
23823 \begin_layout Plain Layout
23829 The back part of the resize command.
23832 \begin_layout Description
23833 \begin_inset Flex Code
23836 \begin_layout Plain Layout
23842 The front part of the rotation command.
23845 \begin_layout Description
23846 \begin_inset Flex Code
23849 \begin_layout Plain Layout
23855 The back part of the rotation command.
23858 \begin_layout Standard
23859 The value string of the
23860 \begin_inset Flex Code
23863 \begin_layout Plain Layout
23869 command supports additionally the following substitutions if they are enabled
23871 \begin_inset Flex Code
23874 \begin_layout Plain Layout
23881 \begin_inset Flex Code
23884 \begin_layout Plain Layout
23893 \begin_layout Description
23894 \begin_inset Flex Code
23897 \begin_layout Plain Layout
23906 \begin_layout Description
23907 \begin_inset Flex Code
23910 \begin_layout Plain Layout
23919 \begin_layout Description
23920 \begin_inset Flex Code
23923 \begin_layout Plain Layout
23932 \begin_layout Description
23933 \begin_inset Flex Code
23936 \begin_layout Plain Layout
23942 The rotation option.
23945 \begin_layout Standard
23946 You may ask why there are so many path macros.
23947 There are mainly two reasons:
23950 \begin_layout Enumerate
23951 Relative and absolute file names should remain relative or absolute, respectivel
23953 Users may have reasons to prefer either form.
23954 Relative names are useful for portable documents that should work on different
23955 machines, for example.
23956 Absolute names may be required by some programs.
23959 \begin_layout Enumerate
23960 LaTeX treats relative file names differently than LyX and other programs
23961 in nested included files.
23962 For LyX, a relative file name is always relative to the document that contains
23964 For LaTeX, it is always relative to the master document.
23965 These two definitions are identical if you have only one document, but
23966 differ if you have a master document that includes part documents.
23967 That means that relative filenames must be transformed when presented to
23969 Fortunately LyX does this automatically for you if you choose the right
23973 \begin_layout Standard
23974 So which path macro should be used in new template definitions? The rule
23978 \begin_layout Itemize
23980 \begin_inset Flex Code
23983 \begin_layout Plain Layout
23989 if an absolute path is required.
23992 \begin_layout Itemize
23994 \begin_inset Flex Code
23997 \begin_layout Plain Layout
23998 $$AbsOrRelPathMaster
24003 if the substituted string is some kind of LaTeX input.
24006 \begin_layout Itemize
24008 \begin_inset Flex Code
24011 \begin_layout Plain Layout
24012 $$AbsOrRelPathParent
24017 in order to preserve the user's choice.
24020 \begin_layout Standard
24021 There are special cases where this rule does not work and e.
24022 \begin_inset space \thinspace{}
24026 \begin_inset space \space{}
24029 relative names are needed, but normally it will work just fine.
24030 One example for such a case is the command
24031 \begin_inset Flex Code
24034 \begin_layout Plain Layout
24035 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24040 in the XFig template above: We can't use the absolute name because the
24042 \begin_inset Flex Code
24045 \begin_layout Plain Layout
24051 files needs the relative name in order to rewrite the file content.
24054 \begin_layout Section
24055 Security discussion
24056 \begin_inset CommandInset label
24058 name "sec:Security-discussion"
24065 \begin_layout Standard
24066 The external material feature interfaces with a lot of external programs
24067 and does so automatically, so we have to consider the security implications
24069 In particular, since you have the option of including your own filenames
24070 and/or parameter strings and those are expanded into a command, it seems
24071 that it would be possible to create a malicious document which executes
24072 arbitrary commands when a user views or prints the document.
24073 This is something we definitely want to avoid.
24076 \begin_layout Standard
24077 However, since the external program commands are specified in the template
24078 configuration file only, there are no security issues if LyX is properly
24079 configured with safe templates only.
24080 This is so because the external programs are invoked with the
24081 \begin_inset Flex Code
24084 \begin_layout Plain Layout
24090 -system call rather than the
24091 \begin_inset Flex Code
24094 \begin_layout Plain Layout
24100 system-call, so it's not possible to execute arbitrary commands from the
24101 filename or parameter section via the shell.
24104 \begin_layout Standard
24105 This also implies that you are restricted in what command strings you can
24106 use in the external material templates.
24107 In particular, pipes and redirection are not readily available.
24108 This has to be so if LyX should remain safe.
24109 If you want to use some of the shell features, you should write a safe
24110 script to do this in a controlled manner, and then invoke the script from
24111 the command string.
24115 \begin_layout Standard
24116 It is possible to design a template that interacts directly with the shell,
24117 but since this would allow a malicious user to execute arbitrary commands
24118 by writing clever filenames and/or parameters, we generally recommend that
24119 you only use safe scripts that work with the
24120 \begin_inset Flex Code
24123 \begin_layout Plain Layout
24129 system call in a controlled manner.
24130 Of course, for use in a controlled environment, it can be tempting to just
24131 fall back to use ordinary shell scripts.
24132 If you do so, be aware that you
24136 provide an easily exploitable security hole in your system.
24137 Of course it stands to reason that such unsafe templates will never be
24138 included in the standard LyX distribution, although we do encourage people
24139 to submit new templates in the open source tradition.
24140 But LyX as shipped from the official distribution channels will never have
24144 \begin_layout Standard
24145 Including external material provides a lot of power, and you have to be
24146 careful not to introduce security hazards with this power.
24147 A subtle error in a single line in an innocent looking script can open
24148 the door to huge security problems.
24149 So if you do not fully understand the issues, we recommend that you consult
24150 a knowledgeable security professional or the LyX development team if you
24151 have any questions about whether a given template is safe or not.
24152 And do this before you use it in an uncontrolled environment.
24155 \begin_layout Chapter
24157 List of supported LyX functions to be used in layouts
24158 \begin_inset CommandInset label
24160 name "chap:List-of-functions"
24167 \begin_layout Standard
24169 \begin_inset Tabular
24170 <lyxtabular version="3" rows="11" columns="8">
24171 <features rotate="0" tabularvalignment="middle">
24172 <column alignment="left" valignment="top">
24173 <column alignment="left" valignment="top">
24174 <column alignment="left" valignment="top">
24175 <column alignment="left" valignment="top">
24176 <column alignment="left" valignment="top">
24177 <column alignment="left" valignment="top">
24178 <column alignment="left" valignment="top">
24179 <column alignment="left" valignment="top">
24181 <cell alignment="left" valignment="top" usebox="none">
24184 \begin_layout Plain Layout
24190 <cell alignment="left" valignment="top" usebox="none">
24193 \begin_layout Plain Layout
24199 <cell alignment="left" valignment="top" usebox="none">
24202 \begin_layout Plain Layout
24208 <cell alignment="left" valignment="top" usebox="none">
24211 \begin_layout Plain Layout
24217 <cell alignment="center" valignment="top" usebox="none">
24220 \begin_layout Plain Layout
24226 <cell alignment="center" valignment="top" usebox="none">
24229 \begin_layout Plain Layout
24235 <cell alignment="center" valignment="top" usebox="none">
24238 \begin_layout Plain Layout
24244 <cell alignment="center" valignment="top" usebox="none">
24247 \begin_layout Plain Layout
24255 <cell alignment="left" valignment="top" usebox="none">
24258 \begin_layout Plain Layout
24264 <cell alignment="left" valignment="top" usebox="none">
24267 \begin_layout Plain Layout
24273 <cell alignment="left" valignment="top" usebox="none">
24276 \begin_layout Plain Layout
24282 <cell alignment="left" valignment="top" usebox="none">
24285 \begin_layout Plain Layout
24291 <cell alignment="center" valignment="top" usebox="none">
24294 \begin_layout Plain Layout
24300 <cell alignment="center" valignment="top" usebox="none">
24303 \begin_layout Plain Layout
24309 <cell alignment="center" valignment="top" usebox="none">
24312 \begin_layout Plain Layout
24318 <cell alignment="center" valignment="top" usebox="none">
24321 \begin_layout Plain Layout
24329 <cell alignment="left" valignment="top" usebox="none">
24332 \begin_layout Plain Layout
24338 <cell alignment="left" valignment="top" usebox="none">
24341 \begin_layout Plain Layout
24347 <cell alignment="left" valignment="top" usebox="none">
24350 \begin_layout Plain Layout
24356 <cell alignment="left" valignment="top" usebox="none">
24359 \begin_layout Plain Layout
24365 <cell alignment="center" valignment="top" usebox="none">
24368 \begin_layout Plain Layout
24374 <cell alignment="center" valignment="top" usebox="none">
24377 \begin_layout Plain Layout
24383 <cell alignment="center" valignment="top" usebox="none">
24386 \begin_layout Plain Layout
24392 <cell alignment="center" valignment="top" usebox="none">
24395 \begin_layout Plain Layout
24403 <cell alignment="left" valignment="top" usebox="none">
24406 \begin_layout Plain Layout
24412 <cell alignment="left" valignment="top" usebox="none">
24415 \begin_layout Plain Layout
24421 <cell alignment="left" valignment="top" usebox="none">
24424 \begin_layout Plain Layout
24430 <cell alignment="left" valignment="top" usebox="none">
24433 \begin_layout Plain Layout
24439 <cell alignment="center" valignment="top" usebox="none">
24442 \begin_layout Plain Layout
24448 <cell alignment="center" valignment="top" usebox="none">
24451 \begin_layout Plain Layout
24457 <cell alignment="center" valignment="top" usebox="none">
24460 \begin_layout Plain Layout
24466 <cell alignment="center" valignment="top" usebox="none">
24469 \begin_layout Plain Layout
24477 <cell alignment="left" valignment="top" usebox="none">
24480 \begin_layout Plain Layout
24486 <cell alignment="left" valignment="top" usebox="none">
24489 \begin_layout Plain Layout
24495 <cell alignment="left" valignment="top" usebox="none">
24498 \begin_layout Plain Layout
24504 <cell alignment="left" valignment="top" usebox="none">
24507 \begin_layout Plain Layout
24513 <cell alignment="center" valignment="top" usebox="none">
24516 \begin_layout Plain Layout
24522 <cell alignment="center" valignment="top" usebox="none">
24525 \begin_layout Plain Layout
24531 <cell alignment="center" valignment="top" usebox="none">
24534 \begin_layout Plain Layout
24540 <cell alignment="center" valignment="top" usebox="none">
24543 \begin_layout Plain Layout
24551 <cell alignment="left" valignment="top" usebox="none">
24554 \begin_layout Plain Layout
24560 <cell alignment="left" valignment="top" usebox="none">
24563 \begin_layout Plain Layout
24569 <cell alignment="left" valignment="top" usebox="none">
24572 \begin_layout Plain Layout
24578 <cell alignment="left" valignment="top" usebox="none">
24581 \begin_layout Plain Layout
24587 <cell alignment="center" valignment="top" usebox="none">
24590 \begin_layout Plain Layout
24596 <cell alignment="center" valignment="top" usebox="none">
24599 \begin_layout Plain Layout
24605 <cell alignment="center" valignment="top" usebox="none">
24608 \begin_layout Plain Layout
24614 <cell alignment="center" valignment="top" usebox="none">
24617 \begin_layout Plain Layout
24625 <cell alignment="left" valignment="top" usebox="none">
24628 \begin_layout Plain Layout
24634 <cell alignment="left" valignment="top" usebox="none">
24637 \begin_layout Plain Layout
24643 <cell alignment="left" valignment="top" usebox="none">
24646 \begin_layout Plain Layout
24652 <cell alignment="left" valignment="top" usebox="none">
24655 \begin_layout Plain Layout
24661 <cell alignment="center" valignment="top" usebox="none">
24664 \begin_layout Plain Layout
24670 <cell alignment="center" valignment="top" usebox="none">
24673 \begin_layout Plain Layout
24679 <cell alignment="center" valignment="top" usebox="none">
24682 \begin_layout Plain Layout
24688 <cell alignment="center" valignment="top" usebox="none">
24691 \begin_layout Plain Layout
24699 <cell alignment="left" valignment="top" usebox="none">
24702 \begin_layout Plain Layout
24708 <cell alignment="left" valignment="top" usebox="none">
24711 \begin_layout Plain Layout
24717 <cell alignment="left" valignment="top" usebox="none">
24720 \begin_layout Plain Layout
24726 <cell alignment="left" valignment="top" usebox="none">
24729 \begin_layout Plain Layout
24735 <cell alignment="center" valignment="top" usebox="none">
24738 \begin_layout Plain Layout
24744 <cell alignment="center" valignment="top" usebox="none">
24747 \begin_layout Plain Layout
24753 <cell alignment="center" valignment="top" usebox="none">
24756 \begin_layout Plain Layout
24762 <cell alignment="center" valignment="top" usebox="none">
24765 \begin_layout Plain Layout
24773 <cell alignment="left" valignment="top" usebox="none">
24776 \begin_layout Plain Layout
24782 <cell alignment="left" valignment="top" usebox="none">
24785 \begin_layout Plain Layout
24791 <cell alignment="left" valignment="top" usebox="none">
24794 \begin_layout Plain Layout
24800 <cell alignment="left" valignment="top" usebox="none">
24803 \begin_layout Plain Layout
24809 <cell alignment="center" valignment="top" usebox="none">
24812 \begin_layout Plain Layout
24818 <cell alignment="center" valignment="top" usebox="none">
24821 \begin_layout Plain Layout
24827 <cell alignment="center" valignment="top" usebox="none">
24830 \begin_layout Plain Layout
24836 <cell alignment="center" valignment="top" usebox="none">
24839 \begin_layout Plain Layout
24847 <cell alignment="left" valignment="top" usebox="none">
24850 \begin_layout Plain Layout
24856 <cell alignment="left" valignment="top" usebox="none">
24859 \begin_layout Plain Layout
24865 <cell alignment="left" valignment="top" usebox="none">
24868 \begin_layout Plain Layout
24874 <cell alignment="left" valignment="top" usebox="none">
24877 \begin_layout Plain Layout
24883 <cell alignment="center" valignment="top" usebox="none">
24886 \begin_layout Plain Layout
24892 <cell alignment="center" valignment="top" usebox="none">
24895 \begin_layout Plain Layout
24901 <cell alignment="center" valignment="top" usebox="none">
24904 \begin_layout Plain Layout
24910 <cell alignment="center" valignment="top" usebox="none">
24913 \begin_layout Plain Layout
24921 <cell alignment="center" valignment="top" usebox="none">
24924 \begin_layout Plain Layout
24930 <cell alignment="center" valignment="top" usebox="none">
24933 \begin_layout Plain Layout
24939 <cell alignment="center" valignment="top" usebox="none">
24942 \begin_layout Plain Layout
24948 <cell alignment="center" valignment="top" usebox="none">
24951 \begin_layout Plain Layout
24957 <cell alignment="center" valignment="top" usebox="none">
24960 \begin_layout Plain Layout
24966 <cell alignment="center" valignment="top" usebox="none">
24969 \begin_layout Plain Layout
24975 <cell alignment="center" valignment="top" usebox="none">
24978 \begin_layout Plain Layout
24984 <cell alignment="center" valignment="top" usebox="none">
24987 \begin_layout Plain Layout
25001 \begin_layout Chapter
25002 Names of available colors to be used in layouts
25003 \begin_inset CommandInset label
25005 name "chap:Names-of-colors"
25012 \begin_layout Standard
25013 The colors listed here are the standard colors and the those that you can
25014 adjust in the LyX preferences.
25017 \begin_layout Description
25030 No particular color -- clear or default
25031 \change_inserted 2090807402 1370139663
25033 \begin_inset Note Note
25036 \begin_layout Plain Layout
25038 \change_inserted 2090807402 1370139674
25051 update this list for LyX 2.1!
25063 \begin_layout Description
25067 \begin_layout Description
25071 \begin_layout Description
25075 \begin_layout Description
25079 \begin_layout Description
25083 \begin_layout Description
25087 \begin_layout Description
25091 \begin_layout Description
25095 \begin_layout Description
25096 cursor Cursor color
25099 \begin_layout Description
25100 background Background color
25103 \begin_layout Description
25104 foreground Foreground color
25107 \begin_layout Description
25108 selection Background color of selected text
25111 \begin_layout Description
25112 selectiontext Foreground color of selected text
25115 \begin_layout Description
25116 latex Text color in LaTeX mode
25119 \begin_layout Description
25120 preview The color used for previews
25123 \begin_layout Description
25124 inlinecompletion Inline completion color
25127 \begin_layout Description
25128 nonunique_inlinecompletion Inline completion color for the non-unique part
25131 \begin_layout Description
25132 notelabel Label color for notes
25135 \begin_layout Description
25136 notebg Background color of notes
25139 \begin_layout Description
25140 commentlabel Label color for comments
25143 \begin_layout Description
25144 commentbg Background color of comments
25147 \begin_layout Description
25148 greyedoutlabel Label color for greyedout insets
25151 \begin_layout Description
25152 greyedouttext Color for greyedout inset text
25155 \begin_layout Description
25156 greyedoutbg Background color of greyedout inset
25159 \begin_layout Description
25160 shadedbg Background color of shaded box
25163 \begin_layout Description
25164 listingsbg Background color of listings inset
25167 \begin_layout Description
25168 branchlabel Label color for branches
25171 \begin_layout Description
25172 footlabel Label color for footnotes
25175 \begin_layout Description
25176 indexlabel Label color for index insets
25179 \begin_layout Description
25180 marginlabel Label color for margin notes
25183 \begin_layout Description
25184 phantomtext Text color for phantom insets
25187 \begin_layout Description
25188 urllabel Label color for URL insets
25191 \begin_layout Description
25192 urltext Color for URL inset text
25195 \begin_layout Description
25196 depthbar Color for the depth bars in the margin
25199 \begin_layout Description
25200 language Color for marking foreign language words
25203 \begin_layout Description
25204 command Text color for command insets
25207 \begin_layout Description
25208 commandbg Background color for command insets
25211 \begin_layout Description
25212 commandframe Frame color for command insets
25215 \begin_layout Description
25216 special Special chars text color
25219 \begin_layout Description
25220 graphicsbg Graphics inset background color
25223 \begin_layout Description
25224 math Math inset text color
25227 \begin_layout Description
25228 mathbg Math inset background color
25231 \begin_layout Description
25232 mathmacrobg Macro math inset background color
25235 \begin_layout Description
25236 mathmacrohoverbg Macro math inset background color hovered
25239 \begin_layout Description
25240 mathmacrolabel Macro math label color
25243 \begin_layout Description
25244 mathmacroframe Macro math frame color
25247 \begin_layout Description
25248 mathmacroblend Macro math blended color
25251 \begin_layout Description
25252 mathmacrooldarg Macro template color for old parameters
25255 \begin_layout Description
25256 mathmacronewarg Macro template color for new parameters
25259 \begin_layout Description
25260 mathframe Math inset frame color under focus
25263 \begin_layout Description
25264 mathcorners Math inset frame color not under focus
25267 \begin_layout Description
25268 mathline Math line color
25271 \begin_layout Description
25272 collapsable Collapsable insets text
25275 \begin_layout Description
25276 collapsableframe Collapsable insets frame
25279 \begin_layout Description
25280 insetbg Inset marker background color
25283 \begin_layout Description
25284 insetframe Inset marker frame color
25287 \begin_layout Description
25288 error Error box text color
25291 \begin_layout Description
25292 eolmarker End of line marker color
25295 \begin_layout Description
25296 added_space Added space colour
25299 \begin_layout Description
25300 appendix Appendix marker color
25303 \begin_layout Description
25304 changebar Changebar color
25307 \begin_layout Description
25308 deletedtext Deleted text color
25311 \begin_layout Description
25312 addedtext Added text color
25315 \begin_layout Description
25316 changedtextauthor1 Changed text color author 1
25319 \begin_layout Description
25320 changedtextauthor2 Changed text color author 2
25323 \begin_layout Description
25324 changedtextauthor3 Changed text color author 3
25327 \begin_layout Description
25328 changedtextauthor4 Changed text color author 4
25331 \begin_layout Description
25332 changedtextauthor5 Changed text color author 5
25335 \begin_layout Description
25336 deletedtextmodifier Deleted text modifying color
25339 \begin_layout Description
25340 tabularline Table line color
25343 \begin_layout Description
25344 tabularonoffline Table line color
25347 \begin_layout Description
25348 bottomarea Bottom area color
25351 \begin_layout Description
25352 newpage New page color
25355 \begin_layout Description
25356 pagebreak Page break color
25359 \begin_layout Description
25360 buttonframe Color used for button frame
25363 \begin_layout Description
25364 buttonbg Color used for bottom background
25367 \begin_layout Description
25368 buttonhoverbg Color used for buttom under focus
25371 \begin_layout Description
25372 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25376 \begin_layout Description
25377 previewframe Preview frame color
25380 \begin_layout Description
25381 inherit Color is inherited
25384 \begin_layout Description
25385 regexpframe Color for regexp frame
25388 \begin_layout Description
25389 ignore For ignoring updates of a color