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
9548 The complete list of supported features is unfortunately not documented
9549 outside the LyX source code —but see
9550 \begin_inset Flex Code
9553 \begin_layout Plain Layout
9559 if you are interested.
9561 \begin_inset Flex MenuItem
9564 \begin_layout Plain Layout
9565 Help\SpecialChar \menuseparator
9570 \begin_layout Plain Layout
9582 also gives an overview of the supported packages.
9585 \begin_layout Description
9586 \begin_inset Flex Code
9589 \begin_layout Plain Layout
9596 \begin_inset Flex Code
9599 \begin_layout Plain Layout
9605 ] Indicates that this layout provides the functionality of the module mentioned,
9606 which should be specified by the filename without the
9607 \begin_inset Flex Code
9610 \begin_layout Plain Layout
9617 This will typically be used if the layout includes the module directly,
9618 rather than using the
9619 \begin_inset Flex Code
9622 \begin_layout Plain Layout
9628 tag to indicate that it ought to be used.
9629 It could also be used in a module that provided an alternate implementation
9630 of the same functionality.
9633 \begin_layout Description
9634 \begin_inset Flex Code
9637 \begin_layout Plain Layout
9644 \begin_inset Flex Code
9647 \begin_layout Plain Layout
9653 ] Whether the class requires the feature
9654 \begin_inset Flex Code
9657 \begin_layout Plain Layout
9664 Multiple features must be separated by commas.
9665 Note that you can only request supported features.
9667 \begin_inset Flex Code
9670 \begin_layout Plain Layout
9676 for a list of these.)
9679 \begin_layout Description
9680 \begin_inset Flex Code
9683 \begin_layout Plain Layout
9690 \begin_inset Flex Code
9693 \begin_layout Plain Layout
9699 ] A string that indicates the width of the right margin on the screen, for
9701 \begin_inset Quotes eld
9705 \begin_inset Flex Code
9708 \begin_layout Plain Layout
9715 \begin_inset Quotes erd
9721 \begin_layout Description
9722 \begin_inset Flex Code
9725 \begin_layout Plain Layout
9732 \begin_inset Flex Code
9735 \begin_layout Plain Layout
9741 ] Sets which divisions get numbered.
9743 \begin_inset Newline newline
9747 \begin_inset Flex Code
9750 \begin_layout Plain Layout
9759 \begin_layout Description
9760 \begin_inset Flex Code
9763 \begin_layout Plain Layout
9770 \begin_inset Flex Code
9773 \begin_layout Plain Layout
9782 \begin_inset space \thinspace{}
9786 \begin_inset Flex Code
9789 \begin_layout Plain Layout
9795 ] Whether the class-default should be printing on one or both sides of the
9797 Can be changed in the
9798 \begin_inset Flex MenuItem
9801 \begin_layout Plain Layout
9802 Document\SpecialChar \menuseparator
9811 \begin_layout Description
9812 \begin_inset Flex Code
9815 \begin_layout Plain Layout
9822 \begin_inset Flex Code
9825 \begin_layout Plain Layout
9831 ] This sequence defines a paragraph style.
9832 If the style does not yet exist, it is created; if it does exist, its parameter
9835 \begin_inset Quotes eld
9839 \begin_inset Flex Code
9842 \begin_layout Plain Layout
9849 \begin_inset Quotes erd
9853 \begin_inset Newline newline
9857 \begin_inset space ~
9861 \begin_inset CommandInset ref
9863 reference "sub:Paragraph-Styles"
9867 for details on paragraph styles.
9870 \begin_layout Description
9871 \begin_inset Flex Code
9874 \begin_layout Plain Layout
9881 \begin_inset Flex Code
9884 \begin_layout Plain Layout
9890 ] The name of the command or environment to be used with
9891 \begin_inset Flex Code
9894 \begin_layout Plain Layout
9903 \begin_layout Description
9904 \begin_inset Flex Code
9907 \begin_layout Plain Layout
9914 \begin_inset Flex Code
9917 \begin_layout Plain Layout
9926 \begin_inset Flex Code
9929 \begin_layout Plain Layout
9935 ] Indicates what kind of markup is used to define the title of a document.
9937 \begin_inset Flex Code
9940 \begin_layout Plain Layout
9946 means that the macro with name
9947 \begin_inset Flex Code
9950 \begin_layout Plain Layout
9956 will be inserted after the last layout which has
9957 \begin_inset Quotes eld
9961 \begin_inset Flex Code
9964 \begin_layout Plain Layout
9966 \begin_inset space ~
9975 \begin_inset Quotes erd
9980 \begin_inset Flex Code
9983 \begin_layout Plain Layout
9989 corresponds to the case where all layouts which have
9990 \begin_inset Quotes eld
9994 \begin_inset Flex Code
9997 \begin_layout Plain Layout
9999 \begin_inset space ~
10008 \begin_inset Quotes erd
10011 should be enclosed into the
10012 \begin_inset Flex Code
10015 \begin_layout Plain Layout
10024 \begin_layout Description
10025 \begin_inset Flex Code
10028 \begin_layout Plain Layout
10035 \begin_inset Flex Code
10038 \begin_layout Plain Layout
10044 ] Sets which divisions are included in the table of contents.
10046 \begin_inset Flex Code
10049 \begin_layout Plain Layout
10058 \begin_layout Subsection
10059 \begin_inset Flex Code
10062 \begin_layout Plain Layout
10069 \begin_inset CommandInset label
10071 name "sub:ClassOptions"
10078 \begin_layout Standard
10080 \begin_inset Flex Code
10083 \begin_layout Plain Layout
10089 section can contain the following entries:
10092 \begin_layout Description
10093 \begin_inset Flex Code
10096 \begin_layout Plain Layout
10103 \begin_inset Flex Code
10106 \begin_layout Plain Layout
10112 ] The list of available font sizes for the document's main font, separated
10114 \begin_inset Quotes eld
10118 \begin_inset Flex Code
10121 \begin_layout Plain Layout
10128 \begin_inset Quotes erd
10134 \begin_layout Description
10135 \begin_inset Flex Code
10138 \begin_layout Plain Layout
10144 Used to set the DTD line with XML-based output classes.
10146 \begin_inset space \thinspace{}
10150 \begin_inset Quotes eld
10153 -//OASIS//DTD DocBook V4.2//EN
10154 \begin_inset Quotes erd
10160 \begin_layout Description
10161 \begin_inset Flex Code
10164 \begin_layout Plain Layout
10171 \begin_inset Flex Code
10174 \begin_layout Plain Layout
10175 string="empty|plain|headings|fancy"
10180 ] The list of available page sty\SpecialChar \-
10182 \begin_inset Quotes eld
10186 \begin_inset Flex Code
10189 \begin_layout Plain Layout
10196 \begin_inset Quotes erd
10202 \begin_layout Description
10203 \begin_inset Flex Code
10206 \begin_layout Plain Layout
10213 \begin_inset Flex Code
10216 \begin_layout Plain Layout
10222 ] Some document class options, separated by a comma, that will be added
10223 to the optional part of the
10224 \begin_inset Flex Code
10227 \begin_layout Plain Layout
10238 \begin_layout Standard
10240 \begin_inset Flex Code
10243 \begin_layout Plain Layout
10249 section must end with
10250 \begin_inset Quotes eld
10254 \begin_inset Flex Code
10257 \begin_layout Plain Layout
10264 \begin_inset Quotes erd
10270 \begin_layout Subsection
10272 \begin_inset CommandInset label
10274 name "sub:Paragraph-Styles"
10281 \begin_layout Standard
10282 A paragraph style description looks like this:
10286 \begin_layout Plain Layout
10287 Note that this will either define a new style or modify an existing one.
10295 \begin_layout LyX-Code
10302 \begin_layout LyX-Code
10306 \begin_layout LyX-Code
10310 \begin_layout Standard
10311 where the following commands are allowed:
10314 \begin_layout Description
10315 \begin_inset Flex Code
10318 \begin_layout Plain Layout
10325 \begin_inset Flex Code
10328 \begin_layout Plain Layout
10333 , left, right, center
10338 ] Paragraph alignment.
10341 \begin_layout Description
10342 \begin_inset Flex Code
10345 \begin_layout Plain Layout
10352 \begin_inset Flex Code
10355 \begin_layout Plain Layout
10360 , left, right, center
10365 ] A comma separated list of permitted alignments.
10366 (Some LaTeX styles prohibit certain alignments, since those wouldn't make
10368 For example a right-aligned or centered enumeration isn't possible.)
10369 \change_inserted -712698321 1353679769
10373 \begin_layout Description
10375 \change_inserted -712698321 1353680268
10376 \begin_inset Flex Code
10379 \begin_layout Plain Layout
10381 \change_inserted -712698321 1353679781
10388 \begin_inset Flex Code
10391 \begin_layout Plain Layout
10393 \change_inserted -712698321 1353679772
10399 ] Defines argument number <int> of a command\SpecialChar \slash{}
10400 environment associated with
10402 This is useful for things like section headings, and only makes sense with
10404 Every (optional or required) argument of a command or environment -- except
10405 for the required argument that is associated with the content of the paragraph
10406 itself -- has a separate definition, where the number specifies the order
10408 The definition must end with
10409 \begin_inset Flex Code
10412 \begin_layout Plain Layout
10414 \change_inserted -712698321 1353680069
10421 So a command with two optional arguments has:
10425 \begin_layout Quote
10427 \change_inserted -712698321 1353680127
10433 \begin_layout Quote
10435 \change_inserted -712698321 1353680195
10441 \begin_layout Quote
10443 \change_inserted -712698321 1353680135
10449 \begin_layout Quote
10451 \change_inserted -712698321 1353680140
10457 \begin_layout Quote
10459 \change_inserted -712698321 1353680197
10465 \begin_layout Quote
10467 \change_inserted -712698321 1353680147
10473 \begin_layout Standard
10475 \change_inserted -712698321 1353680528
10477 \begin_inset Flex Code
10480 \begin_layout Plain Layout
10482 \change_inserted -712698321 1353680412
10488 definition, the following specifications are possible:
10491 \begin_layout Itemize
10493 \change_inserted -712698321 1355076779
10494 \begin_inset Flex Code
10497 \begin_layout Plain Layout
10499 \change_inserted -712698321 1353680543
10508 \begin_inset Flex Code
10511 \begin_layout Plain Layout
10513 \change_inserted -712698321 1353680567
10519 The string that will appear both in the menu (to insert this argument)
10520 and on the argument inset button (unless you also specify a separate
10521 \begin_inset Flex Code
10524 \begin_layout Plain Layout
10526 \change_inserted -712698321 1355076779
10533 For the menu, you can define an accelerator by appending the respective
10534 character to the string, divided by
10535 \begin_inset Quotes eld
10539 \begin_inset Quotes erd
10543 \begin_inset space \thinspace{}
10548 \begin_inset Flex Code
10551 \begin_layout Plain Layout
10553 \change_inserted -712698321 1353691482
10554 \begin_inset Quotes eld
10558 \begin_inset Quotes erd
10571 \begin_layout Itemize
10573 \change_inserted -712698321 1355076754
10574 \begin_inset Flex Code
10577 \begin_layout Plain Layout
10579 \change_inserted -712698321 1355076658
10586 \begin_inset Flex Code
10589 \begin_layout Plain Layout
10591 \change_inserted -712698321 1355076654
10597 A separate string for the menu.
10598 You can define an accelerator by appending the respective character to
10599 the string, divided by
10600 \begin_inset Quotes eld
10604 \begin_inset Quotes erd
10608 \begin_inset space \thinspace{}
10613 \begin_inset Flex Code
10616 \begin_layout Plain Layout
10618 \change_inserted -712698321 1355076654
10619 \begin_inset Quotes eld
10623 \begin_inset Quotes erd
10632 This specification is optional.
10633 If it is not given the
10634 \begin_inset Flex Code
10637 \begin_layout Plain Layout
10639 \change_inserted -712698321 1355076736
10647 will be used instead for the menu.
10650 \begin_layout Itemize
10652 \change_inserted -712698321 1353680665
10653 \begin_inset Flex Code
10656 \begin_layout Plain Layout
10658 \change_inserted -712698321 1353680616
10665 \begin_inset Flex Code
10668 \begin_layout Plain Layout
10670 \change_inserted -712698321 1353680623
10676 A longer explanatory text that appears in the tooltip when hovering over
10677 the argument inset.
10680 \begin_layout Itemize
10682 \change_inserted -712698321 1353680874
10683 \begin_inset Flex Code
10686 \begin_layout Plain Layout
10688 \change_inserted -712698321 1353680732
10695 \begin_inset Flex Code
10698 \begin_layout Plain Layout
10700 \change_inserted -712698321 1353680738
10706 Declare if this is a mandatory
10707 \change_inserted 2090807402 1353765594
10709 \change_inserted -712698321 1353680874
10711 \change_inserted 2090807402 1353765599
10713 \change_inserted -712698321 1353680874
10715 Mandatory arguments will be output empty if not given, while optional arguments
10716 will not be output at all.
10717 By default, mandatory arguments are delimited by
10718 \begin_inset Flex Code
10721 \begin_layout Plain Layout
10723 \change_inserted -712698321 1353680808
10731 , while optional arguments are delimited by
10732 \begin_inset Flex Code
10735 \begin_layout Plain Layout
10737 \change_inserted -712698321 1353680833
10746 \begin_layout Itemize
10748 \change_inserted -712698321 1353917199
10749 \begin_inset Flex Code
10752 \begin_layout Plain Layout
10754 \change_inserted -712698321 1353680879
10761 \begin_inset Flex Code
10764 \begin_layout Plain Layout
10766 \change_inserted -712698321 1353680874
10772 defines another argument (by its number) which this argument requires to
10773 be output if it is itself output.
10775 \begin_inset space \thinspace{}
10778 g., in LaTeX commands, optional arguments often require previous optional
10779 arguments to be output (at least empty), as in
10780 \begin_inset Flex Code
10783 \begin_layout Plain Layout
10785 \change_inserted -712698321 1353688183
10788 command[][arg]{text}
10796 This can be achieved by the statement
10797 \begin_inset Flex Code
10800 \begin_layout Plain Layout
10802 \change_inserted -712698321 1353681031
10811 \begin_inset Flex Code
10814 \begin_layout Plain Layout
10816 \change_inserted -712698321 1353681045
10827 \begin_layout Itemize
10829 \change_inserted -712698321 1354263104
10830 \begin_inset Flex Code
10833 \begin_layout Plain Layout
10835 \change_inserted -712698321 1353681072
10844 \begin_inset Flex Code
10847 \begin_layout Plain Layout
10849 \change_inserted -712698321 1353681067
10855 defines a custom left delimiter (instead of
10856 \begin_inset Flex Code
10859 \begin_layout Plain Layout
10861 \change_inserted -712698321 1353681127
10870 \begin_inset Flex Code
10873 \begin_layout Plain Layout
10875 \change_inserted -712698321 1353681133
10884 A line break in the output can be indicated by
10885 \begin_inset Flex Code
10888 \begin_layout Plain Layout
10890 \change_inserted -712698321 1354263104
10901 \begin_layout Itemize
10903 \change_inserted -712698321 1355144479
10904 \begin_inset Flex Code
10907 \begin_layout Plain Layout
10909 \change_inserted -712698321 1353681149
10916 \begin_inset Flex Code
10919 \begin_layout Plain Layout
10921 \change_inserted -712698321 1353681146
10927 defines a custom right delimiter (instead of
10928 \begin_inset Flex Code
10931 \begin_layout Plain Layout
10933 \change_inserted -712698321 1353681158
10940 \begin_inset Flex Code
10943 \begin_layout Plain Layout
10945 \change_inserted -712698321 1353681161
10952 A line break in the output can be indicated by
10953 \begin_inset Flex Code
10956 \begin_layout Plain Layout
10958 \change_inserted -712698321 1354263106
10967 \begin_layout Itemize
10969 \change_inserted -712698321 1355144578
10970 \begin_inset Flex Code
10973 \begin_layout Plain Layout
10975 \change_inserted -712698321 1355144487
10984 \begin_inset Flex Code
10987 \begin_layout Plain Layout
10989 \change_inserted -712698321 1355144500
10995 defines an argument that is inserted in any case (alone or in addition
10996 to user-specified arguments).
10997 Multiple arguments need to be separated by comma.
11002 \begin_layout Itemize
11004 \change_inserted -712698321 1353917320
11005 \begin_inset Flex Code
11008 \begin_layout Plain Layout
11010 \change_inserted -712698321 1353917320
11016 The font used for the argument content.
11018 \begin_inset space ~
11022 \begin_inset CommandInset ref
11024 reference "sub:Font-description"
11031 \begin_layout Itemize
11033 \change_inserted -712698321 1353917320
11034 \begin_inset Flex Code
11037 \begin_layout Plain Layout
11039 \change_inserted -712698321 1353917320
11045 The font used for the label.
11047 \begin_inset space ~
11051 \begin_inset CommandInset ref
11053 reference "sub:Font-description"
11060 \begin_layout Itemize
11062 \change_inserted -712698321 1355661048
11063 \begin_inset Flex Code
11066 \begin_layout Plain Layout
11068 \change_inserted -712698321 1353917320
11075 \begin_inset Flex Code
11078 \begin_layout Plain Layout
11080 \change_inserted -712698321 1353917320
11087 \begin_inset Flex Code
11090 \begin_layout Plain Layout
11092 \change_inserted -712698321 1353917320
11099 \begin_inset Flex Code
11102 \begin_layout Plain Layout
11104 \change_inserted -712698321 1353917320
11110 , describing the rendering style used for the inset's frame and buttons.
11112 \begin_inset Flex Code
11115 \begin_layout Plain Layout
11117 \change_inserted -712698321 1353917320
11126 \begin_layout Itemize
11128 \change_inserted -712698321 1355747298
11129 \begin_inset Flex Code
11132 \begin_layout Plain Layout
11134 \change_inserted -712698321 1355661057
11141 \begin_inset Flex Code
11144 \begin_layout Plain Layout
11146 \change_inserted -712698321 1355661049
11153 \begin_inset Flex Code
11156 \begin_layout Plain Layout
11158 \change_inserted -712698321 1355661077
11166 , this argument is automatically inserted when the respective style is selected.
11167 Currently, only one argument per style\SpecialChar \slash{}
11168 layout can be automatically inserted.
11169 \change_inserted 155139281 1354198988
11173 \begin_layout Standard
11175 \change_inserted -712698321 1356689813
11176 By default, the text entered in the LyX workarea in the respective layout
11177 is the last (mandatory) argument of a command if the
11178 \begin_inset Flex Code
11181 \begin_layout Plain Layout
11183 \change_inserted -712698321 1356689619
11192 \begin_inset Flex Code
11195 \begin_layout Plain Layout
11197 \change_inserted -712698321 1356689629
11206 However, arguments with the prefix
11207 \begin_inset Flex Code
11210 \begin_layout Plain Layout
11212 \change_inserted -712698321 1356689679
11220 are output after this workarea argument.
11221 Note that post-argument numbering restarts at 1, so the first argument
11222 following the workarea argument is
11223 \begin_inset Flex Code
11226 \begin_layout Plain Layout
11228 \change_inserted -712698321 1356689813
11237 Post-arguments are ignored in any other
11238 \begin_inset Flex Code
11241 \begin_layout Plain Layout
11243 \change_inserted -712698321 1356689801
11250 \begin_inset Flex Code
11253 \begin_layout Plain Layout
11255 \change_inserted -712698321 1356689801
11266 \begin_layout Standard
11268 \change_inserted 155139281 1354199102
11270 \begin_inset Flex Code
11273 \begin_layout Plain Layout
11275 \change_inserted 155139281 1354199013
11286 \begin_inset Flex Code
11289 \begin_layout Plain Layout
11291 \change_inserted 155139281 1354199102
11302 \begin_inset Flex Code
11305 \begin_layout Plain Layout
11307 \change_inserted 155139281 1354199044
11315 followed by the number (e.
11316 \begin_inset space \thinspace{}
11321 \begin_inset Flex Code
11324 \begin_layout Plain Layout
11326 \change_inserted 155139281 1354199064
11340 \begin_layout Description
11341 \begin_inset Flex Code
11344 \begin_layout Plain Layout
11350 Note that this will completely override any prior
11351 \begin_inset Flex Code
11354 \begin_layout Plain Layout
11360 declaration for this style.
11362 \begin_inset Quotes eld
11366 \begin_inset Flex Code
11369 \begin_layout Plain Layout
11376 \begin_inset Quotes erd
11381 \begin_inset space ~
11385 \begin_inset CommandInset ref
11387 reference "sub:I18n"
11391 for details on its use.
11394 \begin_layout Description
11395 \begin_inset Flex Code
11398 \begin_layout Plain Layout
11405 \begin_inset Flex Code
11408 \begin_layout Plain Layout
11418 \begin_layout Plain Layout
11419 Note that a `float' here is a real number, such as: 1.5.
11424 The vertical space with which the last of a chain of paragraphs with this
11425 style is separated from the following paragraph.
11426 If the next paragraph has another style, the separations are not simply
11427 added, but the maximum is taken.
11430 \begin_layout Description
11431 \begin_inset Flex Code
11434 \begin_layout Plain Layout
11441 \begin_inset Flex Code
11444 \begin_layout Plain Layout
11450 ] The category for this style.
11451 This is used to group related styles in the style combobox on the toolbar.
11452 Any string can be used, but you may want to use existing categories with
11457 \begin_layout Description
11458 \begin_inset Flex Code
11461 \begin_layout Plain Layout
11467 Depth of XML command.
11468 Used only with XML-type formats.
11471 \begin_layout Description
11472 \begin_inset Flex Code
11475 \begin_layout Plain Layout
11482 \begin_inset Flex Code
11485 \begin_layout Plain Layout
11491 ] Copies all the features of an existing style into the current one.
11495 \begin_layout Description
11496 \begin_inset Flex Code
11499 \begin_layout Plain Layout
11506 \begin_inset Flex Code
11509 \begin_layout Plain Layout
11515 ] The name of a style whose preamble should be output
11520 This allows to ensure some ordering of the preamble snippets when macros
11521 definitions depend on one another.
11525 \begin_layout Plain Layout
11526 Note that, besides that functionality, there is no way to ensure any ordering
11528 The ordering that you see in a given version of LyX may change without
11529 warning in later versions.
11537 \begin_layout Description
11538 \begin_inset Flex Code
11541 \begin_layout Plain Layout
11548 \begin_inset Flex Code
11551 \begin_layout Plain Layout
11556 , Box, Filled_Box, Static
11561 ] The type of label that stands at the end of the paragraph (or sequence
11563 \begin_inset Flex Code
11566 \begin_layout Plain Layout
11573 \begin_inset Newline newline
11577 \begin_inset Flex Code
11580 \begin_layout Plain Layout
11587 \begin_inset Flex Code
11590 \begin_layout Plain Layout
11597 \begin_inset Flex Code
11600 \begin_layout Plain Layout
11608 \begin_inset Flex Code
11611 \begin_layout Plain Layout
11618 \begin_inset Quotes eld
11622 \begin_inset Quotes erd
11626 \begin_inset Flex Code
11629 \begin_layout Plain Layout
11636 \begin_inset space \space{}
11640 \begin_inset Flex Code
11643 \begin_layout Plain Layout
11649 ) is a white (resp.
11650 \begin_inset space ~
11653 black) square suitable for end of proof markers,
11654 \begin_inset Flex Code
11657 \begin_layout Plain Layout
11663 is an explicit text string.
11666 \begin_layout Description
11667 \begin_inset Flex Code
11670 \begin_layout Plain Layout
11677 \begin_inset Flex Code
11680 \begin_layout Plain Layout
11686 ] The string used for a label with a
11687 \begin_inset Flex Code
11690 \begin_layout Plain Layout
11697 \begin_inset Newline newline
11701 \begin_inset Flex Code
11704 \begin_layout Plain Layout
11714 \begin_layout Description
11715 \begin_inset Flex Code
11718 \begin_layout Plain Layout
11724 The font used for both the text body
11730 \begin_inset space ~
11734 \begin_inset CommandInset ref
11736 reference "sub:Font-description"
11741 Note that defining this font automatically defines the
11742 \begin_inset Flex Code
11745 \begin_layout Plain Layout
11752 So you should define this one first if you also want to define
11753 \begin_inset Flex Code
11756 \begin_layout Plain Layout
11765 \begin_layout Description
11766 \begin_inset Flex Code
11769 \begin_layout Plain Layout
11776 \begin_inset Flex Code
11779 \begin_layout Plain Layout
11788 \begin_inset space \thinspace{}
11792 \begin_inset Flex Code
11795 \begin_layout Plain Layout
11801 ] Usually LyX does not allow you to insert more than one space between words,
11802 since a space is considered as the separation between two words, not a
11803 character or symbol of its own.
11804 This is a very fine thing but sometimes annoying, for example, when typing
11805 program code or plain LaTeX code.
11807 \begin_inset Flex Code
11810 \begin_layout Plain Layout
11817 Note that LyX will create protected blanks for the additional blanks when
11818 in another mode than LaTeX-mode.
11821 \begin_layout Description
11822 \begin_inset Flex Code
11825 \begin_layout Plain Layout
11831 These tags are used with XHTML output.
11833 \begin_inset CommandInset ref
11835 reference "sub:Paragraph-Style-XHTML"
11842 \begin_layout Description
11843 \begin_inset Flex Code
11846 \begin_layout Plain Layout
11852 [FIXME] (Used only with XML-type formats.)
11855 \begin_layout Description
11856 \begin_inset Flex Code
11859 \begin_layout Plain Layout
11866 \begin_inset Flex Code
11869 \begin_layout Plain Layout
11878 \begin_inset space \thinspace{}
11882 \begin_inset Flex Code
11885 \begin_layout Plain Layout
11892 \begin_inset Flex Code
11895 \begin_layout Plain Layout
11901 , marks the style as to be included in the document preamble and not in
11903 This is useful for document classes that want such information as the title
11904 and author to appear in the preamble.
11905 Note that this works only for styles for which the
11906 \begin_inset Flex Code
11909 \begin_layout Plain Layout
11916 \begin_inset Flex Code
11919 \begin_layout Plain Layout
11926 \begin_inset Flex Code
11929 \begin_layout Plain Layout
11938 \begin_layout Description
11939 \begin_inset Flex Code
11942 \begin_layout Plain Layout
11949 \begin_inset Flex Code
11952 \begin_layout Plain Layout
11961 \begin_inset space \thinspace{}
11965 \begin_inset Flex Code
11968 \begin_layout Plain Layout
11975 \begin_inset Flex Code
11978 \begin_layout Plain Layout
11984 , marks the style as being part of a title block (see also the
11985 \begin_inset Flex Code
11988 \begin_layout Plain Layout
11995 \begin_inset Flex Code
11998 \begin_layout Plain Layout
12007 \begin_layout Description
12009 \change_inserted -712698321 1355932296
12010 \begin_inset Flex Code
12013 \begin_layout Plain Layout
12015 \change_inserted -712698321 1355932178
12022 \begin_inset Flex Code
12025 \begin_layout Plain Layout
12027 \change_inserted -712698321 1355932181
12033 ] The LaTeX command sequence declaring an item in a list.
12034 The command is to be defined without the preceding backslash (the default
12036 \begin_inset Quotes eld
12040 \begin_inset Quotes erd
12044 \begin_inset Flex Code
12047 \begin_layout Plain Layout
12049 \change_inserted -712698321 1355932279
12059 in the LaTeX output).
12062 \begin_layout Description
12063 \begin_inset Flex Code
12066 \begin_layout Plain Layout
12073 \begin_inset Flex Code
12076 \begin_layout Plain Layout
12082 ] This provides extra space between paragraphs that have the same style.
12083 If you put other styles into an environment, each is separated with the
12085 \begin_inset Flex Code
12088 \begin_layout Plain Layout
12095 But the whole items of the environment are additionally separated with
12097 \begin_inset Flex Code
12100 \begin_layout Plain Layout
12107 Note that this is a
12112 \begin_layout Description
12113 \begin_inset Flex Code
12116 \begin_layout Plain Layout
12122 [FIXME] (Used only with XML-type formats.)
12125 \begin_layout Description
12126 \begin_inset Flex Code
12129 \begin_layout Plain Layout
12136 \begin_inset Flex Code
12139 \begin_layout Plain Layout
12148 \begin_inset space \thinspace{}
12152 \begin_inset Flex Code
12155 \begin_layout Plain Layout
12161 ] Usually LyX does not allow you to leave a paragraph empty, since it would
12162 lead to empty LaTeX output.
12163 There are some cases where this could be desirable however: in a letter
12164 template, the required fields can be provided as empty fields, so that
12165 people do not forget them; in some special classes, a style can be used
12166 as some kind of break, which does not contain actual text.
12169 \begin_layout Description
12170 \begin_inset Flex Code
12173 \begin_layout Plain Layout
12180 \begin_inset Flex Code
12183 \begin_layout Plain Layout
12189 ] The vertical space between the label and the text body.
12190 Only used for labels that are above the text body (
12191 \begin_inset Flex Code
12194 \begin_layout Plain Layout
12201 \begin_inset Newline newline
12205 \begin_inset Flex Code
12208 \begin_layout Plain Layout
12209 Centered_Top_Environment
12217 \begin_layout Description
12218 \begin_inset Flex Code
12221 \begin_layout Plain Layout
12228 \begin_inset Flex Code
12231 \begin_layout Plain Layout
12237 ] The name of the counter for automatic numbering.
12238 \begin_inset Newline newline
12246 \begin_inset Flex Code
12249 \begin_layout Plain Layout
12256 \begin_inset Flex Code
12259 \begin_layout Plain Layout
12266 In that case, the counter will be stepped each time the style appears.
12267 \begin_inset Newline newline
12275 \begin_inset Flex Code
12278 \begin_layout Plain Layout
12285 \begin_inset Flex Code
12288 \begin_layout Plain Layout
12294 , though this case is a bit complicated.
12295 Suppose you declare
12296 \begin_inset Quotes eld
12300 \begin_inset Flex Code
12303 \begin_layout Plain Layout
12304 LabelCounter myenum
12310 \begin_inset Quotes erd
12314 Then the actual counters used are
12315 \begin_inset Flex Code
12318 \begin_layout Plain Layout
12325 \begin_inset Flex Code
12328 \begin_layout Plain Layout
12335 \begin_inset Flex Code
12338 \begin_layout Plain Layout
12345 \begin_inset Flex Code
12348 \begin_layout Plain Layout
12354 , much as in LaTeX.
12355 These counters must all be declared separately.
12356 \begin_inset Newline newline
12360 \begin_inset CommandInset ref
12362 reference "sub:Counters"
12366 for details on counters.
12369 \begin_layout Description
12370 \begin_inset Flex Code
12373 \begin_layout Plain Layout
12379 The font used for the label.
12381 \begin_inset space ~
12385 \begin_inset CommandInset ref
12387 reference "sub:Font-description"
12394 \begin_layout Description
12395 \begin_inset Flex Code
12398 \begin_layout Plain Layout
12405 \begin_inset Flex Code
12408 \begin_layout Plain Layout
12414 ] Text that indicates how far a label should be indented.
12417 \begin_layout Description
12418 \begin_inset Flex Code
12421 \begin_layout Plain Layout
12428 \begin_inset Flex Code
12431 \begin_layout Plain Layout
12437 ] Text that indicates the amount of horizontal space between the label and
12439 Only used for labels that are not above the text body.
12442 \begin_layout Description
12443 \begin_inset Flex Code
12446 \begin_layout Plain Layout
12453 \begin_inset Flex Code
12456 \begin_layout Plain Layout
12462 ] The string used for a label with a
12463 \begin_inset Flex Code
12466 \begin_layout Plain Layout
12473 \begin_inset Flex Code
12476 \begin_layout Plain Layout
12484 \begin_inset Flex Code
12487 \begin_layout Plain Layout
12493 is set, this string can be contain the special formatting commands described
12495 \begin_inset CommandInset ref
12497 reference "sub:Counters"
12504 \begin_layout Description
12505 \begin_inset Flex Code
12508 \begin_layout Plain Layout
12509 LabelStringAppendix
12515 \begin_inset Flex Code
12518 \begin_layout Plain Layout
12524 ] This is used inside the appendix instead of
12525 \begin_inset Newline newline
12529 \begin_inset Flex Code
12532 \begin_layout Plain Layout
12540 \begin_inset Flex Code
12543 \begin_layout Plain Layout
12550 \begin_inset Newline newline
12554 \begin_inset Flex Code
12557 \begin_layout Plain Layout
12558 LabelStringAppendix
12566 \begin_layout Description
12567 \begin_inset Flex Code
12570 \begin_layout Plain Layout
12576 [FIXME] (Used only with XML-type formats.)
12579 \begin_layout Description
12580 \begin_inset Flex Code
12583 \begin_layout Plain Layout
12590 \begin_inset Flex Code
12593 \begin_layout Plain Layout
12598 , Manual, Static, Top_Environment,
12599 \begin_inset Newline newline
12602 Centered_Top_Environment, Counter, Sensitive, Enumerate,
12603 \begin_inset Newline newline
12606 Itemize, Bibliography
12615 \begin_layout Description
12616 \begin_inset Flex Code
12619 \begin_layout Plain Layout
12625 means the label is the very first word (up to the first real blank).
12626 Use protected spaces if you want more than one word as the label.
12630 \begin_layout Description
12631 \begin_inset Flex Code
12634 \begin_layout Plain Layout
12640 means the label is simply what is declared as
12641 \begin_inset Flex Code
12644 \begin_layout Plain Layout
12651 Note that this really is `static'.
12654 \begin_layout Description
12655 \begin_inset Flex Code
12658 \begin_layout Plain Layout
12665 \begin_inset space ~
12669 \begin_inset space ~
12673 \begin_inset Flex Code
12676 \begin_layout Plain Layout
12677 Centered_Top_Environment
12682 are special cases of
12683 \begin_inset Flex Code
12686 \begin_layout Plain Layout
12693 The label will be printed above the paragraph, but only at the top of an
12694 environment or the top of a chain of paragraphs with this style.
12695 This might be used with the
12696 \begin_inset Flex MenuItem
12699 \begin_layout Plain Layout
12705 style, for example.
12708 \begin_layout Description
12709 \begin_inset Flex Code
12712 \begin_layout Plain Layout
12718 is a special case for the caption-labels
12719 \begin_inset Quotes eld
12723 \begin_inset Quotes erd
12727 \begin_inset Quotes eld
12731 \begin_inset Quotes erd
12735 \begin_inset Newline newline
12739 \begin_inset Flex Code
12742 \begin_layout Plain Layout
12748 means the (hardcoded) label string depends on the kind of float: It is
12749 hardcoded to be `FloatType N', where N is the value of the counter associated
12753 \begin_layout Description
12754 \begin_inset Flex Code
12757 \begin_layout Plain Layout
12763 defines automatically numbered labels.
12765 \begin_inset Flex Code
12768 \begin_layout Plain Layout
12774 will be expanded to contain any counters: So the result will for example
12776 \begin_inset Quotes eld
12780 \begin_inset Flex Code
12783 \begin_layout Plain Layout
12794 \begin_inset Quotes erd
12799 \begin_inset space ~
12803 \begin_inset CommandInset ref
12805 reference "sub:Counters"
12809 for more information on counters.
12812 \begin_layout Description
12813 \begin_inset Flex Code
12816 \begin_layout Plain Layout
12822 produces the usual sort of enumeration labels.
12823 At present, it is hardcoded to use Arabic numerals, lowercase letters,
12824 small Roman numerals, and uppercase letters for the four possible depths.
12827 \begin_layout Description
12828 \begin_inset Flex Code
12831 \begin_layout Plain Layout
12837 produces various bullets at the different levels.
12838 It is also hardcoded.
12841 \begin_layout Description
12842 \begin_inset Flex Code
12845 \begin_layout Plain Layout
12851 is used internally by LyX and should be used only with
12852 \begin_inset Flex Code
12855 \begin_layout Plain Layout
12856 LatexType BibEnvironment
12865 \begin_layout Description
12866 \begin_inset Flex Code
12869 \begin_layout Plain Layout
12875 Note that this will completely override any prior
12876 \begin_inset Flex Code
12879 \begin_layout Plain Layout
12885 declaration for this style.
12887 \begin_inset Quotes eld
12891 \begin_inset Flex Code
12894 \begin_layout Plain Layout
12901 \begin_inset Quotes erd
12906 \begin_inset CommandInset ref
12908 reference "sub:I18n"
12912 for details on its use.
12915 \begin_layout Description
12916 \begin_inset Flex Code
12919 \begin_layout Plain Layout
12926 \begin_inset Flex Code
12929 \begin_layout Plain Layout
12935 ] The name of the corresponding LaTeX stuff.
12936 Either the environment or command name.
12939 \begin_layout Description
12940 \begin_inset Flex Code
12943 \begin_layout Plain Layout
12950 \begin_inset Flex Code
12953 \begin_layout Plain Layout
12959 ] An optional parameter for the corresponding
12960 \begin_inset Flex Code
12963 \begin_layout Plain Layout
12970 This parameter cannot be changed from within LyX
12971 \change_inserted -712698321 1355144804
12973 \begin_inset Flex Code
12976 \begin_layout Plain Layout
12978 \change_inserted -712698321 1355144804
12984 for customizable parameters)
12988 \change_inserted -712698321 1355144804
12989 This will be output as is after all LaTeX
12990 \begin_inset Flex Code
12993 \begin_layout Plain Layout
12995 \change_inserted -712698321 1355144658
13008 \begin_layout Description
13009 \begin_inset Flex Code
13012 \begin_layout Plain Layout
13019 \begin_inset Flex Code
13022 \begin_layout Plain Layout
13027 , Command, Environment, Item_Environment,
13028 \begin_inset Newline newline
13031 List_Environment, Bib_Environment
13036 ] How the style should be translated into LaTeX.
13040 \begin_layout Plain Layout
13041 \begin_inset Flex Code
13044 \begin_layout Plain Layout
13050 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13051 Visit the SGML class files for specific examples.
13060 \begin_layout Description
13061 \begin_inset Flex Code
13064 \begin_layout Plain Layout
13070 means nothing special.
13073 \begin_layout Description
13074 \begin_inset Flex Code
13077 \begin_layout Plain Layout
13084 \begin_inset Flex Code
13087 \begin_layout Plain Layout
13094 {\SpecialChar \ldots{}
13103 \begin_layout Description
13104 \begin_inset Flex Code
13107 \begin_layout Plain Layout
13114 \begin_inset Flex Code
13117 \begin_layout Plain Layout
13124 }\SpecialChar \ldots{}
13140 \begin_layout Description
13141 \begin_inset Flex Code
13144 \begin_layout Plain Layout
13151 \begin_inset Flex Code
13154 \begin_layout Plain Layout
13161 \begin_inset Flex Code
13164 \begin_layout Plain Layout
13172 is generated for each paragraph of this environment.
13176 \begin_layout Description
13177 \begin_inset Flex Code
13180 \begin_layout Plain Layout
13187 \begin_inset Flex Code
13190 \begin_layout Plain Layout
13197 \begin_inset Newline newline
13201 \begin_inset Flex Code
13204 \begin_layout Plain Layout
13210 is passed as an argument to the environment.
13211 \begin_inset Newline newline
13215 \begin_inset Flex Code
13218 \begin_layout Plain Layout
13224 can be defined in the
13225 \begin_inset Flex MenuItem
13228 \begin_layout Plain Layout
13229 Edit\SpecialChar \menuseparator
13231 \begin_inset space ~
13242 \begin_layout Description
13243 \begin_inset Flex Code
13246 \begin_layout Plain Layout
13253 \begin_inset Flex Code
13256 \begin_layout Plain Layout
13262 but adds additionally the necessary mandatory argument to the begin statement
13263 of the bibliography environment:
13264 \begin_inset Newline newline
13268 \begin_inset Flex Code
13271 \begin_layout Plain Layout
13274 begin{thebibliography}{99}
13279 It is therefore only useful for bibliography environments.
13282 \begin_layout Standard
13283 Putting the last few things together, the LaTeX output will be either:
13286 \begin_layout LyX-Code
13289 LatexName[LatexParam]{\SpecialChar \ldots{}
13293 \begin_layout Standard
13297 \begin_layout LyX-Code
13300 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
13306 \begin_layout Standard
13307 depending upon the LaTeX type.
13311 \begin_layout Description
13313 \change_inserted -712698321 1354263086
13314 \begin_inset Flex Code
13317 \begin_layout Plain Layout
13319 \change_inserted -712698321 1353866852
13326 \begin_inset Flex Code
13329 \begin_layout Plain Layout
13331 \change_inserted -712698321 1353866852
13337 ] A string that is put at the beginning of the style content.
13338 A line break in the output can be indicated by
13339 \begin_inset Flex Code
13342 \begin_layout Plain Layout
13344 \change_inserted -712698321 1354263086
13355 \begin_layout Description
13356 \begin_inset Flex Code
13359 \begin_layout Plain Layout
13366 \begin_inset Flex Code
13369 \begin_layout Plain Layout
13375 ] If you put styles into environments, the different
13376 \begin_inset Flex Code
13379 \begin_layout Plain Layout
13385 are not simply added, but added with a factor
13386 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13390 Note that this parameter is also used when
13391 \begin_inset Flex Code
13394 \begin_layout Plain Layout
13401 \begin_inset Flex Code
13404 \begin_layout Plain Layout
13411 \begin_inset Flex Code
13414 \begin_layout Plain Layout
13421 Then it is added to the manual or dynamic margin.
13422 \begin_inset Newline newline
13426 \begin_inset Quotes eld
13430 \begin_inset Flex Code
13433 \begin_layout Plain Layout
13440 \begin_inset Quotes erd
13443 means that the paragraph is indented with the width of
13444 \begin_inset Quotes eld
13448 \begin_inset Flex Code
13451 \begin_layout Plain Layout
13458 \begin_inset Quotes erd
13461 in the normal font.
13462 You can get a negative width by prefixing the string with
13463 \begin_inset Quotes eld
13467 \begin_inset Flex Code
13470 \begin_layout Plain Layout
13477 \begin_inset Quotes erd
13481 This way was chosen so that the look is the same with each used screen
13485 \begin_layout Description
13486 \begin_inset Flex Code
13489 \begin_layout Plain Layout
13496 \begin_inset Flex Code
13499 \begin_layout Plain Layout
13504 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13510 \begin_inset Newline newline
13513 The kind of margin that the style has on the left side.
13517 \begin_layout Description
13518 \begin_inset Flex Code
13521 \begin_layout Plain Layout
13527 just means a fixed margin.
13530 \begin_layout Description
13531 \begin_inset Flex Code
13534 \begin_layout Plain Layout
13540 means that the left margin depends on the string entered in the
13541 \begin_inset Flex MenuItem
13544 \begin_layout Plain Layout
13545 Edit\SpecialChar \menuseparator
13547 \begin_inset space ~
13556 This is used to typeset nice lists without tabulators.
13559 \begin_layout Description
13560 \begin_inset Flex Code
13563 \begin_layout Plain Layout
13569 means that the margin depends on the size of the label.
13570 This is used for automatic enumerated headlines.
13571 It is obvious that the headline
13572 \begin_inset Quotes eld
13575 5.4.3.2.1 Very long headline
13576 \begin_inset Quotes erd
13579 must have a wider left margin (as wide as
13580 \begin_inset Quotes eld
13584 \begin_inset Quotes erd
13587 plus the space) than
13588 \begin_inset Quotes eld
13591 3.2 Very long headline
13592 \begin_inset Quotes erd
13596 \begin_inset Quotes eld
13600 \begin_inset Quotes erd
13603 are not able to do this.
13606 \begin_layout Description
13607 \begin_inset Flex Code
13610 \begin_layout Plain Layout
13616 is similar, but only the very first row of the paragraph is dynamic, while
13617 the others are static; this is used, for example, for descriptions.
13620 \begin_layout Description
13621 \begin_inset Flex Code
13624 \begin_layout Plain Layout
13630 means the margin is chosen in a way that the longest row of this paragraph
13631 fits to the right margin.
13632 This is used to typeset an address on the right edge of the page.
13636 \begin_layout Description
13637 \begin_inset Flex Code
13640 \begin_layout Plain Layout
13647 \begin_inset Flex Code
13650 \begin_layout Plain Layout
13659 \begin_inset space \thinspace{}
13663 \begin_inset Flex Code
13666 \begin_layout Plain Layout
13672 ] Whether fragile commands in this style should be
13673 \begin_inset Flex Code
13676 \begin_layout Plain Layout
13689 whether this command should itself be protected.)
13692 \begin_layout Description
13693 \begin_inset Flex Code
13696 \begin_layout Plain Layout
13703 \begin_inset Flex Code
13706 \begin_layout Plain Layout
13713 \begin_inset space \thinspace{}
13717 \begin_inset Flex Code
13720 \begin_layout Plain Layout
13728 ] Whether newlines are translated into LaTeX newlines (
13729 \begin_inset Flex Code
13732 \begin_layout Plain Layout
13743 The translation can be switched off to allow more comfortable LaTeX editing
13747 \begin_layout Description
13748 \begin_inset Flex Code
13751 \begin_layout Plain Layout
13758 \begin_inset Flex Code
13761 \begin_layout Plain Layout
13770 \begin_inset space \thinspace{}
13774 \begin_inset Flex Code
13777 \begin_layout Plain Layout
13783 ] If set to true, and if
13784 \begin_inset Flex Code
13787 \begin_layout Plain Layout
13794 \begin_inset Flex Code
13797 \begin_layout Plain Layout
13803 ) paragraphs are being indented, then the indentation of such a paragraph
13804 following one of this type will be suppressed.
13805 (So this will not affect the display of non-default paragraphs.)
13808 \begin_layout Description
13809 \begin_inset Flex Code
13812 \begin_layout Plain Layout
13819 \begin_inset Flex Code
13822 \begin_layout Plain Layout
13828 ] Name of a style that has replaced this style.
13829 This is used to rename a style, while keeping backward compatibility.
13832 \begin_layout Description
13834 \change_deleted -712698321 1353679722
13835 \begin_inset Flex Code
13838 \begin_layout Plain Layout
13845 \begin_inset Flex Code
13848 \begin_layout Plain Layout
13854 ] The number of optional arguments that can be used with this style.
13855 This is useful for things like section headings, and only makes sense with
13857 Note that, on output, the optional arguments will all precede any required
13858 arguments (see below).
13859 So one can have constructs like:
13863 \begin_layout LyX-Code
13865 \change_deleted -712698321 1353679722
13868 mycmd[opt1]{req1}{contents of paragraph}
13871 \begin_layout Standard
13873 \change_deleted -712698321 1353679722
13874 but one cannot have things like:
13877 \begin_layout LyX-Code
13879 \change_deleted -712698321 1353679722
13882 mycmd[opt1]{req1}[opt2]{contents of paragraph}
13885 \begin_layout Standard
13887 \change_deleted -712698321 1353679722
13888 at least, not without ERT (with which you can have anything).
13895 \begin_layout Description
13896 \begin_inset Flex Code
13899 \begin_layout Plain Layout
13906 \begin_inset Flex Code
13909 \begin_layout Plain Layout
13918 \begin_inset space \thinspace{}
13922 \begin_inset Flex Code
13925 \begin_layout Plain Layout
13931 ] Indicates that paragraphs will not be separated by an empty line in LaTeX
13932 output, but only by a line break; together with
13933 \begin_inset Flex Code
13936 \begin_layout Plain Layout
13942 , this allows to emulate a plain text editor (like the ERT inset).
13945 \begin_layout Description
13946 \begin_inset Flex Code
13949 \begin_layout Plain Layout
13956 \begin_inset Flex Code
13959 \begin_layout Plain Layout
13965 ] The indent of the very first line of a paragraph.
13967 \begin_inset Newline newline
13971 \begin_inset Flex Code
13974 \begin_layout Plain Layout
13980 will be fixed for a certain style.
13981 The exception is the default style, since the indentation for these paragraphs
13982 can be prohibited with
13983 \begin_inset Flex Code
13986 \begin_layout Plain Layout
13994 \begin_inset Flex Code
13997 \begin_layout Plain Layout
14003 style paragraphs inside environments use the
14004 \begin_inset Flex Code
14007 \begin_layout Plain Layout
14013 of the environment, not their native one.
14015 \begin_inset Flex Code
14018 \begin_layout Plain Layout
14024 paragraphs inside an enumeration are not indented.
14027 \begin_layout Description
14028 \begin_inset Flex Code
14031 \begin_layout Plain Layout
14038 \begin_inset Flex Code
14041 \begin_layout Plain Layout
14047 ] The vertical space between two paragraphs of this style.
14050 \begin_layout Description
14051 \begin_inset Flex Code
14054 \begin_layout Plain Layout
14061 \begin_inset Flex Code
14064 \begin_layout Plain Layout
14070 ] LyX allows the user to choose either
14071 \begin_inset Quotes eld
14075 \begin_inset Quotes erd
14079 \begin_inset Quotes eld
14083 \begin_inset Quotes erd
14086 to separate paragraphs.
14088 \begin_inset Quotes eld
14092 \begin_inset Quotes erd
14096 \begin_inset Flex Code
14099 \begin_layout Plain Layout
14107 \begin_inset Quotes eld
14111 \begin_inset Quotes erd
14115 \begin_inset Flex Code
14118 \begin_layout Plain Layout
14124 is ignored and all paragraphs are separated by the
14125 \begin_inset Flex Code
14128 \begin_layout Plain Layout
14135 The vertical space is calculated with
14136 \begin_inset Flex Code
14139 \begin_layout Plain Layout
14141 \begin_inset space ~
14150 \begin_inset Flex Code
14153 \begin_layout Plain Layout
14159 is the height of a row with the normal font.
14160 This way, the look stays the same with different screen fonts.
14163 \begin_layout Description
14164 \begin_inset Flex Code
14167 \begin_layout Plain Layout
14174 \begin_inset Flex Code
14177 \begin_layout Plain Layout
14186 \begin_inset space \thinspace{}
14190 \begin_inset Flex Code
14193 \begin_layout Plain Layout
14199 ] Whether the contents of this paragraph should be output in raw form, meaning
14200 without special translations that LaTeX would require.
14203 \begin_layout Description
14204 \begin_inset Flex Code
14207 \begin_layout Plain Layout
14213 Information to be included in the LaTeX preamble when this style is used.
14214 Used to define macros, load packages, etc., required by this particular
14217 \begin_inset Quotes eld
14221 \begin_inset Flex Code
14224 \begin_layout Plain Layout
14231 \begin_inset Quotes erd
14237 \begin_layout Description
14238 \begin_inset Flex Code
14241 \begin_layout Plain Layout
14248 \begin_inset Flex Code
14251 \begin_layout Plain Layout
14257 ] The prefix to use when creating labels referring to paragraphs of this
14259 This allows the use of formatted references.
14262 \begin_layout Description
14264 \change_deleted -712698321 1353681258
14265 \begin_inset Flex Code
14268 \begin_layout Plain Layout
14275 \begin_inset Flex Code
14278 \begin_layout Plain Layout
14284 ] The number of required arguments that the LaTeX command or environment
14285 corresponding to this style expects.
14286 In the case of a command, these are required arguments
14290 that associated with the content of the paragraph itself.
14291 These do not actually have to be provided: LyX will output empty arguments
14293 Note that optional arguments will be output before required arguments.
14294 See the discussion of the
14295 \begin_inset Flex Code
14298 \begin_layout Plain Layout
14304 tag above for more information.
14309 \begin_layout Description
14310 \begin_inset Flex Code
14313 \begin_layout Plain Layout
14320 \begin_inset Flex Code
14323 \begin_layout Plain Layout
14329 ] Whether the style requires the feature
14330 \begin_inset Flex Code
14333 \begin_layout Plain Layout
14340 See the description of
14341 \begin_inset Flex Code
14344 \begin_layout Plain Layout
14351 \begin_inset space ~
14355 \begin_inset CommandInset ref
14357 reference "sub:General-text-class"
14361 ) for information on `features'.
14364 \begin_layout Description
14366 \change_inserted -712698321 1353693371
14367 \begin_inset Flex Code
14370 \begin_layout Plain Layout
14372 \change_inserted -712698321 1353693146
14381 \begin_inset Flex Code
14384 \begin_layout Plain Layout
14386 \change_inserted -712698321 1353693235
14395 \begin_inset Flex Code
14398 \begin_layout Plain Layout
14400 \change_inserted -712698321 1353693235
14406 ] Resets the LaTeX arguments of this style (as defined via the
14407 \begin_inset Flex Code
14410 \begin_layout Plain Layout
14412 \change_inserted -712698321 1353693371
14421 This is useful if you have copied a style via
14422 \begin_inset Flex Code
14425 \begin_layout Plain Layout
14427 \change_inserted -712698321 1353693302
14435 , but you do not want to inherit its (required and optional) arguments.
14440 \begin_layout Description
14442 \change_inserted -712698321 1354263074
14443 \begin_inset Flex Code
14446 \begin_layout Plain Layout
14448 \change_inserted -712698321 1353866876
14455 \begin_inset Flex Code
14458 \begin_layout Plain Layout
14460 \change_inserted -712698321 1353866873
14466 ] A string that is put at the end of the layout content.
14467 A line break in the output can be indicated by
14468 \begin_inset Flex Code
14471 \begin_layout Plain Layout
14473 \change_inserted -712698321 1354263069
14484 \begin_layout Description
14485 \begin_inset Flex Code
14488 \begin_layout Plain Layout
14495 \begin_inset Flex Code
14498 \begin_layout Plain Layout
14505 \begin_inset Flex Code
14508 \begin_layout Plain Layout
14517 \begin_layout Description
14518 \begin_inset Flex Code
14521 \begin_layout Plain Layout
14528 \begin_inset Flex Code
14531 \begin_layout Plain Layout
14540 \begin_inset Flex Code
14543 \begin_layout Plain Layout
14550 \begin_inset Flex Code
14553 \begin_layout Plain Layout
14560 \begin_inset Flex Code
14563 \begin_layout Plain Layout
14565 \begin_inset space ~
14573 ] This defines what the default spacing should be in the style.
14575 \begin_inset Flex Code
14578 \begin_layout Plain Layout
14585 \begin_inset Flex Code
14588 \begin_layout Plain Layout
14595 \begin_inset Flex Code
14598 \begin_layout Plain Layout
14604 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14605 If you specify the argument
14606 \begin_inset Flex Code
14609 \begin_layout Plain Layout
14615 , then you must also provide a value argument which will be the actual multiplie
14617 Note that, contrary to other parameters,
14618 \begin_inset Flex Code
14621 \begin_layout Plain Layout
14627 implies the generation of specific LaTeX code, using the LaTeX package
14631 \begin_inset Flex Code
14634 \begin_layout Plain Layout
14643 \begin_layout Description
14644 \begin_inset Flex Code
14647 \begin_layout Plain Layout
14654 \begin_inset Flex Code
14657 \begin_layout Plain Layout
14664 \begin_inset space \thinspace{}
14668 \begin_inset Flex Code
14671 \begin_layout Plain Layout
14679 ] Allow spell-checking paragraphs of this style.
14683 \begin_layout Description
14684 \begin_inset Flex Code
14687 \begin_layout Plain Layout
14693 The font used for the text body .
14695 \begin_inset CommandInset ref
14697 reference "sub:Font-description"
14704 \begin_layout Description
14705 \begin_inset Flex Code
14708 \begin_layout Plain Layout
14717 \begin_inset Flex Code
14720 \begin_layout Plain Layout
14730 The level of the style in the table of contents.
14731 This is used for automatic numbering of section headings.
14734 \begin_layout Description
14735 \begin_inset Flex Code
14738 \begin_layout Plain Layout
14745 \begin_inset Flex Code
14748 \begin_layout Plain Layout
14754 ] The vertical space with which the very first of a chain of paragraphs
14755 with this style is separated from the previous paragraph.
14756 If the previous paragraph has another style, the separations are not simply
14757 added, but the maximum is taken.
14760 \begin_layout Subsection
14761 \begin_inset CommandInset label
14767 Internationalization of Paragraph Styles
14770 \begin_layout Standard
14771 LyX has long supported internationalization of layout information, but,
14772 until version 2.0, this applied only to the user interface and not to, say,
14774 Thus, French authors were forced to resort to ugly hacks if they wanted
14779 1' instead of `Theorem 1'.
14780 Thanks to Georg Baum, that is no longer the case.
14783 \begin_layout Standard
14785 \begin_inset Flex Code
14788 \begin_layout Plain Layout
14794 defines text that is to appear in the typeset document, it may use
14795 \begin_inset Flex Code
14798 \begin_layout Plain Layout
14805 \begin_inset Flex Code
14808 \begin_layout Plain Layout
14814 to support non-English and even multi-language documents correctly.
14815 The following excerpt (from the
14816 \begin_inset Flex Code
14819 \begin_layout Plain Layout
14825 file) shows how this works:
14828 \begin_layout LyX-Code
14833 \begin_layout LyX-Code
14836 theoremstyle{remark}
14839 \begin_layout LyX-Code
14842 newtheorem{claim}[thm]{
14849 \begin_layout LyX-Code
14853 \begin_layout LyX-Code
14857 \begin_layout LyX-Code
14862 claimname}{_(Claim)}
14865 \begin_layout LyX-Code
14869 \begin_layout LyX-Code
14873 \begin_layout LyX-Code
14882 claimname}{_(Claim)}}
14885 \begin_layout LyX-Code
14890 \begin_layout Standard
14891 In principle, any legal LaTeX may appear in the
14892 \begin_inset Flex Code
14895 \begin_layout Plain Layout
14902 \begin_inset Flex Code
14905 \begin_layout Plain Layout
14911 tags, but in practice they will typically look as they do here.
14912 The key to correct translation of the typeset text is the definition of
14914 \begin_inset Flex Code
14917 \begin_layout Plain Layout
14926 \begin_inset Flex Code
14929 \begin_layout Plain Layout
14941 \begin_layout Standard
14943 \begin_inset Flex Code
14946 \begin_layout Plain Layout
14952 tag provides for internationalization based upon the overall language of
14954 The contents of the tag will be included in the preamble, just as with
14956 \begin_inset Flex Code
14959 \begin_layout Plain Layout
14966 What makes it special is the use of the
14967 \begin_inset Quotes eld
14971 \begin_inset Quotes erd
14975 \begin_inset Flex Code
14978 \begin_layout Plain Layout
14984 , which will be replaced, when LyX produces LaTeX output, with the translation
14985 of its argument into the document language.
14988 \begin_layout Standard
14990 \begin_inset Flex Code
14993 \begin_layout Plain Layout
14999 tag is more complex, since it is meant to provide support for multi-language
15000 documents and so offers an interface to the
15001 \begin_inset Flex Code
15004 \begin_layout Plain Layout
15011 Its contents will be added to the preamble once for each language that
15012 appears in the document.
15013 In this case, the argument to
15014 \begin_inset Flex Code
15017 \begin_layout Plain Layout
15023 will be replaced with its translation into the language in question; the
15025 \begin_inset Flex Code
15028 \begin_layout Plain Layout
15034 is replaced by the language name (as used by the babel package).
15037 \begin_layout Standard
15038 A German document that also included a French section would thus have the
15039 following in the preamble:
15042 \begin_layout LyX-Code
15051 claimname}{Affirmation}}
15052 \begin_inset Newline newline
15063 claimname}{Behauptung}}
15064 \begin_inset Newline newline
15071 claimname}{Behauptung}
15074 \begin_layout Standard
15076 \begin_inset Flex Code
15079 \begin_layout Plain Layout
15085 will then conspire to produce the correct text in the output.
15088 \begin_layout Standard
15089 One important point to note here is that the translations are provided by
15090 LyX itself, through the
15091 \change_inserted -195340706 1334775793
15093 \begin_inset Flex Code
15096 \begin_layout Plain Layout
15098 \change_inserted -195340706 1334775793
15105 \change_deleted -195340706 1334775793
15106 same mechanism it uses for internationalization of the user interface
15109 This means, in effect, that
15110 \begin_inset Flex Code
15113 \begin_layout Plain Layout
15120 \begin_inset Flex Code
15123 \begin_layout Plain Layout
15129 are really only of use in layout files that are provided with LyX, since
15130 text entered in user-created layout files will not be seen by LyX's internation
15132 \change_inserted -195340706 1334775793
15134 \begin_inset Flex Code
15137 \begin_layout Plain Layout
15139 \change_inserted -195340706 1334775793
15145 file is modified accordingly
15148 That said, however, any layout created with the intention that it will
15149 be included with LyX should use these tags where appropriate.
15151 \change_inserted -195340706 1334775793
15152 Please note that the paragraph style translations provided by LyX will
15153 never change with a minor update (e.g.
15154 from version 2.1.x to 2.1.y).
15155 It is however quite likely that a major update (e.g.
15156 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15161 \begin_layout Subsection
15163 \begin_inset CommandInset label
15172 \begin_layout Standard
15173 It is necessary to define the floats (
15174 \begin_inset Flex MenuItem
15177 \begin_layout Plain Layout
15184 \begin_inset Flex MenuItem
15187 \begin_layout Plain Layout
15193 , \SpecialChar \ldots{}
15194 ) in the text class itself.
15195 Standard floats are included in the file
15196 \begin_inset Flex Code
15199 \begin_layout Plain Layout
15205 , so you may have to do no more than add
15208 \begin_layout LyX-Code
15209 Input stdfloats.inc
15212 \begin_layout Standard
15213 to your layout file.
15214 If you want to implement a text class that proposes some other float types
15215 (like the AGU class bundled with LyX), the information below will hopefully
15219 \begin_layout Description
15220 \begin_inset Flex Code
15223 \begin_layout Plain Layout
15230 \begin_inset Flex Code
15233 \begin_layout Plain Layout
15240 \begin_inset Quotes erd
15244 \begin_inset Quotes erd
15247 ] The file name extension of an auxiliary file for the list of figures (or
15249 LaTeX writes the captions to this file.
15252 \begin_layout Description
15253 \begin_inset Flex Code
15256 \begin_layout Plain Layout
15263 \begin_inset Flex Code
15266 \begin_layout Plain Layout
15273 \begin_inset Quotes erd
15277 \begin_inset Quotes erd
15280 ] The string that will be used in the menus and also for the caption.
15281 This is translated to the current language if babel is used.
15284 \begin_layout Description
15285 \begin_inset Flex Code
15288 \begin_layout Plain Layout
15294 These tags control the XHTML output.
15296 \begin_inset space ~
15300 \begin_inset CommandInset ref
15302 reference "sec:Tags-for-XHTML"
15309 \begin_layout Description
15310 \begin_inset Flex Code
15313 \begin_layout Plain Layout
15322 \begin_inset Flex Code
15325 \begin_layout Plain Layout
15334 \begin_inset space \thinspace{}
15338 \begin_inset Flex Code
15341 \begin_layout Plain Layout
15347 ] Indicates whether the float is already defined in the document class or
15348 if instead the LaTeX package
15349 \begin_inset Flex Code
15352 \begin_layout Plain Layout
15358 needs to be loaded to define it on-the-fly.
15360 \begin_inset Flex Code
15363 \begin_layout Plain Layout
15370 \begin_inset Flex Code
15373 \begin_layout Plain Layout
15380 It should be set to
15381 \begin_inset Flex Code
15384 \begin_layout Plain Layout
15390 if the float is already defined by the LaTeX document class.
15393 \begin_layout Description
15394 \begin_inset Flex Code
15397 \begin_layout Plain Layout
15404 \begin_inset Flex Code
15407 \begin_layout Plain Layout
15414 \begin_inset Quotes erd
15418 \begin_inset Quotes erd
15421 ] The command used to generate a list of floats of this type; the leading
15430 \begin_inset Flex Code
15433 \begin_layout Plain Layout
15439 is false, since there is no standard way to generate this command.
15441 \begin_inset Flex Code
15444 \begin_layout Plain Layout
15450 is true, since in that case there is a standard way to define the command.
15453 \begin_layout Description
15454 \begin_inset Flex Code
15457 \begin_layout Plain Layout
15464 \begin_inset Flex Code
15467 \begin_layout Plain Layout
15474 \begin_inset Quotes erd
15478 \begin_inset Quotes erd
15481 ] A title for a list of floats of this kind (list of figures, tables, or
15483 It is used for the screen label within LyX, it is used by LaTeX for the
15484 title and it is used as the title in the XHTML output.
15485 It will be translated to the document language.
15488 \begin_layout Description
15489 \begin_inset Flex Code
15492 \begin_layout Plain Layout
15499 \begin_inset Flex Code
15502 \begin_layout Plain Layout
15509 \begin_inset Quotes erd
15513 \begin_inset Quotes erd
15516 ] This (optional) argument determines whether floats of this class will
15517 be numbered within some sectional unit of the document.
15519 \begin_inset Flex Code
15522 \begin_layout Plain Layout
15529 \begin_inset Quotes eld
15533 \begin_inset Flex Code
15536 \begin_layout Plain Layout
15543 \begin_inset Quotes erd
15546 , the floats will be numbered within chapters.
15550 \begin_layout Description
15551 \begin_inset Flex Code
15554 \begin_layout Plain Layout
15561 \begin_inset Flex Code
15564 \begin_layout Plain Layout
15571 \begin_inset Quotes erd
15575 \begin_inset Quotes erd
15578 ] The default placement for the given class of floats.
15579 The string should be as in standard LaTeX:
15580 \begin_inset Flex Code
15583 \begin_layout Plain Layout
15590 \begin_inset Flex Code
15593 \begin_layout Plain Layout
15600 \begin_inset Flex Code
15603 \begin_layout Plain Layout
15610 \begin_inset Flex Code
15613 \begin_layout Plain Layout
15619 for top, bottom, page, and here, respectively.
15623 \begin_layout Plain Layout
15624 Note that the order of these letters in the string is irrelevant, like in
15630 On top of that there is a new type,
15631 \begin_inset Flex Code
15634 \begin_layout Plain Layout
15640 , which does not really correspond to a float, since it means: put it
15641 \begin_inset Quotes eld
15645 \begin_inset Quotes erd
15649 Note however that the
15650 \begin_inset Flex Code
15653 \begin_layout Plain Layout
15659 specifier is special and, because of implementation details, cannot be
15660 used in non-built in float types.
15661 If you do not understand what this means, just use
15662 \begin_inset Quotes eld
15666 \begin_inset Flex Code
15669 \begin_layout Plain Layout
15676 \begin_inset Quotes erd
15682 \begin_layout Description
15683 \begin_inset Flex Code
15686 \begin_layout Plain Layout
15693 \begin_inset Flex Code
15696 \begin_layout Plain Layout
15702 ] The prefix to use when creating labels referring to floats of this type.
15703 This allows the use of formatted references.
15704 Note that you can remove any
15705 \begin_inset Flex Code
15708 \begin_layout Plain Layout
15714 set by a copied style by using the special value
15715 \begin_inset Quotes eld
15719 \begin_inset Quotes erd
15722 , which must be all caps.
15725 \begin_layout Description
15726 \begin_inset Flex Code
15729 \begin_layout Plain Layout
15736 \begin_inset Flex Code
15739 \begin_layout Plain Layout
15746 \begin_inset Quotes erd
15750 \begin_inset Quotes erd
15753 ] The style used when defining the float using
15754 \begin_inset Flex Code
15757 \begin_layout Plain Layout
15768 \begin_layout Description
15769 \begin_inset Flex Code
15772 \begin_layout Plain Layout
15779 \begin_inset Flex Code
15782 \begin_layout Plain Layout
15789 \begin_inset Quotes erd
15793 \begin_inset Quotes erd
15797 \begin_inset Quotes eld
15801 \begin_inset Quotes erd
15804 of the new class of floats, like program or algorithm.
15805 After the appropriate
15806 \begin_inset Flex Code
15809 \begin_layout Plain Layout
15818 \begin_inset Flex Code
15821 \begin_layout Plain Layout
15830 \begin_inset Flex Code
15833 \begin_layout Plain Layout
15844 \begin_layout Description
15845 \begin_inset Flex Code
15848 \begin_layout Plain Layout
15855 \begin_inset Flex Code
15858 \begin_layout Plain Layout
15865 \begin_inset space \thinspace{}
15869 \begin_inset Flex Code
15872 \begin_layout Plain Layout
15880 ] Specifies whether this float is defined using the LaTeX package
15881 \begin_inset Flex Code
15884 \begin_layout Plain Layout
15890 , either by the class file, another package or on-the-fly by LyX itself.
15893 \begin_layout Standard
15894 Note that defining a float with type
15895 \begin_inset Flex Code
15898 \begin_layout Plain Layout
15906 automatically defines the corresponding counter with name
15907 \begin_inset Flex Code
15910 \begin_layout Plain Layout
15921 \begin_layout Subsection
15922 Flex insets and InsetLayout
15923 \begin_inset CommandInset label
15925 name "sub:Flex-insets-and"
15932 \begin_layout Standard
15933 Flex insets come in three different kinds:
15936 \begin_layout Itemize
15938 \begin_inset Flex Code
15941 \begin_layout Plain Layout
15947 ): These define semantic markup corresponding to such LaTeX commands as
15949 \begin_inset Flex Code
15952 \begin_layout Plain Layout
15961 \begin_inset Flex Code
15964 \begin_layout Plain Layout
15975 \begin_layout Itemize
15977 \begin_inset Flex Code
15980 \begin_layout Plain Layout
15986 ): These can be used to define custom collapsible insets, similar to TeX
15987 code, footnote, and the like.
15988 An obvious example is an endnote inset, which is defined in the
15989 \begin_inset Flex Code
15992 \begin_layout Plain Layout
16001 \begin_layout Itemize
16003 \begin_inset Flex Code
16006 \begin_layout Plain Layout
16012 ): For use with DocBook classes.
16015 \begin_layout Standard
16016 Flex insets are defined using the
16017 \begin_inset Flex Code
16020 \begin_layout Plain Layout
16026 tag, which shall be explained in a moment.
16029 \begin_layout Standard
16031 \begin_inset Flex Code
16034 \begin_layout Plain Layout
16040 tag also serves another function: It can be used to customize the general
16041 layout of many different types of insets.
16043 \begin_inset Flex Code
16046 \begin_layout Plain Layout
16052 can be used to customize the layout parameters for footnotes, marginal
16053 notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
16054 boxes, tables, algorithms, URLs, and
16055 \change_deleted -712698321 1356964515
16057 \change_inserted -712698321 1356964516
16060 s, as well as to define Flex insets.
16063 \begin_layout Standard
16065 \begin_inset Flex Code
16068 \begin_layout Plain Layout
16074 definition must begin with a line of the form:
16077 \begin_layout LyX-Code
16081 \begin_layout Standard
16083 \begin_inset Flex Code
16086 \begin_layout Plain Layout
16092 indicates the inset whose layout is being defined, and here there are
16093 \change_deleted -712698321 1356964888
16095 \change_inserted -712698321 1356964888
16097 \change_deleted 5863208 1334489267
16103 \begin_layout Enumerate
16104 The layout for a pre-existing inset is being modified.
16105 In this case, can be
16106 \begin_inset Flex Code
16109 \begin_layout Plain Layout
16115 any one of the following:
16116 \begin_inset Flex Code
16119 \begin_layout Plain Layout
16126 \begin_inset Flex Code
16129 \begin_layout Plain Layout
16136 \begin_inset Flex Code
16139 \begin_layout Plain Layout
16146 \begin_inset Flex Code
16149 \begin_layout Plain Layout
16156 \change_inserted -712698321 1356964563
16158 \begin_inset Flex Code
16161 \begin_layout Plain Layout
16163 \change_inserted -712698321 1356964560
16174 \begin_inset Flex Code
16177 \begin_layout Plain Layout
16184 \begin_inset Flex Code
16187 \begin_layout Plain Layout
16194 \begin_inset Flex Code
16197 \begin_layout Plain Layout
16204 \begin_inset Flex Code
16207 \begin_layout Plain Layout
16214 \begin_inset Flex Code
16217 \begin_layout Plain Layout
16224 \begin_inset Flex Code
16227 \begin_layout Plain Layout
16234 \begin_inset Flex Code
16237 \begin_layout Plain Layout
16244 \begin_inset Flex Code
16247 \begin_layout Plain Layout
16254 \begin_inset Flex Code
16257 \begin_layout Plain Layout
16264 \begin_inset Flex Code
16267 \begin_layout Plain Layout
16274 \begin_inset Flex Code
16277 \begin_layout Plain Layout
16284 \begin_inset Flex Code
16287 \begin_layout Plain Layout
16294 \begin_inset Flex Code
16297 \begin_layout Plain Layout
16304 \change_deleted -712698321 1356964592
16306 \begin_inset Flex Code
16309 \begin_layout Plain Layout
16311 \change_deleted -712698321 1353866704
16315 \change_inserted -712698321 1353866707
16326 \begin_inset Flex Code
16329 \begin_layout Plain Layout
16336 \begin_inset Flex Code
16339 \begin_layout Plain Layout
16348 \begin_layout Enumerate
16349 The layout for a Flex inset is being defined.
16351 \begin_inset Flex Code
16354 \begin_layout Plain Layout
16360 must be of the form
16361 \begin_inset Quotes eld
16365 \begin_inset Flex Code
16368 \begin_layout Plain Layout
16375 \begin_inset Quotes erd
16379 \begin_inset Flex Code
16382 \begin_layout Plain Layout
16388 may be be any valid identifier not used by a pre-existing Flex inset.
16389 The identifier may include spaces, but in that case the whole thing must
16390 be wrapped in quotes.
16391 Note that the definition of a flex inset
16396 \begin_inset Flex Code
16399 \begin_layout Plain Layout
16405 entry, declaring which type of inset it defines.
16406 \change_inserted 5863208 1334489312
16410 \begin_layout Enumerate
16412 \change_inserted 5863208 1334492248
16413 The layout for user specific branch is being defined.
16415 \begin_inset Flex Code
16418 \begin_layout Plain Layout
16420 \change_inserted 5863208 1334489384
16426 must be of the form
16427 \begin_inset Quotes eld
16431 \begin_inset Flex Code
16434 \begin_layout Plain Layout
16436 \change_inserted 5863208 1334489392
16443 \begin_inset Quotes erd
16447 \begin_inset Flex Code
16450 \begin_layout Plain Layout
16452 \change_inserted 5863208 1334489384
16458 may be be any valid identifier of branch defined in user's document.
16459 The identifier may include spaces, but in that case the whole thing must
16460 be wrapped in quotes.
16461 The main purpose of this feature is to allow LaTeX wrapping around specific
16462 branches as user needs.
16463 \change_inserted -712698321 1356964893
16467 \begin_layout Enumerate
16469 \change_inserted -712698321 1356965125
16470 The layout of a user (or class) specific caption is being defined.
16472 \begin_inset Flex Code
16475 \begin_layout Plain Layout
16477 \change_inserted -712698321 1356964939
16483 must be of the form
16484 \begin_inset Quotes eld
16488 \begin_inset Flex Code
16491 \begin_layout Plain Layout
16493 \change_inserted -712698321 1356964943
16500 \begin_inset Quotes erd
16504 \begin_inset Flex Code
16507 \begin_layout Plain Layout
16509 \change_inserted -712698321 1356964939
16515 specifies the name of the caption as it appears in the menu.
16516 Have a look at the standard caption (
16517 \begin_inset Flex Code
16520 \begin_layout Plain Layout
16522 \change_inserted -712698321 1356964987
16528 ), the specific captions of the KOMA-Script classes (
16529 \begin_inset Flex Code
16532 \begin_layout Plain Layout
16534 \change_inserted -712698321 1356965018
16541 \begin_inset Flex Code
16544 \begin_layout Plain Layout
16546 \change_inserted -712698321 1356965021
16557 \begin_inset Flex Code
16560 \begin_layout Plain Layout
16562 \change_inserted -712698321 1356965045
16568 ) for applications.
16573 \begin_layout Standard
16575 \begin_inset Flex Code
16578 \begin_layout Plain Layout
16584 definition can contain the following entries:
16587 \begin_layout Description
16589 \change_inserted -712698321 1353681390
16590 \begin_inset Flex Code
16593 \begin_layout Plain Layout
16595 \change_inserted -712698321 1353681344
16602 \begin_inset Flex Code
16605 \begin_layout Plain Layout
16607 \change_inserted -712698321 1353681344
16613 ] Defines argument number <int> of a command\SpecialChar \slash{}
16614 environment associated with
16615 the current layout.
16616 The definition must end with
16617 \begin_inset Flex Code
16620 \begin_layout Plain Layout
16622 \change_inserted -712698321 1353681344
16630 \begin_inset space ~
16634 \begin_inset CommandInset ref
16636 reference "sub:Paragraph-Styles"
16643 \begin_layout Description
16645 \change_inserted -195340706 1333913893
16646 \begin_inset Flex Code
16649 \begin_layout Plain Layout
16655 Preamble for changing languages.
16657 \begin_inset space ~
16661 \begin_inset CommandInset ref
16663 reference "sub:I18n"
16670 \begin_layout Description
16671 \begin_inset Flex Code
16674 \begin_layout Plain Layout
16681 \begin_inset Flex Code
16684 \begin_layout Plain Layout
16690 ] The color for the inset's background.
16692 \begin_inset space ~
16696 \begin_inset CommandInset ref
16698 reference "chap:Names-of-colors"
16702 for a list of the available color names.
16705 \begin_layout Description
16706 \begin_inset Flex Code
16709 \begin_layout Plain Layout
16716 \begin_inset Flex Code
16719 \begin_layout Plain Layout
16728 \begin_inset space \thinspace{}
16732 \begin_inset Flex Code
16735 \begin_layout Plain Layout
16741 ] Whether to use the content of the inset as the label, when the inset is
16746 \begin_layout Description
16747 \begin_inset Flex Code
16750 \begin_layout Plain Layout
16757 \begin_inset Flex Code
16760 \begin_layout Plain Layout
16766 ] As with paragraph styles, see sec.
16767 \begin_inset space ~
16771 \begin_inset CommandInset ref
16773 reference "sub:Paragraph-Styles"
16778 Note that you need to specify the complete type, e.
16779 \begin_inset space \thinspace{}
16783 \begin_inset space ~
16787 \begin_inset Flex Code
16790 \begin_layout Plain Layout
16791 CopyStyle Flex:<name>
16799 \begin_layout Description
16800 \begin_inset Flex Code
16803 \begin_layout Plain Layout
16810 \begin_inset Flex Code
16813 \begin_layout Plain Layout
16822 \begin_inset space \thinspace{}
16826 \begin_inset Flex Code
16829 \begin_layout Plain Layout
16835 ] Indicates whether the user may employ the Paragraph Settings dialog to
16836 customize the paragraph.
16839 \begin_layout Description
16840 \begin_inset Flex Code
16843 \begin_layout Plain Layout
16850 \begin_inset Flex Code
16853 \begin_layout Plain Layout
16860 \begin_inset Flex Code
16863 \begin_layout Plain Layout
16870 \begin_inset Flex Code
16873 \begin_layout Plain Layout
16879 , describing the rendering style used for the inset's frame and buttons.
16880 Footnotes generally use
16881 \begin_inset Flex Code
16884 \begin_layout Plain Layout
16890 , ERT insets generally
16891 \begin_inset Flex Code
16894 \begin_layout Plain Layout
16900 , and character styles
16901 \begin_inset Flex Code
16904 \begin_layout Plain Layout
16913 \begin_layout Description
16914 \begin_inset Flex Code
16917 \begin_layout Plain Layout
16924 \begin_inset Flex Code
16927 \begin_layout Plain Layout
16936 \begin_inset space \thinspace{}
16942 \begin_inset Flex Code
16945 \begin_layout Plain Layout
16954 \begin_inset Flex Code
16957 \begin_layout Plain Layout
16964 \begin_inset Flex Code
16967 \begin_layout Plain Layout
16974 Indicates whether the environment will stand on its own in the output or
16975 will appear inline with the surrounding text.
16976 If set to false, it is supposed that the LaTeX environment ignores white
16977 space (including one newline character) after the
16978 \begin_inset Flex Code
16981 \begin_layout Plain Layout
16994 \begin_inset Flex Code
16997 \begin_layout Plain Layout
17013 \begin_layout Description
17014 \begin_inset Flex Code
17017 \begin_layout Plain Layout
17023 Required at the end of the
17024 \begin_inset Flex Code
17027 \begin_layout Plain Layout
17036 \begin_layout Description
17037 \begin_inset Flex Code
17040 \begin_layout Plain Layout
17046 The font used for both the text body
17052 \begin_inset space ~
17056 \begin_inset CommandInset ref
17058 reference "sub:Font-description"
17063 Note that defining this font automatically defines the
17064 \begin_inset Flex Code
17067 \begin_layout Plain Layout
17073 to the same value, so define this first and define
17074 \begin_inset Flex Code
17077 \begin_layout Plain Layout
17083 later if you want them to be different.
17084 \change_inserted 155139281 1354130923
17088 \begin_layout Description
17090 \change_inserted 155139281 1354130923
17091 \begin_inset Flex Code
17094 \begin_layout Plain Layout
17096 \change_inserted 155139281 1354130923
17097 ForceLocalFontSwitch
17103 \begin_inset Flex Code
17106 \begin_layout Plain Layout
17108 \change_inserted 155139281 1354130923
17117 \begin_inset Flex Code
17120 \begin_layout Plain Layout
17122 \change_inserted 155139281 1354130923
17128 ] When using babel, always use a local font switch (
17129 \begin_inset Flex Code
17132 \begin_layout Plain Layout
17134 \change_inserted 155139281 1354130923
17142 ), never a global one (such as
17143 \begin_inset Flex Code
17146 \begin_layout Plain Layout
17148 \change_inserted 155139281 1354130923
17161 \begin_layout Description
17162 \begin_inset Flex Code
17165 \begin_layout Plain Layout
17172 \begin_inset Flex Code
17175 \begin_layout Plain Layout
17184 \begin_inset space \thinspace{}
17188 \begin_inset Flex Code
17191 \begin_layout Plain Layout
17198 \begin_inset Quotes eld
17202 \begin_inset Quotes erd
17205 language, leading to Left-to-Right (Latin) output, e.
17206 \begin_inset space \thinspace{}
17210 \begin_inset space \space{}
17213 in TeX code or URL.
17217 \begin_layout Description
17218 \begin_inset Flex Code
17221 \begin_layout Plain Layout
17228 \begin_inset Flex Code
17231 \begin_layout Plain Layout
17240 \begin_inset space \thinspace{}
17244 \begin_inset Flex Code
17247 \begin_layout Plain Layout
17253 ] Indicates whether the
17254 \begin_inset Flex Code
17257 \begin_layout Plain Layout
17263 should be used or, instead, the user can change the paragraph style used
17268 \begin_layout Description
17269 \begin_inset Flex Code
17272 \begin_layout Plain Layout
17279 \begin_inset Flex Code
17282 \begin_layout Plain Layout
17291 \begin_inset space \thinspace{}
17295 \begin_inset Flex Code
17298 \begin_layout Plain Layout
17304 ] As with paragraph styles, see sec.
17305 \begin_inset space ~
17309 \begin_inset CommandInset ref
17311 reference "sub:Paragraph-Styles"
17318 \begin_layout Description
17319 \begin_inset Flex Code
17322 \begin_layout Plain Layout
17328 These tags control the XHTML output.
17330 \begin_inset space ~
17334 \begin_inset CommandInset ref
17336 reference "sec:Tags-for-XHTML"
17343 \begin_layout Description
17344 \begin_inset Flex Code
17347 \begin_layout Plain Layout
17354 \begin_inset Flex Code
17357 \begin_layout Plain Layout
17366 \begin_inset space \thinspace{}
17370 \begin_inset Flex Code
17373 \begin_layout Plain Layout
17379 ] Whether to include the contents of this inset in the strings generated
17380 for the `Outline' pane.
17381 One would not, for example, want the content of a footnote in a section
17382 header to be included in the TOC displayed in the outline, but one would
17383 normally want the content of a character style displayed.
17384 Default is false: not to include.
17387 \begin_layout Description
17388 \begin_inset Flex Code
17391 \begin_layout Plain Layout
17400 \begin_inset Flex Code
17403 \begin_layout Plain Layout
17412 \begin_inset space \thinspace{}
17416 \begin_inset Flex Code
17419 \begin_layout Plain Layout
17425 ] As with paragraph styles, see sec.
17426 \begin_inset space ~
17430 \begin_inset CommandInset ref
17432 reference "sub:Paragraph-Styles"
17439 \begin_layout Description
17440 \begin_inset Flex Code
17443 \begin_layout Plain Layout
17449 The font used for the label.
17451 \begin_inset space ~
17455 \begin_inset CommandInset ref
17457 reference "sub:Font-description"
17462 Note that this definition can never appear before
17463 \begin_inset Flex Code
17466 \begin_layout Plain Layout
17472 , lest it be ineffective.
17475 \begin_layout Description
17476 \begin_inset Flex Code
17479 \begin_layout Plain Layout
17486 \begin_inset Flex Code
17489 \begin_layout Plain Layout
17496 \begin_inset Quotes erd
17500 \begin_inset Quotes erd
17503 ] What will be displayed on the button or elsewhere as the inset label.
17505 \begin_inset Flex Code
17508 \begin_layout Plain Layout
17515 \begin_inset Flex Code
17518 \begin_layout Plain Layout
17524 ) modify this label on the fly.
17527 \begin_layout Description
17529 \change_inserted -195340706 1333913893
17530 \begin_inset Flex Code
17533 \begin_layout Plain Layout
17539 Language dependent preamble.
17541 \begin_inset space ~
17545 \begin_inset CommandInset ref
17547 reference "sub:I18n"
17554 \begin_layout Description
17555 \begin_inset Flex Code
17558 \begin_layout Plain Layout
17565 \begin_inset Flex Code
17568 \begin_layout Plain Layout
17574 ] The name of the corresponding LaTeX stuff.
17575 Either the environment or command name.
17578 \begin_layout Description
17579 \begin_inset Flex Code
17582 \begin_layout Plain Layout
17589 \begin_inset Flex Code
17592 \begin_layout Plain Layout
17598 ] The optional parameter for the corresponding
17599 \begin_inset Flex Code
17602 \begin_layout Plain Layout
17608 stuff, including possible bracket pairs like
17609 \begin_inset Flex Code
17612 \begin_layout Plain Layout
17620 \change_inserted -712698321 1355144715
17621 This will be output as is after all LaTeX
17622 \begin_inset Flex Code
17625 \begin_layout Plain Layout
17627 \change_inserted -712698321 1355144713
17636 This parameter cannot be changed from within LyX
17637 \change_inserted -712698321 1355144775
17639 \begin_inset Flex Code
17642 \begin_layout Plain Layout
17644 \change_inserted -712698321 1355144747
17650 for customizable parameters)
17655 \begin_layout Description
17656 \begin_inset Flex Code
17659 \begin_layout Plain Layout
17666 \begin_inset Flex Code
17669 \begin_layout Plain Layout
17671 \change_deleted -712698321 1353867544
17678 Command, Environment,
17679 \change_inserted -712698321 1353867573
17681 \change_deleted -712698321 1353867557
17690 \begin_inset Flex Code
17693 \begin_layout Plain Layout
17695 \change_deleted -712698321 1353867564
17699 \change_deleted -712698321 1353867569
17707 ] How the style should be translated into LaTeX.
17711 \begin_layout Plain Layout
17712 \begin_inset Flex Code
17715 \begin_layout Plain Layout
17721 is perhaps a bit misleading, since these rules apply to SGML classes, too.
17722 Visit the SGML class files for specific examples.
17731 \begin_layout Description
17732 \begin_inset Flex Code
17735 \begin_layout Plain Layout
17737 \change_deleted -712698321 1353867582
17739 \change_inserted -712698321 1353867583
17747 means nothing special.
17751 \begin_layout Description
17752 \begin_inset Flex Code
17755 \begin_layout Plain Layout
17762 \begin_inset Flex Code
17765 \begin_layout Plain Layout
17772 {\SpecialChar \ldots{}
17781 \begin_layout Description
17782 \begin_inset Flex Code
17785 \begin_layout Plain Layout
17792 \begin_inset Flex Code
17795 \begin_layout Plain Layout
17802 }\SpecialChar \ldots{}
17818 \begin_layout Description
17820 \change_deleted -712698321 1353867600
17821 \begin_inset Flex Code
17824 \begin_layout Plain Layout
17831 \begin_inset Flex Code
17834 \begin_layout Plain Layout
17841 \begin_inset Flex Code
17844 \begin_layout Plain Layout
17852 is generated for each paragraph of this environment.
17856 \begin_layout Description
17858 \change_deleted -712698321 1353867600
17859 \begin_inset Flex Code
17862 \begin_layout Plain Layout
17869 \begin_inset Flex Code
17872 \begin_layout Plain Layout
17879 \begin_inset Flex Code
17882 \begin_layout Plain Layout
17888 is passed as an argument to the environment.
17890 \begin_inset Flex Code
17893 \begin_layout Plain Layout
17899 can be defined in the
17900 \begin_inset Flex MenuItem
17903 \begin_layout Plain Layout
17908 \SpecialChar \menuseparator
17914 \begin_inset space ~
17928 \begin_layout Standard
17929 Putting the last few things together, the LaTeX output will be either:
17932 \begin_layout LyX-Code
17936 \change_deleted 2090807402 1356919073
17938 \change_inserted 2090807402 1356919073
17942 \change_deleted 2090807402 1356919073
17944 \change_inserted 2090807402 1356919002
17947 ]{\SpecialChar \ldots{}
17951 \begin_layout Standard
17955 \begin_layout LyX-Code
17959 \change_deleted 2090807402 1356919013
17961 \change_inserted 2090807402 1356919014
17965 \change_deleted 2090807402 1356919013
17967 \change_inserted 2090807402 1356919008
17970 ] \SpecialChar \ldots{}
17974 \change_deleted 2090807402 1356919016
17976 \change_inserted 2090807402 1356919016
17982 \begin_layout Standard
17983 depending upon the LaTeX type.
17987 \begin_layout Description
17989 \change_inserted -712698321 1354263128
17990 \begin_inset Flex Code
17993 \begin_layout Plain Layout
17995 \change_inserted -712698321 1353866742
18004 \begin_inset Flex Code
18007 \begin_layout Plain Layout
18009 \change_inserted -712698321 1353866752
18015 ] A string that is put at the beginning of the layout content.
18016 A line break in the output can be indicated by
18017 \begin_inset Flex Code
18020 \begin_layout Plain Layout
18022 \change_inserted -712698321 1354263128
18033 \begin_layout Description
18034 \begin_inset Flex Code
18037 \begin_layout Plain Layout
18044 \begin_inset Flex Code
18047 \begin_layout Plain Layout
18054 \begin_inset Flex Code
18057 \begin_layout Plain Layout
18064 \begin_inset Flex Code
18067 \begin_layout Plain Layout
18074 \begin_inset Flex Code
18077 \begin_layout Plain Layout
18083 (indicating a dummy definition ending definitions of charstyles, etc).
18084 This entry is required in and is only meaningful for Flex insets.
18085 Among other things, it determines on which menu this inset will appear.
18087 \begin_inset Flex Code
18090 \begin_layout Plain Layout
18097 \begin_inset Flex Code
18100 \begin_layout Plain Layout
18106 will automatically set
18107 \begin_inset Flex Code
18110 \begin_layout Plain Layout
18118 \begin_inset Flex Code
18121 \begin_layout Plain Layout
18127 can be set to true for
18128 \begin_inset Flex Code
18131 \begin_layout Plain Layout
18137 insets by setting it
18142 \begin_inset Flex Code
18145 \begin_layout Plain Layout
18154 \begin_layout Description
18155 \begin_inset Flex Code
18158 \begin_layout Plain Layout
18165 \begin_inset Flex Code
18168 \begin_layout Plain Layout
18177 \begin_inset space \thinspace{}
18181 \begin_inset Flex Code
18184 \begin_layout Plain Layout
18190 ] Whether multiple paragraphs are permitted in this inset.
18192 \begin_inset Flex Code
18195 \begin_layout Plain Layout
18201 to the same value and
18202 \begin_inset Flex Code
18205 \begin_layout Plain Layout
18211 to the opposite value.
18212 These can be reset to other values, if they are used
18217 \begin_inset Flex Code
18220 \begin_layout Plain Layout
18230 \begin_layout Description
18231 \begin_inset Flex Code
18234 \begin_layout Plain Layout
18241 \begin_inset Flex Code
18244 \begin_layout Plain Layout
18253 \begin_inset space \thinspace{}
18257 \begin_inset Flex Code
18260 \begin_layout Plain Layout
18266 ] Whether fragile commands in this inset should be
18267 \begin_inset Flex Code
18270 \begin_layout Plain Layout
18283 whether the command should itself be protected.) Default is false.
18286 \begin_layout Description
18287 \begin_inset Flex Code
18290 \begin_layout Plain Layout
18297 \begin_inset Flex Code
18300 \begin_layout Plain Layout
18309 \begin_inset space \thinspace{}
18313 \begin_inset Flex Code
18316 \begin_layout Plain Layout
18322 ] As with paragraph styles, see sec.
18323 \begin_inset space ~
18327 \begin_inset CommandInset ref
18329 reference "sub:Paragraph-Styles"
18337 \begin_layout Description
18338 \begin_inset Flex Code
18341 \begin_layout Plain Layout
18348 \begin_inset Flex Code
18351 \begin_layout Plain Layout
18360 \begin_inset space \thinspace{}
18364 \begin_inset Flex Code
18367 \begin_layout Plain Layout
18373 ] As with paragraph styles, see sec.
18374 \begin_inset space ~
18378 \begin_inset CommandInset ref
18380 reference "sub:Paragraph-Styles"
18388 \begin_layout Description
18389 \begin_inset Flex Code
18392 \begin_layout Plain Layout
18398 As with paragraph styles, see sec.
18399 \begin_inset space ~
18403 \begin_inset CommandInset ref
18405 reference "sub:Paragraph-Styles"
18412 \begin_layout Description
18413 \begin_inset Flex Code
18416 \begin_layout Plain Layout
18423 \begin_inset Flex Code
18426 \begin_layout Plain Layout
18432 ] The prefix to use when creating labels referring to insets of this type.
18433 This allows the use of formatted references.
18436 \begin_layout Description
18437 \begin_inset Flex Code
18440 \begin_layout Plain Layout
18447 \begin_inset Flex Code
18450 \begin_layout Plain Layout
18456 ] As with paragraph styles, see sec.
18457 \begin_inset space ~
18461 \begin_inset CommandInset ref
18463 reference "sub:Paragraph-Styles"
18468 \change_inserted -712698321 1354439699
18472 \begin_layout Description
18474 \change_inserted -712698321 1354439705
18475 \begin_inset Flex Code
18478 \begin_layout Plain Layout
18480 \change_inserted -712698321 1354439699
18487 \begin_inset Flex Code
18490 \begin_layout Plain Layout
18492 \change_inserted -712698321 1354439699
18501 \begin_inset Flex Code
18504 \begin_layout Plain Layout
18506 \change_inserted -712698321 1354439699
18512 ] Resets the LaTeX arguments of this layout (as defined via the
18513 \begin_inset Flex Code
18516 \begin_layout Plain Layout
18518 \change_inserted -712698321 1354439699
18525 This is useful if you have copied a style via
18526 \begin_inset Flex Code
18529 \begin_layout Plain Layout
18531 \change_inserted -712698321 1354439699
18537 , but you do not want to inherit its (required and optional) arguments.
18539 \change_deleted -712698321 1354439698
18545 \begin_layout Description
18546 \begin_inset Flex Code
18549 \begin_layout Plain Layout
18556 \begin_inset Flex Code
18559 \begin_layout Plain Layout
18566 \begin_inset space \thinspace{}
18570 \begin_inset Flex Code
18573 \begin_layout Plain Layout
18581 ] Whether this inset should use the font of its surrounding environment
18583 Default is true: uses its own.
18586 \begin_layout Description
18588 \change_inserted -712698321 1354263134
18589 \begin_inset Flex Code
18592 \begin_layout Plain Layout
18594 \change_inserted -712698321 1353866810
18601 \begin_inset Flex Code
18604 \begin_layout Plain Layout
18606 \change_inserted -712698321 1353866806
18612 ] A string that is put at the end of the layout content.
18613 A line break in the output can be indicated by
18614 \begin_inset Flex Code
18617 \begin_layout Plain Layout
18619 \change_inserted -712698321 1354263134
18630 \begin_layout Description
18631 \begin_inset Flex Code
18634 \begin_layout Plain Layout
18641 \begin_inset Flex Code
18644 \begin_layout Plain Layout
18651 \begin_inset space \thinspace{}
18655 \begin_inset Flex Code
18658 \begin_layout Plain Layout
18666 ] Allow spell-checking the contents of this inset.
18670 \begin_layout Subsection
18672 \begin_inset CommandInset label
18674 name "sub:Counters"
18681 \begin_layout Standard
18682 It is necessary to define the counters (
18683 \begin_inset Flex MenuItem
18686 \begin_layout Plain Layout
18693 \begin_inset Flex MenuItem
18696 \begin_layout Plain Layout
18702 , \SpecialChar \ldots{}
18703 ) in the text class itself.
18704 The standard counters are defined in the file
18705 \begin_inset Flex Code
18708 \begin_layout Plain Layout
18714 , so you may have to do no more than add
18717 \begin_layout LyX-Code
18718 Input stdcounters.inc
18721 \begin_layout Standard
18722 to your layout file to get them to work.
18723 But if you want to define custom counters, then you can do so.
18724 The counter declaration must begin with:
18727 \begin_layout LyX-Code
18728 Counter CounterName
18731 \begin_layout Standard
18733 \begin_inset Flex Code
18736 \begin_layout Plain Layout
18742 ' is replaced by the name of the counter.
18743 And it must end with
18744 \begin_inset Quotes eld
18748 \begin_inset Flex Code
18751 \begin_layout Plain Layout
18758 \begin_inset Quotes erd
18762 The following parameters can also be used:
18765 \begin_layout Description
18766 \begin_inset Flex Code
18769 \begin_layout Plain Layout
18776 \begin_inset Flex Code
18779 \begin_layout Plain Layout
18786 \begin_inset Quotes erd
18790 \begin_inset Quotes erd
18793 ] When defined, this string defines how the counter is displayed.
18794 Setting this value sets
18795 \begin_inset Flex Code
18798 \begin_layout Plain Layout
18799 LabelStringAppendix
18805 The following special constructs can be used in the string:
18809 \begin_layout Itemize
18810 \begin_inset Flex Code
18813 \begin_layout Plain Layout
18821 will be replaced by the expansion of the
18822 \begin_inset Flex Code
18825 \begin_layout Plain Layout
18832 \begin_inset Flex Code
18835 \begin_layout Plain Layout
18836 LabelStringAppendix
18842 \begin_inset Flex Code
18845 \begin_layout Plain Layout
18855 \begin_layout Itemize
18856 counter values can be expressed using LaTeX-like macros
18857 \begin_inset Newline newline
18861 \begin_inset Flex Code
18864 \begin_layout Plain Layout
18881 \begin_inset Flex Code
18884 \begin_layout Plain Layout
18896 \begin_layout Plain Layout
18906 Actually, the situation is a bit more complicated: any
18925 other than those described below will produce arabic numerals.
18926 It would not be surprising to see this change in the future.
18932 \begin_inset Flex Code
18935 \begin_layout Plain Layout
18941 : 1, 2, 3,\SpecialChar \ldots{}
18943 \begin_inset Flex Code
18946 \begin_layout Plain Layout
18952 for lower-case letters: a, b, c, \SpecialChar \ldots{}
18954 \begin_inset Flex Code
18957 \begin_layout Plain Layout
18963 for upper-case letters: A, B, C, \SpecialChar \ldots{}
18965 \begin_inset Flex Code
18968 \begin_layout Plain Layout
18974 for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
18976 \begin_inset Flex Code
18979 \begin_layout Plain Layout
18985 for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
18987 \begin_inset Flex Code
18990 \begin_layout Plain Layout
18996 for hebrew numerals.
19000 \begin_layout Standard
19001 If LabelString is not defined, a default value is constructed as follows:
19002 if the counter has a master counter
19003 \begin_inset Flex Code
19006 \begin_layout Plain Layout
19013 \begin_inset Flex Code
19016 \begin_layout Plain Layout
19023 \begin_inset Newline newline
19027 \begin_inset Flex Code
19030 \begin_layout Plain Layout
19040 is used; otherwise the string
19041 \begin_inset Flex Code
19044 \begin_layout Plain Layout
19055 \begin_layout Description
19056 \begin_inset Flex Code
19059 \begin_layout Plain Layout
19060 LabelStringAppendix
19066 \begin_inset Flex Code
19069 \begin_layout Plain Layout
19076 \begin_inset Quotes erd
19080 \begin_inset Quotes erd
19084 \begin_inset Flex Code
19087 \begin_layout Plain Layout
19093 , but for use in the Appendix.
19096 \begin_layout Description
19097 \begin_inset Flex Code
19100 \begin_layout Plain Layout
19107 \begin_inset Flex Code
19110 \begin_layout Plain Layout
19117 \begin_inset Quotes erd
19121 \begin_inset Quotes erd
19124 ] A format for use with formatted references to this counter.
19125 For example, one might want to have references to section numbers appear
19127 \begin_inset Quotes eld
19131 \begin_inset Quotes erd
19135 The string should contain
19136 \begin_inset Quotes eld
19140 \begin_inset Quotes erd
19144 This will be replaced by the counter number itself.
19145 So, for sections, it would be: Section ##.
19148 \begin_layout Description
19149 \begin_inset Flex Code
19152 \begin_layout Plain Layout
19159 \begin_inset Flex Code
19162 \begin_layout Plain Layout
19169 \begin_inset Quotes erd
19173 \begin_inset Quotes erd
19176 ] If this is set to the name of another counter, the present counter will
19177 be reset every time the other one is increased.
19179 \begin_inset Flex Code
19182 \begin_layout Plain Layout
19189 \begin_inset Flex Code
19192 \begin_layout Plain Layout
19201 \begin_layout Subsection
19203 \begin_inset CommandInset label
19205 name "sub:Font-description"
19212 \begin_layout Standard
19213 A font description looks like this:
19216 \begin_layout LyX-Code
19230 \begin_layout LyX-Code
19234 \begin_layout LyX-Code
19238 \begin_layout Standard
19239 The following commands are available:
19242 \begin_layout Description
19243 \begin_inset Flex Code
19246 \begin_layout Plain Layout
19253 \begin_inset Flex Code
19256 \begin_layout Plain Layout
19265 \begin_inset Flex Code
19268 \begin_layout Plain Layout
19275 \begin_inset Flex Code
19278 \begin_layout Plain Layout
19285 \begin_inset Flex Code
19288 \begin_layout Plain Layout
19295 \begin_inset Flex Code
19298 \begin_layout Plain Layout
19305 \begin_inset Flex Code
19308 \begin_layout Plain Layout
19315 \begin_inset Flex Code
19318 \begin_layout Plain Layout
19325 \begin_inset Flex Code
19328 \begin_layout Plain Layout
19335 \begin_inset Flex Code
19338 \begin_layout Plain Layout
19347 \begin_layout Description
19348 \begin_inset Flex Code
19351 \begin_layout Plain Layout
19358 \begin_inset Flex Code
19361 \begin_layout Plain Layout
19370 \begin_inset Flex Code
19373 \begin_layout Plain Layout
19380 \begin_inset Flex Code
19383 \begin_layout Plain Layout
19392 \begin_layout Description
19393 \begin_inset Flex Code
19396 \begin_layout Plain Layout
19403 \begin_inset Flex Code
19406 \begin_layout Plain Layout
19412 ] Valid arguments are:
19413 \begin_inset Flex Code
19416 \begin_layout Plain Layout
19423 \begin_inset Flex Code
19426 \begin_layout Plain Layout
19433 \begin_inset Flex Code
19436 \begin_layout Plain Layout
19443 \begin_inset Flex Code
19446 \begin_layout Plain Layout
19453 \begin_inset Flex Code
19456 \begin_layout Plain Layout
19463 \begin_inset Flex Code
19466 \begin_layout Plain Layout
19473 \begin_inset Flex Code
19476 \begin_layout Plain Layout
19483 \begin_inset Flex Code
19486 \begin_layout Plain Layout
19493 \begin_inset Flex Code
19496 \begin_layout Plain Layout
19503 \begin_inset Flex Code
19506 \begin_layout Plain Layout
19513 \begin_inset Flex Code
19516 \begin_layout Plain Layout
19523 \begin_inset Flex Code
19526 \begin_layout Plain Layout
19533 Each of these turns on or off the corresponding attribute.
19535 \begin_inset Flex Code
19538 \begin_layout Plain Layout
19544 turns on emphasis, and
19545 \begin_inset Flex Code
19548 \begin_layout Plain Layout
19556 \begin_inset Newline newline
19559 If the latter seems puzzling, remember that the font settings for the present
19560 context are generally inherited from the surrounding context.
19562 \begin_inset Flex Code
19565 \begin_layout Plain Layout
19571 would turn off the emphasis that was anyway in effect, say, in a theorem
19575 \begin_layout Description
19576 \begin_inset Flex Code
19579 \begin_layout Plain Layout
19586 \begin_inset Flex Code
19589 \begin_layout Plain Layout
19598 \begin_inset Flex Code
19601 \begin_layout Plain Layout
19610 \begin_layout Description
19611 \begin_inset Flex Code
19614 \begin_layout Plain Layout
19621 \begin_inset Flex Code
19624 \begin_layout Plain Layout
19633 \begin_inset Flex Code
19636 \begin_layout Plain Layout
19643 \begin_inset Flex Code
19646 \begin_layout Plain Layout
19653 \begin_inset Flex Code
19656 \begin_layout Plain Layout
19665 \begin_layout Description
19666 \begin_inset Flex Code
19669 \begin_layout Plain Layout
19676 \begin_inset Flex Code
19679 \begin_layout Plain Layout
19686 \begin_inset Flex Code
19689 \begin_layout Plain Layout
19696 \begin_inset Flex Code
19699 \begin_layout Plain Layout
19708 \begin_inset Flex Code
19711 \begin_layout Plain Layout
19718 \begin_inset Flex Code
19721 \begin_layout Plain Layout
19728 \begin_inset Flex Code
19731 \begin_layout Plain Layout
19738 \begin_inset Flex Code
19741 \begin_layout Plain Layout
19748 \begin_inset Flex Code
19751 \begin_layout Plain Layout
19760 \begin_layout Subsection
19761 \begin_inset CommandInset label
19763 name "sub:Citation-format-description"
19767 Citation format description
19770 \begin_layout Standard
19772 \begin_inset Flex Code
19775 \begin_layout Plain Layout
19781 blocks are used to describe how bibliographic information should be displayed,
19782 both within LyX itself (in the citation dialog and in tooltips, for example)
19783 and in XHTML output.
19784 Such a block might look like this:
19787 \begin_layout LyX-Code
19791 \begin_layout LyX-Code
19795 \begin_layout LyX-Code
19799 \begin_layout LyX-Code
19803 \begin_layout Standard
19804 The individual lines define how the bibliographic information associated
19805 with an article or book, respectively, is to be displayed, and such a definitio
19806 n can be given for any `entry type' that might be present in a BibTeX file.
19807 LyX defines a default format in the source code that will be used if no
19808 specific definition has been given.
19809 LyX predefines several formats in the file
19810 \begin_inset Flex Code
19813 \begin_layout Plain Layout
19819 , which is included in most of LyX's document classes.
19822 \begin_layout Standard
19823 The definitions use a simple language that allows BibTeX keys to be replaced
19825 Keys should be enclosed in
19826 \begin_inset Flex Code
19829 \begin_layout Plain Layout
19836 \begin_inset Flex Code
19839 \begin_layout Plain Layout
19846 So a simple definition might look like this:
19849 \begin_layout LyX-Code
19851 \begin_inset Quotes eld
19855 \begin_inset Quotes erd
19861 \begin_layout Standard
19862 This would print the author, followed by a comma, followed by the title,
19863 in quotes, followed by a period.
19866 \begin_layout Standard
19867 Of course, sometimes you may want to print a key only if it exists.
19868 This can be done by using a conditional construction, such as:
19869 \begin_inset Flex Code
19872 \begin_layout Plain Layout
19874 \begin_inset space ~
19884 \begin_inset Flex Code
19887 \begin_layout Plain Layout
19893 key exists, then print
19894 \begin_inset Quotes eld
19898 \begin_inset space ~
19902 \begin_inset Quotes erd
19905 followed by the volume key.
19906 It is also possible to have an else clause in the conditional, such as:
19907 \begin_inset Newline newline
19911 \begin_inset Flex Code
19914 \begin_layout Plain Layout
19915 {%author%[[%author%]][[%editor%, ed.]]}
19921 \begin_inset Newline newline
19925 \begin_inset Flex Code
19928 \begin_layout Plain Layout
19934 key is printed if it exists; otherwise, the editor key is printed, followed
19936 \begin_inset Quotes eld
19940 \begin_inset space ~
19944 \begin_inset Quotes erd
19947 Note that the key is again enclosed in
19948 \begin_inset Flex Code
19951 \begin_layout Plain Layout
19957 signs; the entire conditional is enclosed in braces; and the if and else
19958 clauses are enclosed in double brackets,
19959 \begin_inset Quotes eld
19963 \begin_inset Flex Code
19966 \begin_layout Plain Layout
19973 \begin_inset Quotes eld
19977 \begin_inset Quotes eld
19981 \begin_inset Flex Code
19984 \begin_layout Plain Layout
19991 \begin_inset Quotes erd
19995 There must be no space between any of these.
19998 \begin_layout Standard
19999 There is one other piece of syntax available in definitions, which looks
20001 \begin_inset Flex Code
20004 \begin_layout Plain Layout
20011 This defines a piece of formatting information that is to be used when
20013 \begin_inset Quotes eld
20017 \begin_inset Quotes erd
20021 Obviously, we do not want to output HTML tags when writing plain text,
20022 so they should be wrapped in
20023 \begin_inset Quotes eld
20027 \begin_inset Quotes erd
20031 \begin_inset Quotes eld
20035 \begin_inset Quotes erd
20041 \begin_layout Standard
20042 Two special sorts of definitions are also possible in a
20043 \begin_inset Flex Code
20046 \begin_layout Plain Layout
20053 An example of the first would be:
20056 \begin_layout LyX-Code
20058 \begin_inset Quotes eld
20062 \begin_inset Quotes erd
20068 \begin_layout Standard
20069 This is an abbreviation, or macro, and it can be used by treating it as
20071 \begin_inset Flex Code
20074 \begin_layout Plain Layout
20082 \begin_inset Flex Code
20085 \begin_layout Plain Layout
20091 exactly as it would treat its definition.
20092 So, let us issue the obvious
20100 \begin_layout LyX-Code
20104 \begin_layout Standard
20105 or anything like it.
20106 LyX shouldn't go into an infinite loop, but it may go into a long one before
20110 \begin_layout Standard
20111 The second sort of special definition might look like this:
20114 \begin_layout LyX-Code
20118 \begin_layout Standard
20119 This defines a translatable piece of text, which allows relevant parts of
20120 the bibliography to be translated.
20121 It can be included in a definition by treating it as a key:
20122 \begin_inset Flex Code
20125 \begin_layout Plain Layout
20132 Several of these are predefined in
20133 \begin_inset Flex Code
20136 \begin_layout Plain Layout
20143 Note that these are not macros, in the sense just defined.
20144 They will not be expanded.
20147 \begin_layout Standard
20148 So here then is an example that use all these features:
20149 \begin_inset VSpace defskip
20155 \begin_layout Standard
20159 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20162 \begin_layout Standard
20163 \begin_inset VSpace defskip
20166 This defines a macro that prints the author, followed by a comma, if the
20168 \begin_inset Flex Code
20171 \begin_layout Plain Layout
20177 key is defined, or else prints the name of the editor, followed by the
20179 \begin_inset Flex Code
20182 \begin_layout Plain Layout
20188 or its translation (it is by default
20189 \begin_inset Quotes eld
20193 \begin_inset Quotes erd
20197 \begin_inset Flex Code
20200 \begin_layout Plain Layout
20207 Note that this is in fact defined in
20208 \begin_inset Flex Code
20211 \begin_layout Plain Layout
20217 , so you can use it in your own definitions, or re-definitions, if you load
20221 \begin_layout Section
20222 \begin_inset CommandInset label
20224 name "sec:Tags-for-XHTML"
20228 Tags for XHTML output
20231 \begin_layout Standard
20232 As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
20233 by layout information.
20234 In general, LyX provides sensible defaults and, as mentioned earlier, it
20235 will even construct default CSS style rules from the other layout tags.
20236 For example, LyX will attempt to use the information provided in the
20237 \begin_inset Flex Code
20240 \begin_layout Plain Layout
20246 declaration for the Chapter style to write CSS that will appropriately
20247 format chapter headings.
20250 \begin_layout Standard
20251 In many cases, then, you may not have to do anything at all to get acceptable
20252 XHTML output for your own environments, custom insets, and so forth.
20253 But in some cases you will, and so LyX provides a number of layout tags
20254 that can be used to customize the XHTML and CSS that are generated.
20257 \begin_layout Standard
20258 Note that there are two tags,
20259 \begin_inset Flex Code
20262 \begin_layout Plain Layout
20269 \begin_inset Flex Code
20272 \begin_layout Plain Layout
20278 that may appear outside style and inset declarations.
20280 \begin_inset CommandInset ref
20282 reference "sub:General-text-class"
20286 for details on these.
20289 \begin_layout Subsection
20290 \begin_inset CommandInset label
20292 name "sub:Paragraph-Style-XHTML"
20299 \begin_layout Standard
20300 The sort of XHTML LyX outputs for a paragraph depends upon whether we are
20301 dealing with a normal paragraph, a command, or an environment, where this
20302 is itself determined by the contents of the corresponding
20303 \begin_inset Flex Code
20306 \begin_layout Plain Layout
20316 \begin_layout Standard
20317 For a command or normal paragraph, the output XHTML has the following form:
20320 \begin_layout LyX-Code
20322 \begin_inset Quotes erd
20326 \begin_inset Quotes erd
20332 \begin_layout LyX-Code
20334 \begin_inset Quotes erd
20338 \begin_inset Quotes erd
20344 \begin_layout LyX-Code
20345 Contents of the paragraph.
20348 \begin_layout LyX-Code
20352 \begin_layout Standard
20353 The label tags are of course omitted if the paragraph does not have a label.
20356 \begin_layout Standard
20357 For an environment that is not some sort of list, the XHTML takes this form:
20360 \begin_layout LyX-Code
20362 \begin_inset Quotes erd
20366 \begin_inset Quotes erd
20372 \begin_layout LyX-Code
20374 \begin_inset Quotes erd
20378 \begin_inset Quotes erd
20382 \begin_inset Quotes erd
20386 \begin_inset Quotes erd
20389 >Environment Label</labeltag>First paragraph.</itemtag>
20392 \begin_layout LyX-Code
20393 <itemtag>Second paragraph.</itemtag>
20396 \begin_layout LyX-Code
20400 \begin_layout Standard
20401 Note that the label is output only for the first paragraph, as it should
20402 be for a theorem, for example.
20406 \begin_layout Standard
20407 For a list, we have one of these forms:
20410 \begin_layout LyX-Code
20412 \begin_inset Quotes erd
20416 \begin_inset Quotes erd
20422 \begin_layout LyX-Code
20424 \begin_inset Quotes erd
20428 \begin_inset Quotes erd
20432 \begin_inset Quotes erd
20436 \begin_inset Quotes erd
20439 >List Label</labeltag>First item.</itemtag>
20442 \begin_layout LyX-Code
20444 \begin_inset Quotes erd
20448 \begin_inset Quotes erd
20452 \begin_inset Quotes erd
20456 \begin_inset Quotes erd
20459 >List Label</labeltag>Second item.</itemtag>
20462 \begin_layout LyX-Code
20466 \begin_layout LyX-Code
20470 \begin_layout LyX-Code
20472 \begin_inset Quotes erd
20476 \begin_inset Quotes erd
20482 \begin_layout LyX-Code
20484 \begin_inset Quotes erd
20488 \begin_inset Quotes erd
20491 >List Label</labeltag><itemtag attr=
20492 \begin_inset Quotes erd
20496 \begin_inset Quotes erd
20499 >First item.</itemtag>
20502 \begin_layout LyX-Code
20504 \begin_inset Quotes erd
20508 \begin_inset Quotes erd
20511 >List Label</labeltag><itemtag attr=
20512 \begin_inset Quotes erd
20516 \begin_inset Quotes erd
20519 >Second item.</itemtag>
20522 \begin_layout LyX-Code
20526 \begin_layout Standard
20527 Note the different orders of
20528 \begin_inset Flex Code
20531 \begin_layout Plain Layout
20538 \begin_inset Flex Code
20541 \begin_layout Plain Layout
20548 Which order we get depends upon the setting of
20549 \begin_inset Flex Code
20552 \begin_layout Plain Layout
20559 \begin_inset Flex Code
20562 \begin_layout Plain Layout
20568 is false (the default), you get the first of these, with the label within
20569 the item; if true, you get the second, with the label outside the item.
20572 \begin_layout Standard
20573 The specific tags and attributes output for each paragraph type can be controlle
20574 d by means of the layout tags we are about to describe.
20575 As mentioned earlier, however, LyX uses sensible defaults for many of these,
20576 so you often may not need to do very much to get good XHTML output.
20577 Think of the available tags as there so you can tweak things to your liking.
20580 \begin_layout Description
20581 \begin_inset Flex Code
20584 \begin_layout Plain Layout
20591 \begin_inset Flex Code
20594 \begin_layout Plain Layout
20600 ] Specifies attribute information to be output with the main tag.
20602 \begin_inset Quotes eld
20606 \begin_inset Flex Code
20609 \begin_layout Plain Layout
20616 \begin_inset Quotes erd
20620 By default, LyX will output
20621 \begin_inset Quotes eld
20625 \begin_inset Flex Code
20628 \begin_layout Plain Layout
20635 \begin_inset Quotes erd
20639 \begin_inset Flex Code
20642 \begin_layout Plain Layout
20648 is the LyX name of the layout, made lowercase, for example: chapter.
20653 contain any style information.
20655 \begin_inset Flex Code
20658 \begin_layout Plain Layout
20667 \begin_layout Description
20668 \begin_inset Flex Code
20671 \begin_layout Plain Layout
20678 \begin_inset Flex Code
20681 \begin_layout Plain Layout
20691 ] Whether to output the default CSS information LyX generates for this layout,
20692 even if additional information is explicitly provided via
20693 \begin_inset Flex Code
20696 \begin_layout Plain Layout
20704 \begin_inset Flex Code
20707 \begin_layout Plain Layout
20713 allows you to alter or augment the generated CSS, rather than to override
20716 \begin_inset Flex Code
20719 \begin_layout Plain Layout
20728 \begin_layout Description
20729 \begin_inset Flex Code
20732 \begin_layout Plain Layout
20739 \begin_inset Flex Code
20742 \begin_layout Plain Layout
20748 ] The tag to be used for individual paragraphs of environments, replacing
20750 \begin_inset Flex Code
20753 \begin_layout Plain Layout
20759 in the examples above.
20761 \begin_inset Flex Code
20764 \begin_layout Plain Layout
20773 \begin_layout Description
20774 \begin_inset Flex Code
20777 \begin_layout Plain Layout
20784 \begin_inset Flex Code
20787 \begin_layout Plain Layout
20793 ] Attributes for the item tag.
20795 \begin_inset Quotes eld
20799 \begin_inset Flex Code
20802 \begin_layout Plain Layout
20803 class=`layoutname_item'
20809 \begin_inset Quotes erd
20817 contain any style information.
20819 \begin_inset Flex Code
20822 \begin_layout Plain Layout
20831 \begin_layout Description
20832 \begin_inset Flex Code
20835 \begin_layout Plain Layout
20842 \begin_inset Flex Code
20845 \begin_layout Plain Layout
20851 ] The tag to be used for paragraph and item labels, replacing
20852 \begin_inset Flex Code
20855 \begin_layout Plain Layout
20861 in the examples above.
20863 \begin_inset Flex Code
20866 \begin_layout Plain Layout
20873 \begin_inset Flex Code
20876 \begin_layout Plain Layout
20883 \begin_inset Flex Code
20886 \begin_layout Plain Layout
20893 \begin_inset Flex Code
20896 \begin_layout Plain Layout
20897 Centered_Top_Environment
20902 , in which case it defaults to
20903 \begin_inset Flex Code
20906 \begin_layout Plain Layout
20915 \begin_layout Description
20916 \begin_inset Flex Code
20919 \begin_layout Plain Layout
20926 \begin_inset Flex Code
20929 \begin_layout Plain Layout
20935 ] Attributes for the label tag.
20937 \begin_inset Quotes eld
20941 \begin_inset Flex Code
20944 \begin_layout Plain Layout
20945 class=`layoutname_label'
20951 \begin_inset Quotes erd
20959 contain any style information.
20961 \begin_inset Flex Code
20964 \begin_layout Plain Layout
20973 \begin_layout Description
20974 \begin_inset Flex Code
20977 \begin_layout Plain Layout
20984 \begin_inset Flex Code
20987 \begin_layout Plain Layout
20997 ] Meaningful only for list-like environments, this tag controls whether
20998 the label tag is output before or inside the item tag.
20999 This is used, for example, in the description environment, where we want
21001 \begin_inset Flex Code
21004 \begin_layout Plain Layout
21005 <dt>\SpecialChar \ldots{}
21006 </dt><dd>\SpecialChar \ldots{}
21014 \begin_inset Flex Code
21017 \begin_layout Plain Layout
21023 : The label tag is output inside the item tag.
21026 \begin_layout Description
21027 \begin_inset Flex Code
21030 \begin_layout Plain Layout
21036 Information to be output in the
21037 \begin_inset Flex Code
21040 \begin_layout Plain Layout
21046 section when this style is used.
21047 This might, for example, be used to include a
21048 \begin_inset Flex Code
21051 \begin_layout Plain Layout
21058 \begin_inset Flex Code
21061 \begin_layout Plain Layout
21070 \begin_layout Description
21071 \begin_inset Flex Code
21074 \begin_layout Plain Layout
21080 CSS style information to be included when this style is used.
21081 Note that this will automatically be wrapped in a layout-generated
21082 \begin_inset Flex Code
21085 \begin_layout Plain Layout
21091 block, so only the CSS itself need be included.
21094 \begin_layout Description
21095 \begin_inset Flex Code
21098 \begin_layout Plain Layout
21105 \begin_inset Flex Code
21108 \begin_layout Plain Layout
21114 ] The tag to be used for the main label, replacing
21115 \begin_inset Flex Code
21118 \begin_layout Plain Layout
21124 in the examples above.
21126 \begin_inset Flex Code
21129 \begin_layout Plain Layout
21138 \begin_layout Description
21139 \begin_inset Flex Code
21142 \begin_layout Plain Layout
21149 \begin_inset Flex Code
21152 \begin_layout Plain Layout
21162 ] Marks this style as the one to be used to generate the
21163 \begin_inset Flex Code
21166 \begin_layout Plain Layout
21172 tag for the XHTML file.
21173 By default, it is false.
21175 \begin_inset Flex Code
21178 \begin_layout Plain Layout
21184 file sets it to true for the
21185 \begin_inset Flex Code
21188 \begin_layout Plain Layout
21198 \begin_layout Subsection
21202 \begin_layout Standard
21203 The XHTML output of insets can also be controlled by information in layout
21208 \begin_layout Plain Layout
21209 At present, this is true only for
21210 \begin_inset Quotes eld
21214 \begin_inset Quotes erd
21217 insets (insets you can type into) and is not true for
21218 \begin_inset Quotes eld
21222 \begin_inset Quotes erd
21225 insets (insets that are associated with dialog boxes).
21230 Here, too, LyX tries to provide sensible defaults, and it constructs default
21232 But everything can be customized.
21235 \begin_layout Standard
21236 The XHTML LyX outputs for an inset has the following form:
21239 \begin_layout LyX-Code
21241 \begin_inset Quotes erd
21245 \begin_inset Quotes erd
21251 \begin_layout LyX-Code
21252 <labeltag>Label</labeltag>
21255 \begin_layout LyX-Code
21257 \begin_inset Quotes erd
21261 \begin_inset Quotes erd
21264 >Contents of the inset.</innertag>
21267 \begin_layout LyX-Code
21271 \begin_layout Standard
21272 If the inset permits multiple paragraphs---that is, if
21273 \begin_inset Flex Code
21276 \begin_layout Plain Layout
21282 is true---then the contents of the inset will itself be output as paragraphs
21283 formatted according to the styles used for those paragraphs (standard,
21284 quote, and the like).
21285 The label tag is of course omitted if the paragraph does not have a label
21286 and, at present, is always
21287 \begin_inset Flex Code
21290 \begin_layout Plain Layout
21297 The inner tag is optional and, by default, does not appear.
21300 \begin_layout Standard
21301 The specific tags and attributes output for each inset can be controlled
21302 by means of the following layout tags.
21305 \begin_layout Description
21306 \begin_inset Flex Code
21309 \begin_layout Plain Layout
21316 \begin_inset Flex Code
21319 \begin_layout Plain Layout
21325 ] Specifies attribute information to be output with the main tag.
21327 \begin_inset Quotes eld
21331 \begin_inset Flex Code
21334 \begin_layout Plain Layout
21335 class=`myinset' onclick=`\SpecialChar \ldots{}
21342 \begin_inset Quotes erd
21346 By default, LyX will output
21347 \begin_inset Quotes eld
21351 \begin_inset Flex Code
21354 \begin_layout Plain Layout
21361 \begin_inset Quotes erd
21365 \begin_inset Flex Code
21368 \begin_layout Plain Layout
21374 is the LyX name of the inset, made lowercase and with non-alphanumeric
21375 characters converted to underscores, for example: footnote.
21378 \begin_layout Description
21379 \begin_inset Flex Code
21382 \begin_layout Plain Layout
21389 \begin_inset Flex Code
21392 \begin_layout Plain Layout
21402 ] Whether to output the default CSS information LyX generates for this layout,
21403 even if additional information is explicitly provided via
21404 \begin_inset Flex Code
21407 \begin_layout Plain Layout
21415 \begin_inset Flex Code
21418 \begin_layout Plain Layout
21424 allows you to alter or augment the generated CSS, rather than to override
21429 \begin_layout Description
21430 \begin_inset Flex Code
21433 \begin_layout Plain Layout
21440 \begin_inset Flex Code
21443 \begin_layout Plain Layout
21449 ] Attributes for the inner tag.
21451 \begin_inset Quotes eld
21455 \begin_inset Flex Code
21458 \begin_layout Plain Layout
21459 class=`insetname_inner'
21465 \begin_inset Quotes erd
21471 \begin_layout Description
21472 \begin_inset Flex Code
21475 \begin_layout Plain Layout
21482 \begin_inset Flex Code
21485 \begin_layout Plain Layout
21491 ] The inner tag, replacing
21492 \begin_inset Flex Code
21495 \begin_layout Plain Layout
21501 in the examples above.
21502 By default, there is none.
21505 \begin_layout Description
21506 \begin_inset Flex Code
21509 \begin_layout Plain Layout
21516 \begin_inset Flex Code
21519 \begin_layout Plain Layout
21527 ] Whether this inset represents a standalone block of text (such as a footnote)
21528 or instead represents material that is included in the surrounding text
21529 (such as a branch).
21533 \begin_layout Description
21534 \begin_inset Flex Code
21537 \begin_layout Plain Layout
21544 \begin_inset Flex Code
21547 \begin_layout Plain Layout
21553 ] A label for this inset, possibly including a reference to a counter.
21554 For example, for footnote, it might be:
21555 \begin_inset Flex Code
21558 \begin_layout Plain Layout
21567 This is optional, and there is no default.
21570 \begin_layout Description
21571 \begin_inset Flex Code
21574 \begin_layout Plain Layout
21580 Information to be output in the
21581 \begin_inset Flex Code
21584 \begin_layout Plain Layout
21590 section when this style is used.
21591 This might, for example, be used to include a
21592 \begin_inset Flex Code
21595 \begin_layout Plain Layout
21602 \begin_inset Flex Code
21605 \begin_layout Plain Layout
21614 \begin_layout Description
21615 \begin_inset Flex Code
21618 \begin_layout Plain Layout
21624 CSS style information to be included when this style is used.
21625 Note that this will automatically be wrapped in a layout-generated
21626 \begin_inset Flex Code
21629 \begin_layout Plain Layout
21635 block, so only the CSS itself need be included.
21638 \begin_layout Description
21639 \begin_inset Flex Code
21642 \begin_layout Plain Layout
21649 \begin_inset Flex Code
21652 \begin_layout Plain Layout
21658 ] The tag to be used for the main label, replacing
21659 \begin_inset Flex Code
21662 \begin_layout Plain Layout
21668 in the examples above.
21669 The default depends upon the setting of
21670 \begin_inset Flex Code
21673 \begin_layout Plain Layout
21680 \begin_inset Flex Code
21683 \begin_layout Plain Layout
21689 is true, the default is
21690 \begin_inset Flex Code
21693 \begin_layout Plain Layout
21699 ; if it is false, the default is
21700 \begin_inset Flex Code
21703 \begin_layout Plain Layout
21712 \begin_layout Subsection
21716 \begin_layout Standard
21717 The XHTML output for floats too can be controlled by layout information.
21718 The output has the following form:
21721 \begin_layout LyX-Code
21723 \begin_inset Quotes erd
21727 \begin_inset Quotes erd
21733 \begin_layout LyX-Code
21734 Contents of the float.
21737 \begin_layout LyX-Code
21741 \begin_layout Standard
21742 The caption, if there is one, is a separate inset and will be output as
21744 Its appearance can be controlled via the InsetLayout for caption insets.
21748 \begin_layout Description
21749 \begin_inset Flex Code
21752 \begin_layout Plain Layout
21759 \begin_inset Flex Code
21762 \begin_layout Plain Layout
21768 ] Specifies attribute information to be output with the main tag.
21770 \begin_inset Quotes eld
21774 \begin_inset Flex Code
21777 \begin_layout Plain Layout
21778 class=`myfloat' onclick=`\SpecialChar \ldots{}
21785 \begin_inset Quotes erd
21789 By default, LyX will output
21790 \begin_inset Quotes eld
21794 \begin_inset Flex Code
21797 \begin_layout Plain Layout
21798 class=`float float-floattype'
21804 \begin_inset Quotes erd
21808 \begin_inset Flex Code
21811 \begin_layout Plain Layout
21817 is LyX's name for this type of float, as determined by the float declaration
21819 \begin_inset CommandInset ref
21821 reference "sub:Floats"
21825 ), though made lowercase and with non-alphanumeric characters converted
21826 to underscores, for example: float-table.
21829 \begin_layout Description
21830 \begin_inset Flex Code
21833 \begin_layout Plain Layout
21839 CSS style information to be included when this float is used.
21840 Note that this will automatically be wrapped in a layout-generated
21841 \begin_inset Flex Code
21844 \begin_layout Plain Layout
21850 block, so only the CSS itself need be included.
21853 \begin_layout Description
21854 \begin_inset Flex Code
21857 \begin_layout Plain Layout
21864 \begin_inset Flex Code
21867 \begin_layout Plain Layout
21873 ] The tag to be used for this float, replacing
21874 \begin_inset Quotes eld
21878 \begin_inset Flex Code
21881 \begin_layout Plain Layout
21888 \begin_inset Quotes erd
21891 in the example above.
21893 \begin_inset Flex Code
21896 \begin_layout Plain Layout
21902 and will rarely need changing.
21905 \begin_layout Subsection
21906 Bibliography formatting
21909 \begin_layout Standard
21910 The bibliography can be formatted using
21911 \begin_inset Flex Code
21914 \begin_layout Plain Layout
21922 \begin_inset CommandInset ref
21924 reference "sub:Citation-format-description"
21931 \begin_layout Subsection
21935 \begin_layout Standard
21936 We have several times mentioned that LyX will generate default CSS style
21937 rules for both insets and paragraph styles, based upon the other layout
21938 information that is provided.
21939 In this section, we shall say a word about which layout information LyX
21943 \begin_layout Standard
21944 At present, LyX auto-generates CSS only for font information, making use
21946 \begin_inset Flex Code
21949 \begin_layout Plain Layout
21956 \begin_inset Flex Code
21959 \begin_layout Plain Layout
21966 \begin_inset Flex Code
21969 \begin_layout Plain Layout
21976 \begin_inset Flex Code
21979 \begin_layout Plain Layout
21986 \begin_inset Flex Code
21989 \begin_layout Plain Layout
21997 \begin_inset CommandInset ref
21999 reference "sub:Font-description"
22003 .) The translation is mostly straightforward and obvious.
22005 \begin_inset Quotes eld
22009 \begin_inset Flex Code
22012 \begin_layout Plain Layout
22019 \begin_inset Quotes erd
22023 \begin_inset Quotes eld
22027 \begin_inset Flex Code
22030 \begin_layout Plain Layout
22031 font-family: sans-serif;
22037 \begin_inset Quotes erd
22041 The correspondence of LyX sizes and CSS sizes is a little less obvious
22042 but nonetheless intuitive.
22044 \begin_inset Flex Code
22047 \begin_layout Plain Layout
22054 \begin_inset Flex URL
22057 \begin_layout Plain Layout
22067 \begin_layout Chapter
22068 Including External Material
22071 \begin_layout Standard
22072 \begin_inset Box Shadowbox
22082 height_special "totalheight"
22085 \begin_layout Plain Layout
22086 WARNING: This portion of the documentation has not been updated for some
22088 We certainly hope that it is still accurate, but there are no guarantees.
22096 \begin_layout Standard
22097 The use of material from sources external to LyX is covered in detail in
22103 This part of the manual covers what needs to happen behind the scenes for
22104 new sorts of material to be included.
22107 \begin_layout Section
22111 \begin_layout Standard
22112 The external material feature is based on the concept of a
22117 A template is a specification of how LyX should interface with a certain
22119 As bundled, LyX comes with predefined templates for Xfig figures, various
22120 raster format images, chess diagrams, and LilyPond music notation.
22121 You can check the actual list by using the menu
22122 \begin_inset Flex MenuItem
22125 \begin_layout Plain Layout
22126 Insert\SpecialChar \menuseparator
22127 File\SpecialChar \menuseparator
22134 Furthermore, it is possible to roll your own template to support a specific
22136 Later we'll describe in more detail what is involved, and hopefully you
22137 will submit all the templates you create so we can include them in a later
22141 \begin_layout Standard
22142 Another basic idea of the external material feature is to distinguish between
22143 the original file that serves as a base for final material and the produced
22144 file that is included in your exported or printed document.
22145 For example, consider the case of a figure produced with
22146 \begin_inset Flex Code
22149 \begin_layout Plain Layout
22156 The Xfig application itself works on an original file with the
22157 \begin_inset Flex Code
22160 \begin_layout Plain Layout
22167 Within Xfig, you create and change your figure, and when you are done,
22169 \begin_inset Flex Code
22172 \begin_layout Plain Layout
22179 When you want to include the figure in your document, you invoke
22180 \begin_inset Flex Code
22183 \begin_layout Plain Layout
22189 in order to create a PostScript file that can readily be included in your
22192 \begin_inset Flex Code
22195 \begin_layout Plain Layout
22201 file is the original file, and the PostScript file is the produced file.
22204 \begin_layout Standard
22205 This distinction is important in order to allow updating of the material
22206 while you are in the process of writing the document.
22207 Furthermore, it provides us with the flexibility that is needed to support
22208 multiple export formats.
22209 For instance, in the case of a plain text file, it is not exactly an award-winn
22210 ing idea to include the figure as raw PostScript.
22211 Instead, you would either prefer to just include a reference to the figure
22212 or try to invoke some graphics to ASCII converter to make the final result
22213 look similar to the real graphics.
22214 The external material management allows you to do this, because it is parametri
22215 zed on the different export formats that LyX supports.
22218 \begin_layout Standard
22219 Besides supporting the production of different products according to the
22220 exported format, it supports tight integration with editing and viewing
22222 In the case of an Xfig figure, you are able to invoke Xfig on the original
22223 file with a single click from within the external material dialog in LyX,
22224 and also preview the produced PostScript file with Ghostview with another
22226 No more fiddling around with the command line and/or file browsers to locate
22227 and manipulate the original or produced files.
22228 In this way, you are finally able to take full advantage of the many different
22229 applications that are relevant to use when you write your documents, and
22230 ultimately be more productive.
22233 \begin_layout Section
22234 The external template configuration file
22237 \begin_layout Standard
22238 It is relatively easy to add custom external template definitions to LyX.
22239 However, be aware that doing this in an careless manner most probably
22243 introduce an easily exploitable security hole.
22244 So before you do this, please read the discussion about security in section
22246 \begin_inset CommandInset ref
22248 reference "sec:Security-discussion"
22255 \begin_layout Standard
22256 Having said that, we encourage you to submit any interesting templates that
22261 \begin_layout Standard
22262 The external templates are defined in the
22263 \begin_inset Flex Code
22266 \begin_layout Plain Layout
22267 LyXDir/lib/external_templates
22273 You can place your own version in
22274 \begin_inset Flex Code
22277 \begin_layout Plain Layout
22278 UserDir/external_templates
22286 \begin_layout Standard
22287 A typical template looks like this:
22290 \begin_layout LyX-Code
22294 \begin_layout LyX-Code
22295 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22298 \begin_layout LyX-Code
22302 \begin_layout LyX-Code
22306 \begin_layout LyX-Code
22310 \begin_layout LyX-Code
22314 \begin_layout LyX-Code
22318 \begin_layout LyX-Code
22319 AutomaticProduction true
22322 \begin_layout LyX-Code
22326 \begin_layout LyX-Code
22330 \begin_layout LyX-Code
22334 \begin_layout LyX-Code
22335 TransformCommand Rotate RotationLatexCommand
22338 \begin_layout LyX-Code
22339 TransformCommand Resize ResizeLatexCommand
22342 \begin_layout LyX-Code
22343 Product "$$RotateFront$$ResizeFront
22346 \begin_layout LyX-Code
22351 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22354 \begin_layout LyX-Code
22355 $$ResizeBack$$RotateBack"
22358 \begin_layout LyX-Code
22362 \begin_layout LyX-Code
22363 UpdateResult "$$AbsPath$$Basename.pstex_t"
22366 \begin_layout LyX-Code
22367 Requirement "graphicx"
22370 \begin_layout LyX-Code
22371 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22374 \begin_layout LyX-Code
22375 ReferencedFile latex "$$AbsPath$$Basename.eps"
22378 \begin_layout LyX-Code
22379 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22382 \begin_layout LyX-Code
22386 \begin_layout LyX-Code
22390 \begin_layout LyX-Code
22391 TransformCommand Rotate RotationLatexCommand
22394 \begin_layout LyX-Code
22395 TransformCommand Resize ResizeLatexCommand
22398 \begin_layout LyX-Code
22399 Product "$$RotateFront$$ResizeFront
22402 \begin_layout LyX-Code
22407 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22410 \begin_layout LyX-Code
22411 $$ResizeBack$$RotateBack"
22414 \begin_layout LyX-Code
22415 UpdateFormat pdftex
22418 \begin_layout LyX-Code
22419 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22422 \begin_layout LyX-Code
22423 Requirement "graphicx"
22426 \begin_layout LyX-Code
22427 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22430 \begin_layout LyX-Code
22431 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22434 \begin_layout LyX-Code
22438 \begin_layout LyX-Code
22442 \begin_layout LyX-Code
22443 Product "$$Contents(
22445 "$$AbsPath$$Basename.asc
22450 \begin_layout LyX-Code
22451 UpdateFormat asciixfig
22454 \begin_layout LyX-Code
22455 UpdateResult "$$AbsPath$$Basename.asc"
22458 \begin_layout LyX-Code
22462 \begin_layout LyX-Code
22466 \begin_layout LyX-Code
22467 Product "<graphic fileref=
22469 "$$AbsOrRelPathMaster$$Basename.eps
22474 \begin_layout LyX-Code
22478 \begin_layout LyX-Code
22482 \begin_layout LyX-Code
22483 UpdateResult "$$AbsPath$$Basename.eps"
22486 \begin_layout LyX-Code
22487 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22490 \begin_layout LyX-Code
22491 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22494 \begin_layout LyX-Code
22498 \begin_layout LyX-Code
22499 Product "[XFig: $$FName]"
22502 \begin_layout LyX-Code
22506 \begin_layout LyX-Code
22510 \begin_layout Standard
22511 As you can see, the template is enclosed in
22512 \begin_inset Flex Code
22515 \begin_layout Plain Layout
22521 \SpecialChar \ldots{}
22523 \begin_inset Flex Code
22526 \begin_layout Plain Layout
22533 It contains a header specifying some general settings and, for each supported
22534 primary document file format, a section
22535 \begin_inset Flex Code
22538 \begin_layout Plain Layout
22544 \SpecialChar \ldots{}
22546 \begin_inset Flex Code
22549 \begin_layout Plain Layout
22558 \begin_layout Subsection
22559 The template header
22562 \begin_layout Description
22563 \begin_inset Flex Code
22566 \begin_layout Plain Layout
22567 AutomaticProduction
22568 \begin_inset space ~
22576 Whether the file represented by the template must be generated by LyX.
22577 This command must occur exactly once.
22580 \begin_layout Description
22581 \begin_inset Flex Code
22584 \begin_layout Plain Layout
22586 \begin_inset space ~
22594 A glob pattern that is used in the file dialog to filter out the desired
22596 If there is more than one possible file extension (e.
22597 \begin_inset space \thinspace{}
22601 \begin_inset space \space{}
22605 \begin_inset Flex Code
22608 \begin_layout Plain Layout
22615 \begin_inset Flex Code
22618 \begin_layout Plain Layout
22624 ), use something like
22625 \begin_inset Flex Code
22628 \begin_layout Plain Layout
22635 This command must occur exactly once.
22638 \begin_layout Description
22639 \begin_inset Flex Code
22642 \begin_layout Plain Layout
22644 \begin_inset space ~
22652 The text that is displayed on the button.
22653 This command must occur exactly once.
22656 \begin_layout Description
22657 \begin_inset Flex Code
22660 \begin_layout Plain Layout
22662 \begin_inset space ~
22666 \begin_inset space ~
22674 The help text that is used in the External dialog.
22675 Provide enough information to explain to the user just what the template
22676 can provide him with.
22677 This command must occur exactly once.
22680 \begin_layout Description
22681 \begin_inset Flex Code
22684 \begin_layout Plain Layout
22686 \begin_inset space ~
22694 The file format of the original file.
22695 This must be the name of a format that is known to LyX (see section
22696 \begin_inset space ~
22700 \begin_inset CommandInset ref
22702 reference "sec:Formats"
22708 \begin_inset Quotes eld
22712 \begin_inset Flex Code
22715 \begin_layout Plain Layout
22722 \begin_inset Quotes erd
22725 if the template can handle original files of more than one format.
22726 LyX will attempt to interrogate the file itself in order to deduce its
22727 format in this case.
22728 This command must occur exactly once.
22731 \begin_layout Description
22732 \begin_inset Flex Code
22735 \begin_layout Plain Layout
22737 \begin_inset space ~
22745 A unique name for the template.
22746 It must not contain substitution macros (see below).
22749 \begin_layout Description
22750 \begin_inset Flex Code
22753 \begin_layout Plain Layout
22755 \begin_inset space ~
22758 Rotate|Resize|Clip|Extra
22763 This command specifies which transformations are supported by this template.
22764 It may occur zero or more times.
22765 This command enables the corresponding tabs in the external dialog.
22767 \begin_inset Flex Code
22770 \begin_layout Plain Layout
22776 command must have either a corresponding
22777 \begin_inset Flex Code
22780 \begin_layout Plain Layout
22787 \begin_inset Flex Code
22790 \begin_layout Plain Layout
22797 \begin_inset Flex Code
22800 \begin_layout Plain Layout
22807 Otherwise the transformation will not be supported by that format.
22810 \begin_layout Subsection
22814 \begin_layout Description
22815 \begin_inset Flex Code
22818 \begin_layout Plain Layout
22820 \begin_inset space ~
22823 LaTeX|PDFLaTeX|PlainText|DocBook
22828 The primary document file format that this format definition is for.
22829 Not every template has a sensible representation in all document file formats.
22830 Please define nevertheless a
22831 \begin_inset Flex Code
22834 \begin_layout Plain Layout
22840 section for all templates.
22841 Use a dummy text when no representation is available.
22842 Then you can at least see a reference to the external material in the exported
22846 \begin_layout Description
22847 \begin_inset Flex Code
22850 \begin_layout Plain Layout
22852 \begin_inset space ~
22856 \begin_inset space ~
22864 This command defines an additional macro
22865 \begin_inset Flex Code
22868 \begin_layout Plain Layout
22874 for substitution in
22875 \begin_inset Flex Code
22878 \begin_layout Plain Layout
22886 \begin_inset Flex Code
22889 \begin_layout Plain Layout
22895 itself may contain substitution macros.
22896 The advantage over using
22897 \begin_inset Flex Code
22900 \begin_layout Plain Layout
22907 \begin_inset Flex Code
22910 \begin_layout Plain Layout
22916 is that the substituted value of
22917 \begin_inset Flex Code
22920 \begin_layout Plain Layout
22926 is sanitized so that it is a valid optional argument in the document format.
22927 This command may occur zero or more times.
22930 \begin_layout Description
22931 \begin_inset Flex Code
22934 \begin_layout Plain Layout
22936 \begin_inset space ~
22944 The text that is inserted in the exported document.
22945 This is actually the most important command and can be quite complex.
22946 This command must occur exactly once.
22949 \begin_layout Description
22950 \begin_inset Flex Code
22953 \begin_layout Plain Layout
22955 \begin_inset space ~
22963 This command specifies a preamble snippet that will be included in the
22965 It has to be defined using
22966 \begin_inset Flex Code
22969 \begin_layout Plain Layout
22975 \SpecialChar \ldots{}
22977 \begin_inset Flex Code
22980 \begin_layout Plain Layout
22987 This command may occur zero or more times.
22990 \begin_layout Description
22991 \begin_inset Flex Code
22994 \begin_layout Plain Layout
22996 \begin_inset space ~
23000 \begin_inset space ~
23008 This command denotes files that are created by the conversion process and
23009 are needed for a particular export format.
23010 If the filename is relative, it is interpreted relative to the master document.
23011 This command may be given zero or more times.
23014 \begin_layout Description
23015 \begin_inset Flex Code
23018 \begin_layout Plain Layout
23020 \begin_inset space ~
23028 The name of a required LaTeX package.
23029 The package is included via
23030 \begin_inset Flex Code
23033 \begin_layout Plain Layout
23041 in the LaTeX preamble.
23042 This command may occur zero or more times.
23045 \begin_layout Description
23046 \begin_inset Flex Code
23049 \begin_layout Plain Layout
23051 \begin_inset space ~
23055 \begin_inset space ~
23058 RotationLatexCommand
23063 This command specifies that the built in LaTeX command should be used for
23065 This command may occur once or not at all.
23068 \begin_layout Description
23069 \begin_inset Flex Code
23072 \begin_layout Plain Layout
23074 \begin_inset space ~
23078 \begin_inset space ~
23086 This command specifies that the built in LaTeX command should be used for
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 ~
23104 RotationLatexOption
23109 This command specifies that rotation 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 resizing 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 clipping is done via an optional argument.
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 ~
23167 \begin_inset space ~
23175 This command specifies that an extra optional argument is used.
23176 This command may occur once or not at all.
23179 \begin_layout Description
23180 \begin_inset Flex Code
23183 \begin_layout Plain Layout
23185 \begin_inset space ~
23193 The file format of the converted file.
23194 This must be the name of a format that is known to LyX (see the
23195 \begin_inset Flex MenuItem
23198 \begin_layout Plain Layout
23203 ools\SpecialChar \menuseparator
23208 references\SpecialChar \menuseparator
23209 File Handling\SpecialChar \menuseparator
23216 This command must occur exactly once.
23219 \begin_layout Description
23220 \begin_inset Flex Code
23223 \begin_layout Plain Layout
23225 \begin_inset space ~
23233 The file name of the converted file.
23234 The file name must be absolute.
23235 This command must occur exactly once.
23238 \begin_layout Subsection
23239 Preamble definitions
23242 \begin_layout Standard
23243 The external template configuration file may contain additional preamble
23244 definitions enclosed by
23245 \begin_inset Flex Code
23248 \begin_layout Plain Layout
23254 \SpecialChar \ldots{}
23256 \begin_inset Flex Code
23259 \begin_layout Plain Layout
23266 They can be used by the templates in the
23267 \begin_inset Flex Code
23270 \begin_layout Plain Layout
23279 \begin_layout Section
23280 The substitution mechanism
23283 \begin_layout Standard
23284 When the external material facility invokes an external program, it is done
23285 on the basis of a command defined in the template configuration file.
23286 These commands can contain various macros that are expanded before execution.
23287 Execution always take place in the directory of the containing document.
23290 \begin_layout Standard
23291 Also, whenever external material is to be displayed, the name will be produced
23292 by the substitution mechanism, and most other commands in the template
23293 definition support substitution as well.
23296 \begin_layout Standard
23297 The available macros are the following:
23300 \begin_layout Description
23301 \begin_inset Flex Code
23304 \begin_layout Plain Layout
23305 $$AbsOrRelPathMaster
23310 The file path, absolute or relative to the master LyX document.
23313 \begin_layout Description
23314 \begin_inset Flex Code
23317 \begin_layout Plain Layout
23318 $$AbsOrRelPathParent
23323 The file path, absolute or relative to the LyX document.
23326 \begin_layout Description
23327 \begin_inset Flex Code
23330 \begin_layout Plain Layout
23336 The absolute file path.
23339 \begin_layout Description
23340 \begin_inset Flex Code
23343 \begin_layout Plain Layout
23349 The filename without path and without the extension.
23352 \begin_layout Description
23353 \begin_inset Flex Code
23356 \begin_layout Plain Layout
23358 \begin_inset Quotes eld
23362 \begin_inset Quotes erd
23370 This macro will expand to the contents of the file with the name
23371 \begin_inset Flex Code
23374 \begin_layout Plain Layout
23383 \begin_layout Description
23384 \begin_inset Flex Code
23387 \begin_layout Plain Layout
23393 The file extension (including the dot).
23396 \begin_layout Description
23397 \begin_inset Flex Code
23400 \begin_layout Plain Layout
23406 The filename of the file specified in the external material dialog.
23407 This is either an absolute name, or it is relative to the LyX document.
23410 \begin_layout Description
23411 \begin_inset Flex Code
23414 \begin_layout Plain Layout
23421 \begin_inset Flex Code
23424 \begin_layout Plain Layout
23430 (absolute name or relative to the LyX document).
23433 \begin_layout Description
23434 \begin_inset Flex Code
23437 \begin_layout Plain Layout
23443 The file path, relative to the master LyX document.
23446 \begin_layout Description
23447 \begin_inset Flex Code
23450 \begin_layout Plain Layout
23456 The file path, relative to the LyX document.
23459 \begin_layout Description
23460 \begin_inset Flex Code
23463 \begin_layout Plain Layout
23469 This macro will expand to the absolute path of the system directory.
23470 This is typically used to point to the various helper scripts that are
23474 \begin_layout Description
23475 \begin_inset Flex Code
23478 \begin_layout Plain Layout
23484 A name and full path to a temporary file which will be automatically deleted
23485 whenever the containing document is closed, or the external material insertion
23489 \begin_layout Standard
23490 All path macros contain a trailing directory separator, so you can construct
23492 \begin_inset space \thinspace{}
23496 \begin_inset space \space{}
23499 the absolute filename with
23500 \begin_inset Flex Code
23503 \begin_layout Plain Layout
23504 $$AbsPath$$Basename$$Extension
23512 \begin_layout Standard
23513 The macros above are substituted in all commands unless otherwise noted.
23515 \begin_inset Flex Code
23518 \begin_layout Plain Layout
23524 supports additionally the following substitutions if they are enabled by
23526 \begin_inset Flex Code
23529 \begin_layout Plain Layout
23536 \begin_inset Flex Code
23539 \begin_layout Plain Layout
23548 \begin_layout Description
23549 \begin_inset Flex Code
23552 \begin_layout Plain Layout
23558 The front part of the resize command.
23561 \begin_layout Description
23562 \begin_inset Flex Code
23565 \begin_layout Plain Layout
23571 The back part of the resize command.
23574 \begin_layout Description
23575 \begin_inset Flex Code
23578 \begin_layout Plain Layout
23584 The front part of the rotation command.
23587 \begin_layout Description
23588 \begin_inset Flex Code
23591 \begin_layout Plain Layout
23597 The back part of the rotation command.
23600 \begin_layout Standard
23601 The value string of the
23602 \begin_inset Flex Code
23605 \begin_layout Plain Layout
23611 command supports additionally the following substitutions if they are enabled
23613 \begin_inset Flex Code
23616 \begin_layout Plain Layout
23623 \begin_inset Flex Code
23626 \begin_layout Plain Layout
23635 \begin_layout Description
23636 \begin_inset Flex Code
23639 \begin_layout Plain Layout
23648 \begin_layout Description
23649 \begin_inset Flex Code
23652 \begin_layout Plain Layout
23661 \begin_layout Description
23662 \begin_inset Flex Code
23665 \begin_layout Plain Layout
23674 \begin_layout Description
23675 \begin_inset Flex Code
23678 \begin_layout Plain Layout
23684 The rotation option.
23687 \begin_layout Standard
23688 You may ask why there are so many path macros.
23689 There are mainly two reasons:
23692 \begin_layout Enumerate
23693 Relative and absolute file names should remain relative or absolute, respectivel
23695 Users may have reasons to prefer either form.
23696 Relative names are useful for portable documents that should work on different
23697 machines, for example.
23698 Absolute names may be required by some programs.
23701 \begin_layout Enumerate
23702 LaTeX treats relative file names differently than LyX and other programs
23703 in nested included files.
23704 For LyX, a relative file name is always relative to the document that contains
23706 For LaTeX, it is always relative to the master document.
23707 These two definitions are identical if you have only one document, but
23708 differ if you have a master document that includes part documents.
23709 That means that relative filenames must be transformed when presented to
23711 Fortunately LyX does this automatically for you if you choose the right
23715 \begin_layout Standard
23716 So which path macro should be used in new template definitions? The rule
23720 \begin_layout Itemize
23722 \begin_inset Flex Code
23725 \begin_layout Plain Layout
23731 if an absolute path is required.
23734 \begin_layout Itemize
23736 \begin_inset Flex Code
23739 \begin_layout Plain Layout
23740 $$AbsOrRelPathMaster
23745 if the substituted string is some kind of LaTeX input.
23748 \begin_layout Itemize
23750 \begin_inset Flex Code
23753 \begin_layout Plain Layout
23754 $$AbsOrRelPathParent
23759 in order to preserve the user's choice.
23762 \begin_layout Standard
23763 There are special cases where this rule does not work and e.
23764 \begin_inset space \thinspace{}
23768 \begin_inset space \space{}
23771 relative names are needed, but normally it will work just fine.
23772 One example for such a case is the command
23773 \begin_inset Flex Code
23776 \begin_layout Plain Layout
23777 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23782 in the XFig template above: We can't use the absolute name because the
23784 \begin_inset Flex Code
23787 \begin_layout Plain Layout
23793 files needs the relative name in order to rewrite the file content.
23796 \begin_layout Section
23797 Security discussion
23798 \begin_inset CommandInset label
23800 name "sec:Security-discussion"
23807 \begin_layout Standard
23808 The external material feature interfaces with a lot of external programs
23809 and does so automatically, so we have to consider the security implications
23811 In particular, since you have the option of including your own filenames
23812 and/or parameter strings and those are expanded into a command, it seems
23813 that it would be possible to create a malicious document which executes
23814 arbitrary commands when a user views or prints the document.
23815 This is something we definitely want to avoid.
23818 \begin_layout Standard
23819 However, since the external program commands are specified in the template
23820 configuration file only, there are no security issues if LyX is properly
23821 configured with safe templates only.
23822 This is so because the external programs are invoked with the
23823 \begin_inset Flex Code
23826 \begin_layout Plain Layout
23832 -system call rather than the
23833 \begin_inset Flex Code
23836 \begin_layout Plain Layout
23842 system-call, so it's not possible to execute arbitrary commands from the
23843 filename or parameter section via the shell.
23846 \begin_layout Standard
23847 This also implies that you are restricted in what command strings you can
23848 use in the external material templates.
23849 In particular, pipes and redirection are not readily available.
23850 This has to be so if LyX should remain safe.
23851 If you want to use some of the shell features, you should write a safe
23852 script to do this in a controlled manner, and then invoke the script from
23853 the command string.
23857 \begin_layout Standard
23858 It is possible to design a template that interacts directly with the shell,
23859 but since this would allow a malicious user to execute arbitrary commands
23860 by writing clever filenames and/or parameters, we generally recommend that
23861 you only use safe scripts that work with the
23862 \begin_inset Flex Code
23865 \begin_layout Plain Layout
23871 system call in a controlled manner.
23872 Of course, for use in a controlled environment, it can be tempting to just
23873 fall back to use ordinary shell scripts.
23874 If you do so, be aware that you
23878 provide an easily exploitable security hole in your system.
23879 Of course it stands to reason that such unsafe templates will never be
23880 included in the standard LyX distribution, although we do encourage people
23881 to submit new templates in the open source tradition.
23882 But LyX as shipped from the official distribution channels will never have
23886 \begin_layout Standard
23887 Including external material provides a lot of power, and you have to be
23888 careful not to introduce security hazards with this power.
23889 A subtle error in a single line in an innocent looking script can open
23890 the door to huge security problems.
23891 So if you do not fully understand the issues, we recommend that you consult
23892 a knowledgeable security professional or the LyX development team if you
23893 have any questions about whether a given template is safe or not.
23894 And do this before you use it in an uncontrolled environment.
23897 \begin_layout Chapter
23899 List of supported LyX functions to be used in layouts
23902 \begin_layout Standard
23904 \begin_inset Tabular
23905 <lyxtabular version="3" rows="10" columns="8">
23906 <features rotate="0" tabularvalignment="middle">
23907 <column alignment="left" valignment="top" width="0">
23908 <column alignment="left" valignment="top" width="0">
23909 <column alignment="left" valignment="top" width="0">
23910 <column alignment="left" valignment="top" width="0">
23911 <column alignment="left" valignment="top" width="0">
23912 <column alignment="left" valignment="top" width="0">
23913 <column alignment="left" valignment="top" width="0">
23914 <column alignment="left" valignment="top" width="0">
23916 <cell alignment="left" valignment="top" usebox="none">
23919 \begin_layout Plain Layout
23925 <cell alignment="left" valignment="top" usebox="none">
23928 \begin_layout Plain Layout
23934 <cell alignment="left" valignment="top" usebox="none">
23937 \begin_layout Plain Layout
23943 <cell alignment="left" valignment="top" usebox="none">
23946 \begin_layout Plain Layout
23952 <cell alignment="center" valignment="top" usebox="none">
23955 \begin_layout Plain Layout
23961 <cell alignment="center" valignment="top" usebox="none">
23964 \begin_layout Plain Layout
23970 <cell alignment="center" valignment="top" usebox="none">
23973 \begin_layout Plain Layout
23979 <cell alignment="center" valignment="top" usebox="none">
23982 \begin_layout Plain Layout
23990 <cell alignment="left" valignment="top" usebox="none">
23993 \begin_layout Plain Layout
23999 <cell alignment="left" valignment="top" usebox="none">
24002 \begin_layout Plain Layout
24008 <cell alignment="left" valignment="top" usebox="none">
24011 \begin_layout Plain Layout
24017 <cell alignment="left" valignment="top" usebox="none">
24020 \begin_layout Plain Layout
24026 <cell alignment="center" valignment="top" usebox="none">
24029 \begin_layout Plain Layout
24035 <cell alignment="center" valignment="top" usebox="none">
24038 \begin_layout Plain Layout
24044 <cell alignment="center" valignment="top" usebox="none">
24047 \begin_layout Plain Layout
24053 <cell alignment="center" valignment="top" usebox="none">
24056 \begin_layout Plain Layout
24064 <cell alignment="left" valignment="top" usebox="none">
24067 \begin_layout Plain Layout
24073 <cell alignment="left" valignment="top" usebox="none">
24076 \begin_layout Plain Layout
24082 <cell alignment="left" valignment="top" usebox="none">
24085 \begin_layout Plain Layout
24091 <cell alignment="left" valignment="top" usebox="none">
24094 \begin_layout Plain Layout
24100 <cell alignment="center" valignment="top" usebox="none">
24103 \begin_layout Plain Layout
24109 <cell alignment="center" valignment="top" usebox="none">
24112 \begin_layout Plain Layout
24118 <cell alignment="center" valignment="top" usebox="none">
24121 \begin_layout Plain Layout
24127 <cell alignment="center" valignment="top" usebox="none">
24130 \begin_layout Plain Layout
24138 <cell alignment="left" valignment="top" usebox="none">
24141 \begin_layout Plain Layout
24147 <cell alignment="left" valignment="top" usebox="none">
24150 \begin_layout Plain Layout
24156 <cell alignment="left" valignment="top" usebox="none">
24159 \begin_layout Plain Layout
24165 <cell alignment="left" valignment="top" usebox="none">
24168 \begin_layout Plain Layout
24174 <cell alignment="center" valignment="top" usebox="none">
24177 \begin_layout Plain Layout
24183 <cell alignment="center" valignment="top" usebox="none">
24186 \begin_layout Plain Layout
24192 <cell alignment="center" valignment="top" usebox="none">
24195 \begin_layout Plain Layout
24201 <cell alignment="center" valignment="top" usebox="none">
24204 \begin_layout Plain Layout
24212 <cell alignment="left" valignment="top" usebox="none">
24215 \begin_layout Plain Layout
24221 <cell alignment="left" valignment="top" usebox="none">
24224 \begin_layout Plain Layout
24230 <cell alignment="left" valignment="top" usebox="none">
24233 \begin_layout Plain Layout
24239 <cell alignment="left" valignment="top" usebox="none">
24242 \begin_layout Plain Layout
24248 <cell alignment="center" valignment="top" usebox="none">
24251 \begin_layout Plain Layout
24257 <cell alignment="center" valignment="top" usebox="none">
24260 \begin_layout Plain Layout
24266 <cell alignment="center" valignment="top" usebox="none">
24269 \begin_layout Plain Layout
24275 <cell alignment="center" valignment="top" usebox="none">
24278 \begin_layout Plain Layout
24286 <cell alignment="left" valignment="top" usebox="none">
24289 \begin_layout Plain Layout
24295 <cell alignment="left" valignment="top" usebox="none">
24298 \begin_layout Plain Layout
24304 <cell alignment="left" valignment="top" usebox="none">
24307 \begin_layout Plain Layout
24313 <cell alignment="left" valignment="top" usebox="none">
24316 \begin_layout Plain Layout
24322 <cell alignment="center" valignment="top" usebox="none">
24325 \begin_layout Plain Layout
24331 <cell alignment="center" valignment="top" usebox="none">
24334 \begin_layout Plain Layout
24340 <cell alignment="center" valignment="top" usebox="none">
24343 \begin_layout Plain Layout
24349 <cell alignment="center" valignment="top" usebox="none">
24352 \begin_layout Plain Layout
24360 <cell alignment="left" valignment="top" usebox="none">
24363 \begin_layout Plain Layout
24369 <cell alignment="left" valignment="top" usebox="none">
24372 \begin_layout Plain Layout
24378 <cell alignment="left" valignment="top" usebox="none">
24381 \begin_layout Plain Layout
24387 <cell alignment="left" valignment="top" usebox="none">
24390 \begin_layout Plain Layout
24396 <cell alignment="center" valignment="top" usebox="none">
24399 \begin_layout Plain Layout
24405 <cell alignment="center" valignment="top" usebox="none">
24408 \begin_layout Plain Layout
24414 <cell alignment="center" valignment="top" usebox="none">
24417 \begin_layout Plain Layout
24423 <cell alignment="center" valignment="top" usebox="none">
24426 \begin_layout Plain Layout
24434 <cell alignment="left" valignment="top" usebox="none">
24437 \begin_layout Plain Layout
24443 <cell alignment="left" valignment="top" usebox="none">
24446 \begin_layout Plain Layout
24452 <cell alignment="left" valignment="top" usebox="none">
24455 \begin_layout Plain Layout
24461 <cell alignment="left" valignment="top" usebox="none">
24464 \begin_layout Plain Layout
24470 <cell alignment="center" valignment="top" usebox="none">
24473 \begin_layout Plain Layout
24479 <cell alignment="center" valignment="top" usebox="none">
24482 \begin_layout Plain Layout
24488 <cell alignment="center" valignment="top" usebox="none">
24491 \begin_layout Plain Layout
24497 <cell alignment="center" valignment="top" usebox="none">
24500 \begin_layout Plain Layout
24508 <cell alignment="left" valignment="top" usebox="none">
24511 \begin_layout Plain Layout
24517 <cell alignment="left" valignment="top" usebox="none">
24520 \begin_layout Plain Layout
24526 <cell alignment="left" valignment="top" usebox="none">
24529 \begin_layout Plain Layout
24535 <cell alignment="left" valignment="top" usebox="none">
24538 \begin_layout Plain Layout
24544 <cell alignment="center" valignment="top" usebox="none">
24547 \begin_layout Plain Layout
24553 <cell alignment="center" valignment="top" usebox="none">
24556 \begin_layout Plain Layout
24562 <cell alignment="center" valignment="top" usebox="none">
24565 \begin_layout Plain Layout
24571 <cell alignment="center" valignment="top" usebox="none">
24574 \begin_layout Plain Layout
24582 <cell alignment="left" valignment="top" usebox="none">
24585 \begin_layout Plain Layout
24591 <cell alignment="left" valignment="top" usebox="none">
24594 \begin_layout Plain Layout
24600 <cell alignment="left" valignment="top" usebox="none">
24603 \begin_layout Plain Layout
24609 <cell alignment="left" valignment="top" usebox="none">
24612 \begin_layout Plain Layout
24618 <cell alignment="center" valignment="top" usebox="none">
24621 \begin_layout Plain Layout
24627 <cell alignment="center" valignment="top" usebox="none">
24630 \begin_layout Plain Layout
24636 <cell alignment="center" valignment="top" usebox="none">
24639 \begin_layout Plain Layout
24645 <cell alignment="center" valignment="top" usebox="none">
24648 \begin_layout Plain Layout
24662 \begin_layout Standard
24663 accents amsbsy amscd amsmath amssymb amstext amsthm array ascii bbding bm
24664 booktabs calc CJK color covington csquotes dvipost endnotes enumitem esint
24665 fancybox feyn fixltx2e float framed graphicx hhline hyperref ifsym ifthen
24666 jurabib latexsym listings longtable lyxskak makeidx marvosym mathdesign
24667 mathdots mathrsfs mhchem multirow natbib nomencl pdfcolmk pdfpages pifont
24668 pmboxdraw polyglossia prettyref pxfonts refstyle rotating rotfloat setspace
24669 slashed soul splitidx subfig subscript textcomp textgreek tfrupee tipa
24670 tipx tone txfonts ulem undertilde units url varioref verbatim wasysym wrapfig
24671 xargs xcolor xy yhmath
24674 \begin_layout Chapter
24675 Names of available colors to be used in layouts
24676 \begin_inset CommandInset label
24678 name "chap:Names-of-colors"
24685 \begin_layout Standard
24686 The colors listed here are the standard colors and the those that you can
24687 adjust in the LyX preferences.
24690 \begin_layout Description
24703 No particular color -- clear or default
24706 \begin_layout Description
24710 \begin_layout Description
24714 \begin_layout Description
24718 \begin_layout Description
24722 \begin_layout Description
24726 \begin_layout Description
24730 \begin_layout Description
24734 \begin_layout Description
24738 \begin_layout Description
24739 cursor Cursor color
24742 \begin_layout Description
24743 background Background color
24746 \begin_layout Description
24747 foreground Foreground color
24750 \begin_layout Description
24751 selection Background color of selected text
24754 \begin_layout Description
24755 selectiontext Foreground color of selected text
24758 \begin_layout Description
24759 latex Text color in LaTeX mode
24762 \begin_layout Description
24763 preview The color used for previews
24766 \begin_layout Description
24767 inlinecompletion Inline completion color
24770 \begin_layout Description
24771 nonunique_inlinecompletion Inline completion color for the non-unique part
24774 \begin_layout Description
24775 notelabel Label color for notes
24778 \begin_layout Description
24779 notebg Background color of notes
24782 \begin_layout Description
24783 commentlabel Label color for comments
24786 \begin_layout Description
24787 commentbg Background color of comments
24790 \begin_layout Description
24791 greyedoutlabel Label color for greyedout insets
24794 \begin_layout Description
24795 greyedouttext Color for greyedout inset text
24798 \begin_layout Description
24799 greyedoutbg Background color of greyedout inset
24802 \begin_layout Description
24803 shadedbg Background color of shaded box
24806 \begin_layout Description
24807 listingsbg Background color of listings inset
24810 \begin_layout Description
24811 branchlabel Label color for branches
24814 \begin_layout Description
24815 footlabel Label color for footnotes
24818 \begin_layout Description
24819 indexlabel Label color for index insets
24822 \begin_layout Description
24823 marginlabel Label color for margin notes
24826 \begin_layout Description
24827 phantomtext Text color for phantom insets
24830 \begin_layout Description
24831 urllabel Label color for URL insets
24834 \begin_layout Description
24835 urltext Color for URL inset text
24838 \begin_layout Description
24839 depthbar Color for the depth bars in the margin
24842 \begin_layout Description
24843 language Color for marking foreign language words
24846 \begin_layout Description
24847 command Text color for command insets
24850 \begin_layout Description
24851 commandbg Background color for command insets
24854 \begin_layout Description
24855 commandframe Frame color for command insets
24858 \begin_layout Description
24859 special Special chars text color
24862 \begin_layout Description
24863 graphicsbg Graphics inset background color
24866 \begin_layout Description
24867 math Math inset text color
24870 \begin_layout Description
24871 mathbg Math inset background color
24874 \begin_layout Description
24875 mathmacrobg Macro math inset background color
24878 \begin_layout Description
24879 mathmacrohoverbg Macro math inset background color hovered
24882 \begin_layout Description
24883 mathmacrolabel Macro math label color
24886 \begin_layout Description
24887 mathmacroframe Macro math frame color
24890 \begin_layout Description
24891 mathmacroblend Macro math blended color
24894 \begin_layout Description
24895 mathmacrooldarg Macro template color for old parameters
24898 \begin_layout Description
24899 mathmacronewarg Macro template color for new parameters
24902 \begin_layout Description
24903 mathframe Math inset frame color under focus
24906 \begin_layout Description
24907 mathcorners Math inset frame color not under focus
24910 \begin_layout Description
24911 mathline Math line color
24914 \begin_layout Description
24915 collapsable Collapsable insets text
24918 \begin_layout Description
24919 collapsableframe Collapsable insets frame
24922 \begin_layout Description
24923 insetbg Inset marker background color
24926 \begin_layout Description
24927 insetframe Inset marker frame color
24930 \begin_layout Description
24931 error Error box text color
24934 \begin_layout Description
24935 eolmarker End of line marker color
24938 \begin_layout Description
24939 added_space Added space colour
24942 \begin_layout Description
24943 appendix Appendix marker color
24946 \begin_layout Description
24947 changebar Changebar color
24950 \begin_layout Description
24951 deletedtext Deleted text color
24954 \begin_layout Description
24955 addedtext Added text color
24958 \begin_layout Description
24959 changedtextauthor1 Changed text color author 1
24962 \begin_layout Description
24963 changedtextauthor2 Changed text color author 2
24966 \begin_layout Description
24967 changedtextauthor3 Changed text color author 3
24970 \begin_layout Description
24971 changedtextauthor4 Changed text color author 4
24974 \begin_layout Description
24975 changedtextauthor5 Changed text color author 5
24978 \begin_layout Description
24979 deletedtextmodifier Deleted text modifying color
24982 \begin_layout Description
24983 tabularline Table line color
24986 \begin_layout Description
24987 tabularonoffline Table line color
24990 \begin_layout Description
24991 bottomarea Bottom area color
24994 \begin_layout Description
24995 newpage New page color
24998 \begin_layout Description
24999 pagebreak Page break color
25002 \begin_layout Description
25003 buttonframe Color used for button frame
25006 \begin_layout Description
25007 buttonbg Color used for bottom background
25010 \begin_layout Description
25011 buttonhoverbg Color used for buttom under focus
25014 \begin_layout Description
25015 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25019 \begin_layout Description
25020 previewframe Preview frame color
25023 \begin_layout Description
25024 inherit Color is inherited
25027 \begin_layout Description
25028 regexpframe Color for regexp frame
25031 \begin_layout Description
25032 ignore For ignoring updates of a color