1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
9 % DO NOT ALTER THIS PREAMBLE!!!
11 % This preamble is designed to ensure that this document prints
12 % out as advertised. If you mess with this preamble,
13 % parts of this document may not print out as expected. If you
14 % have problems LaTeXing this file, please contact
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
18 % the pages of the TOC is numbered roman
19 % and a pdf-bookmark for the TOC is added
20 \let\myTOC\tableofcontents
21 \renewcommand\tableofcontents{%
23 \pdfbookmark[1]{\contentsname}{}
27 % increase link area for cross-references and autoname them,
28 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
29 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
30 \@ifpackageloaded{babel}{
31 \addto\extrasenglish{%
32 \renewcommand*{\equationautorefname}[1]{}%
33 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
34 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
35 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
39 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
44 \maintain_unincluded_children false
46 \language_package default
49 \font_roman "lmodern" "default"
50 \font_sans "lmss" "default"
51 \font_typewriter "lmtt" "default"
52 \font_math "auto" "auto"
53 \font_default_family default
54 \use_non_tex_fonts false
57 \font_sf_scale 100 100
58 \font_tt_scale 100 100
60 \default_output_format pdf2
62 \bibtex_command default
63 \index_command default
67 \pdf_title "LyX Configuration Manual"
68 \pdf_author "LyX Team"
69 \pdf_subject "LyX-documentation Customization"
70 \pdf_keywords "LyX, documentation, customization"
72 \pdf_bookmarksnumbered true
73 \pdf_bookmarksopen true
74 \pdf_bookmarksopenlevel 1
79 \pdf_pdfusetitle false
80 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
83 \use_package amsmath 0
84 \use_package amssymb 0
87 \use_package mathdots 1
88 \use_package mathtools 0
90 \use_package stackrel 0
91 \use_package stmaryrd 0
92 \use_package undertilde 0
94 \cite_engine_type default
98 \paperorientation portrait
102 \notefontcolor #0000ff
114 \paragraph_separation indent
115 \paragraph_indentation default
116 \quotes_language english
119 \paperpagestyle headings
120 \tracking_changes false
121 \output_changes false
130 Customizing \SpecialChar LyX
131 : Features for the Advanced User
135 by the \SpecialChar LyX
140 \begin_layout Plain Layout
142 If you have comments or error corrections, please send them to the \SpecialChar LyX
145 \begin_inset CommandInset href
147 target "lyx-docs@lists.lyx.org"
154 \begin_inset Quotes eld
158 \begin_inset Quotes erd
161 in the subject header, and please cc the current maintainer of this file,
162 Richard Heck <rgheck@comcast.net>.
168 \begin_inset Newline newline
172 \begin_inset Newline newline
178 \begin_layout Standard
179 \begin_inset CommandInset toc
180 LatexCommand tableofcontents
187 \begin_layout Standard
188 \begin_inset Note Note
191 \begin_layout Plain Layout
192 Please use change tracking when modifying this document.
193 This makes it easier for our translators to recognize things that have
194 been changed, and it helps the maintainer keep up-to-date with what's been
203 \begin_layout Chapter
207 \begin_layout Standard
208 This manual covers the customization features present in \SpecialChar LyX
210 In it, we discuss issues like keyboard shortcuts, screen previewing options,
211 printer options, sending commands to \SpecialChar LyX
212 via the \SpecialChar LyX
213 Server, internationalization,
214 installing new \SpecialChar LaTeX
215 classes and \SpecialChar LyX
217 We can't possibly hope to touch on everything you can change—our developers
218 add new features faster than we can document them—but we will explain the
219 most common customizations and hopefully point you in the right direction
220 for some of the more obscure ones.
223 \begin_layout Standard
224 \begin_inset Branch OutDated
227 \begin_layout Standard
228 Information from previous versions of this document that now seems to be
229 outdated is contained in the OutDated branch of this document.
230 By default, this information will not appear in the \SpecialChar LaTeX
239 \begin_layout Chapter
244 \begin_layout Standard
245 This chapter aims to help you to find your way through the \SpecialChar LyX
248 Before continuing to read this chapter, you should find out where your
250 library and user directories are by using
251 \begin_inset Flex Noun
254 \begin_layout Plain Layout
255 Help\SpecialChar menuseparator
266 The library directory is the place where \SpecialChar LyX
267 places its system-wide configuration
268 files; the user directory is where you can place your modified versions.
269 We will call the former
270 \begin_inset Flex Code
273 \begin_layout Plain Layout
280 \begin_inset Flex Noun
283 \begin_layout Plain Layout
289 in the remainder of this document.
293 \begin_layout Section
295 \begin_inset Flex Code
298 \begin_layout Plain Layout
307 \begin_layout Standard
308 \begin_inset Flex Code
311 \begin_layout Plain Layout
317 and its sub-directories contain a number of files and that can be used
318 to customize \SpecialChar LyX
320 You can change many of these files from within \SpecialChar LyX
322 \begin_inset Flex Noun
325 \begin_layout Plain Layout
326 Tools\SpecialChar menuseparator
333 Most customization that you will want to do in \SpecialChar LyX
334 is possible through this
336 However, many other inner aspects of \SpecialChar LyX
337 can be customized by modifying the
339 \begin_inset Flex Code
342 \begin_layout Plain Layout
349 These files fall in different categories, described in the following subsection
353 \begin_layout Subsection
354 Automatically generated files
357 \begin_layout Standard
358 The files, which are to be found in
359 \begin_inset Flex Noun
362 \begin_layout Plain Layout
368 , are generated when you configure \SpecialChar LyX
370 They contain various default values that are guessed by inspection.
371 In general, it is not a good idea to modify them, since they might be overwritt
375 \begin_layout Labeling
376 \labelwidthstring 00.00.0000
377 \begin_inset Flex Code
380 \begin_layout Plain Layout
386 contains defaults for various commands.
389 \begin_layout Labeling
390 \labelwidthstring 00.00.0000
391 \begin_inset Flex Code
394 \begin_layout Plain Layout
400 contains the list of packages that have been recognized by \SpecialChar LyX
402 It is currently unused by the \SpecialChar LyX
403 program itself, but the information extracted,
404 and more, is made available with
405 \begin_inset Flex Noun
408 \begin_layout Plain Layout
409 Help\SpecialChar menuseparator
423 \begin_layout Labeling
424 \labelwidthstring 00.00.0000
425 \begin_inset Flex Code
428 \begin_layout Plain Layout
434 the list of text classes that have been found in your
435 \begin_inset Flex Code
438 \begin_layout Plain Layout
444 directories, along with the associated \SpecialChar LaTeX
445 document class and their description.
448 \begin_layout Labeling
449 \labelwidthstring 00.00.0000
450 \begin_inset Flex Code
453 \begin_layout Plain Layout
459 the list of layout modules found in your
460 \begin_inset Flex Code
463 \begin_layout Plain Layout
472 \begin_layout Labeling
473 \labelwidthstring 00.00.0000
474 \begin_inset Flex Code
477 \begin_layout Plain Layout
483 lists of various sorts of \SpecialChar LaTeX
484 -related files found on your system
487 \begin_layout Labeling
488 \labelwidthstring 00.00.0000
489 \begin_inset Flex Code
492 \begin_layout Plain Layout
493 doc/\SpecialChar LaTeX
499 is automatically generated during configuration from the file
500 \begin_inset Flex Code
503 \begin_layout Plain Layout
511 It contains information on your \SpecialChar LaTeX
515 \begin_layout Subsection
519 \begin_layout Standard
520 These directories are duplicated between
521 \begin_inset Flex Code
524 \begin_layout Plain Layout
531 \begin_inset Flex Code
534 \begin_layout Plain Layout
541 If a particular files exists in both places, the one in
542 \begin_inset Flex Code
545 \begin_layout Plain Layout
554 \begin_layout Labeling
555 \labelwidthstring 00.00.0000
556 \begin_inset Flex Code
559 \begin_layout Plain Layout
565 this directory contains files with the extension
566 \begin_inset Flex Code
569 \begin_layout Plain Layout
575 that define the keybindings used in \SpecialChar LyX
577 If there exists an internationalized version of the bind file named
578 \begin_inset Flex Code
581 \begin_layout Plain Layout
587 , that will be used first.
590 \begin_layout Labeling
591 \labelwidthstring 00.00.0000
592 \begin_inset Flex Code
595 \begin_layout Plain Layout
601 contains graphics files that can be included in documents.
605 \begin_layout Labeling
606 \labelwidthstring 00.00.0000
607 \begin_inset Flex Code
610 \begin_layout Plain Layout
616 contains \SpecialChar LyX
617 documentation files (including the one you are currently reading).
619 \begin_inset Flex Code
622 \begin_layout Plain Layout
629 deserves special attention, as noted above.
630 The internationalized help docs are in subdirectories
631 \begin_inset Flex Code
634 \begin_layout Plain Layout
641 \begin_inset Quotes eld
645 \begin_inset Quotes erd
648 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 Noun
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 Noun
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 \SpecialChar LyX
711 \begin_layout Labeling
712 \labelwidthstring 00.00.0000
713 \begin_inset Flex Code
716 \begin_layout Plain Layout
722 contains keyboard keymapping files.
724 \begin_inset CommandInset ref
726 reference "sec:International-Keymap-Stuff"
733 \begin_layout Labeling
734 \labelwidthstring 00.00.0000
735 \begin_inset Flex Code
738 \begin_layout Plain Layout
744 contains the text class and module files described in
745 \begin_inset CommandInset ref
747 reference "cha:Installing-New-Document"
754 \begin_layout Labeling
755 \labelwidthstring 00.00.0000
756 \begin_inset Flex Code
759 \begin_layout Plain Layout
766 \begin_inset Flex Code
769 \begin_layout Plain Layout
775 Python scripts used to convert between \SpecialChar LyX
777 These can be run from the command line if, say, you want to batch-convert
781 \begin_layout Labeling
782 \labelwidthstring 00.00.0000
783 \begin_inset Flex Code
786 \begin_layout Plain Layout
792 contains some files that demonstrate the capabilities of the
793 \begin_inset Flex Noun
796 \begin_layout Plain Layout
807 Also contains some scripts used by \SpecialChar LyX
811 \begin_layout Labeling
812 \labelwidthstring 00.00.0000
813 \begin_inset Flex Code
816 \begin_layout Plain Layout
822 contains the standard \SpecialChar LyX
823 template files described in
824 \begin_inset CommandInset ref
826 reference "subsec:Creating-Templates"
833 \begin_layout Labeling
834 \labelwidthstring 00.00.0000
835 \begin_inset Flex Code
838 \begin_layout Plain Layout
844 contains files with the extension
845 \begin_inset Flex Code
848 \begin_layout Plain Layout
854 that define the user interface to \SpecialChar LyX
856 That is, the files define which items appear in which menus and the items
857 appearing on the toolbar.
860 \begin_layout Subsection
861 Files you don't want to modify
864 \begin_layout Standard
865 These files are used internally by \SpecialChar LyX
866 and you generally do not need to modify
867 them unless you are a developer.
870 \begin_layout Labeling
871 \labelwidthstring 00.00.0000
872 \begin_inset Flex Code
875 \begin_layout Plain Layout
881 this file contains the list of \SpecialChar LyX
883 The contents are displayed with the menu entry
884 \begin_inset Flex Noun
887 \begin_layout Plain Layout
888 Help\SpecialChar menuseparator
901 \begin_layout Labeling
902 \labelwidthstring 00.00.0000
903 \begin_inset Flex Code
906 \begin_layout Plain Layout
912 this is a \SpecialChar LaTeX
913 script used during the configuration process.
917 \begin_layout Labeling
918 \labelwidthstring 00.00.0000
919 \begin_inset Flex Code
922 \begin_layout Plain Layout
928 this is a Python script that is used to re-configure \SpecialChar LyX
930 It creates configuration files in the directory it was run from.
933 \begin_layout Subsection
934 Other files needing a line or two
937 \begin_layout Labeling
938 \labelwidthstring 00.00.0000
939 \begin_inset Flex Code
942 \begin_layout Plain Layout
948 this contains tables describing how different character encodings can be
952 \begin_layout Labeling
953 \labelwidthstring 00.00.0000
954 \begin_inset Flex Code
957 \begin_layout Plain Layout
963 this file contains the templates available to the new
964 \begin_inset Flex Noun
967 \begin_layout Plain Layout
978 \begin_inset CommandInset ref
980 reference "chap:Including-External-Material"
987 \begin_layout Labeling
988 \labelwidthstring 00.00.0000
989 \begin_inset Flex Code
992 \begin_layout Plain Layout
998 this file contains a list of all the languages currently supported by \SpecialChar LyX
1002 \begin_layout Labeling
1003 \labelwidthstring 00.00.0000
1004 \begin_inset Flex Code
1007 \begin_layout Plain Layout
1013 contains information about the supported fonts.
1016 \begin_layout Labeling
1017 \labelwidthstring 00.00.0000
1018 \begin_inset Flex Code
1021 \begin_layout Plain Layout
1027 this file contains translations for internationalized paragraph styles
1029 \begin_inset CommandInset ref
1031 reference "subsec:I18n"
1038 \begin_layout Labeling
1039 \labelwidthstring 00.00.0000
1040 \begin_inset Flex Code
1043 \begin_layout Plain Layout
1049 this file contains information about unicode-encoded glyphs and the way
1050 they are supported by \SpecialChar LyX
1051 via \SpecialChar LaTeX
1055 \begin_layout Section
1056 Your local configuration directory
1059 \begin_layout Standard
1060 Even if you are using \SpecialChar LyX
1061 as an unprivileged user, you might want to change
1063 configuration for your own use.
1065 \begin_inset Flex Code
1068 \begin_layout Plain Layout
1074 directory contains all your personal configuration files.
1075 This is the directory described as
1076 \begin_inset Quotes eld
1080 \begin_inset Quotes erd
1084 \begin_inset Flex Noun
1087 \begin_layout Plain Layout
1088 Help\SpecialChar menuseparator
1090 \begin_inset space ~
1099 This directory is used as a mirror of
1100 \begin_inset Flex Code
1103 \begin_layout Plain Layout
1109 , which means that every file in
1110 \begin_inset Flex Code
1113 \begin_layout Plain Layout
1119 is a replacement for the corresponding file in
1120 \begin_inset Flex Code
1123 \begin_layout Plain Layout
1130 Any configuration file described in the above sections can be placed either
1131 in the system-wide directory, in which case it will affect all users, or
1132 in your local directory for your own use.
1135 \begin_layout Standard
1136 To make things clearer, let's provide a few examples:
1139 \begin_layout Itemize
1140 The preferences set in the
1141 \begin_inset Flex Noun
1144 \begin_layout Plain Layout
1145 Tools\SpecialChar menuseparator
1151 dialog are saved to a file
1152 \begin_inset Flex Code
1155 \begin_layout Plain Layout
1162 \begin_inset Flex Code
1165 \begin_layout Plain Layout
1174 \begin_layout Itemize
1175 When you reconfigure using
1176 \begin_inset Flex Noun
1179 \begin_layout Plain Layout
1180 Tools\SpecialChar menuseparator
1188 \begin_inset Flex Code
1191 \begin_layout Plain Layout
1197 script, and the resulting files are written in your local configuration
1199 This means that any additional text class file that you might have added
1201 \begin_inset Flex Code
1204 \begin_layout Plain Layout
1210 will be added to the list of classes in the
1211 \begin_inset Flex Noun
1214 \begin_layout Plain Layout
1215 Document\SpecialChar menuseparator
1224 \begin_layout Itemize
1225 If you get some updated documentation from \SpecialChar LyX
1226 ftp site and cannot install
1227 it because you do not have sysadmin rights on your system, you can just
1229 \begin_inset Flex Code
1232 \begin_layout Plain Layout
1238 and the items in the
1239 \begin_inset Flex Noun
1242 \begin_layout Plain Layout
1248 menu will open them!
1251 \begin_layout Section
1252 Running \SpecialChar LyX
1253 with multiple configurations
1256 \begin_layout Standard
1257 The configuration freedom of the local configuration directory may not suffice
1258 if you want to have more than one configuration at your disposal.
1259 For example, you may want to be use different key bindings or printer settings
1261 You can achieve this by having several such directories.
1262 You then specify which directory to use at run-time.
1265 \begin_layout Standard
1266 Invoking \SpecialChar LyX
1267 with the command line switch
1268 \begin_inset Flex Code
1271 \begin_layout Plain Layout
1281 instructs the program to read the configuration from that directory, and
1282 not from the default directory.
1283 (You can determine the default directory by running \SpecialChar LyX
1285 \begin_inset Flex Code
1288 \begin_layout Plain Layout
1294 switch.) If the specified directory does not exist, \SpecialChar LyX
1296 for you, just like it does for the default directory on the first time
1297 you run the program.
1298 You can modify the configuration options in this additional user directory
1299 exactly as you would for the default directory.
1300 These directories are completely independent (but read on).
1301 Note that setting the environment variable
1302 \begin_inset Flex Code
1305 \begin_layout Plain Layout
1311 to some value has exactly the same effect.
1314 \begin_layout Standard
1315 Having several configurations also requires more maintenance: if you want
1316 to add a new layout to
1317 \begin_inset Flex Code
1320 \begin_layout Plain Layout
1326 which you want available from all your configurations, you must add it
1327 to each directory separately.
1328 You can avoid this with the following trick: after \SpecialChar LyX
1329 creates the additional
1330 directory, most of the subdirectories (see above) are empty.
1331 If you want the new configuration to mirror an existing one, replace the
1332 empty subdirectory with a symbolic link to the matching subdirectory in
1333 the existing configuration.
1335 \begin_inset Flex Code
1338 \begin_layout Plain Layout
1344 subdirectory, however, since it contains a file written by the configuration
1345 script (also accessible through
1346 \begin_inset Flex Noun
1349 \begin_layout Plain Layout
1350 Tools\SpecialChar menuseparator
1356 ) which is configuration-specific.
1359 \begin_layout Chapter
1360 The Preferences dialog
1363 \begin_layout Standard
1364 All options of the preferences dialog are described in the Appendix
1366 The Preferences Dialog
1373 For some options you might find here more details.
1376 \begin_layout Section
1378 \begin_inset CommandInset label
1387 \begin_layout Standard
1388 The first step is to define your file formats if they are not already defined.
1390 \begin_inset Flex Noun
1393 \begin_layout Plain Layout
1394 Tools\SpecialChar menuseparator
1402 \begin_inset Flex Noun
1405 \begin_layout Plain Layout
1406 File Handling\SpecialChar menuseparator
1413 \begin_inset Flex Noun
1416 \begin_layout Plain Layout
1422 button to define your new format.
1424 \begin_inset Flex Noun
1427 \begin_layout Plain Layout
1433 field contains the name used to identify the format in the GUI.
1435 \begin_inset Flex Noun
1438 \begin_layout Plain Layout
1444 is used to identify the format internally.
1445 You will also need to enter a file extension.
1446 These are all required.
1448 \begin_inset Flex Noun
1451 \begin_layout Plain Layout
1457 field is used to provide a keyboard shortcut on the menus.
1458 (For example, pressing
1459 \begin_inset Flex Noun
1462 \begin_layout Plain Layout
1469 \begin_inset Flex Noun
1472 \begin_layout Plain Layout
1473 Document\SpecialChar menuseparator
1474 View (Other Formats)\SpecialChar menuseparator
1483 \begin_layout Standard
1485 \begin_inset Flex Noun
1488 \begin_layout Plain Layout
1495 \begin_inset Flex Noun
1498 \begin_layout Plain Layout
1505 For example, you might want to use
1506 \begin_inset Flex Noun
1509 \begin_layout Plain Layout
1515 to view PostScript files.
1516 You can enter the command needed to start the program in the corresponding
1518 In defining this command, you can use the four variables listed in the
1520 The viewer is launched when you view an image in \SpecialChar LyX
1522 \begin_inset Flex Noun
1525 \begin_layout Plain Layout
1526 Document\SpecialChar menuseparator
1533 The editor is for example launched when you right-click on an image and
1535 \begin_inset Flex Noun
1538 \begin_layout Plain Layout
1544 in the appearing context menu.
1547 \begin_layout Standard
1549 \begin_inset Flex Noun
1552 \begin_layout Plain Layout
1558 type of a format is optional, but if it is specified, it must be unique
1560 It is used to detect files of this format from the file contents.
1561 For some important file formats there is no MIME type officially registered
1563 \begin_inset CommandInset href
1566 target "http://www.iana.org/assignments/media-types/"
1571 Therefore \SpecialChar LyX
1572 uses the extended list of MIME types as specified by
1573 \begin_inset CommandInset href
1575 name "freedesktop.org"
1576 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1583 \begin_layout Standard
1585 \begin_inset Flex Noun
1588 \begin_layout Plain Layout
1594 option tells \SpecialChar LyX
1595 that a format is suitable for document export.
1596 If this is set and if a suitable conversion route exists (see
1597 \begin_inset CommandInset ref
1599 reference "sec:Converters"
1603 ), the format will appear in the
1604 \begin_inset Flex Noun
1607 \begin_layout Plain Layout
1608 File\SpecialChar menuseparator
1615 The format will also appear in the
1616 \begin_inset Flex Noun
1619 \begin_layout Plain Layout
1620 Document\SpecialChar menuseparator
1626 menu if a viewer is specified for the format.
1627 Pure image formats, such as
1628 \begin_inset Flex Code
1631 \begin_layout Plain Layout
1637 , should not use this option.
1638 Formats that can both represent vector graphics and documents like
1639 \begin_inset Flex Code
1642 \begin_layout Plain Layout
1651 \begin_layout Standard
1653 \begin_inset Flex Noun
1656 \begin_layout Plain Layout
1657 Vector graphics format
1662 tells \SpecialChar LyX
1663 that a format can contain vector graphics.
1664 This information is used to determine the target format of included graphics
1666 \begin_inset Flex Noun
1669 \begin_layout Plain Layout
1676 Included graphics may need to be converted to either
1677 \begin_inset Flex Noun
1680 \begin_layout Plain Layout
1687 \begin_inset Flex Noun
1690 \begin_layout Plain Layout
1697 \begin_inset Flex Noun
1700 \begin_layout Plain Layout
1707 \begin_inset Flex Noun
1710 \begin_layout Plain Layout
1716 cannot handle other image formats.
1717 If an included graphic is not already in
1718 \begin_inset Flex Noun
1721 \begin_layout Plain Layout
1728 \begin_inset Flex Noun
1731 \begin_layout Plain Layout
1738 \begin_inset Flex Noun
1741 \begin_layout Plain Layout
1747 format, it is converted to
1748 \begin_inset Flex Noun
1751 \begin_layout Plain Layout
1757 if the vector format option is set, and otherwise to
1758 \begin_inset Flex Noun
1761 \begin_layout Plain Layout
1770 \begin_layout Section
1774 \begin_layout Standard
1775 Since all conversions from one format to another take place in \SpecialChar LyX
1777 directory, it is sometimes necessary to modify a file before copying it
1778 to the temporary directory in order that the conversion may be performed.
1782 \begin_layout Plain Layout
1783 For example, the file may refer to other files—images, for example—using
1784 relative file names, and these may become invalid when the file is copied
1785 to the temporary directory.
1790 This is done by a Copier: It copies a file to (or from) the temporary directory
1791 and may modify it in the process.
1794 \begin_layout Standard
1795 The definitions of the copiers may use eight variables:
1798 \begin_layout Labeling
1799 \labelwidthstring 00.00.0000
1800 \begin_inset Flex Code
1803 \begin_layout Plain Layout
1809 The \SpecialChar LyX
1810 system directory (e.
1811 \begin_inset space \thinspace{}
1815 \begin_inset space \space{}
1819 \begin_inset Flex Noun
1822 \begin_layout Plain Layout
1831 \begin_layout Labeling
1832 \labelwidthstring 00.00.0000
1833 \begin_inset Flex Code
1836 \begin_layout Plain Layout
1845 \begin_layout Labeling
1846 \labelwidthstring 00.00.0000
1847 \begin_inset Flex Code
1850 \begin_layout Plain Layout
1859 \begin_layout Labeling
1860 \labelwidthstring 00.00.0000
1861 \begin_inset Flex Code
1864 \begin_layout Plain Layout
1870 The base name (without filename extension) in the \SpecialChar LyX
1874 \begin_layout Labeling
1875 \labelwidthstring 00.00.0000
1876 \begin_inset Flex Code
1879 \begin_layout Plain Layout
1885 The full directory path of the \SpecialChar LyX
1889 \begin_layout Labeling
1890 \labelwidthstring 00.00.0000
1891 \begin_inset Flex Code
1894 \begin_layout Plain Layout
1900 The full pathname to the original \SpecialChar LyX
1901 file being processed
1904 \begin_layout Labeling
1905 \labelwidthstring 00.00.0000
1906 \begin_inset Flex Code
1909 \begin_layout Plain Layout
1915 The filename (without any directory path) of the \SpecialChar LyX
1919 \begin_layout Labeling
1920 \labelwidthstring 00.00.0000
1921 \begin_inset Flex Code
1924 \begin_layout Plain Layout
1930 The `\SpecialChar LaTeX
1934 \begin_layout Standard
1935 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1943 It is relevant only when exporting files suitable for such inclusion.
1946 \begin_layout Standard
1947 Copiers can be used to do almost anything with output files.
1948 For example, suppose you want generated pdf files to be copied to a special
1950 \begin_inset Flex Code
1953 \begin_layout Plain Layout
1960 Then you could write a shell script such as this one:
1963 \begin_layout Standard
1964 \begin_inset listings
1968 \begin_layout Plain Layout
1973 \begin_layout Plain Layout
1978 \begin_layout Plain Layout
1980 TOFILE=`basename $2`
1983 \begin_layout Plain Layout
1985 cp $FROMFILE /home/you/pdf/$TOFILE
1990 Save it in your local \SpecialChar LyX
1992 \begin_inset Flex Code
1995 \begin_layout Plain Layout
1996 /home/you/.lyx/scripts/pdfcopier.sh
2001 —and make it executable, if you need to do so on your platform.
2003 \begin_inset Flex Noun
2006 \begin_layout Plain Layout
2007 Tools\SpecialChar menuseparator
2013 dialog, select under
2014 \begin_inset Flex Noun
2017 \begin_layout Plain Layout
2018 File Handling\SpecialChar menuseparator
2025 \begin_inset Flex Noun
2028 \begin_layout Plain Layout
2034 format—or one of the other pdf formats—and enter
2035 \begin_inset Flex Code
2038 \begin_layout Plain Layout
2039 pdfcopier.sh $$i $$o
2045 \begin_inset Flex Noun
2048 \begin_layout Plain Layout
2058 \begin_layout Standard
2059 Copiers are used by \SpecialChar LyX
2060 in various of its own conversions.
2061 For example, if appropriate programs are found, \SpecialChar LyX
2062 will automatically install
2064 \begin_inset Flex Noun
2067 \begin_layout Plain Layout
2074 \begin_inset Flex Noun
2077 \begin_layout Plain Layout
2079 \begin_inset space ~
2088 When these formats are exported, the copier sees that not just the main
2089 HTML file but various associated files (style files, images, etc.) are also
2091 All these files are written to a subdirectory of the directory in which
2092 the original \SpecialChar LyX
2097 \begin_layout Plain Layout
2098 This copier can be customized.
2100 \begin_inset Quotes eld
2104 \begin_inset Quotes erd
2107 argument takes a comma-separated list of extensions to be copied; if it
2108 is omitted, all files will be copied.
2110 \begin_inset Quotes eld
2114 \begin_inset Quotes erd
2117 argument determines the extension added to the generated directory.
2119 \begin_inset Quotes eld
2123 \begin_inset Flex Noun
2126 \begin_layout Plain Layout
2133 \begin_inset Quotes erd
2136 , so HTML generated from
2137 \begin_inset Flex Noun
2140 \begin_layout Plain Layout
2141 /path/to/filename.lyx
2147 \begin_inset Flex Noun
2150 \begin_layout Plain Layout
2151 /path/to/filename.html.LyXconv
2165 \begin_layout Section
2167 \begin_inset CommandInset label
2169 name "sec:Converters"
2176 \begin_layout Standard
2177 You can define your own Converters to convert files between different formats.
2179 \begin_inset Flex Noun
2182 \begin_layout Plain Layout
2183 Tools\SpecialChar menuseparator
2184 Preferences\SpecialChar menuseparator
2185 File Handling\SpecialChar menuseparator
2194 \begin_layout Standard
2195 To define a new converter, select the
2196 \begin_inset Flex Noun
2199 \begin_layout Plain Layout
2201 \begin_inset space ~
2210 \begin_inset Flex Noun
2213 \begin_layout Plain Layout
2215 \begin_inset space ~
2223 from the drop-down lists, enter the command needed for the conversion,
2225 \begin_inset Flex Noun
2228 \begin_layout Plain Layout
2235 Several variables can be used in the definition of converters:
2238 \begin_layout Labeling
2239 \labelwidthstring 00.00.0000
2240 \begin_inset Flex Code
2243 \begin_layout Plain Layout
2249 The \SpecialChar LyX
2253 \begin_layout Labeling
2254 \labelwidthstring 00.00.0000
2255 \begin_inset Flex Code
2258 \begin_layout Plain Layout
2267 \begin_layout Labeling
2268 \labelwidthstring 00.00.0000
2269 \begin_inset Flex Code
2272 \begin_layout Plain Layout
2281 \begin_layout Labeling
2282 \labelwidthstring 00.00.0000
2283 \begin_inset Flex Code
2286 \begin_layout Plain Layout
2292 The base filename of the input file (i.
2293 \begin_inset space \thinspace{}
2296 g., without the extension)
2299 \begin_layout Labeling
2300 \labelwidthstring 00.00.0000
2301 \begin_inset Flex Code
2304 \begin_layout Plain Layout
2310 The path to the input file
2313 \begin_layout Labeling
2314 \labelwidthstring 00.00.0000
2315 \begin_inset Flex Code
2318 \begin_layout Plain Layout
2324 The path to the original input file (this is different from $$p when a
2325 chain of converters is called)
2328 \begin_layout Labeling
2329 \labelwidthstring 00.00.0000
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2339 The iconv name for the encoding of the document.
2342 \begin_layout Standard
2344 \begin_inset Flex Noun
2347 \begin_layout Plain Layout
2349 \begin_inset space ~
2357 field you can enter the following flags, separated by commas:
2360 \begin_layout Labeling
2361 \labelwidthstring 00.00.0000
2362 \begin_inset Flex Code
2365 \begin_layout Plain Layout
2371 This converter runs some form of \SpecialChar LaTeX
2373 This will make \SpecialChar LyX
2374 's \SpecialChar LaTeX
2375 error logs available.
2378 \begin_layout Labeling
2379 \labelwidthstring 00.00.0000
2380 \begin_inset Flex Code
2383 \begin_layout Plain Layout
2389 Needs the \SpecialChar LaTeX
2391 \begin_inset Flex Noun
2394 \begin_layout Plain Layout
2400 file for the conversion.
2403 \begin_layout Labeling
2404 \labelwidthstring 00.00.0000
2405 \begin_inset Flex Code
2408 \begin_layout Plain Layout
2415 \begin_inset Quotes eld
2419 \begin_inset Quotes erd
2422 file from the backend, which in practice means a \SpecialChar LaTeX
2423 file like the one we
2424 would export, without
2425 \begin_inset Flex Code
2428 \begin_layout Plain Layout
2437 \begin_layout Labeling
2438 \labelwidthstring 00.00.0000
2439 \begin_inset Flex Code
2442 \begin_layout Plain Layout
2451 \begin_layout Standard
2452 The following three flags are not really flags at all because they take
2454 \begin_inset Flex Noun
2457 \begin_layout Plain Layout
2459 \begin_inset space ~
2463 \begin_inset space ~
2474 \begin_layout Labeling
2475 \labelwidthstring 00.00.0000
2476 \begin_inset Flex Code
2479 \begin_layout Plain Layout
2485 If set, the converter's standard error will be redirected to a file
2486 \begin_inset Flex Code
2489 \begin_layout Plain Layout
2495 , and the script given as argument will be run as:
2496 \begin_inset Flex Code
2499 \begin_layout Plain Layout
2500 script < infile.out > infile.log
2506 The argument may contain
2507 \begin_inset Flex Code
2510 \begin_layout Plain Layout
2519 \begin_layout Labeling
2520 \labelwidthstring 00.00.0000
2521 \begin_inset Flex Code
2524 \begin_layout Plain Layout
2530 The name of the directory in which the converter will dump the generated
2533 will not create this directory, and it does not copy anything into it,
2534 though it will copy this directory to the destination.
2535 The argument may contain
2536 \begin_inset Flex Code
2539 \begin_layout Plain Layout
2545 , which will be replaced by the base name of the input and output files,
2546 respectively, when the directory is copied.
2547 \begin_inset Newline newline
2550 Note that resultdir and usetempdir make no sense together.
2551 The latter will be ignored if the former is given.
2554 \begin_layout Labeling
2555 \labelwidthstring 00.00.0000
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 Determines the output file name and may, contain
2566 \begin_inset Flex Code
2569 \begin_layout Plain Layout
2576 Sensible only with resultdir and optional even then; if not given, it defaults
2580 \begin_layout Standard
2581 None of these last three are presently used in any of the converters that
2582 are installed with \SpecialChar LyX
2587 \begin_layout Standard
2588 You do not have to define converters for all formats between which you want
2590 For example, you will note that there is no `\SpecialChar LyX
2591 to PostScript' converter,
2592 but \SpecialChar LyX
2593 will export PostScript.
2594 It does so by first creating a \SpecialChar LaTeX
2595 file (no converter needs to be defined
2596 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2598 and finally converting the resulting DVI file to PostScript.
2600 finds such `chains' of converters automatically, and it will always choose
2601 the shortest possible chain.
2602 You can, though, still define multiple conversion methods between file
2604 For example, the standard \SpecialChar LyX
2605 configuration provides five ways to convert
2610 \begin_layout Enumerate
2612 \begin_inset Flex Noun
2615 \begin_layout Plain Layout
2624 \begin_layout Enumerate
2625 via (DVI and) PostScript, using
2626 \begin_inset Flex Noun
2629 \begin_layout Plain Layout
2638 \begin_layout Enumerate
2640 \begin_inset Flex Noun
2643 \begin_layout Plain Layout
2652 \begin_layout Enumerate
2654 \begin_inset Flex Noun
2657 \begin_layout Plain Layout
2667 \begin_layout Enumerate
2669 \begin_inset Flex Noun
2672 \begin_layout Plain Layout
2682 \begin_layout Standard
2683 To define such alternate chains, you must define multiple target `file formats',
2685 \begin_inset CommandInset ref
2687 reference "sec:Formats"
2692 For example, in the standard configuration, the formats named
2693 \begin_inset Flex Noun
2696 \begin_layout Plain Layout
2703 \begin_inset Flex Noun
2706 \begin_layout Plain Layout
2713 \begin_inset Flex Noun
2716 \begin_layout Plain Layout
2723 \begin_inset Flex Noun
2726 \begin_layout Plain Layout
2733 \begin_inset Flex Noun
2736 \begin_layout Plain Layout
2743 \begin_inset Flex Noun
2746 \begin_layout Plain Layout
2753 \begin_inset Flex Noun
2756 \begin_layout Plain Layout
2763 \begin_inset Flex Noun
2766 \begin_layout Plain Layout
2774 \begin_inset Flex Noun
2777 \begin_layout Plain Layout
2784 \begin_inset Flex Noun
2787 \begin_layout Plain Layout
2794 ) are defined, all of which share the extension
2795 \begin_inset Flex Noun
2798 \begin_layout Plain Layout
2804 , and which correspond to the conversion methods just mentioned.
2807 \begin_layout Chapter
2808 Internationalizing \SpecialChar LyX
2810 \begin_inset CommandInset label
2812 name "cha:Internationalizing-LyX"
2819 \begin_layout Standard
2821 supports using a translated interface.
2822 Last time we checked, \SpecialChar LyX
2823 provided text in thirty languages.
2824 The language of choice is called your
2829 (For further reading on locale settings, see also the documentation for
2830 locale that comes with your operating system.
2831 For Linux, the manual page for
2832 \begin_inset Flex Code
2835 \begin_layout Plain Layout
2841 could be a good place to start).
2844 \begin_layout Standard
2845 Notice that these translations will work, but do contain a few flaws.
2846 In particular, all dialogs have been designed with the English text in
2847 mind, which means that some of the translated text will be too large to
2848 fit within the space allocated.
2849 This is only a display problem and will not cause any harm.
2850 Also, you will find that some of the translations do not define shortcut
2851 keys for everything.
2852 Sometimes, there are simply not enough free letters to do it.
2853 Other times, the translator just hasn't got around to doing it yet.
2854 Our localization team, which you may wish to join,
2858 \begin_layout Plain Layout
2859 If you are a fluent speaker of a language other than English, joining these
2860 teams is a great way to give back to the \SpecialChar LyX
2866 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2870 \begin_layout Section
2871 Translating \SpecialChar LyX
2875 \begin_layout Subsection
2876 Translating the graphical user interface (text messages).
2879 \begin_layout Standard
2882 \begin_inset Flex Code
2885 \begin_layout Plain Layout
2891 library to handle the internationalization of the interface.
2892 To have \SpecialChar LyX
2893 speak your favorite language in all menus and dialogs, you need
2895 \begin_inset Flex Code
2898 \begin_layout Plain Layout
2904 -file for that language.
2905 When this is available, you'll have to generate a
2906 \begin_inset Flex Code
2909 \begin_layout Plain Layout
2915 -file from it and install the
2916 \begin_inset Flex Code
2919 \begin_layout Plain Layout
2926 The process of doing all of this is explained in the documentation for
2928 \begin_inset Flex Code
2931 \begin_layout Plain Layout
2938 It is possible to do this just for yourself, but if you're going to do
2939 it, you might as well share the results of your labors with the rest of
2940 the \SpecialChar LyX
2942 Send a message to the \SpecialChar LyX
2943 developers' list for more information about how
2947 \begin_layout Standard
2948 In short, this is what you should do (xx denotes the language code):
2951 \begin_layout Itemize
2952 Check out the \SpecialChar LyX
2955 \begin_inset CommandInset href
2957 name "information on the web"
2958 target "http://www.lyx.org/HowToUseGIT"
2965 \begin_layout Itemize
2967 \begin_inset Flex Code
2970 \begin_layout Plain Layout
2976 to the folder of the
2977 \begin_inset Flex Code
2980 \begin_layout Plain Layout
2988 \begin_inset Flex Code
2991 \begin_layout Plain Layout
2999 \begin_inset Flex Code
3002 \begin_layout Plain Layout
3008 doesn't exist anywhere, it can be remade with the console command
3009 \begin_inset Flex Code
3012 \begin_layout Plain Layout
3018 in that directory, or you can use an existing po-file for some other language
3022 \begin_layout Itemize
3024 \begin_inset Flex Code
3027 \begin_layout Plain Layout
3037 \begin_layout Plain Layout
3038 This is just a text file, so it can be edited in any text editor.
3039 But there are also specialized programs that support such editing, such
3044 (for all platforms) or
3053 contains a `mode' for editing
3054 \begin_inset Flex Code
3057 \begin_layout Plain Layout
3064 \begin_inset Flex URL
3067 \begin_layout Plain Layout
3069 https://www.gnu.org/software/gettext/manual/html_node/PO-Mode.html
3081 For some menu- and widget-labels, there are also shortcut keys that should
3083 Those keys are marked after a `|', and should be translated according to
3084 the words and phrases of the language.
3085 You should also fill also out the information at the beginning of the new
3087 \begin_inset Flex Code
3090 \begin_layout Plain Layout
3096 -file with your email-address, etc., so people know where to reach you with
3097 suggestions and entertaining flames.
3100 \begin_layout Standard
3101 If you are just doing this on your own, then:
3104 \begin_layout Itemize
3106 \begin_inset Flex Code
3109 \begin_layout Plain Layout
3116 This can be done with
3117 \begin_inset Flex Code
3120 \begin_layout Plain Layout
3121 msgfmt -o xx.mo < xx.po
3129 \begin_layout Itemize
3131 \begin_inset Flex Code
3134 \begin_layout Plain Layout
3140 -file to your locale-tree, at the correct directory for application messages
3145 xx, and under the name
3146 \begin_inset Flex Code
3149 \begin_layout Plain Layout
3156 \begin_inset space \thinspace{}
3160 \begin_inset space \space{}
3164 \begin_inset Flex Code
3167 \begin_layout Plain Layout
3168 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3178 \begin_layout Standard
3179 As said, however, it would be best if the new
3180 \begin_inset Flex Code
3183 \begin_layout Plain Layout
3189 file could be added to the \SpecialChar LyX
3190 distribution, so others can use it.
3191 Adding it involves making additional changes to \SpecialChar LyX
3193 So send an email to the developers' mailing list if you're interested in
3197 \begin_layout Subsubsection
3201 \begin_layout Standard
3202 Sometimes it turns out that one English message needs to be translated into
3203 different messages in the target language.
3204 One example is the message
3205 \begin_inset Flex Code
3208 \begin_layout Plain Layout
3214 which has the German translation
3222 , depending upon exactly what the English
3223 \begin_inset Quotes eld
3227 \begin_inset Quotes erd
3232 \begin_inset Flex Code
3235 \begin_layout Plain Layout
3241 does not handle such ambiguous translations.
3242 Therefore you have to add some context information to the message: Instead
3244 \begin_inset Flex Code
3247 \begin_layout Plain Layout
3254 \begin_inset Flex Code
3257 \begin_layout Plain Layout
3258 To[[as in 'From format x to format y']]
3264 \begin_inset Flex Code
3267 \begin_layout Plain Layout
3268 To[[as in 'From page x to page y']].
3273 Now the two occurrences of
3274 \begin_inset Flex Code
3277 \begin_layout Plain Layout
3284 \begin_inset Flex Code
3287 \begin_layout Plain Layout
3293 and can be translated correctly to
3304 \begin_layout Standard
3305 Of course the context information needs to be stripped off the original
3306 message when no translation is used.
3307 Therefore you have to put it in double square brackets at the end of the
3308 message (see the example above).
3309 The translation mechanism of \SpecialChar LyX
3310 ensures that everything in double square
3311 brackets at the end of messages is removed before displaying the message.
3314 \begin_layout Subsection
3315 Translating the documentation.
3318 \begin_layout Standard
3319 The online documentation (in the
3320 \begin_inset Flex Noun
3323 \begin_layout Plain Layout
3329 -menu) can (and should!) be translated.
3330 If there are translated versions of the documentation available
3334 \begin_layout Plain Layout
3335 As of March 2008, at least some of the documents have been translated into
3336 fourteen languages, with the Tutorial available in a few more.
3341 and the locale is set accordingly, these will be used automagically by
3345 looks for translated versions as
3346 \begin_inset Flex Code
3349 \begin_layout Plain Layout
3350 LyXDir/doc/xx/DocName.lyx
3356 \begin_inset Flex Code
3359 \begin_layout Plain Layout
3365 is the code for the language currently in use.
3366 If there are no translated documents, the default English versions will
3368 Note that the translated versions must have the same filenames (
3369 \begin_inset Flex Code
3372 \begin_layout Plain Layout
3378 above) as the original.
3379 If you feel up to translating the documentation (an excellent way to proof-read
3380 the original documentation by the way!), there are a few things you should
3384 \begin_layout Itemize
3385 Check out the documentation translation web page at
3386 \begin_inset CommandInset href
3388 name "http://www.lyx.org/Translation"
3389 target "http://www.lyx.org/Translation"
3394 That way, you can find out which (if any) documents have already been translate
3395 d into your language.
3396 You can also find out who (if anyone) is organizing the effort to translate
3397 the documentation into your language.
3398 If no one is organizing the effort, please let us know that you're interested.
3401 \begin_layout Standard
3402 Once you get to actually translating, here's a few hints for you that may
3406 \begin_layout Itemize
3407 Join the documentation team! There is information on how to do that in
3408 \begin_inset Flex Code
3411 \begin_layout Plain Layout
3418 \begin_inset Flex Noun
3421 \begin_layout Plain Layout
3422 Help\SpecialChar menuseparator
3428 ), which by the way is the first document you should translate.
3431 \begin_layout Itemize
3432 Learn the typographic conventions for the language you are translating to.
3433 Typography is an ancient art and over the centuries, a great variety of
3434 conventions have developed throughout different parts of the world.
3435 Also study the professional terminology amongst typographers in your country.
3436 Inventing your own terminology will only confuse the users.
3439 (Warning! Typography is addictive!)
3442 \begin_layout Itemize
3443 Make a copy of the document.
3444 This will be your working copy.
3445 You can use this as your personal translated help-file by placing it in
3447 \begin_inset Flex Code
3450 \begin_layout Plain Layout
3457 \begin_inset Note Greyedout
3460 \begin_layout Plain Layout
3465 For a complex document with external material (images, etc.), if you make
3467 \begin_inset space \thinspace{}
3471 \begin_inset space \space{}
3474 in a temp dir, beware that the links to external material may be broken
3475 when the document is moved to a different place.
3476 The best way is to retrieve the \SpecialChar LyX
3478 \begin_inset Flex URL
3481 \begin_layout Plain Layout
3483 http://www.lyx.org/HowToUseGIT
3488 ) and to edit the doc file in place.
3496 \begin_layout Itemize
3497 Sometimes the original document (from the \SpecialChar LyX
3498 team) will be updated.
3499 Use the source viewer at
3500 \begin_inset CommandInset href
3502 name "http://www.lyx.org/trac/timeline"
3503 target "http://www.lyx.org/trac/timeline"
3507 to see what has been changed.
3508 That way you can easily see which parts of the translated document need
3512 \begin_layout Standard
3513 If you ever find an error in the original document, fix it and notify the
3514 rest of the documentation team of the changes! (You didn't forget to join
3515 the documentation team, did you?)
3518 \begin_layout Standard
3519 \begin_inset Branch OutDated
3522 \begin_layout Section
3523 International Keyboard Support
3526 \begin_layout Standard
3529 [Editor's Note: The following section is by
3537 It needs to be fixed to conform to the new Documentation Style sheet and
3538 to make use of the new v1.0 features.
3539 The whole thing also needs to be merged with the section following it.-jw
3540 It may also be badly out of date.-rh (2008)]
3543 \begin_layout Subsection
3544 Defining Own Keymaps: Keymap File Format
3547 \begin_layout Standard
3548 Let's look at a keyboard definition file a little closer.
3549 It is a plain text file defining
3552 \begin_layout Itemize
3553 key-to-key or key-to-string translations
3556 \begin_layout Itemize
3560 \begin_layout Itemize
3561 dead keys exceptions
3564 \begin_layout Standard
3565 To define key-to-key or key-to-string translation, use this command:
3568 \begin_layout Quotation
3569 \begin_inset Flex Code
3572 \begin_layout Plain Layout
3581 \begin_inset Flex Code
3584 \begin_layout Plain Layout
3593 \begin_layout Standard
3595 \begin_inset Flex Code
3598 \begin_layout Plain Layout
3604 is the key to be translated and
3605 \begin_inset Flex Code
3608 \begin_layout Plain Layout
3614 is the string to be inserted into the document.
3615 To define dead keys, use:
3618 \begin_layout Quotation
3619 \begin_inset Flex Code
3622 \begin_layout Plain Layout
3631 \begin_inset Flex Code
3634 \begin_layout Plain Layout
3643 \begin_layout Standard
3645 \begin_inset Flex Code
3648 \begin_layout Plain Layout
3654 is a keyboard key and
3655 \begin_inset Flex Code
3658 \begin_layout Plain Layout
3665 The following dead keys are supported (shortcut name is in parentheses):
3668 \begin_layout Quotation
3672 \begin_inset space \hfill{}
3678 \begin_layout Quotation
3680 \begin_inset space \hfill{}
3686 \begin_layout Quotation
3688 \begin_inset space \hfill{}
3694 \begin_layout Quotation
3696 \begin_inset space \hfill{}
3702 \begin_layout Quotation
3704 \begin_inset space \hfill{}
3710 \begin_layout Quotation
3712 \begin_inset space \hfill{}
3719 \begin_layout Plain Layout
3731 \begin_layout Quotation
3733 \begin_inset space \hfill{}
3739 \begin_layout Quotation
3741 \begin_inset space \hfill{}
3748 \begin_layout Plain Layout
3760 \begin_layout Quotation
3762 \begin_inset space \hfill{}
3768 \begin_layout Quotation
3770 \begin_inset space \hfill{}
3776 \begin_layout Quotation
3778 \begin_inset space \hfill{}
3785 \begin_layout Plain Layout
3797 \begin_layout Quotation
3799 \begin_inset space \hfill{}
3806 \begin_layout Plain Layout
3818 \begin_layout Quotation
3820 \begin_inset space \hfill{}
3826 \begin_layout Quotation
3827 hungarian umlaut (hug)
3828 \begin_inset space \hfill{}
3834 \begin_layout Quotation
3836 \begin_inset space \hfill{}
3842 \begin_layout Quotation
3844 \begin_inset space \hfill{}
3851 \begin_layout Plain Layout
3863 \begin_layout Standard
3864 Since in many international keyboards there are exceptions to what some
3865 dead keys should do, you can define them using
3868 \begin_layout Quotation
3869 \begin_inset Flex Code
3872 \begin_layout Plain Layout
3880 deadkey key outstring
3883 \begin_layout Standard
3884 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3888 \begin_layout Quotation
3889 \begin_inset Flex Code
3892 \begin_layout Plain Layout
3905 \begin_layout Standard
3906 to make it work correctly.
3907 Also, you have to define as exceptions dead keys over i and j, to remove
3908 the dot from them before inserting an accent mark.
3909 I will change this when the time comes, but so far I haven't had time.
3912 \begin_layout Standard
3913 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3916 \begin_inset Flex Code
3919 \begin_layout Plain Layout
3925 have different meaning.
3927 \begin_inset Flex Code
3930 \begin_layout Plain Layout
3936 marks comments, quotes start and end \SpecialChar LaTeX
3938 To enter quote, you'll need to use
3939 \begin_inset Flex Code
3942 \begin_layout Plain Layout
3951 \begin_inset Flex Code
3954 \begin_layout Plain Layout
3961 \begin_inset Flex Code
3964 \begin_layout Plain Layout
3975 \begin_layout Standard
3976 If you make a keyboard description file that works for your language, please
3977 mail it to me, so I can include it in the next keymap distribution.
3980 \begin_layout Standard
3981 More keywords will be supported in keymap configuration file in future,
3985 \begin_layout Itemize
3986 \begin_inset Flex Code
3989 \begin_layout Plain Layout
4000 \begin_inset space \hfill{}
4004 \begin_inset Flex Code
4007 \begin_layout Plain Layout
4016 \begin_layout Itemize
4017 \begin_inset Flex Code
4020 \begin_layout Plain Layout
4031 \begin_inset space \hfill{}
4035 \begin_inset Flex Code
4038 \begin_layout Plain Layout
4044 an external keymap translation program
4047 \begin_layout Standard
4048 Also, it should look into
4049 \begin_inset Flex Code
4052 \begin_layout Plain Layout
4058 file for defaults, too (for example, a
4059 \begin_inset Flex Code
4062 \begin_layout Plain Layout
4070 option to include default keyboard).
4078 \begin_layout Section
4079 International Keymap Stuff
4080 \begin_inset CommandInset label
4082 name "sec:International-Keymap-Stuff"
4089 \begin_layout Standard
4090 \begin_inset Note Note
4093 \begin_layout Plain Layout
4094 In doing the revisions on this document in March 2008, I did not look over
4095 this stuff, as I do not understand it.
4096 It would be good if someone else could do so.
4105 \begin_layout Standard
4106 The next two sections describe the
4107 \begin_inset Flex Code
4110 \begin_layout Plain Layout
4119 \begin_inset Flex Code
4122 \begin_layout Plain Layout
4130 file syntax in detail.
4131 These sections should help you design your own key map if the ones provided
4132 do not meet your needs.
4135 \begin_layout Subsection
4139 \begin_layout Standard
4143 \begin_inset Flex Code
4146 \begin_layout Plain Layout
4152 file maps keystrokes to characters or strings.
4153 As the name suggests, it sets a keyboard mapping.
4155 \begin_inset Flex Code
4158 \begin_layout Plain Layout
4169 \begin_inset Flex Code
4172 \begin_layout Plain Layout
4187 \begin_inset Flex Code
4190 \begin_layout Plain Layout
4203 \begin_inset Flex Code
4206 \begin_layout Plain Layout
4215 \begin_inset Flex Code
4218 \begin_layout Plain Layout
4226 are described in this section.
4229 \begin_layout Labeling
4230 \labelwidthstring 00.00.0000
4231 \begin_inset Flex Code
4234 \begin_layout Plain Layout
4242 Map a character to a string
4245 \begin_layout LyX-Code
4260 \begin_layout Standard
4293 the double-quote (")
4310 must be escaped with a preceding backslash (
4321 \begin_layout Standard
4323 \begin_inset Flex Noun
4326 \begin_layout Plain Layout
4334 statement to cause the symbol
4335 \begin_inset Flex Noun
4338 \begin_layout Plain Layout
4346 to be output for the keystroke
4347 \begin_inset Flex Noun
4350 \begin_layout Plain Layout
4361 \begin_layout LyX-Code
4367 \begin_layout Labeling
4368 \labelwidthstring 00.00.0000
4369 \begin_inset Flex Code
4372 \begin_layout Plain Layout
4380 Specify an accent character
4383 \begin_layout LyX-Code
4392 \begin_layout Standard
4393 This will make the cha
4431 This is the dead key
4435 \begin_layout Plain Layout
4442 refers to a key that does not produce a character by itself, but when followed
4443 with another key, produces the desired accent character.
4444 For example, a German characte
4446 r with an umlaut like
4456 can be produced in this manner.
4465 \begin_layout Standard
4478 and then another key not in
4495 followed by the other, not allowed key, as output.
4499 \begin_inset Flex Noun
4502 \begin_layout Plain Layout
4510 cancels a dead key, so if
4521 \begin_inset Flex Noun
4524 \begin_layout Plain Layout
4533 , the cursor will not go one position backwards but will instead cancel
4549 might have had on the next keystroke.
4553 \begin_layout Standard
4554 The following example specifies that the character ' is to be an acute accent,
4555 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4558 \begin_layout LyX-Code
4561 kmod ' acute aeiouAEIOU
4564 \begin_layout Labeling
4565 \labelwidthstring 00.00.0000
4566 \begin_inset Flex Code
4569 \begin_layout Plain Layout
4575 Specify an exception to the accent character
4578 \begin_layout LyX-Code
4587 \begin_layout Standard
4588 This defines an exce
4629 have been assigned a keystroke with a previous
4632 \begin_inset Flex Code
4635 \begin_layout Plain Layout
4659 must not belong in the
4706 If such a declaration does not exist in
4714 \begin_inset Flex Code
4717 \begin_layout Plain Layout
4751 \begin_inset Flex Code
4754 \begin_layout Plain Layout
4768 \begin_layout Standard
4769 The following command produces causes äi to be produced when you enter acute-i
4773 \begin_layout LyX-Code
4787 \begin_layout Labeling
4788 \labelwidthstring 00.00.0000
4789 \begin_inset Flex Code
4792 \begin_layout Plain Layout
4798 Combine two accent characters
4801 \begin_layout LyX-Code
4807 accent1 accent2 allowed
4810 \begin_layout Standard
4811 This one is getting pretty esoteric.
4812 It allows you to combine the effect
4868 \begin_inset Flex Code
4871 \begin_layout Plain Layout
4899 \begin_layout Standard
4900 Consider this example from the
4901 \begin_inset Flex Code
4904 \begin_layout Plain Layout
4915 \begin_layout LyX-Code
4918 kmod ; acute aeioyvhAEIOYVH
4922 kcomb acute umlaut iyIY
4925 \begin_layout Standard
4926 This allows you to press
4927 \begin_inset Flex Noun
4930 \begin_layout Plain Layout
4938 and get the effect of
4939 \begin_inset Flex Code
4942 \begin_layout Plain Layout
4961 in this case cancels the last dead key, so if you press
4962 \begin_inset Flex Noun
4965 \begin_layout Plain Layout
4974 \begin_inset Flex Code
4977 \begin_layout Plain Layout
4990 \begin_layout Subsection
4994 \begin_layout Standard
4996 \begin_inset Flex Code
4999 \begin_layout Plain Layout
5007 mapping is performed, a
5008 \begin_inset Flex Code
5011 \begin_layout Plain Layout
5021 file maps the strings that the symbols generate to characters in the current
5023 The \SpecialChar LyX
5024 distribution currently includes at least the
5025 \begin_inset Flex Code
5028 \begin_layout Plain Layout
5037 \begin_inset Flex Code
5040 \begin_layout Plain Layout
5051 \begin_layout Standard
5053 \begin_inset Flex Code
5056 \begin_layout Plain Layout
5064 file is a sequence of declarations of the form
5067 \begin_layout LyX-Code
5080 \begin_layout Standard
5081 For example, in order to map
5082 \begin_inset Flex Noun
5085 \begin_layout Plain Layout
5095 to the corresponding character in the iso-8859-1 set (233), the following
5099 \begin_layout LyX-Code
5107 \begin_layout Standard
5109 \begin_inset Flex Code
5112 \begin_layout Plain Layout
5121 \begin_inset Flex Code
5124 \begin_layout Plain Layout
5142 the same character can apply to more than one string.
5144 \begin_inset Flex Code
5147 \begin_layout Plain Layout
5158 \begin_layout LyX-Code
5170 \begin_inset Newline newline
5186 \begin_layout Standard
5188 cannot find a mapping for the string produced by the keystroke or a
5189 deadkey sequence, it will check if it looks like an accented char and try
5190 to draw an accent over the character on screen.
5193 \begin_layout Subsection
5197 \begin_layout Standard
5198 There is a second way to add support for international characters through
5199 so-called dead-keys.
5200 A dead-key works in combination with a letter to produce an accented character.
5201 Here, we'll explain how to create a really simple dead-key to illustrate
5205 \begin_layout Standard
5206 Suppose you happen to need the circumflex character,
5207 \begin_inset Quotes eld
5211 \begin_inset Quotes erd
5216 \begin_inset Flex Noun
5219 \begin_layout Plain Layout
5226 \begin_inset space ~
5230 \begin_inset Flex Noun
5233 \begin_layout Plain Layout
5239 ] to the \SpecialChar LyX
5241 \begin_inset Flex Code
5244 \begin_layout Plain Layout
5251 \begin_inset Flex Code
5254 \begin_layout Plain Layout
5261 Now, whenever you type the
5262 \begin_inset Flex Noun
5265 \begin_layout Plain Layout
5271 -key followed by a letter, that letter will have a circumflex accent on
5273 For example, the sequence
5274 \begin_inset Quotes eld
5278 \begin_inset Flex Noun
5281 \begin_layout Plain Layout
5288 \begin_inset Quotes erd
5291 produces the letter:
5292 \begin_inset Quotes eld
5296 \begin_inset Quotes erd
5300 If you tried to type
5301 \begin_inset Quotes eld
5305 \begin_inset Flex Noun
5308 \begin_layout Plain Layout
5315 \begin_inset Quotes erd
5318 , however, \SpecialChar LyX
5319 will complain with a beep, since a
5320 \begin_inset Quotes eld
5324 \begin_inset Flex Noun
5327 \begin_layout Plain Layout
5334 \begin_inset Quotes erd
5337 never takes a circumflex accent.
5339 \begin_inset Flex Noun
5342 \begin_layout Plain Layout
5348 after a dead-key produces the bare-accent.
5349 Please note this last point! If you bind a key to a dead-key, you'll need
5350 to rebind the character on that key to yet another key.
5352 \begin_inset Flex Noun
5355 \begin_layout Plain Layout
5361 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5364 \begin_layout Standard
5365 One common way to bind dead-keys is to use
5366 \begin_inset Flex Noun
5369 \begin_layout Plain Layout
5376 \begin_inset Flex Noun
5379 \begin_layout Plain Layout
5386 \begin_inset Flex Noun
5389 \begin_layout Plain Layout
5395 in combination with an accent, like
5396 \begin_inset Quotes eld
5400 \begin_inset Flex Noun
5403 \begin_layout Plain Layout
5410 \begin_inset Quotes erd
5414 \begin_inset Quotes eld
5418 \begin_inset Flex Noun
5421 \begin_layout Plain Layout
5428 \begin_inset Quotes erd
5432 \begin_inset Quotes eld
5436 \begin_inset Flex Noun
5439 \begin_layout Plain Layout
5446 \begin_inset Quotes erd
5450 Another way involves using
5451 \begin_inset Flex Code
5454 \begin_layout Plain Layout
5461 \begin_inset Flex Code
5464 \begin_layout Plain Layout
5470 to set up the special
5471 \begin_inset Flex Code
5474 \begin_layout Plain Layout
5482 \begin_inset Flex Code
5485 \begin_layout Plain Layout
5491 acts in some ways just like
5492 \begin_inset Flex Noun
5495 \begin_layout Plain Layout
5501 and permits you to bind keys to accented characters.
5502 You can also turn keys into dead-keys by binding them to something like
5504 \begin_inset Flex Code
5507 \begin_layout Plain Layout
5513 and then binding this symbolic key to the corresponding \SpecialChar LyX
5518 \begin_layout Plain Layout
5523 : This is exactly what I do in my
5524 \begin_inset Flex Code
5527 \begin_layout Plain Layout
5534 \begin_inset Flex Code
5537 \begin_layout Plain Layout
5545 \begin_inset Flex Noun
5548 \begin_layout Plain Layout
5550 \begin_inset space ~
5559 \begin_inset Flex Code
5562 \begin_layout Plain Layout
5568 and a bunch of these
5569 \begin_inset Quotes eld
5573 \begin_inset Flex Code
5576 \begin_layout Plain Layout
5583 \begin_inset Quotes erd
5586 symbolic keys bound such things as
5587 \begin_inset Flex Noun
5590 \begin_layout Plain Layout
5592 \begin_inset space ~
5601 \begin_inset Flex Noun
5604 \begin_layout Plain Layout
5606 \begin_inset space ~
5615 This is how I produce my accented characters.
5620 You can make just about anything into the
5621 \begin_inset Flex Code
5624 \begin_layout Plain Layout
5631 \begin_inset Flex Noun
5634 \begin_layout Plain Layout
5640 keys, a spare function key, etc.
5641 As for the \SpecialChar LyX
5642 commands that produce accents, check the entry for
5643 \begin_inset Flex Code
5646 \begin_layout Plain Layout
5657 You'll find the complete list there.
5660 \begin_layout Subsection
5661 Saving your Language Configuration
5664 \begin_layout Standard
5665 You can edit your preferences so that your desired language environment
5666 is automatically configured when \SpecialChar LyX
5668 \begin_inset Flex Noun
5671 \begin_layout Plain Layout
5672 Edit\SpecialChar menuseparator
5681 \begin_layout Chapter
5682 Installing New Document Classes, Layouts, and Templates
5683 \begin_inset CommandInset label
5685 name "cha:Installing-New-Document"
5690 \begin_inset Argument 1
5693 \begin_layout Plain Layout
5694 Installing New Document Classes
5702 \begin_layout Standard
5703 In this chapter, we describe the procedures for creating and installing
5704 new \SpecialChar LyX
5705 layout and template files, as well as offer a refresher on correctly
5706 installing new \SpecialChar LaTeX
5711 \begin_layout Standard
5712 First, let us a say a few words about how one ought to think about the relation
5713 between \SpecialChar LyX
5714 and \SpecialChar LaTeX
5716 The thing to understand is that, in a certain sense, \SpecialChar LyX
5717 doesn't know anything
5718 about \SpecialChar LaTeX
5720 Indeed, from \SpecialChar LyX
5721 's point of view, \SpecialChar LaTeX
5722 is just one of several
5723 \begin_inset Quotes eld
5727 \begin_inset Quotes erd
5730 in which it is capable of producing output.
5731 Other such formats are DocBook, plaintext, and XHTML.
5733 is, of course, a particularly important format, but very little of the
5734 information \SpecialChar LyX
5735 has about \SpecialChar LaTeX
5736 is actually contained in the program itself.
5740 \begin_layout Plain Layout
5741 Some commands are sufficiently complex that they are
5742 \begin_inset Quotes eld
5746 \begin_inset Quotes erd
5749 into \SpecialChar LyX
5751 But the developers generally regard this as a Bad Thing.
5756 Rather, that information, even for the standard classes like
5757 \begin_inset Flex Code
5760 \begin_layout Plain Layout
5766 , is contained in `layout files'.
5767 Similarly, \SpecialChar LyX
5768 itself does not know much about DocBook or XHTML.
5769 What it knows is contained in layout files.
5772 \begin_layout Standard
5773 You can think of the layout file for a given document class as a translation
5774 manual between \SpecialChar LyX
5775 constructs—paragraphs with their corresponding styles,
5776 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5779 Almost everything \SpecialChar LyX
5781 \begin_inset Flex Code
5784 \begin_layout Plain Layout
5790 , for example, is contained in the file
5791 \begin_inset Flex Code
5794 \begin_layout Plain Layout
5800 and in various other files it includes.
5801 For this reason, anyone intending to write layout files should plan to
5802 study the existing files.
5803 A good place to start is with
5804 \begin_inset Flex Code
5807 \begin_layout Plain Layout
5813 , which is included in
5814 \begin_inset Flex Code
5817 \begin_layout Plain Layout
5824 \begin_inset Flex Code
5827 \begin_layout Plain Layout
5833 , and many of the other layout files for document classes.
5834 This file is where sections and the like are defined:
5835 \begin_inset Flex Code
5838 \begin_layout Plain Layout
5844 tells \SpecialChar LyX
5845 how paragraphs that are marked with the Section, Subsection, etc,
5846 styles can be translated into corresponding \SpecialChar LaTeX
5847 , DocBook, and XHTML commands
5850 \begin_inset Flex Code
5853 \begin_layout Plain Layout
5859 file basically just includes several of these
5860 \begin_inset Flex Code
5863 \begin_layout Plain Layout
5872 \begin_layout Standard
5873 Defining the \SpecialChar LyX
5875 correspondence is not the only thing layout files do, though.
5876 Their other job is to define how the \SpecialChar LyX
5877 constructs themselves will appear
5879 The fact that layout files have these two jobs is often a source of confusion,
5880 because they are completely separate.
5881 Telling \SpecialChar LyX
5882 how to translate a certain paragraph style into \SpecialChar LaTeX
5885 how to display it; conversely, telling \SpecialChar LyX
5886 how to display a certain paragraph
5887 style does not tell \SpecialChar LyX
5888 how to translate it into \SpecialChar LaTeX
5889 (let alone tell \SpecialChar LaTeX
5892 So, in general, when you define a new \SpecialChar LyX
5893 construct, you must always do two
5894 quite separate things: (i)
5895 \begin_inset space ~
5898 tell \SpecialChar LyX
5899 how to translate it into \SpecialChar LaTeX
5901 \begin_inset space ~
5904 tell \SpecialChar LyX
5908 \begin_layout Standard
5909 Much the same is true, of course, as regards \SpecialChar LyX
5910 's other backend formats, though
5911 XHTML is in some ways different, because in that case \SpecialChar LyX
5916 able, to some extent, to use information about how it should display a
5917 paragraph on the screen to output information (in the form of CSS) about
5918 how the paragraph should be displayed in a browser.
5919 Even in this case, however, the distinction between what \SpecialChar LyX
5921 and how things are rendered externally remains in force, and the two can
5922 be controlled separately.
5924 \begin_inset CommandInset ref
5926 reference "sec:Tags-for-XHTML"
5933 \begin_layout Section
5934 Installing new \SpecialChar LaTeX
5938 \begin_layout Standard
5939 Some installations may not include a \SpecialChar LaTeX
5940 package or class file that you would
5941 like to use within \SpecialChar LyX
5943 For example, you might need Foil\SpecialChar TeX
5944 , a package for preparing slides for overhead
5946 Modern \SpecialChar LaTeX
5947 distributions like \SpecialChar TeX
5948 Live (2008 or newer) or MiK\SpecialChar TeX
5949 provide a user interface
5950 for installing such packages.
5951 For example, with MiK\SpecialChar TeX
5952 , you start the program
5953 \begin_inset Quotes eld
5957 \begin_inset space ~
5961 \begin_inset Quotes erd
5964 to get a list of available packages.
5965 To install one of them, right click on it or use the corresponding toolbar
5969 \begin_layout Standard
5970 If your \SpecialChar LaTeX
5971 distribution does not provide such a `package manager', or if the
5972 package is not available from your distribution, then follow these steps
5973 to install it manually:
5976 \begin_layout Enumerate
5977 Get the package from
5978 \begin_inset CommandInset href
5981 target "http://www.ctan.org/"
5988 \begin_layout Enumerate
5989 If the package contains a file with the ending
5990 \begin_inset Quotes eld
5994 \begin_inset Flex Code
5997 \begin_layout Plain Layout
6004 \begin_inset Quotes erd
6007 (is the case for Foil\SpecialChar TeX
6008 ) then open a console, change to the folder of this
6009 file and execute the command
6010 \begin_inset Flex Code
6013 \begin_layout Plain Layout
6020 You have now unpacked the package and have all files to install it.
6021 Most \SpecialChar LaTeX
6022 -packages are not packed and you can skip this step.
6025 \begin_layout Enumerate
6026 Now you need to decide if the package should be available for all users
6031 \begin_layout Enumerate
6032 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
6033 for all users on your system, then install it in your `local' \SpecialChar TeX
6035 install it in your own `user' \SpecialChar TeX
6037 Where these trees should be created, if they do not already exist, depends
6039 To find this out, look in the file
6040 \begin_inset Flex Code
6043 \begin_layout Plain Layout
6053 \begin_layout Plain Layout
6054 This is usually in the directory
6055 \begin_inset Flex Code
6058 \begin_layout Plain Layout
6064 , though you can execute the command
6065 \begin_inset Flex Code
6068 \begin_layout Plain Layout
6079 The location of the `local' \SpecialChar TeX
6080 tree is defined by the
6081 \begin_inset Flex Code
6084 \begin_layout Plain Layout
6090 variable; this is usually somewhere like
6091 \begin_inset Flex Code
6094 \begin_layout Plain Layout
6095 /usr/local/share/texmf
6100 or /usr/local/texlive/XXXX where XXXX is the year of the installed \SpecialChar TeX
6103 The location of the `user' \SpecialChar TeX
6105 \begin_inset Flex Code
6108 \begin_layout Plain Layout
6115 \begin_inset Flex Code
6118 \begin_layout Plain Layout
6125 \begin_inset Flex Code
6128 \begin_layout Plain Layout
6138 (If these variables are not predefined, you have to define them.) You'll
6139 probably need root permissions to create or modify the `local' tree, but
6140 not for your `user' tree.
6141 \begin_inset Newline newline
6144 In general, it is recommended to install in the user tree because your user
6145 will not be modified or even overwritten when you upgrade your system.
6146 It will typically also be backed up together with everything else when
6147 you backup your home directory (which, of course, you do on a regular basis).
6150 \begin_layout Enumerate
6151 On Windows, if you want the new package to be available for all users on
6152 your system, change to the folder where \SpecialChar LaTeX
6153 is installed and then change to
6155 \begin_inset Flex Code
6158 \begin_layout Plain Layout
6169 (For MiK\SpecialChar TeX
6170 , this would be by default the folder
6171 \begin_inset Flex Code
6174 \begin_layout Plain Layout
6192 \begin_layout Plain Layout
6193 Note that this will be the correct path only on English installations.
6194 On a German one, it would be
6195 \begin_inset Flex Code
6198 \begin_layout Plain Layout
6212 , and similarly for other languages.
6217 Create there a new folder
6218 \begin_inset Flex Code
6221 \begin_layout Plain Layout
6227 and copy all files of the package into it.
6229 \begin_inset Newline newline
6232 If the package should only available for you or you don't have admin permissions
6233 , do the same, but in the local \SpecialChar LaTeX
6236 \begin_inset space \thinspace{}
6239 g., for MiK\SpecialChar TeX
6241 \begin_inset space ~
6244 2.8 under Windows XP, this would be the folder:
6245 \begin_inset Newline newline
6251 \begin_inset Flex Code
6254 \begin_layout Plain Layout
6257 Documents and Settings
6269 \begin_inset Newline newline
6275 \begin_inset Phantom HPhantom
6278 \begin_layout Plain Layout
6289 \begin_inset Flex Code
6292 \begin_layout Plain Layout
6305 \begin_inset Newline newline
6308 On Vista, it would be:
6309 \begin_inset Newline newline
6313 \begin_inset Flex Code
6316 \begin_layout Plain Layout
6342 \begin_layout Enumerate
6343 Now one only need to tell \SpecialChar LaTeX
6344 that there are new files.
6345 This depends on the used \SpecialChar LaTeX
6350 \begin_layout Enumerate
6351 For \SpecialChar TeX
6352 Live execute the command
6353 \begin_inset Flex Code
6356 \begin_layout Plain Layout
6363 If you installed the package for all users, then you will probably need
6364 to have root permissions for that.
6367 \begin_layout Enumerate
6368 For MiK\SpecialChar TeX
6369 , if you have installed the package for all users, start the program
6371 \begin_inset Quotes eld
6375 \begin_inset space ~
6379 \begin_inset Quotes erd
6382 and press the button marked
6383 \begin_inset Quotes eld
6387 \begin_inset Quotes erd
6391 Otherwise start the program
6392 \begin_inset Quotes eld
6396 \begin_inset Quotes erd
6403 \begin_layout Enumerate
6404 Finally, you need to tell \SpecialChar LyX
6405 that there are new packages available.
6406 So, in \SpecialChar LyX
6408 \begin_inset Flex Noun
6411 \begin_layout Plain Layout
6414 \SpecialChar menuseparator
6420 and then restart \SpecialChar LyX
6424 \begin_layout Standard
6425 Now the package is installed.
6426 In our example, the document class
6427 \begin_inset Flex Code
6430 \begin_layout Plain Layout
6432 \begin_inset space ~
6440 will now be available under
6441 \begin_inset Flex Noun
6444 \begin_layout Plain Layout
6445 Document\SpecialChar menuseparator
6446 Settings\SpecialChar menuseparator
6456 \begin_layout Standard
6457 If you would like to use a \SpecialChar LaTeX
6458 document class that is not even listed in the
6460 \begin_inset Flex Noun
6463 \begin_layout Plain Layout
6464 Document\SpecialChar menuseparator
6465 Settings\SpecialChar menuseparator
6471 , then you need to create a `layout' file for it.
6472 That is the topic of the next section.
6475 \begin_layout Section
6476 Types of layout files
6479 \begin_layout Standard
6480 This section describes the various sorts of \SpecialChar LyX
6481 files that contain layout informati
6483 These files describe various paragraph and character styles, determining
6484 how \SpecialChar LyX
6485 should display them and how they should be translated into \SpecialChar LaTeX
6487 XHTML, or whatever output format is being used.
6491 \begin_layout Standard
6492 We shall try to provide a thorough description of the process of writing
6494 However, there are so many different types of documents supported even
6495 by just \SpecialChar LaTeX
6496 that we can't hope to cover every different possibility or problem
6497 you might encounter.
6498 The \SpecialChar LyX
6499 users' list is frequented by people with lots of experience with layout
6500 design who are willing to share what they've learned, so please feel free
6501 to ask questions there.
6504 \begin_layout Standard
6505 As you prepare to write a new layout, it is extremely helpful to look at
6506 the layouts distributed with \SpecialChar LyX
6508 If you write a \SpecialChar LyX
6509 layout for a \SpecialChar LaTeX
6510 document class that might also be used by
6511 others, or write a module that might be useful to others, then you should
6512 consider posting your layout to the
6513 \begin_inset CommandInset href
6515 name "layout section on the LyX wiki"
6516 target "http://wiki.lyx.org/Layouts/Layouts"
6520 or even to the \SpecialChar LyX
6521 developers' list, so that it might be included in \SpecialChar LyX
6526 \begin_layout Plain Layout
6527 Note that \SpecialChar LyX
6528 is licensed under the General Public License, so any material
6529 that is contributed to \SpecialChar LyX
6530 must be similarly licensed.
6538 \begin_layout Subsection
6540 \begin_inset CommandInset label
6542 name "subsec:Layout-modules"
6549 \begin_layout Standard
6550 We have spoken to this point about `layout files'.
6551 But there are different sorts of files that contain layout information.
6552 Layout files, strictly so called, have the
6553 \begin_inset Flex Code
6556 \begin_layout Plain Layout
6562 extension and provide \SpecialChar LyX
6563 with information about document classes.
6564 Since \SpecialChar LyX
6565 1.6 layout information can also be contained in layout
6570 \begin_inset Flex Code
6573 \begin_layout Plain Layout
6580 Modules are to \SpecialChar LaTeX
6581 packages much as layouts are to \SpecialChar LaTeX
6582 classes, and some modules—such
6584 \begin_inset Flex Code
6587 \begin_layout Plain Layout
6593 module—specifically provide support for one package.
6594 In a sense, layout modules are similar to included
6598 \begin_layout Plain Layout
6599 These can have any extension, but by convention have the
6600 \begin_inset Flex Code
6603 \begin_layout Plain Layout
6615 \begin_inset Flex Code
6618 \begin_layout Plain Layout
6624 —in that modules are not specific to a given document class but may be used
6625 with many different classes.
6626 The difference is that using an included file with
6627 \begin_inset Flex Code
6630 \begin_layout Plain Layout
6636 requires editing that file.
6637 Modules, by contrast, are selected in the
6638 \begin_inset Flex Noun
6641 \begin_layout Plain Layout
6642 Document\SpecialChar menuseparator
6651 \begin_layout Standard
6652 Building modules is the easiest way to get started with layout editing,
6653 since it can be as simple as adding a single new paragraph style or flex
6655 But modules may, in principle, contain anything a layout file can contain.
6658 \begin_layout Standard
6659 After creating a new module and copying it to the
6660 \begin_inset Flex Code
6663 \begin_layout Plain Layout
6669 folder, you will need to reconfigure and then restart \SpecialChar LyX
6672 However, changes you make to the module will be seen immediately, if you
6674 \begin_inset Flex Noun
6677 \begin_layout Plain Layout
6678 Document\SpecialChar menuseparator
6684 , highlight something, and then hit
6685 \begin_inset Quotes eld
6689 \begin_inset Quotes erd
6695 It is strongly recommended that you save your work before doing this
6700 it is strongly recommended that you not attempt to edit modules while simultaneo
6701 usly working on actual documents
6704 Though of course the developers strive to keep \SpecialChar LyX
6705 stable in such situations,
6706 syntax errors and the like in your module file could cause strange behavior.
6709 \begin_layout Subsubsection
6713 \begin_layout Standard
6714 Modules are to \SpecialChar LyX
6715 as packages are to \SpecialChar LaTeX
6717 Sometimes, however, you find yourself wanting a specific inset or character
6718 style just for one document and writing a module that will also be available
6719 to other documents makes little sense.
6720 What you need is \SpecialChar LyX
6722 \begin_inset Quotes eld
6726 \begin_inset Quotes erd
6732 \begin_layout Standard
6733 You will find it under
6735 Document\SpecialChar menuseparator
6736 Settings\SpecialChar menuseparator
6740 The large text box allows you to enter anything that you might enter in
6741 a layout file or module.
6742 You can think of a document's local layout, in fact, as a module that belongs
6744 So, in particular, you must enter a
6745 \begin_inset Flex Code
6748 \begin_layout Plain Layout
6755 Any format is acceptable, but one would normally use the format current
6757 (In \SpecialChar LyX
6758 2.2, the current layout format is 60.)
6761 \begin_layout Standard
6762 When you have entered something in the
6763 \begin_inset Flex Code
6766 \begin_layout Plain Layout
6772 pane, \SpecialChar LyX
6774 \begin_inset Quotes eld
6778 \begin_inset Quotes erd
6781 button at the bottom.
6782 Clicking this button will cause \SpecialChar LyX
6783 to determine whether what you have entered
6784 is valid layout information for the chosen format.
6786 will report the result but, unfortunately, will not tell you what errors
6787 there might have been.
6788 These will be written to the terminal, however, if \SpecialChar LyX
6789 is started from a terminal.
6790 You will not be permitted to save your local layout until you have entered
6794 \begin_layout Standard
6795 The warnings at the end of the previous section apply here, too.
6796 Do not play with local layout while you are actually working, especially
6797 if you have not saved your document.
6798 That said, using local layout with a test document can be a very convenient
6799 way to try out layout ideas, or even to start developing a module.
6802 \begin_layout Subsection
6804 \begin_inset Flex Noun
6807 \begin_layout Plain Layout
6816 \begin_layout Standard
6817 There are two situations you are likely to encounter when wanting to support
6818 a new \SpecialChar LaTeX
6819 document class, involving style (
6820 \begin_inset Flex Code
6823 \begin_layout Plain Layout
6829 ) files and \SpecialChar LaTeX2e
6831 \begin_inset Flex Code
6834 \begin_layout Plain Layout
6841 Supporting a style file is usually fairly easy.
6842 Supporting a new class file is a bit harder.
6843 We'll discuss the former in this section and the latter in the next.
6844 Similar remarks apply, of course, if you want to support a new DocBook
6848 \begin_layout Standard
6849 The easier case is the one in which your new document class is provided
6850 as a style file that is to be used in conjunction with an already supported
6852 For the sake of the example, we'll assume that the style file is called
6854 \begin_inset Flex Noun
6857 \begin_layout Plain Layout
6863 and that it is meant to be used with
6864 \begin_inset Flex Noun
6867 \begin_layout Plain Layout
6873 , which is a standard class.
6877 \begin_layout Standard
6878 Start by copying the existing class's layout file into your local directory:
6882 \begin_layout Plain Layout
6883 Of course, which directory is your local directory will vary by platform,
6884 and \SpecialChar LyX
6885 allows you to specify your local directory on startup, too, using
6887 \begin_inset Flex Code
6890 \begin_layout Plain Layout
6904 \begin_layout LyX-Code
6905 cp report.layout ~/.lyx/layouts/myclass.layout
6908 \begin_layout Standard
6910 \begin_inset Flex Code
6913 \begin_layout Plain Layout
6919 and change the line:
6922 \begin_layout LyX-Code
6925 DeclareLaTeXClass{report}
6928 \begin_layout Standard
6932 \begin_layout LyX-Code
6935 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6938 \begin_layout Standard
6942 \begin_layout LyX-Code
6944 \begin_inset Newline newline
6950 \begin_inset Newline newline
6956 \begin_layout Standard
6957 near the top of the file.
6960 \begin_layout Standard
6961 Start \SpecialChar LyX
6963 \begin_inset Flex Noun
6966 \begin_layout Plain Layout
6967 Tools\SpecialChar menuseparator
6974 Then restart \SpecialChar LyX
6975 and try creating a new document.
6977 \begin_inset Flex Noun
6980 \begin_layout Plain Layout
6986 " as a document class option in the
6987 \begin_inset Flex Noun
6990 \begin_layout Plain Layout
6991 Document\SpecialChar menuseparator
6998 It is likely that some of the sectioning commands and such in your new
6999 class will work differently from how they worked in the base class—
7000 \begin_inset Flex Code
7003 \begin_layout Plain Layout
7009 in this example—so you can fiddle around with the settings for the different
7010 sections if you wish.
7011 The layout information for sections is contained in
7012 \begin_inset Flex Code
7015 \begin_layout Plain Layout
7021 , but you do not need to copy and change this file.
7022 Instead, you can simply add your changes to your layout file, after the
7024 \begin_inset Flex Code
7027 \begin_layout Plain Layout
7033 , which itself includes
7034 \begin_inset Flex Code
7037 \begin_layout Plain Layout
7044 For example, you might add these lines:
7047 \begin_layout LyX-Code
7051 \begin_layout LyX-Code
7055 \begin_layout LyX-Code
7059 \begin_layout LyX-Code
7063 \begin_layout LyX-Code
7067 \begin_layout Standard
7068 to change the font for chapter headings to sans-serif.
7069 This will override (or, in this case, add to) the existing declaration
7070 for the Chapter style.
7074 \begin_layout Standard
7075 Your new package may also provide commands or environments not present in
7077 In this case, you will want to add these to the layout file.
7079 \begin_inset CommandInset ref
7081 reference "sec:TextClass"
7085 for information on how to do so.
7088 \begin_layout Standard
7090 \begin_inset Flex Noun
7093 \begin_layout Plain Layout
7099 can be used with several different document classes, and even if it cannot,
7100 you might find it easiest just to write a module that you can load with
7102 The simplest possible such module would be:
7105 \begin_layout LyX-Code
7108 DeclareLyXModule{My Package}
7111 \begin_layout LyX-Code
7115 \begin_layout LyX-Code
7116 #Support for mypkg.sty.
7119 \begin_layout LyX-Code
7121 \begin_inset Newline newline
7127 \begin_layout LyX-Code
7129 \begin_inset Newline newline
7135 \begin_layout LyX-Code
7137 \begin_inset Newline newline
7143 \begin_inset Newline newline
7149 \begin_layout Standard
7150 A more complex module might modify the behavior of some existing constructs
7151 or define some new ones.
7153 \begin_inset CommandInset ref
7155 reference "sec:TextClass"
7162 \begin_layout Subsection
7164 \begin_inset Flex Noun
7167 \begin_layout Plain Layout
7176 \begin_layout Standard
7177 There are two possibilities here.
7178 One is that the class file is itself based upon an existing document class.
7179 For example, many thesis classes are based upon
7180 \begin_inset Flex Noun
7183 \begin_layout Plain Layout
7190 To see whether yours is, look for a line like
7193 \begin_layout LyX-Code
7199 \begin_layout Standard
7201 If so, then you may proceed largely as in the previous section, though
7203 \begin_inset Flex Code
7206 \begin_layout Plain Layout
7207 Declare\SpecialChar LaTeX
7213 line will be different.
7214 If your new class is
7215 \begin_inset Flex Code
7218 \begin_layout Plain Layout
7224 and it is based upon
7225 \begin_inset Flex Code
7228 \begin_layout Plain Layout
7234 , then the line should read:
7238 \begin_layout Plain Layout
7239 And it will be easiest if you save the file to
7240 \begin_inset Flex Code
7243 \begin_layout Plain Layout
7250 assumes that the document class has the same name as the layout file.
7259 \begin_layout LyX-Code
7262 DeclareLaTeXClass[thesis,book]{thesis}
7265 \begin_layout Standard
7266 If, on the other hand, the new class is not based upon an existing class,
7267 you will probably have to
7268 \begin_inset Quotes eld
7272 \begin_inset Quotes erd
7276 We strongly suggest copying an existing layout file which uses a similar
7278 class and then modifying it, if you can do so.
7279 At least use an existing file as a starting point so you can find out what
7280 items you need to worry about.
7281 Again, the specifics are covered below.
7284 \begin_layout Subsection
7286 \begin_inset CommandInset label
7288 name "subsec:Creating-Templates"
7295 \begin_layout Standard
7296 Once you have written a layout file for a new document class, you might
7297 want to consider writing a
7302 A template acts as a kind of tutorial for your layout, showing how it might
7303 be used, though containing dummy content.
7304 You can of course look at the various templates included with \SpecialChar LyX
7308 \begin_layout Standard
7309 Templates are created just like usual documents: using \SpecialChar LyX
7311 The only difference is that usual documents contain all possible settings,
7312 including the font scheme and the paper size.
7313 Usually a user doesn't want a template to overwrite his preferred settings
7314 for such parameters.
7315 For that reason, the designer of a template should remove the corresponding
7317 \begin_inset Flex Code
7320 \begin_layout Plain Layout
7329 \begin_inset Flex Code
7332 \begin_layout Plain Layout
7340 from the template \SpecialChar LyX
7342 This can be done with any simple text-editor, for example
7343 \begin_inset Flex Code
7346 \begin_layout Plain Layout
7353 \begin_inset Flex Code
7356 \begin_layout Plain Layout
7365 \begin_layout Standard
7366 Put the edited template files you create in
7367 \begin_inset Flex Code
7370 \begin_layout Plain Layout
7376 , copy the ones you use from the global template directory in
7377 \begin_inset Flex Code
7380 \begin_layout Plain Layout
7386 to the same place, and redefine the template path in the
7387 \begin_inset Flex Noun
7390 \begin_layout Plain Layout
7391 Tools\SpecialChar menuseparator
7392 Preferences\SpecialChar menuseparator
7401 \begin_layout Standard
7402 Note, by the way, that there is a template which has a particular meaning:
7404 \begin_inset Flex Code
7407 \begin_layout Plain Layout
7414 This template is loaded every time you create a new document with
7415 \begin_inset Flex Noun
7418 \begin_layout Plain Layout
7419 File\SpecialChar menuseparator
7425 in order to provide useful defaults.
7426 To create this template from inside \SpecialChar LyX
7427 , all you have to do is to open a document
7428 with the correct settings, and use the
7429 \begin_inset Flex Noun
7432 \begin_layout Plain Layout
7433 Save as Document Defaults
7441 \begin_layout Subsection
7442 Upgrading old layout files
7445 \begin_layout Standard
7446 The format of layout files changes with each \SpecialChar LyX
7447 release, so old layout files
7448 need to be converted to the new format.
7450 reads a layout file in an older format, it automatically calls the
7452 \begin_inset Flex Code
7455 \begin_layout Plain Layout
7461 to convert it to a temporary file in current format.
7462 The original file is left untouched.
7463 If you use the layout file often, then, you may want to convert it permanently,
7464 so that \SpecialChar LyX
7465 does not have to do so itself every time.
7466 To do this, you can call the converter manually:
7469 \begin_layout Enumerate
7471 \begin_inset Flex Code
7474 \begin_layout Plain Layout
7481 \begin_inset Flex Code
7484 \begin_layout Plain Layout
7493 \begin_layout Enumerate
7495 \begin_inset Newline newline
7499 \begin_inset Flex Code
7502 \begin_layout Plain Layout
7503 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7509 \begin_inset Newline newline
7513 \begin_inset Flex Code
7516 \begin_layout Plain Layout
7522 is the name of your \SpecialChar LyX
7526 \begin_layout Standard
7527 Note that manual conversion does not affect included files, so these will
7528 have to be converted separately.
7531 \begin_layout Section
7532 \begin_inset CommandInset label
7534 name "sec:TextClass"
7538 The layout file format
7541 \begin_layout Standard
7542 The following sections describe how layout files are structured and written.
7543 Our advice is to go slowly, save and test often.
7544 It is really not that hard, except that the multitude of options can become
7545 overwhelming, especially if you try to check out too many at once.
7546 It becomes easier if you use existing layouts of \SpecialChar LyX
7547 as examples/reference
7548 or if you modify an existing layout to your needs.
7551 \begin_layout Standard
7552 Note that all the tags used in layout files are case-insensitive.
7554 \begin_inset Flex Code
7557 \begin_layout Plain Layout
7564 \begin_inset Flex Code
7567 \begin_layout Plain Layout
7574 \begin_inset Flex Code
7577 \begin_layout Plain Layout
7583 are really the same tag.
7584 The possible arguments are printed in brackets after the tag's name.
7585 The default argument is typeset
7586 \begin_inset Flex Code
7589 \begin_layout Plain Layout
7598 If the argument has a data type like
7599 \begin_inset Quotes eld
7603 \begin_inset Quotes erd
7607 \begin_inset Quotes eld
7611 \begin_inset Quotes erd
7614 , the default is shown like this:
7615 \begin_inset Flex Code
7618 \begin_layout Plain Layout
7629 \begin_layout Subsection
7630 The document class declaration and classification
7633 \begin_layout Standard
7634 Lines in a layout file which begin with
7635 \begin_inset Flex Code
7638 \begin_layout Plain Layout
7645 There is one exception to this rule.
7647 \begin_inset Flex Code
7650 \begin_layout Plain Layout
7656 files should begin with lines like:
7659 \begin_layout LyX-Code
7662 #% Do not delete the line below; configure depends on this
7665 \begin_layout LyX-Code
7670 DeclareLaTeXClass{Article (Standard Class)}
7673 \begin_layout LyX-Code
7678 DeclareCategory{Articles}
7681 \begin_layout Standard
7682 The second and third lines are used when you (re)configure \SpecialChar LyX
7684 The layout file is read by the \SpecialChar LaTeX
7686 \begin_inset Flex Code
7689 \begin_layout Plain Layout
7695 , in a special mode where
7696 \begin_inset Flex Code
7699 \begin_layout Plain Layout
7706 The first line is just a \SpecialChar LaTeX
7707 comment, the second one contains the mandatory
7708 declaration of the text class and the third line contains the optional
7709 classification of the class.
7710 If these lines appear in a file named
7711 \begin_inset Flex Code
7714 \begin_layout Plain Layout
7720 , then they define a text class of name
7721 \begin_inset Flex Code
7724 \begin_layout Plain Layout
7730 (the name of the layout file) which uses the \SpecialChar LaTeX
7732 \begin_inset Flex Code
7735 \begin_layout Plain Layout
7741 (the default is to use the same name as the layout).
7743 \begin_inset Quotes eld
7746 Article (Standard Class)
7747 \begin_inset Quotes erd
7750 that appears above is used as a description of the text class in the
7751 \begin_inset Flex Noun
7754 \begin_layout Plain Layout
7755 Document\SpecialChar menuseparator
7763 \begin_inset Quotes eld
7767 \begin_inset Quotes erd
7770 in the example) is also used in the
7771 \begin_inset Flex Noun
7774 \begin_layout Plain Layout
7775 Document\SpecialChar menuseparator
7781 dialog: the text classes are grouped by these categories (which are usually
7782 genres, so typical categories are
7783 \begin_inset Quotes eld
7787 \begin_inset Quotes erd
7791 \begin_inset Quotes eld
7795 \begin_inset Quotes erd
7799 \begin_inset Quotes eld
7803 \begin_inset Quotes erd
7807 \begin_inset Quotes eld
7811 \begin_inset Quotes erd
7815 \begin_inset Quotes eld
7819 \begin_inset Quotes erd
7823 \begin_inset Quotes eld
7827 \begin_inset Quotes erd
7831 If no category has been declared, the class will be put in the
7832 \begin_inset Quotes eld
7836 \begin_inset Quotes erd
7842 \begin_layout Standard
7843 Let's assume that you wrote your own text class that uses the
7844 \begin_inset Flex Code
7847 \begin_layout Plain Layout
7853 document class, but where you changed the appearance of the section headings.
7854 If you put it in a file
7855 \begin_inset Flex Code
7858 \begin_layout Plain Layout
7864 , the header of this file should be:
7867 \begin_layout LyX-Code
7870 #% Do not delete the line below; configure depends on this
7873 \begin_layout LyX-Code
7878 DeclareLaTeXClass[article]{Article (with My Own Headings)}
7881 \begin_layout LyX-Code
7886 DeclareCategory{Articles}
7889 \begin_layout Standard
7890 This declares a text class
7891 \begin_inset Flex Code
7894 \begin_layout Plain Layout
7900 , associated with the \SpecialChar LaTeX
7902 \begin_inset Flex Code
7905 \begin_layout Plain Layout
7912 \begin_inset Quotes eld
7915 Article (with My Own Headings)
7916 \begin_inset Quotes erd
7920 If your text class depends on several packages, you can declare it as:
7923 \begin_layout LyX-Code
7926 #% Do not delete the line below; configure depends on this
7929 \begin_layout LyX-Code
7934 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
7937 \begin_layout LyX-Code
7942 DeclareCategory{Articles}
7945 \begin_layout Standard
7946 This indicates that your text class uses the
7947 \begin_inset Flex Code
7950 \begin_layout Plain Layout
7957 Finally, it is also possible to declare classes for DocBook code.
7958 Typical declarations will look like:
7961 \begin_layout LyX-Code
7964 #% Do not delete the line below; configure depends on this
7967 \begin_layout LyX-Code
7972 DeclareDocBookClass[article]{SGML (DocBook Article)}
7975 \begin_layout LyX-Code
7980 DeclareCategory{Articles (DocBook)}
7983 \begin_layout Standard
7984 Note that these declarations can also be given an optional parameter declaring
7985 the name of the document class (but not a list).
7988 \begin_layout Standard
7989 So, to be as explicit as possible, the form of the layout declaration is:
7992 \begin_layout LyX-Code
7997 DeclareLaTeXClass[class,package.sty]{layout description}
8000 \begin_layout LyX-Code
8005 DeclareCategory{category}
8008 \begin_layout Standard
8009 The class need only be specified if the name of the \SpecialChar LaTeX
8011 name of the layout file are different or if there are packages to load.
8012 If the name of the class file is not specified, then \SpecialChar LyX
8014 that it is the same as the name of the layout file.
8017 \begin_layout Standard
8018 When the text class has been modified to your taste, all you have to do
8019 is to copy it either to
8020 \begin_inset Flex Code
8023 \begin_layout Plain Layout
8030 \begin_inset Flex Code
8033 \begin_layout Plain Layout
8040 \begin_inset Flex Noun
8043 \begin_layout Plain Layout
8044 Tools\SpecialChar menuseparator
8050 , exit \SpecialChar LyX
8052 Then your new text class should be available along with the others.
8055 \begin_layout Standard
8056 Once the layout file is installed, you can edit it and see your changes
8057 without having to reconfigure or to restart \SpecialChar LyX
8063 \begin_layout Plain Layout
8064 In versions of \SpecialChar LyX
8065 prior to 1.6, this was not true.
8066 As a result, editing layout files was very time consuming, since you had
8067 constantly to restart \SpecialChar LyX
8073 You can force a reload of the current layout by using the \SpecialChar LyX
8075 \begin_inset Flex Noun
8078 \begin_layout Plain Layout
8085 There is no default binding for this function—though, of course, you can
8086 bind it to a key yourself.
8087 But you will normally use this function simply by entering it in the mini-buffe
8092 \begin_layout Standard
8098 \begin_inset Flex Noun
8101 \begin_layout Plain Layout
8107 is very much an `advanced feature'.
8112 recommended that you save your work before using this function.
8117 recommended that you not attempt to edit layout information while simultaneousl
8118 y working on a document that you care about.
8119 Use a test document.
8120 Syntax errors and the like in your layout file could cause peculiar behavior.
8121 In particular, such errors could cause \SpecialChar LyX
8122 to regard the current layout as
8123 invalid and to attempt to switch to some other layout.
8127 \begin_layout Plain Layout
8128 Really bad syntax errors may even caused \SpecialChar LyX
8130 This is because certain sorts of errors may make \SpecialChar LyX
8141 The \SpecialChar LyX
8142 team strives to keep \SpecialChar LyX
8143 stable in such situations, but safe is better
8148 \begin_layout Plain Layout
8149 While we're giving advice: make regular backups.
8150 And be nice to your mother.
8158 \begin_layout Subsection
8159 The Module declaration
8162 \begin_layout Standard
8163 A module must begin with a line like the following:
8166 \begin_layout LyX-Code
8169 DeclareLyXModule[endnotes.sty]{Endnotes}
8172 \begin_layout Standard
8173 The mandatory argument, in curly brackets, is the name of the module, as
8175 \begin_inset Flex Noun
8178 \begin_layout Plain Layout
8179 Document\SpecialChar menuseparator
8180 Settings\SpecialChar menuseparator
8187 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8189 on which the module depends.
8190 It is also possible to use the form
8191 \begin_inset Flex Noun
8194 \begin_layout Plain Layout
8200 as an optional argument, which declares that the module can only be used
8201 when there exists a conversion chain between the formats `
8202 \begin_inset Flex Code
8205 \begin_layout Plain Layout
8212 \begin_inset Flex Code
8215 \begin_layout Plain Layout
8224 \begin_layout Standard
8225 The module declaration should then be followed by lines like the following
8229 \begin_layout Plain Layout
8230 Preferably in English if the module should be published with \SpecialChar LyX
8232 This description will appear in the list of messages to be translated and
8233 will be thus translated with the next interface update.
8241 \begin_layout LyX-Code
8245 \begin_layout LyX-Code
8246 #Adds an endnote command, in addition to footnotes.
8250 \begin_layout LyX-Code
8251 #You will need to add
8253 theendnotes in TeX code where you
8256 \begin_layout LyX-Code
8257 #want the endnotes to appear.
8261 \begin_layout LyX-Code
8265 \begin_layout LyX-Code
8266 #Requires: somemodule | othermodule
8269 \begin_layout LyX-Code
8270 #Excludes: badmodule
8273 \begin_layout Standard
8274 The description is used in
8275 \begin_inset Flex Noun
8278 \begin_layout Plain Layout
8279 Document\SpecialChar menuseparator
8280 Settings\SpecialChar menuseparator
8286 to provide the user with information about what the module does.
8288 \begin_inset Flex Code
8291 \begin_layout Plain Layout
8297 line is used to identify other modules with which this one must be used;
8299 \begin_inset Flex Code
8302 \begin_layout Plain Layout
8308 line is used to identify modules with which this one may not be used.
8309 Both are optional, and, as shown, multiple modules should be separated
8310 with the pipe symbol: |.
8311 Note that the required modules are treated disjunctively:
8315 of the required modules must be used.
8320 excluded module may be used.
8321 Note that modules are identified here by their filenames without the
8322 \begin_inset Flex Code
8325 \begin_layout Plain Layout
8333 \begin_inset Flex Code
8336 \begin_layout Plain Layout
8343 \begin_inset Flex Code
8346 \begin_layout Plain Layout
8355 \begin_layout Subsection
8359 \begin_layout Standard
8360 The first non-comment line of any layout file, included file, or module
8365 contain the file format number:
8368 \begin_layout Description
8369 \begin_inset Flex Code
8372 \begin_layout Plain Layout
8379 \begin_inset Flex Code
8382 \begin_layout Plain Layout
8388 ] The format number of the layout file.
8391 \begin_layout Standard
8392 This tag was introduced with \SpecialChar LyX
8394 \begin_inset space ~
8398 Layout files from older \SpecialChar LyX
8399 versions do not have an explicit file format and
8400 are considered to have
8401 \begin_inset Flex Code
8404 \begin_layout Plain Layout
8406 \begin_inset space ~
8415 The format for the present version of \SpecialChar LyX
8417 But each version of \SpecialChar LyX
8418 is capable of reading earlier versions' layout files,
8419 just as they are capable of reading files produced by earlier versions
8422 There is, however, no provision for converting to earlier formats.
8425 \begin_layout Subsection
8426 \begin_inset CommandInset label
8428 name "subsec:General-text-class"
8432 General text class parameters
8435 \begin_layout Standard
8436 These are general parameters that govern the behavior of an entire document
8442 mean that they must appear in
8443 \begin_inset Flex Code
8446 \begin_layout Plain Layout
8452 files rather than in modules.
8453 A module can contain any layout tag.)
8456 \begin_layout Description
8457 \begin_inset Flex Code
8460 \begin_layout Plain Layout
8466 Adds information that will be output in the
8467 \begin_inset Flex Code
8470 \begin_layout Plain Layout
8476 block when the document is output to XHTML.
8477 Typically, this would be used to output CSS style information, but it can
8478 be used for anything that can appear in
8479 \begin_inset Flex Code
8482 \begin_layout Plain Layout
8490 \begin_inset Quotes eld
8494 \begin_inset Flex Code
8497 \begin_layout Plain Layout
8504 \begin_inset Quotes erd
8510 \begin_layout Description
8511 \begin_inset Flex Code
8514 \begin_layout Plain Layout
8520 Adds information to the document preamble.
8522 \begin_inset Newline newline
8526 \begin_inset Quotes eld
8530 \begin_inset Flex Code
8533 \begin_layout Plain Layout
8540 \begin_inset Quotes erd
8546 \begin_layout Description
8547 \begin_inset Flex Code
8550 \begin_layout Plain Layout
8556 Defines formats for use in the display of bibliographic information.
8558 \begin_inset CommandInset ref
8560 reference "subsec:Citation-format-description"
8566 \begin_inset Quotes eld
8570 \begin_inset Flex Code
8573 \begin_layout Plain Layout
8580 \begin_inset Quotes erd
8586 \begin_layout Description
8587 \begin_inset Flex Code
8590 \begin_layout Plain Layout
8596 Describes various global options supported by the document class.
8598 \begin_inset CommandInset ref
8600 reference "subsec:ClassOptions"
8606 \begin_inset Quotes eld
8610 \begin_inset Flex Code
8613 \begin_layout Plain Layout
8620 \begin_inset Quotes erd
8626 \begin_layout Description
8627 \begin_inset Flex Code
8630 \begin_layout Plain Layout
8637 \begin_inset Flex Code
8640 \begin_layout Plain Layout
8649 \begin_inset space \thinspace{}
8653 \begin_inset Flex Code
8656 \begin_layout Plain Layout
8662 ] Whether the class should
8666 to having one or two columns.
8667 Can be changed in the
8668 \begin_inset Flex Noun
8671 \begin_layout Plain Layout
8672 Document\SpecialChar menuseparator
8681 \begin_layout Description
8682 \begin_inset Flex Code
8685 \begin_layout Plain Layout
8692 \begin_inset Flex Code
8695 \begin_layout Plain Layout
8701 ] This sequence defines the properties for a counter.
8702 If the counter does not yet exist, it is created; if it does exist, it
8705 \begin_inset Quotes eld
8709 \begin_inset Flex Code
8712 \begin_layout Plain Layout
8719 \begin_inset Quotes erd
8723 \begin_inset Newline newline
8727 \begin_inset CommandInset ref
8729 reference "subsec:Counters"
8733 for details on counters.
8736 \begin_layout Description
8737 \begin_inset Flex Code
8740 \begin_layout Plain Layout
8746 Sets the default font used to display the document.
8748 \begin_inset CommandInset ref
8750 reference "subsec:Font-description"
8754 for how to declare fonts.
8756 \begin_inset Quotes eld
8760 \begin_inset Flex Code
8763 \begin_layout Plain Layout
8770 \begin_inset Quotes erd
8776 \begin_layout Description
8777 \begin_inset Flex Code
8780 \begin_layout Plain Layout
8787 \begin_inset Flex Code
8790 \begin_layout Plain Layout
8796 ] Specifies a module to be included by default with this document class.
8797 The module is specified as filename without the
8798 \begin_inset Flex Code
8801 \begin_layout Plain Layout
8808 The user can still remove the module, but it will be active at the outset.
8809 (This applies only when new files are created, or when this class is chosen
8810 for an existing document.)
8813 \begin_layout Description
8814 \begin_inset Flex Code
8817 \begin_layout Plain Layout
8824 \begin_inset Flex Code
8827 \begin_layout Plain Layout
8833 ] This is the style that will be assigned to new paragraphs, usually
8834 \begin_inset Flex Noun
8837 \begin_layout Plain Layout
8844 This will default to the first defined style if not given, but you are
8845 encouraged to use this directive.
8848 \begin_layout Description
8849 \begin_inset Flex Code
8852 \begin_layout Plain Layout
8859 \begin_inset Flex Code
8862 \begin_layout Plain Layout
8868 ] This tag indicates that the module (which is specified by filename without
8870 \begin_inset Flex Code
8873 \begin_layout Plain Layout
8879 extension) cannot be used with this document class.
8880 This might be used in a journal-specific layout file to prevent, say, the
8882 \begin_inset Flex Code
8885 \begin_layout Plain Layout
8891 module that numbers theorems by section.
8896 be used in a module.
8897 Modules have their own way of excluding other modules (see
8898 \begin_inset CommandInset ref
8900 reference "subsec:Layout-modules"
8907 \begin_layout Description
8908 \begin_inset Flex Code
8911 \begin_layout Plain Layout
8917 Defines a new float.
8919 \begin_inset CommandInset ref
8921 reference "subsec:Floats"
8927 \begin_inset Quotes eld
8931 \begin_inset Flex Code
8934 \begin_layout Plain Layout
8941 \begin_inset Quotes erd
8947 \begin_layout Description
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8957 Sets the information that will be output in the
8958 \begin_inset Flex Code
8961 \begin_layout Plain Layout
8967 block when this document class is output to XHTML.
8968 Note that this will completely override any prior
8969 \begin_inset Flex Code
8972 \begin_layout Plain Layout
8979 \begin_inset Flex Code
8982 \begin_layout Plain Layout
8990 \begin_inset Newline newline
8994 \begin_inset Flex Code
8997 \begin_layout Plain Layout
9003 if you just want to add material to the preamble.) Must end with
9004 \begin_inset Quotes eld
9008 \begin_inset Flex Code
9011 \begin_layout Plain Layout
9018 \begin_inset Quotes erd
9024 \begin_layout Description
9025 \begin_inset Flex Code
9028 \begin_layout Plain Layout
9035 \begin_inset Flex Code
9038 \begin_layout Plain Layout
9044 ] The style to use for the table of contents, bibliography, and so forth,
9045 when the document is output to HTML.
9046 For articles, this should normally be
9047 \begin_inset Flex Code
9050 \begin_layout Plain Layout
9057 \begin_inset Flex Code
9060 \begin_layout Plain Layout
9067 If it is not given, then \SpecialChar LyX
9068 will attempt to figure out which layout to use.
9071 \begin_layout Description
9072 \begin_inset Flex Code
9075 \begin_layout Plain Layout
9082 \begin_inset Flex Code
9085 \begin_layout Plain Layout
9091 ] Modifies the properties of the given counter.
9092 If the counter does not exist, the statement is ignored.
9094 \begin_inset Quotes eld
9098 \begin_inset Flex Code
9101 \begin_layout Plain Layout
9108 \begin_inset Quotes erd
9112 \begin_inset Newline newline
9116 \begin_inset CommandInset ref
9118 reference "subsec:Counters"
9122 for details on counters.
9125 \begin_layout Description
9126 \begin_inset Flex Code
9129 \begin_layout Plain Layout
9136 \begin_inset Flex Code
9139 \begin_layout Plain Layout
9145 ] This allows you to include another layout definition file within yours
9146 to avoid duplicating commands.
9147 Common examples are the standard layout files, for example,
9148 \begin_inset Flex Code
9151 \begin_layout Plain Layout
9157 , which contains most of the basic layouts.
9160 \begin_layout Description
9161 \begin_inset Flex Code
9164 \begin_layout Plain Layout
9171 \begin_inset Flex Code
9174 \begin_layout Plain Layout
9180 ] This section (re-)defines the layout of an inset.
9181 It can be applied to an existing inset or to a new, user-defined inset,
9182 e.g., a new character style.
9184 \begin_inset Quotes eld
9188 \begin_inset Flex Code
9191 \begin_layout Plain Layout
9198 \begin_inset Quotes erd
9202 \begin_inset Newline newline
9206 \begin_inset CommandInset ref
9208 reference "subsec:Flex-insets-and"
9212 for more information.
9216 \begin_layout Description
9217 \begin_inset Flex Code
9220 \begin_layout Plain Layout
9227 \begin_inset Flex Code
9230 \begin_layout Plain Layout
9236 ] A string that indicates the width of the left margin on the screen, for
9238 \begin_inset Quotes eld
9242 \begin_inset Flex Code
9245 \begin_layout Plain Layout
9252 \begin_inset Quotes erd
9256 (Note that this is not a `length', like
9257 \begin_inset Quotes eld
9261 \begin_inset Quotes erd
9267 \begin_layout Description
9268 \begin_inset Flex Code
9271 \begin_layout Plain Layout
9278 \begin_inset Flex Code
9281 \begin_layout Plain Layout
9287 ] Modifies the properties of the given paragraph style.
9288 If the style does not exist, this section is ignored.
9290 \begin_inset Quotes eld
9294 \begin_inset Flex Code
9297 \begin_layout Plain Layout
9304 \begin_inset Quotes erd
9310 \begin_layout Description
9311 \begin_inset Flex Code
9314 \begin_layout Plain Layout
9321 \begin_inset Flex Code
9324 \begin_layout Plain Layout
9330 ] Deletes an existing counter, usually one defined in an included file.
9333 \begin_layout Description
9334 \begin_inset Flex Code
9337 \begin_layout Plain Layout
9344 \begin_inset Flex Code
9347 \begin_layout Plain Layout
9353 ] Deletes an existing float.
9354 This is particularly useful when you want to suppress a float that has
9355 been defined in an input file.
9358 \begin_layout Description
9359 \begin_inset Flex Code
9362 \begin_layout Plain Layout
9369 \begin_inset Flex Code
9372 \begin_layout Plain Layout
9378 ] Deletes an existing style.
9381 \begin_layout Description
9382 \begin_inset Flex Code
9385 \begin_layout Plain Layout
9392 \begin_inset Flex Code
9395 \begin_layout Plain Layout
9401 ] The file format (as defined in the \SpecialChar LyX
9402 preferences) produced by this document
9404 It is mainly useful when
9405 \begin_inset Flex Code
9408 \begin_layout Plain Layout
9415 \begin_inset Flex Code
9418 \begin_layout Plain Layout
9424 and one wants to define a new type of literate document.
9425 The format is reset to
9426 \begin_inset Quotes eld
9430 \begin_inset Flex Code
9433 \begin_layout Plain Layout
9440 \begin_inset Quotes erd
9444 \begin_inset Quotes eld
9448 \begin_inset Flex Code
9451 \begin_layout Plain Layout
9458 \begin_inset Quotes erd
9461 when the corresponding
9462 \begin_inset Flex Code
9465 \begin_layout Plain Layout
9471 parameter is encountered.
9474 \begin_layout Description
9475 \begin_inset Flex Code
9478 \begin_layout Plain Layout
9485 \begin_inset Flex Code
9488 \begin_layout Plain Layout
9499 \begin_inset Flex Code
9502 \begin_layout Plain Layout
9509 \begin_inset Flex Code
9512 \begin_layout Plain Layout
9518 ] Specifies what sort of output documents using this class will produce.
9521 \begin_layout Description
9522 \begin_inset Flex Code
9525 \begin_layout Plain Layout
9532 \begin_inset Flex Code
9535 \begin_layout Plain Layout
9542 \begin_inset Flex Code
9545 \begin_layout Plain Layout
9551 ] Specifies options, given in the second string, for the package named by
9554 \begin_inset Quotes eld
9558 \begin_inset Flex Code
9561 \begin_layout Plain Layout
9562 PackageOptions natbib square
9568 \begin_inset Quotes erd
9572 \begin_inset Flex Code
9575 \begin_layout Plain Layout
9581 to be loaded with the
9582 \begin_inset Flex Code
9585 \begin_layout Plain Layout
9592 (For \SpecialChar TeX
9593 perts, this causes \SpecialChar LyX
9595 \begin_inset Flex Code
9598 \begin_layout Plain Layout
9601 PassOptionsToPackage{natbib}{square}
9607 \begin_inset Flex Code
9610 \begin_layout Plain Layout
9619 \begin_layout Description
9620 \begin_inset Flex Code
9623 \begin_layout Plain Layout
9630 \begin_inset Flex Code
9633 \begin_layout Plain Layout
9642 \begin_inset Flex Code
9645 \begin_layout Plain Layout
9652 \begin_inset Flex Code
9655 \begin_layout Plain Layout
9661 ] The default pagestyle.
9662 Can be changed in the
9663 \begin_inset Flex Noun
9666 \begin_layout Plain Layout
9667 Document\SpecialChar menuseparator
9676 \begin_layout Description
9677 \begin_inset Flex Code
9680 \begin_layout Plain Layout
9686 Sets the preamble for the \SpecialChar LaTeX
9688 Note that this will completely override any prior
9689 \begin_inset Flex Code
9692 \begin_layout Plain Layout
9699 \begin_inset Flex Code
9702 \begin_layout Plain Layout
9710 \begin_inset Flex Code
9713 \begin_layout Plain Layout
9719 if you just want to add material to the preamble.) Must end with
9720 \begin_inset Quotes eld
9724 \begin_inset Flex Code
9727 \begin_layout Plain Layout
9734 \begin_inset Quotes erd
9740 \begin_layout Description
9741 \begin_inset Flex Code
9744 \begin_layout Plain Layout
9751 \begin_inset Flex Code
9754 \begin_layout Plain Layout
9761 \begin_inset Flex Code
9764 \begin_layout Plain Layout
9773 \begin_inset space \thinspace{}
9777 \begin_inset Flex Code
9780 \begin_layout Plain Layout
9786 ] Whether the class already provides the feature
9787 \begin_inset Flex Code
9790 \begin_layout Plain Layout
9797 A feature is in general the name of a package (e.
9798 \begin_inset space \thinspace{}
9802 \begin_inset space \space{}
9806 \begin_inset Flex Code
9809 \begin_layout Plain Layout
9816 \begin_inset Flex Code
9819 \begin_layout Plain Layout
9826 \begin_inset space \thinspace{}
9830 \begin_inset space \space{}
9834 \begin_inset Flex Code
9837 \begin_layout Plain Layout
9844 \begin_inset Flex Code
9847 \begin_layout Plain Layout
9855 \begin_inset CommandInset ref
9857 reference "chap:List-of-functions"
9861 for the list of features.
9864 \begin_layout Description
9865 \begin_inset Flex Code
9868 \begin_layout Plain Layout
9875 \begin_inset Flex Code
9878 \begin_layout Plain Layout
9884 ] Indicates that this layout provides the functionality of the module mentioned,
9885 which should be specified by the filename without the
9886 \begin_inset Flex Code
9889 \begin_layout Plain Layout
9896 This will typically be used if the layout includes the module directly,
9897 rather than using the
9898 \begin_inset Flex Code
9901 \begin_layout Plain Layout
9907 tag to indicate that it ought to be used.
9908 It could also be used in a module that provided an alternate implementation
9909 of the same functionality.
9912 \begin_layout Description
9913 \begin_inset Flex Code
9916 \begin_layout Plain Layout
9923 \begin_inset Flex Code
9926 \begin_layout Plain Layout
9932 ] Creates a new paragraph style if it does not already exist.
9933 If the style does exist, this section is ignored.
9935 \begin_inset Quotes eld
9939 \begin_inset Flex Code
9942 \begin_layout Plain Layout
9949 \begin_inset Quotes erd
9955 \begin_layout Description
9956 \begin_inset Flex Code
9959 \begin_layout Plain Layout
9966 \begin_inset Flex Code
9969 \begin_layout Plain Layout
9975 ] Whether the class requires the feature
9976 \begin_inset Flex Code
9979 \begin_layout Plain Layout
9986 Multiple features must be separated by commas.
9987 Note that you can only request supported features.
9989 \begin_inset CommandInset ref
9991 reference "chap:List-of-functions"
9995 for the list of features.).
9996 If you require a package with specific options, you can additionally use
9998 \begin_inset Flex Code
10001 \begin_layout Plain Layout
10010 \begin_layout Description
10011 \begin_inset Flex Code
10014 \begin_layout Plain Layout
10021 \begin_inset Flex Code
10024 \begin_layout Plain Layout
10030 ] A string that indicates the width of the right margin on the screen, for
10032 \begin_inset Quotes eld
10036 \begin_inset Flex Code
10039 \begin_layout Plain Layout
10046 \begin_inset Quotes erd
10052 \begin_layout Description
10053 \begin_inset Flex Code
10056 \begin_layout Plain Layout
10063 \begin_inset Flex Code
10066 \begin_layout Plain Layout
10072 ] Sets which divisions get numbered.
10074 \begin_inset Newline newline
10078 \begin_inset Flex Code
10081 \begin_layout Plain Layout
10087 counter in \SpecialChar LaTeX
10091 \begin_layout Description
10092 \begin_inset Flex Code
10095 \begin_layout Plain Layout
10102 \begin_inset Flex Code
10105 \begin_layout Plain Layout
10114 \begin_inset space \thinspace{}
10118 \begin_inset Flex Code
10121 \begin_layout Plain Layout
10127 ] Whether the class-default should be printing on one or both sides of the
10129 Can be changed in the
10130 \begin_inset Flex Noun
10133 \begin_layout Plain Layout
10134 Document\SpecialChar menuseparator
10143 \begin_layout Description
10144 \begin_inset Flex Code
10147 \begin_layout Plain Layout
10154 \begin_inset Flex Code
10157 \begin_layout Plain Layout
10163 ] This sequence defines a paragraph style.
10164 If the style does not yet exist, it is created; if it does exist, its parameter
10167 \begin_inset Quotes eld
10171 \begin_inset Flex Code
10174 \begin_layout Plain Layout
10181 \begin_inset Quotes erd
10185 \begin_inset Newline newline
10189 \begin_inset CommandInset ref
10191 reference "subsec:Paragraph-Styles"
10195 for details on paragraph styles.
10198 \begin_layout Description
10199 \begin_inset Flex Code
10202 \begin_layout Plain Layout
10209 \begin_inset Flex Code
10212 \begin_layout Plain Layout
10218 ] The name of the command or environment to be used with
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10231 \begin_layout Description
10232 \begin_inset Flex Code
10235 \begin_layout Plain Layout
10242 \begin_inset Flex Code
10245 \begin_layout Plain Layout
10254 \begin_inset Flex Code
10257 \begin_layout Plain Layout
10263 ] Indicates what kind of markup is used to define the title of a document.
10265 \begin_inset Flex Code
10268 \begin_layout Plain Layout
10274 means that the macro with name
10275 \begin_inset Flex Code
10278 \begin_layout Plain Layout
10284 will be inserted after the last layout which has
10285 \begin_inset Quotes eld
10289 \begin_inset Flex Code
10292 \begin_layout Plain Layout
10294 \begin_inset space ~
10303 \begin_inset Quotes erd
10308 \begin_inset Flex Code
10311 \begin_layout Plain Layout
10317 corresponds to the case where all layouts which have
10318 \begin_inset Quotes eld
10322 \begin_inset Flex Code
10325 \begin_layout Plain Layout
10327 \begin_inset space ~
10336 \begin_inset Quotes erd
10339 should be enclosed into the
10340 \begin_inset Flex Code
10343 \begin_layout Plain Layout
10352 \begin_layout Description
10353 \begin_inset Flex Code
10356 \begin_layout Plain Layout
10363 \begin_inset Flex Code
10366 \begin_layout Plain Layout
10372 ] Sets which divisions are included in the table of contents.
10374 \begin_inset Flex Code
10377 \begin_layout Plain Layout
10383 counter in \SpecialChar LaTeX
10387 \begin_layout Subsection
10388 \begin_inset Flex Code
10391 \begin_layout Plain Layout
10398 \begin_inset CommandInset label
10400 name "subsec:ClassOptions"
10407 \begin_layout Standard
10409 \begin_inset Flex Code
10412 \begin_layout Plain Layout
10418 section can contain the following entries:
10421 \begin_layout Description
10422 \begin_inset Flex Code
10425 \begin_layout Plain Layout
10432 \begin_inset Flex Code
10435 \begin_layout Plain Layout
10441 ] The list of available font sizes for the document's main font, separated
10443 \begin_inset Quotes eld
10447 \begin_inset Flex Code
10450 \begin_layout Plain Layout
10457 \begin_inset Quotes erd
10463 \begin_layout Description
10464 \begin_inset Flex Code
10467 \begin_layout Plain Layout
10473 Used to set the DTD line with XML-based output classes.
10475 \begin_inset space \thinspace{}
10479 \begin_inset Quotes eld
10482 -//OASIS//DTD DocBook V4.2//EN
10483 \begin_inset Quotes erd
10489 \begin_layout Description
10490 \begin_inset Flex Code
10493 \begin_layout Plain Layout
10500 \begin_inset Flex Code
10503 \begin_layout Plain Layout
10504 string="empty|plain|headings|fancy"
10509 ] The list of available page sty\SpecialChar softhyphen
10511 \begin_inset Quotes eld
10515 \begin_inset Flex Code
10518 \begin_layout Plain Layout
10525 \begin_inset Quotes erd
10531 \begin_layout Description
10532 \begin_inset Flex Code
10535 \begin_layout Plain Layout
10542 \begin_inset Flex Code
10545 \begin_layout Plain Layout
10551 ] Some document class options, separated by a comma, that will be added
10552 to the optional part of the
10553 \begin_inset Flex Code
10556 \begin_layout Plain Layout
10567 \begin_layout Standard
10569 \begin_inset Flex Code
10572 \begin_layout Plain Layout
10578 section must end with
10579 \begin_inset Quotes eld
10583 \begin_inset Flex Code
10586 \begin_layout Plain Layout
10593 \begin_inset Quotes erd
10599 \begin_layout Subsection
10601 \begin_inset CommandInset label
10603 name "subsec:Paragraph-Styles"
10610 \begin_layout Standard
10611 A paragraph style description looks like this:
10615 \begin_layout Plain Layout
10616 Note that this will either define a new style or modify an existing one.
10624 \begin_layout LyX-Code
10631 \begin_layout LyX-Code
10635 \begin_layout LyX-Code
10639 \begin_layout Standard
10640 where the following commands are allowed:
10643 \begin_layout Description
10644 \begin_inset Flex Code
10647 \begin_layout Plain Layout
10654 \begin_inset Flex Code
10657 \begin_layout Plain Layout
10662 , left, right, center
10667 ] Paragraph alignment.
10670 \begin_layout Description
10671 \begin_inset Flex Code
10674 \begin_layout Plain Layout
10681 \begin_inset Flex Code
10684 \begin_layout Plain Layout
10689 , left, right, center
10694 ] A comma separated list of permitted alignments.
10695 (Some \SpecialChar LaTeX
10696 styles prohibit certain alignments, since those wouldn't make sense.
10697 For example a right-aligned or centered enumeration isn't possible.)
10700 \begin_layout Description
10701 \begin_inset Flex Code
10704 \begin_layout Plain Layout
10711 \begin_inset Flex Code
10714 \begin_layout Plain Layout
10720 ] Defines argument number <int> of a command\SpecialChar breakableslash
10721 environment associated with
10723 This is useful for things like section headings, and only makes sense with
10726 Every (optional or required) argument of a command or environment – except
10727 for the required argument that is associated with the content of the paragraph
10728 itself – has a separate definition, where the number specifies the order
10730 The definition must end with
10731 \begin_inset Flex Code
10734 \begin_layout Plain Layout
10741 So a command with two optional arguments has:
10745 \begin_layout Quote
10751 \begin_layout Quote
10757 \begin_layout Quote
10763 \begin_layout Quote
10769 \begin_layout Quote
10775 \begin_layout Quote
10781 \begin_layout Standard
10783 \begin_inset Flex Code
10786 \begin_layout Plain Layout
10792 definition, the following specifications are possible:
10795 \begin_layout Itemize
10796 \begin_inset Flex Code
10799 \begin_layout Plain Layout
10806 \begin_inset Flex Code
10809 \begin_layout Plain Layout
10815 The string that will appear both in the menu (to insert this argument)
10816 and on the argument inset button (unless you also specify a separate
10817 \begin_inset Flex Code
10820 \begin_layout Plain Layout
10827 For the menu, you can define an accelerator by appending the respective
10828 character to the string, divided by
10829 \begin_inset Quotes eld
10833 \begin_inset Quotes erd
10837 \begin_inset space \thinspace{}
10841 \begin_inset space \space{}
10845 \begin_inset Quotes eld
10849 \begin_inset Flex Code
10852 \begin_layout Plain Layout
10859 \begin_inset Quotes erd
10865 \begin_layout Itemize
10866 \begin_inset Flex Code
10869 \begin_layout Plain Layout
10876 \begin_inset Flex Code
10879 \begin_layout Plain Layout
10885 A separate string for the menu.
10886 You can define an accelerator by appending the respective character to
10887 the string, divided by
10888 \begin_inset Quotes eld
10892 \begin_inset Quotes erd
10896 \begin_inset space \thinspace{}
10900 \begin_inset space \space{}
10904 \begin_inset Quotes eld
10908 \begin_inset Flex Code
10911 \begin_layout Plain Layout
10918 \begin_inset Quotes erd
10922 This specification is optional.
10923 If it is not given the
10924 \begin_inset Flex Code
10927 \begin_layout Plain Layout
10933 will be used instead for the menu.
10936 \begin_layout Itemize
10937 \begin_inset Flex Code
10940 \begin_layout Plain Layout
10947 \begin_inset Flex Code
10950 \begin_layout Plain Layout
10956 A longer explanatory text that appears in the tooltip when hovering over
10957 the argument inset.
10960 \begin_layout Itemize
10961 \begin_inset Flex Code
10964 \begin_layout Plain Layout
10971 \begin_inset Flex Code
10974 \begin_layout Plain Layout
10983 \begin_inset space \thinspace{}
10987 \begin_inset Flex Code
10990 \begin_layout Plain Layout
10996 ] Declare if this is a mandatory (1) or an optional (0) argument.
10997 Mandatory arguments will be output empty if not given, while optional arguments
10998 will not be output at all.
10999 By default, mandatory arguments are delimited by
11000 \begin_inset Flex Code
11003 \begin_layout Plain Layout
11009 , while optional arguments are delimited by
11010 \begin_inset Flex Code
11013 \begin_layout Plain Layout
11022 \begin_layout Itemize
11023 \begin_inset Flex Code
11026 \begin_layout Plain Layout
11033 \begin_inset Flex Code
11036 \begin_layout Plain Layout
11042 defines another argument (by its number) which this argument requires to
11043 be output if it is itself output.
11045 \begin_inset space \thinspace{}
11048 g., in \SpecialChar LaTeX
11049 commands, optional arguments often require previous optional arguments
11050 to be output (at least empty), as in
11051 \begin_inset Flex Code
11054 \begin_layout Plain Layout
11057 command[][argument]{text}
11063 This can be achieved by the statement
11064 \begin_inset Flex Code
11067 \begin_layout Plain Layout
11074 \begin_inset Flex Code
11077 \begin_layout Plain Layout
11086 \begin_layout Itemize
11087 \begin_inset Flex Code
11090 \begin_layout Plain Layout
11097 \begin_inset Flex Code
11100 \begin_layout Plain Layout
11106 defines a custom left delimiter (instead of
11107 \begin_inset Flex Code
11110 \begin_layout Plain Layout
11117 \begin_inset Flex Code
11120 \begin_layout Plain Layout
11127 A line break in the output can be indicated by
11128 \begin_inset Flex Code
11131 \begin_layout Plain Layout
11140 \begin_layout Itemize
11141 \begin_inset Flex Code
11144 \begin_layout Plain Layout
11151 \begin_inset Flex Code
11154 \begin_layout Plain Layout
11160 defines a custom right delimiter (instead of
11161 \begin_inset Flex Code
11164 \begin_layout Plain Layout
11171 \begin_inset Flex Code
11174 \begin_layout Plain Layout
11181 A line break in the output can be indicated by
11182 \begin_inset Flex Code
11185 \begin_layout Plain Layout
11194 \begin_layout Itemize
11195 \begin_inset Flex Code
11198 \begin_layout Plain Layout
11205 \begin_inset Flex Code
11208 \begin_layout Plain Layout
11214 defines an argument that is inserted if and only if no user-specified arguments
11216 \begin_inset space \thinspace{}
11220 \begin_inset space \space{}
11223 if no argument inset has been inserted (note that also an empty argument
11224 inset omits the DefaultArg).
11225 Multiple arguments need to be separated by comma.
11228 \begin_layout Itemize
11229 \begin_inset Flex Code
11232 \begin_layout Plain Layout
11239 \begin_inset Flex Code
11242 \begin_layout Plain Layout
11248 defines an argument that is inserted in any case (alone or in addition
11249 to user-specified arguments).
11250 Multiple arguments need to be separated by comma.
11253 \begin_layout Itemize
11254 \begin_inset Flex Code
11257 \begin_layout Plain Layout
11263 The font used for the argument content, see
11264 \begin_inset CommandInset ref
11266 reference "subsec:Font-description"
11273 \begin_layout Itemize
11274 \begin_inset Flex Code
11277 \begin_layout Plain Layout
11283 The font used for the label; see
11284 \begin_inset CommandInset ref
11286 reference "subsec:Font-description"
11293 \begin_layout Itemize
11294 \begin_inset Flex Code
11297 \begin_layout Plain Layout
11304 \begin_inset Flex Code
11307 \begin_layout Plain Layout
11312 , Minimalistic, Conglomerate
11317 ] describes the rendering style used for the inset's frame and buttons.
11320 \begin_layout Itemize
11321 \begin_inset Flex Code
11324 \begin_layout Plain Layout
11331 \begin_inset Flex Code
11334 \begin_layout Plain Layout
11341 \begin_inset Flex Code
11344 \begin_layout Plain Layout
11350 , this argument is automatically inserted when the respective style is selected.
11351 Currently, only one argument per style\SpecialChar breakableslash
11352 layout can be automatically inserted.
11355 \begin_layout Itemize
11356 \begin_inset Flex Code
11359 \begin_layout Plain Layout
11366 \begin_inset Flex Code
11369 \begin_layout Plain Layout
11376 \begin_inset Flex Code
11379 \begin_layout Plain Layout
11385 , this argument will be inserted with a copy of the co-text (either selected
11386 text or the whole paragraph) as content.
11389 \begin_layout Itemize
11390 \begin_inset Flex Code
11393 \begin_layout Plain Layout
11400 \begin_inset Flex Code
11403 \begin_layout Plain Layout
11404 string of characters
11413 Defines individual characters that should be output in raw form, meaning
11414 without special translations that \SpecialChar LaTeX
11416 Note that, contrary to PassThru, this needs to be explicitly defined for
11418 That is, arguments do not inherit PassThruChars from their parent inset
11422 \begin_layout Standard
11423 By default, the text entered in the \SpecialChar LyX
11424 workarea in the respective layout is
11425 the last (mandatory) argument of a command if the
11426 \begin_inset Flex Code
11429 \begin_layout Plain Layout
11436 \begin_inset Flex Code
11439 \begin_layout Plain Layout
11446 However, arguments with the prefix
11447 \begin_inset Flex Code
11450 \begin_layout Plain Layout
11456 are output after this workarea argument.
11457 Note that post-argument numbering restarts at 1, so the first argument
11458 following the workarea argument is
11459 \begin_inset Flex Code
11462 \begin_layout Plain Layout
11469 Post-arguments are ignored in any other
11470 \begin_inset Flex Code
11473 \begin_layout Plain Layout
11480 \begin_inset Flex Code
11483 \begin_layout Plain Layout
11492 \begin_layout Standard
11494 \begin_inset Flex Code
11497 \begin_layout Plain Layout
11506 \begin_inset Flex Code
11509 \begin_layout Plain Layout
11518 \begin_inset Flex Code
11521 \begin_layout Plain Layout
11527 followed by the number (e.
11528 \begin_inset space \thinspace{}
11532 \begin_inset space \space{}
11536 \begin_inset Flex Code
11539 \begin_layout Plain Layout
11549 \begin_layout Description
11550 \begin_inset Flex Code
11553 \begin_layout Plain Layout
11559 Note that this will completely override any prior
11560 \begin_inset Flex Code
11563 \begin_layout Plain Layout
11569 declaration for this style.
11571 \begin_inset Quotes eld
11575 \begin_inset Flex Code
11578 \begin_layout Plain Layout
11585 \begin_inset Quotes erd
11590 \begin_inset CommandInset ref
11592 reference "subsec:I18n"
11596 for details on its use.
11599 \begin_layout Description
11600 \begin_inset Flex Code
11603 \begin_layout Plain Layout
11610 \begin_inset Flex Code
11613 \begin_layout Plain Layout
11623 \begin_layout Plain Layout
11624 Note that a `float' here is a real number, such as: 1.5.
11629 The vertical space with which the last of a chain of paragraphs with this
11630 style is separated from the following paragraph.
11631 If the next paragraph has another style, the separations are not simply
11632 added, but the maximum is taken.
11635 \begin_layout Description
11636 \begin_inset Flex Code
11639 \begin_layout Plain Layout
11646 \begin_inset Flex Code
11649 \begin_layout Plain Layout
11655 ] The category for this style.
11656 This is used to group related styles in the style combobox on the toolbar.
11657 Any string can be used, but you may want to use existing categories with
11662 \begin_layout Description
11663 \begin_inset Flex Code
11666 \begin_layout Plain Layout
11672 Depth of XML command.
11673 Used only with XML-type formats.
11676 \begin_layout Description
11677 \begin_inset Flex Code
11680 \begin_layout Plain Layout
11687 \begin_inset Flex Code
11690 \begin_layout Plain Layout
11696 ] Copies all the features of an existing style into the current one.
11700 \begin_layout Description
11701 \begin_inset Flex Code
11704 \begin_layout Plain Layout
11711 \begin_inset Flex Code
11714 \begin_layout Plain Layout
11720 ] The name of a style whose preamble should be output
11725 This allows to ensure some ordering of the preamble snippets when macros
11726 definitions depend on one another.
11730 \begin_layout Plain Layout
11731 Note that, besides that functionality, there is no way to ensure any ordering
11733 The ordering that you see in a given version of \SpecialChar LyX
11734 may change without warning
11743 \begin_layout Description
11744 \begin_inset Flex Code
11747 \begin_layout Plain Layout
11754 \begin_inset Flex Code
11757 \begin_layout Plain Layout
11762 , Box, Filled_Box, Static
11767 ] The type of label that stands at the end of the paragraph (or sequence
11769 \begin_inset Flex Code
11772 \begin_layout Plain Layout
11779 \begin_inset Newline newline
11783 \begin_inset Flex Code
11786 \begin_layout Plain Layout
11793 \begin_inset Flex Code
11796 \begin_layout Plain Layout
11803 \begin_inset Flex Code
11806 \begin_layout Plain Layout
11814 \begin_inset Flex Code
11817 \begin_layout Plain Layout
11824 \begin_inset Quotes eld
11828 \begin_inset Quotes erd
11832 \begin_inset Flex Code
11835 \begin_layout Plain Layout
11842 \begin_inset space \space{}
11846 \begin_inset Flex Code
11849 \begin_layout Plain Layout
11855 ) is a white (resp.
11856 \begin_inset space ~
11859 black) square suitable for end of proof markers,
11860 \begin_inset Flex Code
11863 \begin_layout Plain Layout
11869 is an explicit text string.
11872 \begin_layout Description
11873 \begin_inset Flex Code
11876 \begin_layout Plain Layout
11883 \begin_inset Flex Code
11886 \begin_layout Plain Layout
11892 ] The string used for a label with a
11893 \begin_inset Flex Code
11896 \begin_layout Plain Layout
11903 \begin_inset Newline newline
11907 \begin_inset Flex Code
11910 \begin_layout Plain Layout
11920 \begin_layout Description
11921 \begin_inset Flex Code
11924 \begin_layout Plain Layout
11930 The font used for both the text body
11936 \begin_inset CommandInset ref
11938 reference "subsec:Font-description"
11943 Note that defining this font automatically defines the
11944 \begin_inset Flex Code
11947 \begin_layout Plain Layout
11954 So you should define this one first if you also want to define
11955 \begin_inset Flex Code
11958 \begin_layout Plain Layout
11967 \begin_layout Description
11968 \begin_inset Flex Code
11971 \begin_layout Plain Layout
11978 \begin_inset Flex Code
11981 \begin_layout Plain Layout
11987 ] Used for backporting new styles to stable \SpecialChar LyX
11989 The first stable version that supports this tag is \SpecialChar LyX
11991 The argument is a number which may either be 0, -1 or any value greater
11994 \begin_inset Flex Code
11997 \begin_layout Plain Layout
12003 flag of a style is greater than zero, it will always be written to the
12005 If a .lyx file is read, the style definitions from the document header are
12006 added to the document class.
12007 Therefore even older \SpecialChar LyX
12008 versions can handle the style.
12010 \begin_inset Flex Code
12013 \begin_layout Plain Layout
12019 is a version number: if the style is read, and the version number is less
12020 than the version number of the already existing style in the document class,
12021 the new style is ignored.
12022 If the version number is greater, the new style replaces the existing style.
12023 A value of -1 means an infinite version number, i.
12024 \begin_inset space \thinspace{}
12028 \begin_inset space \space{}
12031 the style is always used.
12034 \begin_layout Description
12035 \begin_inset Flex Code
12038 \begin_layout Plain Layout
12045 \begin_inset Flex Code
12048 \begin_layout Plain Layout
12057 \begin_inset space \thinspace{}
12061 \begin_inset Flex Code
12064 \begin_layout Plain Layout
12070 ] Usually \SpecialChar LyX
12071 does not allow you to insert more than one space between words,
12072 since a space is considered as the separation between two words, not a
12073 character or symbol of its own.
12074 This is a very fine thing but sometimes annoying, for example, when typing
12075 program code or plain \SpecialChar LaTeX
12078 \begin_inset Flex Code
12081 \begin_layout Plain Layout
12088 Note that \SpecialChar LyX
12089 will create protected blanks for the additional blanks when
12090 in another mode than \SpecialChar LaTeX
12094 \begin_layout Description
12095 \begin_inset Flex Code
12098 \begin_layout Plain Layout
12104 These tags are used with XHTML output.
12106 \begin_inset CommandInset ref
12108 reference "subsec:Paragraph-Style-XHTML"
12115 \begin_layout Description
12116 \begin_inset Flex Code
12119 \begin_layout Plain Layout
12125 [FIXME] (Used only with XML-type formats.)
12128 \begin_layout Description
12129 \begin_inset Flex Code
12132 \begin_layout Plain Layout
12139 \begin_inset Flex Code
12142 \begin_layout Plain Layout
12151 \begin_inset space \thinspace{}
12155 \begin_inset Flex Code
12158 \begin_layout Plain Layout
12165 \begin_inset Flex Code
12168 \begin_layout Plain Layout
12174 , marks the style as to be included in the document preamble and not in
12176 This is useful for document classes that want such information as the title
12177 and author to appear in the preamble.
12178 Note that this works only for styles for which the
12179 \begin_inset Flex Code
12182 \begin_layout Plain Layout
12189 \begin_inset Flex Code
12192 \begin_layout Plain Layout
12199 \begin_inset Flex Code
12202 \begin_layout Plain Layout
12211 \begin_layout Description
12212 \begin_inset Flex Code
12215 \begin_layout Plain Layout
12222 \begin_inset Flex Code
12225 \begin_layout Plain Layout
12234 \begin_inset space \thinspace{}
12238 \begin_inset Flex Code
12241 \begin_layout Plain Layout
12248 \begin_inset Flex Code
12251 \begin_layout Plain Layout
12257 , marks the style as being part of a title block (see also the
12258 \begin_inset Flex Code
12261 \begin_layout Plain Layout
12268 \begin_inset Flex Code
12271 \begin_layout Plain Layout
12280 \begin_layout Description
12281 \begin_inset Flex Code
12284 \begin_layout Plain Layout
12291 \begin_inset Flex Code
12294 \begin_layout Plain Layout
12300 ] The \SpecialChar LaTeX
12301 command sequence declaring an item in a list.
12302 The command is to be defined without the preceding backslash (the default
12304 \begin_inset Quotes eld
12308 \begin_inset Quotes erd
12312 \begin_inset Flex Code
12315 \begin_layout Plain Layout
12323 in the \SpecialChar LaTeX
12327 \begin_layout Description
12328 \begin_inset Flex Code
12331 \begin_layout Plain Layout
12338 \begin_inset Flex Code
12341 \begin_layout Plain Layout
12347 ] This provides extra space between paragraphs that have the same style.
12348 If you put other styles into an environment, each is separated with the
12350 \begin_inset Flex Code
12353 \begin_layout Plain Layout
12360 But the whole items of the environment are additionally separated with
12362 \begin_inset Flex Code
12365 \begin_layout Plain Layout
12372 Note that this is a
12377 \begin_layout Description
12378 \begin_inset Flex Code
12381 \begin_layout Plain Layout
12387 [FIXME] (Used only with XML-type formats.)
12390 \begin_layout Description
12391 \begin_inset Flex Code
12394 \begin_layout Plain Layout
12401 \begin_inset Flex Code
12404 \begin_layout Plain Layout
12413 \begin_inset space \thinspace{}
12417 \begin_inset Flex Code
12420 \begin_layout Plain Layout
12426 ] Usually \SpecialChar LyX
12427 does not allow you to leave a paragraph empty, since it would
12428 lead to empty \SpecialChar LaTeX
12430 There are some cases where this could be desirable however: in a letter
12431 template, the required fields can be provided as empty fields, so that
12432 people do not forget them; in some special classes, a style can be used
12433 as some kind of break, which does not contain actual text.
12436 \begin_layout Description
12437 \begin_inset Flex Code
12440 \begin_layout Plain Layout
12447 \begin_inset Flex Code
12450 \begin_layout Plain Layout
12456 ] The vertical space between the label and the text body.
12457 Only used for labels that are above the text body (
12458 \begin_inset Flex Code
12461 \begin_layout Plain Layout
12468 \begin_inset Newline newline
12472 \begin_inset Flex Code
12475 \begin_layout Plain Layout
12476 Centered_Top_Environment
12484 \begin_layout Description
12485 \begin_inset Flex Code
12488 \begin_layout Plain Layout
12495 \begin_inset Flex Code
12498 \begin_layout Plain Layout
12504 ] The name of the counter for automatic numbering.
12505 In order to have the counter appear with your label, you will need to reference
12507 \begin_inset Flex Code
12510 \begin_layout Plain Layout
12519 This will work with
12520 \begin_inset Flex Code
12523 \begin_layout Plain Layout
12530 \begin_inset Flex Code
12533 \begin_layout Plain Layout
12540 \begin_inset Flex Code
12543 \begin_layout Plain Layout
12550 \begin_inset Flex Code
12553 \begin_layout Plain Layout
12560 \begin_inset Newline newline
12568 \begin_inset Flex Code
12571 \begin_layout Plain Layout
12578 \begin_inset Flex Code
12581 \begin_layout Plain Layout
12587 , though this case is a bit complicated.
12588 Suppose you declare
12589 \begin_inset Quotes eld
12593 \begin_inset Flex Code
12596 \begin_layout Plain Layout
12597 LabelCounter myenum
12603 \begin_inset Quotes erd
12607 Then the actual counters used are
12608 \begin_inset Flex Code
12611 \begin_layout Plain Layout
12618 \begin_inset Flex Code
12621 \begin_layout Plain Layout
12628 \begin_inset Flex Code
12631 \begin_layout Plain Layout
12638 \begin_inset Flex Code
12641 \begin_layout Plain Layout
12647 , much as in \SpecialChar LaTeX
12649 These counters must all be declared separately.
12650 \begin_inset Newline newline
12654 \begin_inset CommandInset ref
12656 reference "subsec:Counters"
12660 for details on counters.
12663 \begin_layout Description
12664 \begin_inset Flex Code
12667 \begin_layout Plain Layout
12673 The font used for the label.
12675 \begin_inset CommandInset ref
12677 reference "subsec:Font-description"
12684 \begin_layout Description
12685 \begin_inset Flex Code
12688 \begin_layout Plain Layout
12695 \begin_inset Flex Code
12698 \begin_layout Plain Layout
12704 ] Text that indicates how far a label should be indented.
12707 \begin_layout Description
12708 \begin_inset Flex Code
12711 \begin_layout Plain Layout
12718 \begin_inset Flex Code
12721 \begin_layout Plain Layout
12727 ] Text that indicates the amount of horizontal space between the label and
12729 Only used for labels that are not above the text body.
12732 \begin_layout Description
12733 \begin_inset Flex Code
12736 \begin_layout Plain Layout
12743 \begin_inset Flex Code
12746 \begin_layout Plain Layout
12752 ] The string used for the label.
12754 \begin_inset Flex Code
12757 \begin_layout Plain Layout
12763 is set, this string can be contain the special formatting commands described
12765 \begin_inset CommandInset ref
12767 reference "subsec:Counters"
12774 \begin_layout Description
12775 \begin_inset Flex Code
12778 \begin_layout Plain Layout
12779 LabelStringAppendix
12785 \begin_inset Flex Code
12788 \begin_layout Plain Layout
12794 ] This is used inside the appendix instead of
12795 \begin_inset Newline newline
12799 \begin_inset Flex Code
12802 \begin_layout Plain Layout
12810 \begin_inset Flex Code
12813 \begin_layout Plain Layout
12820 \begin_inset Newline newline
12824 \begin_inset Flex Code
12827 \begin_layout Plain Layout
12828 LabelStringAppendix
12836 \begin_layout Description
12837 \begin_inset Flex Code
12840 \begin_layout Plain Layout
12846 [FIXME] (Used only with XML-type formats.)
12849 \begin_layout Description
12850 \begin_inset Flex Code
12853 \begin_layout Plain Layout
12860 \begin_inset Flex Code
12863 \begin_layout Plain Layout
12868 , Manual, Static, Above,
12869 \begin_inset Newline newline
12872 Centered, Sensitive, Enumerate,
12873 \begin_inset Newline newline
12876 Itemize, Bibliography
12885 \begin_layout Description
12886 \begin_inset Flex Code
12889 \begin_layout Plain Layout
12895 means the label is the very first word (up to the first real blank).
12896 Use protected spaces if you want more than one word as the label.
12900 \begin_layout Description
12901 \begin_inset Flex Code
12904 \begin_layout Plain Layout
12910 means the label is simply what is declared as
12911 \begin_inset Flex Code
12914 \begin_layout Plain Layout
12921 This will be displayed
12922 \begin_inset Quotes eld
12926 \begin_inset Quotes erd
12929 , at the beginning of the paragraph.
12931 \begin_inset Flex Code
12934 \begin_layout Plain Layout
12941 \begin_inset Flex Code
12944 \begin_layout Plain Layout
12950 , then it will be displayed only in the first paragraph of any sequence
12951 of paragraphs with the same
12952 \begin_inset Flex Code
12955 \begin_layout Plain Layout
12964 \begin_layout Description
12965 \begin_inset Flex Code
12968 \begin_layout Plain Layout
12975 \begin_inset space ~
12979 \begin_inset space ~
12983 \begin_inset Flex Code
12986 \begin_layout Plain Layout
12992 are special cases of
12993 \begin_inset Flex Code
12996 \begin_layout Plain Layout
13003 The label will be printed above the paragraph either at the beginning of
13004 the line or centered.
13007 \begin_layout Description
13008 \begin_inset Flex Code
13011 \begin_layout Plain Layout
13017 is a special case for the caption-labels
13018 \begin_inset Quotes eld
13022 \begin_inset Quotes erd
13026 \begin_inset Quotes eld
13030 \begin_inset Quotes erd
13034 \begin_inset Newline newline
13038 \begin_inset Flex Code
13041 \begin_layout Plain Layout
13047 means the (hardcoded) label string depends on the kind of float: It is
13048 hardcoded to be `FloatType N', where N is the value of the counter associated
13050 For the case that a caption is inserted outside of a float the
13051 \begin_inset Flex Code
13054 \begin_layout Plain Layout
13061 \begin_inset Quotes eld
13065 \begin_inset Quotes erd
13071 \begin_layout Description
13072 \begin_inset Flex Code
13075 \begin_layout Plain Layout
13081 produces the usual sort of enumeration labels.
13082 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13083 small Roman numerals, and uppercase letters for the four possible depths.
13086 \begin_layout Description
13087 \begin_inset Flex Code
13090 \begin_layout Plain Layout
13096 produces various bullets at the different levels.
13097 It is also hardcoded.
13100 \begin_layout Description
13101 \begin_inset Flex Code
13104 \begin_layout Plain Layout
13110 should be used only with
13111 \begin_inset Flex Code
13114 \begin_layout Plain Layout
13115 LatexType BibEnvironment
13124 \begin_layout Description
13125 \begin_inset Flex Code
13128 \begin_layout Plain Layout
13134 Note that this will completely override any prior
13135 \begin_inset Flex Code
13138 \begin_layout Plain Layout
13144 declaration for this style.
13146 \begin_inset Quotes eld
13150 \begin_inset Flex Code
13153 \begin_layout Plain Layout
13160 \begin_inset Quotes erd
13165 \begin_inset CommandInset ref
13167 reference "subsec:I18n"
13171 for details on its use.
13174 \begin_layout Description
13175 \begin_inset Flex Code
13178 \begin_layout Plain Layout
13185 \begin_inset Flex Code
13188 \begin_layout Plain Layout
13194 ] The name of the corresponding \SpecialChar LaTeX
13196 Either the environment or command name.
13199 \begin_layout Description
13200 \begin_inset Flex Code
13203 \begin_layout Plain Layout
13210 \begin_inset Flex Code
13213 \begin_layout Plain Layout
13219 ] An optional parameter for the corresponding
13220 \begin_inset Flex Code
13223 \begin_layout Plain Layout
13230 This parameter cannot be changed from within \SpecialChar LyX
13232 \begin_inset Flex Code
13235 \begin_layout Plain Layout
13241 for customizable parameters).
13242 This will be output as is after all \SpecialChar LaTeX
13244 \begin_inset Flex Code
13247 \begin_layout Plain Layout
13256 \begin_layout Description
13257 \begin_inset Flex Code
13260 \begin_layout Plain Layout
13267 \begin_inset Flex Code
13270 \begin_layout Plain Layout
13275 , Command, Environment, Item_Environment,
13276 \begin_inset Newline newline
13279 List_Environment, Bib_Environment
13284 ] How the style should be translated into \SpecialChar LaTeX
13289 \begin_layout Plain Layout
13290 \begin_inset Flex Code
13293 \begin_layout Plain Layout
13299 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13300 Visit the SGML class files for specific examples.
13309 \begin_layout Description
13310 \begin_inset Flex Code
13313 \begin_layout Plain Layout
13319 means nothing special.
13322 \begin_layout Description
13323 \begin_inset Flex Code
13326 \begin_layout Plain Layout
13333 \begin_inset Flex Code
13336 \begin_layout Plain Layout
13343 {\SpecialChar ldots
13352 \begin_layout Description
13353 \begin_inset Flex Code
13356 \begin_layout Plain Layout
13363 \begin_inset Flex Code
13366 \begin_layout Plain Layout
13373 }\SpecialChar ldots
13389 \begin_layout Description
13390 \begin_inset Flex Code
13393 \begin_layout Plain Layout
13400 \begin_inset Flex Code
13403 \begin_layout Plain Layout
13410 \begin_inset Flex Code
13413 \begin_layout Plain Layout
13421 is generated for each paragraph of this environment.
13425 \begin_layout Description
13426 \begin_inset Flex Code
13429 \begin_layout Plain Layout
13436 \begin_inset Flex Code
13439 \begin_layout Plain Layout
13446 \begin_inset Newline newline
13450 \begin_inset Flex Code
13453 \begin_layout Plain Layout
13459 is passed as an argument to the environment.
13460 \begin_inset Newline newline
13464 \begin_inset Flex Code
13467 \begin_layout Plain Layout
13473 can be defined in the
13474 \begin_inset Flex Noun
13477 \begin_layout Plain Layout
13478 Edit\SpecialChar menuseparator
13480 \begin_inset space ~
13491 \begin_layout Description
13492 \begin_inset Flex Code
13495 \begin_layout Plain Layout
13502 \begin_inset Flex Code
13505 \begin_layout Plain Layout
13511 but adds the necessary mandatory argument (the longest label) to the begin
13512 statement of the bibliography environment:
13513 \begin_inset Newline newline
13517 \begin_inset Flex Code
13520 \begin_layout Plain Layout
13523 begin{thebibliography}{99}
13529 It is therefore only useful for bibliography environments.
13530 The default longest label
13531 \begin_inset Quotes eld
13535 \begin_inset Quotes erd
13538 can be changed by the user in the paragraph settings of a bibliography
13542 \begin_layout Standard
13543 Putting the last few things together, the \SpecialChar LaTeX
13544 output will be either:
13547 \begin_layout LyX-Code
13550 LatexName[LatexParam]{\SpecialChar ldots
13554 \begin_layout Standard
13558 \begin_layout LyX-Code
13561 begin{LatexName}[LatexParam] \SpecialChar ldots
13567 \begin_layout Standard
13568 depending upon the \SpecialChar LaTeX
13573 \begin_layout Description
13574 \begin_inset Flex Code
13577 \begin_layout Plain Layout
13584 \begin_inset Flex Code
13587 \begin_layout Plain Layout
13593 ] A string that is put at the beginning of the style content.
13594 A line break in the output can be indicated by
13595 \begin_inset Flex Code
13598 \begin_layout Plain Layout
13607 \begin_layout Description
13608 \begin_inset Flex Code
13611 \begin_layout Plain Layout
13618 \begin_inset Flex Code
13621 \begin_layout Plain Layout
13627 ] If you put styles into environments, the different
13628 \begin_inset Flex Code
13631 \begin_layout Plain Layout
13637 are not simply added, but added with a factor
13638 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13642 Note that this parameter is also used when
13643 \begin_inset Flex Code
13646 \begin_layout Plain Layout
13653 \begin_inset Flex Code
13656 \begin_layout Plain Layout
13663 \begin_inset Flex Code
13666 \begin_layout Plain Layout
13673 Then it is added to the manual or dynamic margin.
13674 \begin_inset Newline newline
13678 \begin_inset Quotes eld
13682 \begin_inset Flex Code
13685 \begin_layout Plain Layout
13692 \begin_inset Quotes erd
13695 means that the paragraph is indented with the width of
13696 \begin_inset Quotes eld
13700 \begin_inset Flex Code
13703 \begin_layout Plain Layout
13710 \begin_inset Quotes erd
13713 in the normal font.
13714 You can get a negative width by prefixing the string with
13715 \begin_inset Quotes eld
13719 \begin_inset Flex Code
13722 \begin_layout Plain Layout
13729 \begin_inset Quotes erd
13733 This way was chosen so that the look is the same with each used screen
13737 \begin_layout Description
13738 \begin_inset Flex Code
13741 \begin_layout Plain Layout
13748 \begin_inset Flex Code
13751 \begin_layout Plain Layout
13756 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13762 \begin_inset Newline newline
13765 The kind of margin that the style has on the left side.
13769 \begin_layout Description
13770 \begin_inset Flex Code
13773 \begin_layout Plain Layout
13779 just means a fixed margin.
13782 \begin_layout Description
13783 \begin_inset Flex Code
13786 \begin_layout Plain Layout
13792 means that the left margin depends on the string entered in the
13793 \begin_inset Flex Noun
13796 \begin_layout Plain Layout
13797 Edit\SpecialChar menuseparator
13799 \begin_inset space ~
13808 This is used to typeset nice lists without tabulators.
13811 \begin_layout Description
13812 \begin_inset Flex Code
13815 \begin_layout Plain Layout
13821 means that the margin depends on the size of the label.
13822 This is used for automatic enumerated headlines.
13823 It is obvious that the headline
13824 \begin_inset Quotes eld
13827 5.4.3.2.1 Very long headline
13828 \begin_inset Quotes erd
13831 must have a wider left margin (as wide as
13832 \begin_inset Quotes eld
13836 \begin_inset Quotes erd
13839 plus the space) than
13840 \begin_inset Quotes eld
13843 3.2 Very long headline
13844 \begin_inset Quotes erd
13848 \begin_inset Quotes eld
13852 \begin_inset Quotes erd
13855 are not able to do this.
13858 \begin_layout Description
13859 \begin_inset Flex Code
13862 \begin_layout Plain Layout
13868 is similar, but only the very first row of the paragraph is dynamic, while
13869 the others are static; this is used, for example, for descriptions.
13872 \begin_layout Description
13873 \begin_inset Flex Code
13876 \begin_layout Plain Layout
13882 means the margin is chosen in a way that the longest row of this paragraph
13883 fits to the right margin.
13884 This is used to typeset an address on the right edge of the page.
13888 \begin_layout Description
13889 \begin_inset Flex Code
13892 \begin_layout Plain Layout
13899 \begin_inset Flex Code
13902 \begin_layout Plain Layout
13911 \begin_inset space \thinspace{}
13915 \begin_inset Flex Code
13918 \begin_layout Plain Layout
13924 ] Whether fragile commands in this style should be
13925 \begin_inset Flex Code
13928 \begin_layout Plain Layout
13941 whether this command should itself be protected.)
13944 \begin_layout Description
13945 \begin_inset Flex Code
13948 \begin_layout Plain Layout
13955 \begin_inset Flex Code
13958 \begin_layout Plain Layout
13965 \begin_inset space \thinspace{}
13969 \begin_inset Flex Code
13972 \begin_layout Plain Layout
13980 ] Whether newlines are translated into \SpecialChar LaTeX
13982 \begin_inset Flex Code
13985 \begin_layout Plain Layout
13996 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
13998 inside \SpecialChar LyX
14002 \begin_layout Description
14003 \begin_inset Flex Code
14006 \begin_layout Plain Layout
14013 \begin_inset Flex Code
14016 \begin_layout Plain Layout
14025 \begin_inset space \thinspace{}
14029 \begin_inset Flex Code
14032 \begin_layout Plain Layout
14038 ] If set to true, and if
14039 \begin_inset Flex Code
14042 \begin_layout Plain Layout
14049 \begin_inset Flex Code
14052 \begin_layout Plain Layout
14058 ) paragraphs are being indented, then the indentation of such a paragraph
14059 following one of this type will be suppressed.
14060 (So this will not affect the display of non-default paragraphs.)
14063 \begin_layout Description
14064 \begin_inset Flex Code
14067 \begin_layout Plain Layout
14074 \begin_inset Flex Code
14077 \begin_layout Plain Layout
14083 ] Name of a style that has replaced this style.
14084 This is used to rename a style, while keeping backward compatibility.
14087 \begin_layout Description
14088 \begin_inset Flex Code
14091 \begin_layout Plain Layout
14098 \begin_inset Flex Code
14101 \begin_layout Plain Layout
14108 \begin_inset space \thinspace{}
14112 \begin_inset Flex Code
14115 \begin_layout Plain Layout
14121 ] Determines whether consecutive pragraphs of the same type are treated
14122 as belonging together.
14123 This has the effect that the
14124 \begin_inset Flex Code
14127 \begin_layout Plain Layout
14133 is only printed once before such a group.
14134 By default, this is true for
14135 \begin_inset Flex Code
14138 \begin_layout Plain Layout
14145 \begin_inset Flex Code
14148 \begin_layout Plain Layout
14155 \begin_inset Flex Code
14158 \begin_layout Plain Layout
14164 and false for all other types.
14167 \begin_layout Description
14168 \begin_inset Flex Code
14171 \begin_layout Plain Layout
14178 \begin_inset Flex Code
14181 \begin_layout Plain Layout
14190 \begin_inset space \thinspace{}
14194 \begin_inset Flex Code
14197 \begin_layout Plain Layout
14203 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14205 but only by a line break; together with
14206 \begin_inset Flex Code
14209 \begin_layout Plain Layout
14215 , this allows to emulate a plain text editor (like the ERT inset).
14218 \begin_layout Description
14219 \begin_inset Flex Code
14222 \begin_layout Plain Layout
14229 \begin_inset Flex Code
14232 \begin_layout Plain Layout
14238 ] The indent of the very first line of a paragraph.
14240 \begin_inset Newline newline
14244 \begin_inset Flex Code
14247 \begin_layout Plain Layout
14253 will be fixed for a certain style.
14254 The exception is the default style, since the indentation for these paragraphs
14255 can be prohibited with
14256 \begin_inset Flex Code
14259 \begin_layout Plain Layout
14267 \begin_inset Flex Code
14270 \begin_layout Plain Layout
14276 style paragraphs inside environments use the
14277 \begin_inset Flex Code
14280 \begin_layout Plain Layout
14286 of the environment, not their native one.
14288 \begin_inset Flex Code
14291 \begin_layout Plain Layout
14297 paragraphs inside an enumeration are not indented.
14300 \begin_layout Description
14301 \begin_inset Flex Code
14304 \begin_layout Plain Layout
14311 \begin_inset Flex Code
14314 \begin_layout Plain Layout
14320 ] The vertical space between two paragraphs of this style.
14323 \begin_layout Description
14324 \begin_inset Flex Code
14327 \begin_layout Plain Layout
14334 \begin_inset Flex Code
14337 \begin_layout Plain Layout
14344 allows the user to choose either
14345 \begin_inset Quotes eld
14349 \begin_inset Quotes erd
14353 \begin_inset Quotes eld
14357 \begin_inset Quotes erd
14360 to separate paragraphs.
14362 \begin_inset Quotes eld
14366 \begin_inset Quotes erd
14370 \begin_inset Flex Code
14373 \begin_layout Plain Layout
14381 \begin_inset Quotes eld
14385 \begin_inset Quotes erd
14389 \begin_inset Flex Code
14392 \begin_layout Plain Layout
14398 is ignored and all paragraphs are separated by the
14399 \begin_inset Flex Code
14402 \begin_layout Plain Layout
14409 The vertical space is calculated with
14410 \begin_inset Flex Code
14413 \begin_layout Plain Layout
14415 \begin_inset space ~
14424 \begin_inset Flex Code
14427 \begin_layout Plain Layout
14433 is the height of a row with the normal font.
14434 This way, the look stays the same with different screen fonts.
14437 \begin_layout Description
14438 \begin_inset Flex Code
14441 \begin_layout Plain Layout
14448 \begin_inset Flex Code
14451 \begin_layout Plain Layout
14460 \begin_inset space \thinspace{}
14464 \begin_inset Flex Code
14467 \begin_layout Plain Layout
14473 ] Whether the contents of this paragraph should be output in raw form, meaning
14474 without special translations that \SpecialChar LaTeX
14478 \begin_layout Description
14479 \begin_inset Flex Code
14482 \begin_layout Plain Layout
14489 \begin_inset Flex Code
14492 \begin_layout Plain Layout
14502 Defines individual characters that should be output in raw form, meaning
14503 without special translations that \SpecialChar LaTeX
14507 \begin_layout Description
14508 \begin_inset Flex Code
14511 \begin_layout Plain Layout
14517 Information to be included in the \SpecialChar LaTeX
14518 preamble when this style is used.
14519 Used to define macros, load packages, etc., required by this particular
14522 \begin_inset Quotes eld
14526 \begin_inset Flex Code
14529 \begin_layout Plain Layout
14536 \begin_inset Quotes erd
14542 \begin_layout Description
14543 \begin_inset Flex Code
14546 \begin_layout Plain Layout
14553 \begin_inset Flex Code
14556 \begin_layout Plain Layout
14562 ] The prefix to use when creating labels referring to paragraphs of this
14564 This allows the use of formatted references.
14567 \begin_layout Description
14568 \begin_inset Flex Code
14571 \begin_layout Plain Layout
14578 \begin_inset Flex Code
14581 \begin_layout Plain Layout
14587 ] Whether the style requires the feature
14588 \begin_inset Flex Code
14591 \begin_layout Plain Layout
14598 \begin_inset CommandInset ref
14600 reference "chap:List-of-functions"
14604 for the list of features).
14605 If you require a package with specific options, you can additionally use
14607 \begin_inset Flex Code
14610 \begin_layout Plain Layout
14616 as a general text class parameter (see
14617 \begin_inset CommandInset ref
14619 reference "subsec:General-text-class"
14626 \begin_layout Description
14627 \begin_inset Flex Code
14630 \begin_layout Plain Layout
14637 \begin_inset Flex Code
14640 \begin_layout Plain Layout
14649 \begin_inset Flex Code
14652 \begin_layout Plain Layout
14658 ] Resets the \SpecialChar LaTeX
14659 arguments of this style (as defined via the
14660 \begin_inset Flex Code
14663 \begin_layout Plain Layout
14670 This is useful if you have copied a style via
14671 \begin_inset Flex Code
14674 \begin_layout Plain Layout
14680 , but you do not want to inherit its (required and optional) arguments.
14683 \begin_layout Description
14684 \begin_inset Flex Code
14687 \begin_layout Plain Layout
14694 \begin_inset Flex Code
14697 \begin_layout Plain Layout
14703 ] A string that is put at the end of the layout content.
14704 A line break in the output can be indicated by
14705 \begin_inset Flex Code
14708 \begin_layout Plain Layout
14717 \begin_layout Description
14718 \begin_inset Flex Code
14721 \begin_layout Plain Layout
14728 \begin_inset Flex Code
14731 \begin_layout Plain Layout
14738 \begin_inset Flex Code
14741 \begin_layout Plain Layout
14750 \begin_layout Description
14751 \begin_inset Flex Code
14754 \begin_layout Plain Layout
14761 \begin_inset Flex Code
14764 \begin_layout Plain Layout
14773 \begin_inset Flex Code
14776 \begin_layout Plain Layout
14783 \begin_inset Flex Code
14786 \begin_layout Plain Layout
14793 \begin_inset Flex Code
14796 \begin_layout Plain Layout
14798 \begin_inset space ~
14806 ] This defines what the default spacing should be in the style.
14808 \begin_inset Flex Code
14811 \begin_layout Plain Layout
14818 \begin_inset Flex Code
14821 \begin_layout Plain Layout
14828 \begin_inset Flex Code
14831 \begin_layout Plain Layout
14837 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14838 If you specify the argument
14839 \begin_inset Flex Code
14842 \begin_layout Plain Layout
14848 , then you must also provide a value argument which will be the actual multiplie
14850 Note that, contrary to other parameters,
14851 \begin_inset Flex Code
14854 \begin_layout Plain Layout
14860 implies the generation of specific \SpecialChar LaTeX
14861 code, using the \SpecialChar LaTeX
14865 \begin_inset Flex Code
14868 \begin_layout Plain Layout
14877 \begin_layout Description
14878 \begin_inset Flex Code
14881 \begin_layout Plain Layout
14888 \begin_inset Flex Code
14891 \begin_layout Plain Layout
14898 \begin_inset space \thinspace{}
14902 \begin_inset Flex Code
14905 \begin_layout Plain Layout
14913 ] Allow spell-checking paragraphs of this style.
14917 \begin_layout Description
14918 \begin_inset Flex Code
14921 \begin_layout Plain Layout
14927 The font used for the text body .
14929 \begin_inset CommandInset ref
14931 reference "subsec:Font-description"
14938 \begin_layout Description
14939 \begin_inset Flex Code
14942 \begin_layout Plain Layout
14951 \begin_inset Flex Code
14954 \begin_layout Plain Layout
14964 The level of the style in the table of contents.
14965 This is used for automatic numbering of section headings.
14968 \begin_layout Description
14969 \begin_inset Flex Code
14972 \begin_layout Plain Layout
14981 \begin_inset Flex Code
14984 \begin_layout Plain Layout
14995 \begin_inset Flex Code
14998 \begin_layout Plain Layout
15005 \begin_inset Flex Code
15008 \begin_layout Plain Layout
15014 ] This tag determines whether the first line indentation of this paragraph
15015 can be toggled via the Paragraph settings dialog.
15019 \begin_inset Flex Code
15022 \begin_layout Plain Layout
15032 is set, indentation can be toggled if the document settings use
15033 \begin_inset Quotes eld
15037 \begin_inset Quotes erd
15040 paragraph style, with
15041 \begin_inset Flex Code
15044 \begin_layout Plain Layout
15050 , indentation can always be toggled, notwithstanding the document settings,
15052 \begin_inset Flex Code
15055 \begin_layout Plain Layout
15061 , indentation can never be toggled.
15064 \begin_layout Description
15065 \begin_inset Flex Code
15068 \begin_layout Plain Layout
15075 \begin_inset Flex Code
15078 \begin_layout Plain Layout
15084 ] The vertical space with which the very first of a chain of paragraphs
15085 with this style is separated from the previous paragraph.
15086 If the previous paragraph has another style, the separations are not simply
15087 added, but the maximum is taken.
15090 \begin_layout Subsection
15091 \begin_inset CommandInset label
15097 Internationalization of Paragraph Styles
15100 \begin_layout Standard
15102 has long supported internationalization of layout information, but, until
15103 version 2.0, this applied only to the user interface and not to, say, PDF
15105 Thus, French authors were forced to resort to ugly hacks if they wanted
15110 1' instead of `Theorem 1'.
15111 Thanks to Georg Baum, that is no longer the case.
15114 \begin_layout Standard
15116 \begin_inset Flex Code
15119 \begin_layout Plain Layout
15125 defines text that is to appear in the typeset document, it may use
15126 \begin_inset Flex Code
15129 \begin_layout Plain Layout
15136 \begin_inset Flex Code
15139 \begin_layout Plain Layout
15145 to support non-English and even multi-language documents correctly.
15146 The following excerpt (from the
15147 \begin_inset Flex Code
15150 \begin_layout Plain Layout
15156 file) shows how this works:
15159 \begin_layout LyX-Code
15164 \begin_layout LyX-Code
15167 theoremstyle{remark}
15170 \begin_layout LyX-Code
15173 newtheorem{claim}[thm]{
15180 \begin_layout LyX-Code
15184 \begin_layout LyX-Code
15188 \begin_layout LyX-Code
15193 claimname}{_(Claim)}
15196 \begin_layout LyX-Code
15200 \begin_layout LyX-Code
15204 \begin_layout LyX-Code
15213 claimname}{_(Claim)}}
15216 \begin_layout LyX-Code
15221 \begin_layout Standard
15222 In principle, any legal \SpecialChar LaTeX
15224 \begin_inset Flex Code
15227 \begin_layout Plain Layout
15234 \begin_inset Flex Code
15237 \begin_layout Plain Layout
15243 tags, but in practice they will typically look as they do here.
15244 The key to correct translation of the typeset text is the definition of
15245 the \SpecialChar LaTeX
15247 \begin_inset Flex Code
15250 \begin_layout Plain Layout
15259 \begin_inset Flex Code
15262 \begin_layout Plain Layout
15274 \begin_layout Standard
15276 \begin_inset Flex Code
15279 \begin_layout Plain Layout
15285 tag provides for internationalization based upon the overall language of
15287 The contents of the tag will be included in the preamble, just as with
15289 \begin_inset Flex Code
15292 \begin_layout Plain Layout
15299 What makes it special is the use of the
15300 \begin_inset Quotes eld
15304 \begin_inset Quotes erd
15308 \begin_inset Flex Code
15311 \begin_layout Plain Layout
15317 , which will be replaced, when \SpecialChar LyX
15318 produces \SpecialChar LaTeX
15319 output, with the translation of
15320 its argument into the document language.
15323 \begin_layout Standard
15325 \begin_inset Flex Code
15328 \begin_layout Plain Layout
15334 tag is more complex, since it is meant to provide support for multi-language
15335 documents and so offers an interface to the
15336 \begin_inset Flex Code
15339 \begin_layout Plain Layout
15346 Its contents will be added to the preamble once for each language that
15347 appears in the document.
15348 In this case, the argument to
15349 \begin_inset Flex Code
15352 \begin_layout Plain Layout
15358 will be replaced with its translation into the language in question; the
15360 \begin_inset Flex Code
15363 \begin_layout Plain Layout
15369 is replaced by the language name (as used by the babel package).
15372 \begin_layout Standard
15373 A German document that also included a French section would thus have the
15374 following in the preamble:
15377 \begin_layout LyX-Code
15386 claimname}{Affirmation}}
15387 \begin_inset Newline newline
15398 claimname}{Behauptung}}
15399 \begin_inset Newline newline
15406 claimname}{Behauptung}
15409 \begin_layout Standard
15412 \begin_inset Flex Code
15415 \begin_layout Plain Layout
15421 will then conspire to produce the correct text in the output.
15424 \begin_layout Standard
15425 One important point to note here is that the translations are provided by
15427 itself, through the file
15428 \begin_inset Flex Code
15431 \begin_layout Plain Layout
15438 This means, in effect, that
15439 \begin_inset Flex Code
15442 \begin_layout Plain Layout
15449 \begin_inset Flex Code
15452 \begin_layout Plain Layout
15458 are really only of use in layout files that are provided with \SpecialChar LyX
15460 entered in user-created layout files will not be seen by \SpecialChar LyX
15461 's internationalizatio
15462 n routines unless the
15463 \begin_inset Flex Code
15466 \begin_layout Plain Layout
15472 file is modified accordingly.
15473 That said, however, any layout created with the intention that it will
15474 be included with \SpecialChar LyX
15475 should use these tags where appropriate.
15476 Please note that the paragraph style translations provided by \SpecialChar LyX
15478 change with a minor update (e.
15479 \begin_inset space \thinspace{}
15483 \begin_inset space \space{}
15486 from version 2.1.x to 2.1.y).
15487 It is however quite likely that a major update (e.
15488 \begin_inset space \thinspace{}
15492 \begin_inset space \space{}
15495 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15498 \begin_layout Subsection
15500 \begin_inset CommandInset label
15502 name "subsec:Floats"
15509 \begin_layout Standard
15510 It is necessary to define the floats (
15511 \begin_inset Flex Noun
15514 \begin_layout Plain Layout
15521 \begin_inset Flex Noun
15524 \begin_layout Plain Layout
15530 , \SpecialChar ldots
15531 ) in the text class itself.
15532 Standard floats are included in the file
15533 \begin_inset Flex Code
15536 \begin_layout Plain Layout
15542 , so you may have to do no more than add
15545 \begin_layout LyX-Code
15546 Input stdfloats.inc
15549 \begin_layout Standard
15550 to your layout file.
15551 If you want to implement a text class that proposes some other float types
15552 (like the AGU class bundled with \SpecialChar LyX
15553 ), the information below will hopefully
15557 \begin_layout Description
15558 \begin_inset Flex Code
15561 \begin_layout Plain Layout
15568 \begin_inset Flex Code
15571 \begin_layout Plain Layout
15577 =!htbpH] Allowed placement options for this float type.
15578 The value is a string of placement characters.
15579 Possible characters include:
15584 \begin_inset Quotes eld
15588 \begin_inset Quotes erd
15596 \begin_inset Quotes eld
15600 \begin_inset Quotes erd
15608 \begin_inset Quotes eld
15612 \begin_inset Quotes erd
15620 \begin_inset Quotes eld
15624 \begin_inset Quotes erd
15632 \begin_inset Quotes eld
15636 \begin_inset Quotes erd
15644 \begin_inset Quotes eld
15648 \begin_inset Quotes erd
15652 The order of the characters in the string does not matter.
15653 If no placement options are allowed, use the string
15660 \begin_layout Description
15661 \begin_inset Flex Code
15664 \begin_layout Plain Layout
15671 \begin_inset Flex Code
15674 \begin_layout Plain Layout
15683 \begin_inset space \thinspace{}
15689 \begin_inset Flex Code
15692 \begin_layout Plain Layout
15702 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15709 \begin_inset Flex Code
15712 \begin_layout Plain Layout
15718 if the float does not support this feature.
15721 \begin_layout Description
15722 \begin_inset Flex Code
15725 \begin_layout Plain Layout
15732 \begin_inset Flex Code
15735 \begin_layout Plain Layout
15744 \begin_inset space \thinspace{}
15750 \begin_inset Flex Code
15753 \begin_layout Plain Layout
15763 ] Defines whether the float has a starred variant that spans columns in
15764 a two column paragraph.
15766 \begin_inset Flex Code
15769 \begin_layout Plain Layout
15775 if the float does not support this feature.
15778 \begin_layout Description
15779 \begin_inset Flex Code
15782 \begin_layout Plain Layout
15789 \begin_inset Flex Code
15792 \begin_layout Plain Layout
15799 \begin_inset Quotes erd
15803 \begin_inset Quotes erd
15806 ] The file name extension of an auxiliary file for the list of figures (or
15809 writes the captions to this file.
15812 \begin_layout Description
15813 \begin_inset Flex Code
15816 \begin_layout Plain Layout
15823 \begin_inset Flex Code
15826 \begin_layout Plain Layout
15833 \begin_inset Quotes erd
15837 \begin_inset Quotes erd
15840 ] The string that will be used in the menus and also for the caption.
15841 This is translated to the current language if babel is used.
15844 \begin_layout Description
15845 \begin_inset Flex Code
15848 \begin_layout Plain Layout
15854 These tags control the XHTML output.
15856 \begin_inset CommandInset ref
15858 reference "sec:Tags-for-XHTML"
15865 \begin_layout Description
15866 \begin_inset Flex Code
15869 \begin_layout Plain Layout
15878 \begin_inset Flex Code
15881 \begin_layout Plain Layout
15890 \begin_inset space \thinspace{}
15894 \begin_inset Flex Code
15897 \begin_layout Plain Layout
15903 ] Indicates whether the float is already defined in the document class or
15904 if instead the \SpecialChar LaTeX
15906 \begin_inset Flex Code
15909 \begin_layout Plain Layout
15915 needs to be loaded to define it on-the-fly.
15917 \begin_inset Flex Code
15920 \begin_layout Plain Layout
15927 \begin_inset Flex Code
15930 \begin_layout Plain Layout
15937 It should be set to
15938 \begin_inset Flex Code
15941 \begin_layout Plain Layout
15947 if the float is already defined by the \SpecialChar LaTeX
15951 \begin_layout Description
15952 \begin_inset Flex Code
15955 \begin_layout Plain Layout
15962 \begin_inset Flex Code
15965 \begin_layout Plain Layout
15972 \begin_inset Quotes erd
15976 \begin_inset Quotes erd
15979 ] The command used to generate a list of floats of this type; the leading
15988 \begin_inset Flex Code
15991 \begin_layout Plain Layout
15997 is false, since there is no standard way to generate this command.
15999 \begin_inset Flex Code
16002 \begin_layout Plain Layout
16008 is true, since in that case there is a standard way to define the command.
16011 \begin_layout Description
16012 \begin_inset Flex Code
16015 \begin_layout Plain Layout
16022 \begin_inset Flex Code
16025 \begin_layout Plain Layout
16032 \begin_inset Quotes erd
16036 \begin_inset Quotes erd
16039 ] A title for a list of floats of this kind (list of figures, tables, or
16041 It is used for the screen label within \SpecialChar LyX
16042 , it is used by \SpecialChar LaTeX
16044 it is used as the title in the XHTML output.
16045 It will be translated to the document language.
16048 \begin_layout Description
16049 \begin_inset Flex Code
16052 \begin_layout Plain Layout
16059 \begin_inset Flex Code
16062 \begin_layout Plain Layout
16069 \begin_inset Quotes erd
16073 \begin_inset Quotes erd
16076 ] This (optional) argument determines whether floats of this class will
16077 be numbered within some sectional unit of the document.
16079 \begin_inset Flex Code
16082 \begin_layout Plain Layout
16089 \begin_inset Quotes eld
16093 \begin_inset Flex Code
16096 \begin_layout Plain Layout
16103 \begin_inset Quotes erd
16106 , the floats will be numbered within chapters.
16110 \begin_layout Description
16111 \begin_inset Flex Code
16114 \begin_layout Plain Layout
16121 \begin_inset Flex Code
16124 \begin_layout Plain Layout
16131 \begin_inset Quotes erd
16135 \begin_inset Quotes erd
16138 ] The default placement for the given class of floats.
16139 The string should be as in standard \SpecialChar LaTeX
16141 \begin_inset Flex Code
16144 \begin_layout Plain Layout
16151 \begin_inset Flex Code
16154 \begin_layout Plain Layout
16161 \begin_inset Flex Code
16164 \begin_layout Plain Layout
16171 \begin_inset Flex Code
16174 \begin_layout Plain Layout
16180 for top, bottom, page, and here, respectively.
16184 \begin_layout Plain Layout
16185 Note that the order of these letters in the string is irrelevant, like in
16192 On top of that there is a new type,
16193 \begin_inset Flex Code
16196 \begin_layout Plain Layout
16202 , which does not really correspond to a float, since it means: put it
16203 \begin_inset Quotes eld
16207 \begin_inset Quotes erd
16211 Note however that the
16212 \begin_inset Flex Code
16215 \begin_layout Plain Layout
16221 specifier is special and, because of implementation details, cannot be
16222 used in non-built in float types.
16223 If you do not understand what this means, just use
16224 \begin_inset Quotes eld
16228 \begin_inset Flex Code
16231 \begin_layout Plain Layout
16238 \begin_inset Quotes erd
16244 \begin_layout Description
16245 \begin_inset Flex Code
16248 \begin_layout Plain Layout
16255 \begin_inset Flex Code
16258 \begin_layout Plain Layout
16264 ] The prefix to use when creating labels referring to floats of this type.
16265 This allows the use of formatted references.
16266 Note that you can remove any
16267 \begin_inset Flex Code
16270 \begin_layout Plain Layout
16276 set by a copied style by using the special value
16277 \begin_inset Quotes eld
16281 \begin_inset Quotes erd
16284 , which must be all caps.
16287 \begin_layout Description
16288 \begin_inset Flex Code
16291 \begin_layout Plain Layout
16298 \begin_inset Flex Code
16301 \begin_layout Plain Layout
16308 \begin_inset Quotes erd
16312 \begin_inset Quotes erd
16315 ] The style used when defining the float using
16316 \begin_inset Flex Code
16319 \begin_layout Plain Layout
16330 \begin_layout Description
16331 \begin_inset Flex Code
16334 \begin_layout Plain Layout
16341 \begin_inset Flex Code
16344 \begin_layout Plain Layout
16351 \begin_inset Quotes erd
16355 \begin_inset Quotes erd
16359 \begin_inset Quotes eld
16363 \begin_inset Quotes erd
16366 of the new class of floats, like program or algorithm.
16367 After the appropriate
16368 \begin_inset Flex Code
16371 \begin_layout Plain Layout
16380 \begin_inset Flex Code
16383 \begin_layout Plain Layout
16392 \begin_inset Flex Code
16395 \begin_layout Plain Layout
16406 \begin_layout Description
16407 \begin_inset Flex Code
16410 \begin_layout Plain Layout
16417 \begin_inset Flex Code
16420 \begin_layout Plain Layout
16427 \begin_inset space \thinspace{}
16431 \begin_inset Flex Code
16434 \begin_layout Plain Layout
16442 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16444 \begin_inset Flex Code
16447 \begin_layout Plain Layout
16453 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16457 \begin_layout Standard
16458 Note that defining a float with type
16459 \begin_inset Flex Code
16462 \begin_layout Plain Layout
16470 automatically defines the corresponding counter with name
16471 \begin_inset Flex Code
16474 \begin_layout Plain Layout
16485 \begin_layout Subsection
16486 Flex insets and InsetLayout
16487 \begin_inset CommandInset label
16489 name "subsec:Flex-insets-and"
16496 \begin_layout Standard
16497 Flex insets come in three different kinds:
16500 \begin_layout Itemize
16502 \begin_inset Flex Code
16505 \begin_layout Plain Layout
16511 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16513 \begin_inset Flex Code
16516 \begin_layout Plain Layout
16525 \begin_inset Flex Code
16528 \begin_layout Plain Layout
16539 \begin_layout Itemize
16541 \begin_inset Flex Code
16544 \begin_layout Plain Layout
16550 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16552 footnote, and the like.
16553 An obvious example is an endnote inset, which is defined in the
16554 \begin_inset Flex Code
16557 \begin_layout Plain Layout
16566 \begin_layout Itemize
16568 \begin_inset Flex Code
16571 \begin_layout Plain Layout
16577 ): For use with DocBook classes.
16580 \begin_layout Standard
16581 Flex insets are defined using the
16582 \begin_inset Flex Code
16585 \begin_layout Plain Layout
16591 tag, which shall be explained in a moment.
16594 \begin_layout Standard
16596 \begin_inset Flex Code
16599 \begin_layout Plain Layout
16605 tag also serves another function: It can be used to customize the general
16606 layout of many different types of insets.
16608 \begin_inset Flex Code
16611 \begin_layout Plain Layout
16617 can be used to customize the layout parameters for footnotes, marginal
16618 notes, note insets, \SpecialChar TeX
16619 code (ERT) insets, branches, listings, indexes, boxes,
16620 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16623 \begin_layout Standard
16625 \begin_inset Flex Code
16628 \begin_layout Plain Layout
16634 definition must begin with a line of the form:
16637 \begin_layout LyX-Code
16641 \begin_layout Standard
16643 \begin_inset Flex Code
16646 \begin_layout Plain Layout
16652 indicates the inset whose layout is being defined, and here there are four
16656 \begin_layout Enumerate
16657 The layout for a pre-existing inset is being modified.
16658 In this case, can be
16659 \begin_inset Flex Code
16662 \begin_layout Plain Layout
16668 any one of the following:
16669 \begin_inset Flex Code
16672 \begin_layout Plain Layout
16679 \begin_inset Flex Code
16682 \begin_layout Plain Layout
16689 \begin_inset Flex Code
16692 \begin_layout Plain Layout
16699 \begin_inset Flex Code
16702 \begin_layout Plain Layout
16709 \begin_inset Flex Code
16712 \begin_layout Plain Layout
16719 \begin_inset Flex Code
16722 \begin_layout Plain Layout
16729 \begin_inset Flex Code
16732 \begin_layout Plain Layout
16739 \begin_inset Flex Code
16742 \begin_layout Plain Layout
16749 \begin_inset Flex Code
16752 \begin_layout Plain Layout
16759 \begin_inset Flex Code
16762 \begin_layout Plain Layout
16769 \begin_inset Flex Code
16772 \begin_layout Plain Layout
16779 \begin_inset Flex Code
16782 \begin_layout Plain Layout
16789 \begin_inset Flex Code
16792 \begin_layout Plain Layout
16799 \begin_inset Flex Code
16802 \begin_layout Plain Layout
16809 \begin_inset Flex Code
16812 \begin_layout Plain Layout
16819 \begin_inset Flex Code
16822 \begin_layout Plain Layout
16829 \begin_inset Flex Code
16832 \begin_layout Plain Layout
16839 \begin_inset Flex Code
16842 \begin_layout Plain Layout
16849 \begin_inset Flex Code
16852 \begin_layout Plain Layout
16859 \begin_inset Flex Code
16862 \begin_layout Plain Layout
16871 \begin_layout Enumerate
16872 The layout for a Flex inset is being defined.
16874 \begin_inset Flex Code
16877 \begin_layout Plain Layout
16883 must be of the form
16884 \begin_inset Quotes eld
16888 \begin_inset Flex Code
16891 \begin_layout Plain Layout
16898 \begin_inset Quotes erd
16902 \begin_inset Flex Code
16905 \begin_layout Plain Layout
16911 may be be any valid identifier not used by a pre-existing Flex inset.
16912 The identifier may include spaces, but in that case the whole thing must
16913 be wrapped in quotes.
16914 Note that the definition of a flex inset
16919 \begin_inset Flex Code
16922 \begin_layout Plain Layout
16928 entry, declaring which type of inset it defines.
16931 \begin_layout Enumerate
16932 The layout for user specific branch is being defined.
16934 \begin_inset Flex Code
16937 \begin_layout Plain Layout
16943 must be of the form
16944 \begin_inset Quotes eld
16948 \begin_inset Flex Code
16951 \begin_layout Plain Layout
16958 \begin_inset Quotes erd
16962 \begin_inset Flex Code
16965 \begin_layout Plain Layout
16971 may be be any valid identifier of branch defined in user's document.
16972 The identifier may include spaces, but in that case the whole thing must
16973 be wrapped in quotes.
16974 The main purpose of this feature is to allow \SpecialChar LaTeX
16975 wrapping around specific
16976 branches as user needs.
16979 \begin_layout Enumerate
16980 The layout of a user (or class) specific caption is being defined.
16982 \begin_inset Flex Code
16985 \begin_layout Plain Layout
16991 must be of the form
16992 \begin_inset Quotes eld
16996 \begin_inset Flex Code
16999 \begin_layout Plain Layout
17006 \begin_inset Quotes erd
17010 \begin_inset Flex Code
17013 \begin_layout Plain Layout
17019 specifies the name of the caption as it appears in the menu.
17020 Have a look at the standard caption (
17021 \begin_inset Flex Code
17024 \begin_layout Plain Layout
17030 ), the specific captions of the KOMA-Script classes (
17031 \begin_inset Flex Code
17034 \begin_layout Plain Layout
17041 \begin_inset Flex Code
17044 \begin_layout Plain Layout
17053 \begin_inset space ~
17059 \begin_inset Flex Code
17062 \begin_layout Plain Layout
17068 ) for applications.
17071 \begin_layout Standard
17073 \begin_inset Flex Code
17076 \begin_layout Plain Layout
17082 definition can contain the following entries:
17085 \begin_layout Description
17086 \begin_inset Flex Code
17089 \begin_layout Plain Layout
17096 \begin_inset Flex Code
17099 \begin_layout Plain Layout
17105 ] Defines argument number of a command\SpecialChar breakableslash
17106 environment associated with the current
17108 The definition must end with
17109 \begin_inset Flex Code
17112 \begin_layout Plain Layout
17120 \begin_inset CommandInset ref
17122 reference "subsec:Paragraph-Styles"
17129 \begin_layout Description
17130 \begin_inset Flex Code
17133 \begin_layout Plain Layout
17139 Preamble for changing language commands; see
17140 \begin_inset CommandInset ref
17142 reference "subsec:I18n"
17149 \begin_layout Description
17150 \begin_inset Flex Code
17153 \begin_layout Plain Layout
17160 \begin_inset Flex Code
17163 \begin_layout Plain Layout
17169 ] The color for the inset's background.
17171 \begin_inset CommandInset ref
17173 reference "chap:Names-of-colors"
17177 for a list of the available color names.
17180 \begin_layout Description
17181 \begin_inset Flex Code
17184 \begin_layout Plain Layout
17191 \begin_inset Flex Code
17194 \begin_layout Plain Layout
17203 \begin_inset space \thinspace{}
17207 \begin_inset Flex Code
17210 \begin_layout Plain Layout
17216 ] Whether to use the content of the inset as the label, when the inset is
17221 \begin_layout Description
17222 \begin_inset Flex Code
17225 \begin_layout Plain Layout
17232 \begin_inset Flex Code
17235 \begin_layout Plain Layout
17241 ] As with paragraph styles, see
17242 \begin_inset CommandInset ref
17244 reference "subsec:Paragraph-Styles"
17249 Note that you need to specify the complete type, e.
17250 \begin_inset space \thinspace{}
17254 \begin_inset space ~
17258 \begin_inset Flex Code
17261 \begin_layout Plain Layout
17262 CopyStyle Flex:<name>
17270 \begin_layout Description
17271 \begin_inset Flex Code
17274 \begin_layout Plain Layout
17281 \begin_inset Flex Code
17284 \begin_layout Plain Layout
17293 \begin_inset space \thinspace{}
17297 \begin_inset Flex Code
17300 \begin_layout Plain Layout
17306 ] Indicates whether the user may employ the Paragraph Settings dialog to
17307 customize the paragraph.
17310 \begin_layout Description
17311 \begin_inset Flex Code
17314 \begin_layout Plain Layout
17321 \begin_inset Flex Code
17324 \begin_layout Plain Layout
17331 \begin_inset Flex Code
17334 \begin_layout Plain Layout
17341 \begin_inset Flex Code
17344 \begin_layout Plain Layout
17350 , describing the rendering style used for the inset's frame and buttons.
17351 Footnotes generally use
17352 \begin_inset Flex Code
17355 \begin_layout Plain Layout
17361 , ERT insets generally
17362 \begin_inset Flex Code
17365 \begin_layout Plain Layout
17371 , and character styles
17372 \begin_inset Flex Code
17375 \begin_layout Plain Layout
17384 \begin_layout Description
17385 \begin_inset Flex Code
17388 \begin_layout Plain Layout
17395 \begin_inset Flex Code
17398 \begin_layout Plain Layout
17407 \begin_inset space \thinspace{}
17413 \begin_inset Flex Code
17416 \begin_layout Plain Layout
17425 \begin_inset Flex Code
17428 \begin_layout Plain Layout
17435 \begin_inset Flex Code
17438 \begin_layout Plain Layout
17445 Indicates whether the environment will stand on its own in the output or
17446 will appear inline with the surrounding text.
17447 If set to false, it is supposed that the \SpecialChar LaTeX
17448 environment ignores white space
17449 (including one newline character) after the
17450 \begin_inset Flex Code
17453 \begin_layout Plain Layout
17466 \begin_inset Flex Code
17469 \begin_layout Plain Layout
17485 \begin_layout Description
17486 \begin_inset Flex Code
17489 \begin_layout Plain Layout
17495 Required at the end of the
17496 \begin_inset Flex Code
17499 \begin_layout Plain Layout
17508 \begin_layout Description
17509 \begin_inset Flex Code
17512 \begin_layout Plain Layout
17518 The font used for both the text body
17524 \begin_inset CommandInset ref
17526 reference "subsec:Font-description"
17531 Note that defining this font automatically defines the
17532 \begin_inset Flex Code
17535 \begin_layout Plain Layout
17541 to the same value, so define this first and define
17542 \begin_inset Flex Code
17545 \begin_layout Plain Layout
17551 later if you want them to be different.
17554 \begin_layout Description
17555 \begin_inset Flex Code
17558 \begin_layout Plain Layout
17559 FixedWidthPreambleEncoding
17565 \begin_inset Flex Code
17568 \begin_layout Plain Layout
17577 \begin_inset space \thinspace{}
17581 \begin_inset Flex Code
17584 \begin_layout Plain Layout
17590 ] Force a fixed width encoding for the translated contents of
17591 \begin_inset Flex Code
17594 \begin_layout Plain Layout
17601 \begin_inset Flex Code
17604 \begin_layout Plain Layout
17610 code generated by this layout.
17611 This is needed for special \SpecialChar LaTeX
17616 that do not work with variable width encodings such as
17621 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17622 backends such as Xe\SpecialChar TeX
17624 Lua\SpecialChar TeX
17628 \begin_layout Description
17629 \begin_inset Flex Code
17632 \begin_layout Plain Layout
17633 ForceLocalFontSwitch
17639 \begin_inset Flex Code
17642 \begin_layout Plain Layout
17651 \begin_inset space \thinspace{}
17655 \begin_inset Flex Code
17658 \begin_layout Plain Layout
17664 ] When using babel, always use a local font switch (
17665 \begin_inset Flex Code
17668 \begin_layout Plain Layout
17676 ), never a global one (such as
17677 \begin_inset Flex Code
17680 \begin_layout Plain Layout
17691 \begin_layout Description
17692 \begin_inset Flex Code
17695 \begin_layout Plain Layout
17702 \begin_inset Flex Code
17705 \begin_layout Plain Layout
17714 \begin_inset space \thinspace{}
17718 \begin_inset Flex Code
17721 \begin_layout Plain Layout
17728 \begin_inset Quotes eld
17732 \begin_inset Quotes erd
17735 language, leading to Left-to-Right (Latin) output, e.
17736 \begin_inset space \thinspace{}
17740 \begin_inset space \space{}
17743 in \SpecialChar TeX
17748 \begin_layout Description
17749 \begin_inset Flex Code
17752 \begin_layout Plain Layout
17759 \begin_inset Flex Code
17762 \begin_layout Plain Layout
17771 \begin_inset space \thinspace{}
17775 \begin_inset Flex Code
17778 \begin_layout Plain Layout
17784 ] Force a a line break in the \SpecialChar LaTeX
17785 output before the inset starts and after
17787 This assures the inset itself is output on its own lines, for parsing purposes.
17790 \begin_layout Description
17791 \begin_inset Flex Code
17794 \begin_layout Plain Layout
17801 \begin_inset Flex Code
17804 \begin_layout Plain Layout
17813 \begin_inset space \thinspace{}
17817 \begin_inset Flex Code
17820 \begin_layout Plain Layout
17826 ] Indicates whether the
17827 \begin_inset Flex Code
17830 \begin_layout Plain Layout
17836 should be used or, instead, the user can change the paragraph style used
17841 \begin_layout Description
17842 \begin_inset Flex Code
17845 \begin_layout Plain Layout
17852 \begin_inset Flex Code
17855 \begin_layout Plain Layout
17864 \begin_inset space \thinspace{}
17868 \begin_inset Flex Code
17871 \begin_layout Plain Layout
17877 ] As with paragraph styles, see
17878 \begin_inset CommandInset ref
17880 reference "subsec:Paragraph-Styles"
17887 \begin_layout Description
17888 \begin_inset Flex Code
17891 \begin_layout Plain Layout
17897 These tags control the XHTML output.
17899 \begin_inset CommandInset ref
17901 reference "sec:Tags-for-XHTML"
17908 \begin_layout Description
17909 \begin_inset Flex Code
17912 \begin_layout Plain Layout
17919 \begin_inset Flex Code
17922 \begin_layout Plain Layout
17931 \begin_inset space \thinspace{}
17935 \begin_inset Flex Code
17938 \begin_layout Plain Layout
17944 ] Whether to include the contents of this inset in the strings generated
17945 for the `Outline' pane.
17946 One would not, for example, want the content of a footnote in a section
17947 header to be included in the TOC displayed in the outline, but one would
17948 normally want the content of a character style displayed.
17949 Default is false: not to include.
17952 \begin_layout Description
17953 \begin_inset Flex Code
17956 \begin_layout Plain Layout
17965 \begin_inset Flex Code
17968 \begin_layout Plain Layout
17977 \begin_inset space \thinspace{}
17981 \begin_inset Flex Code
17984 \begin_layout Plain Layout
17990 ] As with paragraph styles, see
17991 \begin_inset CommandInset ref
17993 reference "subsec:Paragraph-Styles"
18000 \begin_layout Description
18001 \begin_inset Flex Code
18004 \begin_layout Plain Layout
18010 The font used for the label.
18012 \begin_inset CommandInset ref
18014 reference "subsec:Font-description"
18019 Note that this definition can never appear before
18020 \begin_inset Flex Code
18023 \begin_layout Plain Layout
18029 , lest it be ineffective.
18032 \begin_layout Description
18033 \begin_inset Flex Code
18036 \begin_layout Plain Layout
18043 \begin_inset Flex Code
18046 \begin_layout Plain Layout
18053 \begin_inset Quotes erd
18057 \begin_inset Quotes erd
18060 ] What will be displayed on the button or elsewhere as the inset label.
18062 \begin_inset Flex Code
18065 \begin_layout Plain Layout
18073 \begin_inset Flex Code
18076 \begin_layout Plain Layout
18082 ) modify this label on the fly.
18085 \begin_layout Description
18086 \begin_inset Flex Code
18089 \begin_layout Plain Layout
18095 Language dependent preamble; see
18096 \begin_inset CommandInset ref
18098 reference "subsec:I18n"
18105 \begin_layout Description
18106 \begin_inset Flex Code
18109 \begin_layout Plain Layout
18116 \begin_inset Flex Code
18119 \begin_layout Plain Layout
18125 ] The name of the corresponding \SpecialChar LaTeX
18127 Either the environment or command name.
18130 \begin_layout Description
18131 \begin_inset Flex Code
18134 \begin_layout Plain Layout
18141 \begin_inset Flex Code
18144 \begin_layout Plain Layout
18150 ] The optional parameter for the corresponding
18151 \begin_inset Flex Code
18154 \begin_layout Plain Layout
18160 stuff, including possible bracket pairs like
18161 \begin_inset Flex Code
18164 \begin_layout Plain Layout
18171 This parameter cannot be changed from within \SpecialChar LyX
18173 \begin_inset Flex Code
18176 \begin_layout Plain Layout
18182 for customizable parameters).
18183 It will be output as is after all \SpecialChar LaTeX
18185 \begin_inset Flex Code
18188 \begin_layout Plain Layout
18197 \begin_layout Description
18198 \begin_inset Flex Code
18201 \begin_layout Plain Layout
18208 \begin_inset Flex Code
18211 \begin_layout Plain Layout
18212 Command, Environment, None
18217 ] How the style should be translated into \SpecialChar LaTeX
18222 \begin_layout Plain Layout
18223 \begin_inset Flex Code
18226 \begin_layout Plain Layout
18232 is perhaps a bit misleading, since these rules apply to SGML classes too.
18233 Visit the SGML class files for specific examples.
18242 \begin_layout Description
18243 \begin_inset Flex Code
18246 \begin_layout Plain Layout
18252 means nothing special
18255 \begin_layout Description
18256 \begin_inset Flex Code
18259 \begin_layout Plain Layout
18266 \begin_inset Flex Code
18269 \begin_layout Plain Layout
18276 {\SpecialChar ldots
18285 \begin_layout Description
18286 \begin_inset Flex Code
18289 \begin_layout Plain Layout
18296 \begin_inset Flex Code
18299 \begin_layout Plain Layout
18306 }\SpecialChar ldots
18321 \begin_layout Standard
18322 Putting the last few things together, the \SpecialChar LaTeX
18323 output will be either:
18326 \begin_layout LyX-Code
18329 LatexName[LatexParam]{\SpecialChar ldots
18333 \begin_layout Standard
18337 \begin_layout LyX-Code
18340 begin{LatexName}[LatexParam] \SpecialChar ldots
18346 \begin_layout Standard
18347 depending upon the \SpecialChar LaTeX
18352 \begin_layout Description
18353 \begin_inset Flex Code
18356 \begin_layout Plain Layout
18363 \begin_inset Flex Code
18366 \begin_layout Plain Layout
18372 ] A string that is put at the beginning of the layout content.
18373 A line break in the output can be indicated by
18374 \begin_inset Flex Code
18377 \begin_layout Plain Layout
18386 \begin_layout Description
18387 \begin_inset Flex Code
18390 \begin_layout Plain Layout
18397 \begin_inset Flex Code
18400 \begin_layout Plain Layout
18407 \begin_inset Flex Code
18410 \begin_layout Plain Layout
18417 \begin_inset Flex Code
18420 \begin_layout Plain Layout
18427 \begin_inset Flex Code
18430 \begin_layout Plain Layout
18436 (indicating a dummy definition ending definitions of charstyles, etc).
18437 This entry is required in and is only meaningful for Flex insets.
18438 Among other things, it determines on which menu this inset will appear.
18440 \begin_inset Flex Code
18443 \begin_layout Plain Layout
18450 \begin_inset Flex Code
18453 \begin_layout Plain Layout
18459 will automatically set
18460 \begin_inset Flex Code
18463 \begin_layout Plain Layout
18470 \begin_inset Flex Code
18473 \begin_layout Plain Layout
18481 \begin_inset Flex Code
18484 \begin_layout Plain Layout
18490 can be set to true, or
18491 \begin_inset Flex Code
18494 \begin_layout Plain Layout
18501 \begin_inset Flex Code
18504 \begin_layout Plain Layout
18510 insets by setting it
18515 \begin_inset Flex Code
18518 \begin_layout Plain Layout
18527 \begin_layout Description
18528 \begin_inset Flex Code
18531 \begin_layout Plain Layout
18538 \begin_inset Flex Code
18541 \begin_layout Plain Layout
18550 \begin_inset space \thinspace{}
18554 \begin_inset Flex Code
18557 \begin_layout Plain Layout
18563 ] Whether multiple paragraphs are permitted in this inset.
18565 \begin_inset Flex Code
18568 \begin_layout Plain Layout
18574 to the same value and
18575 \begin_inset Flex Code
18578 \begin_layout Plain Layout
18584 to the opposite value.
18585 These can be reset to other values, if they are used
18590 \begin_inset Flex Code
18593 \begin_layout Plain Layout
18603 \begin_layout Description
18604 \begin_inset Flex Code
18607 \begin_layout Plain Layout
18614 \begin_inset Flex Code
18617 \begin_layout Plain Layout
18626 \begin_inset space \thinspace{}
18630 \begin_inset Flex Code
18633 \begin_layout Plain Layout
18639 ] Whether fragile commands in this inset should be
18640 \begin_inset Flex Code
18643 \begin_layout Plain Layout
18656 whether the command should itself be protected.) Default is false.
18659 \begin_layout Description
18660 \begin_inset Flex Code
18663 \begin_layout Plain Layout
18670 \begin_inset Flex Code
18673 \begin_layout Plain Layout
18679 ] Deletes an existing
18680 \begin_inset Flex Code
18683 \begin_layout Plain Layout
18692 \begin_layout Description
18693 \begin_inset Flex Code
18696 \begin_layout Plain Layout
18703 \begin_inset Flex Code
18706 \begin_layout Plain Layout
18713 \begin_inset Flex Code
18716 \begin_layout Plain Layout
18722 that has replaced this
18723 \begin_inset Flex Code
18726 \begin_layout Plain Layout
18733 This is used to rename an
18734 \begin_inset Flex Code
18737 \begin_layout Plain Layout
18743 , while keeping backward compatibility.
18746 \begin_layout Description
18747 \begin_inset Flex Code
18750 \begin_layout Plain Layout
18757 \begin_inset Flex Code
18760 \begin_layout Plain Layout
18769 \begin_inset space \thinspace{}
18773 \begin_inset Flex Code
18776 \begin_layout Plain Layout
18782 ] As with paragraph styles, see
18783 \begin_inset CommandInset ref
18785 reference "subsec:Paragraph-Styles"
18793 \begin_layout Description
18794 \begin_inset Flex Code
18797 \begin_layout Plain Layout
18804 \begin_inset Flex Code
18807 \begin_layout Plain Layout
18816 \begin_inset space \thinspace{}
18820 \begin_inset Flex Code
18823 \begin_layout Plain Layout
18829 ] As with paragraph styles, see
18830 \begin_inset CommandInset ref
18832 reference "subsec:Paragraph-Styles"
18840 \begin_layout Description
18841 \begin_inset Flex Code
18844 \begin_layout Plain Layout
18850 As with paragraph styles, see
18851 \begin_inset CommandInset ref
18853 reference "subsec:Paragraph-Styles"
18860 \begin_layout Description
18861 \begin_inset Flex Code
18864 \begin_layout Plain Layout
18871 \begin_inset Flex Code
18874 \begin_layout Plain Layout
18880 ] The prefix to use when creating labels referring to insets of this type.
18881 This allows the use of formatted references.
18884 \begin_layout Description
18885 \begin_inset Flex Code
18888 \begin_layout Plain Layout
18895 \begin_inset Flex Code
18898 \begin_layout Plain Layout
18904 ] As with paragraph styles, see
18905 \begin_inset CommandInset ref
18907 reference "subsec:Paragraph-Styles"
18914 \begin_layout Description
18915 \begin_inset Flex Code
18918 \begin_layout Plain Layout
18925 \begin_inset Flex Code
18928 \begin_layout Plain Layout
18937 \begin_inset space \thinspace{}
18941 \begin_inset Flex Code
18944 \begin_layout Plain Layout
18950 ] Resets the \SpecialChar LaTeX
18951 arguments of this layout (as defined via the
18952 \begin_inset Flex Code
18955 \begin_layout Plain Layout
18962 This is useful if you have copied a style via
18963 \begin_inset Flex Code
18966 \begin_layout Plain Layout
18972 , but you do not want to inherit its (required and optional) arguments.
18975 \begin_layout Description
18976 \begin_inset Flex Code
18979 \begin_layout Plain Layout
18986 \begin_inset Flex Code
18989 \begin_layout Plain Layout
18996 \begin_inset space \thinspace{}
19000 \begin_inset Flex Code
19003 \begin_layout Plain Layout
19011 ] Whether this inset should use the font of its surrounding environment
19013 Default is false: use the font of the surrounding environment.
19016 \begin_layout Description
19017 \begin_inset Flex Code
19020 \begin_layout Plain Layout
19027 \begin_inset Flex Code
19030 \begin_layout Plain Layout
19036 ] A string that is put at the end of the layout content.
19037 A line break in the output can be indicated by
19038 \begin_inset Flex Code
19041 \begin_layout Plain Layout
19050 \begin_layout Description
19051 \begin_inset Flex Code
19054 \begin_layout Plain Layout
19061 \begin_inset Flex Code
19064 \begin_layout Plain Layout
19071 \begin_inset space \thinspace{}
19075 \begin_inset Flex Code
19078 \begin_layout Plain Layout
19086 ] Allow spell-checking the contents of this inset.
19090 \begin_layout Subsection
19092 \begin_inset CommandInset label
19094 name "subsec:Counters"
19101 \begin_layout Standard
19102 It is necessary to define the counters (
19103 \begin_inset Flex Noun
19106 \begin_layout Plain Layout
19113 \begin_inset Flex Noun
19116 \begin_layout Plain Layout
19122 , \SpecialChar ldots
19123 ) in the text class itself.
19124 The standard counters are defined in the file
19125 \begin_inset Flex Code
19128 \begin_layout Plain Layout
19134 , so you may have to do no more than add
19137 \begin_layout LyX-Code
19138 Input stdcounters.inc
19141 \begin_layout Standard
19142 to your layout file to get them to work.
19143 But if you want to define custom counters, then you can do so.
19144 The counter declaration must begin with:
19147 \begin_layout LyX-Code
19148 Counter CounterName
19151 \begin_layout Standard
19153 \begin_inset Flex Code
19156 \begin_layout Plain Layout
19162 ' is replaced by the name of the counter.
19163 And it must end with
19164 \begin_inset Quotes eld
19168 \begin_inset Flex Code
19171 \begin_layout Plain Layout
19178 \begin_inset Quotes erd
19182 The following parameters can also be used:
19185 \begin_layout Description
19186 \begin_inset Flex Code
19189 \begin_layout Plain Layout
19196 \begin_inset Flex Code
19199 \begin_layout Plain Layout
19205 ] Sets the initial value for the counter, to which it will be reset whenever
19207 Normally, one will want the default, 1.
19210 \begin_layout Description
19211 \begin_inset Flex Code
19214 \begin_layout Plain Layout
19221 \begin_inset Flex Code
19224 \begin_layout Plain Layout
19231 \begin_inset Quotes erd
19235 \begin_inset Quotes erd
19238 ] When defined, this string defines how the counter is displayed.
19239 Setting this value sets
19240 \begin_inset Flex Code
19243 \begin_layout Plain Layout
19244 LabelStringAppendix
19250 The following special constructs can be used in the string:
19254 \begin_layout Itemize
19255 \begin_inset Flex Code
19258 \begin_layout Plain Layout
19266 will be replaced by the expansion of the
19267 \begin_inset Flex Code
19270 \begin_layout Plain Layout
19277 \begin_inset Flex Code
19280 \begin_layout Plain Layout
19281 LabelStringAppendix
19287 \begin_inset Flex Code
19290 \begin_layout Plain Layout
19300 \begin_layout Itemize
19301 counter values can be expressed using \SpecialChar LaTeX
19303 \begin_inset Newline newline
19307 \begin_inset Flex Code
19310 \begin_layout Plain Layout
19327 \begin_inset Flex Code
19330 \begin_layout Plain Layout
19342 \begin_layout Plain Layout
19352 Actually, the situation is a bit more complicated: any
19371 other than those described below will produce arabic numerals.
19372 It would not be surprising to see this change in the future.
19378 \begin_inset Flex Code
19381 \begin_layout Plain Layout
19387 : 1, 2, 3,\SpecialChar ldots
19389 \begin_inset Flex Code
19392 \begin_layout Plain Layout
19398 for lower-case letters: a, b, c, \SpecialChar ldots
19400 \begin_inset Flex Code
19403 \begin_layout Plain Layout
19409 for upper-case letters: A, B, C, \SpecialChar ldots
19411 \begin_inset Flex Code
19414 \begin_layout Plain Layout
19420 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19422 \begin_inset Flex Code
19425 \begin_layout Plain Layout
19431 for upper-case roman numerals: I, II, III\SpecialChar ldots
19433 \begin_inset Flex Code
19436 \begin_layout Plain Layout
19442 for hebrew numerals.
19446 \begin_layout Standard
19447 If LabelString is not defined, a default value is constructed as follows:
19448 if the counter has a master counter
19449 \begin_inset Flex Code
19452 \begin_layout Plain Layout
19459 \begin_inset Flex Code
19462 \begin_layout Plain Layout
19469 \begin_inset Newline newline
19473 \begin_inset Flex Code
19476 \begin_layout Plain Layout
19486 is used; otherwise the string
19487 \begin_inset Flex Code
19490 \begin_layout Plain Layout
19501 \begin_layout Description
19502 \begin_inset Flex Code
19505 \begin_layout Plain Layout
19506 LabelStringAppendix
19512 \begin_inset Flex Code
19515 \begin_layout Plain Layout
19522 \begin_inset Quotes erd
19526 \begin_inset Quotes erd
19530 \begin_inset Flex Code
19533 \begin_layout Plain Layout
19539 , but for use in the Appendix.
19542 \begin_layout Description
19543 \begin_inset Flex Code
19546 \begin_layout Plain Layout
19553 \begin_inset Flex Code
19556 \begin_layout Plain Layout
19563 \begin_inset Quotes erd
19567 \begin_inset Quotes erd
19570 ] A format for use with formatted references to this counter.
19571 For example, one might want to have references to section numbers appear
19573 \begin_inset Quotes eld
19577 \begin_inset Quotes erd
19581 The string should contain
19582 \begin_inset Quotes eld
19586 \begin_inset Quotes erd
19590 This will be replaced by the counter number itself.
19591 So, for sections, it would be: Section ##.
19594 \begin_layout Description
19595 \begin_inset Flex Code
19598 \begin_layout Plain Layout
19605 \begin_inset Flex Code
19608 \begin_layout Plain Layout
19615 \begin_inset Quotes erd
19619 \begin_inset Quotes erd
19622 ] If this is set to the name of another counter, the present counter will
19623 be reset every time the other one is increased.
19625 \begin_inset Flex Code
19628 \begin_layout Plain Layout
19635 \begin_inset Flex Code
19638 \begin_layout Plain Layout
19647 \begin_layout Subsection
19649 \begin_inset CommandInset label
19651 name "subsec:Font-description"
19658 \begin_layout Standard
19659 A font description looks like this:
19662 \begin_layout LyX-Code
19676 \begin_layout LyX-Code
19680 \begin_layout LyX-Code
19684 \begin_layout Standard
19685 The following commands are available:
19688 \begin_layout Description
19689 \begin_inset Flex Code
19692 \begin_layout Plain Layout
19699 \begin_inset Flex Code
19702 \begin_layout Plain Layout
19711 \begin_inset Flex Code
19714 \begin_layout Plain Layout
19721 \begin_inset Flex Code
19724 \begin_layout Plain Layout
19731 \begin_inset Flex Code
19734 \begin_layout Plain Layout
19741 \begin_inset Flex Code
19744 \begin_layout Plain Layout
19751 \begin_inset Flex Code
19754 \begin_layout Plain Layout
19761 \begin_inset Flex Code
19764 \begin_layout Plain Layout
19771 \begin_inset Flex Code
19774 \begin_layout Plain Layout
19781 \begin_inset Flex Code
19784 \begin_layout Plain Layout
19791 \begin_inset Flex Code
19794 \begin_layout Plain Layout
19801 \begin_inset Flex Code
19804 \begin_layout Plain Layout
19811 \begin_inset Flex Code
19814 \begin_layout Plain Layout
19821 \begin_inset Flex Code
19824 \begin_layout Plain Layout
19831 \begin_inset Flex Code
19834 \begin_layout Plain Layout
19841 \begin_inset Flex Code
19844 \begin_layout Plain Layout
19851 \begin_inset Flex Code
19854 \begin_layout Plain Layout
19861 \begin_inset Flex Code
19864 \begin_layout Plain Layout
19871 \begin_inset Flex Code
19874 \begin_layout Plain Layout
19881 \begin_inset Flex Code
19884 \begin_layout Plain Layout
19891 \begin_inset Flex Code
19894 \begin_layout Plain Layout
19903 \begin_layout Description
19904 \begin_inset Flex Code
19907 \begin_layout Plain Layout
19914 \begin_inset Flex Code
19917 \begin_layout Plain Layout
19926 \begin_inset Flex Code
19929 \begin_layout Plain Layout
19936 \begin_inset Flex Code
19939 \begin_layout Plain Layout
19948 \begin_layout Description
19949 \begin_inset Flex Code
19952 \begin_layout Plain Layout
19959 \begin_inset Flex Code
19962 \begin_layout Plain Layout
19968 ] Valid arguments are:
19969 \begin_inset Flex Code
19972 \begin_layout Plain Layout
19979 \begin_inset Flex Code
19982 \begin_layout Plain Layout
19989 \begin_inset Flex Code
19992 \begin_layout Plain Layout
19999 \begin_inset Flex Code
20002 \begin_layout Plain Layout
20009 \begin_inset Flex Code
20012 \begin_layout Plain Layout
20019 \begin_inset Flex Code
20022 \begin_layout Plain Layout
20029 \begin_inset Flex Code
20032 \begin_layout Plain Layout
20039 \begin_inset Flex Code
20042 \begin_layout Plain Layout
20049 \begin_inset Flex Code
20052 \begin_layout Plain Layout
20059 \begin_inset Flex Code
20062 \begin_layout Plain Layout
20069 \begin_inset Flex Code
20072 \begin_layout Plain Layout
20079 \begin_inset Flex Code
20082 \begin_layout Plain Layout
20089 Each of these turns on or off the corresponding attribute.
20091 \begin_inset Flex Code
20094 \begin_layout Plain Layout
20100 turns on emphasis, and
20101 \begin_inset Flex Code
20104 \begin_layout Plain Layout
20112 \begin_inset Newline newline
20115 If the latter seems puzzling, remember that the font settings for the present
20116 context are generally inherited from the surrounding context.
20118 \begin_inset Flex Code
20121 \begin_layout Plain Layout
20127 would turn off the emphasis that was anyway in effect, say, in a theorem
20131 \begin_layout Description
20132 \begin_inset Flex Code
20135 \begin_layout Plain Layout
20142 \begin_inset Flex Code
20145 \begin_layout Plain Layout
20154 \begin_inset Flex Code
20157 \begin_layout Plain Layout
20166 \begin_layout Description
20167 \begin_inset Flex Code
20170 \begin_layout Plain Layout
20177 \begin_inset Flex Code
20180 \begin_layout Plain Layout
20189 \begin_inset Flex Code
20192 \begin_layout Plain Layout
20199 \begin_inset Flex Code
20202 \begin_layout Plain Layout
20209 \begin_inset Flex Code
20212 \begin_layout Plain Layout
20221 \begin_layout Description
20222 \begin_inset Flex Code
20225 \begin_layout Plain Layout
20232 \begin_inset Flex Code
20235 \begin_layout Plain Layout
20242 \begin_inset Flex Code
20245 \begin_layout Plain Layout
20252 \begin_inset Flex Code
20255 \begin_layout Plain Layout
20264 \begin_inset Flex Code
20267 \begin_layout Plain Layout
20274 \begin_inset Flex Code
20277 \begin_layout Plain Layout
20284 \begin_inset Flex Code
20287 \begin_layout Plain Layout
20294 \begin_inset Flex Code
20297 \begin_layout Plain Layout
20304 \begin_inset Flex Code
20307 \begin_layout Plain Layout
20316 \begin_layout Subsection
20317 \begin_inset CommandInset label
20319 name "subsec:Citation-format-description"
20323 Citation format description
20326 \begin_layout Standard
20328 \begin_inset Flex Code
20331 \begin_layout Plain Layout
20337 blocks are used to describe how bibliographic information should be displayed,
20338 both within \SpecialChar LyX
20339 itself (in the citation dialog and in tooltips, for example)
20340 and in XHTML output.
20341 Such a block might look like this:
20344 \begin_layout LyX-Code
20348 \begin_layout LyX-Code
20352 \begin_layout LyX-Code
20356 \begin_layout LyX-Code
20360 \begin_layout Standard
20361 The individual lines define how the bibliographic information associated
20362 with an article or book, respectively, is to be displayed, and such a definitio
20363 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20366 defines a default format in the source code that will be used if no specific
20367 definition has been given.
20369 predefines several formats in the file
20370 \begin_inset Flex Code
20373 \begin_layout Plain Layout
20379 , which is included in most of \SpecialChar LyX
20380 's document classes.
20383 \begin_layout Standard
20384 The definitions use a simple language that allows Bib\SpecialChar TeX
20385 keys to be replaced
20387 Keys should be enclosed in
20388 \begin_inset Flex Code
20391 \begin_layout Plain Layout
20398 \begin_inset Flex Code
20401 \begin_layout Plain Layout
20408 So a simple definition might look like this:
20411 \begin_layout LyX-Code
20413 \begin_inset Quotes eld
20417 \begin_inset Quotes erd
20423 \begin_layout Standard
20424 This would print the author, followed by a comma, followed by the title,
20425 in quotes, followed by a period.
20428 \begin_layout Standard
20429 Of course, sometimes you may want to print a key only if it exists.
20430 This can be done by using a conditional construction, such as:
20431 \begin_inset Flex Code
20434 \begin_layout Plain Layout
20436 \begin_inset space ~
20446 \begin_inset Flex Code
20449 \begin_layout Plain Layout
20455 key exists, then print
20456 \begin_inset Quotes eld
20460 \begin_inset space ~
20464 \begin_inset Quotes erd
20467 followed by the volume key.
20468 It is also possible to have an else clause in the conditional, such as:
20469 \begin_inset Newline newline
20473 \begin_inset Flex Code
20476 \begin_layout Plain Layout
20477 {%author%[[%author%]][[%editor%, ed.]]}
20483 \begin_inset Newline newline
20487 \begin_inset Flex Code
20490 \begin_layout Plain Layout
20496 key is printed if it exists; otherwise, the editor key is printed, followed
20498 \begin_inset Quotes eld
20502 \begin_inset space ~
20506 \begin_inset Quotes erd
20509 Note that the key is again enclosed in
20510 \begin_inset Flex Code
20513 \begin_layout Plain Layout
20519 signs; the entire conditional is enclosed in braces; and the if and else
20520 clauses are enclosed in double brackets,
20521 \begin_inset Quotes eld
20525 \begin_inset Flex Code
20528 \begin_layout Plain Layout
20535 \begin_inset Quotes eld
20539 \begin_inset Quotes eld
20543 \begin_inset Flex Code
20546 \begin_layout Plain Layout
20553 \begin_inset Quotes erd
20557 There must be no space between any of these.
20560 \begin_layout Standard
20561 There is one other piece of syntax available in definitions, which looks
20563 \begin_inset Flex Code
20566 \begin_layout Plain Layout
20573 This defines a piece of formatting information that is to be used when
20575 \begin_inset Quotes eld
20579 \begin_inset Quotes erd
20583 Obviously, we do not want to output HTML tags when writing plain text,
20584 so they should be wrapped in
20585 \begin_inset Quotes eld
20589 \begin_inset Quotes erd
20593 \begin_inset Quotes eld
20597 \begin_inset Quotes erd
20603 \begin_layout Standard
20604 Two special sorts of definitions are also possible in a
20605 \begin_inset Flex Code
20608 \begin_layout Plain Layout
20615 An example of the first would be:
20618 \begin_layout LyX-Code
20620 \begin_inset Quotes eld
20624 \begin_inset Quotes erd
20630 \begin_layout Standard
20631 This is an abbreviation, or macro, and it can be used by treating it as
20633 \begin_inset Flex Code
20636 \begin_layout Plain Layout
20645 \begin_inset Flex Code
20648 \begin_layout Plain Layout
20654 exactly as it would treat its definition.
20655 So, let us issue the obvious
20663 \begin_layout LyX-Code
20667 \begin_layout Standard
20668 or anything like it.
20670 shouldn't go into an infinite loop, but it may go into a long one before
20674 \begin_layout Standard
20675 The second sort of special definition might look like this:
20678 \begin_layout LyX-Code
20682 \begin_layout Standard
20683 This defines a translatable piece of text, which allows relevant parts of
20684 the bibliography to be translated.
20685 It can be included in a definition by treating it as a key:
20686 \begin_inset Flex Code
20689 \begin_layout Plain Layout
20696 Several of these are predefined in
20697 \begin_inset Flex Code
20700 \begin_layout Plain Layout
20707 Note that these are not macros, in the sense just defined.
20708 They will not be expanded.
20711 \begin_layout Standard
20712 So here then is an example that use all these features:
20713 \begin_inset VSpace defskip
20719 \begin_layout Standard
20723 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20726 \begin_layout Standard
20727 \begin_inset VSpace defskip
20730 This defines a macro that prints the author, followed by a comma, if the
20732 \begin_inset Flex Code
20735 \begin_layout Plain Layout
20741 key is defined, or else prints the name of the editor, followed by the
20743 \begin_inset Flex Code
20746 \begin_layout Plain Layout
20752 or its translation (it is by default
20753 \begin_inset Quotes eld
20757 \begin_inset Quotes erd
20761 \begin_inset Flex Code
20764 \begin_layout Plain Layout
20771 Note that this is in fact defined in
20772 \begin_inset Flex Code
20775 \begin_layout Plain Layout
20781 , so you can use it in your own definitions, or re-definitions, if you load
20785 \begin_layout Section
20786 \begin_inset CommandInset label
20788 name "sec:Tags-for-XHTML"
20792 Tags for XHTML output
20795 \begin_layout Standard
20796 As with \SpecialChar LaTeX
20797 or DocBook, the format of \SpecialChar LyX
20798 's XHTML output is also controlled by
20799 layout information.
20800 In general, \SpecialChar LyX
20801 provides sensible defaults and, as mentioned earlier, it will
20802 even construct default CSS style rules from the other layout tags.
20803 For example, \SpecialChar LyX
20804 will attempt to use the information provided in the
20805 \begin_inset Flex Code
20808 \begin_layout Plain Layout
20814 declaration for the Chapter style to write CSS that will appropriately
20815 format chapter headings.
20818 \begin_layout Standard
20819 In many cases, then, you may not have to do anything at all to get acceptable
20820 XHTML output for your own environments, custom insets, and so forth.
20821 But in some cases you will, and so \SpecialChar LyX
20822 provides a number of layout tags that
20823 can be used to customize the XHTML and CSS that are generated.
20826 \begin_layout Standard
20827 Note that there are two tags,
20828 \begin_inset Flex Code
20831 \begin_layout Plain Layout
20838 \begin_inset Flex Code
20841 \begin_layout Plain Layout
20847 that may appear outside style and inset declarations.
20849 \begin_inset CommandInset ref
20851 reference "subsec:General-text-class"
20855 for details on these.
20858 \begin_layout Subsection
20859 \begin_inset CommandInset label
20861 name "subsec:Paragraph-Style-XHTML"
20868 \begin_layout Standard
20869 The sort of XHTML \SpecialChar LyX
20870 outputs for a paragraph depends upon whether we are dealing
20871 with a normal paragraph, a command, or an environment, where this is itself
20872 determined by the contents of the corresponding
20873 \begin_inset Flex Code
20876 \begin_layout Plain Layout
20887 \begin_layout Standard
20888 For a command or normal paragraph, the output XHTML has the following form:
20891 \begin_layout LyX-Code
20893 \begin_inset Quotes erd
20897 \begin_inset Quotes erd
20903 \begin_layout LyX-Code
20905 \begin_inset Quotes erd
20909 \begin_inset Quotes erd
20915 \begin_layout LyX-Code
20916 Contents of the paragraph.
20919 \begin_layout LyX-Code
20923 \begin_layout Standard
20924 The label tags are of course omitted if the paragraph does not have a label.
20927 \begin_layout Standard
20928 For an environment that is not some sort of list, the XHTML takes this form:
20931 \begin_layout LyX-Code
20933 \begin_inset Quotes erd
20937 \begin_inset Quotes erd
20943 \begin_layout LyX-Code
20945 \begin_inset Quotes erd
20949 \begin_inset Quotes erd
20953 \begin_inset Quotes erd
20957 \begin_inset Quotes erd
20960 >Environment Label</labeltag>First paragraph.</itemtag>
20963 \begin_layout LyX-Code
20964 <itemtag>Second paragraph.</itemtag>
20967 \begin_layout LyX-Code
20971 \begin_layout Standard
20972 Note that the label is output only for the first paragraph, as it should
20973 be for a theorem, for example.
20977 \begin_layout Standard
20978 For a list, we have one of these forms:
20981 \begin_layout LyX-Code
20983 \begin_inset Quotes erd
20987 \begin_inset Quotes erd
20993 \begin_layout LyX-Code
20995 \begin_inset Quotes erd
20999 \begin_inset Quotes erd
21003 \begin_inset Quotes erd
21007 \begin_inset Quotes erd
21010 >List Label</labeltag>First item.</itemtag>
21013 \begin_layout LyX-Code
21015 \begin_inset Quotes erd
21019 \begin_inset Quotes erd
21023 \begin_inset Quotes erd
21027 \begin_inset Quotes erd
21030 >List Label</labeltag>Second item.</itemtag>
21033 \begin_layout LyX-Code
21037 \begin_layout LyX-Code
21041 \begin_layout LyX-Code
21043 \begin_inset Quotes erd
21047 \begin_inset Quotes erd
21053 \begin_layout LyX-Code
21055 \begin_inset Quotes erd
21059 \begin_inset Quotes erd
21062 >List Label</labeltag><itemtag attr=
21063 \begin_inset Quotes erd
21067 \begin_inset Quotes erd
21070 >First item.</itemtag>
21073 \begin_layout LyX-Code
21075 \begin_inset Quotes erd
21079 \begin_inset Quotes erd
21082 >List Label</labeltag><itemtag attr=
21083 \begin_inset Quotes erd
21087 \begin_inset Quotes erd
21090 >Second item.</itemtag>
21093 \begin_layout LyX-Code
21097 \begin_layout Standard
21098 Note the different orders of
21099 \begin_inset Flex Code
21102 \begin_layout Plain Layout
21109 \begin_inset Flex Code
21112 \begin_layout Plain Layout
21119 Which order we get depends upon the setting of
21120 \begin_inset Flex Code
21123 \begin_layout Plain Layout
21130 \begin_inset Flex Code
21133 \begin_layout Plain Layout
21139 is false (the default), you get the first of these, with the label within
21140 the item; if true, you get the second, with the label outside the item.
21143 \begin_layout Standard
21144 The specific tags and attributes output for each paragraph type can be controlle
21145 d by means of the layout tags we are about to describe.
21146 As mentioned earlier, however, \SpecialChar LyX
21147 uses sensible defaults for many of these,
21148 so you often may not need to do very much to get good XHTML output.
21149 Think of the available tags as there so you can tweak things to your liking.
21152 \begin_layout Description
21153 \begin_inset Flex Code
21156 \begin_layout Plain Layout
21163 \begin_inset Flex Code
21166 \begin_layout Plain Layout
21172 ] Specifies attribute information to be output with the main tag.
21174 \begin_inset Quotes eld
21178 \begin_inset Flex Code
21181 \begin_layout Plain Layout
21188 \begin_inset Quotes erd
21192 By default, \SpecialChar LyX
21194 \begin_inset Quotes eld
21198 \begin_inset Flex Code
21201 \begin_layout Plain Layout
21208 \begin_inset Quotes erd
21212 \begin_inset Flex Code
21215 \begin_layout Plain Layout
21221 is the \SpecialChar LyX
21222 name of the layout, made lowercase, for example: chapter.
21227 contain any style information.
21229 \begin_inset Flex Code
21232 \begin_layout Plain Layout
21241 \begin_layout Description
21242 \begin_inset Flex Code
21245 \begin_layout Plain Layout
21252 \begin_inset Flex Code
21255 \begin_layout Plain Layout
21265 ] Whether to output the default CSS information \SpecialChar LyX
21266 generates for this layout,
21267 even if additional information is explicitly provided via
21268 \begin_inset Flex Code
21271 \begin_layout Plain Layout
21279 \begin_inset Flex Code
21282 \begin_layout Plain Layout
21288 allows you to alter or augment the generated CSS, rather than to override
21291 \begin_inset Flex Code
21294 \begin_layout Plain Layout
21303 \begin_layout Description
21304 \begin_inset Flex Code
21307 \begin_layout Plain Layout
21314 \begin_inset Flex Code
21317 \begin_layout Plain Layout
21323 ] The tag to be used for individual paragraphs of environments, replacing
21325 \begin_inset Flex Code
21328 \begin_layout Plain Layout
21334 in the examples above.
21336 \begin_inset Flex Code
21339 \begin_layout Plain Layout
21348 \begin_layout Description
21349 \begin_inset Flex Code
21352 \begin_layout Plain Layout
21359 \begin_inset Flex Code
21362 \begin_layout Plain Layout
21368 ] Attributes for the item tag.
21370 \begin_inset Quotes eld
21374 \begin_inset Flex Code
21377 \begin_layout Plain Layout
21378 class=`layoutname_item'
21384 \begin_inset Quotes erd
21392 contain any style information.
21394 \begin_inset Flex Code
21397 \begin_layout Plain Layout
21406 \begin_layout Description
21407 \begin_inset Flex Code
21410 \begin_layout Plain Layout
21417 \begin_inset Flex Code
21420 \begin_layout Plain Layout
21426 ] The tag to be used for paragraph and item labels, replacing
21427 \begin_inset Flex Code
21430 \begin_layout Plain Layout
21436 in the examples above.
21438 \begin_inset Flex Code
21441 \begin_layout Plain Layout
21448 \begin_inset Flex Code
21451 \begin_layout Plain Layout
21458 \begin_inset Flex Code
21461 \begin_layout Plain Layout
21468 \begin_inset Flex Code
21471 \begin_layout Plain Layout
21472 Centered_Top_Environment
21477 , in which case it defaults to
21478 \begin_inset Flex Code
21481 \begin_layout Plain Layout
21490 \begin_layout Description
21491 \begin_inset Flex Code
21494 \begin_layout Plain Layout
21501 \begin_inset Flex Code
21504 \begin_layout Plain Layout
21510 ] Attributes for the label tag.
21512 \begin_inset Quotes eld
21516 \begin_inset Flex Code
21519 \begin_layout Plain Layout
21520 class=`layoutname_label'
21526 \begin_inset Quotes erd
21534 contain any style information.
21536 \begin_inset Flex Code
21539 \begin_layout Plain Layout
21548 \begin_layout Description
21549 \begin_inset Flex Code
21552 \begin_layout Plain Layout
21559 \begin_inset Flex Code
21562 \begin_layout Plain Layout
21572 ] Meaningful only for list-like environments, this tag controls whether
21573 the label tag is output before or inside the item tag.
21574 This is used, for example, in the description environment, where we want
21576 \begin_inset Flex Code
21579 \begin_layout Plain Layout
21580 <dt>\SpecialChar ldots
21581 </dt><dd>\SpecialChar ldots
21589 \begin_inset Flex Code
21592 \begin_layout Plain Layout
21598 : The label tag is output inside the item tag.
21601 \begin_layout Description
21602 \begin_inset Flex Code
21605 \begin_layout Plain Layout
21611 Information to be output in the
21612 \begin_inset Flex Code
21615 \begin_layout Plain Layout
21621 section when this style is used.
21622 This might, for example, be used to include a
21623 \begin_inset Flex Code
21626 \begin_layout Plain Layout
21633 \begin_inset Flex Code
21636 \begin_layout Plain Layout
21645 \begin_layout Description
21646 \begin_inset Flex Code
21649 \begin_layout Plain Layout
21655 CSS style information to be included when this style is used.
21656 Note that this will automatically be wrapped in a layout-generated
21657 \begin_inset Flex Code
21660 \begin_layout Plain Layout
21666 block, so only the CSS itself need be included.
21668 \begin_inset Flex Code
21671 \begin_layout Plain Layout
21680 \begin_layout Description
21681 \begin_inset Flex Code
21684 \begin_layout Plain Layout
21691 \begin_inset Flex Code
21694 \begin_layout Plain Layout
21700 ] The tag to be used for the main label, replacing
21701 \begin_inset Flex Code
21704 \begin_layout Plain Layout
21710 in the examples above.
21712 \begin_inset Flex Code
21715 \begin_layout Plain Layout
21724 \begin_layout Description
21725 \begin_inset Flex Code
21728 \begin_layout Plain Layout
21735 \begin_inset Flex Code
21738 \begin_layout Plain Layout
21748 ] Marks this style as the one to be used to generate the
21749 \begin_inset Flex Code
21752 \begin_layout Plain Layout
21758 tag for the XHTML file.
21759 By default, it is false.
21761 \begin_inset Flex Code
21764 \begin_layout Plain Layout
21770 file sets it to true for the
21771 \begin_inset Flex Code
21774 \begin_layout Plain Layout
21784 \begin_layout Subsection
21788 \begin_layout Standard
21789 The XHTML output of insets can also be controlled by information in layout
21794 \begin_layout Plain Layout
21795 At present, this is true only for
21796 \begin_inset Quotes eld
21800 \begin_inset Quotes erd
21803 insets (insets you can type into) and is not true for
21804 \begin_inset Quotes eld
21808 \begin_inset Quotes erd
21811 insets (insets that are associated with dialog boxes).
21816 Here, too, \SpecialChar LyX
21817 tries to provide sensible defaults, and it constructs default
21819 But everything can be customized.
21822 \begin_layout Standard
21823 The XHTML \SpecialChar LyX
21824 outputs for an inset has the following form:
21827 \begin_layout LyX-Code
21829 \begin_inset Quotes erd
21833 \begin_inset Quotes erd
21839 \begin_layout LyX-Code
21840 <labeltag>Label</labeltag>
21843 \begin_layout LyX-Code
21845 \begin_inset Quotes erd
21849 \begin_inset Quotes erd
21852 >Contents of the inset.</innertag>
21855 \begin_layout LyX-Code
21859 \begin_layout Standard
21860 If the inset permits multiple paragraphs—that is, if
21861 \begin_inset Flex Code
21864 \begin_layout Plain Layout
21870 is true—then the contents of the inset will itself be output as paragraphs
21871 formatted according to the styles used for those paragraphs (standard,
21872 quote, and the like).
21873 The label tag is of course omitted if the paragraph does not have a label
21874 and, at present, is always
21875 \begin_inset Flex Code
21878 \begin_layout Plain Layout
21885 The inner tag is optional and, by default, does not appear.
21888 \begin_layout Standard
21889 The specific tags and attributes output for each inset can be controlled
21890 by means of the following layout tags.
21893 \begin_layout Description
21894 \begin_inset Flex Code
21897 \begin_layout Plain Layout
21904 \begin_inset Flex Code
21907 \begin_layout Plain Layout
21913 ] Specifies attribute information to be output with the main tag.
21915 \begin_inset Quotes eld
21919 \begin_inset Flex Code
21922 \begin_layout Plain Layout
21923 class=`myinset' onclick=`\SpecialChar ldots
21930 \begin_inset Quotes erd
21934 By default, \SpecialChar LyX
21936 \begin_inset Quotes eld
21940 \begin_inset Flex Code
21943 \begin_layout Plain Layout
21950 \begin_inset Quotes erd
21954 \begin_inset Flex Code
21957 \begin_layout Plain Layout
21963 is the \SpecialChar LyX
21964 name of the inset, made lowercase and with non-alphanumeric characters
21965 converted to underscores, for example: footnote.
21968 \begin_layout Description
21969 \begin_inset Flex Code
21972 \begin_layout Plain Layout
21979 \begin_inset Flex Code
21982 \begin_layout Plain Layout
21992 ] Whether to output the default CSS information \SpecialChar LyX
21993 generates for this layout,
21994 even if additional information is explicitly provided via
21995 \begin_inset Flex Code
21998 \begin_layout Plain Layout
22006 \begin_inset Flex Code
22009 \begin_layout Plain Layout
22015 allows you to alter or augment the generated CSS, rather than to override
22020 \begin_layout Description
22021 \begin_inset Flex Code
22024 \begin_layout Plain Layout
22031 \begin_inset Flex Code
22034 \begin_layout Plain Layout
22040 ] Attributes for the inner tag.
22042 \begin_inset Quotes eld
22046 \begin_inset Flex Code
22049 \begin_layout Plain Layout
22050 class=`insetname_inner'
22056 \begin_inset Quotes erd
22062 \begin_layout Description
22063 \begin_inset Flex Code
22066 \begin_layout Plain Layout
22073 \begin_inset Flex Code
22076 \begin_layout Plain Layout
22082 ] The inner tag, replacing
22083 \begin_inset Flex Code
22086 \begin_layout Plain Layout
22092 in the examples above.
22093 By default, there is none.
22096 \begin_layout Description
22097 \begin_inset Flex Code
22100 \begin_layout Plain Layout
22107 \begin_inset Flex Code
22110 \begin_layout Plain Layout
22118 ] Whether this inset represents a standalone block of text (such as a footnote)
22119 or instead represents material that is included in the surrounding text
22120 (such as a branch).
22124 \begin_layout Description
22125 \begin_inset Flex Code
22128 \begin_layout Plain Layout
22135 \begin_inset Flex Code
22138 \begin_layout Plain Layout
22144 ] A label for this inset, possibly including a reference to a counter.
22145 For example, for footnote, it might be:
22146 \begin_inset Flex Code
22149 \begin_layout Plain Layout
22158 This is optional, and there is no default.
22161 \begin_layout Description
22162 \begin_inset Flex Code
22165 \begin_layout Plain Layout
22171 Information to be output in the
22172 \begin_inset Flex Code
22175 \begin_layout Plain Layout
22181 section when this style is used.
22182 This might, for example, be used to include a
22183 \begin_inset Flex Code
22186 \begin_layout Plain Layout
22193 \begin_inset Flex Code
22196 \begin_layout Plain Layout
22205 \begin_layout Description
22206 \begin_inset Flex Code
22209 \begin_layout Plain Layout
22215 CSS style information to be included when this style is used.
22216 Note that this will automatically be wrapped in a layout-generated
22217 \begin_inset Flex Code
22220 \begin_layout Plain Layout
22226 block, so only the CSS itself need be included.
22229 \begin_layout Description
22230 \begin_inset Flex Code
22233 \begin_layout Plain Layout
22240 \begin_inset Flex Code
22243 \begin_layout Plain Layout
22249 ] The tag to be used for the main label, replacing
22250 \begin_inset Flex Code
22253 \begin_layout Plain Layout
22259 in the examples above.
22260 The default depends upon the setting of
22261 \begin_inset Flex Code
22264 \begin_layout Plain Layout
22271 \begin_inset Flex Code
22274 \begin_layout Plain Layout
22280 is true, the default is
22281 \begin_inset Flex Code
22284 \begin_layout Plain Layout
22290 ; if it is false, the default is
22291 \begin_inset Flex Code
22294 \begin_layout Plain Layout
22303 \begin_layout Subsection
22307 \begin_layout Standard
22308 The XHTML output for floats too can be controlled by layout information.
22309 The output has the following form:
22312 \begin_layout LyX-Code
22314 \begin_inset Quotes erd
22318 \begin_inset Quotes erd
22324 \begin_layout LyX-Code
22325 Contents of the float.
22328 \begin_layout LyX-Code
22332 \begin_layout Standard
22333 The caption, if there is one, is a separate inset and will be output as
22335 Its appearance can be controlled via the InsetLayout for caption insets.
22339 \begin_layout Description
22340 \begin_inset Flex Code
22343 \begin_layout Plain Layout
22350 \begin_inset Flex Code
22353 \begin_layout Plain Layout
22359 ] Specifies attribute information to be output with the main tag.
22361 \begin_inset Quotes eld
22365 \begin_inset Flex Code
22368 \begin_layout Plain Layout
22369 class=`myfloat' onclick=`\SpecialChar ldots
22376 \begin_inset Quotes erd
22380 By default, \SpecialChar LyX
22382 \begin_inset Quotes eld
22386 \begin_inset Flex Code
22389 \begin_layout Plain Layout
22390 class=`float float-floattype'
22396 \begin_inset Quotes erd
22400 \begin_inset Flex Code
22403 \begin_layout Plain Layout
22409 is \SpecialChar LyX
22410 's name for this type of float, as determined by the float declaration
22412 \begin_inset CommandInset ref
22414 reference "subsec:Floats"
22418 ), though made lowercase and with non-alphanumeric characters converted
22419 to underscores, for example: float-table.
22422 \begin_layout Description
22423 \begin_inset Flex Code
22426 \begin_layout Plain Layout
22432 CSS style information to be included when this float is used.
22433 Note that this will automatically be wrapped in a layout-generated
22434 \begin_inset Flex Code
22437 \begin_layout Plain Layout
22443 block, so only the CSS itself need be included.
22446 \begin_layout Description
22447 \begin_inset Flex Code
22450 \begin_layout Plain Layout
22457 \begin_inset Flex Code
22460 \begin_layout Plain Layout
22466 ] The tag to be used for this float, replacing
22467 \begin_inset Quotes eld
22471 \begin_inset Flex Code
22474 \begin_layout Plain Layout
22481 \begin_inset Quotes erd
22484 in the example above.
22486 \begin_inset Flex Code
22489 \begin_layout Plain Layout
22495 and will rarely need changing.
22498 \begin_layout Subsection
22499 Bibliography formatting
22502 \begin_layout Standard
22503 The bibliography can be formatted using
22504 \begin_inset Flex Code
22507 \begin_layout Plain Layout
22515 \begin_inset CommandInset ref
22517 reference "subsec:Citation-format-description"
22524 \begin_layout Subsection
22529 \begin_layout Standard
22530 We have several times mentioned that \SpecialChar LyX
22531 will generate default CSS style rules
22532 for both insets and paragraph styles, based upon the other layout information
22534 In this section, we shall say a word about which layout information \SpecialChar LyX
22539 \begin_layout Standard
22540 At present, \SpecialChar LyX
22541 auto-generates CSS only for font information, making use of
22543 \begin_inset Flex Code
22546 \begin_layout Plain Layout
22553 \begin_inset Flex Code
22556 \begin_layout Plain Layout
22563 \begin_inset Flex Code
22566 \begin_layout Plain Layout
22573 \begin_inset Flex Code
22576 \begin_layout Plain Layout
22583 \begin_inset Flex Code
22586 \begin_layout Plain Layout
22593 \begin_inset CommandInset ref
22595 reference "subsec:Font-description"
22600 The translation is mostly straightforward and obvious.
22602 \begin_inset Quotes eld
22606 \begin_inset Flex Code
22609 \begin_layout Plain Layout
22616 \begin_inset Quotes erd
22620 \begin_inset Quotes eld
22624 \begin_inset Flex Code
22627 \begin_layout Plain Layout
22628 font-family: sans-serif;
22634 \begin_inset Quotes erd
22638 The correspondence of \SpecialChar LyX
22639 sizes and CSS sizes is a little less obvious but
22640 nonetheless intuitive.
22642 \begin_inset Flex Code
22645 \begin_layout Plain Layout
22652 \begin_inset Flex URL
22655 \begin_layout Plain Layout
22665 \begin_layout Chapter
22666 Including External Material
22667 \begin_inset CommandInset label
22669 name "chap:Including-External-Material"
22676 \begin_layout Standard
22677 \begin_inset Box Shadowbox
22687 height_special "totalheight"
22692 backgroundcolor "none"
22695 \begin_layout Plain Layout
22696 WARNING: This portion of the documentation has not been updated for some
22698 We certainly hope that it is still accurate, but there are no guarantees.
22706 \begin_layout Standard
22707 The use of material from sources external to \SpecialChar LyX
22708 is covered in detail in the
22714 This part of the manual covers what needs to happen behind the scenes for
22715 new sorts of material to be included.
22718 \begin_layout Section
22722 \begin_layout Standard
22723 The external material feature is based on the concept of a
22728 A template is a specification of how \SpecialChar LyX
22729 should interface with a certain kind
22731 As bundled, \SpecialChar LyX
22732 comes with predefined templates for Xfig figures, various
22733 raster format images, chess diagrams, and LilyPond music notation.
22734 You can check the actual list by using the menu
22735 \begin_inset Flex Noun
22738 \begin_layout Plain Layout
22739 Insert\SpecialChar menuseparator
22740 File\SpecialChar menuseparator
22747 Furthermore, it is possible to roll your own template to support a specific
22749 Later we'll describe in more detail what is involved, and hopefully you
22750 will submit all the templates you create so we can include them in a later
22755 \begin_layout Standard
22756 Another basic idea of the external material feature is to distinguish between
22757 the original file that serves as a base for final material and the produced
22758 file that is included in your exported or printed document.
22759 For example, consider the case of a figure produced with
22760 \begin_inset Flex Code
22763 \begin_layout Plain Layout
22770 The Xfig application itself works on an original file with the
22771 \begin_inset Flex Code
22774 \begin_layout Plain Layout
22781 Within Xfig, you create and change your figure, and when you are done,
22783 \begin_inset Flex Code
22786 \begin_layout Plain Layout
22793 When you want to include the figure in your document, you invoke
22794 \begin_inset Flex Code
22797 \begin_layout Plain Layout
22803 in order to create a PostScript file that can readily be included in your
22807 \begin_inset Flex Code
22810 \begin_layout Plain Layout
22816 file is the original file, and the PostScript file is the produced file.
22819 \begin_layout Standard
22820 This distinction is important in order to allow updating of the material
22821 while you are in the process of writing the document.
22822 Furthermore, it provides us with the flexibility that is needed to support
22823 multiple export formats.
22824 For instance, in the case of a plain text file, it is not exactly an award-winn
22825 ing idea to include the figure as raw PostScript.
22826 Instead, you would either prefer to just include a reference to the figure
22827 or try to invoke some graphics to ASCII converter to make the final result
22828 look similar to the real graphics.
22829 The external material management allows you to do this, because it is parametri
22830 zed on the different export formats that \SpecialChar LyX
22834 \begin_layout Standard
22835 Besides supporting the production of different products according to the
22836 exported format, it supports tight integration with editing and viewing
22838 In the case of an Xfig figure, you are able to invoke Xfig on the original
22839 file with a single click from within the external material dialog in \SpecialChar LyX
22841 and also preview the produced PostScript file with Ghostview with another
22843 No more fiddling around with the command line and/or file browsers to locate
22844 and manipulate the original or produced files.
22845 In this way, you are finally able to take full advantage of the many different
22846 applications that are relevant to use when you write your documents, and
22847 ultimately be more productive.
22850 \begin_layout Section
22851 The external template configuration file
22854 \begin_layout Standard
22855 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22857 However, be aware that doing this in an careless manner most probably
22861 introduce an easily exploitable security hole.
22862 So before you do this, please read the discussion about security in
22863 \begin_inset CommandInset ref
22865 reference "sec:Security-discussion"
22872 \begin_layout Standard
22873 Having said that, we encourage you to submit any interesting templates that
22878 \begin_layout Standard
22879 The external templates are defined in the
22880 \begin_inset Flex Code
22883 \begin_layout Plain Layout
22884 LyXDir/lib/external_templates
22890 You can place your own version in
22891 \begin_inset Flex Code
22894 \begin_layout Plain Layout
22895 UserDir/external_templates
22903 \begin_layout Standard
22904 A typical template looks like this:
22907 \begin_layout LyX-Code
22911 \begin_layout LyX-Code
22912 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22915 \begin_layout LyX-Code
22919 \begin_layout LyX-Code
22923 \begin_layout LyX-Code
22927 \begin_layout LyX-Code
22931 \begin_layout LyX-Code
22935 \begin_layout LyX-Code
22936 AutomaticProduction true
22939 \begin_layout LyX-Code
22943 \begin_layout LyX-Code
22947 \begin_layout LyX-Code
22948 Format \SpecialChar LaTeX
22952 \begin_layout LyX-Code
22953 TransformCommand Rotate RotationLatexCommand
22956 \begin_layout LyX-Code
22957 TransformCommand Resize ResizeLatexCommand
22960 \begin_layout LyX-Code
22961 Product "$$RotateFront$$ResizeFront
22964 \begin_layout LyX-Code
22969 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22972 \begin_layout LyX-Code
22973 $$ResizeBack$$RotateBack"
22976 \begin_layout LyX-Code
22980 \begin_layout LyX-Code
22981 UpdateResult "$$AbsPath$$Basename.pstex_t"
22984 \begin_layout LyX-Code
22985 Requirement "graphicx"
22988 \begin_layout LyX-Code
22989 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22992 \begin_layout LyX-Code
22993 ReferencedFile latex "$$AbsPath$$Basename.eps"
22996 \begin_layout LyX-Code
22997 ReferencedFile dvi "$$AbsPath$$Basename.eps"
23000 \begin_layout LyX-Code
23004 \begin_layout LyX-Code
23005 Format PDF\SpecialChar LaTeX
23009 \begin_layout LyX-Code
23010 TransformCommand Rotate RotationLatexCommand
23013 \begin_layout LyX-Code
23014 TransformCommand Resize ResizeLatexCommand
23017 \begin_layout LyX-Code
23018 Product "$$RotateFront$$ResizeFront
23021 \begin_layout LyX-Code
23026 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
23029 \begin_layout LyX-Code
23030 $$ResizeBack$$RotateBack"
23033 \begin_layout LyX-Code
23034 UpdateFormat pdftex
23037 \begin_layout LyX-Code
23038 UpdateResult "$$AbsPath$$Basename.pdftex_t"
23041 \begin_layout LyX-Code
23042 Requirement "graphicx"
23045 \begin_layout LyX-Code
23046 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
23049 \begin_layout LyX-Code
23050 ReferencedFile latex "$$AbsPath$$Basename.pdf"
23053 \begin_layout LyX-Code
23057 \begin_layout LyX-Code
23061 \begin_layout LyX-Code
23062 Product "[XFig: $$FName]"
23065 \begin_layout LyX-Code
23069 \begin_layout LyX-Code
23073 \begin_layout LyX-Code
23074 Product "<graphic fileref=
23076 "$$AbsOrRelPathMaster$$Basename.eps
23081 \begin_layout LyX-Code
23085 \begin_layout LyX-Code
23089 \begin_layout LyX-Code
23090 UpdateResult "$$AbsPath$$Basename.eps"
23093 \begin_layout LyX-Code
23094 ReferencedFile docbook "$$AbsPath$$Basename.eps"
23097 \begin_layout LyX-Code
23098 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
23101 \begin_layout LyX-Code
23105 \begin_layout LyX-Code
23109 \begin_layout Standard
23110 As you can see, the template is enclosed in
23111 \begin_inset Flex Code
23114 \begin_layout Plain Layout
23122 \begin_inset Flex Code
23125 \begin_layout Plain Layout
23132 It contains a header specifying some general settings and, for each supported
23133 primary document file format, a section
23134 \begin_inset Flex Code
23137 \begin_layout Plain Layout
23145 \begin_inset Flex Code
23148 \begin_layout Plain Layout
23157 \begin_layout Subsection
23158 The template header
23161 \begin_layout Description
23162 \begin_inset Flex Code
23165 \begin_layout Plain Layout
23166 AutomaticProduction
23167 \begin_inset space ~
23175 Whether the file represented by the template must be generated by \SpecialChar LyX
23177 This command must occur exactly once.
23180 \begin_layout Description
23181 \begin_inset Flex Code
23184 \begin_layout Plain Layout
23186 \begin_inset space ~
23194 A glob pattern that is used in the file dialog to filter out the desired
23196 If there is more than one possible file extension (e.
23197 \begin_inset space \thinspace{}
23201 \begin_inset space \space{}
23205 \begin_inset Flex Code
23208 \begin_layout Plain Layout
23215 \begin_inset Flex Code
23218 \begin_layout Plain Layout
23224 ), use something like
23225 \begin_inset Flex Code
23228 \begin_layout Plain Layout
23235 This command must occur exactly once.
23238 \begin_layout Description
23239 \begin_inset Flex Code
23242 \begin_layout Plain Layout
23244 \begin_inset space ~
23252 The text that is displayed on the button.
23253 This command must occur exactly once.
23256 \begin_layout Description
23257 \begin_inset Flex Code
23260 \begin_layout Plain Layout
23262 \begin_inset space ~
23266 \begin_inset space ~
23274 The help text that is used in the External dialog.
23275 Provide enough information to explain to the user just what the template
23276 can provide him with.
23277 This command must occur exactly once.
23280 \begin_layout Description
23281 \begin_inset Flex Code
23284 \begin_layout Plain Layout
23286 \begin_inset space ~
23294 The file format of the original file.
23295 This must be the name of a format that is known to \SpecialChar LyX
23297 \begin_inset CommandInset ref
23299 reference "sec:Formats"
23305 \begin_inset Quotes eld
23309 \begin_inset Flex Code
23312 \begin_layout Plain Layout
23319 \begin_inset Quotes erd
23322 if the template can handle original files of more than one format.
23324 will attempt to interrogate the file itself in order to deduce its format
23326 This command must occur exactly once.
23329 \begin_layout Description
23330 \begin_inset Flex Code
23333 \begin_layout Plain Layout
23335 \begin_inset space ~
23343 A unique name for the template.
23344 It must not contain substitution macros (see below).
23347 \begin_layout Description
23348 \begin_inset Flex Code
23351 \begin_layout Plain Layout
23353 \begin_inset space ~
23356 Rotate|Resize|Clip|Extra
23361 This command specifies which transformations are supported by this template.
23362 It may occur zero or more times.
23363 This command enables the corresponding tabs in the external dialog.
23365 \begin_inset Flex Code
23368 \begin_layout Plain Layout
23374 command must have either a corresponding
23375 \begin_inset Flex Code
23378 \begin_layout Plain Layout
23385 \begin_inset Flex Code
23388 \begin_layout Plain Layout
23395 \begin_inset Flex Code
23398 \begin_layout Plain Layout
23405 Otherwise the transformation will not be supported by that format.
23408 \begin_layout Subsection
23412 \begin_layout Description
23413 \begin_inset Flex Code
23416 \begin_layout Plain Layout
23418 \begin_inset space ~
23421 LaTeX|PDFLaTeX|PlainText|DocBook
23426 The primary document file format that this format definition is for.
23427 Not every template has a sensible representation in all document file formats.
23428 Please define nevertheless a
23429 \begin_inset Flex Code
23432 \begin_layout Plain Layout
23438 section for all templates.
23439 Use a dummy text when no representation is available.
23440 Then you can at least see a reference to the external material in the exported
23444 \begin_layout Description
23445 \begin_inset Flex Code
23448 \begin_layout Plain Layout
23450 \begin_inset space ~
23454 \begin_inset space ~
23462 This command defines an additional macro
23463 \begin_inset Flex Code
23466 \begin_layout Plain Layout
23472 for substitution in
23473 \begin_inset Flex Code
23476 \begin_layout Plain Layout
23484 \begin_inset Flex Code
23487 \begin_layout Plain Layout
23493 itself may contain substitution macros.
23494 The advantage over using
23495 \begin_inset Flex Code
23498 \begin_layout Plain Layout
23505 \begin_inset Flex Code
23508 \begin_layout Plain Layout
23514 is that the substituted value of
23515 \begin_inset Flex Code
23518 \begin_layout Plain Layout
23524 is sanitized so that it is a valid optional argument in the document format.
23525 This command may occur zero or more times.
23528 \begin_layout Description
23529 \begin_inset Flex Code
23532 \begin_layout Plain Layout
23534 \begin_inset space ~
23542 The text that is inserted in the exported document.
23543 This is actually the most important command and can be quite complex.
23544 This command must occur exactly once.
23547 \begin_layout Description
23548 \begin_inset Flex Code
23551 \begin_layout Plain Layout
23553 \begin_inset space ~
23561 This command specifies a preamble snippet that will be included in the
23564 It has to be defined using
23565 \begin_inset Flex Code
23568 \begin_layout Plain Layout
23576 \begin_inset Flex Code
23579 \begin_layout Plain Layout
23586 This command may occur zero or more times.
23589 \begin_layout Description
23590 \begin_inset Flex Code
23593 \begin_layout Plain Layout
23595 \begin_inset space ~
23599 \begin_inset space ~
23607 This command denotes files that are created by the conversion process and
23608 are needed for a particular export format.
23609 If the filename is relative, it is interpreted relative to the master document.
23610 This command may be given zero or more times.
23613 \begin_layout Description
23614 \begin_inset Flex Code
23617 \begin_layout Plain Layout
23619 \begin_inset space ~
23627 The name of a required \SpecialChar LaTeX
23629 The package is included via
23630 \begin_inset Flex Code
23633 \begin_layout Plain Layout
23641 in the \SpecialChar LaTeX
23643 This command may occur zero or more times.
23646 \begin_layout Description
23647 \begin_inset Flex Code
23650 \begin_layout Plain Layout
23652 \begin_inset space ~
23656 \begin_inset space ~
23659 RotationLatexCommand
23664 This command specifies that the built in \SpecialChar LaTeX
23665 command should be used for rotation.
23666 This command may occur once or not at all.
23669 \begin_layout Description
23670 \begin_inset Flex Code
23673 \begin_layout Plain Layout
23675 \begin_inset space ~
23679 \begin_inset space ~
23687 This command specifies that the built in \SpecialChar LaTeX
23688 command should be used for resizing.
23689 This command may occur once or not at all.
23692 \begin_layout Description
23693 \begin_inset Flex Code
23696 \begin_layout Plain Layout
23698 \begin_inset space ~
23702 \begin_inset space ~
23705 RotationLatexOption
23710 This command specifies that rotation is done via an optional argument.
23711 This command may occur once or not at all.
23714 \begin_layout Description
23715 \begin_inset Flex Code
23718 \begin_layout Plain Layout
23720 \begin_inset space ~
23724 \begin_inset space ~
23732 This command specifies that resizing is done via an optional argument.
23733 This command may occur once or not at all.
23736 \begin_layout Description
23737 \begin_inset Flex Code
23740 \begin_layout Plain Layout
23742 \begin_inset space ~
23746 \begin_inset space ~
23754 This command specifies that clipping is done via an optional argument.
23755 This command may occur once or not at all.
23758 \begin_layout Description
23759 \begin_inset Flex Code
23762 \begin_layout Plain Layout
23764 \begin_inset space ~
23768 \begin_inset space ~
23776 This command specifies that an extra optional argument is used.
23777 This command may occur once or not at all.
23780 \begin_layout Description
23781 \begin_inset Flex Code
23784 \begin_layout Plain Layout
23786 \begin_inset space ~
23794 The file format of the converted file.
23795 This must be the name of a format that is known to \SpecialChar LyX
23797 \begin_inset Flex Noun
23800 \begin_layout Plain Layout
23801 Tools\SpecialChar menuseparator
23802 Preferences\SpecialChar menuseparator
23803 File Handling\SpecialChar menuseparator
23810 This command must occur exactly once.
23811 If the resulting file format is PDF, you need to specify the format
23812 \begin_inset Flex Code
23815 \begin_layout Plain Layout
23822 This is the PDF format used for including graphics.
23823 The other defined PDF formats are for document export.
23826 \begin_layout Description
23827 \begin_inset Flex Code
23830 \begin_layout Plain Layout
23832 \begin_inset space ~
23840 The file name of the converted file.
23841 The file name must be absolute.
23842 This command must occur exactly once.
23845 \begin_layout Subsection
23846 Preamble definitions
23849 \begin_layout Standard
23850 The external template configuration file may contain additional preamble
23851 definitions enclosed by
23852 \begin_inset Flex Code
23855 \begin_layout Plain Layout
23863 \begin_inset Flex Code
23866 \begin_layout Plain Layout
23873 They can be used by the templates in the
23874 \begin_inset Flex Code
23877 \begin_layout Plain Layout
23886 \begin_layout Section
23887 The substitution mechanism
23890 \begin_layout Standard
23891 When the external material facility invokes an external program, it is done
23892 on the basis of a command defined in the template configuration file.
23893 These commands can contain various macros that are expanded before execution.
23894 Execution always take place in the directory of the containing document.
23897 \begin_layout Standard
23898 Also, whenever external material is to be displayed, the name will be produced
23899 by the substitution mechanism, and most other commands in the template
23900 definition support substitution as well.
23903 \begin_layout Standard
23904 The available macros are the following:
23907 \begin_layout Description
23908 \begin_inset Flex Code
23911 \begin_layout Plain Layout
23912 $$AbsOrRelPathMaster
23917 The file path, absolute or relative to the master \SpecialChar LyX
23921 \begin_layout Description
23922 \begin_inset Flex Code
23925 \begin_layout Plain Layout
23926 $$AbsOrRelPathParent
23931 The file path, absolute or relative to the \SpecialChar LyX
23935 \begin_layout Description
23936 \begin_inset Flex Code
23939 \begin_layout Plain Layout
23945 The absolute file path.
23948 \begin_layout Description
23949 \begin_inset Flex Code
23952 \begin_layout Plain Layout
23958 The filename without path and without the extension.
23961 \begin_layout Description
23962 \begin_inset Flex Code
23965 \begin_layout Plain Layout
23967 \begin_inset Quotes eld
23971 \begin_inset Quotes erd
23979 This macro will expand to the contents of the file with the name
23980 \begin_inset Flex Code
23983 \begin_layout Plain Layout
23992 \begin_layout Description
23993 \begin_inset Flex Code
23996 \begin_layout Plain Layout
24002 The file extension (including the dot).
24005 \begin_layout Description
24006 \begin_inset Flex Code
24009 \begin_layout Plain Layout
24015 This will be the string
24016 \begin_inset Quotes eld
24020 \begin_inset Quotes erd
24023 if the file is in JPEG format, otherwise it will be the string
24024 \begin_inset Quotes eld
24028 \begin_inset Quotes erd
24032 This is useful to avoid uneeded conversions for output formats that support
24033 both PNG and JPEG fomats.
24034 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
24039 \begin_layout Description
24040 \begin_inset Flex Code
24043 \begin_layout Plain Layout
24049 The filename of the file specified in the external material dialog.
24050 This is either an absolute name, or it is relative to the \SpecialChar LyX
24054 \begin_layout Description
24055 \begin_inset Flex Code
24058 \begin_layout Plain Layout
24065 \begin_inset Flex Code
24068 \begin_layout Plain Layout
24074 (absolute name or relative to the \SpecialChar LyX
24078 \begin_layout Description
24079 \begin_inset Flex Code
24082 \begin_layout Plain Layout
24088 The file path, relative to the master \SpecialChar LyX
24092 \begin_layout Description
24093 \begin_inset Flex Code
24096 \begin_layout Plain Layout
24102 The file path, relative to the \SpecialChar LyX
24106 \begin_layout Description
24107 \begin_inset Flex Code
24110 \begin_layout Plain Layout
24116 This macro will expand to the absolute path of the system directory.
24117 This is typically used to point to the various helper scripts that are
24118 bundled with \SpecialChar LyX
24122 \begin_layout Description
24123 \begin_inset Flex Code
24126 \begin_layout Plain Layout
24132 A name and full path to a temporary file which will be automatically deleted
24133 whenever the containing document is closed, or the external material insertion
24137 \begin_layout Standard
24138 All path macros contain a trailing directory separator, so you can construct
24140 \begin_inset space \thinspace{}
24144 \begin_inset space \space{}
24147 the absolute filename with
24148 \begin_inset Flex Code
24151 \begin_layout Plain Layout
24152 $$AbsPath$$Basename$$Extension
24160 \begin_layout Standard
24161 The macros above are substituted in all commands unless otherwise noted.
24163 \begin_inset Flex Code
24166 \begin_layout Plain Layout
24172 supports additionally the following substitutions if they are enabled by
24174 \begin_inset Flex Code
24177 \begin_layout Plain Layout
24184 \begin_inset Flex Code
24187 \begin_layout Plain Layout
24196 \begin_layout Description
24197 \begin_inset Flex Code
24200 \begin_layout Plain Layout
24206 The front part of the resize command.
24209 \begin_layout Description
24210 \begin_inset Flex Code
24213 \begin_layout Plain Layout
24219 The back part of the resize command.
24222 \begin_layout Description
24223 \begin_inset Flex Code
24226 \begin_layout Plain Layout
24232 The front part of the rotation command.
24235 \begin_layout Description
24236 \begin_inset Flex Code
24239 \begin_layout Plain Layout
24245 The back part of the rotation command.
24248 \begin_layout Standard
24249 The value string of the
24250 \begin_inset Flex Code
24253 \begin_layout Plain Layout
24259 command supports additionally the following substitutions if they are enabled
24261 \begin_inset Flex Code
24264 \begin_layout Plain Layout
24271 \begin_inset Flex Code
24274 \begin_layout Plain Layout
24283 \begin_layout Description
24284 \begin_inset Flex Code
24287 \begin_layout Plain Layout
24296 \begin_layout Description
24297 \begin_inset Flex Code
24300 \begin_layout Plain Layout
24309 \begin_layout Description
24310 \begin_inset Flex Code
24313 \begin_layout Plain Layout
24322 \begin_layout Description
24323 \begin_inset Flex Code
24326 \begin_layout Plain Layout
24332 The rotation option.
24335 \begin_layout Standard
24336 You may ask why there are so many path macros.
24337 There are mainly two reasons:
24340 \begin_layout Enumerate
24341 Relative and absolute file names should remain relative or absolute, respectivel
24343 Users may have reasons to prefer either form.
24344 Relative names are useful for portable documents that should work on different
24345 machines, for example.
24346 Absolute names may be required by some programs.
24349 \begin_layout Enumerate
24351 treats relative file names differently than \SpecialChar LyX
24352 and other programs in nested
24354 For \SpecialChar LyX
24355 , a relative file name is always relative to the document that contains
24357 For \SpecialChar LaTeX
24358 , it is always relative to the master document.
24359 These two definitions are identical if you have only one document, but
24360 differ if you have a master document that includes part documents.
24361 That means that relative filenames must be transformed when presented to
24364 Fortunately \SpecialChar LyX
24365 does this automatically for you if you choose the right macros.
24368 \begin_layout Standard
24369 So which path macro should be used in new template definitions? The rule
24373 \begin_layout Itemize
24375 \begin_inset Flex Code
24378 \begin_layout Plain Layout
24384 if an absolute path is required.
24387 \begin_layout Itemize
24389 \begin_inset Flex Code
24392 \begin_layout Plain Layout
24393 $$AbsOrRelPathMaster
24398 if the substituted string is some kind of \SpecialChar LaTeX
24402 \begin_layout Itemize
24404 \begin_inset Flex Code
24407 \begin_layout Plain Layout
24408 $$AbsOrRelPathParent
24413 in order to preserve the user's choice.
24416 \begin_layout Standard
24417 There are special cases where this rule does not work and e.
24418 \begin_inset space \thinspace{}
24422 \begin_inset space \space{}
24425 relative names are needed, but normally it will work just fine.
24426 One example for such a case is the command
24427 \begin_inset Flex Code
24430 \begin_layout Plain Layout
24431 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24436 in the XFig template above: We can't use the absolute name because the
24438 \begin_inset Flex Code
24441 \begin_layout Plain Layout
24447 files needs the relative name in order to rewrite the file content.
24450 \begin_layout Section
24451 Security discussion
24452 \begin_inset CommandInset label
24454 name "sec:Security-discussion"
24461 \begin_layout Standard
24462 The external material feature interfaces with a lot of external programs
24463 and does so automatically, so we have to consider the security implications
24465 In particular, since you have the option of including your own filenames
24466 and/or parameter strings and those are expanded into a command, it seems
24467 that it would be possible to create a malicious document which executes
24468 arbitrary commands when a user views or prints the document.
24469 This is something we definitely want to avoid.
24472 \begin_layout Standard
24473 However, since the external program commands are specified in the template
24474 configuration file only, there are no security issues if \SpecialChar LyX
24475 is properly configure
24476 d with safe templates only.
24477 This is so because the external programs are invoked with the
24478 \begin_inset Flex Code
24481 \begin_layout Plain Layout
24487 -system call rather than the
24488 \begin_inset Flex Code
24491 \begin_layout Plain Layout
24497 system-call, so it's not possible to execute arbitrary commands from the
24498 filename or parameter section via the shell.
24501 \begin_layout Standard
24502 This also implies that you are restricted in what command strings you can
24503 use in the external material templates.
24504 In particular, pipes and redirection are not readily available.
24505 This has to be so if \SpecialChar LyX
24506 should remain safe.
24507 If you want to use some of the shell features, you should write a safe
24508 script to do this in a controlled manner, and then invoke the script from
24509 the command string.
24513 \begin_layout Standard
24514 It is possible to design a template that interacts directly with the shell,
24515 but since this would allow a malicious user to execute arbitrary commands
24516 by writing clever filenames and/or parameters, we generally recommend that
24517 you only use safe scripts that work with the
24518 \begin_inset Flex Code
24521 \begin_layout Plain Layout
24527 system call in a controlled manner.
24528 Of course, for use in a controlled environment, it can be tempting to just
24529 fall back to use ordinary shell scripts.
24530 If you do so, be aware that you
24534 provide an easily exploitable security hole in your system.
24535 Of course it stands to reason that such unsafe templates will never be
24536 included in the standard \SpecialChar LyX
24537 distribution, although we do encourage people
24538 to submit new templates in the open source tradition.
24539 But \SpecialChar LyX
24540 as shipped from the official distribution channels will never have
24544 \begin_layout Standard
24545 Including external material provides a lot of power, and you have to be
24546 careful not to introduce security hazards with this power.
24547 A subtle error in a single line in an innocent looking script can open
24548 the door to huge security problems.
24549 So if you do not fully understand the issues, we recommend that you consult
24550 a knowledgeable security professional or the \SpecialChar LyX
24551 development team if you have
24552 any questions about whether a given template is safe or not.
24553 And do this before you use it in an uncontrolled environment.
24556 \begin_layout Chapter
24558 List of supported \SpecialChar LyX
24559 functions to be used in layouts
24560 \begin_inset CommandInset label
24562 name "chap:List-of-functions"
24569 \begin_layout Standard
24571 \begin_inset Tabular
24572 <lyxtabular version="3" rows="11" columns="8">
24573 <features tabularvalignment="middle">
24574 <column alignment="left" valignment="top">
24575 <column alignment="left" valignment="top">
24576 <column alignment="left" valignment="top">
24577 <column alignment="left" valignment="top">
24578 <column alignment="left" valignment="top">
24579 <column alignment="left" valignment="top">
24580 <column alignment="left" valignment="top">
24581 <column alignment="left" valignment="top">
24583 <cell alignment="left" valignment="top" usebox="none">
24586 \begin_layout Plain Layout
24592 <cell alignment="left" valignment="top" usebox="none">
24595 \begin_layout Plain Layout
24601 <cell alignment="left" valignment="top" usebox="none">
24604 \begin_layout Plain Layout
24610 <cell alignment="left" valignment="top" usebox="none">
24613 \begin_layout Plain Layout
24619 <cell alignment="center" valignment="top" usebox="none">
24622 \begin_layout Plain Layout
24628 <cell alignment="center" valignment="top" usebox="none">
24631 \begin_layout Plain Layout
24637 <cell alignment="center" valignment="top" usebox="none">
24640 \begin_layout Plain Layout
24646 <cell alignment="center" valignment="top" usebox="none">
24649 \begin_layout Plain Layout
24657 <cell alignment="left" valignment="top" usebox="none">
24660 \begin_layout Plain Layout
24666 <cell alignment="left" valignment="top" usebox="none">
24669 \begin_layout Plain Layout
24675 <cell alignment="left" valignment="top" usebox="none">
24678 \begin_layout Plain Layout
24684 <cell alignment="left" valignment="top" usebox="none">
24687 \begin_layout Plain Layout
24693 <cell alignment="center" valignment="top" usebox="none">
24696 \begin_layout Plain Layout
24702 <cell alignment="center" valignment="top" usebox="none">
24705 \begin_layout Plain Layout
24711 <cell alignment="center" valignment="top" usebox="none">
24714 \begin_layout Plain Layout
24720 <cell alignment="center" valignment="top" usebox="none">
24723 \begin_layout Plain Layout
24731 <cell alignment="left" valignment="top" usebox="none">
24734 \begin_layout Plain Layout
24740 <cell alignment="left" valignment="top" usebox="none">
24743 \begin_layout Plain Layout
24749 <cell alignment="left" valignment="top" usebox="none">
24752 \begin_layout Plain Layout
24758 <cell alignment="left" valignment="top" usebox="none">
24761 \begin_layout Plain Layout
24767 <cell alignment="center" valignment="top" usebox="none">
24770 \begin_layout Plain Layout
24776 <cell alignment="center" valignment="top" usebox="none">
24779 \begin_layout Plain Layout
24785 <cell alignment="center" valignment="top" usebox="none">
24788 \begin_layout Plain Layout
24794 <cell alignment="center" valignment="top" usebox="none">
24797 \begin_layout Plain Layout
24805 <cell alignment="left" valignment="top" usebox="none">
24808 \begin_layout Plain Layout
24814 <cell alignment="left" valignment="top" usebox="none">
24817 \begin_layout Plain Layout
24823 <cell alignment="left" valignment="top" usebox="none">
24826 \begin_layout Plain Layout
24832 <cell alignment="left" valignment="top" usebox="none">
24835 \begin_layout Plain Layout
24841 <cell alignment="center" valignment="top" usebox="none">
24844 \begin_layout Plain Layout
24850 <cell alignment="center" valignment="top" usebox="none">
24853 \begin_layout Plain Layout
24859 <cell alignment="center" valignment="top" usebox="none">
24862 \begin_layout Plain Layout
24868 <cell alignment="center" valignment="top" usebox="none">
24871 \begin_layout Plain Layout
24879 <cell alignment="left" valignment="top" usebox="none">
24882 \begin_layout Plain Layout
24888 <cell alignment="left" valignment="top" usebox="none">
24891 \begin_layout Plain Layout
24897 <cell alignment="left" valignment="top" usebox="none">
24900 \begin_layout Plain Layout
24906 <cell alignment="left" valignment="top" usebox="none">
24909 \begin_layout Plain Layout
24915 <cell alignment="center" valignment="top" usebox="none">
24918 \begin_layout Plain Layout
24924 <cell alignment="center" valignment="top" usebox="none">
24927 \begin_layout Plain Layout
24933 <cell alignment="center" valignment="top" usebox="none">
24936 \begin_layout Plain Layout
24942 <cell alignment="center" valignment="top" usebox="none">
24945 \begin_layout Plain Layout
24953 <cell alignment="left" valignment="top" usebox="none">
24956 \begin_layout Plain Layout
24962 <cell alignment="left" valignment="top" usebox="none">
24965 \begin_layout Plain Layout
24971 <cell alignment="left" valignment="top" usebox="none">
24974 \begin_layout Plain Layout
24980 <cell alignment="left" valignment="top" usebox="none">
24983 \begin_layout Plain Layout
24989 <cell alignment="center" valignment="top" usebox="none">
24992 \begin_layout Plain Layout
24998 <cell alignment="center" valignment="top" usebox="none">
25001 \begin_layout Plain Layout
25007 <cell alignment="center" valignment="top" usebox="none">
25010 \begin_layout Plain Layout
25016 <cell alignment="center" valignment="top" usebox="none">
25019 \begin_layout Plain Layout
25027 <cell alignment="left" valignment="top" usebox="none">
25030 \begin_layout Plain Layout
25036 <cell alignment="left" valignment="top" usebox="none">
25039 \begin_layout Plain Layout
25045 <cell alignment="left" valignment="top" usebox="none">
25048 \begin_layout Plain Layout
25054 <cell alignment="left" valignment="top" usebox="none">
25057 \begin_layout Plain Layout
25063 <cell alignment="center" valignment="top" usebox="none">
25066 \begin_layout Plain Layout
25072 <cell alignment="center" valignment="top" usebox="none">
25075 \begin_layout Plain Layout
25081 <cell alignment="center" valignment="top" usebox="none">
25084 \begin_layout Plain Layout
25090 <cell alignment="center" valignment="top" usebox="none">
25093 \begin_layout Plain Layout
25101 <cell alignment="left" valignment="top" usebox="none">
25104 \begin_layout Plain Layout
25110 <cell alignment="left" valignment="top" usebox="none">
25113 \begin_layout Plain Layout
25119 <cell alignment="left" valignment="top" usebox="none">
25122 \begin_layout Plain Layout
25128 <cell alignment="left" valignment="top" usebox="none">
25131 \begin_layout Plain Layout
25137 <cell alignment="center" valignment="top" usebox="none">
25140 \begin_layout Plain Layout
25146 <cell alignment="center" valignment="top" usebox="none">
25149 \begin_layout Plain Layout
25155 <cell alignment="center" valignment="top" usebox="none">
25158 \begin_layout Plain Layout
25164 <cell alignment="center" valignment="top" usebox="none">
25167 \begin_layout Plain Layout
25175 <cell alignment="left" valignment="top" usebox="none">
25178 \begin_layout Plain Layout
25184 <cell alignment="left" valignment="top" usebox="none">
25187 \begin_layout Plain Layout
25193 <cell alignment="left" valignment="top" usebox="none">
25196 \begin_layout Plain Layout
25202 <cell alignment="left" valignment="top" usebox="none">
25205 \begin_layout Plain Layout
25211 <cell alignment="center" valignment="top" usebox="none">
25214 \begin_layout Plain Layout
25220 <cell alignment="center" valignment="top" usebox="none">
25223 \begin_layout Plain Layout
25229 <cell alignment="center" valignment="top" usebox="none">
25232 \begin_layout Plain Layout
25238 <cell alignment="center" valignment="top" usebox="none">
25241 \begin_layout Plain Layout
25249 <cell alignment="left" valignment="top" usebox="none">
25252 \begin_layout Plain Layout
25258 <cell alignment="left" valignment="top" usebox="none">
25261 \begin_layout Plain Layout
25267 <cell alignment="left" valignment="top" usebox="none">
25270 \begin_layout Plain Layout
25276 <cell alignment="left" valignment="top" usebox="none">
25279 \begin_layout Plain Layout
25285 <cell alignment="center" valignment="top" usebox="none">
25288 \begin_layout Plain Layout
25294 <cell alignment="center" valignment="top" usebox="none">
25297 \begin_layout Plain Layout
25303 <cell alignment="center" valignment="top" usebox="none">
25306 \begin_layout Plain Layout
25312 <cell alignment="center" valignment="top" usebox="none">
25315 \begin_layout Plain Layout
25323 <cell alignment="center" valignment="top" usebox="none">
25326 \begin_layout Plain Layout
25332 <cell alignment="center" valignment="top" usebox="none">
25335 \begin_layout Plain Layout
25341 <cell alignment="center" valignment="top" usebox="none">
25344 \begin_layout Plain Layout
25350 <cell alignment="center" valignment="top" usebox="none">
25353 \begin_layout Plain Layout
25359 <cell alignment="center" valignment="top" usebox="none">
25362 \begin_layout Plain Layout
25368 <cell alignment="center" valignment="top" usebox="none">
25371 \begin_layout Plain Layout
25377 <cell alignment="center" valignment="top" usebox="none">
25380 \begin_layout Plain Layout
25386 <cell alignment="center" valignment="top" usebox="none">
25389 \begin_layout Plain Layout
25403 \begin_layout Chapter
25404 Names of available colors to be used in layouts
25405 \begin_inset CommandInset label
25407 name "chap:Names-of-colors"
25414 \begin_layout Standard
25415 The colors listed here are the standard colors and the those that you can
25416 adjust in the \SpecialChar LyX
25420 \begin_layout Description
25433 No particular color – clear or default
25436 \begin_layout Description
25440 \begin_layout Description
25444 \begin_layout Description
25448 \begin_layout Description
25452 \begin_layout Description
25456 \begin_layout Description
25460 \begin_layout Description
25464 \begin_layout Description
25468 \begin_layout Description
25469 added_space Added space marker color
25472 \begin_layout Description
25473 addedtext Added text color
25476 \begin_layout Description
25477 appendix Appendix marker color
25480 \begin_layout Description
25481 background Background color
25484 \begin_layout Description
25485 bottomarea Bottom area color
25488 \begin_layout Description
25489 branchlabel Label color for branches
25492 \begin_layout Description
25493 buttonbg Color used for button background
25496 \begin_layout Description
25497 buttonhoverbg Color used for button background under focus
25500 \begin_layout Description
25501 buttonframe Color for inset button frames
25504 \begin_layout Description
25505 changebar Changebar color
25508 \begin_layout Description
25509 changedtextauthor1 Changed text color author 1
25512 \begin_layout Description
25513 changedtextauthor2 Changed text color author 2
25516 \begin_layout Description
25517 changedtextauthor3 Changed text color author 3
25520 \begin_layout Description
25521 changedtextauthor4 Changed text color author 4
25524 \begin_layout Description
25525 changedtextauthor5 Changed text color author 5
25528 \begin_layout Description
25529 collapsable_inset_frame Collapsable insets framecolor
25532 \begin_layout Description
25533 collapsable_inset_text Collapsable insets text color
25536 \begin_layout Description
25537 command Text color for command insets
25540 \begin_layout Description
25541 commandbg Background color for command insets
25544 \begin_layout Description
25545 commandframe Frame color for command insets
25548 \begin_layout Description
25549 comment color for comments
25552 \begin_layout Description
25553 commentbg Background color of comments
25556 \begin_layout Description
25557 cursor Cursor color
25560 \begin_layout Description
25561 deletedtext Deleted text color
25564 \begin_layout Description
25565 deletedtextmodifier Deleted text modifying color
25568 \begin_layout Description
25569 depthbar Color for the depth bars in the margin
25572 \begin_layout Description
25573 eolmarker End of line marker color
25576 \begin_layout Description
25577 error Color of the \SpecialChar LaTeX
25581 \begin_layout Description
25582 footlabel Label color for footnotes
25585 \begin_layout Description
25586 graphicsbg Graphics inset background color
25589 \begin_layout Description
25590 greyedout Label color for greyedout insets
25593 \begin_layout Description
25594 greyedoutbg Background color of greyedout inset
25597 \begin_layout Description
25598 greyedouttext Color for greyedout inset text
25601 \begin_layout Description
25602 indexlabel Label color for index insets
25605 \begin_layout Description
25606 ignore The color is ignored
25609 \begin_layout Description
25610 inherit The color is inherited
25613 \begin_layout Description
25614 inlinecompletion Inline completion color
25617 \begin_layout Description
25618 insetbg Inset marker background color
25621 \begin_layout Description
25622 insetframe Inset marker frame color
25625 \begin_layout Description
25626 language Color for marking foreign language words
25629 \begin_layout Description
25630 latex Text color in \SpecialChar LaTeX
25634 \begin_layout Description
25635 listingsbg Background color of listings inset
25638 \begin_layout Description
25639 marginlabel Label color for margin notes
25642 \begin_layout Description
25643 math Math inset text color
25646 \begin_layout Description
25647 mathbg Math inset background color
25650 \begin_layout Description
25651 mathcorners Math inset frame color not under focus
25654 \begin_layout Description
25655 mathframe Math inset frame color under focus
25658 \begin_layout Description
25659 mathline Math line color
25662 \begin_layout Description
25663 mathmacrobg Macro math inset background color
25666 \begin_layout Description
25667 mathmacroblend Macro math blended color
25670 \begin_layout Description
25671 mathmacroframe Macro math frame color
25674 \begin_layout Description
25675 mathmacrohoverbg Macro math inset background color hovered
25678 \begin_layout Description
25679 mathmacrolabel Macro math label color
25682 \begin_layout Description
25683 mathmacronewarg Macro template color for new parameters
25686 \begin_layout Description
25687 mathmacrooldarg Macro template color for old parameters
25690 \begin_layout Description
25691 newpage New page color
25694 \begin_layout Description
25695 nonunique_inlinecompletion Inline completion color for the non-unique part
25698 \begin_layout Description
25699 notebg Background color of notes
25702 \begin_layout Description
25703 notelabel Label color for notes
25706 \begin_layout Description
25707 pagebreak Page break/line break color
25710 \begin_layout Description
25711 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25714 \begin_layout Description
25715 phantomtext Text color for phantom insets
25718 \begin_layout Description
25719 preview The color used for previews
25722 \begin_layout Description
25723 previewframe Preview frame color
25726 \begin_layout Description
25727 regexpframe Color for regexp frame
25730 \begin_layout Description
25731 selection Background color of selected text
25734 \begin_layout Description
25735 selectiontext Foreground color of selected text
25738 \begin_layout Description
25739 shadedbg Background color of shaded box
25742 \begin_layout Description
25743 special Special chars text color
25746 \begin_layout Description
25747 tabularline Table line color
25750 \begin_layout Description
25751 tabularonoffline Table line color
25754 \begin_layout Description
25755 urllabel Label color for URL insets
25758 \begin_layout Description
25759 urltext Color for URL inset text