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 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
35 \use_default_options false
39 \maintain_unincluded_children false
42 InsetLayout Flex:MenuItem
51 \newcommand*{\menuitem}[1]{{\sffamily #1}}
54 # In case we need to do with sans...
55 #InsetLayout CharStyle:Code
60 #\renewcommand{\code}[1]{{\sffamily #1}}
65 \language_package default
70 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
79 \default_output_format default
81 \bibtex_command default
82 \index_command default
86 \pdf_title "LyX Configuration Manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX-documentation Customization"
89 \pdf_keywords "LyX, documentation, customization"
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen true
93 \pdf_bookmarksopenlevel 1
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \use_package amsmath 0
103 \use_package amssymb 0
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 0
108 \use_package stackrel 0
109 \use_package stmaryrd 0
110 \use_package undertilde 0
112 \cite_engine_type numerical
116 \paperorientation portrait
131 \paragraph_separation indent
132 \paragraph_indentation default
133 \quotes_language english
136 \paperpagestyle headings
137 \tracking_changes true
138 \output_changes false
142 \author -712698321 "Jürgen Spitzmüller"
143 \author -195340706 "Georg Baum"
145 \author 155139281 "Jrgen Spitzmller"
146 \author 1082167584 "Kayvan Sylvan" kayvan@sylvan.com
147 \author 1414654397 "Richard Heck"
148 \author 2090807402 "usti"
154 Customizing LyX: Features for the Advanced User
162 \begin_layout Plain Layout
164 If you have comments or error corrections, please send them to the LyX Documenta
166 \begin_inset CommandInset href
168 target "lyx-docs@lists.lyx.org"
175 \begin_inset Quotes eld
179 \begin_inset Quotes erd
182 in the subject header, and please cc the current maintainer of this file,
183 Richard Heck <rgheck@comcast.net>.
189 \begin_inset Newline newline
193 \begin_inset Newline newline
199 \begin_layout Standard
200 \begin_inset CommandInset toc
201 LatexCommand tableofcontents
208 \begin_layout Standard
209 \begin_inset Note Note
212 \begin_layout Plain Layout
213 Please use change tracking when modifying this document.
214 This makes it easier for our translators to recognize things that have
215 been changed, and it helps the maintainer keep up-to-date with what's been
224 \begin_layout Chapter
228 \begin_layout Standard
229 This manual covers the customization features present in LyX.
230 In it, we discuss issues like keyboard shortcuts, screen previewing options,
231 printer options, sending commands to LyX via the LyX Server, internationalizati
232 on, installing new LaTeX classes and LyX layouts, etc.
233 We can't possibly hope to touch on everything you can change—our developers
234 add new features faster than we can document them—but we will explain the
235 most common customizations and hopefully point you in the right direction
236 for some of the more obscure ones.
239 \begin_layout Standard
240 \begin_inset Branch OutDated
243 \begin_layout Standard
244 Information from previous versions of this document that now seems to be
245 outdated is contained in the OutDated branch of this document.
246 By default, this information will not appear in the LaTeX output.
254 \begin_layout Chapter
255 LyX configuration files
258 \begin_layout Standard
259 This chapter aims to help you to find your way through the LyX configuration
261 Before continuing to read this chapter, you should find out where your
262 LyX library and user directories are by using
263 \begin_inset Flex MenuItem
266 \begin_layout Plain Layout
267 Help\SpecialChar \menuseparator
278 The library directory is the place where LyX places its system-wide configurati
279 on files; the user directory is where you can place your modified versions.
280 We will call the former
281 \begin_inset Flex Code
284 \begin_layout Plain Layout
291 \begin_inset Flex MenuItem
294 \begin_layout Plain Layout
300 in the remainder of this document.
304 \begin_layout Section
306 \begin_inset Flex Code
309 \begin_layout Plain Layout
318 \begin_layout Standard
319 \begin_inset Flex Code
322 \begin_layout Plain Layout
328 and its sub-directories contain a number of files and that can be used
329 to customize LyX's behavior.
330 You can change many of these files from within LyX itself through the
331 \begin_inset Flex MenuItem
334 \begin_layout Plain Layout
335 Tools\SpecialChar \menuseparator
342 Most customization that you will want to do in LyX is possible through
344 However, many other inner aspects of LyX can be customized by modifying
346 \begin_inset Flex Code
349 \begin_layout Plain Layout
356 These files fall in different categories, described in the following subsection
360 \begin_layout Subsection
361 Automatically generated files
364 \begin_layout Standard
365 The files, which are to be found in
366 \begin_inset Flex MenuItem
369 \begin_layout Plain Layout
375 , are generated when you configure LyX.
376 They contain various default values that are guessed by inspection.
377 In general, it is not a good idea to modify them, since they might be overwritt
381 \begin_layout Labeling
382 \labelwidthstring 00.00.0000
383 \begin_inset Flex Code
386 \begin_layout Plain Layout
392 contains defaults for various commands.
395 \begin_layout Labeling
396 \labelwidthstring 00.00.0000
397 \begin_inset Flex Code
400 \begin_layout Plain Layout
406 contains the list of packages that have been recognized by LyX.
407 It is currently unused by the LyX program itself, but the information extracted
408 , and more, is made available with
409 \begin_inset Flex MenuItem
412 \begin_layout Plain Layout
413 Help\SpecialChar \menuseparator
426 \begin_layout Labeling
427 \labelwidthstring 00.00.0000
428 \begin_inset Flex Code
431 \begin_layout Plain Layout
437 the list of text classes that have been found in your
438 \begin_inset Flex Code
441 \begin_layout Plain Layout
447 directories, along with the associated LaTeX document class and their descripti
451 \begin_layout Labeling
452 \labelwidthstring 00.00.0000
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 the list of layout modules found in your
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
475 \begin_layout Labeling
476 \labelwidthstring 00.00.0000
477 \begin_inset Flex Code
480 \begin_layout Plain Layout
486 lists of various sorts of LaTeX-related files found on your system
489 \begin_layout Labeling
490 \labelwidthstring 00.00.0000
491 \begin_inset Flex Code
494 \begin_layout Plain Layout
500 is automatically generated during configuration from the file
501 \begin_inset Flex Code
504 \begin_layout Plain Layout
511 It contains information on your LaTeX configuration.
514 \begin_layout Subsection
518 \begin_layout Standard
519 These directories are duplicated between
520 \begin_inset Flex Code
523 \begin_layout Plain Layout
530 \begin_inset Flex Code
533 \begin_layout Plain Layout
540 If a particular files exists in both places, the one in
541 \begin_inset Flex Code
544 \begin_layout Plain Layout
553 \begin_layout Labeling
554 \labelwidthstring 00.00.0000
555 \begin_inset Flex Code
558 \begin_layout Plain Layout
564 this directory contains files with the extension
565 \begin_inset Flex Code
568 \begin_layout Plain Layout
574 that define the keybindings used in LyX.
575 If there exists an internationalized version of the bind file named
576 \begin_inset Flex Code
579 \begin_layout Plain Layout
585 , that will be used first.
588 \begin_layout Labeling
589 \labelwidthstring 00.00.0000
590 \begin_inset Flex Code
593 \begin_layout Plain Layout
599 contains graphics files that can be included in documents.
603 \begin_layout Labeling
604 \labelwidthstring 00.00.0000
605 \begin_inset Flex Code
608 \begin_layout Plain Layout
614 contains LyX documentation files (including the one you are currently reading).
616 \begin_inset Flex Code
619 \begin_layout Plain Layout
625 deserves special attention, as noted above.
626 The internationalized help docs are in subdirectories
627 \begin_inset Flex Code
630 \begin_layout Plain Layout
637 \begin_inset Quotes eld
641 \begin_inset Quotes erd
644 is the ISO language code.
650 \begin_inset CommandInset ref
652 reference "cha:Internationalizing-LyX"
659 \begin_layout Labeling
660 \labelwidthstring 00.00.0000
661 \begin_inset Flex Code
664 \begin_layout Plain Layout
670 contains example files that explain how to use some features.
671 In the file browser, press the
672 \begin_inset Flex MenuItem
675 \begin_layout Plain Layout
684 \begin_layout Labeling
685 \labelwidthstring 00.00.0000
686 \begin_inset Flex Code
689 \begin_layout Plain Layout
695 contains image files that are used by the
696 \begin_inset Flex MenuItem
699 \begin_layout Plain Layout
706 In addition, it also contains the individual icons used in the toolbar
707 and the banners that can be shown when LyX is launched.
710 \begin_layout Labeling
711 \labelwidthstring 00.00.0000
712 \begin_inset Flex Code
715 \begin_layout Plain Layout
721 contains keyboard keymapping files.
727 \begin_inset CommandInset ref
729 reference "sec:International-Keymap-Stuff"
736 \begin_layout Labeling
737 \labelwidthstring 00.00.0000
738 \begin_inset Flex Code
741 \begin_layout Plain Layout
747 contains the text class and module files described in Chapter
752 \begin_inset CommandInset ref
754 reference "cha:Installing-New-Document"
761 \begin_layout Labeling
762 \labelwidthstring 00.00.0000
763 \begin_inset Flex Code
766 \begin_layout Plain Layout
773 \begin_inset Flex Code
776 \begin_layout Plain Layout
782 Python scripts used to convert between LyX versions.
783 These can be run from the command line if, say, you want to batch-convert
787 \begin_layout Labeling
788 \labelwidthstring 00.00.0000
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 contains some files that demonstrate the capabilities of the
799 \begin_inset Flex MenuItem
802 \begin_layout Plain Layout
813 Also contains some scripts used by LyX itself.
816 \begin_layout Labeling
817 \labelwidthstring 00.00.0000
818 \begin_inset Flex Code
821 \begin_layout Plain Layout
827 contains the standard LyX template files described in Chapter
832 \begin_inset CommandInset ref
834 reference "sub:Creating-Templates"
841 \begin_layout Labeling
842 \labelwidthstring 00.00.0000
843 \begin_inset Flex Code
846 \begin_layout Plain Layout
852 contains files with the extension
853 \begin_inset Flex Code
856 \begin_layout Plain Layout
862 that define the user interface to LyX.
863 That is, the files define which items appear in which menus and the items
864 appearing on the toolbar.
867 \begin_layout Subsection
868 Files you don't want to modify
871 \begin_layout Standard
872 These files are used internally by LyX and you generally do not need to
873 modify them unless you are a developer.
876 \begin_layout Labeling
877 \labelwidthstring 00.00.0000
878 \begin_inset Flex Code
881 \begin_layout Plain Layout
887 this file contains the list of LyX developers.
888 The contents are displayed with the menu entry
889 \begin_inset Flex MenuItem
892 \begin_layout Plain Layout
893 Help\SpecialChar \menuseparator
906 \begin_layout Labeling
907 \labelwidthstring 00.00.0000
908 \begin_inset Flex Code
911 \begin_layout Plain Layout
917 this is a LaTeX script used during the configuration process.
921 \begin_layout Labeling
922 \labelwidthstring 00.00.0000
923 \begin_inset Flex Code
926 \begin_layout Plain Layout
932 this is the script that is used to re-configure LyX.
933 It creates configuration files in the directory it was run from.
936 \begin_layout Subsection
937 Other files needing a line or two...
940 \begin_layout Labeling
941 \labelwidthstring 00.00.0000
942 \begin_inset Flex Code
945 \begin_layout Plain Layout
951 this contains tables describing how different character encodings can be
955 \begin_layout Labeling
956 \labelwidthstring 00.00.0000
957 \begin_inset Flex Code
960 \begin_layout Plain Layout
966 this file contains the templates available to the new
967 \begin_inset Flex MenuItem
970 \begin_layout Plain Layout
983 \begin_layout Labeling
984 \labelwidthstring 00.00.0000
985 \begin_inset Flex Code
988 \begin_layout Plain Layout
994 this file contains a list of all the languages currently supported by LyX.
995 \change_inserted -195340706 1334775793
999 \begin_layout Labeling
1000 \labelwidthstring 00.00.0000
1002 \change_inserted -195340706 1334775793
1003 \begin_inset Flex Code
1006 \begin_layout Plain Layout
1008 \change_inserted -195340706 1334775793
1014 this file contains translations for internationalized paragraph styles
1016 \begin_inset space \thinspace{}
1020 \begin_inset CommandInset ref
1022 reference "sub:I18n"
1031 \begin_layout Section
1032 Your local configuration directory
1035 \begin_layout Standard
1036 Even if you are using LyX as an unprivileged user, you might want to change
1037 LyX configuration for your own use.
1039 \begin_inset Flex Code
1042 \begin_layout Plain Layout
1048 directory contains all your personal configuration files.
1049 This is the directory described as
1050 \begin_inset Quotes eld
1054 \begin_inset Quotes erd
1058 \begin_inset Flex MenuItem
1061 \begin_layout Plain Layout
1062 Help\SpecialChar \menuseparator
1064 \begin_inset space ~
1073 This directory is used as a mirror of
1074 \begin_inset Flex Code
1077 \begin_layout Plain Layout
1083 , which means that every file in
1084 \begin_inset Flex Code
1087 \begin_layout Plain Layout
1093 is a replacement for the corresponding file in
1094 \begin_inset Flex Code
1097 \begin_layout Plain Layout
1104 Any configuration file described in the above sections can be placed either
1105 in the system-wide directory, in which case it will affect all users, or
1106 in your local directory for your own use.
1109 \begin_layout Standard
1110 To make things clearer, let's provide a few examples:
1113 \begin_layout Itemize
1114 The preferences set in the
1115 \begin_inset Flex MenuItem
1118 \begin_layout Plain Layout
1119 Tools\SpecialChar \menuseparator
1125 dialog are saved to a file
1126 \begin_inset Flex Code
1129 \begin_layout Plain Layout
1136 \begin_inset Flex Code
1139 \begin_layout Plain Layout
1148 \begin_layout Itemize
1149 When you reconfigure using
1150 \begin_inset Flex MenuItem
1153 \begin_layout Plain Layout
1154 Tools\SpecialChar \menuseparator
1161 \begin_inset Flex Code
1164 \begin_layout Plain Layout
1170 script, and the resulting files are written in your local configuration
1172 This means that any additional text class file that you might have added
1174 \begin_inset Flex Code
1177 \begin_layout Plain Layout
1183 will be added to the list of classes in the
1184 \begin_inset Flex MenuItem
1187 \begin_layout Plain Layout
1188 Document\SpecialChar \menuseparator
1197 \begin_layout Itemize
1198 If you get some updated documentation from LyX ftp site and cannot install
1199 it because you do not have sysadmin rights on your system, you can just
1201 \begin_inset Flex Code
1204 \begin_layout Plain Layout
1210 and the items in the
1211 \begin_inset Flex MenuItem
1214 \begin_layout Plain Layout
1220 menu will open them!
1223 \begin_layout Section
1224 Running LyX with multiple configurations
1227 \begin_layout Standard
1228 The configuration freedom of the local configuration directory may not suffice
1229 if you want to have more than one configuration at your disposal.
1230 For example, you may want to be use different key bindings or printer settings
1232 You can achieve this by having several such directories.
1233 You then specify which directory to use at run-time.
1236 \begin_layout Standard
1237 Invoking LyX with the command line switch
1238 \begin_inset Flex Code
1241 \begin_layout Plain Layout
1251 instructs the program to read the configuration from that directory, and
1252 not from the default directory.
1253 (You can determine the default directory by running LyX without the
1254 \begin_inset Flex Code
1257 \begin_layout Plain Layout
1263 switch.) If the specified directory does not exist, LyX offers to create
1264 it for you, just like it does for the default directory on the first time
1265 you run the program.
1266 You can modify the configuration options in this additional user directory
1267 exactly as you would for the default directory.
1268 These directories are completely independent (but read on).
1269 Note that setting the environment variable
1270 \begin_inset Flex Code
1273 \begin_layout Plain Layout
1279 to some value has exactly the same effect.
1282 \begin_layout Standard
1283 Having several configurations also requires more maintenance: if you want
1284 to add a new layout to
1285 \begin_inset Flex Code
1288 \begin_layout Plain Layout
1294 which you want available from all your configurations, you must add it
1295 to each directory separately.
1296 You can avoid this with the following trick: after LyX creates the additional
1297 directory, most of the subdirectories (see above) are empty.
1298 If you want the new configuration to mirror an existing one, replace the
1299 empty subdirectory with a symbolic link to the matching subdirectory in
1300 the existing configuration.
1302 \begin_inset Flex Code
1305 \begin_layout Plain Layout
1311 subdirectory, however, since it contains a file written by the configuration
1312 script (also accessible through
1313 \begin_inset Flex MenuItem
1316 \begin_layout Plain Layout
1317 Tools\SpecialChar \menuseparator
1323 ) which is configuration-specific.
1326 \begin_layout Chapter
1327 The Preferences dialog
1330 \begin_layout Standard
1331 All options of the preferences dialog are described in the Appendix
1333 The Preferences Dialog
1340 For some options you might find here more details.
1343 \begin_layout Section
1345 \begin_inset CommandInset label
1354 \begin_layout Standard
1355 The first step is to define your file formats if they are not already defined.
1357 \begin_inset Flex MenuItem
1360 \begin_layout Plain Layout
1361 Tools\SpecialChar \menuseparator
1369 \begin_inset Flex MenuItem
1372 \begin_layout Plain Layout
1373 File Handling\SpecialChar \menuseparator
1380 \begin_inset Flex MenuItem
1383 \begin_layout Plain Layout
1384 New\SpecialChar \ldots{}
1390 button to define your new format.
1392 \begin_inset Flex MenuItem
1395 \begin_layout Plain Layout
1401 field contains the name used to identify the format in the GUI.
1403 \begin_inset Flex MenuItem
1406 \begin_layout Plain Layout
1412 is used to identify the format internally.
1413 You will also need to enter a file extension.
1414 These are all required.
1416 \begin_inset Flex MenuItem
1419 \begin_layout Plain Layout
1425 field is used to provide a keyboard shortcut on the menus.
1426 (For example, pressing
1427 \begin_inset Flex MenuItem
1430 \begin_layout Plain Layout
1437 \begin_inset Flex MenuItem
1440 \begin_layout Plain Layout
1441 View\SpecialChar \menuseparator
1442 View (Other Formats)\SpecialChar \menuseparator
1451 \begin_layout Standard
1453 \begin_inset Flex MenuItem
1456 \begin_layout Plain Layout
1463 \begin_inset Flex MenuItem
1466 \begin_layout Plain Layout
1473 For example, you might want to use
1474 \begin_inset Flex MenuItem
1477 \begin_layout Plain Layout
1483 to view PostScript files.
1484 You can enter the command needed to start the program in the corresponding
1486 In defining this command, you can use the four variables listed in the
1488 The viewer is launched when you view an image in LyX or use the
1489 \begin_inset Flex MenuItem
1492 \begin_layout Plain Layout
1499 The editor is for example launched when you right-click on an image and
1501 \begin_inset Flex MenuItem
1504 \begin_layout Plain Layout
1510 in the appearing context menu.
1513 \begin_layout Standard
1515 \change_inserted -195340706 1329851811
1517 \begin_inset Flex MenuItem
1520 \begin_layout Plain Layout
1526 type of a format is optional, but if it is specified, it must be unique
1528 It is used to detect files of this format from the file contents.
1529 For some important file formats there is no MIME type officially registered
1531 \begin_inset CommandInset href
1534 target "http://www.iana.org/assignments/media-types/"
1539 Therefore LyX uses the extended list of MIME types as specified by
1540 \begin_inset CommandInset href
1542 name "freedesktop.org"
1543 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1550 \begin_layout Standard
1552 \begin_inset Flex MenuItem
1555 \begin_layout Plain Layout
1561 option tells LyX that a format is suitable for document export.
1562 If this is set and if a suitable conversion route exists (see sec.
1563 \begin_inset space \thinspace{}
1567 \begin_inset CommandInset ref
1569 reference "sec:Converters"
1573 ), the format will appear in the
1574 \begin_inset Flex MenuItem
1577 \begin_layout Plain Layout
1578 File\SpecialChar \menuseparator
1585 The format will also appear in the
1586 \begin_inset Flex MenuItem
1589 \begin_layout Plain Layout
1595 menu if a viewer is specified for the format.
1596 Pure image formats, such as
1597 \begin_inset Flex Code
1600 \begin_layout Plain Layout
1606 , should not use this option.
1607 Formats that can both represent vector graphics and documents like
1608 \begin_inset Flex Code
1611 \begin_layout Plain Layout
1620 \begin_layout Standard
1622 \begin_inset Flex MenuItem
1625 \begin_layout Plain Layout
1626 Vector graphics format
1631 tells LyX that a format can contain vector graphics.
1632 This information is used to determine the target format of included graphics
1634 \begin_inset Flex MenuItem
1637 \begin_layout Plain Layout
1644 Included graphics may need to be converted to either
1645 \begin_inset Flex MenuItem
1648 \begin_layout Plain Layout
1655 \begin_inset Flex MenuItem
1658 \begin_layout Plain Layout
1665 \begin_inset Flex MenuItem
1668 \begin_layout Plain Layout
1675 \begin_inset Flex MenuItem
1678 \begin_layout Plain Layout
1684 cannot handle other image formats.
1685 If an included graphic is not already in
1686 \begin_inset Flex MenuItem
1689 \begin_layout Plain Layout
1696 \begin_inset Flex MenuItem
1699 \begin_layout Plain Layout
1706 \begin_inset Flex MenuItem
1709 \begin_layout Plain Layout
1715 format, it is converted to
1716 \begin_inset Flex MenuItem
1719 \begin_layout Plain Layout
1725 if the vector format option is set, and otherwise to
1726 \begin_inset Flex MenuItem
1729 \begin_layout Plain Layout
1738 \begin_layout Section
1742 \begin_layout Standard
1743 Since all conversions from one format to another take place in LyX's temporary
1744 directory, it is sometimes necessary to modify a file before copying it
1745 to the temporary directory in order that the conversion may be performed.
1749 \begin_layout Plain Layout
1750 For example, the file may refer to other files—images, for example—using
1751 relative file names, and these may become invalid when the file is copied
1752 to the temporary directory.
1757 This is done by a Copier: It copies a file to (or from) the temporary directory
1758 and may modify it in the process.
1761 \begin_layout Standard
1762 The definitions of the copiers may use four variables:
1765 \begin_layout Labeling
1766 \labelwidthstring 00.00.0000
1767 \begin_inset Flex Code
1770 \begin_layout Plain Layout
1776 The LyX system directory (e.
1777 \begin_inset space \thinspace{}
1781 \begin_inset space \space{}
1785 \begin_inset Flex MenuItem
1788 \begin_layout Plain Layout
1797 \begin_layout Labeling
1798 \labelwidthstring 00.00.0000
1799 \begin_inset Flex Code
1802 \begin_layout Plain Layout
1811 \begin_layout Labeling
1812 \labelwidthstring 00.00.0000
1813 \begin_inset Flex Code
1816 \begin_layout Plain Layout
1823 \change_inserted 1082167584 1348453985
1827 \begin_layout Labeling
1828 \labelwidthstring 00.00.0000
1830 \change_inserted 1082167584 1348453986
1831 $$b The base name (without filename extension) in the LyX temporary directory
1834 \begin_layout Labeling
1835 \labelwidthstring 00.00.0000
1837 \change_inserted 1082167584 1348453986
1838 $$p The full directory path of the LyX temporary directory
1841 \begin_layout Labeling
1842 \labelwidthstring 00.00.0000
1844 \change_inserted 1082167584 1348453986
1845 $$r The full pathname to the original LyX file being processed
1848 \begin_layout Labeling
1849 \labelwidthstring 00.00.0000
1851 \change_inserted 1082167584 1348453986
1852 $$f The filename (without any directory path) of the LyX file.
1855 \begin_layout Labeling
1856 \labelwidthstring 00.00.0000
1857 \begin_inset Flex Code
1860 \begin_layout Plain Layout
1867 \change_inserted 1082167584 1348453720
1871 \begin_layout Standard
1872 The latter should be the filename as it would be used in a LaTeX's
1879 It is relevant only when exporting files suitable for such inclusion.
1882 \begin_layout Standard
1883 Copiers can be used to do almost anything with output files.
1884 For example, suppose you want generated pdf files to be copied to a special
1886 \begin_inset Flex Code
1889 \begin_layout Plain Layout
1896 Then you could write a shell script such as this one:
1899 \begin_layout Standard
1900 \begin_inset listings
1904 \begin_layout Plain Layout
1909 \begin_layout Plain Layout
1914 \begin_layout Plain Layout
1916 TOFILE=`basename $2`
1919 \begin_layout Plain Layout
1921 cp $FROMFILE /home/you/pdf/$TOFILE
1926 Save it in your local LyX directory—say,
1927 \begin_inset Flex Code
1930 \begin_layout Plain Layout
1931 /home/you/.lyx/scripts/pdfcopier.sh
1936 —and make it executable, if you need to do so on your platform.
1938 \begin_inset Flex MenuItem
1941 \begin_layout Plain Layout
1942 Tools\SpecialChar \menuseparator
1948 dialog, select under
1949 \begin_inset Flex MenuItem
1952 \begin_layout Plain Layout
1953 File Handling\SpecialChar \menuseparator
1960 \begin_inset Flex MenuItem
1963 \begin_layout Plain Layout
1969 format—or one of the other pdf formats—and enter
1970 \begin_inset Flex Code
1973 \begin_layout Plain Layout
1974 pdfcopier.sh $$i $$o
1980 \begin_inset Flex MenuItem
1983 \begin_layout Plain Layout
1993 \begin_layout Standard
1994 Copiers are used by LyX in various of its own conversions.
1995 For example, if appropriate programs are found, LyX will automatically
1996 install copiers for the
1997 \begin_inset Flex MenuItem
2000 \begin_layout Plain Layout
2007 \begin_inset Flex MenuItem
2010 \begin_layout Plain Layout
2012 \begin_inset space ~
2021 When these formats are exported, the copier sees that not just the main
2022 HTML file but various associated files (style files, images, etc.) are also
2024 All these files are written to a subdirectory of the directory in which
2025 the original LyX file was found.
2029 \begin_layout Plain Layout
2030 This copier can be customized.
2032 \begin_inset Quotes eld
2036 \begin_inset Quotes erd
2039 argument takes a comma-separated list of extensions to be copied; if it
2040 is omitted, all files will be copied.
2042 \begin_inset Quotes eld
2046 \begin_inset Quotes erd
2049 argument determines the extension added to the generated directory.
2051 \begin_inset Quotes eld
2055 \begin_inset Flex MenuItem
2058 \begin_layout Plain Layout
2065 \begin_inset Quotes erd
2068 , so HTML generated from
2069 \begin_inset Flex MenuItem
2072 \begin_layout Plain Layout
2073 /path/to/filename.lyx
2079 \begin_inset Flex MenuItem
2082 \begin_layout Plain Layout
2083 /path/to/filename.html.LyXconv
2097 \begin_layout Section
2099 \begin_inset CommandInset label
2101 name "sec:Converters"
2108 \begin_layout Standard
2109 You can define your own Converters to convert files between different formats.
2111 \begin_inset Flex MenuItem
2114 \begin_layout Plain Layout
2115 Tools\SpecialChar \menuseparator
2116 Preferences\SpecialChar \menuseparator
2117 File Handling\SpecialChar \menuseparator
2126 \begin_layout Standard
2127 To define a new converter, select the
2128 \begin_inset Flex MenuItem
2131 \begin_layout Plain Layout
2133 \begin_inset space ~
2142 \begin_inset Flex MenuItem
2145 \begin_layout Plain Layout
2147 \begin_inset space ~
2155 from the drop-down lists, enter the command needed for the conversion,
2157 \begin_inset Flex MenuItem
2160 \begin_layout Plain Layout
2167 Several variables can be used in the definition of converters:
2170 \begin_layout Labeling
2171 \labelwidthstring 00.00.0000
2172 \begin_inset Flex Code
2175 \begin_layout Plain Layout
2181 The LyX system directory
2184 \begin_layout Labeling
2185 \labelwidthstring 00.00.0000
2186 \begin_inset Flex Code
2189 \begin_layout Plain Layout
2198 \begin_layout Labeling
2199 \labelwidthstring 00.00.0000
2200 \begin_inset Flex Code
2203 \begin_layout Plain Layout
2212 \begin_layout Labeling
2213 \labelwidthstring 00.00.0000
2214 \begin_inset Flex Code
2217 \begin_layout Plain Layout
2223 The base filename of the input file (i.
2224 \begin_inset space \thinspace{}
2227 g., without the extension)
2230 \begin_layout Labeling
2231 \labelwidthstring 00.00.0000
2232 \begin_inset Flex Code
2235 \begin_layout Plain Layout
2241 The path to the input file
2244 \begin_layout Labeling
2245 \labelwidthstring 00.00.0000
2246 \begin_inset Flex Code
2249 \begin_layout Plain Layout
2255 The path to the original input file (this is different from $$p when a
2256 chain of converters is called)
2259 \begin_layout Labeling
2260 \labelwidthstring 00.00.0000
2261 \begin_inset Flex Code
2264 \begin_layout Plain Layout
2270 The iconv name for the encoding of the document.
2273 \begin_layout Standard
2275 \begin_inset Flex MenuItem
2278 \begin_layout Plain Layout
2280 \begin_inset space ~
2288 field you can enter the following flags, separated by commas:
2291 \begin_layout Labeling
2292 \labelwidthstring 00.00.0000
2293 \begin_inset Flex Code
2296 \begin_layout Plain Layout
2302 This converter runs some form of LaTeX.
2303 This will make LyX's LaTeX error logs available.
2306 \begin_layout Labeling
2307 \labelwidthstring 00.00.0000
2308 \begin_inset Flex Code
2311 \begin_layout Plain Layout
2318 \begin_inset Flex MenuItem
2321 \begin_layout Plain Layout
2327 file for the conversion.
2328 \change_inserted 1414654397 1337693117
2332 \begin_layout Labeling
2333 \labelwidthstring 00.00.0000
2335 \change_inserted 1414654397 1337693188
2336 \begin_inset Flex Code
2339 \begin_layout Plain Layout
2341 \change_inserted 1414654397 1337693129
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2357 file from the backend, which in practice means a LaTeX file like the one
2358 we would export, without
2359 \begin_inset Flex Code
2362 \begin_layout Plain Layout
2364 \change_inserted 1414654397 1337693184
2377 \begin_layout Labeling
2378 \labelwidthstring 00.00.0000
2379 \begin_inset Flex Code
2382 \begin_layout Plain Layout
2391 \begin_layout Standard
2392 The following three flags are not really flags at all because they take
2394 \begin_inset Flex MenuItem
2397 \begin_layout Plain Layout
2399 \begin_inset space ~
2403 \begin_inset space ~
2414 \begin_layout Labeling
2415 \labelwidthstring 00.00.0000
2416 \begin_inset Flex Code
2419 \begin_layout Plain Layout
2425 If set, the converter's standard error will be redirected to a file
2426 \begin_inset Flex Code
2429 \begin_layout Plain Layout
2435 , and the script given as argument will be run as:
2436 \begin_inset Flex Code
2439 \begin_layout Plain Layout
2440 script < infile.out > infile.log
2446 The argument may contain
2447 \begin_inset Flex Code
2450 \begin_layout Plain Layout
2459 \begin_layout Labeling
2460 \labelwidthstring 00.00.0000
2461 \begin_inset Flex Code
2464 \begin_layout Plain Layout
2470 The name of the directory in which the converter will dump the generated
2472 LyX will not create this directory, and it does not copy anything into
2473 it, though it will copy this directory to the destination.
2474 The argument may contain
2475 \begin_inset Flex Code
2478 \begin_layout Plain Layout
2484 , which will be replaced by the base name of the input and output files,
2485 respectively, when the directory is copied.
2486 \begin_inset Newline newline
2489 Note that resultdir and usetempdir make no sense together.
2490 The latter will be ignored if the former is given.
2493 \begin_layout Labeling
2494 \labelwidthstring 00.00.0000
2495 \begin_inset Flex Code
2498 \begin_layout Plain Layout
2504 Determines the output file name and may, contain
2505 \begin_inset Flex Code
2508 \begin_layout Plain Layout
2515 Sensible only with resultdir and optional even then; if not given, it defaults
2519 \begin_layout Standard
2520 None of these last three are presently used in any of the converters that
2521 are installed with LyX.
2525 \begin_layout Standard
2526 You do not have to define converters for all formats between which you want
2528 For example, you will note that there is no `LyX to PostScript' converter,
2529 but LyX will export PostScript.
2530 It does so by first creating a LaTeX file (no converter needs to be defined
2531 for this) which is then converted to DVI using the `LaTeX to DVI' converter,
2532 and finally converting the resulting DVI file to PostScript.
2533 LyX finds such `chains' of converters automatically, and it will always
2534 choose the shortest possible chain.
2535 You can, though, still define multiple conversion methods between file
2537 For example, the standard LyX configuration provides three ways to convert
2538 LaTeX to PDF: Directly, using
2539 \begin_inset Flex MenuItem
2542 \begin_layout Plain Layout
2548 ; via (DVI and) PostScript, using
2549 \begin_inset Flex MenuItem
2552 \begin_layout Plain Layout
2559 \begin_inset Flex MenuItem
2562 \begin_layout Plain Layout
2569 To define such alternate chains, you must define multiple target `file
2570 formats', as described in section
2571 \begin_inset CommandInset ref
2573 reference "sec:Formats"
2578 For example, in the standard configuration, the formats named
2579 \begin_inset Flex MenuItem
2582 \begin_layout Plain Layout
2589 \begin_inset Flex MenuItem
2592 \begin_layout Plain Layout
2599 \begin_inset Flex MenuItem
2602 \begin_layout Plain Layout
2608 are defined, all of which share the extension
2609 \begin_inset Flex MenuItem
2612 \begin_layout Plain Layout
2618 , and which correspond to the conversion methods just mentioned.
2621 \begin_layout Chapter
2622 Internationalizing LyX
2623 \begin_inset CommandInset label
2625 name "cha:Internationalizing-LyX"
2632 \begin_layout Standard
2633 LyX supports using a translated interface.
2634 Last time we checked, LyX provided text in thirty languages.
2635 The language of choice is called your
2640 (For further reading on locale settings, see also the documentation for
2641 locale that comes with your operating system.
2642 For Linux, the manual page for
2643 \begin_inset Flex Code
2646 \begin_layout Plain Layout
2652 could be a good place to start).
2655 \begin_layout Standard
2656 Notice that these translations will work, but do contain a few flaws.
2657 In particular, all dialogs have been designed with the English text in
2658 mind, which means that some of the translated text will be too large to
2659 fit within the space allocated.
2660 This is only a display problem and will not cause any harm.
2661 Also, you will find that some of the translations do not define shortcut
2662 keys for everything.
2663 Sometimes, there are simply not enough free letters to do it.
2664 Other times, the translator just hasn't got around to doing it yet.
2665 Our localization team, which you may wish to join,
2669 \begin_layout Plain Layout
2670 If you are a fluent speaker of a language other than English, joining these
2671 teams is a great way to give back to the LyX community!
2676 will of course try to fix these shortcomings in future versions of LyX.
2679 \begin_layout Section
2683 \begin_layout Subsection
2684 Translating the graphical user interface (text messages).
2687 \begin_layout Standard
2689 \begin_inset Flex Code
2692 \begin_layout Plain Layout
2698 library to handle the internationalization of the interface.
2699 To have LyX speak your favorite language in all menus and dialogs, you
2701 \begin_inset Flex Code
2704 \begin_layout Plain Layout
2710 -file for that language.
2711 When this is available, you'll have to generate a
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2721 -file from it and install the
2722 \begin_inset Flex Code
2725 \begin_layout Plain Layout
2732 The process of doing all of this is explained in the documentation for
2734 \begin_inset Flex Code
2737 \begin_layout Plain Layout
2744 It is possible to do this just for yourself, but if you're going to do
2745 it, you might as well share the results of your labors with the rest of
2747 Send a message to the LyX developers' list for more information about how
2751 \begin_layout Standard
2752 In short, this is what you should do (xx denotes the language code):
2755 \begin_layout Itemize
2756 Check out the LyX source code.
2758 \begin_inset CommandInset href
2760 name "information on the web"
2761 target "http://www.lyx.org/HowToUseSVN"
2768 \begin_layout Itemize
2770 \begin_inset Flex Code
2773 \begin_layout Plain Layout
2779 to the folder of the
2780 \begin_inset Flex Code
2783 \begin_layout Plain Layout
2791 \begin_inset Flex Code
2794 \begin_layout Plain Layout
2802 \begin_inset Flex Code
2805 \begin_layout Plain Layout
2811 doesn't exist anywhere, it can be remade with the console command
2812 \begin_inset Flex Code
2815 \begin_layout Plain Layout
2821 in that directory, or you can use an existing po-file for some other language
2825 \begin_layout Itemize
2827 \begin_inset Flex Code
2830 \begin_layout Plain Layout
2840 \begin_layout Plain Layout
2841 This is just a text file, so it can be edited in any text editor.
2842 But there are also specialized programs that support such editing, such
2847 (for all platforms) or
2856 contains a `mode' for editing
2857 \begin_inset Flex Code
2860 \begin_layout Plain Layout
2871 For some menu- and widget-labels, there are also shortcut keys that should
2873 Those keys are marked after a `|', and should be translated according to
2874 the words and phrases of the language.
2875 You should also fill also out the information at the beginning of the new
2877 \begin_inset Flex Code
2880 \begin_layout Plain Layout
2886 -file with your email-address, etc., so people know where to reach you with
2887 suggestions and entertaining flames.
2890 \begin_layout Standard
2891 If you are just doing this on your own, then:
2894 \begin_layout Itemize
2896 \begin_inset Flex Code
2899 \begin_layout Plain Layout
2906 This can be done with
2907 \begin_inset Flex Code
2910 \begin_layout Plain Layout
2911 msgfmt -o xx.mo < xx.po
2919 \begin_layout Itemize
2921 \begin_inset Flex Code
2924 \begin_layout Plain Layout
2930 -file to your locale-tree, at the correct directory for application messages
2935 xx, and under the name
2936 \begin_inset Flex Code
2939 \begin_layout Plain Layout
2946 \begin_inset space \thinspace{}
2950 \begin_inset space \space{}
2954 \begin_inset Flex Code
2957 \begin_layout Plain Layout
2958 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2968 \begin_layout Standard
2969 As said, however, it would be best if the new
2970 \begin_inset Flex Code
2973 \begin_layout Plain Layout
2979 -file could be added to the LyX distribution, so others can use it.
2980 Adding it involves making additional changes to LyX.
2981 So send an email to the developers' mailing list if you're interested in
2985 \begin_layout Subsubsection
2989 \begin_layout Standard
2990 Sometimes it turns out that one English message needs to be translated into
2991 different messages in the target language.
2992 One example is the message
2993 \begin_inset Flex Code
2996 \begin_layout Plain Layout
3002 which has the German translation
3010 , depending upon exactly what the English
3011 \begin_inset Quotes eld
3015 \begin_inset Quotes erd
3020 \begin_inset Flex Code
3023 \begin_layout Plain Layout
3029 does not handle such ambiguous translations.
3030 Therefore you have to add some context information to the message: Instead
3032 \begin_inset Flex Code
3035 \begin_layout Plain Layout
3042 \begin_inset Flex Code
3045 \begin_layout Plain Layout
3046 To[[as in 'From format x to format y']]
3052 \begin_inset Flex Code
3055 \begin_layout Plain Layout
3056 To[[as in 'From page x to page y']].
3061 Now the two occurrences of
3062 \begin_inset Flex Code
3065 \begin_layout Plain Layout
3072 \begin_inset Flex Code
3075 \begin_layout Plain Layout
3081 and can be translated correctly to
3092 \begin_layout Standard
3093 Of course the context information needs to be stripped off the original
3094 message when no translation is used.
3095 Therefore you have to put it in double square brackets at the end of the
3096 message (see the example above).
3097 The translation mechanism of LyX ensures that everything in double square
3098 brackets at the end of messages is removed before displaying the message.
3101 \begin_layout Subsection
3102 Translating the documentation.
3105 \begin_layout Standard
3106 The online documentation (in the
3107 \begin_inset Flex MenuItem
3110 \begin_layout Plain Layout
3116 -menu) can (and should!) be translated.
3117 If there are translated versions of the documentation available
3121 \begin_layout Plain Layout
3122 As of March 2008, at least some of the documents have been translated into
3123 fourteen languages, with the Tutorial available in a few more.
3128 and the locale is set accordingly, these will be used automagically by
3130 LyX looks for translated versions as
3131 \begin_inset Flex Code
3134 \begin_layout Plain Layout
3135 LyXDir/doc/xx/DocName.lyx
3141 \begin_inset Flex Code
3144 \begin_layout Plain Layout
3150 is the code for the language currently in use.
3151 If there are no translated documents, the default English versions will
3153 Note that the translated versions must have the same filenames (
3154 \begin_inset Flex Code
3157 \begin_layout Plain Layout
3163 above) as the original.
3164 If you feel up to translating the documentation (an excellent way to proof-read
3165 the original documentation by the way!), there are a few things you should
3169 \begin_layout Itemize
3170 Check out the documentation translation web page at
3171 \begin_inset CommandInset href
3173 name "http://www.lyx.org/Translation"
3174 target "http://www.lyx.org/Translation"
3179 That way, you can find out which (if any) documents have already been translate
3180 d into your language.
3181 You can also find out who (if anyone) is organizing the effort to translate
3182 the documentation into your language.
3183 If no one is organizing the effort, please let us know that you're interested.
3186 \begin_layout Standard
3187 Once you get to actually translating, here's a few hints for you that may
3191 \begin_layout Itemize
3192 Join the documentation team! There is information on how to do that in
3193 \begin_inset Flex Code
3196 \begin_layout Plain Layout
3203 \begin_inset Flex MenuItem
3206 \begin_layout Plain Layout
3207 Help\SpecialChar \menuseparator
3213 ), which by the way is the first document you should translate.
3216 \begin_layout Itemize
3217 Learn the typographic conventions for the language you are translating to.
3218 Typography is an ancient art and over the centuries, a great variety of
3219 conventions have developed throughout different parts of the world.
3220 Also study the professional terminology amongst typographers in your country.
3221 Inventing your own terminology will only confuse the users.
3224 (Warning! Typography is addictive!)
3227 \begin_layout Itemize
3228 Make a copy of the document.
3229 This will be your working copy.
3230 You can use this as your personal translated help-file by placing it in
3232 \begin_inset Flex Code
3235 \begin_layout Plain Layout
3244 \begin_layout Itemize
3245 Sometimes the original document (from the LyX-team) will be updated.
3246 Use the source viewer at
3247 \begin_inset CommandInset href
3249 name "http://www.lyx.org/trac/timeline"
3250 target "http://www.lyx.org/trac/timeline"
3254 to see what has been changed.
3255 That way you can easily see which parts of the translated document need
3259 \begin_layout Standard
3260 If you ever find an error in the original document, fix it and notify the
3261 rest of the documentation team of the changes! (You didn't forget to join
3262 the documentation team, did you?)
3265 \begin_layout Standard
3266 \begin_inset Branch OutDated
3269 \begin_layout Section
3270 International Keyboard Support
3273 \begin_layout Standard
3276 [Editor's Note: The following section is by
3284 It needs to be fixed to conform to the new Documentation Style sheet and
3285 to make use of the new v1.0 features.
3286 The whole thing also needs to be merged with the section following it.-jw
3287 It may also be badly out of date.-rh (2008)]
3290 \begin_layout Subsection
3291 Defining Own Keymaps: Keymap File Format
3294 \begin_layout Standard
3295 Let's look at a keyboard definition file a little closer.
3296 It is a plain text file defining
3299 \begin_layout Itemize
3300 key-to-key or key-to-string translations
3303 \begin_layout Itemize
3307 \begin_layout Itemize
3308 dead keys exceptions
3311 \begin_layout Standard
3312 To define key-to-key or key-to-string translation, use this command:
3315 \begin_layout Quotation
3316 \begin_inset Flex Code
3319 \begin_layout Plain Layout
3328 \begin_inset Flex Code
3331 \begin_layout Plain Layout
3340 \begin_layout Standard
3342 \begin_inset Flex Code
3345 \begin_layout Plain Layout
3351 is the key to be translated and
3352 \begin_inset Flex Code
3355 \begin_layout Plain Layout
3361 is the string to be inserted into the document.
3362 To define dead keys, use:
3365 \begin_layout Quotation
3366 \begin_inset Flex Code
3369 \begin_layout Plain Layout
3378 \begin_inset Flex Code
3381 \begin_layout Plain Layout
3390 \begin_layout Standard
3392 \begin_inset Flex Code
3395 \begin_layout Plain Layout
3401 is a keyboard key and
3402 \begin_inset Flex Code
3405 \begin_layout Plain Layout
3412 The following dead keys are supported (shortcut name is in parentheses):
3415 \begin_layout Quotation
3419 \begin_inset space \hfill{}
3425 \begin_layout Quotation
3427 \begin_inset space \hfill{}
3433 \begin_layout Quotation
3435 \begin_inset space \hfill{}
3441 \begin_layout Quotation
3443 \begin_inset space \hfill{}
3449 \begin_layout Quotation
3451 \begin_inset space \hfill{}
3457 \begin_layout Quotation
3459 \begin_inset space \hfill{}
3466 \begin_layout Plain Layout
3478 \begin_layout Quotation
3480 \begin_inset space \hfill{}
3486 \begin_layout Quotation
3488 \begin_inset space \hfill{}
3495 \begin_layout Plain Layout
3507 \begin_layout Quotation
3509 \begin_inset space \hfill{}
3515 \begin_layout Quotation
3517 \begin_inset space \hfill{}
3523 \begin_layout Quotation
3525 \begin_inset space \hfill{}
3532 \begin_layout Plain Layout
3544 \begin_layout Quotation
3546 \begin_inset space \hfill{}
3553 \begin_layout Plain Layout
3565 \begin_layout Quotation
3567 \begin_inset space \hfill{}
3573 \begin_layout Quotation
3574 hungarian umlaut (hug)
3575 \begin_inset space \hfill{}
3581 \begin_layout Quotation
3583 \begin_inset space \hfill{}
3589 \begin_layout Quotation
3591 \begin_inset space \hfill{}
3598 \begin_layout Plain Layout
3610 \begin_layout Standard
3611 Since in many international keyboards there are exceptions to what some
3612 dead keys should do, you can define them using
3615 \begin_layout Quotation
3616 \begin_inset Flex Code
3619 \begin_layout Plain Layout
3627 deadkey key outstring
3630 \begin_layout Standard
3631 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3635 \begin_layout Quotation
3636 \begin_inset Flex Code
3639 \begin_layout Plain Layout
3652 \begin_layout Standard
3653 to make it work correctly.
3654 Also, you have to define as exceptions dead keys over i and j, to remove
3655 the dot from them before inserting an accent mark.
3656 I will change this when the time comes, but so far I haven't had time.
3659 \begin_layout Standard
3660 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3663 \begin_inset Flex Code
3666 \begin_layout Plain Layout
3672 have different meaning.
3674 \begin_inset Flex Code
3677 \begin_layout Plain Layout
3683 marks comments, quotes start and end LaTeX-style commands.
3684 To enter quote, you'll need to use
3685 \begin_inset Flex Code
3688 \begin_layout Plain Layout
3697 \begin_inset Flex Code
3700 \begin_layout Plain Layout
3707 \begin_inset Flex Code
3710 \begin_layout Plain Layout
3721 \begin_layout Standard
3722 If you make a keyboard description file that works for your language, please
3723 mail it to me, so I can include it in the next keymap distribution.
3726 \begin_layout Standard
3727 More keywords will be supported in keymap configuration file in future,
3731 \begin_layout Itemize
3732 \begin_inset Flex Code
3735 \begin_layout Plain Layout
3746 \begin_inset space \hfill{}
3750 \begin_inset Flex Code
3753 \begin_layout Plain Layout
3762 \begin_layout Itemize
3763 \begin_inset Flex Code
3766 \begin_layout Plain Layout
3777 \begin_inset space \hfill{}
3781 \begin_inset Flex Code
3784 \begin_layout Plain Layout
3790 an external keymap translation program
3793 \begin_layout Standard
3794 Also, it should look into
3795 \begin_inset Flex Code
3798 \begin_layout Plain Layout
3804 file for defaults, too (for example, a
3805 \begin_inset Flex Code
3808 \begin_layout Plain Layout
3816 option to include default keyboard).
3824 \begin_layout Section
3825 International Keymap Stuff
3826 \begin_inset CommandInset label
3828 name "sec:International-Keymap-Stuff"
3835 \begin_layout Standard
3836 \begin_inset Note Note
3839 \begin_layout Plain Layout
3840 In doing the revisions on this document in March 2008, I did not look over
3841 this stuff, as I do not understand it.
3842 It would be good if someone else could do so.
3851 \begin_layout Standard
3852 The next two sections describe the
3853 \begin_inset Flex Code
3856 \begin_layout Plain Layout
3865 \begin_inset Flex Code
3868 \begin_layout Plain Layout
3876 file syntax in detail.
3877 These sections should help you design your own key map if the ones provided
3878 do not meet your needs.
3881 \begin_layout Subsection
3885 \begin_layout Standard
3889 \begin_inset Flex Code
3892 \begin_layout Plain Layout
3898 file maps keystrokes to characters or strings.
3899 As the name suggests, it sets a keyboard mapping.
3901 \begin_inset Flex Code
3904 \begin_layout Plain Layout
3915 \begin_inset Flex Code
3918 \begin_layout Plain Layout
3933 \begin_inset Flex Code
3936 \begin_layout Plain Layout
3949 \begin_inset Flex Code
3952 \begin_layout Plain Layout
3961 \begin_inset Flex Code
3964 \begin_layout Plain Layout
3972 are described in this section.
3975 \begin_layout Labeling
3976 \labelwidthstring 00.00.0000
3977 \begin_inset Flex Code
3980 \begin_layout Plain Layout
3988 Map a character to a string
3991 \begin_layout LyX-Code
4006 \begin_layout Standard
4039 the double-quote (")
4056 must be escaped with a preceding backslash (
4067 \begin_layout Standard
4069 \begin_inset Flex MenuItem
4072 \begin_layout Plain Layout
4080 statement to cause the symbol
4081 \begin_inset Flex MenuItem
4084 \begin_layout Plain Layout
4092 to be output for the keystroke
4093 \begin_inset Flex MenuItem
4096 \begin_layout Plain Layout
4107 \begin_layout LyX-Code
4113 \begin_layout Labeling
4114 \labelwidthstring 00.00.0000
4115 \begin_inset Flex Code
4118 \begin_layout Plain Layout
4126 Specify an accent character
4129 \begin_layout LyX-Code
4138 \begin_layout Standard
4139 This will make the cha
4177 This is the dead key
4181 \begin_layout Plain Layout
4188 refers to a key that does not produce a character by itself, but when followed
4189 with another key, produces the desired accent character.
4190 For example, a German characte
4192 r with an umlaut like
4202 can be produced in this manner.
4211 \begin_layout Standard
4224 and then another key not in
4241 followed by the other, not allowed key, as output.
4245 \begin_inset Flex MenuItem
4248 \begin_layout Plain Layout
4256 cancels a dead key, so if
4267 \begin_inset Flex MenuItem
4270 \begin_layout Plain Layout
4279 , the cursor will not go one position backwards but will instead cancel
4295 might have had on the next keystroke.
4299 \begin_layout Standard
4300 The following example specifies that the character ' is to be an acute accent,
4301 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4304 \begin_layout LyX-Code
4307 kmod ' acute aeiouAEIOU
4310 \begin_layout Labeling
4311 \labelwidthstring 00.00.0000
4312 \begin_inset Flex Code
4315 \begin_layout Plain Layout
4321 Specify an exception to the accent character
4324 \begin_layout LyX-Code
4333 \begin_layout Standard
4334 This defines an exce
4375 have been assigned a keystroke with a previous
4378 \begin_inset Flex Code
4381 \begin_layout Plain Layout
4405 must not belong in the
4452 If such a declaration does not exist in
4460 \begin_inset Flex Code
4463 \begin_layout Plain Layout
4497 \begin_inset Flex Code
4500 \begin_layout Plain Layout
4514 \begin_layout Standard
4515 The following command produces causes äi to be produced when you enter acute-i
4519 \begin_layout LyX-Code
4533 \begin_layout Labeling
4534 \labelwidthstring 00.00.0000
4535 \begin_inset Flex Code
4538 \begin_layout Plain Layout
4544 Combine two accent characters
4547 \begin_layout LyX-Code
4553 accent1 accent2 allowed
4556 \begin_layout Standard
4557 This one is getting pretty esoteric.
4558 It allows you to combine the effect
4614 \begin_inset Flex Code
4617 \begin_layout Plain Layout
4645 \begin_layout Standard
4646 Consider this example from the
4647 \begin_inset Flex Code
4650 \begin_layout Plain Layout
4661 \begin_layout LyX-Code
4664 kmod ; acute aeioyvhAEIOYVH
4668 kcomb acute umlaut iyIY
4671 \begin_layout Standard
4672 This allows you to press
4673 \begin_inset Flex MenuItem
4676 \begin_layout Plain Layout
4684 and get the effect of
4685 \begin_inset Flex Code
4688 \begin_layout Plain Layout
4707 in this case cancels the last dead key, so if you press
4708 \begin_inset Flex MenuItem
4711 \begin_layout Plain Layout
4720 \begin_inset Flex Code
4723 \begin_layout Plain Layout
4736 \begin_layout Subsection
4740 \begin_layout Standard
4742 \begin_inset Flex Code
4745 \begin_layout Plain Layout
4753 mapping is performed, a
4754 \begin_inset Flex Code
4757 \begin_layout Plain Layout
4767 file maps the strings that the symbols generate to characters in the current
4769 The LyX distribution currently includes at least the
4770 \begin_inset Flex Code
4773 \begin_layout Plain Layout
4782 \begin_inset Flex Code
4785 \begin_layout Plain Layout
4796 \begin_layout Standard
4798 \begin_inset Flex Code
4801 \begin_layout Plain Layout
4809 file is a sequence of declarations of the form
4812 \begin_layout LyX-Code
4825 \begin_layout Standard
4826 For example, in order to map
4827 \begin_inset Flex MenuItem
4830 \begin_layout Plain Layout
4840 to the corresponding character in the iso-8859-1 set (233), the following
4844 \begin_layout LyX-Code
4852 \begin_layout Standard
4854 \begin_inset Flex Code
4857 \begin_layout Plain Layout
4866 \begin_inset Flex Code
4869 \begin_layout Plain Layout
4887 the same character can apply to more than one string.
4889 \begin_inset Flex Code
4892 \begin_layout Plain Layout
4903 \begin_layout LyX-Code
4915 \begin_inset Newline newline
4931 \begin_layout Standard
4932 If LyX cannot find a mapping for the string produced by the keystroke or
4933 a deadkey sequence, it will check if it looks like an accented char and
4934 try to draw an accent over the character on screen.
4937 \begin_layout Subsection
4941 \begin_layout Standard
4942 There is a second way to add support for international characters through
4943 so-called dead-keys.
4944 A dead-key works in combination with a letter to produce an accented character.
4945 Here, we'll explain how to create a really simple dead-key to illustrate
4949 \begin_layout Standard
4950 Suppose you happen to need the circumflex character,
4951 \begin_inset Quotes eld
4955 \begin_inset Quotes erd
4960 \begin_inset Flex MenuItem
4963 \begin_layout Plain Layout
4970 \begin_inset space ~
4974 \begin_inset Flex MenuItem
4977 \begin_layout Plain Layout
4983 ] to the LyX command
4984 \begin_inset Flex Code
4987 \begin_layout Plain Layout
4994 \begin_inset Flex Code
4997 \begin_layout Plain Layout
5004 Now, whenever you type the
5005 \begin_inset Flex MenuItem
5008 \begin_layout Plain Layout
5014 -key followed by a letter, that letter will have a circumflex accent on
5016 For example, the sequence
5017 \begin_inset Quotes eld
5021 \begin_inset Flex MenuItem
5024 \begin_layout Plain Layout
5031 \begin_inset Quotes erd
5034 produces the letter:
5035 \begin_inset Quotes eld
5039 \begin_inset Quotes erd
5043 If you tried to type
5044 \begin_inset Quotes eld
5048 \begin_inset Flex MenuItem
5051 \begin_layout Plain Layout
5058 \begin_inset Quotes erd
5061 , however, LyX will complain with a beep, since a
5062 \begin_inset Quotes eld
5066 \begin_inset Flex MenuItem
5069 \begin_layout Plain Layout
5076 \begin_inset Quotes erd
5079 never takes a circumflex accent.
5081 \begin_inset Flex MenuItem
5084 \begin_layout Plain Layout
5090 after a dead-key produces the bare-accent.
5091 Please note this last point! If you bind a key to a dead-key, you'll need
5092 to rebind the character on that key to yet another key.
5094 \begin_inset Flex MenuItem
5097 \begin_layout Plain Layout
5103 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5106 \begin_layout Standard
5107 One common way to bind dead-keys is to use
5108 \begin_inset Flex MenuItem
5111 \begin_layout Plain Layout
5118 \begin_inset Flex MenuItem
5121 \begin_layout Plain Layout
5128 \begin_inset Flex MenuItem
5131 \begin_layout Plain Layout
5137 in combination with an accent, like
5138 \begin_inset Quotes eld
5142 \begin_inset Flex MenuItem
5145 \begin_layout Plain Layout
5152 \begin_inset Quotes erd
5156 \begin_inset Quotes eld
5160 \begin_inset Flex MenuItem
5163 \begin_layout Plain Layout
5170 \begin_inset Quotes erd
5174 \begin_inset Quotes eld
5178 \begin_inset Flex MenuItem
5181 \begin_layout Plain Layout
5188 \begin_inset Quotes erd
5192 Another way involves using
5193 \begin_inset Flex Code
5196 \begin_layout Plain Layout
5203 \begin_inset Flex Code
5206 \begin_layout Plain Layout
5212 to set up the special
5213 \begin_inset Flex Code
5216 \begin_layout Plain Layout
5224 \begin_inset Flex Code
5227 \begin_layout Plain Layout
5233 acts in some ways just like
5234 \begin_inset Flex MenuItem
5237 \begin_layout Plain Layout
5243 and permits you to bind keys to accented characters.
5244 You can also turn keys into dead-keys by binding them to something like
5246 \begin_inset Flex Code
5249 \begin_layout Plain Layout
5255 and then binding this symbolic key to the corresponding LyX command.
5259 \begin_layout Plain Layout
5264 : This is exactly what I do in my
5265 \begin_inset Flex Code
5268 \begin_layout Plain Layout
5275 \begin_inset Flex Code
5278 \begin_layout Plain Layout
5286 \begin_inset Flex MenuItem
5289 \begin_layout Plain Layout
5291 \begin_inset space ~
5300 \begin_inset Flex Code
5303 \begin_layout Plain Layout
5309 and a bunch of these
5310 \begin_inset Quotes eld
5314 \begin_inset Flex Code
5317 \begin_layout Plain Layout
5324 \begin_inset Quotes erd
5327 symbolic keys bound such things as
5328 \begin_inset Flex MenuItem
5331 \begin_layout Plain Layout
5333 \begin_inset space ~
5342 \begin_inset Flex MenuItem
5345 \begin_layout Plain Layout
5347 \begin_inset space ~
5356 This is how I produce my accented characters.
5361 You can make just about anything into the
5362 \begin_inset Flex Code
5365 \begin_layout Plain Layout
5372 \begin_inset Flex MenuItem
5375 \begin_layout Plain Layout
5381 keys, a spare function key, etc.
5382 As for the LyX commands that produce accents, check the entry for
5383 \begin_inset Flex Code
5386 \begin_layout Plain Layout
5397 You'll find the complete list there.
5400 \begin_layout Subsection
5401 Saving your Language Configuration
5404 \begin_layout Standard
5405 You can edit your preferences so that your desired language environment
5406 is automatically configured when LyX starts up, via the
5407 \begin_inset Flex MenuItem
5410 \begin_layout Plain Layout
5411 Edit\SpecialChar \menuseparator
5420 \begin_layout Chapter
5421 Installing New Document Classes, Layouts, and Templates
5422 \begin_inset CommandInset label
5424 name "cha:Installing-New-Document"
5429 \begin_inset Argument 1
5432 \begin_layout Plain Layout
5433 Installing New Document Classes
5441 \begin_layout Standard
5442 In this chapter, we describe the procedures for creating and installing
5443 new LyX layout and template files, as well as offer a refresher on correctly
5444 installing new LaTeX document classes.
5448 \begin_layout Standard
5449 First, let us a say a few words about how one ought to think about the relation
5450 between LyX and LaTeX.
5451 The thing to understand is that, in a certain sense, LyX doesn't know anything
5453 Indeed, from LyX's point of view, LaTeX is just one of several
5454 \begin_inset Quotes eld
5458 \begin_inset Quotes erd
5461 in which it is capable of producing output.
5462 Other such formats are DocBook, plaintext, and XHTML.
5463 LaTeX is, of course, a particularly important format, but very little of
5464 the information LyX has about LaTeX is actually contained in the program
5469 \begin_layout Plain Layout
5470 Some commands are sufficiently complex that they are
5471 \begin_inset Quotes eld
5475 \begin_inset Quotes erd
5479 But the developers generally regard this as a Bad Thing.
5484 Rather, that information, even for the standard classes like
5485 \begin_inset Flex Code
5488 \begin_layout Plain Layout
5494 , is contained in `layout files'.
5495 Similarly, LyX itself does not know much about DocBook or XHTML.
5496 What it knows is contained in layout files.
5499 \begin_layout Standard
5500 You can think of the layout file for a given document class as a translation
5501 manual between LyX constructs---paragraphs with their corresponding styles,
5502 certain sorts of insets, etc---and the corresponding LaTeX, DocBook, or
5504 Almost everything LyX knows about
5505 \begin_inset Flex Code
5508 \begin_layout Plain Layout
5514 , for example, is contained in the file
5515 \begin_inset Flex Code
5518 \begin_layout Plain Layout
5524 and in various other files it includes.
5525 For this reason, anyone intending to write layout files should plan to
5526 study the existing files.
5527 A good place to start is with
5528 \begin_inset Flex Code
5531 \begin_layout Plain Layout
5537 , which is included in
5538 \begin_inset Flex Code
5541 \begin_layout Plain Layout
5548 \begin_inset Flex Code
5551 \begin_layout Plain Layout
5557 , and many of the other layout files for document classes.
5558 This file is where sections and the like are defined:
5559 \begin_inset Flex Code
5562 \begin_layout Plain Layout
5568 tells LyX how paragraphs that are marked with the Section, Subsection,
5569 etc, styles can be translated into corresponding LaTeX, DocBook, and XHTML
5572 \begin_inset Flex Code
5575 \begin_layout Plain Layout
5581 file basically just includes several of these
5582 \begin_inset Flex Code
5585 \begin_layout Plain Layout
5594 \begin_layout Standard
5595 Defining the LyX--LaTeX correspondence is not the only thing layout files
5597 Their other job is to define how the LyX constructs themselves will appear
5599 The fact that layout files have these two jobs is often a source of confusion,
5600 because they are completely separate.
5601 Telling LyX how to translate a certain paragraph style into LaTeX does
5602 not tell LyX how to display it; conversely, telling LyX how to display
5603 a certain paragraph style does not tell LyX how to translate it into LaTeX
5604 (let alone tell LaTeX how to display it).
5605 So, in general, when you define a new LyX construct, you must always do
5606 two quite separate things: (i)
5607 \begin_inset space ~
5610 tell LyX how to translate it into LaTeX and (ii)
5611 \begin_inset space ~
5614 tell LyX how to display it.
5617 \begin_layout Standard
5618 Much the same is true, of course, as regards LyX's other backend formats,
5619 though XHTML is in some ways different, because in that case LyX
5623 able, to some extent, to use information about how it should display a
5624 paragraph on the screen to output information (in the form of CSS) about
5625 how the paragraph should be displayed in a browser.
5626 Even in this case, however, the distinction between what LyX does internally
5627 and how things are rendered externally remains in force, and the two can
5628 be controlled separately.
5630 \begin_inset CommandInset ref
5632 reference "sec:Tags-for-XHTML"
5639 \begin_layout Section
5640 Installing new LaTeX files
5643 \begin_layout Standard
5644 Some installations may not include a LaTeX package or class file that you
5645 would like to use within LyX.
5646 For example, you might need FoilTeX, a package for preparing slides for
5647 overhead projectors.
5648 Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
5649 a user interface for installing such packages.
5650 For example, with MiKTeX, you start the program
5651 \begin_inset Quotes eld
5655 \begin_inset space ~
5659 \begin_inset Quotes erd
5662 to get a list of available packages.
5663 To install one of them, right click on it or use the corresponding toolbar
5667 \begin_layout Standard
5668 If your LaTeX distribution does not provide such a `package manager', or
5669 if the package is not available from your distribution, then follow these
5670 steps to install it manually:
5673 \begin_layout Enumerate
5674 Get the package from
5675 \begin_inset CommandInset href
5678 target "http://www.ctan.org/"
5685 \begin_layout Enumerate
5686 If the package contains a file with the ending
5687 \begin_inset Quotes eld
5691 \begin_inset Flex Code
5694 \begin_layout Plain Layout
5701 \begin_inset Quotes erd
5704 (is the case for FoilTeX) then open a console, change to the folder of
5705 this file and execute the command
5706 \begin_inset Flex Code
5709 \begin_layout Plain Layout
5716 You have now unpacked the package and have all files to install it.
5717 Most LaTeX-packages are not packed and you can skip this step.
5720 \begin_layout Enumerate
5721 Now you need to decide if the package should be available for all users
5726 \begin_layout Enumerate
5727 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5728 for all users on your system, then install it in your `local' TeX tree,
5729 otherwise install it in your own `user' TeX tree.
5730 Where these trees should be created, if they do not already exist, depends
5732 To find this out, look in the file
5733 \begin_inset Flex Code
5736 \begin_layout Plain Layout
5746 \begin_layout Plain Layout
5747 This is usually in the directory
5748 \begin_inset Flex Code
5751 \begin_layout Plain Layout
5757 , though you can execute the command
5758 \begin_inset Flex Code
5761 \begin_layout Plain Layout
5772 The location of the `local' TeX tree is defined by the
5773 \begin_inset Flex Code
5776 \begin_layout Plain Layout
5782 variable; this is usually somewhere like
5783 \begin_inset Flex Code
5786 \begin_layout Plain Layout
5787 /usr/local/share/texmf
5793 The location of the `user' TeX tree is defined by
5794 \begin_inset Flex Code
5797 \begin_layout Plain Layout
5804 \begin_inset Flex Code
5807 \begin_layout Plain Layout
5814 (If these variables are not predefined, you have to define them.) You'll
5815 probably need root permissions to create or modify the `local' tree, but
5816 not for your `user' tree.
5817 \begin_inset Newline newline
5820 In general, it is recommended to install in the user tree because your user
5821 will not be modified or even overwritten when you upgrade your system.
5822 It will typically also be backed up together with everything else when
5823 you backup your home directory (which, of course, you do on a regular basis).
5826 \begin_layout Enumerate
5827 On Windows, if you want the new package to be available for all users on
5828 your system, change to the folder where LaTeX is installed and then change
5830 \begin_inset Flex Code
5833 \begin_layout Plain Layout
5844 (For MiKTeX, this would be by default the folder
5845 \begin_inset Flex Code
5848 \begin_layout Plain Layout
5866 \begin_layout Plain Layout
5867 Note that this will be the correct path only on English installations.
5868 On a German one, it would be
5869 \begin_inset Flex Code
5872 \begin_layout Plain Layout
5886 , and similarly for other languages.
5891 Create there a new folder
5892 \begin_inset Flex Code
5895 \begin_layout Plain Layout
5901 and copy all files of the package into it.
5903 \begin_inset Newline newline
5906 If the package should only available for you or you don't have admin permissions
5907 , do the same, but in the local LaTeX folder.
5909 \begin_inset space \thinspace{}
5913 \begin_inset space ~
5916 2.8 under Windows XP, this would be the folder:
5917 \begin_inset Newline newline
5923 \begin_inset Flex Code
5926 \begin_layout Plain Layout
5929 Documents and Settings
5941 \begin_inset Newline newline
5947 \begin_inset Phantom HPhantom
5950 \begin_layout Plain Layout
5961 \begin_inset Flex Code
5964 \begin_layout Plain Layout
5977 \begin_inset Newline newline
5980 On Vista, it would be:
5981 \begin_inset Newline newline
5985 \begin_inset Flex Code
5988 \begin_layout Plain Layout
6014 \begin_layout Enumerate
6015 Now one only need to tell LaTeX that there are new files.
6016 This depends on the used LaTeX-Distribution:
6020 \begin_layout Enumerate
6021 For TeXLive execute the command
6022 \begin_inset Flex Code
6025 \begin_layout Plain Layout
6032 If you installed the package for all users, then you will probably need
6033 to have root permissions for that.
6036 \begin_layout Enumerate
6037 For MiKTeX, if you have installed the package for all users, start the program
6039 \begin_inset Quotes eld
6043 \begin_inset space ~
6047 \begin_inset Quotes erd
6050 and press the button marked
6051 \begin_inset Quotes eld
6055 \begin_inset Quotes erd
6059 Otherwise start the program
6060 \begin_inset Quotes eld
6064 \begin_inset Quotes erd
6071 \begin_layout Enumerate
6072 Finally, you need to tell LyX that there are new packages available.
6073 So, in LyX, use the menu
6074 \begin_inset Flex MenuItem
6077 \begin_layout Plain Layout
6080 \SpecialChar \menuseparator
6086 and then restart LyX.
6089 \begin_layout Standard
6090 Now the package is installed.
6091 In our example, the document class
6092 \begin_inset Flex Code
6095 \begin_layout Plain Layout
6097 \begin_inset space ~
6104 \begin_layout Plain Layout
6116 will now be available under
6117 \begin_inset Flex MenuItem
6120 \begin_layout Plain Layout
6121 Document\SpecialChar \menuseparator
6122 Settings\SpecialChar \menuseparator
6132 \begin_layout Standard
6133 If you would like to use a LaTeX document class that is not even listed
6135 \begin_inset Flex MenuItem
6138 \begin_layout Plain Layout
6139 Document\SpecialChar \menuseparator
6140 Settings\SpecialChar \menuseparator
6146 , then you need to create a `layout' file for it.
6147 That is the topic of the next section.
6150 \begin_layout Section
6151 Types of layout files
6154 \begin_layout Standard
6155 This section describes the various sorts of LyX files that contain layout
6157 These files describe various paragraph and character styles, determining
6158 how LyX should display them and how they should be translated into LaTeX,
6159 DocBook, XHTML, or whatever output format is being used.
6163 \begin_layout Standard
6164 We shall try to provide a thorough description of the process of writing
6166 However, there are so many different types of documents supported even
6167 by just LaTeX that we can't hope to cover every different possibility or
6168 problem you might encounter.
6169 The LyX users' list is frequented by people with lots of experience with
6170 layout design who are willing to share what they've learned, so please
6171 feel free to ask questions there.
6174 \begin_layout Standard
6175 As you prepare to write a new layout, it is extremely helpful to look at
6176 the layouts distributed with LyX.
6177 If you write a LyX layout for a LaTeX document class that might also be
6178 used by others, or write a module that might be useful to others, then
6179 you should consider posting your layout to the
6180 \begin_inset CommandInset href
6182 name "layout section on the LyX wiki"
6183 target "http://wiki.lyx.org/Layouts/Layouts"
6187 or even to the LyX developers' list, so that it might be included in LyX
6192 \begin_layout Plain Layout
6193 Note that LyX is licensed under the General Public License, so any material
6194 that is contributed to LyX must be similarly licensed.
6202 \begin_layout Subsection
6204 \begin_inset CommandInset label
6206 name "sub:Layout-modules"
6213 \begin_layout Standard
6214 We have spoken to this point about `layout files'.
6215 But there are different sorts of files that contain layout information.
6216 Layout files, strictly so called, have the
6217 \begin_inset Flex Code
6220 \begin_layout Plain Layout
6226 extension and provide LyX with information about document classes.
6227 As of LyX 1.6, however, layout information can also be contained in layout
6233 \begin_inset Flex Code
6236 \begin_layout Plain Layout
6243 Modules are to LaTeX packages much as layouts are to LaTeX classes, and
6244 some modules—such as the
6245 \begin_inset Flex Code
6248 \begin_layout Plain Layout
6254 module—specifically provide support for one package.
6255 In a sense, layout modules are similar to included
6259 \begin_layout Plain Layout
6260 These can have any extension, but by convention have the
6261 \begin_inset Flex Code
6264 \begin_layout Plain Layout
6276 \begin_inset Flex Code
6279 \begin_layout Plain Layout
6285 —in that modules are not specific to a given document class but may be used
6286 with many different classes.
6287 The difference is that using an included file with
6288 \begin_inset Flex Code
6291 \begin_layout Plain Layout
6297 requires editing that file.
6298 Modules, by contrast, are selected in the
6299 \begin_inset Flex MenuItem
6302 \begin_layout Plain Layout
6303 Document\SpecialChar \menuseparator
6312 \begin_layout Standard
6313 Building modules is the easiest way to get started with layout editing,
6314 since it can be as simple as adding a single new paragraph style or flex
6316 But modules may, in principle, contain anything a layout file can contain.
6319 \begin_layout Standard
6320 After creating a new module and copying it to the
6321 \begin_inset Flex Code
6324 \begin_layout Plain Layout
6330 folder, you will need to reconfigure and then restart LyX for the module
6331 to appear in the menu.
6332 However, changes you make to the module will be seen immediately, if you
6334 \begin_inset Flex MenuItem
6337 \begin_layout Plain Layout
6338 Document\SpecialChar \menuseparator
6344 , highlight something, and then hit
6345 \begin_inset Quotes eld
6349 \begin_inset Quotes erd
6355 It is strongly recommended that you save your work before doing this
6360 it is strongly recommended that you not attempt to edit modules while simultaneo
6361 usly working on actual documents
6364 Though of course the developers strive to keep LyX stable in such situations,
6365 syntax errors and the like in your module file could cause strange behavior.
6368 \begin_layout Subsubsection
6372 \begin_layout Standard
6373 Modules are to LyX as packages are to LaTeX.
6374 Sometimes, however, you find yourself wanting a specific inset or character
6375 style just for one document and writing a module that will also be available
6376 to other documents makes little sense.
6377 What you need is LyX's
6378 \begin_inset Quotes eld
6382 \begin_inset Quotes erd
6388 \begin_layout Standard
6389 You will find it under
6391 Document\SpecialChar \menuseparator
6392 Settings\SpecialChar \menuseparator
6396 The large text box allows you to enter anything that you might enter in
6397 a layout file or module.
6398 You can think of a document's local layout, in fact, as a module that belongs
6400 So, in particular, you must enter a
6401 \begin_inset Flex Code
6404 \begin_layout Plain Layout
6411 Any format is acceptable, but one would normally use the format current
6413 (In LyX 2.0, the current layout format is 35.) You should be aware that local
6414 layout is not supported by versions of LyX prior to 1.6, so you should not
6415 use it if you want to be able to export your document to LyX 1.5 or earlier
6416 (without, that is, losing the local layout information).
6417 If you wish to be able to export to 1.6---local layout is supported in 1.6,
6418 though there is no UI for it---then you should use format 11 and, of course,
6419 use only layout constructs that were available in LyX 1.6.
6422 \begin_layout Standard
6423 When you have entered something in the
6424 \begin_inset Flex Code
6427 \begin_layout Plain Layout
6433 pane, LyX will enable the
6434 \begin_inset Quotes eld
6438 \begin_inset Quotes erd
6441 button at the bottom.
6442 Clicking this button will cause LyX to determine whether what you have
6443 entered is valid layout information for the chosen format.
6444 LyX will report the result but, unfortunately, will not tell you what errors
6445 there might have been.
6446 These will be written to the terminal, however, if LyX is started from
6448 You will not be permitted to save your local layout until you have entered
6452 \begin_layout Standard
6453 The warnings at the end of the previous section apply here, too.
6454 Do not play with local layout while you are actually working, especially
6455 if you have not saved your document.
6456 That said, using local layout with a test document can be a very convenient
6457 way to try out layout ideas, or even to start developing a module.
6460 \begin_layout Subsection
6462 \begin_inset Flex MenuItem
6465 \begin_layout Plain Layout
6474 \begin_layout Standard
6475 There are two situations you are likely to encounter when wanting to support
6476 a new LaTeX document class, involving style (
6477 \begin_inset Flex Code
6480 \begin_layout Plain Layout
6486 ) files and LaTeX2e class (
6487 \begin_inset Flex Code
6490 \begin_layout Plain Layout
6497 Supporting a style file is usually fairly easy.
6498 Supporting a new class file is a bit harder.
6499 We'll discuss the former in this section and the latter in the next.
6500 Similar remarks apply, of course, if you want to support a new DocBook
6504 \begin_layout Standard
6505 The easier case is the one in which your new document class is provided
6506 as a style file that is to be used in conjunction with an already supported
6508 For the sake of the example, we'll assume that the style file is called
6510 \begin_inset Flex MenuItem
6513 \begin_layout Plain Layout
6519 and that it is meant to be used with
6520 \begin_inset Flex MenuItem
6523 \begin_layout Plain Layout
6529 , which is a standard class.
6533 \begin_layout Standard
6534 Start by copying the existing class's layout file into your local directory:
6538 \begin_layout Plain Layout
6539 Of course, which directory is your local directory will vary by platform,
6540 and LyX allows you to specify your local directory on startup, too, using
6542 \begin_inset Flex Code
6545 \begin_layout Plain Layout
6559 \begin_layout LyX-Code
6560 cp report.layout ~/.lyx/layouts/myclass.layout
6563 \begin_layout Standard
6565 \begin_inset Flex Code
6568 \begin_layout Plain Layout
6574 and change the line:
6577 \begin_layout LyX-Code
6580 DeclareLaTeXClass{report}
6583 \begin_layout Standard
6587 \begin_layout LyX-Code
6590 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6593 \begin_layout Standard
6597 \begin_layout LyX-Code
6599 \begin_inset Newline newline
6605 \begin_inset Newline newline
6611 \begin_layout Standard
6612 near the top of the file.
6615 \begin_layout Standard
6616 Start LyX and select
6617 \begin_inset Flex MenuItem
6620 \begin_layout Plain Layout
6621 Tools\SpecialChar \menuseparator
6628 Then restart LyX and try creating a new document.
6630 \begin_inset Flex MenuItem
6633 \begin_layout Plain Layout
6639 " as a document class option in the
6640 \begin_inset Flex MenuItem
6643 \begin_layout Plain Layout
6644 Document\SpecialChar \menuseparator
6651 It is likely that some of the sectioning commands and such in your new
6652 class will work differently from how they worked in the base class—
6653 \begin_inset Flex Code
6656 \begin_layout Plain Layout
6662 in this example—so you can fiddle around with the settings for the different
6663 sections if you wish.
6664 The layout information for sections is contained in
6665 \begin_inset Flex Code
6668 \begin_layout Plain Layout
6674 , but you do not need to copy and change this file.
6675 Instead, you can simply add your changes to your layout file, after the
6677 \begin_inset Flex Code
6680 \begin_layout Plain Layout
6686 , which itself includes
6687 \begin_inset Flex Code
6690 \begin_layout Plain Layout
6697 For example, you might add these lines:
6700 \begin_layout LyX-Code
6704 \begin_layout LyX-Code
6708 \begin_layout LyX-Code
6712 \begin_layout LyX-Code
6716 \begin_layout LyX-Code
6720 \begin_layout Standard
6721 to change the font for chapter headings to sans-serif.
6722 This will override (or, in this case, add to) the existing declaration
6723 for the Chapter style.
6727 \begin_layout Standard
6728 Your new package may also provide commands or environments not present in
6730 In this case, you will want to add these to the layout file.
6732 \begin_inset CommandInset ref
6734 reference "sec:TextClass"
6738 for information on how to do so.
6741 \begin_layout Standard
6743 \begin_inset Flex MenuItem
6746 \begin_layout Plain Layout
6752 can be used with several different document classes, and even if it cannot,
6753 you might find it easiest just to write a module that you can load with
6755 The simplest possible such module would be:
6758 \begin_layout LyX-Code
6761 DeclareLyXModule{My Package}
6764 \begin_layout LyX-Code
6768 \begin_layout LyX-Code
6769 #Support for mypkg.sty.
6772 \begin_layout LyX-Code
6774 \begin_inset Newline newline
6780 \begin_layout LyX-Code
6782 \begin_inset Newline newline
6788 \begin_layout LyX-Code
6790 \begin_inset Newline newline
6796 \begin_inset Newline newline
6802 \begin_layout Standard
6803 A more complex module might modify the behavior of some existing constructs
6804 or define some new ones.
6806 \begin_inset CommandInset ref
6808 reference "sec:TextClass"
6815 \begin_layout Subsection
6817 \begin_inset Flex MenuItem
6820 \begin_layout Plain Layout
6829 \begin_layout Standard
6830 There are two possibilities here.
6831 One is that the class file is itself based upon an existing document class.
6832 For example, many thesis classes are based upon
6833 \begin_inset Flex MenuItem
6836 \begin_layout Plain Layout
6843 To see whether yours is, look for a line like
6846 \begin_layout LyX-Code
6852 \begin_layout Standard
6854 If so, then you may proceed largely as in the previous section, though
6856 \begin_inset Flex Code
6859 \begin_layout Plain Layout
6865 line will be different.
6866 If your new class is
6867 \begin_inset Flex Code
6870 \begin_layout Plain Layout
6876 and it is based upon
6877 \begin_inset Flex Code
6880 \begin_layout Plain Layout
6886 , then the line should read:
6890 \begin_layout Plain Layout
6891 And it will be easiest if you save the file to
6892 \begin_inset Flex Code
6895 \begin_layout Plain Layout
6901 : LyX assumes that the document class has the same name as the layout file.
6910 \begin_layout LyX-Code
6913 DeclareLaTeXClass[thesis,book]{thesis}
6916 \begin_layout Standard
6917 If, on the other hand, the new class is not based upon an existing class,
6918 you will probably have to
6919 \begin_inset Quotes eld
6923 \begin_inset Quotes erd
6927 We strongly suggest copying an existing layout file which uses a similar
6928 LaTeX class and then modifying it, if you can do so.
6929 At least use an existing file as a starting point so you can find out what
6930 items you need to worry about.
6931 Again, the specifics are covered below.
6934 \begin_layout Subsection
6936 \begin_inset CommandInset label
6938 name "sub:Creating-Templates"
6945 \begin_layout Standard
6946 Once you have written a layout file for a new document class, you might
6947 want to consider writing a
6952 A template acts as a kind of tutorial for your layout, showing how it might
6953 be used, though containing dummy content.
6954 You can of course look at the various templates included with LyX for ideas.
6957 \begin_layout Standard
6958 Templates are created just like usual documents: using LyX.
6959 The only difference is that usual documents contain all possible settings,
6960 including the font scheme and the paper size.
6961 Usually a user doesn't want a template to overwrite his preferred settings
6962 for such parameters.
6963 For that reason, the designer of a template should remove the corresponding
6965 \begin_inset Flex Code
6968 \begin_layout Plain Layout
6977 \begin_inset Flex Code
6980 \begin_layout Plain Layout
6988 from the template LyX file.
6989 This can be done with any simple text-editor, for example
6990 \begin_inset Flex Code
6993 \begin_layout Plain Layout
7000 \begin_inset Flex Code
7003 \begin_layout Plain Layout
7013 \begin_layout Standard
7014 Put the edited template files you create in
7015 \begin_inset Flex Code
7018 \begin_layout Plain Layout
7024 , copy the ones you use from the global template directory in
7025 \begin_inset Flex Code
7028 \begin_layout Plain Layout
7034 to the same place, and redefine the template path in the
7035 \begin_inset Flex MenuItem
7038 \begin_layout Plain Layout
7039 Tools\SpecialChar \menuseparator
7040 Preferences\SpecialChar \menuseparator
7049 \begin_layout Standard
7050 Note, by the way, that there is a template which has a particular meaning:
7052 \begin_inset Flex Code
7055 \begin_layout Plain Layout
7062 This template is loaded every time you create a new document with
7063 \begin_inset Flex MenuItem
7066 \begin_layout Plain Layout
7067 File\SpecialChar \menuseparator
7073 in order to provide useful defaults.
7074 To create this template from inside LyX, all you have to do is to open
7075 a document with the correct settings, and use the
7076 \begin_inset Flex MenuItem
7079 \begin_layout Plain Layout
7080 Save as Document Defaults
7088 \begin_layout Subsection
7089 Upgrading old layout files
7092 \begin_layout Standard
7093 The format of layout files changes with each LyX release, so old layout
7094 files need to be converted to the new format.
7095 This process has been automated since LyX 1.4: If LyX reads a layout file
7096 in an older format, it automatically calls the script
7097 \begin_inset Flex Code
7100 \begin_layout Plain Layout
7106 to convert it to a temporary file in current format.
7107 The original file is left untouched.
7108 If you use the layout file often, then, you may want to convert it permanently,
7109 so that LyX does not have to do so itself every time.
7110 To do this, you can call the converter manually:
7113 \begin_layout LyX-Code
7114 mv myclass.layout myclass.old
7117 \begin_layout LyX-Code
7118 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7121 \begin_layout Standard
7123 \begin_inset Flex Code
7126 \begin_layout Plain Layout
7132 with the name of your LyX system directory, of course.
7135 \begin_layout Standard
7136 Note that manual conversion does not affect included files, so these will
7137 have to be converted separately.
7140 \begin_layout Section
7141 \begin_inset CommandInset label
7143 name "sec:TextClass"
7147 The layout file format
7150 \begin_layout Standard
7151 When it's finally time to get your hands dirty and create or edit your own
7152 layout file, the following sections describe what you're up against.
7153 Our advice is to go slowly, save and test often, listen to soothing music,
7154 and enjoy one or two of your favorite adult beverages; more if you are
7155 getting particularly stuck.
7156 It's really not that hard, except that the multitude of options can become
7157 overwhelming if you try to do too much in one sitting.
7158 Go have another adult beverage, just for good measure.
7161 \begin_layout Standard
7162 Note that all the tags used in layout files are case-insensitive.
7164 \begin_inset Flex Code
7167 \begin_layout Plain Layout
7174 \begin_inset Flex Code
7177 \begin_layout Plain Layout
7184 \begin_inset Flex Code
7187 \begin_layout Plain Layout
7193 are really the same tag.
7194 The possible values are printed in brackets after the feature's name.
7195 The default value if a feature isn't specified inside a text class-description
7197 \begin_inset Flex Code
7200 \begin_layout Plain Layout
7209 If the argument has a data type like
7210 \begin_inset Quotes eld
7214 \begin_inset Quotes erd
7218 \begin_inset Quotes eld
7222 \begin_inset Quotes erd
7225 , the default is shown like this:
7226 \begin_inset Flex Code
7229 \begin_layout Plain Layout
7240 \begin_layout Subsection
7241 The document class declaration
7242 \change_inserted -712698321 1349766602
7248 \begin_layout Standard
7249 Lines in a layout file which begin with
7250 \begin_inset Flex Code
7253 \begin_layout Plain Layout
7260 There is one exception to this rule.
7262 \begin_inset Flex Code
7265 \begin_layout Plain Layout
7271 files should begin with
7272 \change_deleted -712698321 1349766533
7276 \change_inserted -712698321 1349766536
7282 \begin_layout LyX-Code
7285 #% Do not delete the line below; configure depends on this
7288 \begin_layout LyX-Code
7294 \change_deleted -712698321 1349766193
7296 \change_inserted -712698321 1349766201
7297 Article (Standard Class)
7300 \change_inserted -712698321 1349766538
7304 \begin_layout LyX-Code
7306 \change_inserted -712698321 1349766581
7311 DeclareCategory{Articles}
7316 \begin_layout Standard
7318 \change_inserted -712698321 1349766695
7322 \change_inserted -712698321 1349766626
7326 \change_deleted -712698321 1349766628
7328 \change_inserted -712698321 1349766628
7331 used when you (re)configure LyX.
7332 The layout file is read by the LaTeX script
7333 \begin_inset Flex Code
7336 \begin_layout Plain Layout
7342 , in a special mode where
7343 \begin_inset Flex Code
7346 \begin_layout Plain Layout
7353 The first line is just a LaTeX comment,
7354 \change_deleted -712698321 1349766656
7357 the second one contains the
7358 \change_inserted -712698321 1349766650
7361 declaration of the text class
7362 \change_inserted -712698321 1349766689
7363 , and the third line contains the optional classification of the class
7366 If these lines appear in a file named
7367 \begin_inset Flex Code
7370 \begin_layout Plain Layout
7376 , then they define a text class of name
7377 \begin_inset Flex Code
7380 \begin_layout Plain Layout
7386 (the name of the layout file) which uses the LaTeX document class
7387 \begin_inset Flex Code
7390 \begin_layout Plain Layout
7396 (the default is to use the same name as the layout).
7398 \begin_inset Quotes eld
7402 \change_deleted -712698321 1349766253
7404 \change_inserted -712698321 1349766260
7405 Article (Standard Class)
7408 \begin_inset Quotes erd
7411 that appears above is used as a description of the text class in the
7412 \begin_inset Flex MenuItem
7415 \begin_layout Plain Layout
7416 Document\SpecialChar \menuseparator
7424 \change_inserted -712698321 1349767097
7426 \begin_inset Quotes eld
7430 \begin_inset Quotes erd
7433 in the example) is also used in the
7434 \begin_inset Flex MenuItem
7437 \begin_layout Plain Layout
7439 \change_inserted -712698321 1349766801
7440 Document\SpecialChar \menuseparator
7446 dialog: the text classes are grouped by these categories (which are usually
7447 genres, so typical categories are
7448 \begin_inset Quotes eld
7452 \begin_inset Quotes erd
7456 \begin_inset Quotes eld
7460 \begin_inset Quotes erd
7464 \begin_inset Quotes eld
7468 \begin_inset Quotes erd
7472 \begin_inset Quotes eld
7476 \begin_inset Quotes erd
7480 \begin_inset Quotes eld
7484 \begin_inset Quotes erd
7488 \begin_inset Quotes eld
7492 \begin_inset Quotes erd
7496 If no category has been declared, the class will be put in the
7497 \begin_inset Quotes eld
7501 \begin_inset Quotes erd
7509 \begin_layout Standard
7510 Let's assume that you wrote your own text class that uses the
7511 \begin_inset Flex Code
7514 \begin_layout Plain Layout
7520 document class, but where you changed the appearance of the section headings.
7521 If you put it in a file
7522 \begin_inset Flex Code
7525 \begin_layout Plain Layout
7531 , the header of this file should be:
7534 \begin_layout LyX-Code
7537 #% Do not delete the line below; configure depends on this
7540 \begin_layout LyX-Code
7545 DeclareLaTeXClass[article]{
7546 \change_deleted -712698321 1349766303
7548 \change_inserted -712698321 1349766303
7552 \change_deleted -712698321 1349766338
7554 \change_inserted -712698321 1349766338
7558 \change_deleted -712698321 1349766340
7560 \change_inserted -712698321 1349766340
7564 \change_deleted -712698321 1349766343
7566 \change_inserted -712698321 1349766343
7570 \change_inserted -712698321 1349767223
7574 \begin_layout LyX-Code
7576 \change_inserted -712698321 1349767223
7581 DeclareCategory{Articles}
7586 \begin_layout Standard
7587 This declares a text class
7588 \begin_inset Flex Code
7591 \begin_layout Plain Layout
7597 , associated with the LaTeX document class
7598 \begin_inset Flex Code
7601 \begin_layout Plain Layout
7608 \begin_inset Quotes eld
7612 \change_deleted -712698321 1349766329
7614 \change_inserted -712698321 1349766329
7618 \change_deleted -712698321 1349766347
7620 \change_inserted -712698321 1349766347
7624 \change_deleted -712698321 1349766350
7626 \change_inserted -712698321 1349766350
7630 \change_deleted -712698321 1349766352
7632 \change_inserted -712698321 1349766352
7636 \begin_inset Quotes erd
7640 If your text class depends on several packages, you can declare it as:
7643 \begin_layout LyX-Code
7646 #% Do not delete the line below; configure depends on this
7649 \begin_layout LyX-Code
7654 DeclareLaTeXClass[article,foo.sty]{
7655 \change_deleted -712698321 1349766366
7657 \change_inserted -712698321 1349766366
7661 \change_deleted -712698321 1349766369
7663 \change_inserted -712698321 1349766369
7667 \change_deleted -712698321 1349766371
7669 \change_inserted -712698321 1349766371
7673 \change_deleted -712698321 1349766374
7675 \change_inserted -712698321 1349766374
7679 \change_inserted -712698321 1349767240
7683 \begin_layout LyX-Code
7685 \change_inserted -712698321 1349767240
7690 DeclareCategory{Articles}
7695 \begin_layout Standard
7696 This indicates that your text class uses the
7697 \begin_inset Flex Code
7700 \begin_layout Plain Layout
7707 Finally, it is also possible to declare classes for DocBook code.
7708 Typical declarations will look like:
7711 \begin_layout LyX-Code
7714 #% Do not delete the line below; configure depends on this
7717 \begin_layout LyX-Code
7722 DeclareDocBookClass[article]{SGML (DocBook
7723 \change_deleted -712698321 1349766387
7725 \change_inserted -712698321 1349766387
7729 \change_inserted -712698321 1349767247
7733 \begin_layout LyX-Code
7735 \change_inserted -712698321 1349767302
7740 DeclareCategory{Articles (DocBook)}
7745 \begin_layout Standard
7746 Note that these declarations can also be given an optional parameter declaring
7747 the name of the document class (but not a list).
7750 \begin_layout Standard
7751 So, to be as explicit as possible, the form of the layout declaration is:
7754 \begin_layout LyX-Code
7759 DeclareLaTeXClass[class,package.sty]{layout description}
7760 \change_inserted -712698321 1349767329
7764 \begin_layout LyX-Code
7766 \change_inserted -712698321 1349767339
7771 DeclareCategory{category}
7776 \begin_layout Standard
7777 The class need only be specified if the name of the LaTeX class file and
7778 the name of the layout file are different or if there are packages to load.
7779 If the name of the class file is not specified, then LyX will simply assume
7780 that it is the same as the name of the layout file.
7783 \begin_layout Standard
7784 When the text class has been modified to your taste, all you have to do
7785 is to copy it either to
7786 \begin_inset Flex Code
7789 \begin_layout Plain Layout
7796 \begin_inset Flex Code
7799 \begin_layout Plain Layout
7806 \begin_inset Flex MenuItem
7809 \begin_layout Plain Layout
7810 Tools\SpecialChar \menuseparator
7816 , exit LyX and restart.
7817 Then your new text class should be available along with the others.
7820 \begin_layout Standard
7821 Once the layout file is installed, you can edit it and see your changes
7822 without having to reconfigure or to restart LyX.
7827 \begin_layout Plain Layout
7828 In versions of LyX prior to 1.6, this was not true.
7829 As a result, editing layout files was very time consuming, since you had
7830 constantly to restart LyX to see changes.
7835 You can force a reload of the current layout by using the LyX function
7837 \begin_inset Flex MenuItem
7840 \begin_layout Plain Layout
7847 There is no default binding for this function—though, of course, you can
7848 bind it to a key yourself.
7849 But you will normally use this function simply by entering it in the mini-buffe
7854 \begin_layout Standard
7860 \begin_inset Flex MenuItem
7863 \begin_layout Plain Layout
7869 is very much an `advanced feature'.
7874 recommended that you save your work before using this function.
7879 recommended that you not attempt to edit layout information while simultaneousl
7880 y working on a document that you care about.
7881 Use a test document.
7882 Syntax errors and the like in your layout file could cause peculiar behavior.
7883 In particular, such errors could cause LyX to regard the current layout
7884 as invalid and to attempt to switch to some other layout.
7888 \begin_layout Plain Layout
7889 Really bad syntax errors may even caused LyX to exit.
7890 This is because certain sorts of errors may make LyX unable to read
7900 The LyX team strives to keep LyX stable in such situations, but safe is
7905 \begin_layout Plain Layout
7906 While we're giving advice: make regular backups.
7907 And be nice to your mother.
7915 \begin_layout Subsection
7916 The Module declaration
7919 \begin_layout Standard
7920 A module must begin with a line like the following:
7923 \begin_layout LyX-Code
7926 DeclareLyXModule[endnotes.sty]{Endnotes}
7929 \begin_layout Standard
7930 The mandatory argument, in curly brackets, is the name of the module, as
7932 \begin_inset Flex MenuItem
7935 \begin_layout Plain Layout
7936 Document\SpecialChar \menuseparator
7937 Settings\SpecialChar \menuseparator
7944 The argument in square brackets is optional: It declares any LaTeX packages
7945 on which the module depends.
7946 Please note that only packages about which LyX knows should be listed in
7947 the square brackets.
7951 \begin_layout Plain Layout
7952 The list of such packages is documented only in the source code.
7957 LyX will not check for arbitrary packages.
7958 It is also possible to use the form
7959 \begin_inset Flex MenuItem
7962 \begin_layout Plain Layout
7968 as an optional argument, which declares that the module can only be used
7969 when there exists a conversion chain between the formats `
7970 \begin_inset Flex Code
7973 \begin_layout Plain Layout
7980 \begin_inset Flex Code
7983 \begin_layout Plain Layout
7992 \begin_layout Standard
7993 The module declaration should then be followed by lines like the following
7997 \begin_layout Plain Layout
7998 Preferably in English if the module should be published with LyX.
7999 This description will appear in the list of messages to be translated and
8000 will be thus translated with the next interface update.
8008 \begin_layout LyX-Code
8012 \begin_layout LyX-Code
8013 #Adds an endnote command, in addition to footnotes.
8017 \begin_layout LyX-Code
8018 #You will need to add
8020 theendnotes in TeX code where you
8023 \begin_layout LyX-Code
8024 #want the endnotes to appear.
8028 \begin_layout LyX-Code
8032 \begin_layout LyX-Code
8033 #Requires: somemodule | othermodule
8036 \begin_layout LyX-Code
8037 #Excludes: badmodule
8040 \begin_layout Standard
8041 The description is used in
8042 \begin_inset Flex MenuItem
8045 \begin_layout Plain Layout
8046 Document\SpecialChar \menuseparator
8047 Settings\SpecialChar \menuseparator
8053 to provide the user with information about what the module does.
8055 \begin_inset Flex Code
8058 \begin_layout Plain Layout
8064 line is used to identify other modules with which this one must be used;
8066 \begin_inset Flex Code
8069 \begin_layout Plain Layout
8075 line is used to identify modules with which this one may not be used.
8076 Both are optional, and, as shown, multiple modules should be separated
8077 with the pipe symbol: |.
8078 Note that the required modules are treated disjunctively:
8082 of the required modules must be used.
8087 excluded module may be used.
8088 Note that modules are identified here by their
8093 \begin_inset Flex Code
8096 \begin_layout Plain Layout
8104 \begin_inset Flex Code
8107 \begin_layout Plain Layout
8114 \begin_inset Flex Code
8117 \begin_layout Plain Layout
8126 \begin_layout Subsection
8130 \begin_layout Standard
8131 The first non-comment line of any layout file, included file, or module
8136 contain the file format number:
8139 \begin_layout Description
8140 \begin_inset Flex Code
8143 \begin_layout Plain Layout
8150 \begin_inset Flex Code
8153 \begin_layout Plain Layout
8159 ] The format number of the layout file.
8162 \begin_layout Standard
8163 This tag was introduced with LyX
8164 \begin_inset space ~
8168 Layout files from older LyX versions do not have an explicit file format
8169 and are considered to have
8170 \begin_inset Flex Code
8173 \begin_layout Plain Layout
8175 \begin_inset space ~
8184 The format for the present version of LyX is format 35.
8185 But each version of LyX is capable of reading earlier versions' layout
8186 files, just as they are capable of reading files produced by earlier versions
8188 There is, however, no provision for converting to earlier formats.
8191 \begin_layout Subsection
8192 \begin_inset CommandInset label
8194 name "sub:General-text-class"
8198 General text class parameters
8201 \begin_layout Standard
8202 These are general parameters that govern the behavior of an entire document
8208 mean that they must appear in
8209 \begin_inset Flex Code
8212 \begin_layout Plain Layout
8218 files rather than in modules.
8219 A module can contain any layout tag.)
8222 \begin_layout Description
8223 \begin_inset Flex Code
8226 \begin_layout Plain Layout
8232 Adds information that will be output in the
8233 \begin_inset Flex Code
8236 \begin_layout Plain Layout
8242 block when the document is output to XHTML.
8243 Typically, this would be used to output CSS style information, but it can
8244 be used for anything that can appear in
8245 \begin_inset Flex Code
8248 \begin_layout Plain Layout
8256 \begin_inset Quotes eld
8260 \begin_inset Flex Code
8263 \begin_layout Plain Layout
8270 \begin_inset Quotes erd
8276 \begin_layout Description
8277 \begin_inset Flex Code
8280 \begin_layout Plain Layout
8286 Adds information to the document preamble.
8288 \begin_inset Newline newline
8292 \begin_inset Quotes eld
8296 \begin_inset Flex Code
8299 \begin_layout Plain Layout
8306 \begin_inset Quotes erd
8312 \begin_layout Description
8313 \begin_inset Flex Code
8316 \begin_layout Plain Layout
8322 Defines formats for use in the display of bibliographic information.
8324 \begin_inset CommandInset ref
8326 reference "sub:Citation-format-description"
8332 \begin_inset Quotes eld
8336 \begin_inset Flex Code
8339 \begin_layout Plain Layout
8346 \begin_inset Quotes erd
8352 \begin_layout Description
8353 \begin_inset Flex Code
8356 \begin_layout Plain Layout
8362 Describes various global options supported by the document class.
8364 \begin_inset space ~
8368 \begin_inset CommandInset ref
8370 reference "sub:ClassOptions"
8376 \begin_inset Quotes eld
8380 \begin_inset Flex Code
8383 \begin_layout Plain Layout
8390 \begin_inset Quotes erd
8396 \begin_layout Description
8397 \begin_inset Flex Code
8400 \begin_layout Plain Layout
8407 \begin_inset Flex Code
8410 \begin_layout Plain Layout
8419 \begin_inset space \thinspace{}
8423 \begin_inset Flex Code
8426 \begin_layout Plain Layout
8432 ] Whether the class should
8436 to having one or two columns.
8437 Can be changed in the
8438 \begin_inset Flex MenuItem
8441 \begin_layout Plain Layout
8442 Document\SpecialChar \menuseparator
8451 \begin_layout Description
8452 \begin_inset Flex Code
8455 \begin_layout Plain Layout
8462 \begin_inset Flex Code
8465 \begin_layout Plain Layout
8471 ] This sequence defines the properties for a counter.
8472 If the counter does not yet exist, it is created; if it does exist, it
8475 \begin_inset Quotes eld
8479 \begin_inset Flex Code
8482 \begin_layout Plain Layout
8489 \begin_inset Quotes erd
8493 \begin_inset Newline newline
8497 \begin_inset space ~
8501 \begin_inset CommandInset ref
8503 reference "sub:Counters"
8507 for details on counters.
8510 \begin_layout Description
8511 \begin_inset Flex Code
8514 \begin_layout Plain Layout
8520 Sets the default font used to display the document.
8522 \begin_inset space ~
8526 \begin_inset CommandInset ref
8528 reference "sub:Font-description"
8532 for how to declare fonts.
8534 \begin_inset Quotes eld
8538 \begin_inset Flex Code
8541 \begin_layout Plain Layout
8548 \begin_inset Quotes erd
8554 \begin_layout Description
8555 \begin_inset Flex Code
8558 \begin_layout Plain Layout
8565 \begin_inset Flex Code
8568 \begin_layout Plain Layout
8574 ] Specifies a module to be included by default with this document class.
8575 The module is specified as filename without the
8576 \begin_inset Flex Code
8579 \begin_layout Plain Layout
8586 The user can still remove the module, but it will be active at the outset.
8587 (This applies only when new files are created, or when this class is chosen
8588 for an existing document.)
8591 \begin_layout Description
8592 \begin_inset Flex Code
8595 \begin_layout Plain Layout
8602 \begin_inset Flex Code
8605 \begin_layout Plain Layout
8611 ] This is the style that will be assigned to new paragraphs, usually
8612 \begin_inset Flex MenuItem
8615 \begin_layout Plain Layout
8622 This will default to the first defined style if not given, but you are
8623 encouraged to use this directive.
8626 \begin_layout Description
8627 \begin_inset Flex Code
8630 \begin_layout Plain Layout
8637 \begin_inset Flex Code
8640 \begin_layout Plain Layout
8646 ] This tag indicates that the module (which is specified by filename without
8648 \begin_inset Flex Code
8651 \begin_layout Plain Layout
8657 extension) cannot be used with this document class.
8658 This might be used in a journal-specific layout file to prevent, say, the
8660 \begin_inset Flex Code
8663 \begin_layout Plain Layout
8669 module that numbers theorems by section.
8674 be used in a module.
8675 Modules have their own way of excluding other modules (see section
8676 \begin_inset space ~
8680 \begin_inset CommandInset ref
8682 reference "sub:Layout-modules"
8689 \begin_layout Description
8690 \begin_inset Flex Code
8693 \begin_layout Plain Layout
8699 Defines a new float.
8701 \begin_inset space ~
8705 \begin_inset CommandInset ref
8707 reference "sub:Floats"
8713 \begin_inset Quotes eld
8717 \begin_inset Flex Code
8720 \begin_layout Plain Layout
8727 \begin_inset Quotes erd
8733 \begin_layout Description
8734 \begin_inset Flex Code
8737 \begin_layout Plain Layout
8743 Sets the information that will be output in the
8744 \begin_inset Flex Code
8747 \begin_layout Plain Layout
8753 block when this document class is output to XHTML.
8754 Note that this will completely override any prior
8755 \begin_inset Flex Code
8758 \begin_layout Plain Layout
8765 \begin_inset Flex Code
8768 \begin_layout Plain Layout
8776 \begin_inset Newline newline
8780 \begin_inset Flex Code
8783 \begin_layout Plain Layout
8789 if you just want to add material to the preamble.) Must end with
8790 \begin_inset Quotes eld
8794 \begin_inset Flex Code
8797 \begin_layout Plain Layout
8804 \begin_inset Quotes erd
8810 \begin_layout Description
8811 \begin_inset Flex Code
8814 \begin_layout Plain Layout
8821 \begin_inset Flex Code
8824 \begin_layout Plain Layout
8830 ] The style to use for the table of contents, bibliography, and so forth,
8831 when the document is output to HTML.
8832 For articles, this should normally be
8833 \begin_inset Flex Code
8836 \begin_layout Plain Layout
8843 \begin_inset Flex Code
8846 \begin_layout Plain Layout
8853 If it is not given, then LyX will attempt to figure out which layout to
8857 \begin_layout Description
8858 \begin_inset Flex Code
8861 \begin_layout Plain Layout
8868 \begin_inset Flex Code
8871 \begin_layout Plain Layout
8877 ] Modifies the properties of the given counter.
8878 If the counter does not exist, the statement is ignored.
8880 \begin_inset Quotes eld
8884 \begin_inset Flex Code
8887 \begin_layout Plain Layout
8894 \begin_inset Quotes erd
8898 \begin_inset Newline newline
8902 \begin_inset space ~
8906 \begin_inset CommandInset ref
8908 reference "sub:Counters"
8912 for details on counters.
8915 \begin_layout Description
8916 \begin_inset Flex Code
8919 \begin_layout Plain Layout
8926 \begin_inset Flex Code
8929 \begin_layout Plain Layout
8935 ] Modifies the properties of the given paragraph style.
8936 If the style does not exist, the statement is ignored.
8938 \begin_inset Quotes eld
8942 \begin_inset Flex Code
8945 \begin_layout Plain Layout
8952 \begin_inset Quotes erd
8958 \begin_layout Description
8959 \begin_inset Flex Code
8962 \begin_layout Plain Layout
8969 \begin_inset Flex Code
8972 \begin_layout Plain Layout
8978 ] This allows you to include another layout definition file within yours
8979 to avoid duplicating commands.
8980 Common examples are the standard layout files, for example,
8981 \begin_inset Flex Code
8984 \begin_layout Plain Layout
8990 , which contains most of the basic layouts.
8993 \begin_layout Description
8994 \begin_inset Flex Code
8997 \begin_layout Plain Layout
9004 \begin_inset Flex Code
9007 \begin_layout Plain Layout
9013 ] This section (re-)defines the layout of an inset.
9014 It can be applied to an existing inset or to a new, user-defined inset,
9015 e.g., a new character style.
9017 \begin_inset Quotes eld
9021 \begin_inset Flex Code
9024 \begin_layout Plain Layout
9031 \begin_inset Quotes erd
9035 \begin_inset Newline newline
9039 \begin_inset space ~
9043 \begin_inset CommandInset ref
9045 reference "sub:Flex-insets-and"
9049 for more information.
9053 \begin_layout Description
9054 \begin_inset Flex Code
9057 \begin_layout Plain Layout
9064 \begin_inset Flex Code
9067 \begin_layout Plain Layout
9073 ] A string that indicates the width of the left margin on the screen, for
9075 \begin_inset Quotes eld
9079 \begin_inset Flex Code
9082 \begin_layout Plain Layout
9089 \begin_inset Quotes erd
9093 (Note that this is not a `length', like
9094 \begin_inset Quotes eld
9098 \begin_inset Quotes erd
9104 \begin_layout Description
9105 \begin_inset Flex Code
9108 \begin_layout Plain Layout
9115 \begin_inset Flex Code
9118 \begin_layout Plain Layout
9124 ] Deletes an existing counter, usually one defined in an included file.
9127 \begin_layout Description
9128 \begin_inset Flex Code
9131 \begin_layout Plain Layout
9138 \begin_inset Flex Code
9141 \begin_layout Plain Layout
9147 ] Deletes an existing float.
9148 This is particularly useful when you want to suppress a float that has
9149 been defined in an input file.
9152 \begin_layout Description
9153 \begin_inset Flex Code
9156 \begin_layout Plain Layout
9163 \begin_inset Flex Code
9166 \begin_layout Plain Layout
9172 ] Deletes an existing style.
9175 \begin_layout Description
9176 \begin_inset Flex Code
9179 \begin_layout Plain Layout
9186 \begin_inset Flex Code
9189 \begin_layout Plain Layout
9195 ] The file format (as defined in the LyX preferences) produced by this document
9197 It is mainly useful when
9198 \begin_inset Flex Code
9201 \begin_layout Plain Layout
9208 \begin_inset Flex Code
9211 \begin_layout Plain Layout
9217 and one wants to define a new type of literate document.
9218 The format is reset to
9219 \begin_inset Quotes eld
9223 \begin_inset Flex Code
9226 \begin_layout Plain Layout
9233 \begin_inset Quotes erd
9237 \begin_inset Quotes eld
9241 \begin_inset Flex Code
9244 \begin_layout Plain Layout
9251 \begin_inset Quotes erd
9254 when the corresponding
9255 \begin_inset Flex Code
9258 \begin_layout Plain Layout
9264 parameter is encountered.
9267 \begin_layout Description
9268 \begin_inset Flex Code
9271 \begin_layout Plain Layout
9278 \begin_inset Flex Code
9281 \begin_layout Plain Layout
9292 \begin_inset Flex Code
9295 \begin_layout Plain Layout
9302 \begin_inset Flex Code
9305 \begin_layout Plain Layout
9311 ] Specifies what sort of output documents using this class will produce.
9314 \begin_layout Description
9315 \begin_inset Flex Code
9318 \begin_layout Plain Layout
9325 \begin_inset Flex Code
9328 \begin_layout Plain Layout
9337 \begin_inset Flex Code
9340 \begin_layout Plain Layout
9347 \begin_inset Flex Code
9350 \begin_layout Plain Layout
9356 ] The default pagestyle.
9357 Can be changed in the
9358 \begin_inset Flex MenuItem
9361 \begin_layout Plain Layout
9362 Document\SpecialChar \menuseparator
9371 \begin_layout Description
9372 \begin_inset Flex Code
9375 \begin_layout Plain Layout
9381 Sets the preamble for the LaTeX document.
9382 Note that this will completely override any prior
9383 \begin_inset Flex Code
9386 \begin_layout Plain Layout
9393 \begin_inset Flex Code
9396 \begin_layout Plain Layout
9404 \begin_inset Flex Code
9407 \begin_layout Plain Layout
9413 if you just want to add material to the preamble.) Must end with
9414 \begin_inset Quotes eld
9418 \begin_inset Flex Code
9421 \begin_layout Plain Layout
9428 \begin_inset Quotes erd
9434 \begin_layout Description
9435 \begin_inset Flex Code
9438 \begin_layout Plain Layout
9445 \begin_inset Flex Code
9448 \begin_layout Plain Layout
9455 \begin_inset Flex Code
9458 \begin_layout Plain Layout
9467 \begin_inset space \thinspace{}
9471 \begin_inset Flex Code
9474 \begin_layout Plain Layout
9480 ] Whether the class already provides the feature
9481 \begin_inset Flex Code
9484 \begin_layout Plain Layout
9491 A feature is in general the name of a package (e.
9492 \begin_inset space \thinspace{}
9496 \begin_inset space \space{}
9500 \begin_inset Flex Code
9503 \begin_layout Plain Layout
9510 \begin_inset Flex Code
9513 \begin_layout Plain Layout
9520 \begin_inset space \thinspace{}
9524 \begin_inset space \space{}
9528 \begin_inset Flex Code
9531 \begin_layout Plain Layout
9538 \begin_inset Flex Code
9541 \begin_layout Plain Layout
9549 \begin_inset space ~
9553 \begin_inset CommandInset ref
9555 reference "chap:List-of-functions"
9559 for the list of features.
9562 \begin_layout Description
9563 \begin_inset Flex Code
9566 \begin_layout Plain Layout
9573 \begin_inset Flex Code
9576 \begin_layout Plain Layout
9582 ] Indicates that this layout provides the functionality of the module mentioned,
9583 which should be specified by the filename without the
9584 \begin_inset Flex Code
9587 \begin_layout Plain Layout
9594 This will typically be used if the layout includes the module directly,
9595 rather than using the
9596 \begin_inset Flex Code
9599 \begin_layout Plain Layout
9605 tag to indicate that it ought to be used.
9606 It could also be used in a module that provided an alternate implementation
9607 of the same functionality.
9610 \begin_layout Description
9611 \begin_inset Flex Code
9614 \begin_layout Plain Layout
9621 \begin_inset Flex Code
9624 \begin_layout Plain Layout
9630 ] Whether the class requires the feature
9631 \begin_inset Flex Code
9634 \begin_layout Plain Layout
9641 Multiple features must be separated by commas.
9642 Note that you can only request supported features.
9644 \begin_inset space ~
9648 \begin_inset CommandInset ref
9650 reference "chap:List-of-functions"
9654 for the list of features.)
9657 \begin_layout Description
9658 \begin_inset Flex Code
9661 \begin_layout Plain Layout
9668 \begin_inset Flex Code
9671 \begin_layout Plain Layout
9677 ] A string that indicates the width of the right margin on the screen, for
9679 \begin_inset Quotes eld
9683 \begin_inset Flex Code
9686 \begin_layout Plain Layout
9693 \begin_inset Quotes erd
9699 \begin_layout Description
9700 \begin_inset Flex Code
9703 \begin_layout Plain Layout
9710 \begin_inset Flex Code
9713 \begin_layout Plain Layout
9719 ] Sets which divisions get numbered.
9721 \begin_inset Newline newline
9725 \begin_inset Flex Code
9728 \begin_layout Plain Layout
9737 \begin_layout Description
9738 \begin_inset Flex Code
9741 \begin_layout Plain Layout
9748 \begin_inset Flex Code
9751 \begin_layout Plain Layout
9760 \begin_inset space \thinspace{}
9764 \begin_inset Flex Code
9767 \begin_layout Plain Layout
9773 ] Whether the class-default should be printing on one or both sides of the
9775 Can be changed in the
9776 \begin_inset Flex MenuItem
9779 \begin_layout Plain Layout
9780 Document\SpecialChar \menuseparator
9789 \begin_layout Description
9790 \begin_inset Flex Code
9793 \begin_layout Plain Layout
9800 \begin_inset Flex Code
9803 \begin_layout Plain Layout
9809 ] This sequence defines a paragraph style.
9810 If the style does not yet exist, it is created; if it does exist, its parameter
9813 \begin_inset Quotes eld
9817 \begin_inset Flex Code
9820 \begin_layout Plain Layout
9827 \begin_inset Quotes erd
9831 \begin_inset Newline newline
9835 \begin_inset space ~
9839 \begin_inset CommandInset ref
9841 reference "sub:Paragraph-Styles"
9845 for details on paragraph styles.
9848 \begin_layout Description
9849 \begin_inset Flex Code
9852 \begin_layout Plain Layout
9859 \begin_inset Flex Code
9862 \begin_layout Plain Layout
9868 ] The name of the command or environment to be used with
9869 \begin_inset Flex Code
9872 \begin_layout Plain Layout
9881 \begin_layout Description
9882 \begin_inset Flex Code
9885 \begin_layout Plain Layout
9892 \begin_inset Flex Code
9895 \begin_layout Plain Layout
9904 \begin_inset Flex Code
9907 \begin_layout Plain Layout
9913 ] Indicates what kind of markup is used to define the title of a document.
9915 \begin_inset Flex Code
9918 \begin_layout Plain Layout
9924 means that the macro with name
9925 \begin_inset Flex Code
9928 \begin_layout Plain Layout
9934 will be inserted after the last layout which has
9935 \begin_inset Quotes eld
9939 \begin_inset Flex Code
9942 \begin_layout Plain Layout
9944 \begin_inset space ~
9953 \begin_inset Quotes erd
9958 \begin_inset Flex Code
9961 \begin_layout Plain Layout
9967 corresponds to the case where all layouts which have
9968 \begin_inset Quotes eld
9972 \begin_inset Flex Code
9975 \begin_layout Plain Layout
9977 \begin_inset space ~
9986 \begin_inset Quotes erd
9989 should be enclosed into the
9990 \begin_inset Flex Code
9993 \begin_layout Plain Layout
10002 \begin_layout Description
10003 \begin_inset Flex Code
10006 \begin_layout Plain Layout
10013 \begin_inset Flex Code
10016 \begin_layout Plain Layout
10022 ] Sets which divisions are included in the table of contents.
10024 \begin_inset Flex Code
10027 \begin_layout Plain Layout
10036 \begin_layout Subsection
10037 \begin_inset Flex Code
10040 \begin_layout Plain Layout
10047 \begin_inset CommandInset label
10049 name "sub:ClassOptions"
10056 \begin_layout Standard
10058 \begin_inset Flex Code
10061 \begin_layout Plain Layout
10067 section can contain the following entries:
10070 \begin_layout Description
10071 \begin_inset Flex Code
10074 \begin_layout Plain Layout
10081 \begin_inset Flex Code
10084 \begin_layout Plain Layout
10090 ] The list of available font sizes for the document's main font, separated
10092 \begin_inset Quotes eld
10096 \begin_inset Flex Code
10099 \begin_layout Plain Layout
10106 \begin_inset Quotes erd
10112 \begin_layout Description
10113 \begin_inset Flex Code
10116 \begin_layout Plain Layout
10122 Used to set the DTD line with XML-based output classes.
10124 \begin_inset space \thinspace{}
10128 \begin_inset Quotes eld
10131 -//OASIS//DTD DocBook V4.2//EN
10132 \begin_inset Quotes erd
10138 \begin_layout Description
10139 \begin_inset Flex Code
10142 \begin_layout Plain Layout
10149 \begin_inset Flex Code
10152 \begin_layout Plain Layout
10153 string="empty|plain|headings|fancy"
10158 ] The list of available page sty\SpecialChar \-
10160 \begin_inset Quotes eld
10164 \begin_inset Flex Code
10167 \begin_layout Plain Layout
10174 \begin_inset Quotes erd
10180 \begin_layout Description
10181 \begin_inset Flex Code
10184 \begin_layout Plain Layout
10191 \begin_inset Flex Code
10194 \begin_layout Plain Layout
10200 ] Some document class options, separated by a comma, that will be added
10201 to the optional part of the
10202 \begin_inset Flex Code
10205 \begin_layout Plain Layout
10216 \begin_layout Standard
10218 \begin_inset Flex Code
10221 \begin_layout Plain Layout
10227 section must end with
10228 \begin_inset Quotes eld
10232 \begin_inset Flex Code
10235 \begin_layout Plain Layout
10242 \begin_inset Quotes erd
10248 \begin_layout Subsection
10250 \begin_inset CommandInset label
10252 name "sub:Paragraph-Styles"
10259 \begin_layout Standard
10260 A paragraph style description looks like this:
10264 \begin_layout Plain Layout
10265 Note that this will either define a new style or modify an existing one.
10273 \begin_layout LyX-Code
10280 \begin_layout LyX-Code
10284 \begin_layout LyX-Code
10288 \begin_layout Standard
10289 where the following commands are allowed:
10292 \begin_layout Description
10293 \begin_inset Flex Code
10296 \begin_layout Plain Layout
10303 \begin_inset Flex Code
10306 \begin_layout Plain Layout
10311 , left, right, center
10316 ] Paragraph alignment.
10319 \begin_layout Description
10320 \begin_inset Flex Code
10323 \begin_layout Plain Layout
10330 \begin_inset Flex Code
10333 \begin_layout Plain Layout
10338 , left, right, center
10343 ] A comma separated list of permitted alignments.
10344 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10346 For example a right-aligned or centered enumeration isn't possible.)
10347 \change_inserted -712698321 1353679769
10351 \begin_layout Description
10353 \change_inserted -712698321 1353680268
10354 \begin_inset Flex Code
10357 \begin_layout Plain Layout
10359 \change_inserted -712698321 1353679781
10366 \begin_inset Flex Code
10369 \begin_layout Plain Layout
10371 \change_inserted -712698321 1353679772
10377 ] Defines argument number <int> of a command\SpecialChar \slash{}
10378 environment associated with
10380 This is useful for things like section headings, and only makes sense with
10382 Every (optional or required) argument of a command or environment -- except
10383 for the required argument that is associated with the content of the paragraph
10384 itself -- has a separate definition, where the number specifies the order
10386 The definition must end with
10387 \begin_inset Flex Code
10390 \begin_layout Plain Layout
10392 \change_inserted -712698321 1353680069
10399 So a command with two optional arguments has:
10403 \begin_layout Quote
10405 \change_inserted -712698321 1353680127
10411 \begin_layout Quote
10413 \change_inserted -712698321 1353680195
10419 \begin_layout Quote
10421 \change_inserted -712698321 1353680135
10427 \begin_layout Quote
10429 \change_inserted -712698321 1353680140
10435 \begin_layout Quote
10437 \change_inserted -712698321 1353680197
10443 \begin_layout Quote
10445 \change_inserted -712698321 1353680147
10451 \begin_layout Standard
10453 \change_inserted -712698321 1353680528
10455 \begin_inset Flex Code
10458 \begin_layout Plain Layout
10460 \change_inserted -712698321 1353680412
10466 definition, the following specifications are possible:
10469 \begin_layout Itemize
10471 \change_inserted -712698321 1355076779
10472 \begin_inset Flex Code
10475 \begin_layout Plain Layout
10477 \change_inserted -712698321 1353680543
10486 \begin_inset Flex Code
10489 \begin_layout Plain Layout
10491 \change_inserted -712698321 1353680567
10497 The string that will appear both in the menu (to insert this argument)
10498 and on the argument inset button (unless you also specify a separate
10499 \begin_inset Flex Code
10502 \begin_layout Plain Layout
10504 \change_inserted -712698321 1355076779
10511 For the menu, you can define an accelerator by appending the respective
10512 character to the string, divided by
10513 \begin_inset Quotes eld
10517 \begin_inset Quotes erd
10521 \begin_inset space \thinspace{}
10526 \begin_inset Flex Code
10529 \begin_layout Plain Layout
10531 \change_inserted -712698321 1353691482
10532 \begin_inset Quotes eld
10536 \begin_inset Quotes erd
10549 \begin_layout Itemize
10551 \change_inserted -712698321 1355076754
10552 \begin_inset Flex Code
10555 \begin_layout Plain Layout
10557 \change_inserted -712698321 1355076658
10564 \begin_inset Flex Code
10567 \begin_layout Plain Layout
10569 \change_inserted -712698321 1355076654
10575 A separate string for the menu.
10576 You can define an accelerator by appending the respective character to
10577 the string, divided by
10578 \begin_inset Quotes eld
10582 \begin_inset Quotes erd
10586 \begin_inset space \thinspace{}
10591 \begin_inset Flex Code
10594 \begin_layout Plain Layout
10596 \change_inserted -712698321 1355076654
10597 \begin_inset Quotes eld
10601 \begin_inset Quotes erd
10610 This specification is optional.
10611 If it is not given the
10612 \begin_inset Flex Code
10615 \begin_layout Plain Layout
10617 \change_inserted -712698321 1355076736
10625 will be used instead for the menu.
10628 \begin_layout Itemize
10630 \change_inserted -712698321 1353680665
10631 \begin_inset Flex Code
10634 \begin_layout Plain Layout
10636 \change_inserted -712698321 1353680616
10643 \begin_inset Flex Code
10646 \begin_layout Plain Layout
10648 \change_inserted -712698321 1353680623
10654 A longer explanatory text that appears in the tooltip when hovering over
10655 the argument inset.
10658 \begin_layout Itemize
10660 \change_inserted -712698321 1353680874
10661 \begin_inset Flex Code
10664 \begin_layout Plain Layout
10666 \change_inserted -712698321 1353680732
10673 \begin_inset Flex Code
10676 \begin_layout Plain Layout
10678 \change_inserted -712698321 1353680738
10684 Declare if this is a mandatory
10685 \change_inserted 2090807402 1353765594
10687 \change_inserted -712698321 1353680874
10689 \change_inserted 2090807402 1353765599
10691 \change_inserted -712698321 1353680874
10693 Mandatory arguments will be output empty if not given, while optional arguments
10694 will not be output at all.
10695 By default, mandatory arguments are delimited by
10696 \begin_inset Flex Code
10699 \begin_layout Plain Layout
10701 \change_inserted -712698321 1353680808
10709 , while optional arguments are delimited by
10710 \begin_inset Flex Code
10713 \begin_layout Plain Layout
10715 \change_inserted -712698321 1353680833
10724 \begin_layout Itemize
10726 \change_inserted -712698321 1353917199
10727 \begin_inset Flex Code
10730 \begin_layout Plain Layout
10732 \change_inserted -712698321 1353680879
10739 \begin_inset Flex Code
10742 \begin_layout Plain Layout
10744 \change_inserted -712698321 1353680874
10750 defines another argument (by its number) which this argument requires to
10751 be output if it is itself output.
10753 \begin_inset space \thinspace{}
10756 g., in LaTeX commands, optional arguments often require previous optional
10757 arguments to be output (at least empty), as in
10758 \begin_inset Flex Code
10761 \begin_layout Plain Layout
10763 \change_inserted -712698321 1353688183
10766 command[][arg]{text}
10774 This can be achieved by the statement
10775 \begin_inset Flex Code
10778 \begin_layout Plain Layout
10780 \change_inserted -712698321 1353681031
10789 \begin_inset Flex Code
10792 \begin_layout Plain Layout
10794 \change_inserted -712698321 1353681045
10805 \begin_layout Itemize
10807 \change_inserted -712698321 1354263104
10808 \begin_inset Flex Code
10811 \begin_layout Plain Layout
10813 \change_inserted -712698321 1353681072
10822 \begin_inset Flex Code
10825 \begin_layout Plain Layout
10827 \change_inserted -712698321 1353681067
10833 defines a custom left delimiter (instead of
10834 \begin_inset Flex Code
10837 \begin_layout Plain Layout
10839 \change_inserted -712698321 1353681127
10848 \begin_inset Flex Code
10851 \begin_layout Plain Layout
10853 \change_inserted -712698321 1353681133
10862 A line break in the output can be indicated by
10863 \begin_inset Flex Code
10866 \begin_layout Plain Layout
10868 \change_inserted -712698321 1354263104
10879 \begin_layout Itemize
10881 \change_inserted -712698321 1355144479
10882 \begin_inset Flex Code
10885 \begin_layout Plain Layout
10887 \change_inserted -712698321 1353681149
10894 \begin_inset Flex Code
10897 \begin_layout Plain Layout
10899 \change_inserted -712698321 1353681146
10905 defines a custom right delimiter (instead of
10906 \begin_inset Flex Code
10909 \begin_layout Plain Layout
10911 \change_inserted -712698321 1353681158
10918 \begin_inset Flex Code
10921 \begin_layout Plain Layout
10923 \change_inserted -712698321 1353681161
10930 A line break in the output can be indicated by
10931 \begin_inset Flex Code
10934 \begin_layout Plain Layout
10936 \change_inserted -712698321 1354263106
10945 \begin_layout Itemize
10947 \change_inserted -712698321 1355144578
10948 \begin_inset Flex Code
10951 \begin_layout Plain Layout
10953 \change_inserted -712698321 1355144487
10962 \begin_inset Flex Code
10965 \begin_layout Plain Layout
10967 \change_inserted -712698321 1355144500
10973 defines an argument that is inserted in any case (alone or in addition
10974 to user-specified arguments).
10975 Multiple arguments need to be separated by comma.
10980 \begin_layout Itemize
10982 \change_inserted -712698321 1353917320
10983 \begin_inset Flex Code
10986 \begin_layout Plain Layout
10988 \change_inserted -712698321 1353917320
10994 The font used for the argument content.
10996 \begin_inset space ~
11000 \begin_inset CommandInset ref
11002 reference "sub:Font-description"
11009 \begin_layout Itemize
11011 \change_inserted -712698321 1353917320
11012 \begin_inset Flex Code
11015 \begin_layout Plain Layout
11017 \change_inserted -712698321 1353917320
11023 The font used for the label.
11025 \begin_inset space ~
11029 \begin_inset CommandInset ref
11031 reference "sub:Font-description"
11038 \begin_layout Itemize
11040 \change_inserted -712698321 1355661048
11041 \begin_inset Flex Code
11044 \begin_layout Plain Layout
11046 \change_inserted -712698321 1353917320
11053 \begin_inset Flex Code
11056 \begin_layout Plain Layout
11058 \change_inserted -712698321 1353917320
11065 \begin_inset Flex Code
11068 \begin_layout Plain Layout
11070 \change_inserted -712698321 1353917320
11077 \begin_inset Flex Code
11080 \begin_layout Plain Layout
11082 \change_inserted -712698321 1353917320
11088 , describing the rendering style used for the inset's frame and buttons.
11090 \begin_inset Flex Code
11093 \begin_layout Plain Layout
11095 \change_inserted -712698321 1353917320
11104 \begin_layout Itemize
11106 \change_inserted -712698321 1355747298
11107 \begin_inset Flex Code
11110 \begin_layout Plain Layout
11112 \change_inserted -712698321 1355661057
11119 \begin_inset Flex Code
11122 \begin_layout Plain Layout
11124 \change_inserted -712698321 1355661049
11131 \begin_inset Flex Code
11134 \begin_layout Plain Layout
11136 \change_inserted -712698321 1355661077
11144 , this argument is automatically inserted when the respective style is selected.
11145 Currently, only one argument per style\SpecialChar \slash{}
11146 layout can be automatically inserted.
11147 \change_inserted 155139281 1354198988
11151 \begin_layout Standard
11153 \change_inserted -712698321 1356689813
11154 By default, the text entered in the LyX workarea in the respective layout
11155 is the last (mandatory) argument of a command if the
11156 \begin_inset Flex Code
11159 \begin_layout Plain Layout
11161 \change_inserted -712698321 1356689619
11170 \begin_inset Flex Code
11173 \begin_layout Plain Layout
11175 \change_inserted -712698321 1356689629
11184 However, arguments with the prefix
11185 \begin_inset Flex Code
11188 \begin_layout Plain Layout
11190 \change_inserted -712698321 1356689679
11198 are output after this workarea argument.
11199 Note that post-argument numbering restarts at 1, so the first argument
11200 following the workarea argument is
11201 \begin_inset Flex Code
11204 \begin_layout Plain Layout
11206 \change_inserted -712698321 1356689813
11215 Post-arguments are ignored in any other
11216 \begin_inset Flex Code
11219 \begin_layout Plain Layout
11221 \change_inserted -712698321 1356689801
11228 \begin_inset Flex Code
11231 \begin_layout Plain Layout
11233 \change_inserted -712698321 1356689801
11244 \begin_layout Standard
11246 \change_inserted 155139281 1354199102
11248 \begin_inset Flex Code
11251 \begin_layout Plain Layout
11253 \change_inserted 155139281 1354199013
11264 \begin_inset Flex Code
11267 \begin_layout Plain Layout
11269 \change_inserted 155139281 1354199102
11280 \begin_inset Flex Code
11283 \begin_layout Plain Layout
11285 \change_inserted 155139281 1354199044
11293 followed by the number (e.
11294 \begin_inset space \thinspace{}
11299 \begin_inset Flex Code
11302 \begin_layout Plain Layout
11304 \change_inserted 155139281 1354199064
11318 \begin_layout Description
11319 \begin_inset Flex Code
11322 \begin_layout Plain Layout
11328 Note that this will completely override any prior
11329 \begin_inset Flex Code
11332 \begin_layout Plain Layout
11338 declaration for this style.
11340 \begin_inset Quotes eld
11344 \begin_inset Flex Code
11347 \begin_layout Plain Layout
11354 \begin_inset Quotes erd
11359 \begin_inset space ~
11363 \begin_inset CommandInset ref
11365 reference "sub:I18n"
11369 for details on its use.
11372 \begin_layout Description
11373 \begin_inset Flex Code
11376 \begin_layout Plain Layout
11383 \begin_inset Flex Code
11386 \begin_layout Plain Layout
11396 \begin_layout Plain Layout
11397 Note that a `float' here is a real number, such as: 1.5.
11402 The vertical space with which the last of a chain of paragraphs with this
11403 style is separated from the following paragraph.
11404 If the next paragraph has another style, the separations are not simply
11405 added, but the maximum is taken.
11408 \begin_layout Description
11409 \begin_inset Flex Code
11412 \begin_layout Plain Layout
11419 \begin_inset Flex Code
11422 \begin_layout Plain Layout
11428 ] The category for this style.
11429 This is used to group related styles in the style combobox on the toolbar.
11430 Any string can be used, but you may want to use existing categories with
11435 \begin_layout Description
11436 \begin_inset Flex Code
11439 \begin_layout Plain Layout
11445 Depth of XML command.
11446 Used only with XML-type formats.
11449 \begin_layout Description
11450 \begin_inset Flex Code
11453 \begin_layout Plain Layout
11460 \begin_inset Flex Code
11463 \begin_layout Plain Layout
11469 ] Copies all the features of an existing style into the current one.
11473 \begin_layout Description
11474 \begin_inset Flex Code
11477 \begin_layout Plain Layout
11484 \begin_inset Flex Code
11487 \begin_layout Plain Layout
11493 ] The name of a style whose preamble should be output
11498 This allows to ensure some ordering of the preamble snippets when macros
11499 definitions depend on one another.
11503 \begin_layout Plain Layout
11504 Note that, besides that functionality, there is no way to ensure any ordering
11506 The ordering that you see in a given version of LyX may change without
11507 warning in later versions.
11515 \begin_layout Description
11516 \begin_inset Flex Code
11519 \begin_layout Plain Layout
11526 \begin_inset Flex Code
11529 \begin_layout Plain Layout
11534 , Box, Filled_Box, Static
11539 ] The type of label that stands at the end of the paragraph (or sequence
11541 \begin_inset Flex Code
11544 \begin_layout Plain Layout
11551 \begin_inset Newline newline
11555 \begin_inset Flex Code
11558 \begin_layout Plain Layout
11565 \begin_inset Flex Code
11568 \begin_layout Plain Layout
11575 \begin_inset Flex Code
11578 \begin_layout Plain Layout
11586 \begin_inset Flex Code
11589 \begin_layout Plain Layout
11596 \begin_inset Quotes eld
11600 \begin_inset Quotes erd
11604 \begin_inset Flex Code
11607 \begin_layout Plain Layout
11614 \begin_inset space \space{}
11618 \begin_inset Flex Code
11621 \begin_layout Plain Layout
11627 ) is a white (resp.
11628 \begin_inset space ~
11631 black) square suitable for end of proof markers,
11632 \begin_inset Flex Code
11635 \begin_layout Plain Layout
11641 is an explicit text string.
11644 \begin_layout Description
11645 \begin_inset Flex Code
11648 \begin_layout Plain Layout
11655 \begin_inset Flex Code
11658 \begin_layout Plain Layout
11664 ] The string used for a label with a
11665 \begin_inset Flex Code
11668 \begin_layout Plain Layout
11675 \begin_inset Newline newline
11679 \begin_inset Flex Code
11682 \begin_layout Plain Layout
11692 \begin_layout Description
11693 \begin_inset Flex Code
11696 \begin_layout Plain Layout
11702 The font used for both the text body
11708 \begin_inset space ~
11712 \begin_inset CommandInset ref
11714 reference "sub:Font-description"
11719 Note that defining this font automatically defines the
11720 \begin_inset Flex Code
11723 \begin_layout Plain Layout
11730 So you should define this one first if you also want to define
11731 \begin_inset Flex Code
11734 \begin_layout Plain Layout
11743 \begin_layout Description
11744 \begin_inset Flex Code
11747 \begin_layout Plain Layout
11754 \begin_inset Flex Code
11757 \begin_layout Plain Layout
11766 \begin_inset space \thinspace{}
11770 \begin_inset Flex Code
11773 \begin_layout Plain Layout
11779 ] Usually LyX does not allow you to insert more than one space between words,
11780 since a space is considered as the separation between two words, not a
11781 character or symbol of its own.
11782 This is a very fine thing but sometimes annoying, for example, when typing
11783 program code or plain LaTeX code.
11785 \begin_inset Flex Code
11788 \begin_layout Plain Layout
11795 Note that LyX will create protected blanks for the additional blanks when
11796 in another mode than LaTeX-mode.
11799 \begin_layout Description
11800 \begin_inset Flex Code
11803 \begin_layout Plain Layout
11809 These tags are used with XHTML output.
11811 \begin_inset CommandInset ref
11813 reference "sub:Paragraph-Style-XHTML"
11820 \begin_layout Description
11821 \begin_inset Flex Code
11824 \begin_layout Plain Layout
11830 [FIXME] (Used only with XML-type formats.)
11833 \begin_layout Description
11834 \begin_inset Flex Code
11837 \begin_layout Plain Layout
11844 \begin_inset Flex Code
11847 \begin_layout Plain Layout
11856 \begin_inset space \thinspace{}
11860 \begin_inset Flex Code
11863 \begin_layout Plain Layout
11870 \begin_inset Flex Code
11873 \begin_layout Plain Layout
11879 , marks the style as to be included in the document preamble and not in
11881 This is useful for document classes that want such information as the title
11882 and author to appear in the preamble.
11883 Note that this works only for styles for which the
11884 \begin_inset Flex Code
11887 \begin_layout Plain Layout
11894 \begin_inset Flex Code
11897 \begin_layout Plain Layout
11904 \begin_inset Flex Code
11907 \begin_layout Plain Layout
11916 \begin_layout Description
11917 \begin_inset Flex Code
11920 \begin_layout Plain Layout
11927 \begin_inset Flex Code
11930 \begin_layout Plain Layout
11939 \begin_inset space \thinspace{}
11943 \begin_inset Flex Code
11946 \begin_layout Plain Layout
11953 \begin_inset Flex Code
11956 \begin_layout Plain Layout
11962 , marks the style as being part of a title block (see also the
11963 \begin_inset Flex Code
11966 \begin_layout Plain Layout
11973 \begin_inset Flex Code
11976 \begin_layout Plain Layout
11985 \begin_layout Description
11987 \change_inserted -712698321 1355932296
11988 \begin_inset Flex Code
11991 \begin_layout Plain Layout
11993 \change_inserted -712698321 1355932178
12000 \begin_inset Flex Code
12003 \begin_layout Plain Layout
12005 \change_inserted -712698321 1355932181
12011 ] The LaTeX command sequence declaring an item in a list.
12012 The command is to be defined without the preceding backslash (the default
12014 \begin_inset Quotes eld
12018 \begin_inset Quotes erd
12022 \begin_inset Flex Code
12025 \begin_layout Plain Layout
12027 \change_inserted -712698321 1355932279
12037 in the LaTeX output).
12040 \begin_layout Description
12041 \begin_inset Flex Code
12044 \begin_layout Plain Layout
12051 \begin_inset Flex Code
12054 \begin_layout Plain Layout
12060 ] This provides extra space between paragraphs that have the same style.
12061 If you put other styles into an environment, each is separated with the
12063 \begin_inset Flex Code
12066 \begin_layout Plain Layout
12073 But the whole items of the environment are additionally separated with
12075 \begin_inset Flex Code
12078 \begin_layout Plain Layout
12085 Note that this is a
12090 \begin_layout Description
12091 \begin_inset Flex Code
12094 \begin_layout Plain Layout
12100 [FIXME] (Used only with XML-type formats.)
12103 \begin_layout Description
12104 \begin_inset Flex Code
12107 \begin_layout Plain Layout
12114 \begin_inset Flex Code
12117 \begin_layout Plain Layout
12126 \begin_inset space \thinspace{}
12130 \begin_inset Flex Code
12133 \begin_layout Plain Layout
12139 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12140 lead to empty LaTeX output.
12141 There are some cases where this could be desirable however: in a letter
12142 template, the required fields can be provided as empty fields, so that
12143 people do not forget them; in some special classes, a style can be used
12144 as some kind of break, which does not contain actual text.
12147 \begin_layout Description
12148 \begin_inset Flex Code
12151 \begin_layout Plain Layout
12158 \begin_inset Flex Code
12161 \begin_layout Plain Layout
12167 ] The vertical space between the label and the text body.
12168 Only used for labels that are above the text body (
12169 \begin_inset Flex Code
12172 \begin_layout Plain Layout
12179 \begin_inset Newline newline
12183 \begin_inset Flex Code
12186 \begin_layout Plain Layout
12187 Centered_Top_Environment
12195 \begin_layout Description
12196 \begin_inset Flex Code
12199 \begin_layout Plain Layout
12206 \begin_inset Flex Code
12209 \begin_layout Plain Layout
12215 ] The name of the counter for automatic numbering.
12216 \begin_inset Newline newline
12224 \begin_inset Flex Code
12227 \begin_layout Plain Layout
12234 \begin_inset Flex Code
12237 \begin_layout Plain Layout
12244 In that case, the counter will be stepped each time the style appears.
12245 \begin_inset Newline newline
12253 \begin_inset Flex Code
12256 \begin_layout Plain Layout
12263 \begin_inset Flex Code
12266 \begin_layout Plain Layout
12272 , though this case is a bit complicated.
12273 Suppose you declare
12274 \begin_inset Quotes eld
12278 \begin_inset Flex Code
12281 \begin_layout Plain Layout
12282 LabelCounter myenum
12288 \begin_inset Quotes erd
12292 Then the actual counters used are
12293 \begin_inset Flex Code
12296 \begin_layout Plain Layout
12303 \begin_inset Flex Code
12306 \begin_layout Plain Layout
12313 \begin_inset Flex Code
12316 \begin_layout Plain Layout
12323 \begin_inset Flex Code
12326 \begin_layout Plain Layout
12332 , much as in LaTeX.
12333 These counters must all be declared separately.
12334 \begin_inset Newline newline
12338 \begin_inset CommandInset ref
12340 reference "sub:Counters"
12344 for details on counters.
12347 \begin_layout Description
12348 \begin_inset Flex Code
12351 \begin_layout Plain Layout
12357 The font used for the label.
12359 \begin_inset space ~
12363 \begin_inset CommandInset ref
12365 reference "sub:Font-description"
12372 \begin_layout Description
12373 \begin_inset Flex Code
12376 \begin_layout Plain Layout
12383 \begin_inset Flex Code
12386 \begin_layout Plain Layout
12392 ] Text that indicates how far a label should be indented.
12395 \begin_layout Description
12396 \begin_inset Flex Code
12399 \begin_layout Plain Layout
12406 \begin_inset Flex Code
12409 \begin_layout Plain Layout
12415 ] Text that indicates the amount of horizontal space between the label and
12417 Only used for labels that are not above the text body.
12420 \begin_layout Description
12421 \begin_inset Flex Code
12424 \begin_layout Plain Layout
12431 \begin_inset Flex Code
12434 \begin_layout Plain Layout
12440 ] The string used for a label with a
12441 \begin_inset Flex Code
12444 \begin_layout Plain Layout
12451 \begin_inset Flex Code
12454 \begin_layout Plain Layout
12462 \begin_inset Flex Code
12465 \begin_layout Plain Layout
12471 is set, this string can be contain the special formatting commands described
12473 \begin_inset CommandInset ref
12475 reference "sub:Counters"
12482 \begin_layout Description
12483 \begin_inset Flex Code
12486 \begin_layout Plain Layout
12487 LabelStringAppendix
12493 \begin_inset Flex Code
12496 \begin_layout Plain Layout
12502 ] This is used inside the appendix instead of
12503 \begin_inset Newline newline
12507 \begin_inset Flex Code
12510 \begin_layout Plain Layout
12518 \begin_inset Flex Code
12521 \begin_layout Plain Layout
12528 \begin_inset Newline newline
12532 \begin_inset Flex Code
12535 \begin_layout Plain Layout
12536 LabelStringAppendix
12544 \begin_layout Description
12545 \begin_inset Flex Code
12548 \begin_layout Plain Layout
12554 [FIXME] (Used only with XML-type formats.)
12557 \begin_layout Description
12558 \begin_inset Flex Code
12561 \begin_layout Plain Layout
12568 \begin_inset Flex Code
12571 \begin_layout Plain Layout
12576 , Manual, Static, Top_Environment,
12577 \begin_inset Newline newline
12580 Centered_Top_Environment, Counter, Sensitive, Enumerate,
12581 \begin_inset Newline newline
12584 Itemize, Bibliography
12593 \begin_layout Description
12594 \begin_inset Flex Code
12597 \begin_layout Plain Layout
12603 means the label is the very first word (up to the first real blank).
12604 Use protected spaces if you want more than one word as the label.
12608 \begin_layout Description
12609 \begin_inset Flex Code
12612 \begin_layout Plain Layout
12618 means the label is simply what is declared as
12619 \begin_inset Flex Code
12622 \begin_layout Plain Layout
12629 Note that this really is `static'.
12632 \begin_layout Description
12633 \begin_inset Flex Code
12636 \begin_layout Plain Layout
12643 \begin_inset space ~
12647 \begin_inset space ~
12651 \begin_inset Flex Code
12654 \begin_layout Plain Layout
12655 Centered_Top_Environment
12660 are special cases of
12661 \begin_inset Flex Code
12664 \begin_layout Plain Layout
12671 The label will be printed above the paragraph, but only at the top of an
12672 environment or the top of a chain of paragraphs with this style.
12673 This might be used with the
12674 \begin_inset Flex MenuItem
12677 \begin_layout Plain Layout
12683 style, for example.
12686 \begin_layout Description
12687 \begin_inset Flex Code
12690 \begin_layout Plain Layout
12696 is a special case for the caption-labels
12697 \begin_inset Quotes eld
12701 \begin_inset Quotes erd
12705 \begin_inset Quotes eld
12709 \begin_inset Quotes erd
12713 \begin_inset Newline newline
12717 \begin_inset Flex Code
12720 \begin_layout Plain Layout
12726 means the (hardcoded) label string depends on the kind of float: It is
12727 hardcoded to be `FloatType N', where N is the value of the counter associated
12731 \begin_layout Description
12732 \begin_inset Flex Code
12735 \begin_layout Plain Layout
12741 defines automatically numbered labels.
12743 \begin_inset Flex Code
12746 \begin_layout Plain Layout
12752 will be expanded to contain any counters: So the result will for example
12754 \begin_inset Quotes eld
12758 \begin_inset Flex Code
12761 \begin_layout Plain Layout
12772 \begin_inset Quotes erd
12777 \begin_inset space ~
12781 \begin_inset CommandInset ref
12783 reference "sub:Counters"
12787 for more information on counters.
12790 \begin_layout Description
12791 \begin_inset Flex Code
12794 \begin_layout Plain Layout
12800 produces the usual sort of enumeration labels.
12801 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12802 small Roman numerals, and uppercase letters for the four possible depths.
12805 \begin_layout Description
12806 \begin_inset Flex Code
12809 \begin_layout Plain Layout
12815 produces various bullets at the different levels.
12816 It is also hardcoded.
12819 \begin_layout Description
12820 \begin_inset Flex Code
12823 \begin_layout Plain Layout
12829 is used internally by LyX and should be used only with
12830 \begin_inset Flex Code
12833 \begin_layout Plain Layout
12834 LatexType BibEnvironment
12843 \begin_layout Description
12844 \begin_inset Flex Code
12847 \begin_layout Plain Layout
12853 Note that this will completely override any prior
12854 \begin_inset Flex Code
12857 \begin_layout Plain Layout
12863 declaration for this style.
12865 \begin_inset Quotes eld
12869 \begin_inset Flex Code
12872 \begin_layout Plain Layout
12879 \begin_inset Quotes erd
12884 \begin_inset CommandInset ref
12886 reference "sub:I18n"
12890 for details on its use.
12893 \begin_layout Description
12894 \begin_inset Flex Code
12897 \begin_layout Plain Layout
12904 \begin_inset Flex Code
12907 \begin_layout Plain Layout
12913 ] The name of the corresponding LaTeX stuff.
12914 Either the environment or command name.
12917 \begin_layout Description
12918 \begin_inset Flex Code
12921 \begin_layout Plain Layout
12928 \begin_inset Flex Code
12931 \begin_layout Plain Layout
12937 ] An optional parameter for the corresponding
12938 \begin_inset Flex Code
12941 \begin_layout Plain Layout
12948 This parameter cannot be changed from within LyX
12949 \change_inserted -712698321 1355144804
12951 \begin_inset Flex Code
12954 \begin_layout Plain Layout
12956 \change_inserted -712698321 1355144804
12962 for customizable parameters)
12966 \change_inserted -712698321 1355144804
12967 This will be output as is after all LaTeX
12968 \begin_inset Flex Code
12971 \begin_layout Plain Layout
12973 \change_inserted -712698321 1355144658
12986 \begin_layout Description
12987 \begin_inset Flex Code
12990 \begin_layout Plain Layout
12997 \begin_inset Flex Code
13000 \begin_layout Plain Layout
13005 , Command, Environment, Item_Environment,
13006 \begin_inset Newline newline
13009 List_Environment, Bib_Environment
13014 ] How the style should be translated into LaTeX.
13018 \begin_layout Plain Layout
13019 \begin_inset Flex Code
13022 \begin_layout Plain Layout
13028 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13029 Visit the SGML class files for specific examples.
13038 \begin_layout Description
13039 \begin_inset Flex Code
13042 \begin_layout Plain Layout
13048 means nothing special.
13051 \begin_layout Description
13052 \begin_inset Flex Code
13055 \begin_layout Plain Layout
13062 \begin_inset Flex Code
13065 \begin_layout Plain Layout
13072 {\SpecialChar \ldots{}
13081 \begin_layout Description
13082 \begin_inset Flex Code
13085 \begin_layout Plain Layout
13092 \begin_inset Flex Code
13095 \begin_layout Plain Layout
13102 }\SpecialChar \ldots{}
13118 \begin_layout Description
13119 \begin_inset Flex Code
13122 \begin_layout Plain Layout
13129 \begin_inset Flex Code
13132 \begin_layout Plain Layout
13139 \begin_inset Flex Code
13142 \begin_layout Plain Layout
13150 is generated for each paragraph of this environment.
13154 \begin_layout Description
13155 \begin_inset Flex Code
13158 \begin_layout Plain Layout
13165 \begin_inset Flex Code
13168 \begin_layout Plain Layout
13175 \begin_inset Newline newline
13179 \begin_inset Flex Code
13182 \begin_layout Plain Layout
13188 is passed as an argument to the environment.
13189 \begin_inset Newline newline
13193 \begin_inset Flex Code
13196 \begin_layout Plain Layout
13202 can be defined in the
13203 \begin_inset Flex MenuItem
13206 \begin_layout Plain Layout
13207 Edit\SpecialChar \menuseparator
13209 \begin_inset space ~
13220 \begin_layout Description
13221 \begin_inset Flex Code
13224 \begin_layout Plain Layout
13231 \begin_inset Flex Code
13234 \begin_layout Plain Layout
13240 but adds additionally the necessary mandatory argument to the begin statement
13241 of the bibliography environment:
13242 \begin_inset Newline newline
13246 \begin_inset Flex Code
13249 \begin_layout Plain Layout
13252 begin{thebibliography}{99}
13257 It is therefore only useful for bibliography environments.
13260 \begin_layout Standard
13261 Putting the last few things together, the LaTeX output will be either:
13264 \begin_layout LyX-Code
13267 LatexName[LatexParam]{\SpecialChar \ldots{}
13271 \begin_layout Standard
13275 \begin_layout LyX-Code
13278 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13284 \begin_layout Standard
13285 depending upon the LaTeX type.
13289 \begin_layout Description
13291 \change_inserted -712698321 1354263086
13292 \begin_inset Flex Code
13295 \begin_layout Plain Layout
13297 \change_inserted -712698321 1353866852
13304 \begin_inset Flex Code
13307 \begin_layout Plain Layout
13309 \change_inserted -712698321 1353866852
13315 ] A string that is put at the beginning of the style content.
13316 A line break in the output can be indicated by
13317 \begin_inset Flex Code
13320 \begin_layout Plain Layout
13322 \change_inserted -712698321 1354263086
13333 \begin_layout Description
13334 \begin_inset Flex Code
13337 \begin_layout Plain Layout
13344 \begin_inset Flex Code
13347 \begin_layout Plain Layout
13353 ] If you put styles into environments, the different
13354 \begin_inset Flex Code
13357 \begin_layout Plain Layout
13363 are not simply added, but added with a factor
13364 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13368 Note that this parameter is also used when
13369 \begin_inset Flex Code
13372 \begin_layout Plain Layout
13379 \begin_inset Flex Code
13382 \begin_layout Plain Layout
13389 \begin_inset Flex Code
13392 \begin_layout Plain Layout
13399 Then it is added to the manual or dynamic margin.
13400 \begin_inset Newline newline
13404 \begin_inset Quotes eld
13408 \begin_inset Flex Code
13411 \begin_layout Plain Layout
13418 \begin_inset Quotes erd
13421 means that the paragraph is indented with the width of
13422 \begin_inset Quotes eld
13426 \begin_inset Flex Code
13429 \begin_layout Plain Layout
13436 \begin_inset Quotes erd
13439 in the normal font.
13440 You can get a negative width by prefixing the string with
13441 \begin_inset Quotes eld
13445 \begin_inset Flex Code
13448 \begin_layout Plain Layout
13455 \begin_inset Quotes erd
13459 This way was chosen so that the look is the same with each used screen
13463 \begin_layout Description
13464 \begin_inset Flex Code
13467 \begin_layout Plain Layout
13474 \begin_inset Flex Code
13477 \begin_layout Plain Layout
13482 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13488 \begin_inset Newline newline
13491 The kind of margin that the style has on the left side.
13495 \begin_layout Description
13496 \begin_inset Flex Code
13499 \begin_layout Plain Layout
13505 just means a fixed margin.
13508 \begin_layout Description
13509 \begin_inset Flex Code
13512 \begin_layout Plain Layout
13518 means that the left margin depends on the string entered in the
13519 \begin_inset Flex MenuItem
13522 \begin_layout Plain Layout
13523 Edit\SpecialChar \menuseparator
13525 \begin_inset space ~
13534 This is used to typeset nice lists without tabulators.
13537 \begin_layout Description
13538 \begin_inset Flex Code
13541 \begin_layout Plain Layout
13547 means that the margin depends on the size of the label.
13548 This is used for automatic enumerated headlines.
13549 It is obvious that the headline
13550 \begin_inset Quotes eld
13553 5.4.3.2.1 Very long headline
13554 \begin_inset Quotes erd
13557 must have a wider left margin (as wide as
13558 \begin_inset Quotes eld
13562 \begin_inset Quotes erd
13565 plus the space) than
13566 \begin_inset Quotes eld
13569 3.2 Very long headline
13570 \begin_inset Quotes erd
13574 \begin_inset Quotes eld
13578 \begin_inset Quotes erd
13581 are not able to do this.
13584 \begin_layout Description
13585 \begin_inset Flex Code
13588 \begin_layout Plain Layout
13594 is similar, but only the very first row of the paragraph is dynamic, while
13595 the others are static; this is used, for example, for descriptions.
13598 \begin_layout Description
13599 \begin_inset Flex Code
13602 \begin_layout Plain Layout
13608 means the margin is chosen in a way that the longest row of this paragraph
13609 fits to the right margin.
13610 This is used to typeset an address on the right edge of the page.
13614 \begin_layout Description
13615 \begin_inset Flex Code
13618 \begin_layout Plain Layout
13625 \begin_inset Flex Code
13628 \begin_layout Plain Layout
13637 \begin_inset space \thinspace{}
13641 \begin_inset Flex Code
13644 \begin_layout Plain Layout
13650 ] Whether fragile commands in this style should be
13651 \begin_inset Flex Code
13654 \begin_layout Plain Layout
13667 whether this command should itself be protected.)
13670 \begin_layout Description
13671 \begin_inset Flex Code
13674 \begin_layout Plain Layout
13681 \begin_inset Flex Code
13684 \begin_layout Plain Layout
13691 \begin_inset space \thinspace{}
13695 \begin_inset Flex Code
13698 \begin_layout Plain Layout
13706 ] Whether newlines are translated into LaTeX newlines (
13707 \begin_inset Flex Code
13710 \begin_layout Plain Layout
13721 The translation can be switched off to allow more comfortable LaTeX editing
13725 \begin_layout Description
13726 \begin_inset Flex Code
13729 \begin_layout Plain Layout
13736 \begin_inset Flex Code
13739 \begin_layout Plain Layout
13748 \begin_inset space \thinspace{}
13752 \begin_inset Flex Code
13755 \begin_layout Plain Layout
13761 ] If set to true, and if
13762 \begin_inset Flex Code
13765 \begin_layout Plain Layout
13772 \begin_inset Flex Code
13775 \begin_layout Plain Layout
13781 ) paragraphs are being indented, then the indentation of such a paragraph
13782 following one of this type will be suppressed.
13783 (So this will not affect the display of non-default paragraphs.)
13786 \begin_layout Description
13787 \begin_inset Flex Code
13790 \begin_layout Plain Layout
13797 \begin_inset Flex Code
13800 \begin_layout Plain Layout
13806 ] Name of a style that has replaced this style.
13807 This is used to rename a style, while keeping backward compatibility.
13810 \begin_layout Description
13812 \change_deleted -712698321 1353679722
13813 \begin_inset Flex Code
13816 \begin_layout Plain Layout
13823 \begin_inset Flex Code
13826 \begin_layout Plain Layout
13832 ] The number of optional arguments that can be used with this style.
13833 This is useful for things like section headings, and only makes sense with
13835 Note that, on output, the optional arguments will all precede any required
13836 arguments (see below).
13837 So one can have constructs like:
13841 \begin_layout LyX-Code
13843 \change_deleted -712698321 1353679722
13846 mycmd[opt1]{req1}{contents of paragraph}
13849 \begin_layout Standard
13851 \change_deleted -712698321 1353679722
13852 but one cannot have things like:
13855 \begin_layout LyX-Code
13857 \change_deleted -712698321 1353679722
13860 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13863 \begin_layout Standard
13865 \change_deleted -712698321 1353679722
13866 at least, not without ERT (with which you can have anything).
13873 \begin_layout Description
13874 \begin_inset Flex Code
13877 \begin_layout Plain Layout
13884 \begin_inset Flex Code
13887 \begin_layout Plain Layout
13896 \begin_inset space \thinspace{}
13900 \begin_inset Flex Code
13903 \begin_layout Plain Layout
13909 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13910 output, but only by a line break; together with
13911 \begin_inset Flex Code
13914 \begin_layout Plain Layout
13920 , this allows to emulate a plain text editor (like the ERT inset).
13923 \begin_layout Description
13924 \begin_inset Flex Code
13927 \begin_layout Plain Layout
13934 \begin_inset Flex Code
13937 \begin_layout Plain Layout
13943 ] The indent of the very first line of a paragraph.
13945 \begin_inset Newline newline
13949 \begin_inset Flex Code
13952 \begin_layout Plain Layout
13958 will be fixed for a certain style.
13959 The exception is the default style, since the indentation for these paragraphs
13960 can be prohibited with
13961 \begin_inset Flex Code
13964 \begin_layout Plain Layout
13972 \begin_inset Flex Code
13975 \begin_layout Plain Layout
13981 style paragraphs inside environments use the
13982 \begin_inset Flex Code
13985 \begin_layout Plain Layout
13991 of the environment, not their native one.
13993 \begin_inset Flex Code
13996 \begin_layout Plain Layout
14002 paragraphs inside an enumeration are not indented.
14005 \begin_layout Description
14006 \begin_inset Flex Code
14009 \begin_layout Plain Layout
14016 \begin_inset Flex Code
14019 \begin_layout Plain Layout
14025 ] The vertical space between two paragraphs of this style.
14028 \begin_layout Description
14029 \begin_inset Flex Code
14032 \begin_layout Plain Layout
14039 \begin_inset Flex Code
14042 \begin_layout Plain Layout
14048 ] LyX allows the user to choose either
14049 \begin_inset Quotes eld
14053 \begin_inset Quotes erd
14057 \begin_inset Quotes eld
14061 \begin_inset Quotes erd
14064 to separate paragraphs.
14066 \begin_inset Quotes eld
14070 \begin_inset Quotes erd
14074 \begin_inset Flex Code
14077 \begin_layout Plain Layout
14085 \begin_inset Quotes eld
14089 \begin_inset Quotes erd
14093 \begin_inset Flex Code
14096 \begin_layout Plain Layout
14102 is ignored and all paragraphs are separated by the
14103 \begin_inset Flex Code
14106 \begin_layout Plain Layout
14113 The vertical space is calculated with
14114 \begin_inset Flex Code
14117 \begin_layout Plain Layout
14119 \begin_inset space ~
14128 \begin_inset Flex Code
14131 \begin_layout Plain Layout
14137 is the height of a row with the normal font.
14138 This way, the look stays the same with different screen fonts.
14141 \begin_layout Description
14142 \begin_inset Flex Code
14145 \begin_layout Plain Layout
14152 \begin_inset Flex Code
14155 \begin_layout Plain Layout
14164 \begin_inset space \thinspace{}
14168 \begin_inset Flex Code
14171 \begin_layout Plain Layout
14177 ] Whether the contents of this paragraph should be output in raw form, meaning
14178 without special translations that LaTeX would require.
14181 \begin_layout Description
14182 \begin_inset Flex Code
14185 \begin_layout Plain Layout
14191 Information to be included in the LaTeX preamble when this style is used.
14192 Used to define macros, load packages, etc., required by this particular
14195 \begin_inset Quotes eld
14199 \begin_inset Flex Code
14202 \begin_layout Plain Layout
14209 \begin_inset Quotes erd
14215 \begin_layout Description
14216 \begin_inset Flex Code
14219 \begin_layout Plain Layout
14226 \begin_inset Flex Code
14229 \begin_layout Plain Layout
14235 ] The prefix to use when creating labels referring to paragraphs of this
14237 This allows the use of formatted references.
14240 \begin_layout Description
14242 \change_deleted -712698321 1353681258
14243 \begin_inset Flex Code
14246 \begin_layout Plain Layout
14253 \begin_inset Flex Code
14256 \begin_layout Plain Layout
14262 ] The number of required arguments that the LaTeX command or environment
14263 corresponding to this style expects.
14264 In the case of a command, these are required arguments
14268 that associated with the content of the paragraph itself.
14269 These do not actually have to be provided: LyX will output empty arguments
14271 Note that optional arguments will be output before required arguments.
14272 See the discussion of the
14273 \begin_inset Flex Code
14276 \begin_layout Plain Layout
14282 tag above for more information.
14287 \begin_layout Description
14288 \begin_inset Flex Code
14291 \begin_layout Plain Layout
14298 \begin_inset Flex Code
14301 \begin_layout Plain Layout
14307 ] Whether the style requires the feature
14308 \begin_inset Flex Code
14311 \begin_layout Plain Layout
14318 See the description of
14319 \begin_inset Flex Code
14322 \begin_layout Plain Layout
14329 \begin_inset space ~
14333 \begin_inset CommandInset ref
14335 reference "sub:General-text-class"
14339 ) for information on `features'.
14342 \begin_layout Description
14344 \change_inserted -712698321 1353693371
14345 \begin_inset Flex Code
14348 \begin_layout Plain Layout
14350 \change_inserted -712698321 1353693146
14359 \begin_inset Flex Code
14362 \begin_layout Plain Layout
14364 \change_inserted -712698321 1353693235
14373 \begin_inset Flex Code
14376 \begin_layout Plain Layout
14378 \change_inserted -712698321 1353693235
14384 ] Resets the LaTeX arguments of this style (as defined via the
14385 \begin_inset Flex Code
14388 \begin_layout Plain Layout
14390 \change_inserted -712698321 1353693371
14399 This is useful if you have copied a style via
14400 \begin_inset Flex Code
14403 \begin_layout Plain Layout
14405 \change_inserted -712698321 1353693302
14413 , but you do not want to inherit its (required and optional) arguments.
14418 \begin_layout Description
14420 \change_inserted -712698321 1354263074
14421 \begin_inset Flex Code
14424 \begin_layout Plain Layout
14426 \change_inserted -712698321 1353866876
14433 \begin_inset Flex Code
14436 \begin_layout Plain Layout
14438 \change_inserted -712698321 1353866873
14444 ] A string that is put at the end of the layout content.
14445 A line break in the output can be indicated by
14446 \begin_inset Flex Code
14449 \begin_layout Plain Layout
14451 \change_inserted -712698321 1354263069
14462 \begin_layout Description
14463 \begin_inset Flex Code
14466 \begin_layout Plain Layout
14473 \begin_inset Flex Code
14476 \begin_layout Plain Layout
14483 \begin_inset Flex Code
14486 \begin_layout Plain Layout
14495 \begin_layout Description
14496 \begin_inset Flex Code
14499 \begin_layout Plain Layout
14506 \begin_inset Flex Code
14509 \begin_layout Plain Layout
14518 \begin_inset Flex Code
14521 \begin_layout Plain Layout
14528 \begin_inset Flex Code
14531 \begin_layout Plain Layout
14538 \begin_inset Flex Code
14541 \begin_layout Plain Layout
14543 \begin_inset space ~
14551 ] This defines what the default spacing should be in the style.
14553 \begin_inset Flex Code
14556 \begin_layout Plain Layout
14563 \begin_inset Flex Code
14566 \begin_layout Plain Layout
14573 \begin_inset Flex Code
14576 \begin_layout Plain Layout
14582 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14583 If you specify the argument
14584 \begin_inset Flex Code
14587 \begin_layout Plain Layout
14593 , then you must also provide a value argument which will be the actual multiplie
14595 Note that, contrary to other parameters,
14596 \begin_inset Flex Code
14599 \begin_layout Plain Layout
14605 implies the generation of specific LaTeX code, using the LaTeX package
14609 \begin_inset Flex Code
14612 \begin_layout Plain Layout
14621 \begin_layout Description
14622 \begin_inset Flex Code
14625 \begin_layout Plain Layout
14632 \begin_inset Flex Code
14635 \begin_layout Plain Layout
14642 \begin_inset space \thinspace{}
14646 \begin_inset Flex Code
14649 \begin_layout Plain Layout
14657 ] Allow spell-checking paragraphs of this style.
14661 \begin_layout Description
14662 \begin_inset Flex Code
14665 \begin_layout Plain Layout
14671 The font used for the text body .
14673 \begin_inset CommandInset ref
14675 reference "sub:Font-description"
14682 \begin_layout Description
14683 \begin_inset Flex Code
14686 \begin_layout Plain Layout
14695 \begin_inset Flex Code
14698 \begin_layout Plain Layout
14708 The level of the style in the table of contents.
14709 This is used for automatic numbering of section headings.
14712 \begin_layout Description
14713 \begin_inset Flex Code
14716 \begin_layout Plain Layout
14723 \begin_inset Flex Code
14726 \begin_layout Plain Layout
14732 ] The vertical space with which the very first of a chain of paragraphs
14733 with this style is separated from the previous paragraph.
14734 If the previous paragraph has another style, the separations are not simply
14735 added, but the maximum is taken.
14738 \begin_layout Subsection
14739 \begin_inset CommandInset label
14745 Internationalization of Paragraph Styles
14748 \begin_layout Standard
14749 LyX has long supported internationalization of layout information, but,
14750 until version 2.0, this applied only to the user interface and not to, say,
14752 Thus, French authors were forced to resort to ugly hacks if they wanted
14757 1' instead of `Theorem 1'.
14758 Thanks to Georg Baum, that is no longer the case.
14761 \begin_layout Standard
14763 \begin_inset Flex Code
14766 \begin_layout Plain Layout
14772 defines text that is to appear in the typeset document, it may use
14773 \begin_inset Flex Code
14776 \begin_layout Plain Layout
14783 \begin_inset Flex Code
14786 \begin_layout Plain Layout
14792 to support non-English and even multi-language documents correctly.
14793 The following excerpt (from the
14794 \begin_inset Flex Code
14797 \begin_layout Plain Layout
14803 file) shows how this works:
14806 \begin_layout LyX-Code
14811 \begin_layout LyX-Code
14814 theoremstyle{remark}
14817 \begin_layout LyX-Code
14820 newtheorem{claim}[thm]{
14827 \begin_layout LyX-Code
14831 \begin_layout LyX-Code
14835 \begin_layout LyX-Code
14840 claimname}{_(Claim)}
14843 \begin_layout LyX-Code
14847 \begin_layout LyX-Code
14851 \begin_layout LyX-Code
14860 claimname}{_(Claim)}}
14863 \begin_layout LyX-Code
14868 \begin_layout Standard
14869 In principle, any legal LaTeX may appear in the
14870 \begin_inset Flex Code
14873 \begin_layout Plain Layout
14880 \begin_inset Flex Code
14883 \begin_layout Plain Layout
14889 tags, but in practice they will typically look as they do here.
14890 The key to correct translation of the typeset text is the definition of
14892 \begin_inset Flex Code
14895 \begin_layout Plain Layout
14904 \begin_inset Flex Code
14907 \begin_layout Plain Layout
14919 \begin_layout Standard
14921 \begin_inset Flex Code
14924 \begin_layout Plain Layout
14930 tag provides for internationalization based upon the overall language of
14932 The contents of the tag will be included in the preamble, just as with
14934 \begin_inset Flex Code
14937 \begin_layout Plain Layout
14944 What makes it special is the use of the
14945 \begin_inset Quotes eld
14949 \begin_inset Quotes erd
14953 \begin_inset Flex Code
14956 \begin_layout Plain Layout
14962 , which will be replaced, when LyX produces LaTeX output, with the translation
14963 of its argument into the document language.
14966 \begin_layout Standard
14968 \begin_inset Flex Code
14971 \begin_layout Plain Layout
14977 tag is more complex, since it is meant to provide support for multi-language
14978 documents and so offers an interface to the
14979 \begin_inset Flex Code
14982 \begin_layout Plain Layout
14989 Its contents will be added to the preamble once for each language that
14990 appears in the document.
14991 In this case, the argument to
14992 \begin_inset Flex Code
14995 \begin_layout Plain Layout
15001 will be replaced with its translation into the language in question; the
15003 \begin_inset Flex Code
15006 \begin_layout Plain Layout
15012 is replaced by the language name (as used by the babel package).
15015 \begin_layout Standard
15016 A German document that also included a French section would thus have the
15017 following in the preamble:
15020 \begin_layout LyX-Code
15029 claimname}{Affirmation}}
15030 \begin_inset Newline newline
15041 claimname}{Behauptung}}
15042 \begin_inset Newline newline
15049 claimname}{Behauptung}
15052 \begin_layout Standard
15054 \begin_inset Flex Code
15057 \begin_layout Plain Layout
15063 will then conspire to produce the correct text in the output.
15066 \begin_layout Standard
15067 One important point to note here is that the translations are provided by
15068 LyX itself, through the
15069 \change_inserted -195340706 1334775793
15071 \begin_inset Flex Code
15074 \begin_layout Plain Layout
15076 \change_inserted -195340706 1334775793
15083 \change_deleted -195340706 1334775793
15084 same mechanism it uses for internationalization of the user interface
15087 This means, in effect, that
15088 \begin_inset Flex Code
15091 \begin_layout Plain Layout
15098 \begin_inset Flex Code
15101 \begin_layout Plain Layout
15107 are really only of use in layout files that are provided with LyX, since
15108 text entered in user-created layout files will not be seen by LyX's internation
15110 \change_inserted -195340706 1334775793
15112 \begin_inset Flex Code
15115 \begin_layout Plain Layout
15117 \change_inserted -195340706 1334775793
15123 file is modified accordingly
15126 That said, however, any layout created with the intention that it will
15127 be included with LyX should use these tags where appropriate.
15129 \change_inserted -195340706 1334775793
15130 Please note that the paragraph style translations provided by LyX will
15131 never change with a minor update (e.g.
15132 from version 2.1.x to 2.1.y).
15133 It is however quite likely that a major update (e.g.
15134 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15139 \begin_layout Subsection
15141 \begin_inset CommandInset label
15150 \begin_layout Standard
15151 It is necessary to define the floats (
15152 \begin_inset Flex MenuItem
15155 \begin_layout Plain Layout
15162 \begin_inset Flex MenuItem
15165 \begin_layout Plain Layout
15171 , \SpecialChar \ldots{}
15172 ) in the text class itself.
15173 Standard floats are included in the file
15174 \begin_inset Flex Code
15177 \begin_layout Plain Layout
15183 , so you may have to do no more than add
15186 \begin_layout LyX-Code
15187 Input stdfloats.inc
15190 \begin_layout Standard
15191 to your layout file.
15192 If you want to implement a text class that proposes some other float types
15193 (like the AGU class bundled with LyX), the information below will hopefully
15197 \begin_layout Description
15198 \begin_inset Flex Code
15201 \begin_layout Plain Layout
15208 \begin_inset Flex Code
15211 \begin_layout Plain Layout
15218 \begin_inset Quotes erd
15222 \begin_inset Quotes erd
15225 ] The file name extension of an auxiliary file for the list of figures (or
15227 LaTeX writes the captions to this file.
15230 \begin_layout Description
15231 \begin_inset Flex Code
15234 \begin_layout Plain Layout
15241 \begin_inset Flex Code
15244 \begin_layout Plain Layout
15251 \begin_inset Quotes erd
15255 \begin_inset Quotes erd
15258 ] The string that will be used in the menus and also for the caption.
15259 This is translated to the current language if babel is used.
15262 \begin_layout Description
15263 \begin_inset Flex Code
15266 \begin_layout Plain Layout
15272 These tags control the XHTML output.
15274 \begin_inset space ~
15278 \begin_inset CommandInset ref
15280 reference "sec:Tags-for-XHTML"
15287 \begin_layout Description
15288 \begin_inset Flex Code
15291 \begin_layout Plain Layout
15300 \begin_inset Flex Code
15303 \begin_layout Plain Layout
15312 \begin_inset space \thinspace{}
15316 \begin_inset Flex Code
15319 \begin_layout Plain Layout
15325 ] Indicates whether the float is already defined in the document class or
15326 if instead the LaTeX package
15327 \begin_inset Flex Code
15330 \begin_layout Plain Layout
15336 needs to be loaded to define it on-the-fly.
15338 \begin_inset Flex Code
15341 \begin_layout Plain Layout
15348 \begin_inset Flex Code
15351 \begin_layout Plain Layout
15358 It should be set to
15359 \begin_inset Flex Code
15362 \begin_layout Plain Layout
15368 if the float is already defined by the LaTeX document class.
15371 \begin_layout Description
15372 \begin_inset Flex Code
15375 \begin_layout Plain Layout
15382 \begin_inset Flex Code
15385 \begin_layout Plain Layout
15392 \begin_inset Quotes erd
15396 \begin_inset Quotes erd
15399 ] The command used to generate a list of floats of this type; the leading
15408 \begin_inset Flex Code
15411 \begin_layout Plain Layout
15417 is false, since there is no standard way to generate this command.
15419 \begin_inset Flex Code
15422 \begin_layout Plain Layout
15428 is true, since in that case there is a standard way to define the command.
15431 \begin_layout Description
15432 \begin_inset Flex Code
15435 \begin_layout Plain Layout
15442 \begin_inset Flex Code
15445 \begin_layout Plain Layout
15452 \begin_inset Quotes erd
15456 \begin_inset Quotes erd
15459 ] A title for a list of floats of this kind (list of figures, tables, or
15461 It is used for the screen label within LyX, it is used by LaTeX for the
15462 title and it is used as the title in the XHTML output.
15463 It will be translated to the document language.
15466 \begin_layout Description
15467 \begin_inset Flex Code
15470 \begin_layout Plain Layout
15477 \begin_inset Flex Code
15480 \begin_layout Plain Layout
15487 \begin_inset Quotes erd
15491 \begin_inset Quotes erd
15494 ] This (optional) argument determines whether floats of this class will
15495 be numbered within some sectional unit of the document.
15497 \begin_inset Flex Code
15500 \begin_layout Plain Layout
15507 \begin_inset Quotes eld
15511 \begin_inset Flex Code
15514 \begin_layout Plain Layout
15521 \begin_inset Quotes erd
15524 , the floats will be numbered within chapters.
15528 \begin_layout Description
15529 \begin_inset Flex Code
15532 \begin_layout Plain Layout
15539 \begin_inset Flex Code
15542 \begin_layout Plain Layout
15549 \begin_inset Quotes erd
15553 \begin_inset Quotes erd
15556 ] The default placement for the given class of floats.
15557 The string should be as in standard LaTeX:
15558 \begin_inset Flex Code
15561 \begin_layout Plain Layout
15568 \begin_inset Flex Code
15571 \begin_layout Plain Layout
15578 \begin_inset Flex Code
15581 \begin_layout Plain Layout
15588 \begin_inset Flex Code
15591 \begin_layout Plain Layout
15597 for top, bottom, page, and here, respectively.
15601 \begin_layout Plain Layout
15602 Note that the order of these letters in the string is irrelevant, like in
15608 On top of that there is a new type,
15609 \begin_inset Flex Code
15612 \begin_layout Plain Layout
15618 , which does not really correspond to a float, since it means: put it
15619 \begin_inset Quotes eld
15623 \begin_inset Quotes erd
15627 Note however that the
15628 \begin_inset Flex Code
15631 \begin_layout Plain Layout
15637 specifier is special and, because of implementation details, cannot be
15638 used in non-built in float types.
15639 If you do not understand what this means, just use
15640 \begin_inset Quotes eld
15644 \begin_inset Flex Code
15647 \begin_layout Plain Layout
15654 \begin_inset Quotes erd
15660 \begin_layout Description
15661 \begin_inset Flex Code
15664 \begin_layout Plain Layout
15671 \begin_inset Flex Code
15674 \begin_layout Plain Layout
15680 ] The prefix to use when creating labels referring to floats of this type.
15681 This allows the use of formatted references.
15682 Note that you can remove any
15683 \begin_inset Flex Code
15686 \begin_layout Plain Layout
15692 set by a copied style by using the special value
15693 \begin_inset Quotes eld
15697 \begin_inset Quotes erd
15700 , which must be all caps.
15703 \begin_layout Description
15704 \begin_inset Flex Code
15707 \begin_layout Plain Layout
15714 \begin_inset Flex Code
15717 \begin_layout Plain Layout
15724 \begin_inset Quotes erd
15728 \begin_inset Quotes erd
15731 ] The style used when defining the float using
15732 \begin_inset Flex Code
15735 \begin_layout Plain Layout
15746 \begin_layout Description
15747 \begin_inset Flex Code
15750 \begin_layout Plain Layout
15757 \begin_inset Flex Code
15760 \begin_layout Plain Layout
15767 \begin_inset Quotes erd
15771 \begin_inset Quotes erd
15775 \begin_inset Quotes eld
15779 \begin_inset Quotes erd
15782 of the new class of floats, like program or algorithm.
15783 After the appropriate
15784 \begin_inset Flex Code
15787 \begin_layout Plain Layout
15796 \begin_inset Flex Code
15799 \begin_layout Plain Layout
15808 \begin_inset Flex Code
15811 \begin_layout Plain Layout
15822 \begin_layout Description
15823 \begin_inset Flex Code
15826 \begin_layout Plain Layout
15833 \begin_inset Flex Code
15836 \begin_layout Plain Layout
15843 \begin_inset space \thinspace{}
15847 \begin_inset Flex Code
15850 \begin_layout Plain Layout
15858 ] Specifies whether this float is defined using the LaTeX package
15859 \begin_inset Flex Code
15862 \begin_layout Plain Layout
15868 , either by the class file, another package or on-the-fly by LyX itself.
15871 \begin_layout Standard
15872 Note that defining a float with type
15873 \begin_inset Flex Code
15876 \begin_layout Plain Layout
15884 automatically defines the corresponding counter with name
15885 \begin_inset Flex Code
15888 \begin_layout Plain Layout
15899 \begin_layout Subsection
15900 Flex insets and InsetLayout
15901 \begin_inset CommandInset label
15903 name "sub:Flex-insets-and"
15910 \begin_layout Standard
15911 Flex insets come in three different kinds:
15914 \begin_layout Itemize
15916 \begin_inset Flex Code
15919 \begin_layout Plain Layout
15925 ): These define semantic markup corresponding to such LaTeX commands as
15927 \begin_inset Flex Code
15930 \begin_layout Plain Layout
15939 \begin_inset Flex Code
15942 \begin_layout Plain Layout
15953 \begin_layout Itemize
15955 \begin_inset Flex Code
15958 \begin_layout Plain Layout
15964 ): These can be used to define custom collapsible insets, similar to TeX
15965 code, footnote, and the like.
15966 An obvious example is an endnote inset, which is defined in the
15967 \begin_inset Flex Code
15970 \begin_layout Plain Layout
15979 \begin_layout Itemize
15981 \begin_inset Flex Code
15984 \begin_layout Plain Layout
15990 ): For use with DocBook classes.
15993 \begin_layout Standard
15994 Flex insets are defined using the
15995 \begin_inset Flex Code
15998 \begin_layout Plain Layout
16004 tag, which shall be explained in a moment.
16007 \begin_layout Standard
16009 \begin_inset Flex Code
16012 \begin_layout Plain Layout
16018 tag also serves another function: It can be used to customize the general
16019 layout of many different types of insets.
16021 \begin_inset Flex Code
16024 \begin_layout Plain Layout
16030 can be used to customize the layout parameters for footnotes, marginal
16031 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16032 boxes, tables, algorithms, URLs, and
16033 \change_deleted -712698321 1356964515
16035 \change_inserted -712698321 1356964516
16038 s, as well as to define Flex insets.
16041 \begin_layout Standard
16043 \begin_inset Flex Code
16046 \begin_layout Plain Layout
16052 definition must begin with a line of the form:
16055 \begin_layout LyX-Code
16059 \begin_layout Standard
16061 \begin_inset Flex Code
16064 \begin_layout Plain Layout
16070 indicates the inset whose layout is being defined, and here there are
16071 \change_deleted -712698321 1356964888
16073 \change_inserted -712698321 1356964888
16075 \change_deleted 5863208 1334489267
16081 \begin_layout Enumerate
16082 The layout for a pre-existing inset is being modified.
16083 In this case, can be
16084 \begin_inset Flex Code
16087 \begin_layout Plain Layout
16093 any one of the following:
16094 \begin_inset Flex Code
16097 \begin_layout Plain Layout
16104 \begin_inset Flex Code
16107 \begin_layout Plain Layout
16114 \begin_inset Flex Code
16117 \begin_layout Plain Layout
16124 \begin_inset Flex Code
16127 \begin_layout Plain Layout
16134 \change_inserted -712698321 1356964563
16136 \begin_inset Flex Code
16139 \begin_layout Plain Layout
16141 \change_inserted -712698321 1356964560
16152 \begin_inset Flex Code
16155 \begin_layout Plain Layout
16162 \begin_inset Flex Code
16165 \begin_layout Plain Layout
16172 \begin_inset Flex Code
16175 \begin_layout Plain Layout
16182 \begin_inset Flex Code
16185 \begin_layout Plain Layout
16192 \begin_inset Flex Code
16195 \begin_layout Plain Layout
16202 \begin_inset Flex Code
16205 \begin_layout Plain Layout
16212 \begin_inset Flex Code
16215 \begin_layout Plain Layout
16222 \begin_inset Flex Code
16225 \begin_layout Plain Layout
16232 \begin_inset Flex Code
16235 \begin_layout Plain Layout
16242 \begin_inset Flex Code
16245 \begin_layout Plain Layout
16252 \begin_inset Flex Code
16255 \begin_layout Plain Layout
16262 \begin_inset Flex Code
16265 \begin_layout Plain Layout
16272 \begin_inset Flex Code
16275 \begin_layout Plain Layout
16282 \change_deleted -712698321 1356964592
16284 \begin_inset Flex Code
16287 \begin_layout Plain Layout
16289 \change_deleted -712698321 1353866704
16293 \change_inserted -712698321 1353866707
16304 \begin_inset Flex Code
16307 \begin_layout Plain Layout
16314 \begin_inset Flex Code
16317 \begin_layout Plain Layout
16326 \begin_layout Enumerate
16327 The layout for a Flex inset is being defined.
16329 \begin_inset Flex Code
16332 \begin_layout Plain Layout
16338 must be of the form
16339 \begin_inset Quotes eld
16343 \begin_inset Flex Code
16346 \begin_layout Plain Layout
16353 \begin_inset Quotes erd
16357 \begin_inset Flex Code
16360 \begin_layout Plain Layout
16366 may be be any valid identifier not used by a pre-existing Flex inset.
16367 The identifier may include spaces, but in that case the whole thing must
16368 be wrapped in quotes.
16369 Note that the definition of a flex inset
16374 \begin_inset Flex Code
16377 \begin_layout Plain Layout
16383 entry, declaring which type of inset it defines.
16384 \change_inserted 5863208 1334489312
16388 \begin_layout Enumerate
16390 \change_inserted 5863208 1334492248
16391 The layout for user specific branch is being defined.
16393 \begin_inset Flex Code
16396 \begin_layout Plain Layout
16398 \change_inserted 5863208 1334489384
16404 must be of the form
16405 \begin_inset Quotes eld
16409 \begin_inset Flex Code
16412 \begin_layout Plain Layout
16414 \change_inserted 5863208 1334489392
16421 \begin_inset Quotes erd
16425 \begin_inset Flex Code
16428 \begin_layout Plain Layout
16430 \change_inserted 5863208 1334489384
16436 may be be any valid identifier of branch defined in user's document.
16437 The identifier may include spaces, but in that case the whole thing must
16438 be wrapped in quotes.
16439 The main purpose of this feature is to allow LaTeX wrapping around specific
16440 branches as user needs.
16441 \change_inserted -712698321 1356964893
16445 \begin_layout Enumerate
16447 \change_inserted -712698321 1356965125
16448 The layout of a user (or class) specific caption is being defined.
16450 \begin_inset Flex Code
16453 \begin_layout Plain Layout
16455 \change_inserted -712698321 1356964939
16461 must be of the form
16462 \begin_inset Quotes eld
16466 \begin_inset Flex Code
16469 \begin_layout Plain Layout
16471 \change_inserted -712698321 1356964943
16478 \begin_inset Quotes erd
16482 \begin_inset Flex Code
16485 \begin_layout Plain Layout
16487 \change_inserted -712698321 1356964939
16493 specifies the name of the caption as it appears in the menu.
16494 Have a look at the standard caption (
16495 \begin_inset Flex Code
16498 \begin_layout Plain Layout
16500 \change_inserted -712698321 1356964987
16506 ), the specific captions of the KOMA-Script classes (
16507 \begin_inset Flex Code
16510 \begin_layout Plain Layout
16512 \change_inserted -712698321 1356965018
16519 \begin_inset Flex Code
16522 \begin_layout Plain Layout
16524 \change_inserted -712698321 1356965021
16535 \begin_inset Flex Code
16538 \begin_layout Plain Layout
16540 \change_inserted -712698321 1356965045
16546 ) for applications.
16551 \begin_layout Standard
16553 \begin_inset Flex Code
16556 \begin_layout Plain Layout
16562 definition can contain the following entries:
16565 \begin_layout Description
16567 \change_inserted -712698321 1353681390
16568 \begin_inset Flex Code
16571 \begin_layout Plain Layout
16573 \change_inserted -712698321 1353681344
16580 \begin_inset Flex Code
16583 \begin_layout Plain Layout
16585 \change_inserted -712698321 1353681344
16591 ] Defines argument number <int> of a command\SpecialChar \slash{}
16592 environment associated with
16593 the current layout.
16594 The definition must end with
16595 \begin_inset Flex Code
16598 \begin_layout Plain Layout
16600 \change_inserted -712698321 1353681344
16608 \begin_inset space ~
16612 \begin_inset CommandInset ref
16614 reference "sub:Paragraph-Styles"
16621 \begin_layout Description
16623 \change_inserted -195340706 1333913893
16624 \begin_inset Flex Code
16627 \begin_layout Plain Layout
16633 Preamble for changing languages.
16635 \begin_inset space ~
16639 \begin_inset CommandInset ref
16641 reference "sub:I18n"
16648 \begin_layout Description
16649 \begin_inset Flex Code
16652 \begin_layout Plain Layout
16659 \begin_inset Flex Code
16662 \begin_layout Plain Layout
16668 ] The color for the inset's background.
16670 \begin_inset space ~
16674 \begin_inset CommandInset ref
16676 reference "chap:Names-of-colors"
16680 for a list of the available color names.
16683 \begin_layout Description
16684 \begin_inset Flex Code
16687 \begin_layout Plain Layout
16694 \begin_inset Flex Code
16697 \begin_layout Plain Layout
16706 \begin_inset space \thinspace{}
16710 \begin_inset Flex Code
16713 \begin_layout Plain Layout
16719 ] Whether to use the content of the inset as the label, when the inset is
16724 \begin_layout Description
16725 \begin_inset Flex Code
16728 \begin_layout Plain Layout
16735 \begin_inset Flex Code
16738 \begin_layout Plain Layout
16744 ] As with paragraph styles, see sec.
16745 \begin_inset space ~
16749 \begin_inset CommandInset ref
16751 reference "sub:Paragraph-Styles"
16756 Note that you need to specify the complete type, e.
16757 \begin_inset space \thinspace{}
16761 \begin_inset space ~
16765 \begin_inset Flex Code
16768 \begin_layout Plain Layout
16769 CopyStyle Flex:<name>
16777 \begin_layout Description
16778 \begin_inset Flex Code
16781 \begin_layout Plain Layout
16788 \begin_inset Flex Code
16791 \begin_layout Plain Layout
16800 \begin_inset space \thinspace{}
16804 \begin_inset Flex Code
16807 \begin_layout Plain Layout
16813 ] Indicates whether the user may employ the Paragraph Settings dialog to
16814 customize the paragraph.
16817 \begin_layout Description
16818 \begin_inset Flex Code
16821 \begin_layout Plain Layout
16828 \begin_inset Flex Code
16831 \begin_layout Plain Layout
16838 \begin_inset Flex Code
16841 \begin_layout Plain Layout
16848 \begin_inset Flex Code
16851 \begin_layout Plain Layout
16857 , describing the rendering style used for the inset's frame and buttons.
16858 Footnotes generally use
16859 \begin_inset Flex Code
16862 \begin_layout Plain Layout
16868 , ERT insets generally
16869 \begin_inset Flex Code
16872 \begin_layout Plain Layout
16878 , and character styles
16879 \begin_inset Flex Code
16882 \begin_layout Plain Layout
16891 \begin_layout Description
16892 \begin_inset Flex Code
16895 \begin_layout Plain Layout
16902 \begin_inset Flex Code
16905 \begin_layout Plain Layout
16914 \begin_inset space \thinspace{}
16920 \begin_inset Flex Code
16923 \begin_layout Plain Layout
16932 \begin_inset Flex Code
16935 \begin_layout Plain Layout
16942 \begin_inset Flex Code
16945 \begin_layout Plain Layout
16952 Indicates whether the environment will stand on its own in the output or
16953 will appear inline with the surrounding text.
16954 If set to false, it is supposed that the LaTeX environment ignores white
16955 space (including one newline character) after the
16956 \begin_inset Flex Code
16959 \begin_layout Plain Layout
16972 \begin_inset Flex Code
16975 \begin_layout Plain Layout
16991 \begin_layout Description
16992 \begin_inset Flex Code
16995 \begin_layout Plain Layout
17001 Required at the end of the
17002 \begin_inset Flex Code
17005 \begin_layout Plain Layout
17014 \begin_layout Description
17015 \begin_inset Flex Code
17018 \begin_layout Plain Layout
17024 The font used for both the text body
17030 \begin_inset space ~
17034 \begin_inset CommandInset ref
17036 reference "sub:Font-description"
17041 Note that defining this font automatically defines the
17042 \begin_inset Flex Code
17045 \begin_layout Plain Layout
17051 to the same value, so define this first and define
17052 \begin_inset Flex Code
17055 \begin_layout Plain Layout
17061 later if you want them to be different.
17062 \change_inserted 155139281 1354130923
17066 \begin_layout Description
17068 \change_inserted 155139281 1354130923
17069 \begin_inset Flex Code
17072 \begin_layout Plain Layout
17074 \change_inserted 155139281 1354130923
17075 ForceLocalFontSwitch
17081 \begin_inset Flex Code
17084 \begin_layout Plain Layout
17086 \change_inserted 155139281 1354130923
17095 \begin_inset Flex Code
17098 \begin_layout Plain Layout
17100 \change_inserted 155139281 1354130923
17106 ] When using babel, always use a local font switch (
17107 \begin_inset Flex Code
17110 \begin_layout Plain Layout
17112 \change_inserted 155139281 1354130923
17120 ), never a global one (such as
17121 \begin_inset Flex Code
17124 \begin_layout Plain Layout
17126 \change_inserted 155139281 1354130923
17139 \begin_layout Description
17140 \begin_inset Flex Code
17143 \begin_layout Plain Layout
17150 \begin_inset Flex Code
17153 \begin_layout Plain Layout
17162 \begin_inset space \thinspace{}
17166 \begin_inset Flex Code
17169 \begin_layout Plain Layout
17176 \begin_inset Quotes eld
17180 \begin_inset Quotes erd
17183 language, leading to Left-to-Right (Latin) output, e.
17184 \begin_inset space \thinspace{}
17188 \begin_inset space \space{}
17191 in TeX code or URL.
17195 \begin_layout Description
17196 \begin_inset Flex Code
17199 \begin_layout Plain Layout
17206 \begin_inset Flex Code
17209 \begin_layout Plain Layout
17218 \begin_inset space \thinspace{}
17222 \begin_inset Flex Code
17225 \begin_layout Plain Layout
17231 ] Indicates whether the
17232 \begin_inset Flex Code
17235 \begin_layout Plain Layout
17241 should be used or, instead, the user can change the paragraph style used
17246 \begin_layout Description
17247 \begin_inset Flex Code
17250 \begin_layout Plain Layout
17257 \begin_inset Flex Code
17260 \begin_layout Plain Layout
17269 \begin_inset space \thinspace{}
17273 \begin_inset Flex Code
17276 \begin_layout Plain Layout
17282 ] As with paragraph styles, see sec.
17283 \begin_inset space ~
17287 \begin_inset CommandInset ref
17289 reference "sub:Paragraph-Styles"
17296 \begin_layout Description
17297 \begin_inset Flex Code
17300 \begin_layout Plain Layout
17306 These tags control the XHTML output.
17308 \begin_inset space ~
17312 \begin_inset CommandInset ref
17314 reference "sec:Tags-for-XHTML"
17321 \begin_layout Description
17322 \begin_inset Flex Code
17325 \begin_layout Plain Layout
17332 \begin_inset Flex Code
17335 \begin_layout Plain Layout
17344 \begin_inset space \thinspace{}
17348 \begin_inset Flex Code
17351 \begin_layout Plain Layout
17357 ] Whether to include the contents of this inset in the strings generated
17358 for the `Outline' pane.
17359 One would not, for example, want the content of a footnote in a section
17360 header to be included in the TOC displayed in the outline, but one would
17361 normally want the content of a character style displayed.
17362 Default is false: not to include.
17365 \begin_layout Description
17366 \begin_inset Flex Code
17369 \begin_layout Plain Layout
17378 \begin_inset Flex Code
17381 \begin_layout Plain Layout
17390 \begin_inset space \thinspace{}
17394 \begin_inset Flex Code
17397 \begin_layout Plain Layout
17403 ] As with paragraph styles, see sec.
17404 \begin_inset space ~
17408 \begin_inset CommandInset ref
17410 reference "sub:Paragraph-Styles"
17417 \begin_layout Description
17418 \begin_inset Flex Code
17421 \begin_layout Plain Layout
17427 The font used for the label.
17429 \begin_inset space ~
17433 \begin_inset CommandInset ref
17435 reference "sub:Font-description"
17440 Note that this definition can never appear before
17441 \begin_inset Flex Code
17444 \begin_layout Plain Layout
17450 , lest it be ineffective.
17453 \begin_layout Description
17454 \begin_inset Flex Code
17457 \begin_layout Plain Layout
17464 \begin_inset Flex Code
17467 \begin_layout Plain Layout
17474 \begin_inset Quotes erd
17478 \begin_inset Quotes erd
17481 ] What will be displayed on the button or elsewhere as the inset label.
17483 \begin_inset Flex Code
17486 \begin_layout Plain Layout
17493 \begin_inset Flex Code
17496 \begin_layout Plain Layout
17502 ) modify this label on the fly.
17505 \begin_layout Description
17507 \change_inserted -195340706 1333913893
17508 \begin_inset Flex Code
17511 \begin_layout Plain Layout
17517 Language dependent preamble.
17519 \begin_inset space ~
17523 \begin_inset CommandInset ref
17525 reference "sub:I18n"
17532 \begin_layout Description
17533 \begin_inset Flex Code
17536 \begin_layout Plain Layout
17543 \begin_inset Flex Code
17546 \begin_layout Plain Layout
17552 ] The name of the corresponding LaTeX stuff.
17553 Either the environment or command name.
17556 \begin_layout Description
17557 \begin_inset Flex Code
17560 \begin_layout Plain Layout
17567 \begin_inset Flex Code
17570 \begin_layout Plain Layout
17576 ] The optional parameter for the corresponding
17577 \begin_inset Flex Code
17580 \begin_layout Plain Layout
17586 stuff, including possible bracket pairs like
17587 \begin_inset Flex Code
17590 \begin_layout Plain Layout
17598 \change_inserted -712698321 1355144715
17599 This will be output as is after all LaTeX
17600 \begin_inset Flex Code
17603 \begin_layout Plain Layout
17605 \change_inserted -712698321 1355144713
17614 This parameter cannot be changed from within LyX
17615 \change_inserted -712698321 1355144775
17617 \begin_inset Flex Code
17620 \begin_layout Plain Layout
17622 \change_inserted -712698321 1355144747
17628 for customizable parameters)
17633 \begin_layout Description
17634 \begin_inset Flex Code
17637 \begin_layout Plain Layout
17644 \begin_inset Flex Code
17647 \begin_layout Plain Layout
17649 \change_deleted -712698321 1353867544
17656 Command, Environment,
17657 \change_inserted -712698321 1353867573
17659 \change_deleted -712698321 1353867557
17668 \begin_inset Flex Code
17671 \begin_layout Plain Layout
17673 \change_deleted -712698321 1353867564
17677 \change_deleted -712698321 1353867569
17685 ] How the style should be translated into LaTeX.
17689 \begin_layout Plain Layout
17690 \begin_inset Flex Code
17693 \begin_layout Plain Layout
17699 is perhaps a bit misleading, since these rules apply to SGML classes, too.
17700 Visit the SGML class files for specific examples.
17709 \begin_layout Description
17710 \begin_inset Flex Code
17713 \begin_layout Plain Layout
17715 \change_deleted -712698321 1353867582
17717 \change_inserted -712698321 1353867583
17725 means nothing special.
17729 \begin_layout Description
17730 \begin_inset Flex Code
17733 \begin_layout Plain Layout
17740 \begin_inset Flex Code
17743 \begin_layout Plain Layout
17750 {\SpecialChar \ldots{}
17759 \begin_layout Description
17760 \begin_inset Flex Code
17763 \begin_layout Plain Layout
17770 \begin_inset Flex Code
17773 \begin_layout Plain Layout
17780 }\SpecialChar \ldots{}
17796 \begin_layout Description
17798 \change_deleted -712698321 1353867600
17799 \begin_inset Flex Code
17802 \begin_layout Plain Layout
17809 \begin_inset Flex Code
17812 \begin_layout Plain Layout
17819 \begin_inset Flex Code
17822 \begin_layout Plain Layout
17830 is generated for each paragraph of this environment.
17834 \begin_layout Description
17836 \change_deleted -712698321 1353867600
17837 \begin_inset Flex Code
17840 \begin_layout Plain Layout
17847 \begin_inset Flex Code
17850 \begin_layout Plain Layout
17857 \begin_inset Flex Code
17860 \begin_layout Plain Layout
17866 is passed as an argument to the environment.
17868 \begin_inset Flex Code
17871 \begin_layout Plain Layout
17877 can be defined in the
17878 \begin_inset Flex MenuItem
17881 \begin_layout Plain Layout
17886 \SpecialChar \menuseparator
17892 \begin_inset space ~
17906 \begin_layout Standard
17907 Putting the last few things together, the LaTeX output will be either:
17910 \begin_layout LyX-Code
17914 \change_deleted 2090807402 1356919073
17916 \change_inserted 2090807402 1356919073
17920 \change_deleted 2090807402 1356919073
17922 \change_inserted 2090807402 1356919002
17925 ]{\SpecialChar \ldots{}
17929 \begin_layout Standard
17933 \begin_layout LyX-Code
17937 \change_deleted 2090807402 1356919013
17939 \change_inserted 2090807402 1356919014
17943 \change_deleted 2090807402 1356919013
17945 \change_inserted 2090807402 1356919008
17948 ] \SpecialChar \ldots{}
17952 \change_deleted 2090807402 1356919016
17954 \change_inserted 2090807402 1356919016
17960 \begin_layout Standard
17961 depending upon the LaTeX type.
17965 \begin_layout Description
17967 \change_inserted -712698321 1354263128
17968 \begin_inset Flex Code
17971 \begin_layout Plain Layout
17973 \change_inserted -712698321 1353866742
17982 \begin_inset Flex Code
17985 \begin_layout Plain Layout
17987 \change_inserted -712698321 1353866752
17993 ] A string that is put at the beginning of the layout content.
17994 A line break in the output can be indicated by
17995 \begin_inset Flex Code
17998 \begin_layout Plain Layout
18000 \change_inserted -712698321 1354263128
18011 \begin_layout Description
18012 \begin_inset Flex Code
18015 \begin_layout Plain Layout
18022 \begin_inset Flex Code
18025 \begin_layout Plain Layout
18032 \begin_inset Flex Code
18035 \begin_layout Plain Layout
18042 \begin_inset Flex Code
18045 \begin_layout Plain Layout
18052 \begin_inset Flex Code
18055 \begin_layout Plain Layout
18061 (indicating a dummy definition ending definitions of charstyles, etc).
18062 This entry is required in and is only meaningful for Flex insets.
18063 Among other things, it determines on which menu this inset will appear.
18065 \begin_inset Flex Code
18068 \begin_layout Plain Layout
18075 \begin_inset Flex Code
18078 \begin_layout Plain Layout
18084 will automatically set
18085 \begin_inset Flex Code
18088 \begin_layout Plain Layout
18096 \begin_inset Flex Code
18099 \begin_layout Plain Layout
18105 can be set to true for
18106 \begin_inset Flex Code
18109 \begin_layout Plain Layout
18115 insets by setting it
18120 \begin_inset Flex Code
18123 \begin_layout Plain Layout
18132 \begin_layout Description
18133 \begin_inset Flex Code
18136 \begin_layout Plain Layout
18143 \begin_inset Flex Code
18146 \begin_layout Plain Layout
18155 \begin_inset space \thinspace{}
18159 \begin_inset Flex Code
18162 \begin_layout Plain Layout
18168 ] Whether multiple paragraphs are permitted in this inset.
18170 \begin_inset Flex Code
18173 \begin_layout Plain Layout
18179 to the same value and
18180 \begin_inset Flex Code
18183 \begin_layout Plain Layout
18189 to the opposite value.
18190 These can be reset to other values, if they are used
18195 \begin_inset Flex Code
18198 \begin_layout Plain Layout
18208 \begin_layout Description
18209 \begin_inset Flex Code
18212 \begin_layout Plain Layout
18219 \begin_inset Flex Code
18222 \begin_layout Plain Layout
18231 \begin_inset space \thinspace{}
18235 \begin_inset Flex Code
18238 \begin_layout Plain Layout
18244 ] Whether fragile commands in this inset should be
18245 \begin_inset Flex Code
18248 \begin_layout Plain Layout
18261 whether the command should itself be protected.) Default is false.
18264 \begin_layout Description
18265 \begin_inset Flex Code
18268 \begin_layout Plain Layout
18275 \begin_inset Flex Code
18278 \begin_layout Plain Layout
18287 \begin_inset space \thinspace{}
18291 \begin_inset Flex Code
18294 \begin_layout Plain Layout
18300 ] As with paragraph styles, see sec.
18301 \begin_inset space ~
18305 \begin_inset CommandInset ref
18307 reference "sub:Paragraph-Styles"
18315 \begin_layout Description
18316 \begin_inset Flex Code
18319 \begin_layout Plain Layout
18326 \begin_inset Flex Code
18329 \begin_layout Plain Layout
18338 \begin_inset space \thinspace{}
18342 \begin_inset Flex Code
18345 \begin_layout Plain Layout
18351 ] As with paragraph styles, see sec.
18352 \begin_inset space ~
18356 \begin_inset CommandInset ref
18358 reference "sub:Paragraph-Styles"
18366 \begin_layout Description
18367 \begin_inset Flex Code
18370 \begin_layout Plain Layout
18376 As with paragraph styles, see sec.
18377 \begin_inset space ~
18381 \begin_inset CommandInset ref
18383 reference "sub:Paragraph-Styles"
18390 \begin_layout Description
18391 \begin_inset Flex Code
18394 \begin_layout Plain Layout
18401 \begin_inset Flex Code
18404 \begin_layout Plain Layout
18410 ] The prefix to use when creating labels referring to insets of this type.
18411 This allows the use of formatted references.
18414 \begin_layout Description
18415 \begin_inset Flex Code
18418 \begin_layout Plain Layout
18425 \begin_inset Flex Code
18428 \begin_layout Plain Layout
18434 ] As with paragraph styles, see sec.
18435 \begin_inset space ~
18439 \begin_inset CommandInset ref
18441 reference "sub:Paragraph-Styles"
18446 \change_inserted -712698321 1354439699
18450 \begin_layout Description
18452 \change_inserted -712698321 1354439705
18453 \begin_inset Flex Code
18456 \begin_layout Plain Layout
18458 \change_inserted -712698321 1354439699
18465 \begin_inset Flex Code
18468 \begin_layout Plain Layout
18470 \change_inserted -712698321 1354439699
18479 \begin_inset Flex Code
18482 \begin_layout Plain Layout
18484 \change_inserted -712698321 1354439699
18490 ] Resets the LaTeX arguments of this layout (as defined via the
18491 \begin_inset Flex Code
18494 \begin_layout Plain Layout
18496 \change_inserted -712698321 1354439699
18503 This is useful if you have copied a style via
18504 \begin_inset Flex Code
18507 \begin_layout Plain Layout
18509 \change_inserted -712698321 1354439699
18515 , but you do not want to inherit its (required and optional) arguments.
18517 \change_deleted -712698321 1354439698
18523 \begin_layout Description
18524 \begin_inset Flex Code
18527 \begin_layout Plain Layout
18534 \begin_inset Flex Code
18537 \begin_layout Plain Layout
18544 \begin_inset space \thinspace{}
18548 \begin_inset Flex Code
18551 \begin_layout Plain Layout
18559 ] Whether this inset should use the font of its surrounding environment
18561 Default is true: uses its own.
18564 \begin_layout Description
18566 \change_inserted -712698321 1354263134
18567 \begin_inset Flex Code
18570 \begin_layout Plain Layout
18572 \change_inserted -712698321 1353866810
18579 \begin_inset Flex Code
18582 \begin_layout Plain Layout
18584 \change_inserted -712698321 1353866806
18590 ] A string that is put at the end of the layout content.
18591 A line break in the output can be indicated by
18592 \begin_inset Flex Code
18595 \begin_layout Plain Layout
18597 \change_inserted -712698321 1354263134
18608 \begin_layout Description
18609 \begin_inset Flex Code
18612 \begin_layout Plain Layout
18619 \begin_inset Flex Code
18622 \begin_layout Plain Layout
18629 \begin_inset space \thinspace{}
18633 \begin_inset Flex Code
18636 \begin_layout Plain Layout
18644 ] Allow spell-checking the contents of this inset.
18648 \begin_layout Subsection
18650 \begin_inset CommandInset label
18652 name "sub:Counters"
18659 \begin_layout Standard
18660 It is necessary to define the counters (
18661 \begin_inset Flex MenuItem
18664 \begin_layout Plain Layout
18671 \begin_inset Flex MenuItem
18674 \begin_layout Plain Layout
18680 , \SpecialChar \ldots{}
18681 ) in the text class itself.
18682 The standard counters are defined in the file
18683 \begin_inset Flex Code
18686 \begin_layout Plain Layout
18692 , so you may have to do no more than add
18695 \begin_layout LyX-Code
18696 Input stdcounters.inc
18699 \begin_layout Standard
18700 to your layout file to get them to work.
18701 But if you want to define custom counters, then you can do so.
18702 The counter declaration must begin with:
18705 \begin_layout LyX-Code
18706 Counter CounterName
18709 \begin_layout Standard
18711 \begin_inset Flex Code
18714 \begin_layout Plain Layout
18720 ' is replaced by the name of the counter.
18721 And it must end with
18722 \begin_inset Quotes eld
18726 \begin_inset Flex Code
18729 \begin_layout Plain Layout
18736 \begin_inset Quotes erd
18740 The following parameters can also be used:
18743 \begin_layout Description
18744 \begin_inset Flex Code
18747 \begin_layout Plain Layout
18754 \begin_inset Flex Code
18757 \begin_layout Plain Layout
18764 \begin_inset Quotes erd
18768 \begin_inset Quotes erd
18771 ] When defined, this string defines how the counter is displayed.
18772 Setting this value sets
18773 \begin_inset Flex Code
18776 \begin_layout Plain Layout
18777 LabelStringAppendix
18783 The following special constructs can be used in the string:
18787 \begin_layout Itemize
18788 \begin_inset Flex Code
18791 \begin_layout Plain Layout
18799 will be replaced by the expansion of the
18800 \begin_inset Flex Code
18803 \begin_layout Plain Layout
18810 \begin_inset Flex Code
18813 \begin_layout Plain Layout
18814 LabelStringAppendix
18820 \begin_inset Flex Code
18823 \begin_layout Plain Layout
18833 \begin_layout Itemize
18834 counter values can be expressed using LaTeX-like macros
18835 \begin_inset Newline newline
18839 \begin_inset Flex Code
18842 \begin_layout Plain Layout
18859 \begin_inset Flex Code
18862 \begin_layout Plain Layout
18874 \begin_layout Plain Layout
18884 Actually, the situation is a bit more complicated: any
18903 other than those described below will produce arabic numerals.
18904 It would not be surprising to see this change in the future.
18910 \begin_inset Flex Code
18913 \begin_layout Plain Layout
18919 : 1, 2, 3,\SpecialChar \ldots{}
18921 \begin_inset Flex Code
18924 \begin_layout Plain Layout
18930 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18932 \begin_inset Flex Code
18935 \begin_layout Plain Layout
18941 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18943 \begin_inset Flex Code
18946 \begin_layout Plain Layout
18952 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18954 \begin_inset Flex Code
18957 \begin_layout Plain Layout
18963 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18965 \begin_inset Flex Code
18968 \begin_layout Plain Layout
18974 for hebrew numerals.
18978 \begin_layout Standard
18979 If LabelString is not defined, a default value is constructed as follows:
18980 if the counter has a master counter
18981 \begin_inset Flex Code
18984 \begin_layout Plain Layout
18991 \begin_inset Flex Code
18994 \begin_layout Plain Layout
19001 \begin_inset Newline newline
19005 \begin_inset Flex Code
19008 \begin_layout Plain Layout
19018 is used; otherwise the string
19019 \begin_inset Flex Code
19022 \begin_layout Plain Layout
19033 \begin_layout Description
19034 \begin_inset Flex Code
19037 \begin_layout Plain Layout
19038 LabelStringAppendix
19044 \begin_inset Flex Code
19047 \begin_layout Plain Layout
19054 \begin_inset Quotes erd
19058 \begin_inset Quotes erd
19062 \begin_inset Flex Code
19065 \begin_layout Plain Layout
19071 , but for use in the Appendix.
19074 \begin_layout Description
19075 \begin_inset Flex Code
19078 \begin_layout Plain Layout
19085 \begin_inset Flex Code
19088 \begin_layout Plain Layout
19095 \begin_inset Quotes erd
19099 \begin_inset Quotes erd
19102 ] A format for use with formatted references to this counter.
19103 For example, one might want to have references to section numbers appear
19105 \begin_inset Quotes eld
19109 \begin_inset Quotes erd
19113 The string should contain
19114 \begin_inset Quotes eld
19118 \begin_inset Quotes erd
19122 This will be replaced by the counter number itself.
19123 So, for sections, it would be: Section ##.
19126 \begin_layout Description
19127 \begin_inset Flex Code
19130 \begin_layout Plain Layout
19137 \begin_inset Flex Code
19140 \begin_layout Plain Layout
19147 \begin_inset Quotes erd
19151 \begin_inset Quotes erd
19154 ] If this is set to the name of another counter, the present counter will
19155 be reset every time the other one is increased.
19157 \begin_inset Flex Code
19160 \begin_layout Plain Layout
19167 \begin_inset Flex Code
19170 \begin_layout Plain Layout
19179 \begin_layout Subsection
19181 \begin_inset CommandInset label
19183 name "sub:Font-description"
19190 \begin_layout Standard
19191 A font description looks like this:
19194 \begin_layout LyX-Code
19208 \begin_layout LyX-Code
19212 \begin_layout LyX-Code
19216 \begin_layout Standard
19217 The following commands are available:
19220 \begin_layout Description
19221 \begin_inset Flex Code
19224 \begin_layout Plain Layout
19231 \begin_inset Flex Code
19234 \begin_layout Plain Layout
19243 \begin_inset Flex Code
19246 \begin_layout Plain Layout
19253 \begin_inset Flex Code
19256 \begin_layout Plain Layout
19263 \begin_inset Flex Code
19266 \begin_layout Plain Layout
19273 \begin_inset Flex Code
19276 \begin_layout Plain Layout
19283 \begin_inset Flex Code
19286 \begin_layout Plain Layout
19293 \begin_inset Flex Code
19296 \begin_layout Plain Layout
19303 \begin_inset Flex Code
19306 \begin_layout Plain Layout
19313 \begin_inset Flex Code
19316 \begin_layout Plain Layout
19325 \begin_layout Description
19326 \begin_inset Flex Code
19329 \begin_layout Plain Layout
19336 \begin_inset Flex Code
19339 \begin_layout Plain Layout
19348 \begin_inset Flex Code
19351 \begin_layout Plain Layout
19358 \begin_inset Flex Code
19361 \begin_layout Plain Layout
19370 \begin_layout Description
19371 \begin_inset Flex Code
19374 \begin_layout Plain Layout
19381 \begin_inset Flex Code
19384 \begin_layout Plain Layout
19390 ] Valid arguments are:
19391 \begin_inset Flex Code
19394 \begin_layout Plain Layout
19401 \begin_inset Flex Code
19404 \begin_layout Plain Layout
19411 \begin_inset Flex Code
19414 \begin_layout Plain Layout
19421 \begin_inset Flex Code
19424 \begin_layout Plain Layout
19431 \begin_inset Flex Code
19434 \begin_layout Plain Layout
19441 \begin_inset Flex Code
19444 \begin_layout Plain Layout
19451 \begin_inset Flex Code
19454 \begin_layout Plain Layout
19461 \begin_inset Flex Code
19464 \begin_layout Plain Layout
19471 \begin_inset Flex Code
19474 \begin_layout Plain Layout
19481 \begin_inset Flex Code
19484 \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 Each of these turns on or off the corresponding attribute.
19513 \begin_inset Flex Code
19516 \begin_layout Plain Layout
19522 turns on emphasis, and
19523 \begin_inset Flex Code
19526 \begin_layout Plain Layout
19534 \begin_inset Newline newline
19537 If the latter seems puzzling, remember that the font settings for the present
19538 context are generally inherited from the surrounding context.
19540 \begin_inset Flex Code
19543 \begin_layout Plain Layout
19549 would turn off the emphasis that was anyway in effect, say, in a theorem
19553 \begin_layout Description
19554 \begin_inset Flex Code
19557 \begin_layout Plain Layout
19564 \begin_inset Flex Code
19567 \begin_layout Plain Layout
19576 \begin_inset Flex Code
19579 \begin_layout Plain Layout
19588 \begin_layout Description
19589 \begin_inset Flex Code
19592 \begin_layout Plain Layout
19599 \begin_inset Flex Code
19602 \begin_layout Plain Layout
19611 \begin_inset Flex Code
19614 \begin_layout Plain Layout
19621 \begin_inset Flex Code
19624 \begin_layout Plain Layout
19631 \begin_inset Flex Code
19634 \begin_layout Plain Layout
19643 \begin_layout Description
19644 \begin_inset Flex Code
19647 \begin_layout Plain Layout
19654 \begin_inset Flex Code
19657 \begin_layout Plain Layout
19664 \begin_inset Flex Code
19667 \begin_layout Plain Layout
19674 \begin_inset Flex Code
19677 \begin_layout Plain Layout
19686 \begin_inset Flex Code
19689 \begin_layout Plain Layout
19696 \begin_inset Flex Code
19699 \begin_layout Plain Layout
19706 \begin_inset Flex Code
19709 \begin_layout Plain Layout
19716 \begin_inset Flex Code
19719 \begin_layout Plain Layout
19726 \begin_inset Flex Code
19729 \begin_layout Plain Layout
19738 \begin_layout Subsection
19739 \begin_inset CommandInset label
19741 name "sub:Citation-format-description"
19745 Citation format description
19748 \begin_layout Standard
19750 \begin_inset Flex Code
19753 \begin_layout Plain Layout
19759 blocks are used to describe how bibliographic information should be displayed,
19760 both within LyX itself (in the citation dialog and in tooltips, for example)
19761 and in XHTML output.
19762 Such a block might look like this:
19765 \begin_layout LyX-Code
19769 \begin_layout LyX-Code
19773 \begin_layout LyX-Code
19777 \begin_layout LyX-Code
19781 \begin_layout Standard
19782 The individual lines define how the bibliographic information associated
19783 with an article or book, respectively, is to be displayed, and such a definitio
19784 n can be given for any `entry type' that might be present in a BibTeX file.
19785 LyX defines a default format in the source code that will be used if no
19786 specific definition has been given.
19787 LyX predefines several formats in the file
19788 \begin_inset Flex Code
19791 \begin_layout Plain Layout
19797 , which is included in most of LyX's document classes.
19800 \begin_layout Standard
19801 The definitions use a simple language that allows BibTeX keys to be replaced
19803 Keys should be enclosed in
19804 \begin_inset Flex Code
19807 \begin_layout Plain Layout
19814 \begin_inset Flex Code
19817 \begin_layout Plain Layout
19824 So a simple definition might look like this:
19827 \begin_layout LyX-Code
19829 \begin_inset Quotes eld
19833 \begin_inset Quotes erd
19839 \begin_layout Standard
19840 This would print the author, followed by a comma, followed by the title,
19841 in quotes, followed by a period.
19844 \begin_layout Standard
19845 Of course, sometimes you may want to print a key only if it exists.
19846 This can be done by using a conditional construction, such as:
19847 \begin_inset Flex Code
19850 \begin_layout Plain Layout
19852 \begin_inset space ~
19862 \begin_inset Flex Code
19865 \begin_layout Plain Layout
19871 key exists, then print
19872 \begin_inset Quotes eld
19876 \begin_inset space ~
19880 \begin_inset Quotes erd
19883 followed by the volume key.
19884 It is also possible to have an else clause in the conditional, such as:
19885 \begin_inset Newline newline
19889 \begin_inset Flex Code
19892 \begin_layout Plain Layout
19893 {%author%[[%author%]][[%editor%, ed.]]}
19899 \begin_inset Newline newline
19903 \begin_inset Flex Code
19906 \begin_layout Plain Layout
19912 key is printed if it exists; otherwise, the editor key is printed, followed
19914 \begin_inset Quotes eld
19918 \begin_inset space ~
19922 \begin_inset Quotes erd
19925 Note that the key is again enclosed in
19926 \begin_inset Flex Code
19929 \begin_layout Plain Layout
19935 signs; the entire conditional is enclosed in braces; and the if and else
19936 clauses are enclosed in double brackets,
19937 \begin_inset Quotes eld
19941 \begin_inset Flex Code
19944 \begin_layout Plain Layout
19951 \begin_inset Quotes eld
19955 \begin_inset Quotes eld
19959 \begin_inset Flex Code
19962 \begin_layout Plain Layout
19969 \begin_inset Quotes erd
19973 There must be no space between any of these.
19976 \begin_layout Standard
19977 There is one other piece of syntax available in definitions, which looks
19979 \begin_inset Flex Code
19982 \begin_layout Plain Layout
19989 This defines a piece of formatting information that is to be used when
19991 \begin_inset Quotes eld
19995 \begin_inset Quotes erd
19999 Obviously, we do not want to output HTML tags when writing plain text,
20000 so they should be wrapped in
20001 \begin_inset Quotes eld
20005 \begin_inset Quotes erd
20009 \begin_inset Quotes eld
20013 \begin_inset Quotes erd
20019 \begin_layout Standard
20020 Two special sorts of definitions are also possible in a
20021 \begin_inset Flex Code
20024 \begin_layout Plain Layout
20031 An example of the first would be:
20034 \begin_layout LyX-Code
20036 \begin_inset Quotes eld
20040 \begin_inset Quotes erd
20046 \begin_layout Standard
20047 This is an abbreviation, or macro, and it can be used by treating it as
20049 \begin_inset Flex Code
20052 \begin_layout Plain Layout
20060 \begin_inset Flex Code
20063 \begin_layout Plain Layout
20069 exactly as it would treat its definition.
20070 So, let us issue the obvious
20078 \begin_layout LyX-Code
20082 \begin_layout Standard
20083 or anything like it.
20084 LyX shouldn't go into an infinite loop, but it may go into a long one before
20088 \begin_layout Standard
20089 The second sort of special definition might look like this:
20092 \begin_layout LyX-Code
20096 \begin_layout Standard
20097 This defines a translatable piece of text, which allows relevant parts of
20098 the bibliography to be translated.
20099 It can be included in a definition by treating it as a key:
20100 \begin_inset Flex Code
20103 \begin_layout Plain Layout
20110 Several of these are predefined in
20111 \begin_inset Flex Code
20114 \begin_layout Plain Layout
20121 Note that these are not macros, in the sense just defined.
20122 They will not be expanded.
20125 \begin_layout Standard
20126 So here then is an example that use all these features:
20127 \begin_inset VSpace defskip
20133 \begin_layout Standard
20137 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20140 \begin_layout Standard
20141 \begin_inset VSpace defskip
20144 This defines a macro that prints the author, followed by a comma, if the
20146 \begin_inset Flex Code
20149 \begin_layout Plain Layout
20155 key is defined, or else prints the name of the editor, followed by the
20157 \begin_inset Flex Code
20160 \begin_layout Plain Layout
20166 or its translation (it is by default
20167 \begin_inset Quotes eld
20171 \begin_inset Quotes erd
20175 \begin_inset Flex Code
20178 \begin_layout Plain Layout
20185 Note that this is in fact defined in
20186 \begin_inset Flex Code
20189 \begin_layout Plain Layout
20195 , so you can use it in your own definitions, or re-definitions, if you load
20199 \begin_layout Section
20200 \begin_inset CommandInset label
20202 name "sec:Tags-for-XHTML"
20206 Tags for XHTML output
20209 \begin_layout Standard
20210 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20211 by layout information.
20212 In general, LyX provides sensible defaults and, as mentioned earlier, it
20213 will even construct default CSS style rules from the other layout tags.
20214 For example, LyX will attempt to use the information provided in the
20215 \begin_inset Flex Code
20218 \begin_layout Plain Layout
20224 declaration for the Chapter style to write CSS that will appropriately
20225 format chapter headings.
20228 \begin_layout Standard
20229 In many cases, then, you may not have to do anything at all to get acceptable
20230 XHTML output for your own environments, custom insets, and so forth.
20231 But in some cases you will, and so LyX provides a number of layout tags
20232 that can be used to customize the XHTML and CSS that are generated.
20235 \begin_layout Standard
20236 Note that there are two tags,
20237 \begin_inset Flex Code
20240 \begin_layout Plain Layout
20247 \begin_inset Flex Code
20250 \begin_layout Plain Layout
20256 that may appear outside style and inset declarations.
20258 \begin_inset CommandInset ref
20260 reference "sub:General-text-class"
20264 for details on these.
20267 \begin_layout Subsection
20268 \begin_inset CommandInset label
20270 name "sub:Paragraph-Style-XHTML"
20277 \begin_layout Standard
20278 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20279 dealing with a normal paragraph, a command, or an environment, where this
20280 is itself determined by the contents of the corresponding
20281 \begin_inset Flex Code
20284 \begin_layout Plain Layout
20294 \begin_layout Standard
20295 For a command or normal paragraph, the output XHTML has the following form:
20298 \begin_layout LyX-Code
20300 \begin_inset Quotes erd
20304 \begin_inset Quotes erd
20310 \begin_layout LyX-Code
20312 \begin_inset Quotes erd
20316 \begin_inset Quotes erd
20322 \begin_layout LyX-Code
20323 Contents of the paragraph.
20326 \begin_layout LyX-Code
20330 \begin_layout Standard
20331 The label tags are of course omitted if the paragraph does not have a label.
20334 \begin_layout Standard
20335 For an environment that is not some sort of list, the XHTML takes this form:
20338 \begin_layout LyX-Code
20340 \begin_inset Quotes erd
20344 \begin_inset Quotes erd
20350 \begin_layout LyX-Code
20352 \begin_inset Quotes erd
20356 \begin_inset Quotes erd
20360 \begin_inset Quotes erd
20364 \begin_inset Quotes erd
20367 >Environment Label</labeltag>First paragraph.</itemtag>
20370 \begin_layout LyX-Code
20371 <itemtag>Second paragraph.</itemtag>
20374 \begin_layout LyX-Code
20378 \begin_layout Standard
20379 Note that the label is output only for the first paragraph, as it should
20380 be for a theorem, for example.
20384 \begin_layout Standard
20385 For a list, we have one of these forms:
20388 \begin_layout LyX-Code
20390 \begin_inset Quotes erd
20394 \begin_inset Quotes erd
20400 \begin_layout LyX-Code
20402 \begin_inset Quotes erd
20406 \begin_inset Quotes erd
20410 \begin_inset Quotes erd
20414 \begin_inset Quotes erd
20417 >List Label</labeltag>First item.</itemtag>
20420 \begin_layout LyX-Code
20422 \begin_inset Quotes erd
20426 \begin_inset Quotes erd
20430 \begin_inset Quotes erd
20434 \begin_inset Quotes erd
20437 >List Label</labeltag>Second item.</itemtag>
20440 \begin_layout LyX-Code
20444 \begin_layout LyX-Code
20448 \begin_layout LyX-Code
20450 \begin_inset Quotes erd
20454 \begin_inset Quotes erd
20460 \begin_layout LyX-Code
20462 \begin_inset Quotes erd
20466 \begin_inset Quotes erd
20469 >List Label</labeltag><itemtag attr=
20470 \begin_inset Quotes erd
20474 \begin_inset Quotes erd
20477 >First item.</itemtag>
20480 \begin_layout LyX-Code
20482 \begin_inset Quotes erd
20486 \begin_inset Quotes erd
20489 >List Label</labeltag><itemtag attr=
20490 \begin_inset Quotes erd
20494 \begin_inset Quotes erd
20497 >Second item.</itemtag>
20500 \begin_layout LyX-Code
20504 \begin_layout Standard
20505 Note the different orders of
20506 \begin_inset Flex Code
20509 \begin_layout Plain Layout
20516 \begin_inset Flex Code
20519 \begin_layout Plain Layout
20526 Which order we get depends upon the setting of
20527 \begin_inset Flex Code
20530 \begin_layout Plain Layout
20537 \begin_inset Flex Code
20540 \begin_layout Plain Layout
20546 is false (the default), you get the first of these, with the label within
20547 the item; if true, you get the second, with the label outside the item.
20550 \begin_layout Standard
20551 The specific tags and attributes output for each paragraph type can be controlle
20552 d by means of the layout tags we are about to describe.
20553 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20554 so you often may not need to do very much to get good XHTML output.
20555 Think of the available tags as there so you can tweak things to your liking.
20558 \begin_layout Description
20559 \begin_inset Flex Code
20562 \begin_layout Plain Layout
20569 \begin_inset Flex Code
20572 \begin_layout Plain Layout
20578 ] Specifies attribute information to be output with the main tag.
20580 \begin_inset Quotes eld
20584 \begin_inset Flex Code
20587 \begin_layout Plain Layout
20594 \begin_inset Quotes erd
20598 By default, LyX will output
20599 \begin_inset Quotes eld
20603 \begin_inset Flex Code
20606 \begin_layout Plain Layout
20613 \begin_inset Quotes erd
20617 \begin_inset Flex Code
20620 \begin_layout Plain Layout
20626 is the LyX name of the layout, made lowercase, for example: chapter.
20631 contain any style information.
20633 \begin_inset Flex Code
20636 \begin_layout Plain Layout
20645 \begin_layout Description
20646 \begin_inset Flex Code
20649 \begin_layout Plain Layout
20656 \begin_inset Flex Code
20659 \begin_layout Plain Layout
20669 ] Whether to output the default CSS information LyX generates for this layout,
20670 even if additional information is explicitly provided via
20671 \begin_inset Flex Code
20674 \begin_layout Plain Layout
20682 \begin_inset Flex Code
20685 \begin_layout Plain Layout
20691 allows you to alter or augment the generated CSS, rather than to override
20694 \begin_inset Flex Code
20697 \begin_layout Plain Layout
20706 \begin_layout Description
20707 \begin_inset Flex Code
20710 \begin_layout Plain Layout
20717 \begin_inset Flex Code
20720 \begin_layout Plain Layout
20726 ] The tag to be used for individual paragraphs of environments, replacing
20728 \begin_inset Flex Code
20731 \begin_layout Plain Layout
20737 in the examples above.
20739 \begin_inset Flex Code
20742 \begin_layout Plain Layout
20751 \begin_layout Description
20752 \begin_inset Flex Code
20755 \begin_layout Plain Layout
20762 \begin_inset Flex Code
20765 \begin_layout Plain Layout
20771 ] Attributes for the item tag.
20773 \begin_inset Quotes eld
20777 \begin_inset Flex Code
20780 \begin_layout Plain Layout
20781 class=`layoutname_item'
20787 \begin_inset Quotes erd
20795 contain any style information.
20797 \begin_inset Flex Code
20800 \begin_layout Plain Layout
20809 \begin_layout Description
20810 \begin_inset Flex Code
20813 \begin_layout Plain Layout
20820 \begin_inset Flex Code
20823 \begin_layout Plain Layout
20829 ] The tag to be used for paragraph and item labels, replacing
20830 \begin_inset Flex Code
20833 \begin_layout Plain Layout
20839 in the examples above.
20841 \begin_inset Flex Code
20844 \begin_layout Plain Layout
20851 \begin_inset Flex Code
20854 \begin_layout Plain Layout
20861 \begin_inset Flex Code
20864 \begin_layout Plain Layout
20871 \begin_inset Flex Code
20874 \begin_layout Plain Layout
20875 Centered_Top_Environment
20880 , in which case it defaults to
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
20913 ] Attributes for the label tag.
20915 \begin_inset Quotes eld
20919 \begin_inset Flex Code
20922 \begin_layout Plain Layout
20923 class=`layoutname_label'
20929 \begin_inset Quotes erd
20937 contain any style information.
20939 \begin_inset Flex Code
20942 \begin_layout Plain Layout
20951 \begin_layout Description
20952 \begin_inset Flex Code
20955 \begin_layout Plain Layout
20962 \begin_inset Flex Code
20965 \begin_layout Plain Layout
20975 ] Meaningful only for list-like environments, this tag controls whether
20976 the label tag is output before or inside the item tag.
20977 This is used, for example, in the description environment, where we want
20979 \begin_inset Flex Code
20982 \begin_layout Plain Layout
20983 <dt>\SpecialChar \ldots{}
20984 </dt><dd>\SpecialChar \ldots{}
20992 \begin_inset Flex Code
20995 \begin_layout Plain Layout
21001 : The label tag is output inside the item tag.
21004 \begin_layout Description
21005 \begin_inset Flex Code
21008 \begin_layout Plain Layout
21014 Information to be output in the
21015 \begin_inset Flex Code
21018 \begin_layout Plain Layout
21024 section when this style is used.
21025 This might, for example, be used to include a
21026 \begin_inset Flex Code
21029 \begin_layout Plain Layout
21036 \begin_inset Flex Code
21039 \begin_layout Plain Layout
21048 \begin_layout Description
21049 \begin_inset Flex Code
21052 \begin_layout Plain Layout
21058 CSS style information to be included when this style is used.
21059 Note that this will automatically be wrapped in a layout-generated
21060 \begin_inset Flex Code
21063 \begin_layout Plain Layout
21069 block, so only the CSS itself need be included.
21072 \begin_layout Description
21073 \begin_inset Flex Code
21076 \begin_layout Plain Layout
21083 \begin_inset Flex Code
21086 \begin_layout Plain Layout
21092 ] The tag to be used for the main label, replacing
21093 \begin_inset Flex Code
21096 \begin_layout Plain Layout
21102 in the examples above.
21104 \begin_inset Flex Code
21107 \begin_layout Plain Layout
21116 \begin_layout Description
21117 \begin_inset Flex Code
21120 \begin_layout Plain Layout
21127 \begin_inset Flex Code
21130 \begin_layout Plain Layout
21140 ] Marks this style as the one to be used to generate the
21141 \begin_inset Flex Code
21144 \begin_layout Plain Layout
21150 tag for the XHTML file.
21151 By default, it is false.
21153 \begin_inset Flex Code
21156 \begin_layout Plain Layout
21162 file sets it to true for the
21163 \begin_inset Flex Code
21166 \begin_layout Plain Layout
21176 \begin_layout Subsection
21180 \begin_layout Standard
21181 The XHTML output of insets can also be controlled by information in layout
21186 \begin_layout Plain Layout
21187 At present, this is true only for
21188 \begin_inset Quotes eld
21192 \begin_inset Quotes erd
21195 insets (insets you can type into) and is not true for
21196 \begin_inset Quotes eld
21200 \begin_inset Quotes erd
21203 insets (insets that are associated with dialog boxes).
21208 Here, too, LyX tries to provide sensible defaults, and it constructs default
21210 But everything can be customized.
21213 \begin_layout Standard
21214 The XHTML LyX outputs for an inset has the following form:
21217 \begin_layout LyX-Code
21219 \begin_inset Quotes erd
21223 \begin_inset Quotes erd
21229 \begin_layout LyX-Code
21230 <labeltag>Label</labeltag>
21233 \begin_layout LyX-Code
21235 \begin_inset Quotes erd
21239 \begin_inset Quotes erd
21242 >Contents of the inset.</innertag>
21245 \begin_layout LyX-Code
21249 \begin_layout Standard
21250 If the inset permits multiple paragraphs---that is, if
21251 \begin_inset Flex Code
21254 \begin_layout Plain Layout
21260 is true---then the contents of the inset will itself be output as paragraphs
21261 formatted according to the styles used for those paragraphs (standard,
21262 quote, and the like).
21263 The label tag is of course omitted if the paragraph does not have a label
21264 and, at present, is always
21265 \begin_inset Flex Code
21268 \begin_layout Plain Layout
21275 The inner tag is optional and, by default, does not appear.
21278 \begin_layout Standard
21279 The specific tags and attributes output for each inset can be controlled
21280 by means of the following layout tags.
21283 \begin_layout Description
21284 \begin_inset Flex Code
21287 \begin_layout Plain Layout
21294 \begin_inset Flex Code
21297 \begin_layout Plain Layout
21303 ] Specifies attribute information to be output with the main tag.
21305 \begin_inset Quotes eld
21309 \begin_inset Flex Code
21312 \begin_layout Plain Layout
21313 class=`myinset' onclick=`\SpecialChar \ldots{}
21320 \begin_inset Quotes erd
21324 By default, LyX will output
21325 \begin_inset Quotes eld
21329 \begin_inset Flex Code
21332 \begin_layout Plain Layout
21339 \begin_inset Quotes erd
21343 \begin_inset Flex Code
21346 \begin_layout Plain Layout
21352 is the LyX name of the inset, made lowercase and with non-alphanumeric
21353 characters converted to underscores, for example: footnote.
21356 \begin_layout Description
21357 \begin_inset Flex Code
21360 \begin_layout Plain Layout
21367 \begin_inset Flex Code
21370 \begin_layout Plain Layout
21380 ] Whether to output the default CSS information LyX generates for this layout,
21381 even if additional information is explicitly provided via
21382 \begin_inset Flex Code
21385 \begin_layout Plain Layout
21393 \begin_inset Flex Code
21396 \begin_layout Plain Layout
21402 allows you to alter or augment the generated CSS, rather than to override
21407 \begin_layout Description
21408 \begin_inset Flex Code
21411 \begin_layout Plain Layout
21418 \begin_inset Flex Code
21421 \begin_layout Plain Layout
21427 ] Attributes for the inner tag.
21429 \begin_inset Quotes eld
21433 \begin_inset Flex Code
21436 \begin_layout Plain Layout
21437 class=`insetname_inner'
21443 \begin_inset Quotes erd
21449 \begin_layout Description
21450 \begin_inset Flex Code
21453 \begin_layout Plain Layout
21460 \begin_inset Flex Code
21463 \begin_layout Plain Layout
21469 ] The inner tag, replacing
21470 \begin_inset Flex Code
21473 \begin_layout Plain Layout
21479 in the examples above.
21480 By default, there is none.
21483 \begin_layout Description
21484 \begin_inset Flex Code
21487 \begin_layout Plain Layout
21494 \begin_inset Flex Code
21497 \begin_layout Plain Layout
21505 ] Whether this inset represents a standalone block of text (such as a footnote)
21506 or instead represents material that is included in the surrounding text
21507 (such as a branch).
21511 \begin_layout Description
21512 \begin_inset Flex Code
21515 \begin_layout Plain Layout
21522 \begin_inset Flex Code
21525 \begin_layout Plain Layout
21531 ] A label for this inset, possibly including a reference to a counter.
21532 For example, for footnote, it might be:
21533 \begin_inset Flex Code
21536 \begin_layout Plain Layout
21545 This is optional, and there is no default.
21548 \begin_layout Description
21549 \begin_inset Flex Code
21552 \begin_layout Plain Layout
21558 Information to be output in the
21559 \begin_inset Flex Code
21562 \begin_layout Plain Layout
21568 section when this style is used.
21569 This might, for example, be used to include a
21570 \begin_inset Flex Code
21573 \begin_layout Plain Layout
21580 \begin_inset Flex Code
21583 \begin_layout Plain Layout
21592 \begin_layout Description
21593 \begin_inset Flex Code
21596 \begin_layout Plain Layout
21602 CSS style information to be included when this style is used.
21603 Note that this will automatically be wrapped in a layout-generated
21604 \begin_inset Flex Code
21607 \begin_layout Plain Layout
21613 block, so only the CSS itself need be included.
21616 \begin_layout Description
21617 \begin_inset Flex Code
21620 \begin_layout Plain Layout
21627 \begin_inset Flex Code
21630 \begin_layout Plain Layout
21636 ] The tag to be used for the main label, replacing
21637 \begin_inset Flex Code
21640 \begin_layout Plain Layout
21646 in the examples above.
21647 The default depends upon the setting of
21648 \begin_inset Flex Code
21651 \begin_layout Plain Layout
21658 \begin_inset Flex Code
21661 \begin_layout Plain Layout
21667 is true, the default is
21668 \begin_inset Flex Code
21671 \begin_layout Plain Layout
21677 ; if it is false, the default is
21678 \begin_inset Flex Code
21681 \begin_layout Plain Layout
21690 \begin_layout Subsection
21694 \begin_layout Standard
21695 The XHTML output for floats too can be controlled by layout information.
21696 The output has the following form:
21699 \begin_layout LyX-Code
21701 \begin_inset Quotes erd
21705 \begin_inset Quotes erd
21711 \begin_layout LyX-Code
21712 Contents of the float.
21715 \begin_layout LyX-Code
21719 \begin_layout Standard
21720 The caption, if there is one, is a separate inset and will be output as
21722 Its appearance can be controlled via the InsetLayout for caption insets.
21726 \begin_layout Description
21727 \begin_inset Flex Code
21730 \begin_layout Plain Layout
21737 \begin_inset Flex Code
21740 \begin_layout Plain Layout
21746 ] Specifies attribute information to be output with the main tag.
21748 \begin_inset Quotes eld
21752 \begin_inset Flex Code
21755 \begin_layout Plain Layout
21756 class=`myfloat' onclick=`\SpecialChar \ldots{}
21763 \begin_inset Quotes erd
21767 By default, LyX will output
21768 \begin_inset Quotes eld
21772 \begin_inset Flex Code
21775 \begin_layout Plain Layout
21776 class=`float float-floattype'
21782 \begin_inset Quotes erd
21786 \begin_inset Flex Code
21789 \begin_layout Plain Layout
21795 is LyX's name for this type of float, as determined by the float declaration
21797 \begin_inset CommandInset ref
21799 reference "sub:Floats"
21803 ), though made lowercase and with non-alphanumeric characters converted
21804 to underscores, for example: float-table.
21807 \begin_layout Description
21808 \begin_inset Flex Code
21811 \begin_layout Plain Layout
21817 CSS style information to be included when this float is used.
21818 Note that this will automatically be wrapped in a layout-generated
21819 \begin_inset Flex Code
21822 \begin_layout Plain Layout
21828 block, so only the CSS itself need be included.
21831 \begin_layout Description
21832 \begin_inset Flex Code
21835 \begin_layout Plain Layout
21842 \begin_inset Flex Code
21845 \begin_layout Plain Layout
21851 ] The tag to be used for this float, replacing
21852 \begin_inset Quotes eld
21856 \begin_inset Flex Code
21859 \begin_layout Plain Layout
21866 \begin_inset Quotes erd
21869 in the example above.
21871 \begin_inset Flex Code
21874 \begin_layout Plain Layout
21880 and will rarely need changing.
21883 \begin_layout Subsection
21884 Bibliography formatting
21887 \begin_layout Standard
21888 The bibliography can be formatted using
21889 \begin_inset Flex Code
21892 \begin_layout Plain Layout
21900 \begin_inset CommandInset ref
21902 reference "sub:Citation-format-description"
21909 \begin_layout Subsection
21913 \begin_layout Standard
21914 We have several times mentioned that LyX will generate default CSS style
21915 rules for both insets and paragraph styles, based upon the other layout
21916 information that is provided.
21917 In this section, we shall say a word about which layout information LyX
21921 \begin_layout Standard
21922 At present, LyX auto-generates CSS only for font information, making use
21924 \begin_inset Flex Code
21927 \begin_layout Plain Layout
21934 \begin_inset Flex Code
21937 \begin_layout Plain Layout
21944 \begin_inset Flex Code
21947 \begin_layout Plain Layout
21954 \begin_inset Flex Code
21957 \begin_layout Plain Layout
21964 \begin_inset Flex Code
21967 \begin_layout Plain Layout
21975 \begin_inset CommandInset ref
21977 reference "sub:Font-description"
21981 .) The translation is mostly straightforward and obvious.
21983 \begin_inset Quotes eld
21987 \begin_inset Flex Code
21990 \begin_layout Plain Layout
21997 \begin_inset Quotes erd
22001 \begin_inset Quotes eld
22005 \begin_inset Flex Code
22008 \begin_layout Plain Layout
22009 font-family: sans-serif;
22015 \begin_inset Quotes erd
22019 The correspondence of LyX sizes and CSS sizes is a little less obvious
22020 but nonetheless intuitive.
22022 \begin_inset Flex Code
22025 \begin_layout Plain Layout
22032 \begin_inset Flex URL
22035 \begin_layout Plain Layout
22045 \begin_layout Chapter
22046 Including External Material
22049 \begin_layout Standard
22050 \begin_inset Box Shadowbox
22060 height_special "totalheight"
22063 \begin_layout Plain Layout
22064 WARNING: This portion of the documentation has not been updated for some
22066 We certainly hope that it is still accurate, but there are no guarantees.
22074 \begin_layout Standard
22075 The use of material from sources external to LyX is covered in detail in
22081 This part of the manual covers what needs to happen behind the scenes for
22082 new sorts of material to be included.
22085 \begin_layout Section
22089 \begin_layout Standard
22090 The external material feature is based on the concept of a
22095 A template is a specification of how LyX should interface with a certain
22097 As bundled, LyX comes with predefined templates for Xfig figures, various
22098 raster format images, chess diagrams, and LilyPond music notation.
22099 You can check the actual list by using the menu
22100 \begin_inset Flex MenuItem
22103 \begin_layout Plain Layout
22104 Insert\SpecialChar \menuseparator
22105 File\SpecialChar \menuseparator
22112 Furthermore, it is possible to roll your own template to support a specific
22114 Later we'll describe in more detail what is involved, and hopefully you
22115 will submit all the templates you create so we can include them in a later
22119 \begin_layout Standard
22120 Another basic idea of the external material feature is to distinguish between
22121 the original file that serves as a base for final material and the produced
22122 file that is included in your exported or printed document.
22123 For example, consider the case of a figure produced with
22124 \begin_inset Flex Code
22127 \begin_layout Plain Layout
22134 The Xfig application itself works on an original file with the
22135 \begin_inset Flex Code
22138 \begin_layout Plain Layout
22145 Within Xfig, you create and change your figure, and when you are done,
22147 \begin_inset Flex Code
22150 \begin_layout Plain Layout
22157 When you want to include the figure in your document, you invoke
22158 \begin_inset Flex Code
22161 \begin_layout Plain Layout
22167 in order to create a PostScript file that can readily be included in your
22170 \begin_inset Flex Code
22173 \begin_layout Plain Layout
22179 file is the original file, and the PostScript file is the produced file.
22182 \begin_layout Standard
22183 This distinction is important in order to allow updating of the material
22184 while you are in the process of writing the document.
22185 Furthermore, it provides us with the flexibility that is needed to support
22186 multiple export formats.
22187 For instance, in the case of a plain text file, it is not exactly an award-winn
22188 ing idea to include the figure as raw PostScript.
22189 Instead, you would either prefer to just include a reference to the figure
22190 or try to invoke some graphics to ASCII converter to make the final result
22191 look similar to the real graphics.
22192 The external material management allows you to do this, because it is parametri
22193 zed on the different export formats that LyX supports.
22196 \begin_layout Standard
22197 Besides supporting the production of different products according to the
22198 exported format, it supports tight integration with editing and viewing
22200 In the case of an Xfig figure, you are able to invoke Xfig on the original
22201 file with a single click from within the external material dialog in LyX,
22202 and also preview the produced PostScript file with Ghostview with another
22204 No more fiddling around with the command line and/or file browsers to locate
22205 and manipulate the original or produced files.
22206 In this way, you are finally able to take full advantage of the many different
22207 applications that are relevant to use when you write your documents, and
22208 ultimately be more productive.
22211 \begin_layout Section
22212 The external template configuration file
22215 \begin_layout Standard
22216 It is relatively easy to add custom external template definitions to LyX.
22217 However, be aware that doing this in an careless manner most probably
22221 introduce an easily exploitable security hole.
22222 So before you do this, please read the discussion about security in section
22224 \begin_inset CommandInset ref
22226 reference "sec:Security-discussion"
22233 \begin_layout Standard
22234 Having said that, we encourage you to submit any interesting templates that
22239 \begin_layout Standard
22240 The external templates are defined in the
22241 \begin_inset Flex Code
22244 \begin_layout Plain Layout
22245 LyXDir/lib/external_templates
22251 You can place your own version in
22252 \begin_inset Flex Code
22255 \begin_layout Plain Layout
22256 UserDir/external_templates
22264 \begin_layout Standard
22265 A typical template looks like this:
22268 \begin_layout LyX-Code
22272 \begin_layout LyX-Code
22273 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22276 \begin_layout LyX-Code
22280 \begin_layout LyX-Code
22284 \begin_layout LyX-Code
22288 \begin_layout LyX-Code
22292 \begin_layout LyX-Code
22296 \begin_layout LyX-Code
22297 AutomaticProduction true
22300 \begin_layout LyX-Code
22304 \begin_layout LyX-Code
22308 \begin_layout LyX-Code
22312 \begin_layout LyX-Code
22313 TransformCommand Rotate RotationLatexCommand
22316 \begin_layout LyX-Code
22317 TransformCommand Resize ResizeLatexCommand
22320 \begin_layout LyX-Code
22321 Product "$$RotateFront$$ResizeFront
22324 \begin_layout LyX-Code
22329 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22332 \begin_layout LyX-Code
22333 $$ResizeBack$$RotateBack"
22336 \begin_layout LyX-Code
22340 \begin_layout LyX-Code
22341 UpdateResult "$$AbsPath$$Basename.pstex_t"
22344 \begin_layout LyX-Code
22345 Requirement "graphicx"
22348 \begin_layout LyX-Code
22349 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22352 \begin_layout LyX-Code
22353 ReferencedFile latex "$$AbsPath$$Basename.eps"
22356 \begin_layout LyX-Code
22357 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22360 \begin_layout LyX-Code
22364 \begin_layout LyX-Code
22368 \begin_layout LyX-Code
22369 TransformCommand Rotate RotationLatexCommand
22372 \begin_layout LyX-Code
22373 TransformCommand Resize ResizeLatexCommand
22376 \begin_layout LyX-Code
22377 Product "$$RotateFront$$ResizeFront
22380 \begin_layout LyX-Code
22385 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22388 \begin_layout LyX-Code
22389 $$ResizeBack$$RotateBack"
22392 \begin_layout LyX-Code
22393 UpdateFormat pdftex
22396 \begin_layout LyX-Code
22397 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22400 \begin_layout LyX-Code
22401 Requirement "graphicx"
22404 \begin_layout LyX-Code
22405 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22408 \begin_layout LyX-Code
22409 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22412 \begin_layout LyX-Code
22416 \begin_layout LyX-Code
22420 \begin_layout LyX-Code
22421 Product "$$Contents(
22423 "$$AbsPath$$Basename.asc
22428 \begin_layout LyX-Code
22429 UpdateFormat asciixfig
22432 \begin_layout LyX-Code
22433 UpdateResult "$$AbsPath$$Basename.asc"
22436 \begin_layout LyX-Code
22440 \begin_layout LyX-Code
22444 \begin_layout LyX-Code
22445 Product "<graphic fileref=
22447 "$$AbsOrRelPathMaster$$Basename.eps
22452 \begin_layout LyX-Code
22456 \begin_layout LyX-Code
22460 \begin_layout LyX-Code
22461 UpdateResult "$$AbsPath$$Basename.eps"
22464 \begin_layout LyX-Code
22465 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22468 \begin_layout LyX-Code
22469 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22472 \begin_layout LyX-Code
22476 \begin_layout LyX-Code
22477 Product "[XFig: $$FName]"
22480 \begin_layout LyX-Code
22484 \begin_layout LyX-Code
22488 \begin_layout Standard
22489 As you can see, the template is enclosed in
22490 \begin_inset Flex Code
22493 \begin_layout Plain Layout
22499 \SpecialChar \ldots{}
22501 \begin_inset Flex Code
22504 \begin_layout Plain Layout
22511 It contains a header specifying some general settings and, for each supported
22512 primary document file format, a section
22513 \begin_inset Flex Code
22516 \begin_layout Plain Layout
22522 \SpecialChar \ldots{}
22524 \begin_inset Flex Code
22527 \begin_layout Plain Layout
22536 \begin_layout Subsection
22537 The template header
22540 \begin_layout Description
22541 \begin_inset Flex Code
22544 \begin_layout Plain Layout
22545 AutomaticProduction
22546 \begin_inset space ~
22554 Whether the file represented by the template must be generated by LyX.
22555 This command must occur exactly once.
22558 \begin_layout Description
22559 \begin_inset Flex Code
22562 \begin_layout Plain Layout
22564 \begin_inset space ~
22572 A glob pattern that is used in the file dialog to filter out the desired
22574 If there is more than one possible file extension (e.
22575 \begin_inset space \thinspace{}
22579 \begin_inset space \space{}
22583 \begin_inset Flex Code
22586 \begin_layout Plain Layout
22593 \begin_inset Flex Code
22596 \begin_layout Plain Layout
22602 ), use something like
22603 \begin_inset Flex Code
22606 \begin_layout Plain Layout
22613 This command must occur exactly once.
22616 \begin_layout Description
22617 \begin_inset Flex Code
22620 \begin_layout Plain Layout
22622 \begin_inset space ~
22630 The text that is displayed on the button.
22631 This command must occur exactly once.
22634 \begin_layout Description
22635 \begin_inset Flex Code
22638 \begin_layout Plain Layout
22640 \begin_inset space ~
22644 \begin_inset space ~
22652 The help text that is used in the External dialog.
22653 Provide enough information to explain to the user just what the template
22654 can provide him with.
22655 This command must occur exactly once.
22658 \begin_layout Description
22659 \begin_inset Flex Code
22662 \begin_layout Plain Layout
22664 \begin_inset space ~
22672 The file format of the original file.
22673 This must be the name of a format that is known to LyX (see section
22674 \begin_inset space ~
22678 \begin_inset CommandInset ref
22680 reference "sec:Formats"
22686 \begin_inset Quotes eld
22690 \begin_inset Flex Code
22693 \begin_layout Plain Layout
22700 \begin_inset Quotes erd
22703 if the template can handle original files of more than one format.
22704 LyX will attempt to interrogate the file itself in order to deduce its
22705 format in this case.
22706 This command must occur exactly once.
22709 \begin_layout Description
22710 \begin_inset Flex Code
22713 \begin_layout Plain Layout
22715 \begin_inset space ~
22723 A unique name for the template.
22724 It must not contain substitution macros (see below).
22727 \begin_layout Description
22728 \begin_inset Flex Code
22731 \begin_layout Plain Layout
22733 \begin_inset space ~
22736 Rotate|Resize|Clip|Extra
22741 This command specifies which transformations are supported by this template.
22742 It may occur zero or more times.
22743 This command enables the corresponding tabs in the external dialog.
22745 \begin_inset Flex Code
22748 \begin_layout Plain Layout
22754 command must have either a corresponding
22755 \begin_inset Flex Code
22758 \begin_layout Plain Layout
22765 \begin_inset Flex Code
22768 \begin_layout Plain Layout
22775 \begin_inset Flex Code
22778 \begin_layout Plain Layout
22785 Otherwise the transformation will not be supported by that format.
22788 \begin_layout Subsection
22792 \begin_layout Description
22793 \begin_inset Flex Code
22796 \begin_layout Plain Layout
22798 \begin_inset space ~
22801 LaTeX|PDFLaTeX|PlainText|DocBook
22806 The primary document file format that this format definition is for.
22807 Not every template has a sensible representation in all document file formats.
22808 Please define nevertheless a
22809 \begin_inset Flex Code
22812 \begin_layout Plain Layout
22818 section for all templates.
22819 Use a dummy text when no representation is available.
22820 Then you can at least see a reference to the external material in the exported
22824 \begin_layout Description
22825 \begin_inset Flex Code
22828 \begin_layout Plain Layout
22830 \begin_inset space ~
22834 \begin_inset space ~
22842 This command defines an additional macro
22843 \begin_inset Flex Code
22846 \begin_layout Plain Layout
22852 for substitution in
22853 \begin_inset Flex Code
22856 \begin_layout Plain Layout
22864 \begin_inset Flex Code
22867 \begin_layout Plain Layout
22873 itself may contain substitution macros.
22874 The advantage over using
22875 \begin_inset Flex Code
22878 \begin_layout Plain Layout
22885 \begin_inset Flex Code
22888 \begin_layout Plain Layout
22894 is that the substituted value of
22895 \begin_inset Flex Code
22898 \begin_layout Plain Layout
22904 is sanitized so that it is a valid optional argument in the document format.
22905 This command may occur zero or more times.
22908 \begin_layout Description
22909 \begin_inset Flex Code
22912 \begin_layout Plain Layout
22914 \begin_inset space ~
22922 The text that is inserted in the exported document.
22923 This is actually the most important command and can be quite complex.
22924 This command must occur exactly once.
22927 \begin_layout Description
22928 \begin_inset Flex Code
22931 \begin_layout Plain Layout
22933 \begin_inset space ~
22941 This command specifies a preamble snippet that will be included in the
22943 It has to be defined using
22944 \begin_inset Flex Code
22947 \begin_layout Plain Layout
22953 \SpecialChar \ldots{}
22955 \begin_inset Flex Code
22958 \begin_layout Plain Layout
22965 This command may occur zero or more times.
22968 \begin_layout Description
22969 \begin_inset Flex Code
22972 \begin_layout Plain Layout
22974 \begin_inset space ~
22978 \begin_inset space ~
22986 This command denotes files that are created by the conversion process and
22987 are needed for a particular export format.
22988 If the filename is relative, it is interpreted relative to the master document.
22989 This command may be given zero or more times.
22992 \begin_layout Description
22993 \begin_inset Flex Code
22996 \begin_layout Plain Layout
22998 \begin_inset space ~
23006 The name of a required LaTeX package.
23007 The package is included via
23008 \begin_inset Flex Code
23011 \begin_layout Plain Layout
23019 in the LaTeX preamble.
23020 This command may occur zero or more times.
23023 \begin_layout Description
23024 \begin_inset Flex Code
23027 \begin_layout Plain Layout
23029 \begin_inset space ~
23033 \begin_inset space ~
23036 RotationLatexCommand
23041 This command specifies that the built in LaTeX command should be used for
23043 This command may occur once or not at all.
23046 \begin_layout Description
23047 \begin_inset Flex Code
23050 \begin_layout Plain Layout
23052 \begin_inset space ~
23056 \begin_inset space ~
23064 This command specifies that the built in LaTeX command should be used for
23066 This command may occur once or not at all.
23069 \begin_layout Description
23070 \begin_inset Flex Code
23073 \begin_layout Plain Layout
23075 \begin_inset space ~
23079 \begin_inset space ~
23082 RotationLatexOption
23087 This command specifies that rotation is done via an optional argument.
23088 This command may occur once or not at all.
23091 \begin_layout Description
23092 \begin_inset Flex Code
23095 \begin_layout Plain Layout
23097 \begin_inset space ~
23101 \begin_inset space ~
23109 This command specifies that resizing is done via an optional argument.
23110 This command may occur once or not at all.
23113 \begin_layout Description
23114 \begin_inset Flex Code
23117 \begin_layout Plain Layout
23119 \begin_inset space ~
23123 \begin_inset space ~
23131 This command specifies that clipping is done via an optional argument.
23132 This command may occur once or not at all.
23135 \begin_layout Description
23136 \begin_inset Flex Code
23139 \begin_layout Plain Layout
23141 \begin_inset space ~
23145 \begin_inset space ~
23153 This command specifies that an extra optional argument is used.
23154 This command may occur once or not at all.
23157 \begin_layout Description
23158 \begin_inset Flex Code
23161 \begin_layout Plain Layout
23163 \begin_inset space ~
23171 The file format of the converted file.
23172 This must be the name of a format that is known to LyX (see the
23173 \begin_inset Flex MenuItem
23176 \begin_layout Plain Layout
23181 ools\SpecialChar \menuseparator
23186 references\SpecialChar \menuseparator
23187 File Handling\SpecialChar \menuseparator
23194 This command must occur exactly once.
23197 \begin_layout Description
23198 \begin_inset Flex Code
23201 \begin_layout Plain Layout
23203 \begin_inset space ~
23211 The file name of the converted file.
23212 The file name must be absolute.
23213 This command must occur exactly once.
23216 \begin_layout Subsection
23217 Preamble definitions
23220 \begin_layout Standard
23221 The external template configuration file may contain additional preamble
23222 definitions enclosed by
23223 \begin_inset Flex Code
23226 \begin_layout Plain Layout
23232 \SpecialChar \ldots{}
23234 \begin_inset Flex Code
23237 \begin_layout Plain Layout
23244 They can be used by the templates in the
23245 \begin_inset Flex Code
23248 \begin_layout Plain Layout
23257 \begin_layout Section
23258 The substitution mechanism
23261 \begin_layout Standard
23262 When the external material facility invokes an external program, it is done
23263 on the basis of a command defined in the template configuration file.
23264 These commands can contain various macros that are expanded before execution.
23265 Execution always take place in the directory of the containing document.
23268 \begin_layout Standard
23269 Also, whenever external material is to be displayed, the name will be produced
23270 by the substitution mechanism, and most other commands in the template
23271 definition support substitution as well.
23274 \begin_layout Standard
23275 The available macros are the following:
23278 \begin_layout Description
23279 \begin_inset Flex Code
23282 \begin_layout Plain Layout
23283 $$AbsOrRelPathMaster
23288 The file path, absolute or relative to the master LyX document.
23291 \begin_layout Description
23292 \begin_inset Flex Code
23295 \begin_layout Plain Layout
23296 $$AbsOrRelPathParent
23301 The file path, absolute or relative to the LyX document.
23304 \begin_layout Description
23305 \begin_inset Flex Code
23308 \begin_layout Plain Layout
23314 The absolute file path.
23317 \begin_layout Description
23318 \begin_inset Flex Code
23321 \begin_layout Plain Layout
23327 The filename without path and without the extension.
23330 \begin_layout Description
23331 \begin_inset Flex Code
23334 \begin_layout Plain Layout
23336 \begin_inset Quotes eld
23340 \begin_inset Quotes erd
23348 This macro will expand to the contents of the file with the name
23349 \begin_inset Flex Code
23352 \begin_layout Plain Layout
23361 \begin_layout Description
23362 \begin_inset Flex Code
23365 \begin_layout Plain Layout
23371 The file extension (including the dot).
23374 \begin_layout Description
23375 \begin_inset Flex Code
23378 \begin_layout Plain Layout
23384 The filename of the file specified in the external material dialog.
23385 This is either an absolute name, or it is relative to the LyX document.
23388 \begin_layout Description
23389 \begin_inset Flex Code
23392 \begin_layout Plain Layout
23399 \begin_inset Flex Code
23402 \begin_layout Plain Layout
23408 (absolute name or relative to the LyX document).
23411 \begin_layout Description
23412 \begin_inset Flex Code
23415 \begin_layout Plain Layout
23421 The file path, relative to the master LyX document.
23424 \begin_layout Description
23425 \begin_inset Flex Code
23428 \begin_layout Plain Layout
23434 The file path, relative to the LyX document.
23437 \begin_layout Description
23438 \begin_inset Flex Code
23441 \begin_layout Plain Layout
23447 This macro will expand to the absolute path of the system directory.
23448 This is typically used to point to the various helper scripts that are
23452 \begin_layout Description
23453 \begin_inset Flex Code
23456 \begin_layout Plain Layout
23462 A name and full path to a temporary file which will be automatically deleted
23463 whenever the containing document is closed, or the external material insertion
23467 \begin_layout Standard
23468 All path macros contain a trailing directory separator, so you can construct
23470 \begin_inset space \thinspace{}
23474 \begin_inset space \space{}
23477 the absolute filename with
23478 \begin_inset Flex Code
23481 \begin_layout Plain Layout
23482 $$AbsPath$$Basename$$Extension
23490 \begin_layout Standard
23491 The macros above are substituted in all commands unless otherwise noted.
23493 \begin_inset Flex Code
23496 \begin_layout Plain Layout
23502 supports additionally the following substitutions if they are enabled by
23504 \begin_inset Flex Code
23507 \begin_layout Plain Layout
23514 \begin_inset Flex Code
23517 \begin_layout Plain Layout
23526 \begin_layout Description
23527 \begin_inset Flex Code
23530 \begin_layout Plain Layout
23536 The front part of the resize command.
23539 \begin_layout Description
23540 \begin_inset Flex Code
23543 \begin_layout Plain Layout
23549 The back part of the resize command.
23552 \begin_layout Description
23553 \begin_inset Flex Code
23556 \begin_layout Plain Layout
23562 The front part of the rotation command.
23565 \begin_layout Description
23566 \begin_inset Flex Code
23569 \begin_layout Plain Layout
23575 The back part of the rotation command.
23578 \begin_layout Standard
23579 The value string of the
23580 \begin_inset Flex Code
23583 \begin_layout Plain Layout
23589 command supports additionally the following substitutions if they are enabled
23591 \begin_inset Flex Code
23594 \begin_layout Plain Layout
23601 \begin_inset Flex Code
23604 \begin_layout Plain Layout
23613 \begin_layout Description
23614 \begin_inset Flex Code
23617 \begin_layout Plain Layout
23626 \begin_layout Description
23627 \begin_inset Flex Code
23630 \begin_layout Plain Layout
23639 \begin_layout Description
23640 \begin_inset Flex Code
23643 \begin_layout Plain Layout
23652 \begin_layout Description
23653 \begin_inset Flex Code
23656 \begin_layout Plain Layout
23662 The rotation option.
23665 \begin_layout Standard
23666 You may ask why there are so many path macros.
23667 There are mainly two reasons:
23670 \begin_layout Enumerate
23671 Relative and absolute file names should remain relative or absolute, respectivel
23673 Users may have reasons to prefer either form.
23674 Relative names are useful for portable documents that should work on different
23675 machines, for example.
23676 Absolute names may be required by some programs.
23679 \begin_layout Enumerate
23680 LaTeX treats relative file names differently than LyX and other programs
23681 in nested included files.
23682 For LyX, a relative file name is always relative to the document that contains
23684 For LaTeX, it is always relative to the master document.
23685 These two definitions are identical if you have only one document, but
23686 differ if you have a master document that includes part documents.
23687 That means that relative filenames must be transformed when presented to
23689 Fortunately LyX does this automatically for you if you choose the right
23693 \begin_layout Standard
23694 So which path macro should be used in new template definitions? The rule
23698 \begin_layout Itemize
23700 \begin_inset Flex Code
23703 \begin_layout Plain Layout
23709 if an absolute path is required.
23712 \begin_layout Itemize
23714 \begin_inset Flex Code
23717 \begin_layout Plain Layout
23718 $$AbsOrRelPathMaster
23723 if the substituted string is some kind of LaTeX input.
23726 \begin_layout Itemize
23728 \begin_inset Flex Code
23731 \begin_layout Plain Layout
23732 $$AbsOrRelPathParent
23737 in order to preserve the user's choice.
23740 \begin_layout Standard
23741 There are special cases where this rule does not work and e.
23742 \begin_inset space \thinspace{}
23746 \begin_inset space \space{}
23749 relative names are needed, but normally it will work just fine.
23750 One example for such a case is the command
23751 \begin_inset Flex Code
23754 \begin_layout Plain Layout
23755 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23760 in the XFig template above: We can't use the absolute name because the
23762 \begin_inset Flex Code
23765 \begin_layout Plain Layout
23771 files needs the relative name in order to rewrite the file content.
23774 \begin_layout Section
23775 Security discussion
23776 \begin_inset CommandInset label
23778 name "sec:Security-discussion"
23785 \begin_layout Standard
23786 The external material feature interfaces with a lot of external programs
23787 and does so automatically, so we have to consider the security implications
23789 In particular, since you have the option of including your own filenames
23790 and/or parameter strings and those are expanded into a command, it seems
23791 that it would be possible to create a malicious document which executes
23792 arbitrary commands when a user views or prints the document.
23793 This is something we definitely want to avoid.
23796 \begin_layout Standard
23797 However, since the external program commands are specified in the template
23798 configuration file only, there are no security issues if LyX is properly
23799 configured with safe templates only.
23800 This is so because the external programs are invoked with the
23801 \begin_inset Flex Code
23804 \begin_layout Plain Layout
23810 -system call rather than the
23811 \begin_inset Flex Code
23814 \begin_layout Plain Layout
23820 system-call, so it's not possible to execute arbitrary commands from the
23821 filename or parameter section via the shell.
23824 \begin_layout Standard
23825 This also implies that you are restricted in what command strings you can
23826 use in the external material templates.
23827 In particular, pipes and redirection are not readily available.
23828 This has to be so if LyX should remain safe.
23829 If you want to use some of the shell features, you should write a safe
23830 script to do this in a controlled manner, and then invoke the script from
23831 the command string.
23835 \begin_layout Standard
23836 It is possible to design a template that interacts directly with the shell,
23837 but since this would allow a malicious user to execute arbitrary commands
23838 by writing clever filenames and/or parameters, we generally recommend that
23839 you only use safe scripts that work with the
23840 \begin_inset Flex Code
23843 \begin_layout Plain Layout
23849 system call in a controlled manner.
23850 Of course, for use in a controlled environment, it can be tempting to just
23851 fall back to use ordinary shell scripts.
23852 If you do so, be aware that you
23856 provide an easily exploitable security hole in your system.
23857 Of course it stands to reason that such unsafe templates will never be
23858 included in the standard LyX distribution, although we do encourage people
23859 to submit new templates in the open source tradition.
23860 But LyX as shipped from the official distribution channels will never have
23864 \begin_layout Standard
23865 Including external material provides a lot of power, and you have to be
23866 careful not to introduce security hazards with this power.
23867 A subtle error in a single line in an innocent looking script can open
23868 the door to huge security problems.
23869 So if you do not fully understand the issues, we recommend that you consult
23870 a knowledgeable security professional or the LyX development team if you
23871 have any questions about whether a given template is safe or not.
23872 And do this before you use it in an uncontrolled environment.
23875 \begin_layout Chapter
23877 List of functions to be used in layouts
23878 \begin_inset CommandInset label
23880 name "chap:List-of-functions"
23887 \begin_layout Standard
23889 \begin_inset Tabular
23890 <lyxtabular version="3" rows="10" columns="6">
23891 <features rotate="0" tabularvalignment="middle">
23892 <column alignment="left" valignment="top" width="14col%">
23893 <column alignment="left" valignment="top" width="14col%">
23894 <column alignment="left" valignment="top" width="14col%">
23895 <column alignment="left" valignment="top" width="14col%">
23896 <column alignment="left" valignment="top" width="14col%">
23897 <column alignment="left" valignment="top" width="14col%">
23899 <cell alignment="left" valignment="top" usebox="none">
23902 \begin_layout Plain Layout
23908 <cell alignment="left" valignment="top" usebox="none">
23911 \begin_layout Plain Layout
23917 <cell alignment="left" valignment="top" usebox="none">
23920 \begin_layout Plain Layout
23926 <cell alignment="left" valignment="top" usebox="none">
23929 \begin_layout Plain Layout
23935 <cell alignment="left" valignment="top" usebox="none">
23938 \begin_layout Plain Layout
23944 <cell alignment="left" valignment="top" usebox="none">
23947 \begin_layout Plain Layout
23955 <cell alignment="left" valignment="top" usebox="none">
23958 \begin_layout Plain Layout
23964 <cell alignment="left" valignment="top" usebox="none">
23967 \begin_layout Plain Layout
23973 <cell alignment="left" valignment="top" usebox="none">
23976 \begin_layout Plain Layout
23982 <cell alignment="left" valignment="top" usebox="none">
23985 \begin_layout Plain Layout
23991 <cell alignment="left" valignment="top" usebox="none">
23994 \begin_layout Plain Layout
24000 <cell alignment="left" valignment="top" usebox="none">
24003 \begin_layout Plain Layout
24011 <cell alignment="left" valignment="top" usebox="none">
24014 \begin_layout Plain Layout
24020 <cell alignment="left" valignment="top" usebox="none">
24023 \begin_layout Plain Layout
24029 <cell alignment="left" valignment="top" usebox="none">
24032 \begin_layout Plain Layout
24038 <cell alignment="left" valignment="top" usebox="none">
24041 \begin_layout Plain Layout
24047 <cell alignment="left" valignment="top" usebox="none">
24050 \begin_layout Plain Layout
24056 <cell alignment="left" valignment="top" usebox="none">
24059 \begin_layout Plain Layout
24067 <cell alignment="left" valignment="top" usebox="none">
24070 \begin_layout Plain Layout
24076 <cell alignment="left" valignment="top" usebox="none">
24079 \begin_layout Plain Layout
24085 <cell alignment="left" valignment="top" usebox="none">
24088 \begin_layout Plain Layout
24094 <cell alignment="left" valignment="top" usebox="none">
24097 \begin_layout Plain Layout
24103 <cell alignment="left" valignment="top" usebox="none">
24106 \begin_layout Plain Layout
24112 <cell alignment="left" valignment="top" usebox="none">
24115 \begin_layout Plain Layout
24123 <cell alignment="left" valignment="top" usebox="none">
24126 \begin_layout Plain Layout
24132 <cell alignment="left" valignment="top" usebox="none">
24135 \begin_layout Plain Layout
24141 <cell alignment="left" valignment="top" usebox="none">
24144 \begin_layout Plain Layout
24150 <cell alignment="left" valignment="top" usebox="none">
24153 \begin_layout Plain Layout
24159 <cell alignment="left" valignment="top" usebox="none">
24162 \begin_layout Plain Layout
24168 <cell alignment="left" valignment="top" usebox="none">
24171 \begin_layout Plain Layout
24179 <cell alignment="left" valignment="top" usebox="none">
24182 \begin_layout Plain Layout
24188 <cell alignment="left" valignment="top" usebox="none">
24191 \begin_layout Plain Layout
24197 <cell alignment="left" valignment="top" usebox="none">
24200 \begin_layout Plain Layout
24206 <cell alignment="left" valignment="top" usebox="none">
24209 \begin_layout Plain Layout
24215 <cell alignment="left" valignment="top" usebox="none">
24218 \begin_layout Plain Layout
24224 <cell alignment="left" valignment="top" usebox="none">
24227 \begin_layout Plain Layout
24235 <cell alignment="left" valignment="top" usebox="none">
24238 \begin_layout Plain Layout
24244 <cell alignment="left" valignment="top" usebox="none">
24247 \begin_layout Plain Layout
24253 <cell alignment="left" valignment="top" usebox="none">
24256 \begin_layout Plain Layout
24262 <cell alignment="left" valignment="top" usebox="none">
24265 \begin_layout Plain Layout
24271 <cell alignment="left" valignment="top" usebox="none">
24274 \begin_layout Plain Layout
24280 <cell alignment="left" valignment="top" usebox="none">
24283 \begin_layout Plain Layout
24291 <cell alignment="left" valignment="top" usebox="none">
24294 \begin_layout Plain Layout
24300 <cell alignment="left" valignment="top" usebox="none">
24303 \begin_layout Plain Layout
24309 <cell alignment="left" valignment="top" usebox="none">
24312 \begin_layout Plain Layout
24318 <cell alignment="left" valignment="top" usebox="none">
24321 \begin_layout Plain Layout
24327 <cell alignment="left" valignment="top" usebox="none">
24330 \begin_layout Plain Layout
24336 <cell alignment="left" valignment="top" usebox="none">
24339 \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="left" valignment="top" usebox="none">
24368 \begin_layout Plain Layout
24374 <cell alignment="left" valignment="top" usebox="none">
24377 \begin_layout Plain Layout
24383 <cell alignment="left" valignment="top" usebox="none">
24386 \begin_layout Plain Layout
24392 <cell alignment="left" 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="left" valignment="top" usebox="none">
24442 \begin_layout Plain Layout
24448 <cell alignment="left" valignment="top" usebox="none">
24451 \begin_layout Plain Layout
24465 \begin_layout Standard
24467 \begin_inset Tabular
24468 <lyxtabular version="3" rows="10" columns="6">
24469 <features rotate="0" tabularvalignment="middle">
24470 <column alignment="left" valignment="top" width="14col%">
24471 <column alignment="left" valignment="top" width="14col%">
24472 <column alignment="left" valignment="top" width="14col%">
24473 <column alignment="left" valignment="top" width="14col%">
24474 <column alignment="left" valignment="top" width="14col%">
24475 <column alignment="left" valignment="top" width="14col%">
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="left" valignment="top" usebox="none">
24516 \begin_layout Plain Layout
24522 <cell alignment="left" valignment="top" usebox="none">
24525 \begin_layout Plain Layout
24533 <cell alignment="left" valignment="top" usebox="none">
24536 \begin_layout Plain Layout
24542 <cell alignment="left" valignment="top" usebox="none">
24545 \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
24589 <cell alignment="left" valignment="top" usebox="none">
24592 \begin_layout Plain Layout
24598 <cell alignment="left" valignment="top" usebox="none">
24601 \begin_layout Plain Layout
24607 <cell alignment="left" valignment="top" usebox="none">
24610 \begin_layout Plain Layout
24616 <cell alignment="left" valignment="top" usebox="none">
24619 \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
24645 <cell alignment="left" valignment="top" usebox="none">
24648 \begin_layout Plain Layout
24654 <cell alignment="left" valignment="top" usebox="none">
24657 \begin_layout Plain Layout
24663 <cell alignment="left" valignment="top" usebox="none">
24666 \begin_layout Plain Layout
24672 <cell alignment="left" valignment="top" usebox="none">
24675 \begin_layout Plain Layout
24681 <cell alignment="left" valignment="top" usebox="none">
24684 \begin_layout Plain Layout
24690 <cell alignment="left" valignment="top" usebox="none">
24693 \begin_layout Plain Layout
24701 <cell alignment="left" valignment="top" usebox="none">
24704 \begin_layout Plain Layout
24710 <cell alignment="left" valignment="top" usebox="none">
24713 \begin_layout Plain Layout
24719 <cell alignment="left" valignment="top" usebox="none">
24722 \begin_layout Plain Layout
24728 <cell alignment="left" valignment="top" usebox="none">
24731 \begin_layout Plain Layout
24737 <cell alignment="left" valignment="top" usebox="none">
24740 \begin_layout Plain Layout
24746 <cell alignment="left" valignment="top" usebox="none">
24749 \begin_layout Plain Layout
24757 <cell alignment="left" valignment="top" usebox="none">
24760 \begin_layout Plain Layout
24766 <cell alignment="left" valignment="top" usebox="none">
24769 \begin_layout Plain Layout
24775 <cell alignment="left" valignment="top" usebox="none">
24778 \begin_layout Plain Layout
24784 <cell alignment="left" valignment="top" usebox="none">
24787 \begin_layout Plain Layout
24793 <cell alignment="left" valignment="top" usebox="none">
24796 \begin_layout Plain Layout
24802 <cell alignment="left" valignment="top" usebox="none">
24805 \begin_layout Plain Layout
24813 <cell alignment="left" valignment="top" usebox="none">
24816 \begin_layout Plain Layout
24822 <cell alignment="left" valignment="top" usebox="none">
24825 \begin_layout Plain Layout
24831 <cell alignment="left" valignment="top" usebox="none">
24834 \begin_layout Plain Layout
24840 <cell alignment="left" valignment="top" usebox="none">
24843 \begin_layout Plain Layout
24849 <cell alignment="left" valignment="top" usebox="none">
24852 \begin_layout Plain Layout
24858 <cell alignment="left" valignment="top" usebox="none">
24861 \begin_layout Plain Layout
24869 <cell alignment="left" valignment="top" usebox="none">
24872 \begin_layout Plain Layout
24878 <cell alignment="left" valignment="top" usebox="none">
24881 \begin_layout Plain Layout
24887 <cell alignment="left" valignment="top" usebox="none">
24890 \begin_layout Plain Layout
24896 <cell alignment="left" valignment="top" usebox="none">
24899 \begin_layout Plain Layout
24905 <cell alignment="left" valignment="top" usebox="none">
24908 \begin_layout Plain Layout
24914 <cell alignment="left" valignment="top" usebox="none">
24917 \begin_layout Plain Layout
24925 <cell alignment="left" valignment="top" usebox="none">
24928 \begin_layout Plain Layout
24934 <cell alignment="left" valignment="top" usebox="none">
24937 \begin_layout Plain Layout
24943 <cell alignment="left" valignment="top" usebox="none">
24946 \begin_layout Plain Layout
24952 <cell alignment="left" valignment="top" usebox="none">
24955 \begin_layout Plain Layout
24961 <cell alignment="left" valignment="top" usebox="none">
24964 \begin_layout Plain Layout
24970 <cell alignment="left" valignment="top" usebox="none">
24973 \begin_layout Plain Layout
24981 <cell alignment="left" valignment="top" usebox="none">
24984 \begin_layout Plain Layout
24990 <cell alignment="left" valignment="top" usebox="none">
24993 \begin_layout Plain Layout
24999 <cell alignment="left" valignment="top" usebox="none">
25002 \begin_layout Plain Layout
25008 <cell alignment="left" valignment="top" usebox="none">
25011 \begin_layout Plain Layout
25017 <cell alignment="left" valignment="top" usebox="none">
25020 \begin_layout Plain Layout
25026 <cell alignment="left" valignment="top" usebox="none">
25029 \begin_layout Plain Layout
25043 \begin_layout Chapter
25044 List of supported LyX functions to be used in layouts
25047 \begin_layout Standard
25049 \begin_inset Tabular
25050 <lyxtabular version="3" rows="10" columns="8">
25051 <features rotate="0" tabularvalignment="middle">
25052 <column alignment="left" valignment="top" width="0">
25053 <column alignment="left" valignment="top" width="0">
25054 <column alignment="left" valignment="top" width="0">
25055 <column alignment="left" valignment="top" width="0">
25056 <column alignment="left" valignment="top" width="0">
25057 <column alignment="left" valignment="top" width="0">
25058 <column alignment="left" valignment="top" width="0">
25059 <column alignment="left" valignment="top" width="0">
25061 <cell alignment="left" valignment="top" usebox="none">
25064 \begin_layout Plain Layout
25070 <cell alignment="left" valignment="top" usebox="none">
25073 \begin_layout Plain Layout
25079 <cell alignment="left" valignment="top" usebox="none">
25082 \begin_layout Plain Layout
25088 <cell alignment="left" valignment="top" usebox="none">
25091 \begin_layout Plain Layout
25097 <cell alignment="center" valignment="top" usebox="none">
25100 \begin_layout Plain Layout
25106 <cell alignment="center" valignment="top" usebox="none">
25109 \begin_layout Plain Layout
25115 <cell alignment="center" valignment="top" usebox="none">
25118 \begin_layout Plain Layout
25124 <cell alignment="center" valignment="top" usebox="none">
25127 \begin_layout Plain Layout
25135 <cell alignment="left" valignment="top" usebox="none">
25138 \begin_layout Plain Layout
25144 <cell alignment="left" valignment="top" usebox="none">
25147 \begin_layout Plain Layout
25153 <cell alignment="left" valignment="top" usebox="none">
25156 \begin_layout Plain Layout
25162 <cell alignment="left" valignment="top" usebox="none">
25165 \begin_layout Plain Layout
25171 <cell alignment="center" valignment="top" usebox="none">
25174 \begin_layout Plain Layout
25180 <cell alignment="center" valignment="top" usebox="none">
25183 \begin_layout Plain Layout
25189 <cell alignment="center" valignment="top" usebox="none">
25192 \begin_layout Plain Layout
25198 <cell alignment="center" valignment="top" usebox="none">
25201 \begin_layout Plain Layout
25209 <cell alignment="left" valignment="top" usebox="none">
25212 \begin_layout Plain Layout
25218 <cell alignment="left" valignment="top" usebox="none">
25221 \begin_layout Plain Layout
25227 <cell alignment="left" valignment="top" usebox="none">
25230 \begin_layout Plain Layout
25236 <cell alignment="left" valignment="top" usebox="none">
25239 \begin_layout Plain Layout
25245 <cell alignment="center" valignment="top" usebox="none">
25248 \begin_layout Plain Layout
25254 <cell alignment="center" valignment="top" usebox="none">
25257 \begin_layout Plain Layout
25263 <cell alignment="center" valignment="top" usebox="none">
25266 \begin_layout Plain Layout
25272 <cell alignment="center" valignment="top" usebox="none">
25275 \begin_layout Plain Layout
25283 <cell alignment="left" valignment="top" usebox="none">
25286 \begin_layout Plain Layout
25292 <cell alignment="left" valignment="top" usebox="none">
25295 \begin_layout Plain Layout
25301 <cell alignment="left" valignment="top" usebox="none">
25304 \begin_layout Plain Layout
25310 <cell alignment="left" valignment="top" usebox="none">
25313 \begin_layout Plain Layout
25319 <cell alignment="center" valignment="top" usebox="none">
25322 \begin_layout Plain Layout
25328 <cell alignment="center" valignment="top" usebox="none">
25331 \begin_layout Plain Layout
25337 <cell alignment="center" valignment="top" usebox="none">
25340 \begin_layout Plain Layout
25346 <cell alignment="center" valignment="top" usebox="none">
25349 \begin_layout Plain Layout
25357 <cell alignment="left" valignment="top" usebox="none">
25360 \begin_layout Plain Layout
25366 <cell alignment="left" valignment="top" usebox="none">
25369 \begin_layout Plain Layout
25375 <cell alignment="left" valignment="top" usebox="none">
25378 \begin_layout Plain Layout
25384 <cell alignment="left" valignment="top" usebox="none">
25387 \begin_layout Plain Layout
25393 <cell alignment="center" valignment="top" usebox="none">
25396 \begin_layout Plain Layout
25402 <cell alignment="center" valignment="top" usebox="none">
25405 \begin_layout Plain Layout
25411 <cell alignment="center" valignment="top" usebox="none">
25414 \begin_layout Plain Layout
25420 <cell alignment="center" valignment="top" usebox="none">
25423 \begin_layout Plain Layout
25431 <cell alignment="left" valignment="top" usebox="none">
25434 \begin_layout Plain Layout
25440 <cell alignment="left" valignment="top" usebox="none">
25443 \begin_layout Plain Layout
25449 <cell alignment="left" valignment="top" usebox="none">
25452 \begin_layout Plain Layout
25458 <cell alignment="left" valignment="top" usebox="none">
25461 \begin_layout Plain Layout
25467 <cell alignment="center" valignment="top" usebox="none">
25470 \begin_layout Plain Layout
25476 <cell alignment="center" valignment="top" usebox="none">
25479 \begin_layout Plain Layout
25485 <cell alignment="center" valignment="top" usebox="none">
25488 \begin_layout Plain Layout
25494 <cell alignment="center" valignment="top" usebox="none">
25497 \begin_layout Plain Layout
25505 <cell alignment="left" valignment="top" usebox="none">
25508 \begin_layout Plain Layout
25514 <cell alignment="left" valignment="top" usebox="none">
25517 \begin_layout Plain Layout
25523 <cell alignment="left" valignment="top" usebox="none">
25526 \begin_layout Plain Layout
25532 <cell alignment="left" valignment="top" usebox="none">
25535 \begin_layout Plain Layout
25541 <cell alignment="center" valignment="top" usebox="none">
25544 \begin_layout Plain Layout
25550 <cell alignment="center" valignment="top" usebox="none">
25553 \begin_layout Plain Layout
25559 <cell alignment="center" valignment="top" usebox="none">
25562 \begin_layout Plain Layout
25568 <cell alignment="center" valignment="top" usebox="none">
25571 \begin_layout Plain Layout
25579 <cell alignment="left" valignment="top" usebox="none">
25582 \begin_layout Plain Layout
25588 <cell alignment="left" valignment="top" usebox="none">
25591 \begin_layout Plain Layout
25597 <cell alignment="left" valignment="top" usebox="none">
25600 \begin_layout Plain Layout
25606 <cell alignment="left" valignment="top" usebox="none">
25609 \begin_layout Plain Layout
25615 <cell alignment="center" valignment="top" usebox="none">
25618 \begin_layout Plain Layout
25624 <cell alignment="center" valignment="top" usebox="none">
25627 \begin_layout Plain Layout
25633 <cell alignment="center" valignment="top" usebox="none">
25636 \begin_layout Plain Layout
25642 <cell alignment="center" valignment="top" usebox="none">
25645 \begin_layout Plain Layout
25653 <cell alignment="left" valignment="top" usebox="none">
25656 \begin_layout Plain Layout
25662 <cell alignment="left" valignment="top" usebox="none">
25665 \begin_layout Plain Layout
25671 <cell alignment="left" valignment="top" usebox="none">
25674 \begin_layout Plain Layout
25680 <cell alignment="left" valignment="top" usebox="none">
25683 \begin_layout Plain Layout
25689 <cell alignment="center" valignment="top" usebox="none">
25692 \begin_layout Plain Layout
25698 <cell alignment="center" valignment="top" usebox="none">
25701 \begin_layout Plain Layout
25707 <cell alignment="center" valignment="top" usebox="none">
25710 \begin_layout Plain Layout
25716 <cell alignment="center" valignment="top" usebox="none">
25719 \begin_layout Plain Layout
25727 <cell alignment="left" valignment="top" usebox="none">
25730 \begin_layout Plain Layout
25736 <cell alignment="left" valignment="top" usebox="none">
25739 \begin_layout Plain Layout
25745 <cell alignment="left" valignment="top" usebox="none">
25748 \begin_layout Plain Layout
25754 <cell alignment="left" valignment="top" usebox="none">
25757 \begin_layout Plain Layout
25763 <cell alignment="center" valignment="top" usebox="none">
25766 \begin_layout Plain Layout
25772 <cell alignment="center" valignment="top" usebox="none">
25775 \begin_layout Plain Layout
25781 <cell alignment="center" valignment="top" usebox="none">
25784 \begin_layout Plain Layout
25790 <cell alignment="center" valignment="top" usebox="none">
25793 \begin_layout Plain Layout
25807 \begin_layout Standard
25808 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
25809 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
25810 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
25811 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
25812 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
25813 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
25814 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
25815 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
25816 xargs xcolor xy yhmath
25819 \begin_layout Chapter
25820 Names of available colors to be used in layouts
25821 \begin_inset CommandInset label
25823 name "chap:Names-of-colors"
25830 \begin_layout Standard
25831 The colors listed here are the standard colors and the those that you can
25832 adjust in the LyX preferences.
25835 \begin_layout Description
25848 No particular color -- clear or default
25851 \begin_layout Description
25855 \begin_layout Description
25859 \begin_layout Description
25863 \begin_layout Description
25867 \begin_layout Description
25871 \begin_layout Description
25875 \begin_layout Description
25879 \begin_layout Description
25883 \begin_layout Description
25884 cursor Cursor color
25887 \begin_layout Description
25888 background Background color
25891 \begin_layout Description
25892 foreground Foreground color
25895 \begin_layout Description
25896 selection Background color of selected text
25899 \begin_layout Description
25900 selectiontext Foreground color of selected text
25903 \begin_layout Description
25904 latex Text color in LaTeX mode
25907 \begin_layout Description
25908 preview The color used for previews
25911 \begin_layout Description
25912 inlinecompletion Inline completion color
25915 \begin_layout Description
25916 nonunique_inlinecompletion Inline completion color for the non-unique part
25919 \begin_layout Description
25920 notelabel Label color for notes
25923 \begin_layout Description
25924 notebg Background color of notes
25927 \begin_layout Description
25928 commentlabel Label color for comments
25931 \begin_layout Description
25932 commentbg Background color of comments
25935 \begin_layout Description
25936 greyedoutlabel Label color for greyedout insets
25939 \begin_layout Description
25940 greyedouttext Color for greyedout inset text
25943 \begin_layout Description
25944 greyedoutbg Background color of greyedout inset
25947 \begin_layout Description
25948 shadedbg Background color of shaded box
25951 \begin_layout Description
25952 listingsbg Background color of listings inset
25955 \begin_layout Description
25956 branchlabel Label color for branches
25959 \begin_layout Description
25960 footlabel Label color for footnotes
25963 \begin_layout Description
25964 indexlabel Label color for index insets
25967 \begin_layout Description
25968 marginlabel Label color for margin notes
25971 \begin_layout Description
25972 phantomtext Text color for phantom insets
25975 \begin_layout Description
25976 urllabel Label color for URL insets
25979 \begin_layout Description
25980 urltext Color for URL inset text
25983 \begin_layout Description
25984 depthbar Color for the depth bars in the margin
25987 \begin_layout Description
25988 language Color for marking foreign language words
25991 \begin_layout Description
25992 command Text color for command insets
25995 \begin_layout Description
25996 commandbg Background color for command insets
25999 \begin_layout Description
26000 commandframe Frame color for command insets
26003 \begin_layout Description
26004 special Special chars text color
26007 \begin_layout Description
26008 graphicsbg Graphics inset background color
26011 \begin_layout Description
26012 math Math inset text color
26015 \begin_layout Description
26016 mathbg Math inset background color
26019 \begin_layout Description
26020 mathmacrobg Macro math inset background color
26023 \begin_layout Description
26024 mathmacrohoverbg Macro math inset background color hovered
26027 \begin_layout Description
26028 mathmacrolabel Macro math label color
26031 \begin_layout Description
26032 mathmacroframe Macro math frame color
26035 \begin_layout Description
26036 mathmacroblend Macro math blended color
26039 \begin_layout Description
26040 mathmacrooldarg Macro template color for old parameters
26043 \begin_layout Description
26044 mathmacronewarg Macro template color for new parameters
26047 \begin_layout Description
26048 mathframe Math inset frame color under focus
26051 \begin_layout Description
26052 mathcorners Math inset frame color not under focus
26055 \begin_layout Description
26056 mathline Math line color
26059 \begin_layout Description
26060 collapsable Collapsable insets text
26063 \begin_layout Description
26064 collapsableframe Collapsable insets frame
26067 \begin_layout Description
26068 insetbg Inset marker background color
26071 \begin_layout Description
26072 insetframe Inset marker frame color
26075 \begin_layout Description
26076 error Error box text color
26079 \begin_layout Description
26080 eolmarker End of line marker color
26083 \begin_layout Description
26084 added_space Added space colour
26087 \begin_layout Description
26088 appendix Appendix marker color
26091 \begin_layout Description
26092 changebar Changebar color
26095 \begin_layout Description
26096 deletedtext Deleted text color
26099 \begin_layout Description
26100 addedtext Added text color
26103 \begin_layout Description
26104 changedtextauthor1 Changed text color author 1
26107 \begin_layout Description
26108 changedtextauthor2 Changed text color author 2
26111 \begin_layout Description
26112 changedtextauthor3 Changed text color author 3
26115 \begin_layout Description
26116 changedtextauthor4 Changed text color author 4
26119 \begin_layout Description
26120 changedtextauthor5 Changed text color author 5
26123 \begin_layout Description
26124 deletedtextmodifier Deleted text modifying color
26127 \begin_layout Description
26128 tabularline Table line color
26131 \begin_layout Description
26132 tabularonoffline Table line color
26135 \begin_layout Description
26136 bottomarea Bottom area color
26139 \begin_layout Description
26140 newpage New page color
26143 \begin_layout Description
26144 pagebreak Page break color
26147 \begin_layout Description
26148 buttonframe Color used for button frame
26151 \begin_layout Description
26152 buttonbg Color used for bottom background
26155 \begin_layout Description
26156 buttonhoverbg Color used for buttom under focus
26159 \begin_layout Description
26160 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
26164 \begin_layout Description
26165 previewframe Preview frame color
26168 \begin_layout Description
26169 inherit Color is inherited
26172 \begin_layout Description
26173 regexpframe Color for regexp frame
26176 \begin_layout Description
26177 ignore For ignoring updates of a color