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 true
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
6028 \begin_inset Separator parbreak
6035 \begin_layout Enumerate
6036 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
6037 for all users on your system, then install it in your `local' \SpecialChar TeX
6039 install it in your own `user' \SpecialChar TeX
6041 Where these trees should be created, if they do not already exist, depends
6043 To find this out, look in the file
6044 \begin_inset Flex Code
6047 \begin_layout Plain Layout
6057 \begin_layout Plain Layout
6058 This is usually in the directory
6059 \begin_inset Flex Code
6062 \begin_layout Plain Layout
6068 , though you can execute the command
6069 \begin_inset Flex Code
6072 \begin_layout Plain Layout
6083 The location of the `local' \SpecialChar TeX
6084 tree is defined by the
6085 \begin_inset Flex Code
6088 \begin_layout Plain Layout
6094 variable; this is usually somewhere like
6095 \begin_inset Flex Code
6098 \begin_layout Plain Layout
6099 /usr/local/share/texmf
6104 or /usr/local/texlive/XXXX where XXXX is the year of the installed \SpecialChar TeX
6107 The location of the `user' \SpecialChar TeX
6109 \begin_inset Flex Code
6112 \begin_layout Plain Layout
6119 \begin_inset Flex Code
6122 \begin_layout Plain Layout
6129 \begin_inset Flex Code
6132 \begin_layout Plain Layout
6142 (If these variables are not predefined, you have to define them.) You'll
6143 probably need root permissions to create or modify the `local' tree, but
6144 not for your `user' tree.
6145 \begin_inset Newline newline
6148 In general, it is recommended to install in the user tree because your user
6149 will not be modified or even overwritten when you upgrade your system.
6150 It will typically also be backed up together with everything else when
6151 you backup your home directory (which, of course, you do on a regular basis).
6154 \begin_layout Enumerate
6155 On Windows, if you want the new package to be available for all users on
6156 your system, change to the folder where \SpecialChar LaTeX
6157 is installed and then change to
6159 \begin_inset Flex Code
6162 \begin_layout Plain Layout
6173 (For MiK\SpecialChar TeX
6174 , this would be by default the folder
6175 \begin_inset Flex Code
6178 \begin_layout Plain Layout
6196 \begin_layout Plain Layout
6197 Note that this will be the correct path only on English installations.
6198 On a German one, it would be
6199 \begin_inset Flex Code
6202 \begin_layout Plain Layout
6216 , and similarly for other languages.
6221 Create there a new folder
6222 \begin_inset Flex Code
6225 \begin_layout Plain Layout
6231 and copy all files of the package into it.
6233 \begin_inset Newline newline
6236 If the package should only available for you or you don't have admin permissions
6237 , do the same, but in the local \SpecialChar LaTeX
6240 \begin_inset space \thinspace{}
6243 g., for MiK\SpecialChar TeX
6245 \begin_inset space ~
6248 2.8 under Windows XP, this would be the folder:
6249 \begin_inset Newline newline
6255 \begin_inset Flex Code
6258 \begin_layout Plain Layout
6261 Documents and Settings
6273 \begin_inset Newline newline
6279 \begin_inset Phantom HPhantom
6282 \begin_layout Plain Layout
6293 \begin_inset Flex Code
6296 \begin_layout Plain Layout
6309 \begin_inset Newline newline
6312 On Vista, it would be:
6313 \begin_inset Newline newline
6317 \begin_inset Flex Code
6320 \begin_layout Plain Layout
6346 \begin_layout Enumerate
6347 Now one only need to tell \SpecialChar LaTeX
6348 that there are new files.
6349 This depends on the used \SpecialChar LaTeX
6351 \begin_inset Separator parbreak
6358 \begin_layout Enumerate
6359 For \SpecialChar TeX
6360 Live execute the command
6361 \begin_inset Flex Code
6364 \begin_layout Plain Layout
6371 If you installed the package for all users, then you will probably need
6372 to have root permissions for that.
6375 \begin_layout Enumerate
6376 For MiK\SpecialChar TeX
6377 , if you have installed the package for all users, start the program
6379 \begin_inset Quotes eld
6383 \begin_inset space ~
6387 \begin_inset Quotes erd
6390 and press the button marked
6391 \begin_inset Quotes eld
6395 \begin_inset Quotes erd
6399 Otherwise start the program
6400 \begin_inset Quotes eld
6404 \begin_inset Quotes erd
6411 \begin_layout Enumerate
6412 Finally, you need to tell \SpecialChar LyX
6413 that there are new packages available.
6414 So, in \SpecialChar LyX
6416 \begin_inset Flex Noun
6419 \begin_layout Plain Layout
6422 \SpecialChar menuseparator
6428 and then restart \SpecialChar LyX
6432 \begin_layout Standard
6433 Now the package is installed.
6434 In our example, the document class
6435 \begin_inset Flex Code
6438 \begin_layout Plain Layout
6440 \begin_inset space ~
6448 will now be available under
6449 \begin_inset Flex Noun
6452 \begin_layout Plain Layout
6453 Document\SpecialChar menuseparator
6454 Settings\SpecialChar menuseparator
6464 \begin_layout Standard
6465 If you would like to use a \SpecialChar LaTeX
6466 document class that is not even listed in the
6468 \begin_inset Flex Noun
6471 \begin_layout Plain Layout
6472 Document\SpecialChar menuseparator
6473 Settings\SpecialChar menuseparator
6479 , then you need to create a `layout' file for it.
6480 That is the topic of the next section.
6483 \begin_layout Section
6484 Types of layout files
6487 \begin_layout Standard
6488 This section describes the various sorts of \SpecialChar LyX
6489 files that contain layout informati
6491 These files describe various paragraph and character styles, determining
6492 how \SpecialChar LyX
6493 should display them and how they should be translated into \SpecialChar LaTeX
6495 XHTML, or whatever output format is being used.
6499 \begin_layout Standard
6500 We shall try to provide a thorough description of the process of writing
6502 However, there are so many different types of documents supported even
6503 by just \SpecialChar LaTeX
6504 that we can't hope to cover every different possibility or problem
6505 you might encounter.
6506 The \SpecialChar LyX
6507 users' list is frequented by people with lots of experience with layout
6508 design who are willing to share what they've learned, so please feel free
6509 to ask questions there.
6512 \begin_layout Standard
6513 As you prepare to write a new layout, it is extremely helpful to look at
6514 the layouts distributed with \SpecialChar LyX
6516 If you write a \SpecialChar LyX
6517 layout for a \SpecialChar LaTeX
6518 document class that might also be used by
6519 others, or write a module that might be useful to others, then you should
6520 consider posting your layout to the
6521 \begin_inset CommandInset href
6523 name "layout section on the LyX wiki"
6524 target "http://wiki.lyx.org/Layouts/Layouts"
6528 or even to the \SpecialChar LyX
6529 developers' list, so that it might be included in \SpecialChar LyX
6534 \begin_layout Plain Layout
6535 Note that \SpecialChar LyX
6536 is licensed under the General Public License, so any material
6537 that is contributed to \SpecialChar LyX
6538 must be similarly licensed.
6546 \begin_layout Subsection
6548 \begin_inset CommandInset label
6550 name "subsec:Layout-modules"
6557 \begin_layout Standard
6558 We have spoken to this point about `layout files'.
6559 But there are different sorts of files that contain layout information.
6560 Layout files, strictly so called, have the
6561 \begin_inset Flex Code
6564 \begin_layout Plain Layout
6570 extension and provide \SpecialChar LyX
6571 with information about document classes.
6572 Since \SpecialChar LyX
6573 1.6 layout information can also be contained in layout
6578 \begin_inset Flex Code
6581 \begin_layout Plain Layout
6588 Modules are to \SpecialChar LaTeX
6589 packages much as layouts are to \SpecialChar LaTeX
6590 classes, and some modules—such
6592 \begin_inset Flex Code
6595 \begin_layout Plain Layout
6601 module—specifically provide support for one package.
6602 In a sense, layout modules are similar to included
6606 \begin_layout Plain Layout
6607 These can have any extension, but by convention have the
6608 \begin_inset Flex Code
6611 \begin_layout Plain Layout
6623 \begin_inset Flex Code
6626 \begin_layout Plain Layout
6632 —in that modules are not specific to a given document class but may be used
6633 with many different classes.
6634 The difference is that using an included file with
6635 \begin_inset Flex Code
6638 \begin_layout Plain Layout
6644 requires editing that file.
6645 Modules, by contrast, are selected in the
6646 \begin_inset Flex Noun
6649 \begin_layout Plain Layout
6650 Document\SpecialChar menuseparator
6659 \begin_layout Standard
6660 Building modules is the easiest way to get started with layout editing,
6661 since it can be as simple as adding a single new paragraph style or flex
6663 But modules may, in principle, contain anything a layout file can contain.
6666 \begin_layout Standard
6667 After creating a new module and copying it to the
6668 \begin_inset Flex Code
6671 \begin_layout Plain Layout
6677 folder, you will need to reconfigure and then restart \SpecialChar LyX
6680 However, changes you make to the module will be seen immediately, if you
6682 \begin_inset Flex Noun
6685 \begin_layout Plain Layout
6686 Document\SpecialChar menuseparator
6692 , highlight something, and then hit
6693 \begin_inset Quotes eld
6697 \begin_inset Quotes erd
6703 It is strongly recommended that you save your work before doing this
6708 it is strongly recommended that you not attempt to edit modules while simultaneo
6709 usly working on actual documents
6712 Though of course the developers strive to keep \SpecialChar LyX
6713 stable in such situations,
6714 syntax errors and the like in your module file could cause strange behavior.
6717 \begin_layout Subsubsection
6721 \begin_layout Standard
6722 Modules are to \SpecialChar LyX
6723 as packages are to \SpecialChar LaTeX
6725 Sometimes, however, you find yourself wanting a specific inset or character
6726 style just for one document and writing a module that will also be available
6727 to other documents makes little sense.
6728 What you need is \SpecialChar LyX
6730 \begin_inset Quotes eld
6734 \begin_inset Quotes erd
6740 \begin_layout Standard
6741 You will find it under
6743 Document\SpecialChar menuseparator
6744 Settings\SpecialChar menuseparator
6748 The large text box allows you to enter anything that you might enter in
6749 a layout file or module.
6750 You can think of a document's local layout, in fact, as a module that belongs
6752 So, in particular, you must enter a
6753 \begin_inset Flex Code
6756 \begin_layout Plain Layout
6763 Any format is acceptable, but one would normally use the format current
6765 (In \SpecialChar LyX
6766 2.1, the current layout format is 48.) You should be aware that local
6767 layout is not supported by versions of \SpecialChar LyX
6768 prior to 1.6, so you should not
6769 use it if you want to be able to export your document to \SpecialChar LyX
6771 (without, that is, losing the local layout information).
6772 If you wish to be able to export to 1.6—local layout is supported in 1.6,
6773 though there is no UI for it—then you should use format 11 and, of course,
6774 use only layout constructs that were available in \SpecialChar LyX
6778 \begin_layout Standard
6779 When you have entered something in the
6780 \begin_inset Flex Code
6783 \begin_layout Plain Layout
6789 pane, \SpecialChar LyX
6791 \begin_inset Quotes eld
6795 \begin_inset Quotes erd
6798 button at the bottom.
6799 Clicking this button will cause \SpecialChar LyX
6800 to determine whether what you have entered
6801 is valid layout information for the chosen format.
6803 will report the result but, unfortunately, will not tell you what errors
6804 there might have been.
6805 These will be written to the terminal, however, if \SpecialChar LyX
6806 is started from a terminal.
6807 You will not be permitted to save your local layout until you have entered
6811 \begin_layout Standard
6812 The warnings at the end of the previous section apply here, too.
6813 Do not play with local layout while you are actually working, especially
6814 if you have not saved your document.
6815 That said, using local layout with a test document can be a very convenient
6816 way to try out layout ideas, or even to start developing a module.
6819 \begin_layout Subsection
6821 \begin_inset Flex Noun
6824 \begin_layout Plain Layout
6833 \begin_layout Standard
6834 There are two situations you are likely to encounter when wanting to support
6835 a new \SpecialChar LaTeX
6836 document class, involving style (
6837 \begin_inset Flex Code
6840 \begin_layout Plain Layout
6846 ) files and \SpecialChar LaTeX2e
6848 \begin_inset Flex Code
6851 \begin_layout Plain Layout
6858 Supporting a style file is usually fairly easy.
6859 Supporting a new class file is a bit harder.
6860 We'll discuss the former in this section and the latter in the next.
6861 Similar remarks apply, of course, if you want to support a new DocBook
6865 \begin_layout Standard
6866 The easier case is the one in which your new document class is provided
6867 as a style file that is to be used in conjunction with an already supported
6869 For the sake of the example, we'll assume that the style file is called
6871 \begin_inset Flex Noun
6874 \begin_layout Plain Layout
6880 and that it is meant to be used with
6881 \begin_inset Flex Noun
6884 \begin_layout Plain Layout
6890 , which is a standard class.
6894 \begin_layout Standard
6895 Start by copying the existing class's layout file into your local directory:
6899 \begin_layout Plain Layout
6900 Of course, which directory is your local directory will vary by platform,
6901 and \SpecialChar LyX
6902 allows you to specify your local directory on startup, too, using
6904 \begin_inset Flex Code
6907 \begin_layout Plain Layout
6921 \begin_layout LyX-Code
6922 cp report.layout ~/.lyx/layouts/myclass.layout
6925 \begin_layout Standard
6927 \begin_inset Flex Code
6930 \begin_layout Plain Layout
6936 and change the line:
6939 \begin_layout LyX-Code
6942 Declare\SpecialChar LaTeX
6946 \begin_layout Standard
6950 \begin_layout LyX-Code
6953 Declare\SpecialChar LaTeX
6954 Class[report, myclass.sty]{report (myclass)}
6957 \begin_layout Standard
6961 \begin_layout LyX-Code
6963 \begin_inset Newline newline
6969 \begin_inset Newline newline
6975 \begin_layout Standard
6976 near the top of the file.
6979 \begin_layout Standard
6980 Start \SpecialChar LyX
6982 \begin_inset Flex Noun
6985 \begin_layout Plain Layout
6986 Tools\SpecialChar menuseparator
6993 Then restart \SpecialChar LyX
6994 and try creating a new document.
6996 \begin_inset Flex Noun
6999 \begin_layout Plain Layout
7005 " as a document class option in the
7006 \begin_inset Flex Noun
7009 \begin_layout Plain Layout
7010 Document\SpecialChar menuseparator
7017 It is likely that some of the sectioning commands and such in your new
7018 class will work differently from how they worked in the base class—
7019 \begin_inset Flex Code
7022 \begin_layout Plain Layout
7028 in this example—so you can fiddle around with the settings for the different
7029 sections if you wish.
7030 The layout information for sections is contained in
7031 \begin_inset Flex Code
7034 \begin_layout Plain Layout
7040 , but you do not need to copy and change this file.
7041 Instead, you can simply add your changes to your layout file, after the
7043 \begin_inset Flex Code
7046 \begin_layout Plain Layout
7052 , which itself includes
7053 \begin_inset Flex Code
7056 \begin_layout Plain Layout
7063 For example, you might add these lines:
7066 \begin_layout LyX-Code
7070 \begin_layout LyX-Code
7074 \begin_layout LyX-Code
7078 \begin_layout LyX-Code
7082 \begin_layout LyX-Code
7086 \begin_layout Standard
7087 to change the font for chapter headings to sans-serif.
7088 This will override (or, in this case, add to) the existing declaration
7089 for the Chapter style.
7093 \begin_layout Standard
7094 Your new package may also provide commands or environments not present in
7096 In this case, you will want to add these to the layout file.
7098 \begin_inset CommandInset ref
7100 reference "sec:TextClass"
7104 for information on how to do so.
7107 \begin_layout Standard
7109 \begin_inset Flex Noun
7112 \begin_layout Plain Layout
7118 can be used with several different document classes, and even if it cannot,
7119 you might find it easiest just to write a module that you can load with
7121 The simplest possible such module would be:
7124 \begin_layout LyX-Code
7127 DeclareLyXModule{My Package}
7130 \begin_layout LyX-Code
7134 \begin_layout LyX-Code
7135 #Support for mypkg.sty.
7138 \begin_layout LyX-Code
7140 \begin_inset Newline newline
7146 \begin_layout LyX-Code
7148 \begin_inset Newline newline
7154 \begin_layout LyX-Code
7156 \begin_inset Newline newline
7162 \begin_inset Newline newline
7168 \begin_layout Standard
7169 A more complex module might modify the behavior of some existing constructs
7170 or define some new ones.
7172 \begin_inset CommandInset ref
7174 reference "sec:TextClass"
7181 \begin_layout Subsection
7183 \begin_inset Flex Noun
7186 \begin_layout Plain Layout
7195 \begin_layout Standard
7196 There are two possibilities here.
7197 One is that the class file is itself based upon an existing document class.
7198 For example, many thesis classes are based upon
7199 \begin_inset Flex Noun
7202 \begin_layout Plain Layout
7209 To see whether yours is, look for a line like
7212 \begin_layout LyX-Code
7218 \begin_layout Standard
7220 If so, then you may proceed largely as in the previous section, though
7222 \begin_inset Flex Code
7225 \begin_layout Plain Layout
7226 Declare\SpecialChar LaTeX
7232 line will be different.
7233 If your new class is
7234 \begin_inset Flex Code
7237 \begin_layout Plain Layout
7243 and it is based upon
7244 \begin_inset Flex Code
7247 \begin_layout Plain Layout
7253 , then the line should read:
7257 \begin_layout Plain Layout
7258 And it will be easiest if you save the file to
7259 \begin_inset Flex Code
7262 \begin_layout Plain Layout
7269 assumes that the document class has the same name as the layout file.
7278 \begin_layout LyX-Code
7281 Declare\SpecialChar LaTeX
7282 Class[thesis,book]{thesis}
7285 \begin_layout Standard
7286 If, on the other hand, the new class is not based upon an existing class,
7287 you will probably have to
7288 \begin_inset Quotes eld
7292 \begin_inset Quotes erd
7296 We strongly suggest copying an existing layout file which uses a similar
7298 class and then modifying it, if you can do so.
7299 At least use an existing file as a starting point so you can find out what
7300 items you need to worry about.
7301 Again, the specifics are covered below.
7304 \begin_layout Subsection
7306 \begin_inset CommandInset label
7308 name "subsec:Creating-Templates"
7315 \begin_layout Standard
7316 Once you have written a layout file for a new document class, you might
7317 want to consider writing a
7322 A template acts as a kind of tutorial for your layout, showing how it might
7323 be used, though containing dummy content.
7324 You can of course look at the various templates included with \SpecialChar LyX
7328 \begin_layout Standard
7329 Templates are created just like usual documents: using \SpecialChar LyX
7331 The only difference is that usual documents contain all possible settings,
7332 including the font scheme and the paper size.
7333 Usually a user doesn't want a template to overwrite his preferred settings
7334 for such parameters.
7335 For that reason, the designer of a template should remove the corresponding
7337 \begin_inset Flex Code
7340 \begin_layout Plain Layout
7349 \begin_inset Flex Code
7352 \begin_layout Plain Layout
7360 from the template \SpecialChar LyX
7362 This can be done with any simple text-editor, for example
7363 \begin_inset Flex Code
7366 \begin_layout Plain Layout
7373 \begin_inset Flex Code
7376 \begin_layout Plain Layout
7385 \begin_layout Standard
7386 Put the edited template files you create in
7387 \begin_inset Flex Code
7390 \begin_layout Plain Layout
7396 , copy the ones you use from the global template directory in
7397 \begin_inset Flex Code
7400 \begin_layout Plain Layout
7406 to the same place, and redefine the template path in the
7407 \begin_inset Flex Noun
7410 \begin_layout Plain Layout
7411 Tools\SpecialChar menuseparator
7412 Preferences\SpecialChar menuseparator
7421 \begin_layout Standard
7422 Note, by the way, that there is a template which has a particular meaning:
7424 \begin_inset Flex Code
7427 \begin_layout Plain Layout
7434 This template is loaded every time you create a new document with
7435 \begin_inset Flex Noun
7438 \begin_layout Plain Layout
7439 File\SpecialChar menuseparator
7445 in order to provide useful defaults.
7446 To create this template from inside \SpecialChar LyX
7447 , all you have to do is to open a document
7448 with the correct settings, and use the
7449 \begin_inset Flex Noun
7452 \begin_layout Plain Layout
7453 Save as Document Defaults
7461 \begin_layout Subsection
7462 Upgrading old layout files
7465 \begin_layout Standard
7466 The format of layout files changes with each \SpecialChar LyX
7467 release, so old layout files
7468 need to be converted to the new format.
7470 reads a layout file in an older format, it automatically calls the
7472 \begin_inset Flex Code
7475 \begin_layout Plain Layout
7481 to convert it to a temporary file in current format.
7482 The original file is left untouched.
7483 If you use the layout file often, then, you may want to convert it permanently,
7484 so that \SpecialChar LyX
7485 does not have to do so itself every time.
7486 To do this, you can call the converter manually:
7489 \begin_layout Enumerate
7491 \begin_inset Flex Code
7494 \begin_layout Plain Layout
7501 \begin_inset Flex Code
7504 \begin_layout Plain Layout
7513 \begin_layout Enumerate
7515 \begin_inset Newline newline
7519 \begin_inset Flex Code
7522 \begin_layout Plain Layout
7523 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7529 \begin_inset Newline newline
7533 \begin_inset Flex Code
7536 \begin_layout Plain Layout
7542 is the name of your \SpecialChar LyX
7546 \begin_layout Standard
7547 Note that manual conversion does not affect included files, so these will
7548 have to be converted separately.
7551 \begin_layout Section
7552 \begin_inset CommandInset label
7554 name "sec:TextClass"
7558 The layout file format
7561 \begin_layout Standard
7562 The following sections describe how layout files are structured and written.
7563 Our advice is to go slowly, save and test often.
7564 It is really not that hard, except that the multitude of options can become
7565 overwhelming, especially if you try to check out too many at once.
7566 It becomes easier if you use existing layouts of \SpecialChar LyX
7567 as examples/reference
7568 or if you modify an existing layout to your needs.
7571 \begin_layout Standard
7572 Note that all the tags used in layout files are case-insensitive.
7574 \begin_inset Flex Code
7577 \begin_layout Plain Layout
7584 \begin_inset Flex Code
7587 \begin_layout Plain Layout
7594 \begin_inset Flex Code
7597 \begin_layout Plain Layout
7603 are really the same tag.
7604 The possible arguments are printed in brackets after the tag's name.
7605 The default argument is typeset
7606 \begin_inset Flex Code
7609 \begin_layout Plain Layout
7618 If the argument has a data type like
7619 \begin_inset Quotes eld
7623 \begin_inset Quotes erd
7627 \begin_inset Quotes eld
7631 \begin_inset Quotes erd
7634 , the default is shown like this:
7635 \begin_inset Flex Code
7638 \begin_layout Plain Layout
7649 \begin_layout Subsection
7650 The document class declaration and classification
7653 \begin_layout Standard
7654 Lines in a layout file which begin with
7655 \begin_inset Flex Code
7658 \begin_layout Plain Layout
7665 There is one exception to this rule.
7667 \begin_inset Flex Code
7670 \begin_layout Plain Layout
7676 files should begin with lines like:
7679 \begin_layout LyX-Code
7682 #% Do not delete the line below; configure depends on this
7685 \begin_layout LyX-Code
7690 DeclareLaTeXClass{Article (Standard Class)}
7693 \begin_layout LyX-Code
7698 DeclareCategory{Articles}
7701 \begin_layout Standard
7702 The second and third lines are used when you (re)configure \SpecialChar LyX
7704 The layout file is read by the \SpecialChar LaTeX
7706 \begin_inset Flex Code
7709 \begin_layout Plain Layout
7715 , in a special mode where
7716 \begin_inset Flex Code
7719 \begin_layout Plain Layout
7726 The first line is just a \SpecialChar LaTeX
7727 comment, the second one contains the mandatory
7728 declaration of the text class and the third line contains the optional
7729 classification of the class.
7730 If these lines appear in a file named
7731 \begin_inset Flex Code
7734 \begin_layout Plain Layout
7740 , then they define a text class of name
7741 \begin_inset Flex Code
7744 \begin_layout Plain Layout
7750 (the name of the layout file) which uses the \SpecialChar LaTeX
7752 \begin_inset Flex Code
7755 \begin_layout Plain Layout
7761 (the default is to use the same name as the layout).
7763 \begin_inset Quotes eld
7766 Article (Standard Class)
7767 \begin_inset Quotes erd
7770 that appears above is used as a description of the text class in the
7771 \begin_inset Flex Noun
7774 \begin_layout Plain Layout
7775 Document\SpecialChar menuseparator
7783 \begin_inset Quotes eld
7787 \begin_inset Quotes erd
7790 in the example) is also used in the
7791 \begin_inset Flex Noun
7794 \begin_layout Plain Layout
7795 Document\SpecialChar menuseparator
7801 dialog: the text classes are grouped by these categories (which are usually
7802 genres, so typical categories are
7803 \begin_inset Quotes eld
7807 \begin_inset Quotes erd
7811 \begin_inset Quotes eld
7815 \begin_inset Quotes erd
7819 \begin_inset Quotes eld
7823 \begin_inset Quotes erd
7827 \begin_inset Quotes eld
7831 \begin_inset Quotes erd
7835 \begin_inset Quotes eld
7839 \begin_inset Quotes erd
7843 \begin_inset Quotes eld
7847 \begin_inset Quotes erd
7851 If no category has been declared, the class will be put in the
7852 \begin_inset Quotes eld
7856 \begin_inset Quotes erd
7862 \begin_layout Standard
7863 Let's assume that you wrote your own text class that uses the
7864 \begin_inset Flex Code
7867 \begin_layout Plain Layout
7873 document class, but where you changed the appearance of the section headings.
7874 If you put it in a file
7875 \begin_inset Flex Code
7878 \begin_layout Plain Layout
7884 , the header of this file should be:
7887 \begin_layout LyX-Code
7890 #% Do not delete the line below; configure depends on this
7893 \begin_layout LyX-Code
7898 DeclareLaTeXClass[article]{Article (with My Own Headings)}
7901 \begin_layout LyX-Code
7906 DeclareCategory{Articles}
7909 \begin_layout Standard
7910 This declares a text class
7911 \begin_inset Flex Code
7914 \begin_layout Plain Layout
7920 , associated with the \SpecialChar LaTeX
7922 \begin_inset Flex Code
7925 \begin_layout Plain Layout
7932 \begin_inset Quotes eld
7935 Article (with My Own Headings)
7936 \begin_inset Quotes erd
7940 If your text class depends on several packages, you can declare it as:
7943 \begin_layout LyX-Code
7946 #% Do not delete the line below; configure depends on this
7949 \begin_layout LyX-Code
7954 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
7957 \begin_layout LyX-Code
7962 DeclareCategory{Articles}
7965 \begin_layout Standard
7966 This indicates that your text class uses the
7967 \begin_inset Flex Code
7970 \begin_layout Plain Layout
7977 Finally, it is also possible to declare classes for DocBook code.
7978 Typical declarations will look like:
7981 \begin_layout LyX-Code
7984 #% Do not delete the line below; configure depends on this
7987 \begin_layout LyX-Code
7992 DeclareDocBookClass[article]{SGML (DocBook Article)}
7995 \begin_layout LyX-Code
8000 DeclareCategory{Articles (DocBook)}
8003 \begin_layout Standard
8004 Note that these declarations can also be given an optional parameter declaring
8005 the name of the document class (but not a list).
8008 \begin_layout Standard
8009 So, to be as explicit as possible, the form of the layout declaration is:
8012 \begin_layout LyX-Code
8017 DeclareLaTeXClass[class,package.sty]{layout description}
8020 \begin_layout LyX-Code
8025 DeclareCategory{category}
8028 \begin_layout Standard
8029 The class need only be specified if the name of the \SpecialChar LaTeX
8031 name of the layout file are different or if there are packages to load.
8032 If the name of the class file is not specified, then \SpecialChar LyX
8034 that it is the same as the name of the layout file.
8037 \begin_layout Standard
8038 When the text class has been modified to your taste, all you have to do
8039 is to copy it either to
8040 \begin_inset Flex Code
8043 \begin_layout Plain Layout
8050 \begin_inset Flex Code
8053 \begin_layout Plain Layout
8060 \begin_inset Flex Noun
8063 \begin_layout Plain Layout
8064 Tools\SpecialChar menuseparator
8070 , exit \SpecialChar LyX
8072 Then your new text class should be available along with the others.
8075 \begin_layout Standard
8076 Once the layout file is installed, you can edit it and see your changes
8077 without having to reconfigure or to restart \SpecialChar LyX
8083 \begin_layout Plain Layout
8084 In versions of \SpecialChar LyX
8085 prior to 1.6, this was not true.
8086 As a result, editing layout files was very time consuming, since you had
8087 constantly to restart \SpecialChar LyX
8093 You can force a reload of the current layout by using the \SpecialChar LyX
8095 \begin_inset Flex Noun
8098 \begin_layout Plain Layout
8105 There is no default binding for this function—though, of course, you can
8106 bind it to a key yourself.
8107 But you will normally use this function simply by entering it in the mini-buffe
8112 \begin_layout Standard
8118 \begin_inset Flex Noun
8121 \begin_layout Plain Layout
8127 is very much an `advanced feature'.
8132 recommended that you save your work before using this function.
8137 recommended that you not attempt to edit layout information while simultaneousl
8138 y working on a document that you care about.
8139 Use a test document.
8140 Syntax errors and the like in your layout file could cause peculiar behavior.
8141 In particular, such errors could cause \SpecialChar LyX
8142 to regard the current layout as
8143 invalid and to attempt to switch to some other layout.
8147 \begin_layout Plain Layout
8148 Really bad syntax errors may even caused \SpecialChar LyX
8150 This is because certain sorts of errors may make \SpecialChar LyX
8161 The \SpecialChar LyX
8162 team strives to keep \SpecialChar LyX
8163 stable in such situations, but safe is better
8168 \begin_layout Plain Layout
8169 While we're giving advice: make regular backups.
8170 And be nice to your mother.
8178 \begin_layout Subsection
8179 The Module declaration
8182 \begin_layout Standard
8183 A module must begin with a line like the following:
8186 \begin_layout LyX-Code
8189 DeclareLyXModule[endnotes.sty]{Endnotes}
8192 \begin_layout Standard
8193 The mandatory argument, in curly brackets, is the name of the module, as
8195 \begin_inset Flex Noun
8198 \begin_layout Plain Layout
8199 Document\SpecialChar menuseparator
8200 Settings\SpecialChar menuseparator
8207 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8209 on which the module depends.
8210 It is also possible to use the form
8211 \begin_inset Flex Noun
8214 \begin_layout Plain Layout
8220 as an optional argument, which declares that the module can only be used
8221 when there exists a conversion chain between the formats `
8222 \begin_inset Flex Code
8225 \begin_layout Plain Layout
8232 \begin_inset Flex Code
8235 \begin_layout Plain Layout
8244 \begin_layout Standard
8245 The module declaration should then be followed by lines like the following
8249 \begin_layout Plain Layout
8250 Preferably in English if the module should be published with \SpecialChar LyX
8252 This description will appear in the list of messages to be translated and
8253 will be thus translated with the next interface update.
8261 \begin_layout LyX-Code
8265 \begin_layout LyX-Code
8266 #Adds an endnote command, in addition to footnotes.
8270 \begin_layout LyX-Code
8271 #You will need to add
8273 theendnotes in TeX code where you
8276 \begin_layout LyX-Code
8277 #want the endnotes to appear.
8281 \begin_layout LyX-Code
8285 \begin_layout LyX-Code
8286 #Requires: somemodule | othermodule
8289 \begin_layout LyX-Code
8290 #Excludes: badmodule
8293 \begin_layout Standard
8294 The description is used in
8295 \begin_inset Flex Noun
8298 \begin_layout Plain Layout
8299 Document\SpecialChar menuseparator
8300 Settings\SpecialChar menuseparator
8306 to provide the user with information about what the module does.
8308 \begin_inset Flex Code
8311 \begin_layout Plain Layout
8317 line is used to identify other modules with which this one must be used;
8319 \begin_inset Flex Code
8322 \begin_layout Plain Layout
8328 line is used to identify modules with which this one may not be used.
8329 Both are optional, and, as shown, multiple modules should be separated
8330 with the pipe symbol: |.
8331 Note that the required modules are treated disjunctively:
8335 of the required modules must be used.
8340 excluded module may be used.
8341 Note that modules are identified here by their filenames without the
8342 \begin_inset Flex Code
8345 \begin_layout Plain Layout
8353 \begin_inset Flex Code
8356 \begin_layout Plain Layout
8363 \begin_inset Flex Code
8366 \begin_layout Plain Layout
8375 \begin_layout Subsection
8379 \begin_layout Standard
8380 The first non-comment line of any layout file, included file, or module
8385 contain the file format number:
8388 \begin_layout Description
8389 \begin_inset Flex Code
8392 \begin_layout Plain Layout
8399 \begin_inset Flex Code
8402 \begin_layout Plain Layout
8408 ] The format number of the layout file.
8411 \begin_layout Standard
8412 This tag was introduced with \SpecialChar LyX
8414 \begin_inset space ~
8418 Layout files from older \SpecialChar LyX
8419 versions do not have an explicit file format and
8420 are considered to have
8421 \begin_inset Flex Code
8424 \begin_layout Plain Layout
8426 \begin_inset space ~
8435 The format for the present version of \SpecialChar LyX
8437 But each version of \SpecialChar LyX
8438 is capable of reading earlier versions' layout files,
8439 just as they are capable of reading files produced by earlier versions
8442 There is, however, no provision for converting to earlier formats.
8445 \begin_layout Subsection
8446 \begin_inset CommandInset label
8448 name "subsec:General-text-class"
8452 General text class parameters
8455 \begin_layout Standard
8456 These are general parameters that govern the behavior of an entire document
8462 mean that they must appear in
8463 \begin_inset Flex Code
8466 \begin_layout Plain Layout
8472 files rather than in modules.
8473 A module can contain any layout tag.)
8476 \begin_layout Description
8477 \begin_inset Flex Code
8480 \begin_layout Plain Layout
8486 Adds information that will be output in the
8487 \begin_inset Flex Code
8490 \begin_layout Plain Layout
8496 block when the document is output to XHTML.
8497 Typically, this would be used to output CSS style information, but it can
8498 be used for anything that can appear in
8499 \begin_inset Flex Code
8502 \begin_layout Plain Layout
8510 \begin_inset Quotes eld
8514 \begin_inset Flex Code
8517 \begin_layout Plain Layout
8524 \begin_inset Quotes erd
8530 \begin_layout Description
8531 \begin_inset Flex Code
8534 \begin_layout Plain Layout
8540 Adds information to the document preamble.
8542 \begin_inset Newline newline
8546 \begin_inset Quotes eld
8550 \begin_inset Flex Code
8553 \begin_layout Plain Layout
8560 \begin_inset Quotes erd
8566 \begin_layout Description
8567 \begin_inset Flex Code
8570 \begin_layout Plain Layout
8576 Defines formats for use in the display of bibliographic information.
8578 \begin_inset CommandInset ref
8580 reference "subsec:Citation-format-description"
8586 \begin_inset Quotes eld
8590 \begin_inset Flex Code
8593 \begin_layout Plain Layout
8600 \begin_inset Quotes erd
8606 \begin_layout Description
8607 \begin_inset Flex Code
8610 \begin_layout Plain Layout
8616 Describes various global options supported by the document class.
8618 \begin_inset CommandInset ref
8620 reference "subsec:ClassOptions"
8626 \begin_inset Quotes eld
8630 \begin_inset Flex Code
8633 \begin_layout Plain Layout
8640 \begin_inset Quotes erd
8646 \begin_layout Description
8647 \begin_inset Flex Code
8650 \begin_layout Plain Layout
8657 \begin_inset Flex Code
8660 \begin_layout Plain Layout
8669 \begin_inset space \thinspace{}
8673 \begin_inset Flex Code
8676 \begin_layout Plain Layout
8682 ] Whether the class should
8686 to having one or two columns.
8687 Can be changed in the
8688 \begin_inset Flex Noun
8691 \begin_layout Plain Layout
8692 Document\SpecialChar menuseparator
8701 \begin_layout Description
8702 \begin_inset Flex Code
8705 \begin_layout Plain Layout
8712 \begin_inset Flex Code
8715 \begin_layout Plain Layout
8721 ] This sequence defines the properties for a counter.
8722 If the counter does not yet exist, it is created; if it does exist, it
8725 \begin_inset Quotes eld
8729 \begin_inset Flex Code
8732 \begin_layout Plain Layout
8739 \begin_inset Quotes erd
8743 \begin_inset Newline newline
8747 \begin_inset CommandInset ref
8749 reference "subsec:Counters"
8753 for details on counters.
8756 \begin_layout Description
8757 \begin_inset Flex Code
8760 \begin_layout Plain Layout
8766 Sets the default font used to display the document.
8768 \begin_inset CommandInset ref
8770 reference "subsec:Font-description"
8774 for how to declare fonts.
8776 \begin_inset Quotes eld
8780 \begin_inset Flex Code
8783 \begin_layout Plain Layout
8790 \begin_inset Quotes erd
8796 \begin_layout Description
8797 \begin_inset Flex Code
8800 \begin_layout Plain Layout
8807 \begin_inset Flex Code
8810 \begin_layout Plain Layout
8816 ] Specifies a module to be included by default with this document class.
8817 The module is specified as filename without the
8818 \begin_inset Flex Code
8821 \begin_layout Plain Layout
8828 The user can still remove the module, but it will be active at the outset.
8829 (This applies only when new files are created, or when this class is chosen
8830 for an existing document.)
8833 \begin_layout Description
8834 \begin_inset Flex Code
8837 \begin_layout Plain Layout
8844 \begin_inset Flex Code
8847 \begin_layout Plain Layout
8853 ] This is the style that will be assigned to new paragraphs, usually
8854 \begin_inset Flex Noun
8857 \begin_layout Plain Layout
8864 This will default to the first defined style if not given, but you are
8865 encouraged to use this directive.
8868 \begin_layout Description
8869 \begin_inset Flex Code
8872 \begin_layout Plain Layout
8879 \begin_inset Flex Code
8882 \begin_layout Plain Layout
8888 ] This tag indicates that the module (which is specified by filename without
8890 \begin_inset Flex Code
8893 \begin_layout Plain Layout
8899 extension) cannot be used with this document class.
8900 This might be used in a journal-specific layout file to prevent, say, the
8902 \begin_inset Flex Code
8905 \begin_layout Plain Layout
8911 module that numbers theorems by section.
8916 be used in a module.
8917 Modules have their own way of excluding other modules (see
8918 \begin_inset CommandInset ref
8920 reference "subsec:Layout-modules"
8927 \begin_layout Description
8928 \begin_inset Flex Code
8931 \begin_layout Plain Layout
8937 Defines a new float.
8939 \begin_inset CommandInset ref
8941 reference "subsec:Floats"
8947 \begin_inset Quotes eld
8951 \begin_inset Flex Code
8954 \begin_layout Plain Layout
8961 \begin_inset Quotes erd
8967 \begin_layout Description
8968 \begin_inset Flex Code
8971 \begin_layout Plain Layout
8977 Sets the information that will be output in the
8978 \begin_inset Flex Code
8981 \begin_layout Plain Layout
8987 block when this document class is output to XHTML.
8988 Note that this will completely override any prior
8989 \begin_inset Flex Code
8992 \begin_layout Plain Layout
8999 \begin_inset Flex Code
9002 \begin_layout Plain Layout
9010 \begin_inset Newline newline
9014 \begin_inset Flex Code
9017 \begin_layout Plain Layout
9023 if you just want to add material to the preamble.) Must end with
9024 \begin_inset Quotes eld
9028 \begin_inset Flex Code
9031 \begin_layout Plain Layout
9038 \begin_inset Quotes erd
9044 \begin_layout Description
9045 \begin_inset Flex Code
9048 \begin_layout Plain Layout
9055 \begin_inset Flex Code
9058 \begin_layout Plain Layout
9064 ] The style to use for the table of contents, bibliography, and so forth,
9065 when the document is output to HTML.
9066 For articles, this should normally be
9067 \begin_inset Flex Code
9070 \begin_layout Plain Layout
9077 \begin_inset Flex Code
9080 \begin_layout Plain Layout
9087 If it is not given, then \SpecialChar LyX
9088 will attempt to figure out which layout to use.
9091 \begin_layout Description
9092 \begin_inset Flex Code
9095 \begin_layout Plain Layout
9102 \begin_inset Flex Code
9105 \begin_layout Plain Layout
9111 ] Modifies the properties of the given counter.
9112 If the counter does not exist, the statement is ignored.
9114 \begin_inset Quotes eld
9118 \begin_inset Flex Code
9121 \begin_layout Plain Layout
9128 \begin_inset Quotes erd
9132 \begin_inset Newline newline
9136 \begin_inset CommandInset ref
9138 reference "subsec:Counters"
9142 for details on counters.
9145 \begin_layout Description
9146 \begin_inset Flex Code
9149 \begin_layout Plain Layout
9156 \begin_inset Flex Code
9159 \begin_layout Plain Layout
9165 ] This allows you to include another layout definition file within yours
9166 to avoid duplicating commands.
9167 Common examples are the standard layout files, for example,
9168 \begin_inset Flex Code
9171 \begin_layout Plain Layout
9177 , which contains most of the basic layouts.
9180 \begin_layout Description
9181 \begin_inset Flex Code
9184 \begin_layout Plain Layout
9191 \begin_inset Flex Code
9194 \begin_layout Plain Layout
9200 ] This section (re-)defines the layout of an inset.
9201 It can be applied to an existing inset or to a new, user-defined inset,
9202 e.g., a new character style.
9204 \begin_inset Quotes eld
9208 \begin_inset Flex Code
9211 \begin_layout Plain Layout
9218 \begin_inset Quotes erd
9222 \begin_inset Newline newline
9226 \begin_inset CommandInset ref
9228 reference "subsec:Flex-insets-and"
9232 for more information.
9236 \begin_layout Description
9237 \begin_inset Flex Code
9240 \begin_layout Plain Layout
9247 \begin_inset Flex Code
9250 \begin_layout Plain Layout
9256 ] A string that indicates the width of the left margin on the screen, for
9258 \begin_inset Quotes eld
9262 \begin_inset Flex Code
9265 \begin_layout Plain Layout
9272 \begin_inset Quotes erd
9276 (Note that this is not a `length', like
9277 \begin_inset Quotes eld
9281 \begin_inset Quotes erd
9287 \begin_layout Description
9288 \begin_inset Flex Code
9291 \begin_layout Plain Layout
9298 \begin_inset Flex Code
9301 \begin_layout Plain Layout
9307 ] Modifies the properties of the given paragraph style.
9308 If the style does not exist, this section is ignored.
9310 \begin_inset Quotes eld
9314 \begin_inset Flex Code
9317 \begin_layout Plain Layout
9324 \begin_inset Quotes erd
9330 \begin_layout Description
9331 \begin_inset Flex Code
9334 \begin_layout Plain Layout
9341 \begin_inset Flex Code
9344 \begin_layout Plain Layout
9350 ] Deletes an existing counter, usually one defined in an included file.
9353 \begin_layout Description
9354 \begin_inset Flex Code
9357 \begin_layout Plain Layout
9364 \begin_inset Flex Code
9367 \begin_layout Plain Layout
9373 ] Deletes an existing float.
9374 This is particularly useful when you want to suppress a float that has
9375 been defined in an input file.
9378 \begin_layout Description
9379 \begin_inset Flex Code
9382 \begin_layout Plain Layout
9389 \begin_inset Flex Code
9392 \begin_layout Plain Layout
9398 ] Deletes an existing style.
9401 \begin_layout Description
9402 \begin_inset Flex Code
9405 \begin_layout Plain Layout
9412 \begin_inset Flex Code
9415 \begin_layout Plain Layout
9421 ] The file format (as defined in the \SpecialChar LyX
9422 preferences) produced by this document
9424 It is mainly useful when
9425 \begin_inset Flex Code
9428 \begin_layout Plain Layout
9435 \begin_inset Flex Code
9438 \begin_layout Plain Layout
9444 and one wants to define a new type of literate document.
9445 The format is reset to
9446 \begin_inset Quotes eld
9450 \begin_inset Flex Code
9453 \begin_layout Plain Layout
9460 \begin_inset Quotes erd
9464 \begin_inset Quotes eld
9468 \begin_inset Flex Code
9471 \begin_layout Plain Layout
9478 \begin_inset Quotes erd
9481 when the corresponding
9482 \begin_inset Flex Code
9485 \begin_layout Plain Layout
9491 parameter is encountered.
9494 \begin_layout Description
9495 \begin_inset Flex Code
9498 \begin_layout Plain Layout
9505 \begin_inset Flex Code
9508 \begin_layout Plain Layout
9519 \begin_inset Flex Code
9522 \begin_layout Plain Layout
9529 \begin_inset Flex Code
9532 \begin_layout Plain Layout
9538 ] Specifies what sort of output documents using this class will produce.
9541 \begin_layout Description
9542 \begin_inset Flex Code
9545 \begin_layout Plain Layout
9552 \begin_inset Flex Code
9555 \begin_layout Plain Layout
9562 \begin_inset Flex Code
9565 \begin_layout Plain Layout
9571 ] Specifies options, given in the second string, for the package named by
9574 \begin_inset Quotes eld
9578 \begin_inset Flex Code
9581 \begin_layout Plain Layout
9582 PackageOptions natbib square
9588 \begin_inset Quotes erd
9592 \begin_inset Flex Code
9595 \begin_layout Plain Layout
9601 to be loaded with the
9602 \begin_inset Flex Code
9605 \begin_layout Plain Layout
9612 (For \SpecialChar TeX
9613 perts, this causes \SpecialChar LyX
9615 \begin_inset Flex Code
9618 \begin_layout Plain Layout
9621 PassOptionsToPackage{natbib}{square}
9627 \begin_inset Flex Code
9630 \begin_layout Plain Layout
9639 \begin_layout Description
9640 \begin_inset Flex Code
9643 \begin_layout Plain Layout
9650 \begin_inset Flex Code
9653 \begin_layout Plain Layout
9662 \begin_inset Flex Code
9665 \begin_layout Plain Layout
9672 \begin_inset Flex Code
9675 \begin_layout Plain Layout
9681 ] The default pagestyle.
9682 Can be changed in the
9683 \begin_inset Flex Noun
9686 \begin_layout Plain Layout
9687 Document\SpecialChar menuseparator
9696 \begin_layout Description
9697 \begin_inset Flex Code
9700 \begin_layout Plain Layout
9706 Sets the preamble for the \SpecialChar LaTeX
9708 Note that this will completely override any prior
9709 \begin_inset Flex Code
9712 \begin_layout Plain Layout
9719 \begin_inset Flex Code
9722 \begin_layout Plain Layout
9730 \begin_inset Flex Code
9733 \begin_layout Plain Layout
9739 if you just want to add material to the preamble.) Must end with
9740 \begin_inset Quotes eld
9744 \begin_inset Flex Code
9747 \begin_layout Plain Layout
9754 \begin_inset Quotes erd
9760 \begin_layout Description
9761 \begin_inset Flex Code
9764 \begin_layout Plain Layout
9771 \begin_inset Flex Code
9774 \begin_layout Plain Layout
9781 \begin_inset Flex Code
9784 \begin_layout Plain Layout
9793 \begin_inset space \thinspace{}
9797 \begin_inset Flex Code
9800 \begin_layout Plain Layout
9806 ] Whether the class already provides the feature
9807 \begin_inset Flex Code
9810 \begin_layout Plain Layout
9817 A feature is in general the name of a package (e.
9818 \begin_inset space \thinspace{}
9822 \begin_inset space \space{}
9826 \begin_inset Flex Code
9829 \begin_layout Plain Layout
9836 \begin_inset Flex Code
9839 \begin_layout Plain Layout
9846 \begin_inset space \thinspace{}
9850 \begin_inset space \space{}
9854 \begin_inset Flex Code
9857 \begin_layout Plain Layout
9864 \begin_inset Flex Code
9867 \begin_layout Plain Layout
9875 \begin_inset CommandInset ref
9877 reference "chap:List-of-functions"
9881 for the list of features.
9884 \begin_layout Description
9885 \begin_inset Flex Code
9888 \begin_layout Plain Layout
9895 \begin_inset Flex Code
9898 \begin_layout Plain Layout
9904 ] Indicates that this layout provides the functionality of the module mentioned,
9905 which should be specified by the filename without the
9906 \begin_inset Flex Code
9909 \begin_layout Plain Layout
9916 This will typically be used if the layout includes the module directly,
9917 rather than using the
9918 \begin_inset Flex Code
9921 \begin_layout Plain Layout
9927 tag to indicate that it ought to be used.
9928 It could also be used in a module that provided an alternate implementation
9929 of the same functionality.
9932 \begin_layout Description
9933 \begin_inset Flex Code
9936 \begin_layout Plain Layout
9943 \begin_inset Flex Code
9946 \begin_layout Plain Layout
9952 ] Creates a new paragraph style if it does not already exist.
9953 If the style does exist, this section is ignored.
9955 \begin_inset Quotes eld
9959 \begin_inset Flex Code
9962 \begin_layout Plain Layout
9969 \begin_inset Quotes erd
9975 \begin_layout Description
9976 \begin_inset Flex Code
9979 \begin_layout Plain Layout
9986 \begin_inset Flex Code
9989 \begin_layout Plain Layout
9995 ] Whether the class requires the feature
9996 \begin_inset Flex Code
9999 \begin_layout Plain Layout
10006 Multiple features must be separated by commas.
10007 Note that you can only request supported features.
10009 \begin_inset CommandInset ref
10011 reference "chap:List-of-functions"
10015 for the list of features.).
10016 If you require a package with specific options, you can additionally use
10018 \begin_inset Flex Code
10021 \begin_layout Plain Layout
10030 \begin_layout Description
10031 \begin_inset Flex Code
10034 \begin_layout Plain Layout
10041 \begin_inset Flex Code
10044 \begin_layout Plain Layout
10050 ] A string that indicates the width of the right margin on the screen, for
10052 \begin_inset Quotes eld
10056 \begin_inset Flex Code
10059 \begin_layout Plain Layout
10066 \begin_inset Quotes erd
10072 \begin_layout Description
10073 \begin_inset Flex Code
10076 \begin_layout Plain Layout
10083 \begin_inset Flex Code
10086 \begin_layout Plain Layout
10092 ] Sets which divisions get numbered.
10094 \begin_inset Newline newline
10098 \begin_inset Flex Code
10101 \begin_layout Plain Layout
10107 counter in \SpecialChar LaTeX
10111 \begin_layout Description
10112 \begin_inset Flex Code
10115 \begin_layout Plain Layout
10122 \begin_inset Flex Code
10125 \begin_layout Plain Layout
10134 \begin_inset space \thinspace{}
10138 \begin_inset Flex Code
10141 \begin_layout Plain Layout
10147 ] Whether the class-default should be printing on one or both sides of the
10149 Can be changed in the
10150 \begin_inset Flex Noun
10153 \begin_layout Plain Layout
10154 Document\SpecialChar menuseparator
10163 \begin_layout Description
10164 \begin_inset Flex Code
10167 \begin_layout Plain Layout
10174 \begin_inset Flex Code
10177 \begin_layout Plain Layout
10183 ] This sequence defines a paragraph style.
10184 If the style does not yet exist, it is created; if it does exist, its parameter
10187 \begin_inset Quotes eld
10191 \begin_inset Flex Code
10194 \begin_layout Plain Layout
10201 \begin_inset Quotes erd
10205 \begin_inset Newline newline
10209 \begin_inset CommandInset ref
10211 reference "subsec:Paragraph-Styles"
10215 for details on paragraph styles.
10218 \begin_layout Description
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10229 \begin_inset Flex Code
10232 \begin_layout Plain Layout
10238 ] The name of the command or environment to be used with
10239 \begin_inset Flex Code
10242 \begin_layout Plain Layout
10251 \begin_layout Description
10252 \begin_inset Flex Code
10255 \begin_layout Plain Layout
10262 \begin_inset Flex Code
10265 \begin_layout Plain Layout
10274 \begin_inset Flex Code
10277 \begin_layout Plain Layout
10283 ] Indicates what kind of markup is used to define the title of a document.
10285 \begin_inset Flex Code
10288 \begin_layout Plain Layout
10294 means that the macro with name
10295 \begin_inset Flex Code
10298 \begin_layout Plain Layout
10304 will be inserted after the last layout which has
10305 \begin_inset Quotes eld
10309 \begin_inset Flex Code
10312 \begin_layout Plain Layout
10314 \begin_inset space ~
10323 \begin_inset Quotes erd
10328 \begin_inset Flex Code
10331 \begin_layout Plain Layout
10337 corresponds to the case where all layouts which have
10338 \begin_inset Quotes eld
10342 \begin_inset Flex Code
10345 \begin_layout Plain Layout
10347 \begin_inset space ~
10356 \begin_inset Quotes erd
10359 should be enclosed into the
10360 \begin_inset Flex Code
10363 \begin_layout Plain Layout
10372 \begin_layout Description
10373 \begin_inset Flex Code
10376 \begin_layout Plain Layout
10383 \begin_inset Flex Code
10386 \begin_layout Plain Layout
10392 ] Sets which divisions are included in the table of contents.
10394 \begin_inset Flex Code
10397 \begin_layout Plain Layout
10403 counter in \SpecialChar LaTeX
10407 \begin_layout Subsection
10408 \begin_inset Flex Code
10411 \begin_layout Plain Layout
10418 \begin_inset CommandInset label
10420 name "subsec:ClassOptions"
10427 \begin_layout Standard
10429 \begin_inset Flex Code
10432 \begin_layout Plain Layout
10438 section can contain the following entries:
10441 \begin_layout Description
10442 \begin_inset Flex Code
10445 \begin_layout Plain Layout
10452 \begin_inset Flex Code
10455 \begin_layout Plain Layout
10461 ] The list of available font sizes for the document's main font, separated
10463 \begin_inset Quotes eld
10467 \begin_inset Flex Code
10470 \begin_layout Plain Layout
10477 \begin_inset Quotes erd
10483 \begin_layout Description
10484 \begin_inset Flex Code
10487 \begin_layout Plain Layout
10493 Used to set the DTD line with XML-based output classes.
10495 \begin_inset space \thinspace{}
10499 \begin_inset Quotes eld
10502 -//OASIS//DTD DocBook V4.2//EN
10503 \begin_inset Quotes erd
10509 \begin_layout Description
10510 \begin_inset Flex Code
10513 \begin_layout Plain Layout
10520 \begin_inset Flex Code
10523 \begin_layout Plain Layout
10524 string="empty|plain|headings|fancy"
10529 ] The list of available page sty\SpecialChar softhyphen
10531 \begin_inset Quotes eld
10535 \begin_inset Flex Code
10538 \begin_layout Plain Layout
10545 \begin_inset Quotes erd
10551 \begin_layout Description
10552 \begin_inset Flex Code
10555 \begin_layout Plain Layout
10562 \begin_inset Flex Code
10565 \begin_layout Plain Layout
10571 ] Some document class options, separated by a comma, that will be added
10572 to the optional part of the
10573 \begin_inset Flex Code
10576 \begin_layout Plain Layout
10587 \begin_layout Standard
10589 \begin_inset Flex Code
10592 \begin_layout Plain Layout
10598 section must end with
10599 \begin_inset Quotes eld
10603 \begin_inset Flex Code
10606 \begin_layout Plain Layout
10613 \begin_inset Quotes erd
10619 \begin_layout Subsection
10621 \begin_inset CommandInset label
10623 name "subsec:Paragraph-Styles"
10630 \begin_layout Standard
10631 A paragraph style description looks like this:
10635 \begin_layout Plain Layout
10636 Note that this will either define a new style or modify an existing one.
10644 \begin_layout LyX-Code
10651 \begin_layout LyX-Code
10655 \begin_layout LyX-Code
10659 \begin_layout Standard
10660 where the following commands are allowed:
10663 \begin_layout Description
10664 \begin_inset Flex Code
10667 \begin_layout Plain Layout
10674 \begin_inset Flex Code
10677 \begin_layout Plain Layout
10682 , left, right, center
10687 ] Paragraph alignment.
10690 \begin_layout Description
10691 \begin_inset Flex Code
10694 \begin_layout Plain Layout
10701 \begin_inset Flex Code
10704 \begin_layout Plain Layout
10709 , left, right, center
10714 ] A comma separated list of permitted alignments.
10715 (Some \SpecialChar LaTeX
10716 styles prohibit certain alignments, since those wouldn't make sense.
10717 For example a right-aligned or centered enumeration isn't possible.)
10720 \begin_layout Description
10721 \begin_inset Flex Code
10724 \begin_layout Plain Layout
10731 \begin_inset Flex Code
10734 \begin_layout Plain Layout
10740 ] Defines argument number <int> of a command\SpecialChar breakableslash
10741 environment associated with
10743 This is useful for things like section headings, and only makes sense with
10746 Every (optional or required) argument of a command or environment – except
10747 for the required argument that is associated with the content of the paragraph
10748 itself – has a separate definition, where the number specifies the order
10750 The definition must end with
10751 \begin_inset Flex Code
10754 \begin_layout Plain Layout
10761 So a command with two optional arguments has:
10762 \begin_inset Separator parbreak
10769 \begin_layout Quote
10775 \begin_layout Quote
10781 \begin_layout Quote
10787 \begin_layout Quote
10793 \begin_layout Quote
10799 \begin_layout Quote
10805 \begin_layout Standard
10807 \begin_inset Flex Code
10810 \begin_layout Plain Layout
10816 definition, the following specifications are possible:
10819 \begin_layout Itemize
10820 \begin_inset Flex Code
10823 \begin_layout Plain Layout
10830 \begin_inset Flex Code
10833 \begin_layout Plain Layout
10839 The string that will appear both in the menu (to insert this argument)
10840 and on the argument inset button (unless you also specify a separate
10841 \begin_inset Flex Code
10844 \begin_layout Plain Layout
10851 For the menu, you can define an accelerator by appending the respective
10852 character to the string, divided by
10853 \begin_inset Quotes eld
10857 \begin_inset Quotes erd
10861 \begin_inset space \thinspace{}
10865 \begin_inset space \space{}
10869 \begin_inset Quotes eld
10873 \begin_inset Flex Code
10876 \begin_layout Plain Layout
10883 \begin_inset Quotes erd
10889 \begin_layout Itemize
10890 \begin_inset Flex Code
10893 \begin_layout Plain Layout
10900 \begin_inset Flex Code
10903 \begin_layout Plain Layout
10909 A separate string for the menu.
10910 You can define an accelerator by appending the respective character to
10911 the string, divided by
10912 \begin_inset Quotes eld
10916 \begin_inset Quotes erd
10920 \begin_inset space \thinspace{}
10924 \begin_inset space \space{}
10928 \begin_inset Quotes eld
10932 \begin_inset Flex Code
10935 \begin_layout Plain Layout
10942 \begin_inset Quotes erd
10946 This specification is optional.
10947 If it is not given the
10948 \begin_inset Flex Code
10951 \begin_layout Plain Layout
10957 will be used instead for the menu.
10960 \begin_layout Itemize
10961 \begin_inset Flex Code
10964 \begin_layout Plain Layout
10971 \begin_inset Flex Code
10974 \begin_layout Plain Layout
10980 A longer explanatory text that appears in the tooltip when hovering over
10981 the argument inset.
10984 \begin_layout Itemize
10985 \begin_inset Flex Code
10988 \begin_layout Plain Layout
10995 \begin_inset Flex Code
10998 \begin_layout Plain Layout
11007 \begin_inset space \thinspace{}
11011 \begin_inset Flex Code
11014 \begin_layout Plain Layout
11020 ] Declare if this is a mandatory (1) or an optional (0) argument.
11021 Mandatory arguments will be output empty if not given, while optional arguments
11022 will not be output at all.
11023 By default, mandatory arguments are delimited by
11024 \begin_inset Flex Code
11027 \begin_layout Plain Layout
11033 , while optional arguments are delimited by
11034 \begin_inset Flex Code
11037 \begin_layout Plain Layout
11046 \begin_layout Itemize
11047 \begin_inset Flex Code
11050 \begin_layout Plain Layout
11057 \begin_inset Flex Code
11060 \begin_layout Plain Layout
11066 defines another argument (by its number) which this argument requires to
11067 be output if it is itself output.
11069 \begin_inset space \thinspace{}
11072 g., in \SpecialChar LaTeX
11073 commands, optional arguments often require previous optional arguments
11074 to be output (at least empty), as in
11075 \begin_inset Flex Code
11078 \begin_layout Plain Layout
11081 command[][argument]{text}
11087 This can be achieved by the statement
11088 \begin_inset Flex Code
11091 \begin_layout Plain Layout
11098 \begin_inset Flex Code
11101 \begin_layout Plain Layout
11110 \begin_layout Itemize
11111 \begin_inset Flex Code
11114 \begin_layout Plain Layout
11121 \begin_inset Flex Code
11124 \begin_layout Plain Layout
11130 defines a custom left delimiter (instead of
11131 \begin_inset Flex Code
11134 \begin_layout Plain Layout
11141 \begin_inset Flex Code
11144 \begin_layout Plain Layout
11151 A line break in the output can be indicated by
11152 \begin_inset Flex Code
11155 \begin_layout Plain Layout
11164 \begin_layout Itemize
11165 \begin_inset Flex Code
11168 \begin_layout Plain Layout
11175 \begin_inset Flex Code
11178 \begin_layout Plain Layout
11184 defines a custom right delimiter (instead of
11185 \begin_inset Flex Code
11188 \begin_layout Plain Layout
11195 \begin_inset Flex Code
11198 \begin_layout Plain Layout
11205 A line break in the output can be indicated by
11206 \begin_inset Flex Code
11209 \begin_layout Plain Layout
11218 \begin_layout Itemize
11219 \begin_inset Flex Code
11222 \begin_layout Plain Layout
11229 \begin_inset Flex Code
11232 \begin_layout Plain Layout
11238 defines an argument that is inserted if and only if no user-specified arguments
11240 \begin_inset space \thinspace{}
11244 \begin_inset space \space{}
11247 if no argument inset has been inserted (note that also an empty argument
11248 inset omits the DefaultArg).
11249 Multiple arguments need to be separated by comma.
11252 \begin_layout Itemize
11253 \begin_inset Flex Code
11256 \begin_layout Plain Layout
11263 \begin_inset Flex Code
11266 \begin_layout Plain Layout
11272 defines an argument that is inserted in any case (alone or in addition
11273 to user-specified arguments).
11274 Multiple arguments need to be separated by comma.
11277 \begin_layout Itemize
11278 \begin_inset Flex Code
11281 \begin_layout Plain Layout
11287 The font used for the argument content, see
11288 \begin_inset CommandInset ref
11290 reference "subsec:Font-description"
11297 \begin_layout Itemize
11298 \begin_inset Flex Code
11301 \begin_layout Plain Layout
11307 The font used for the label; see
11308 \begin_inset CommandInset ref
11310 reference "subsec:Font-description"
11317 \begin_layout Itemize
11318 \begin_inset Flex Code
11321 \begin_layout Plain Layout
11328 \begin_inset Flex Code
11331 \begin_layout Plain Layout
11336 , Minimalistic, Conglomerate
11341 ] describes the rendering style used for the inset's frame and buttons.
11344 \begin_layout Itemize
11345 \begin_inset Flex Code
11348 \begin_layout Plain Layout
11355 \begin_inset Flex Code
11358 \begin_layout Plain Layout
11365 \begin_inset Flex Code
11368 \begin_layout Plain Layout
11374 , this argument is automatically inserted when the respective style is selected.
11375 Currently, only one argument per style\SpecialChar breakableslash
11376 layout can be automatically inserted.
11379 \begin_layout Itemize
11380 \begin_inset Flex Code
11383 \begin_layout Plain Layout
11390 \begin_inset Flex Code
11393 \begin_layout Plain Layout
11400 \begin_inset Flex Code
11403 \begin_layout Plain Layout
11409 , this argument will be inserted with a copy of the co-text (either selected
11410 text or the whole paragraph) as content.
11413 \begin_layout Itemize
11414 \begin_inset Flex Code
11417 \begin_layout Plain Layout
11424 \begin_inset Flex Code
11427 \begin_layout Plain Layout
11428 string of characters
11437 Defines individual characters that should be output in raw form, meaning
11438 without special translations that \SpecialChar LaTeX
11440 Note that, contrary to PassThru, this needs to be explicitly defined for
11442 That is, arguments do not inherit PassThruChars from their parent inset
11446 \begin_layout Standard
11447 By default, the text entered in the \SpecialChar LyX
11448 workarea in the respective layout is
11449 the last (mandatory) argument of a command if the
11450 \begin_inset Flex Code
11453 \begin_layout Plain Layout
11460 \begin_inset Flex Code
11463 \begin_layout Plain Layout
11470 However, arguments with the prefix
11471 \begin_inset Flex Code
11474 \begin_layout Plain Layout
11480 are output after this workarea argument.
11481 Note that post-argument numbering restarts at 1, so the first argument
11482 following the workarea argument is
11483 \begin_inset Flex Code
11486 \begin_layout Plain Layout
11493 Post-arguments are ignored in any other
11494 \begin_inset Flex Code
11497 \begin_layout Plain Layout
11504 \begin_inset Flex Code
11507 \begin_layout Plain Layout
11516 \begin_layout Standard
11518 \begin_inset Flex Code
11521 \begin_layout Plain Layout
11530 \begin_inset Flex Code
11533 \begin_layout Plain Layout
11542 \begin_inset Flex Code
11545 \begin_layout Plain Layout
11551 followed by the number (e.
11552 \begin_inset space \thinspace{}
11556 \begin_inset space \space{}
11560 \begin_inset Flex Code
11563 \begin_layout Plain Layout
11573 \begin_layout Description
11574 \begin_inset Flex Code
11577 \begin_layout Plain Layout
11583 Note that this will completely override any prior
11584 \begin_inset Flex Code
11587 \begin_layout Plain Layout
11593 declaration for this style.
11595 \begin_inset Quotes eld
11599 \begin_inset Flex Code
11602 \begin_layout Plain Layout
11609 \begin_inset Quotes erd
11614 \begin_inset CommandInset ref
11616 reference "subsec:I18n"
11620 for details on its use.
11623 \begin_layout Description
11624 \begin_inset Flex Code
11627 \begin_layout Plain Layout
11634 \begin_inset Flex Code
11637 \begin_layout Plain Layout
11647 \begin_layout Plain Layout
11648 Note that a `float' here is a real number, such as: 1.5.
11653 The vertical space with which the last of a chain of paragraphs with this
11654 style is separated from the following paragraph.
11655 If the next paragraph has another style, the separations are not simply
11656 added, but the maximum is taken.
11659 \begin_layout Description
11660 \begin_inset Flex Code
11663 \begin_layout Plain Layout
11670 \begin_inset Flex Code
11673 \begin_layout Plain Layout
11679 ] The category for this style.
11680 This is used to group related styles in the style combobox on the toolbar.
11681 Any string can be used, but you may want to use existing categories with
11686 \begin_layout Description
11687 \begin_inset Flex Code
11690 \begin_layout Plain Layout
11696 Depth of XML command.
11697 Used only with XML-type formats.
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 ] Copies all the features of an existing style into the current one.
11724 \begin_layout Description
11725 \begin_inset Flex Code
11728 \begin_layout Plain Layout
11735 \begin_inset Flex Code
11738 \begin_layout Plain Layout
11744 ] The name of a style whose preamble should be output
11749 This allows to ensure some ordering of the preamble snippets when macros
11750 definitions depend on one another.
11754 \begin_layout Plain Layout
11755 Note that, besides that functionality, there is no way to ensure any ordering
11757 The ordering that you see in a given version of \SpecialChar LyX
11758 may change without warning
11767 \begin_layout Description
11768 \begin_inset Flex Code
11771 \begin_layout Plain Layout
11778 \begin_inset Flex Code
11781 \begin_layout Plain Layout
11786 , Box, Filled_Box, Static
11791 ] The type of label that stands at the end of the paragraph (or sequence
11793 \begin_inset Flex Code
11796 \begin_layout Plain Layout
11803 \begin_inset Newline newline
11807 \begin_inset Flex Code
11810 \begin_layout Plain Layout
11817 \begin_inset Flex Code
11820 \begin_layout Plain Layout
11827 \begin_inset Flex Code
11830 \begin_layout Plain Layout
11838 \begin_inset Flex Code
11841 \begin_layout Plain Layout
11848 \begin_inset Quotes eld
11852 \begin_inset Quotes erd
11856 \begin_inset Flex Code
11859 \begin_layout Plain Layout
11866 \begin_inset space \space{}
11870 \begin_inset Flex Code
11873 \begin_layout Plain Layout
11879 ) is a white (resp.
11880 \begin_inset space ~
11883 black) square suitable for end of proof markers,
11884 \begin_inset Flex Code
11887 \begin_layout Plain Layout
11893 is an explicit text string.
11896 \begin_layout Description
11897 \begin_inset Flex Code
11900 \begin_layout Plain Layout
11907 \begin_inset Flex Code
11910 \begin_layout Plain Layout
11916 ] The string used for a label with a
11917 \begin_inset Flex Code
11920 \begin_layout Plain Layout
11927 \begin_inset Newline newline
11931 \begin_inset Flex Code
11934 \begin_layout Plain Layout
11944 \begin_layout Description
11945 \begin_inset Flex Code
11948 \begin_layout Plain Layout
11954 The font used for both the text body
11960 \begin_inset CommandInset ref
11962 reference "subsec:Font-description"
11967 Note that defining this font automatically defines the
11968 \begin_inset Flex Code
11971 \begin_layout Plain Layout
11978 So you should define this one first if you also want to define
11979 \begin_inset Flex Code
11982 \begin_layout Plain Layout
11991 \begin_layout Description
11992 \begin_inset Flex Code
11995 \begin_layout Plain Layout
12002 \begin_inset Flex Code
12005 \begin_layout Plain Layout
12011 ] Used for backporting new styles to stable \SpecialChar LyX
12013 The first stable version that supports this tag is \SpecialChar LyX
12015 The argument is a number which may either be 0, -1 or any value greater
12018 \begin_inset Flex Code
12021 \begin_layout Plain Layout
12027 flag of a style is greater than zero, it will always be written to the
12029 If a .lyx file is read, the style definitions from the document header are
12030 added to the document class.
12031 Therefore even older \SpecialChar LyX
12032 versions can handle the style.
12034 \begin_inset Flex Code
12037 \begin_layout Plain Layout
12043 is a version number: if the style is read, and the version number is less
12044 than the version number of the already existing style in the document class,
12045 the new style is ignored.
12046 If the version number is greater, the new style replaces the existing style.
12047 A value of -1 means an infinite version number, i.
12048 \begin_inset space \thinspace{}
12052 \begin_inset space \space{}
12055 the style is always used.
12058 \begin_layout Description
12059 \begin_inset Flex Code
12062 \begin_layout Plain Layout
12069 \begin_inset Flex Code
12072 \begin_layout Plain Layout
12081 \begin_inset space \thinspace{}
12085 \begin_inset Flex Code
12088 \begin_layout Plain Layout
12094 ] Usually \SpecialChar LyX
12095 does not allow you to insert more than one space between words,
12096 since a space is considered as the separation between two words, not a
12097 character or symbol of its own.
12098 This is a very fine thing but sometimes annoying, for example, when typing
12099 program code or plain \SpecialChar LaTeX
12102 \begin_inset Flex Code
12105 \begin_layout Plain Layout
12112 Note that \SpecialChar LyX
12113 will create protected blanks for the additional blanks when
12114 in another mode than \SpecialChar LaTeX
12118 \begin_layout Description
12119 \begin_inset Flex Code
12122 \begin_layout Plain Layout
12128 These tags are used with XHTML output.
12130 \begin_inset CommandInset ref
12132 reference "subsec:Paragraph-Style-XHTML"
12139 \begin_layout Description
12140 \begin_inset Flex Code
12143 \begin_layout Plain Layout
12149 [FIXME] (Used only with XML-type formats.)
12152 \begin_layout Description
12153 \begin_inset Flex Code
12156 \begin_layout Plain Layout
12163 \begin_inset Flex Code
12166 \begin_layout Plain Layout
12175 \begin_inset space \thinspace{}
12179 \begin_inset Flex Code
12182 \begin_layout Plain Layout
12189 \begin_inset Flex Code
12192 \begin_layout Plain Layout
12198 , marks the style as to be included in the document preamble and not in
12200 This is useful for document classes that want such information as the title
12201 and author to appear in the preamble.
12202 Note that this works only for styles for which the
12203 \begin_inset Flex Code
12206 \begin_layout Plain Layout
12213 \begin_inset Flex Code
12216 \begin_layout Plain Layout
12223 \begin_inset Flex Code
12226 \begin_layout Plain Layout
12235 \begin_layout Description
12236 \begin_inset Flex Code
12239 \begin_layout Plain Layout
12246 \begin_inset Flex Code
12249 \begin_layout Plain Layout
12258 \begin_inset space \thinspace{}
12262 \begin_inset Flex Code
12265 \begin_layout Plain Layout
12272 \begin_inset Flex Code
12275 \begin_layout Plain Layout
12281 , marks the style as being part of a title block (see also the
12282 \begin_inset Flex Code
12285 \begin_layout Plain Layout
12292 \begin_inset Flex Code
12295 \begin_layout Plain Layout
12304 \begin_layout Description
12305 \begin_inset Flex Code
12308 \begin_layout Plain Layout
12315 \begin_inset Flex Code
12318 \begin_layout Plain Layout
12324 ] The \SpecialChar LaTeX
12325 command sequence declaring an item in a list.
12326 The command is to be defined without the preceding backslash (the default
12328 \begin_inset Quotes eld
12332 \begin_inset Quotes erd
12336 \begin_inset Flex Code
12339 \begin_layout Plain Layout
12347 in the \SpecialChar LaTeX
12351 \begin_layout Description
12352 \begin_inset Flex Code
12355 \begin_layout Plain Layout
12362 \begin_inset Flex Code
12365 \begin_layout Plain Layout
12371 ] This provides extra space between paragraphs that have the same style.
12372 If you put other styles into an environment, each is separated with the
12374 \begin_inset Flex Code
12377 \begin_layout Plain Layout
12384 But the whole items of the environment are additionally separated with
12386 \begin_inset Flex Code
12389 \begin_layout Plain Layout
12396 Note that this is a
12401 \begin_layout Description
12402 \begin_inset Flex Code
12405 \begin_layout Plain Layout
12411 [FIXME] (Used only with XML-type formats.)
12414 \begin_layout Description
12415 \begin_inset Flex Code
12418 \begin_layout Plain Layout
12425 \begin_inset Flex Code
12428 \begin_layout Plain Layout
12437 \begin_inset space \thinspace{}
12441 \begin_inset Flex Code
12444 \begin_layout Plain Layout
12450 ] Usually \SpecialChar LyX
12451 does not allow you to leave a paragraph empty, since it would
12452 lead to empty \SpecialChar LaTeX
12454 There are some cases where this could be desirable however: in a letter
12455 template, the required fields can be provided as empty fields, so that
12456 people do not forget them; in some special classes, a style can be used
12457 as some kind of break, which does not contain actual text.
12460 \begin_layout Description
12461 \begin_inset Flex Code
12464 \begin_layout Plain Layout
12471 \begin_inset Flex Code
12474 \begin_layout Plain Layout
12480 ] The vertical space between the label and the text body.
12481 Only used for labels that are above the text body (
12482 \begin_inset Flex Code
12485 \begin_layout Plain Layout
12492 \begin_inset Newline newline
12496 \begin_inset Flex Code
12499 \begin_layout Plain Layout
12500 Centered_Top_Environment
12508 \begin_layout Description
12509 \begin_inset Flex Code
12512 \begin_layout Plain Layout
12519 \begin_inset Flex Code
12522 \begin_layout Plain Layout
12528 ] The name of the counter for automatic numbering.
12529 In order to have the counter appear with your label, you will need to reference
12531 \begin_inset Flex Code
12534 \begin_layout Plain Layout
12543 This will work with
12544 \begin_inset Flex Code
12547 \begin_layout Plain Layout
12554 \begin_inset Flex Code
12557 \begin_layout Plain Layout
12564 \begin_inset Flex Code
12567 \begin_layout Plain Layout
12574 \begin_inset Flex Code
12577 \begin_layout Plain Layout
12584 \begin_inset Newline newline
12592 \begin_inset Flex Code
12595 \begin_layout Plain Layout
12602 \begin_inset Flex Code
12605 \begin_layout Plain Layout
12611 , though this case is a bit complicated.
12612 Suppose you declare
12613 \begin_inset Quotes eld
12617 \begin_inset Flex Code
12620 \begin_layout Plain Layout
12621 LabelCounter myenum
12627 \begin_inset Quotes erd
12631 Then the actual counters used are
12632 \begin_inset Flex Code
12635 \begin_layout Plain Layout
12642 \begin_inset Flex Code
12645 \begin_layout Plain Layout
12652 \begin_inset Flex Code
12655 \begin_layout Plain Layout
12662 \begin_inset Flex Code
12665 \begin_layout Plain Layout
12671 , much as in \SpecialChar LaTeX
12673 These counters must all be declared separately.
12674 \begin_inset Newline newline
12678 \begin_inset CommandInset ref
12680 reference "subsec:Counters"
12684 for details on counters.
12687 \begin_layout Description
12688 \begin_inset Flex Code
12691 \begin_layout Plain Layout
12697 The font used for the label.
12699 \begin_inset CommandInset ref
12701 reference "subsec:Font-description"
12708 \begin_layout Description
12709 \begin_inset Flex Code
12712 \begin_layout Plain Layout
12719 \begin_inset Flex Code
12722 \begin_layout Plain Layout
12728 ] Text that indicates how far a label should be indented.
12731 \begin_layout Description
12732 \begin_inset Flex Code
12735 \begin_layout Plain Layout
12742 \begin_inset Flex Code
12745 \begin_layout Plain Layout
12751 ] Text that indicates the amount of horizontal space between the label and
12753 Only used for labels that are not above the text body.
12756 \begin_layout Description
12757 \begin_inset Flex Code
12760 \begin_layout Plain Layout
12767 \begin_inset Flex Code
12770 \begin_layout Plain Layout
12776 ] The string used for the label.
12778 \begin_inset Flex Code
12781 \begin_layout Plain Layout
12787 is set, this string can be contain the special formatting commands described
12789 \begin_inset CommandInset ref
12791 reference "subsec:Counters"
12798 \begin_layout Description
12799 \begin_inset Flex Code
12802 \begin_layout Plain Layout
12803 LabelStringAppendix
12809 \begin_inset Flex Code
12812 \begin_layout Plain Layout
12818 ] This is used inside the appendix instead of
12819 \begin_inset Newline newline
12823 \begin_inset Flex Code
12826 \begin_layout Plain Layout
12834 \begin_inset Flex Code
12837 \begin_layout Plain Layout
12844 \begin_inset Newline newline
12848 \begin_inset Flex Code
12851 \begin_layout Plain Layout
12852 LabelStringAppendix
12860 \begin_layout Description
12861 \begin_inset Flex Code
12864 \begin_layout Plain Layout
12870 [FIXME] (Used only with XML-type formats.)
12873 \begin_layout Description
12874 \begin_inset Flex Code
12877 \begin_layout Plain Layout
12884 \begin_inset Flex Code
12887 \begin_layout Plain Layout
12892 , Manual, Static, Above,
12893 \begin_inset Newline newline
12896 Centered, Sensitive, Enumerate,
12897 \begin_inset Newline newline
12900 Itemize, Bibliography
12906 \begin_inset Separator parbreak
12913 \begin_layout Description
12914 \begin_inset Flex Code
12917 \begin_layout Plain Layout
12923 means the label is the very first word (up to the first real blank).
12924 Use protected spaces if you want more than one word as the label.
12928 \begin_layout Description
12929 \begin_inset Flex Code
12932 \begin_layout Plain Layout
12938 means the label is simply what is declared as
12939 \begin_inset Flex Code
12942 \begin_layout Plain Layout
12949 This will be displayed
12950 \begin_inset Quotes eld
12954 \begin_inset Quotes erd
12957 , at the beginning of the paragraph.
12959 \begin_inset Flex Code
12962 \begin_layout Plain Layout
12969 \begin_inset Flex Code
12972 \begin_layout Plain Layout
12978 , then it will be displayed only in the first paragraph of any sequence
12979 of paragraphs with the same
12980 \begin_inset Flex Code
12983 \begin_layout Plain Layout
12992 \begin_layout Description
12993 \begin_inset Flex Code
12996 \begin_layout Plain Layout
13003 \begin_inset space ~
13007 \begin_inset space ~
13011 \begin_inset Flex Code
13014 \begin_layout Plain Layout
13020 are special cases of
13021 \begin_inset Flex Code
13024 \begin_layout Plain Layout
13031 The label will be printed above the paragraph either at the beginning of
13032 the line or centered.
13035 \begin_layout Description
13036 \begin_inset Flex Code
13039 \begin_layout Plain Layout
13045 is a special case for the caption-labels
13046 \begin_inset Quotes eld
13050 \begin_inset Quotes erd
13054 \begin_inset Quotes eld
13058 \begin_inset Quotes erd
13062 \begin_inset Newline newline
13066 \begin_inset Flex Code
13069 \begin_layout Plain Layout
13075 means the (hardcoded) label string depends on the kind of float: It is
13076 hardcoded to be `FloatType N', where N is the value of the counter associated
13078 For the case that a caption is inserted outside of a float the
13079 \begin_inset Flex Code
13082 \begin_layout Plain Layout
13089 \begin_inset Quotes eld
13093 \begin_inset Quotes erd
13099 \begin_layout Description
13100 \begin_inset Flex Code
13103 \begin_layout Plain Layout
13109 produces the usual sort of enumeration labels.
13110 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13111 small Roman numerals, and uppercase letters for the four possible depths.
13114 \begin_layout Description
13115 \begin_inset Flex Code
13118 \begin_layout Plain Layout
13124 produces various bullets at the different levels.
13125 It is also hardcoded.
13128 \begin_layout Description
13129 \begin_inset Flex Code
13132 \begin_layout Plain Layout
13138 should be used only with
13139 \begin_inset Flex Code
13142 \begin_layout Plain Layout
13143 LatexType BibEnvironment
13152 \begin_layout Description
13153 \begin_inset Flex Code
13156 \begin_layout Plain Layout
13162 Note that this will completely override any prior
13163 \begin_inset Flex Code
13166 \begin_layout Plain Layout
13172 declaration for this style.
13174 \begin_inset Quotes eld
13178 \begin_inset Flex Code
13181 \begin_layout Plain Layout
13188 \begin_inset Quotes erd
13193 \begin_inset CommandInset ref
13195 reference "subsec:I18n"
13199 for details on its use.
13202 \begin_layout Description
13203 \begin_inset Flex Code
13206 \begin_layout Plain Layout
13213 \begin_inset Flex Code
13216 \begin_layout Plain Layout
13222 ] The name of the corresponding \SpecialChar LaTeX
13224 Either the environment or command name.
13227 \begin_layout Description
13228 \begin_inset Flex Code
13231 \begin_layout Plain Layout
13238 \begin_inset Flex Code
13241 \begin_layout Plain Layout
13247 ] An optional parameter for the corresponding
13248 \begin_inset Flex Code
13251 \begin_layout Plain Layout
13258 This parameter cannot be changed from within \SpecialChar LyX
13260 \begin_inset Flex Code
13263 \begin_layout Plain Layout
13269 for customizable parameters).
13270 This will be output as is after all \SpecialChar LaTeX
13272 \begin_inset Flex Code
13275 \begin_layout Plain Layout
13284 \begin_layout Description
13285 \begin_inset Flex Code
13288 \begin_layout Plain Layout
13295 \begin_inset Flex Code
13298 \begin_layout Plain Layout
13303 , Command, Environment, Item_Environment,
13304 \begin_inset Newline newline
13307 List_Environment, Bib_Environment
13312 ] How the style should be translated into \SpecialChar LaTeX
13317 \begin_layout Plain Layout
13318 \begin_inset Flex Code
13321 \begin_layout Plain Layout
13327 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13328 Visit the SGML class files for specific examples.
13334 \begin_inset Separator parbreak
13341 \begin_layout Description
13342 \begin_inset Flex Code
13345 \begin_layout Plain Layout
13351 means nothing special.
13354 \begin_layout Description
13355 \begin_inset Flex Code
13358 \begin_layout Plain Layout
13365 \begin_inset Flex Code
13368 \begin_layout Plain Layout
13375 {\SpecialChar ldots
13384 \begin_layout Description
13385 \begin_inset Flex Code
13388 \begin_layout Plain Layout
13395 \begin_inset Flex Code
13398 \begin_layout Plain Layout
13405 }\SpecialChar ldots
13421 \begin_layout Description
13422 \begin_inset Flex Code
13425 \begin_layout Plain Layout
13432 \begin_inset Flex Code
13435 \begin_layout Plain Layout
13442 \begin_inset Flex Code
13445 \begin_layout Plain Layout
13453 is generated for each paragraph of this environment.
13457 \begin_layout Description
13458 \begin_inset Flex Code
13461 \begin_layout Plain Layout
13468 \begin_inset Flex Code
13471 \begin_layout Plain Layout
13478 \begin_inset Newline newline
13482 \begin_inset Flex Code
13485 \begin_layout Plain Layout
13491 is passed as an argument to the environment.
13492 \begin_inset Newline newline
13496 \begin_inset Flex Code
13499 \begin_layout Plain Layout
13505 can be defined in the
13506 \begin_inset Flex Noun
13509 \begin_layout Plain Layout
13510 Edit\SpecialChar menuseparator
13512 \begin_inset space ~
13523 \begin_layout Description
13524 \begin_inset Flex Code
13527 \begin_layout Plain Layout
13534 \begin_inset Flex Code
13537 \begin_layout Plain Layout
13543 but adds the necessary mandatory argument (the longest label) to the begin
13544 statement of the bibliography environment:
13545 \begin_inset Newline newline
13549 \begin_inset Flex Code
13552 \begin_layout Plain Layout
13555 begin{thebibliography}{99}
13561 It is therefore only useful for bibliography environments.
13562 The default longest label
13563 \begin_inset Quotes eld
13567 \begin_inset Quotes erd
13570 can be changed by the user in the paragraph settings of a bibliography
13574 \begin_layout Standard
13575 Putting the last few things together, the \SpecialChar LaTeX
13576 output will be either:
13579 \begin_layout LyX-Code
13582 LatexName[LatexParam]{\SpecialChar ldots
13586 \begin_layout Standard
13590 \begin_layout LyX-Code
13593 begin{LatexName}[LatexParam] \SpecialChar ldots
13599 \begin_layout Standard
13600 depending upon the \SpecialChar LaTeX
13605 \begin_layout Description
13606 \begin_inset Flex Code
13609 \begin_layout Plain Layout
13616 \begin_inset Flex Code
13619 \begin_layout Plain Layout
13625 ] A string that is put at the beginning of the style content.
13626 A line break in the output can be indicated by
13627 \begin_inset Flex Code
13630 \begin_layout Plain Layout
13639 \begin_layout Description
13640 \begin_inset Flex Code
13643 \begin_layout Plain Layout
13650 \begin_inset Flex Code
13653 \begin_layout Plain Layout
13659 ] If you put styles into environments, the different
13660 \begin_inset Flex Code
13663 \begin_layout Plain Layout
13669 are not simply added, but added with a factor
13670 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13674 Note that this parameter is also used when
13675 \begin_inset Flex Code
13678 \begin_layout Plain Layout
13685 \begin_inset Flex Code
13688 \begin_layout Plain Layout
13695 \begin_inset Flex Code
13698 \begin_layout Plain Layout
13705 Then it is added to the manual or dynamic margin.
13706 \begin_inset Newline newline
13710 \begin_inset Quotes eld
13714 \begin_inset Flex Code
13717 \begin_layout Plain Layout
13724 \begin_inset Quotes erd
13727 means that the paragraph is indented with the width of
13728 \begin_inset Quotes eld
13732 \begin_inset Flex Code
13735 \begin_layout Plain Layout
13742 \begin_inset Quotes erd
13745 in the normal font.
13746 You can get a negative width by prefixing the string with
13747 \begin_inset Quotes eld
13751 \begin_inset Flex Code
13754 \begin_layout Plain Layout
13761 \begin_inset Quotes erd
13765 This way was chosen so that the look is the same with each used screen
13769 \begin_layout Description
13770 \begin_inset Flex Code
13773 \begin_layout Plain Layout
13780 \begin_inset Flex Code
13783 \begin_layout Plain Layout
13788 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13794 \begin_inset Newline newline
13797 The kind of margin that the style has on the left side.
13798 \begin_inset Separator parbreak
13805 \begin_layout Description
13806 \begin_inset Flex Code
13809 \begin_layout Plain Layout
13815 just means a fixed margin.
13818 \begin_layout Description
13819 \begin_inset Flex Code
13822 \begin_layout Plain Layout
13828 means that the left margin depends on the string entered in the
13829 \begin_inset Flex Noun
13832 \begin_layout Plain Layout
13833 Edit\SpecialChar menuseparator
13835 \begin_inset space ~
13844 This is used to typeset nice lists without tabulators.
13847 \begin_layout Description
13848 \begin_inset Flex Code
13851 \begin_layout Plain Layout
13857 means that the margin depends on the size of the label.
13858 This is used for automatic enumerated headlines.
13859 It is obvious that the headline
13860 \begin_inset Quotes eld
13863 5.4.3.2.1 Very long headline
13864 \begin_inset Quotes erd
13867 must have a wider left margin (as wide as
13868 \begin_inset Quotes eld
13872 \begin_inset Quotes erd
13875 plus the space) than
13876 \begin_inset Quotes eld
13879 3.2 Very long headline
13880 \begin_inset Quotes erd
13884 \begin_inset Quotes eld
13888 \begin_inset Quotes erd
13891 are not able to do this.
13894 \begin_layout Description
13895 \begin_inset Flex Code
13898 \begin_layout Plain Layout
13904 is similar, but only the very first row of the paragraph is dynamic, while
13905 the others are static; this is used, for example, for descriptions.
13908 \begin_layout Description
13909 \begin_inset Flex Code
13912 \begin_layout Plain Layout
13918 means the margin is chosen in a way that the longest row of this paragraph
13919 fits to the right margin.
13920 This is used to typeset an address on the right edge of the page.
13924 \begin_layout Description
13925 \begin_inset Flex Code
13928 \begin_layout Plain Layout
13935 \begin_inset Flex Code
13938 \begin_layout Plain Layout
13947 \begin_inset space \thinspace{}
13951 \begin_inset Flex Code
13954 \begin_layout Plain Layout
13960 ] Whether fragile commands in this style should be
13961 \begin_inset Flex Code
13964 \begin_layout Plain Layout
13977 whether this command should itself be protected.)
13980 \begin_layout Description
13981 \begin_inset Flex Code
13984 \begin_layout Plain Layout
13991 \begin_inset Flex Code
13994 \begin_layout Plain Layout
14001 \begin_inset space \thinspace{}
14005 \begin_inset Flex Code
14008 \begin_layout Plain Layout
14016 ] Whether newlines are translated into \SpecialChar LaTeX
14018 \begin_inset Flex Code
14021 \begin_layout Plain Layout
14032 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
14034 inside \SpecialChar LyX
14038 \begin_layout Description
14039 \begin_inset Flex Code
14042 \begin_layout Plain Layout
14049 \begin_inset Flex Code
14052 \begin_layout Plain Layout
14061 \begin_inset space \thinspace{}
14065 \begin_inset Flex Code
14068 \begin_layout Plain Layout
14074 ] If set to true, and if
14075 \begin_inset Flex Code
14078 \begin_layout Plain Layout
14085 \begin_inset Flex Code
14088 \begin_layout Plain Layout
14094 ) paragraphs are being indented, then the indentation of such a paragraph
14095 following one of this type will be suppressed.
14096 (So this will not affect the display of non-default paragraphs.)
14099 \begin_layout Description
14100 \begin_inset Flex Code
14103 \begin_layout Plain Layout
14110 \begin_inset Flex Code
14113 \begin_layout Plain Layout
14119 ] Name of a style that has replaced this style.
14120 This is used to rename a style, while keeping backward compatibility.
14123 \begin_layout Description
14124 \begin_inset Flex Code
14127 \begin_layout Plain Layout
14134 \begin_inset Flex Code
14137 \begin_layout Plain Layout
14144 \begin_inset space \thinspace{}
14148 \begin_inset Flex Code
14151 \begin_layout Plain Layout
14157 ] Determines whether consecutive pragraphs of the same type are treated
14158 as belonging together.
14159 This has the effect that the
14160 \begin_inset Flex Code
14163 \begin_layout Plain Layout
14169 is only printed once before such a group.
14170 By default, this is true for
14171 \begin_inset Flex Code
14174 \begin_layout Plain Layout
14181 \begin_inset Flex Code
14184 \begin_layout Plain Layout
14191 \begin_inset Flex Code
14194 \begin_layout Plain Layout
14200 and false for all other types.
14203 \begin_layout Description
14204 \begin_inset Flex Code
14207 \begin_layout Plain Layout
14214 \begin_inset Flex Code
14217 \begin_layout Plain Layout
14226 \begin_inset space \thinspace{}
14230 \begin_inset Flex Code
14233 \begin_layout Plain Layout
14239 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14241 but only by a line break; together with
14242 \begin_inset Flex Code
14245 \begin_layout Plain Layout
14251 , this allows to emulate a plain text editor (like the ERT inset).
14254 \begin_layout Description
14255 \begin_inset Flex Code
14258 \begin_layout Plain Layout
14265 \begin_inset Flex Code
14268 \begin_layout Plain Layout
14274 ] The indent of the very first line of a paragraph.
14276 \begin_inset Newline newline
14280 \begin_inset Flex Code
14283 \begin_layout Plain Layout
14289 will be fixed for a certain style.
14290 The exception is the default style, since the indentation for these paragraphs
14291 can be prohibited with
14292 \begin_inset Flex Code
14295 \begin_layout Plain Layout
14303 \begin_inset Flex Code
14306 \begin_layout Plain Layout
14312 style paragraphs inside environments use the
14313 \begin_inset Flex Code
14316 \begin_layout Plain Layout
14322 of the environment, not their native one.
14324 \begin_inset Flex Code
14327 \begin_layout Plain Layout
14333 paragraphs inside an enumeration are not indented.
14336 \begin_layout Description
14337 \begin_inset Flex Code
14340 \begin_layout Plain Layout
14347 \begin_inset Flex Code
14350 \begin_layout Plain Layout
14356 ] The vertical space between two paragraphs of this style.
14359 \begin_layout Description
14360 \begin_inset Flex Code
14363 \begin_layout Plain Layout
14370 \begin_inset Flex Code
14373 \begin_layout Plain Layout
14380 allows the user to choose either
14381 \begin_inset Quotes eld
14385 \begin_inset Quotes erd
14389 \begin_inset Quotes eld
14393 \begin_inset Quotes erd
14396 to separate paragraphs.
14398 \begin_inset Quotes eld
14402 \begin_inset Quotes erd
14406 \begin_inset Flex Code
14409 \begin_layout Plain Layout
14417 \begin_inset Quotes eld
14421 \begin_inset Quotes erd
14425 \begin_inset Flex Code
14428 \begin_layout Plain Layout
14434 is ignored and all paragraphs are separated by the
14435 \begin_inset Flex Code
14438 \begin_layout Plain Layout
14445 The vertical space is calculated with
14446 \begin_inset Flex Code
14449 \begin_layout Plain Layout
14451 \begin_inset space ~
14460 \begin_inset Flex Code
14463 \begin_layout Plain Layout
14469 is the height of a row with the normal font.
14470 This way, the look stays the same with different screen fonts.
14473 \begin_layout Description
14474 \begin_inset Flex Code
14477 \begin_layout Plain Layout
14484 \begin_inset Flex Code
14487 \begin_layout Plain Layout
14496 \begin_inset space \thinspace{}
14500 \begin_inset Flex Code
14503 \begin_layout Plain Layout
14509 ] Whether the contents of this paragraph should be output in raw form, meaning
14510 without special translations that \SpecialChar LaTeX
14514 \begin_layout Description
14515 \begin_inset Flex Code
14518 \begin_layout Plain Layout
14525 \begin_inset Flex Code
14528 \begin_layout Plain Layout
14538 Defines individual characters that should be output in raw form, meaning
14539 without special translations that \SpecialChar LaTeX
14543 \begin_layout Description
14544 \begin_inset Flex Code
14547 \begin_layout Plain Layout
14553 Information to be included in the \SpecialChar LaTeX
14554 preamble when this style is used.
14555 Used to define macros, load packages, etc., required by this particular
14558 \begin_inset Quotes eld
14562 \begin_inset Flex Code
14565 \begin_layout Plain Layout
14572 \begin_inset Quotes erd
14578 \begin_layout Description
14579 \begin_inset Flex Code
14582 \begin_layout Plain Layout
14589 \begin_inset Flex Code
14592 \begin_layout Plain Layout
14598 ] The prefix to use when creating labels referring to paragraphs of this
14600 This allows the use of formatted references.
14603 \begin_layout Description
14604 \begin_inset Flex Code
14607 \begin_layout Plain Layout
14614 \begin_inset Flex Code
14617 \begin_layout Plain Layout
14623 ] Whether the style requires the feature
14624 \begin_inset Flex Code
14627 \begin_layout Plain Layout
14634 \begin_inset CommandInset ref
14636 reference "chap:List-of-functions"
14640 for the list of features).
14641 If you require a package with specific options, you can additionally use
14643 \begin_inset Flex Code
14646 \begin_layout Plain Layout
14652 as a general text class parameter (see
14653 \begin_inset CommandInset ref
14655 reference "subsec:General-text-class"
14662 \begin_layout Description
14663 \begin_inset Flex Code
14666 \begin_layout Plain Layout
14673 \begin_inset Flex Code
14676 \begin_layout Plain Layout
14685 \begin_inset Flex Code
14688 \begin_layout Plain Layout
14694 ] Resets the \SpecialChar LaTeX
14695 arguments of this style (as defined via the
14696 \begin_inset Flex Code
14699 \begin_layout Plain Layout
14706 This is useful if you have copied a style via
14707 \begin_inset Flex Code
14710 \begin_layout Plain Layout
14716 , but you do not want to inherit its (required and optional) arguments.
14719 \begin_layout Description
14720 \begin_inset Flex Code
14723 \begin_layout Plain Layout
14730 \begin_inset Flex Code
14733 \begin_layout Plain Layout
14739 ] A string that is put at the end of the layout content.
14740 A line break in the output can be indicated by
14741 \begin_inset Flex Code
14744 \begin_layout Plain Layout
14753 \begin_layout Description
14754 \begin_inset Flex Code
14757 \begin_layout Plain Layout
14764 \begin_inset Flex Code
14767 \begin_layout Plain Layout
14774 \begin_inset Flex Code
14777 \begin_layout Plain Layout
14786 \begin_layout Description
14787 \begin_inset Flex Code
14790 \begin_layout Plain Layout
14797 \begin_inset Flex Code
14800 \begin_layout Plain Layout
14809 \begin_inset Flex Code
14812 \begin_layout Plain Layout
14819 \begin_inset Flex Code
14822 \begin_layout Plain Layout
14829 \begin_inset Flex Code
14832 \begin_layout Plain Layout
14834 \begin_inset space ~
14842 ] This defines what the default spacing should be in the style.
14844 \begin_inset Flex Code
14847 \begin_layout Plain Layout
14854 \begin_inset Flex Code
14857 \begin_layout Plain Layout
14864 \begin_inset Flex Code
14867 \begin_layout Plain Layout
14873 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14874 If you specify the argument
14875 \begin_inset Flex Code
14878 \begin_layout Plain Layout
14884 , then you must also provide a value argument which will be the actual multiplie
14886 Note that, contrary to other parameters,
14887 \begin_inset Flex Code
14890 \begin_layout Plain Layout
14896 implies the generation of specific \SpecialChar LaTeX
14897 code, using the \SpecialChar LaTeX
14901 \begin_inset Flex Code
14904 \begin_layout Plain Layout
14913 \begin_layout Description
14914 \begin_inset Flex Code
14917 \begin_layout Plain Layout
14924 \begin_inset Flex Code
14927 \begin_layout Plain Layout
14934 \begin_inset space \thinspace{}
14938 \begin_inset Flex Code
14941 \begin_layout Plain Layout
14949 ] Allow spell-checking paragraphs of this style.
14953 \begin_layout Description
14954 \begin_inset Flex Code
14957 \begin_layout Plain Layout
14963 The font used for the text body .
14965 \begin_inset CommandInset ref
14967 reference "subsec:Font-description"
14974 \begin_layout Description
14975 \begin_inset Flex Code
14978 \begin_layout Plain Layout
14987 \begin_inset Flex Code
14990 \begin_layout Plain Layout
15000 The level of the style in the table of contents.
15001 This is used for automatic numbering of section headings.
15004 \begin_layout Description
15005 \begin_inset Flex Code
15008 \begin_layout Plain Layout
15017 \begin_inset Flex Code
15020 \begin_layout Plain Layout
15031 \begin_inset Flex Code
15034 \begin_layout Plain Layout
15041 \begin_inset Flex Code
15044 \begin_layout Plain Layout
15050 ] This tag determines whether the first line indentation of this paragraph
15051 can be toggled via the Paragraph settings dialog.
15055 \begin_inset Flex Code
15058 \begin_layout Plain Layout
15068 is set, indentation can be toggled if the document settings use
15069 \begin_inset Quotes eld
15073 \begin_inset Quotes erd
15076 paragraph style, with
15077 \begin_inset Flex Code
15080 \begin_layout Plain Layout
15086 , indentation can always be toggled, notwithstanding the document settings,
15088 \begin_inset Flex Code
15091 \begin_layout Plain Layout
15097 , indentation can never be toggled.
15100 \begin_layout Description
15101 \begin_inset Flex Code
15104 \begin_layout Plain Layout
15111 \begin_inset Flex Code
15114 \begin_layout Plain Layout
15120 ] The vertical space with which the very first of a chain of paragraphs
15121 with this style is separated from the previous paragraph.
15122 If the previous paragraph has another style, the separations are not simply
15123 added, but the maximum is taken.
15126 \begin_layout Subsection
15127 \begin_inset CommandInset label
15133 Internationalization of Paragraph Styles
15136 \begin_layout Standard
15138 has long supported internationalization of layout information, but, until
15139 version 2.0, this applied only to the user interface and not to, say, PDF
15141 Thus, French authors were forced to resort to ugly hacks if they wanted
15146 1' instead of `Theorem 1'.
15147 Thanks to Georg Baum, that is no longer the case.
15150 \begin_layout Standard
15152 \begin_inset Flex Code
15155 \begin_layout Plain Layout
15161 defines text that is to appear in the typeset document, it may use
15162 \begin_inset Flex Code
15165 \begin_layout Plain Layout
15172 \begin_inset Flex Code
15175 \begin_layout Plain Layout
15181 to support non-English and even multi-language documents correctly.
15182 The following excerpt (from the
15183 \begin_inset Flex Code
15186 \begin_layout Plain Layout
15192 file) shows how this works:
15195 \begin_layout LyX-Code
15197 \begin_inset Separator parbreak
15204 \begin_layout LyX-Code
15207 theoremstyle{remark}
15210 \begin_layout LyX-Code
15213 newtheorem{claim}[thm]{
15220 \begin_layout LyX-Code
15224 \begin_layout LyX-Code
15228 \begin_layout LyX-Code
15233 claimname}{_(Claim)}
15236 \begin_layout LyX-Code
15240 \begin_layout LyX-Code
15244 \begin_layout LyX-Code
15253 claimname}{_(Claim)}}
15256 \begin_layout LyX-Code
15261 \begin_layout Standard
15262 In principle, any legal \SpecialChar LaTeX
15264 \begin_inset Flex Code
15267 \begin_layout Plain Layout
15274 \begin_inset Flex Code
15277 \begin_layout Plain Layout
15283 tags, but in practice they will typically look as they do here.
15284 The key to correct translation of the typeset text is the definition of
15285 the \SpecialChar LaTeX
15287 \begin_inset Flex Code
15290 \begin_layout Plain Layout
15299 \begin_inset Flex Code
15302 \begin_layout Plain Layout
15314 \begin_layout Standard
15316 \begin_inset Flex Code
15319 \begin_layout Plain Layout
15325 tag provides for internationalization based upon the overall language of
15327 The contents of the tag will be included in the preamble, just as with
15329 \begin_inset Flex Code
15332 \begin_layout Plain Layout
15339 What makes it special is the use of the
15340 \begin_inset Quotes eld
15344 \begin_inset Quotes erd
15348 \begin_inset Flex Code
15351 \begin_layout Plain Layout
15357 , which will be replaced, when \SpecialChar LyX
15358 produces \SpecialChar LaTeX
15359 output, with the translation of
15360 its argument into the document language.
15363 \begin_layout Standard
15365 \begin_inset Flex Code
15368 \begin_layout Plain Layout
15374 tag is more complex, since it is meant to provide support for multi-language
15375 documents and so offers an interface to the
15376 \begin_inset Flex Code
15379 \begin_layout Plain Layout
15386 Its contents will be added to the preamble once for each language that
15387 appears in the document.
15388 In this case, the argument to
15389 \begin_inset Flex Code
15392 \begin_layout Plain Layout
15398 will be replaced with its translation into the language in question; the
15400 \begin_inset Flex Code
15403 \begin_layout Plain Layout
15409 is replaced by the language name (as used by the babel package).
15412 \begin_layout Standard
15413 A German document that also included a French section would thus have the
15414 following in the preamble:
15417 \begin_layout LyX-Code
15426 claimname}{Affirmation}}
15427 \begin_inset Newline newline
15438 claimname}{Behauptung}}
15439 \begin_inset Newline newline
15446 claimname}{Behauptung}
15449 \begin_layout Standard
15452 \begin_inset Flex Code
15455 \begin_layout Plain Layout
15461 will then conspire to produce the correct text in the output.
15464 \begin_layout Standard
15465 One important point to note here is that the translations are provided by
15467 itself, through the file
15468 \begin_inset Flex Code
15471 \begin_layout Plain Layout
15478 This means, in effect, that
15479 \begin_inset Flex Code
15482 \begin_layout Plain Layout
15489 \begin_inset Flex Code
15492 \begin_layout Plain Layout
15498 are really only of use in layout files that are provided with \SpecialChar LyX
15500 entered in user-created layout files will not be seen by \SpecialChar LyX
15501 's internationalizatio
15502 n routines unless the
15503 \begin_inset Flex Code
15506 \begin_layout Plain Layout
15512 file is modified accordingly.
15513 That said, however, any layout created with the intention that it will
15514 be included with \SpecialChar LyX
15515 should use these tags where appropriate.
15516 Please note that the paragraph style translations provided by \SpecialChar LyX
15518 change with a minor update (e.
15519 \begin_inset space \thinspace{}
15523 \begin_inset space \space{}
15526 from version 2.1.x to 2.1.y).
15527 It is however quite likely that a major update (e.
15528 \begin_inset space \thinspace{}
15532 \begin_inset space \space{}
15535 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15538 \begin_layout Subsection
15540 \begin_inset CommandInset label
15542 name "subsec:Floats"
15549 \begin_layout Standard
15550 It is necessary to define the floats (
15551 \begin_inset Flex Noun
15554 \begin_layout Plain Layout
15561 \begin_inset Flex Noun
15564 \begin_layout Plain Layout
15570 , \SpecialChar ldots
15571 ) in the text class itself.
15572 Standard floats are included in the file
15573 \begin_inset Flex Code
15576 \begin_layout Plain Layout
15582 , so you may have to do no more than add
15585 \begin_layout LyX-Code
15586 Input stdfloats.inc
15589 \begin_layout Standard
15590 to your layout file.
15591 If you want to implement a text class that proposes some other float types
15592 (like the AGU class bundled with \SpecialChar LyX
15593 ), the information below will hopefully
15597 \begin_layout Description
15598 \begin_inset Flex Code
15601 \begin_layout Plain Layout
15608 \begin_inset Flex Code
15611 \begin_layout Plain Layout
15617 =!htbpH] Allowed placement options for this float type.
15618 The value is a string of placement characters.
15619 Possible characters include:
15624 \begin_inset Quotes eld
15628 \begin_inset Quotes erd
15636 \begin_inset Quotes eld
15640 \begin_inset Quotes erd
15648 \begin_inset Quotes eld
15652 \begin_inset Quotes erd
15660 \begin_inset Quotes eld
15664 \begin_inset Quotes erd
15672 \begin_inset Quotes eld
15676 \begin_inset Quotes erd
15684 \begin_inset Quotes eld
15688 \begin_inset Quotes erd
15692 The order of the characters in the string does not matter.
15693 If no placement options are allowed, use the string
15700 \begin_layout Description
15701 \begin_inset Flex Code
15704 \begin_layout Plain Layout
15711 \begin_inset Flex Code
15714 \begin_layout Plain Layout
15723 \begin_inset space \thinspace{}
15729 \begin_inset Flex Code
15732 \begin_layout Plain Layout
15742 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15749 \begin_inset Flex Code
15752 \begin_layout Plain Layout
15758 if the float does not support this feature.
15761 \begin_layout Description
15762 \begin_inset Flex Code
15765 \begin_layout Plain Layout
15772 \begin_inset Flex Code
15775 \begin_layout Plain Layout
15784 \begin_inset space \thinspace{}
15790 \begin_inset Flex Code
15793 \begin_layout Plain Layout
15803 ] Defines whether the float has a starred variant that spans columns in
15804 a two column paragraph.
15806 \begin_inset Flex Code
15809 \begin_layout Plain Layout
15815 if the float does not support this feature.
15818 \begin_layout Description
15819 \begin_inset Flex Code
15822 \begin_layout Plain Layout
15829 \begin_inset Flex Code
15832 \begin_layout Plain Layout
15839 \begin_inset Quotes erd
15843 \begin_inset Quotes erd
15846 ] The file name extension of an auxiliary file for the list of figures (or
15849 writes the captions to this file.
15852 \begin_layout Description
15853 \begin_inset Flex Code
15856 \begin_layout Plain Layout
15863 \begin_inset Flex Code
15866 \begin_layout Plain Layout
15873 \begin_inset Quotes erd
15877 \begin_inset Quotes erd
15880 ] The string that will be used in the menus and also for the caption.
15881 This is translated to the current language if babel is used.
15884 \begin_layout Description
15885 \begin_inset Flex Code
15888 \begin_layout Plain Layout
15894 These tags control the XHTML output.
15896 \begin_inset CommandInset ref
15898 reference "sec:Tags-for-XHTML"
15905 \begin_layout Description
15906 \begin_inset Flex Code
15909 \begin_layout Plain Layout
15918 \begin_inset Flex Code
15921 \begin_layout Plain Layout
15930 \begin_inset space \thinspace{}
15934 \begin_inset Flex Code
15937 \begin_layout Plain Layout
15943 ] Indicates whether the float is already defined in the document class or
15944 if instead the \SpecialChar LaTeX
15946 \begin_inset Flex Code
15949 \begin_layout Plain Layout
15955 needs to be loaded to define it on-the-fly.
15957 \begin_inset Flex Code
15960 \begin_layout Plain Layout
15967 \begin_inset Flex Code
15970 \begin_layout Plain Layout
15977 It should be set to
15978 \begin_inset Flex Code
15981 \begin_layout Plain Layout
15987 if the float is already defined by the \SpecialChar LaTeX
15991 \begin_layout Description
15992 \begin_inset Flex Code
15995 \begin_layout Plain Layout
16002 \begin_inset Flex Code
16005 \begin_layout Plain Layout
16012 \begin_inset Quotes erd
16016 \begin_inset Quotes erd
16019 ] The command used to generate a list of floats of this type; the leading
16028 \begin_inset Flex Code
16031 \begin_layout Plain Layout
16037 is false, since there is no standard way to generate this command.
16039 \begin_inset Flex Code
16042 \begin_layout Plain Layout
16048 is true, since in that case there is a standard way to define the command.
16051 \begin_layout Description
16052 \begin_inset Flex Code
16055 \begin_layout Plain Layout
16062 \begin_inset Flex Code
16065 \begin_layout Plain Layout
16072 \begin_inset Quotes erd
16076 \begin_inset Quotes erd
16079 ] A title for a list of floats of this kind (list of figures, tables, or
16081 It is used for the screen label within \SpecialChar LyX
16082 , it is used by \SpecialChar LaTeX
16084 it is used as the title in the XHTML output.
16085 It will be translated to the document language.
16088 \begin_layout Description
16089 \begin_inset Flex Code
16092 \begin_layout Plain Layout
16099 \begin_inset Flex Code
16102 \begin_layout Plain Layout
16109 \begin_inset Quotes erd
16113 \begin_inset Quotes erd
16116 ] This (optional) argument determines whether floats of this class will
16117 be numbered within some sectional unit of the document.
16119 \begin_inset Flex Code
16122 \begin_layout Plain Layout
16129 \begin_inset Quotes eld
16133 \begin_inset Flex Code
16136 \begin_layout Plain Layout
16143 \begin_inset Quotes erd
16146 , the floats will be numbered within chapters.
16150 \begin_layout Description
16151 \begin_inset Flex Code
16154 \begin_layout Plain Layout
16161 \begin_inset Flex Code
16164 \begin_layout Plain Layout
16171 \begin_inset Quotes erd
16175 \begin_inset Quotes erd
16178 ] The default placement for the given class of floats.
16179 The string should be as in standard \SpecialChar LaTeX
16181 \begin_inset Flex Code
16184 \begin_layout Plain Layout
16191 \begin_inset Flex Code
16194 \begin_layout Plain Layout
16201 \begin_inset Flex Code
16204 \begin_layout Plain Layout
16211 \begin_inset Flex Code
16214 \begin_layout Plain Layout
16220 for top, bottom, page, and here, respectively.
16224 \begin_layout Plain Layout
16225 Note that the order of these letters in the string is irrelevant, like in
16232 On top of that there is a new type,
16233 \begin_inset Flex Code
16236 \begin_layout Plain Layout
16242 , which does not really correspond to a float, since it means: put it
16243 \begin_inset Quotes eld
16247 \begin_inset Quotes erd
16251 Note however that the
16252 \begin_inset Flex Code
16255 \begin_layout Plain Layout
16261 specifier is special and, because of implementation details, cannot be
16262 used in non-built in float types.
16263 If you do not understand what this means, just use
16264 \begin_inset Quotes eld
16268 \begin_inset Flex Code
16271 \begin_layout Plain Layout
16278 \begin_inset Quotes erd
16284 \begin_layout Description
16285 \begin_inset Flex Code
16288 \begin_layout Plain Layout
16295 \begin_inset Flex Code
16298 \begin_layout Plain Layout
16304 ] The prefix to use when creating labels referring to floats of this type.
16305 This allows the use of formatted references.
16306 Note that you can remove any
16307 \begin_inset Flex Code
16310 \begin_layout Plain Layout
16316 set by a copied style by using the special value
16317 \begin_inset Quotes eld
16321 \begin_inset Quotes erd
16324 , which must be all caps.
16327 \begin_layout Description
16328 \begin_inset Flex Code
16331 \begin_layout Plain Layout
16338 \begin_inset Flex Code
16341 \begin_layout Plain Layout
16348 \begin_inset Quotes erd
16352 \begin_inset Quotes erd
16355 ] The style used when defining the float using
16356 \begin_inset Flex Code
16359 \begin_layout Plain Layout
16370 \begin_layout Description
16371 \begin_inset Flex Code
16374 \begin_layout Plain Layout
16381 \begin_inset Flex Code
16384 \begin_layout Plain Layout
16391 \begin_inset Quotes erd
16395 \begin_inset Quotes erd
16399 \begin_inset Quotes eld
16403 \begin_inset Quotes erd
16406 of the new class of floats, like program or algorithm.
16407 After the appropriate
16408 \begin_inset Flex Code
16411 \begin_layout Plain Layout
16420 \begin_inset Flex Code
16423 \begin_layout Plain Layout
16432 \begin_inset Flex Code
16435 \begin_layout Plain Layout
16446 \begin_layout Description
16447 \begin_inset Flex Code
16450 \begin_layout Plain Layout
16457 \begin_inset Flex Code
16460 \begin_layout Plain Layout
16467 \begin_inset space \thinspace{}
16471 \begin_inset Flex Code
16474 \begin_layout Plain Layout
16482 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16484 \begin_inset Flex Code
16487 \begin_layout Plain Layout
16493 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16497 \begin_layout Standard
16498 Note that defining a float with type
16499 \begin_inset Flex Code
16502 \begin_layout Plain Layout
16510 automatically defines the corresponding counter with name
16511 \begin_inset Flex Code
16514 \begin_layout Plain Layout
16525 \begin_layout Subsection
16526 Flex insets and InsetLayout
16527 \begin_inset CommandInset label
16529 name "subsec:Flex-insets-and"
16536 \begin_layout Standard
16537 Flex insets come in three different kinds:
16540 \begin_layout Itemize
16542 \begin_inset Flex Code
16545 \begin_layout Plain Layout
16551 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16553 \begin_inset Flex Code
16556 \begin_layout Plain Layout
16565 \begin_inset Flex Code
16568 \begin_layout Plain Layout
16579 \begin_layout Itemize
16581 \begin_inset Flex Code
16584 \begin_layout Plain Layout
16590 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16592 footnote, and the like.
16593 An obvious example is an endnote inset, which is defined in the
16594 \begin_inset Flex Code
16597 \begin_layout Plain Layout
16606 \begin_layout Itemize
16608 \begin_inset Flex Code
16611 \begin_layout Plain Layout
16617 ): For use with DocBook classes.
16620 \begin_layout Standard
16621 Flex insets are defined using the
16622 \begin_inset Flex Code
16625 \begin_layout Plain Layout
16631 tag, which shall be explained in a moment.
16634 \begin_layout Standard
16636 \begin_inset Flex Code
16639 \begin_layout Plain Layout
16645 tag also serves another function: It can be used to customize the general
16646 layout of many different types of insets.
16648 \begin_inset Flex Code
16651 \begin_layout Plain Layout
16657 can be used to customize the layout parameters for footnotes, marginal
16658 notes, note insets, \SpecialChar TeX
16659 code (ERT) insets, branches, listings, indexes, boxes,
16660 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16663 \begin_layout Standard
16665 \begin_inset Flex Code
16668 \begin_layout Plain Layout
16674 definition must begin with a line of the form:
16677 \begin_layout LyX-Code
16681 \begin_layout Standard
16683 \begin_inset Flex Code
16686 \begin_layout Plain Layout
16692 indicates the inset whose layout is being defined, and here there are four
16696 \begin_layout Enumerate
16697 The layout for a pre-existing inset is being modified.
16698 In this case, can be
16699 \begin_inset Flex Code
16702 \begin_layout Plain Layout
16708 any one of the following:
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
16869 \begin_inset Flex Code
16872 \begin_layout Plain Layout
16879 \begin_inset Flex Code
16882 \begin_layout Plain Layout
16889 \begin_inset Flex Code
16892 \begin_layout Plain Layout
16899 \begin_inset Flex Code
16902 \begin_layout Plain Layout
16911 \begin_layout Enumerate
16912 The layout for a Flex inset is being defined.
16914 \begin_inset Flex Code
16917 \begin_layout Plain Layout
16923 must be of the form
16924 \begin_inset Quotes eld
16928 \begin_inset Flex Code
16931 \begin_layout Plain Layout
16938 \begin_inset Quotes erd
16942 \begin_inset Flex Code
16945 \begin_layout Plain Layout
16951 may be be any valid identifier not used by a pre-existing Flex inset.
16952 The identifier may include spaces, but in that case the whole thing must
16953 be wrapped in quotes.
16954 Note that the definition of a flex inset
16959 \begin_inset Flex Code
16962 \begin_layout Plain Layout
16968 entry, declaring which type of inset it defines.
16971 \begin_layout Enumerate
16972 The layout for user specific branch is being defined.
16974 \begin_inset Flex Code
16977 \begin_layout Plain Layout
16983 must be of the form
16984 \begin_inset Quotes eld
16988 \begin_inset Flex Code
16991 \begin_layout Plain Layout
16998 \begin_inset Quotes erd
17002 \begin_inset Flex Code
17005 \begin_layout Plain Layout
17011 may be be any valid identifier of branch defined in user's document.
17012 The identifier may include spaces, but in that case the whole thing must
17013 be wrapped in quotes.
17014 The main purpose of this feature is to allow \SpecialChar LaTeX
17015 wrapping around specific
17016 branches as user needs.
17019 \begin_layout Enumerate
17020 The layout of a user (or class) specific caption is being defined.
17022 \begin_inset Flex Code
17025 \begin_layout Plain Layout
17031 must be of the form
17032 \begin_inset Quotes eld
17036 \begin_inset Flex Code
17039 \begin_layout Plain Layout
17046 \begin_inset Quotes erd
17050 \begin_inset Flex Code
17053 \begin_layout Plain Layout
17059 specifies the name of the caption as it appears in the menu.
17060 Have a look at the standard caption (
17061 \begin_inset Flex Code
17064 \begin_layout Plain Layout
17070 ), the specific captions of the KOMA-Script classes (
17071 \begin_inset Flex Code
17074 \begin_layout Plain Layout
17081 \begin_inset Flex Code
17084 \begin_layout Plain Layout
17093 \begin_inset space ~
17099 \begin_inset Flex Code
17102 \begin_layout Plain Layout
17108 ) for applications.
17111 \begin_layout Standard
17113 \begin_inset Flex Code
17116 \begin_layout Plain Layout
17122 definition can contain the following entries:
17125 \begin_layout Description
17126 \begin_inset Flex Code
17129 \begin_layout Plain Layout
17136 \begin_inset Flex Code
17139 \begin_layout Plain Layout
17145 ] Defines argument number of a command\SpecialChar breakableslash
17146 environment associated with the current
17148 The definition must end with
17149 \begin_inset Flex Code
17152 \begin_layout Plain Layout
17160 \begin_inset CommandInset ref
17162 reference "subsec:Paragraph-Styles"
17169 \begin_layout Description
17170 \begin_inset Flex Code
17173 \begin_layout Plain Layout
17179 Preamble for changing language commands; see
17180 \begin_inset CommandInset ref
17182 reference "subsec:I18n"
17189 \begin_layout Description
17190 \begin_inset Flex Code
17193 \begin_layout Plain Layout
17200 \begin_inset Flex Code
17203 \begin_layout Plain Layout
17209 ] The color for the inset's background.
17211 \begin_inset CommandInset ref
17213 reference "chap:Names-of-colors"
17217 for a list of the available color names.
17220 \begin_layout Description
17221 \begin_inset Flex Code
17224 \begin_layout Plain Layout
17231 \begin_inset Flex Code
17234 \begin_layout Plain Layout
17243 \begin_inset space \thinspace{}
17247 \begin_inset Flex Code
17250 \begin_layout Plain Layout
17256 ] Whether to use the content of the inset as the label, when the inset is
17261 \begin_layout Description
17262 \begin_inset Flex Code
17265 \begin_layout Plain Layout
17272 \begin_inset Flex Code
17275 \begin_layout Plain Layout
17281 ] As with paragraph styles, see
17282 \begin_inset CommandInset ref
17284 reference "subsec:Paragraph-Styles"
17289 Note that you need to specify the complete type, e.
17290 \begin_inset space \thinspace{}
17294 \begin_inset space ~
17298 \begin_inset Flex Code
17301 \begin_layout Plain Layout
17302 CopyStyle Flex:<name>
17310 \begin_layout Description
17311 \begin_inset Flex Code
17314 \begin_layout Plain Layout
17321 \begin_inset Flex Code
17324 \begin_layout Plain Layout
17333 \begin_inset space \thinspace{}
17337 \begin_inset Flex Code
17340 \begin_layout Plain Layout
17346 ] Indicates whether the user may employ the Paragraph Settings dialog to
17347 customize the paragraph.
17350 \begin_layout Description
17351 \begin_inset Flex Code
17354 \begin_layout Plain Layout
17361 \begin_inset Flex Code
17364 \begin_layout Plain Layout
17371 \begin_inset Flex Code
17374 \begin_layout Plain Layout
17381 \begin_inset Flex Code
17384 \begin_layout Plain Layout
17390 , describing the rendering style used for the inset's frame and buttons.
17391 Footnotes generally use
17392 \begin_inset Flex Code
17395 \begin_layout Plain Layout
17401 , ERT insets generally
17402 \begin_inset Flex Code
17405 \begin_layout Plain Layout
17411 , and character styles
17412 \begin_inset Flex Code
17415 \begin_layout Plain Layout
17424 \begin_layout Description
17425 \begin_inset Flex Code
17428 \begin_layout Plain Layout
17435 \begin_inset Flex Code
17438 \begin_layout Plain Layout
17447 \begin_inset space \thinspace{}
17453 \begin_inset Flex Code
17456 \begin_layout Plain Layout
17465 \begin_inset Flex Code
17468 \begin_layout Plain Layout
17475 \begin_inset Flex Code
17478 \begin_layout Plain Layout
17485 Indicates whether the environment will stand on its own in the output or
17486 will appear inline with the surrounding text.
17487 If set to false, it is supposed that the \SpecialChar LaTeX
17488 environment ignores white space
17489 (including one newline character) after the
17490 \begin_inset Flex Code
17493 \begin_layout Plain Layout
17506 \begin_inset Flex Code
17509 \begin_layout Plain Layout
17525 \begin_layout Description
17526 \begin_inset Flex Code
17529 \begin_layout Plain Layout
17535 Required at the end of the
17536 \begin_inset Flex Code
17539 \begin_layout Plain Layout
17548 \begin_layout Description
17549 \begin_inset Flex Code
17552 \begin_layout Plain Layout
17558 The font used for both the text body
17564 \begin_inset CommandInset ref
17566 reference "subsec:Font-description"
17571 Note that defining this font automatically defines the
17572 \begin_inset Flex Code
17575 \begin_layout Plain Layout
17581 to the same value, so define this first and define
17582 \begin_inset Flex Code
17585 \begin_layout Plain Layout
17591 later if you want them to be different.
17594 \begin_layout Description
17595 \begin_inset Flex Code
17598 \begin_layout Plain Layout
17599 FixedWidthPreambleEncoding
17605 \begin_inset Flex Code
17608 \begin_layout Plain Layout
17617 \begin_inset space \thinspace{}
17621 \begin_inset Flex Code
17624 \begin_layout Plain Layout
17630 ] Force a fixed width encoding for the translated contents of
17631 \begin_inset Flex Code
17634 \begin_layout Plain Layout
17641 \begin_inset Flex Code
17644 \begin_layout Plain Layout
17650 code generated by this layout.
17651 This is needed for special \SpecialChar LaTeX
17656 that do not work with variable width encodings such as
17661 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17662 backends such as Xe\SpecialChar TeX
17664 Lua\SpecialChar TeX
17668 \begin_layout Description
17669 \begin_inset Flex Code
17672 \begin_layout Plain Layout
17673 ForceLocalFontSwitch
17679 \begin_inset Flex Code
17682 \begin_layout Plain Layout
17691 \begin_inset space \thinspace{}
17695 \begin_inset Flex Code
17698 \begin_layout Plain Layout
17704 ] When using babel, always use a local font switch (
17705 \begin_inset Flex Code
17708 \begin_layout Plain Layout
17716 ), never a global one (such as
17717 \begin_inset Flex Code
17720 \begin_layout Plain Layout
17731 \begin_layout Description
17732 \begin_inset Flex Code
17735 \begin_layout Plain Layout
17742 \begin_inset Flex Code
17745 \begin_layout Plain Layout
17754 \begin_inset space \thinspace{}
17758 \begin_inset Flex Code
17761 \begin_layout Plain Layout
17768 \begin_inset Quotes eld
17772 \begin_inset Quotes erd
17775 language, leading to Left-to-Right (Latin) output, e.
17776 \begin_inset space \thinspace{}
17780 \begin_inset space \space{}
17783 in \SpecialChar TeX
17788 \begin_layout Description
17789 \begin_inset Flex Code
17792 \begin_layout Plain Layout
17799 \begin_inset Flex Code
17802 \begin_layout Plain Layout
17811 \begin_inset space \thinspace{}
17815 \begin_inset Flex Code
17818 \begin_layout Plain Layout
17824 ] Force a a line break in the \SpecialChar LaTeX
17825 output before the inset starts and after
17827 This assures the inset itself is output on its own lines, for parsing purposes.
17830 \begin_layout Description
17831 \begin_inset Flex Code
17834 \begin_layout Plain Layout
17841 \begin_inset Flex Code
17844 \begin_layout Plain Layout
17853 \begin_inset space \thinspace{}
17857 \begin_inset Flex Code
17860 \begin_layout Plain Layout
17866 ] Indicates whether the
17867 \begin_inset Flex Code
17870 \begin_layout Plain Layout
17876 should be used or, instead, the user can change the paragraph style used
17881 \begin_layout Description
17882 \begin_inset Flex Code
17885 \begin_layout Plain Layout
17892 \begin_inset Flex Code
17895 \begin_layout Plain Layout
17904 \begin_inset space \thinspace{}
17908 \begin_inset Flex Code
17911 \begin_layout Plain Layout
17917 ] As with paragraph styles, see
17918 \begin_inset CommandInset ref
17920 reference "subsec:Paragraph-Styles"
17927 \begin_layout Description
17928 \begin_inset Flex Code
17931 \begin_layout Plain Layout
17937 These tags control the XHTML output.
17939 \begin_inset CommandInset ref
17941 reference "sec:Tags-for-XHTML"
17948 \begin_layout Description
17949 \begin_inset Flex Code
17952 \begin_layout Plain Layout
17959 \begin_inset Flex Code
17962 \begin_layout Plain Layout
17971 \begin_inset space \thinspace{}
17975 \begin_inset Flex Code
17978 \begin_layout Plain Layout
17984 ] Whether to include the contents of this inset in the strings generated
17985 for the `Outline' pane.
17986 One would not, for example, want the content of a footnote in a section
17987 header to be included in the TOC displayed in the outline, but one would
17988 normally want the content of a character style displayed.
17989 Default is false: not to include.
17992 \begin_layout Description
17993 \begin_inset Flex Code
17996 \begin_layout Plain Layout
18005 \begin_inset Flex Code
18008 \begin_layout Plain Layout
18017 \begin_inset space \thinspace{}
18021 \begin_inset Flex Code
18024 \begin_layout Plain Layout
18030 ] As with paragraph styles, see
18031 \begin_inset CommandInset ref
18033 reference "subsec:Paragraph-Styles"
18040 \begin_layout Description
18041 \begin_inset Flex Code
18044 \begin_layout Plain Layout
18050 The font used for the label.
18052 \begin_inset CommandInset ref
18054 reference "subsec:Font-description"
18059 Note that this definition can never appear before
18060 \begin_inset Flex Code
18063 \begin_layout Plain Layout
18069 , lest it be ineffective.
18072 \begin_layout Description
18073 \begin_inset Flex Code
18076 \begin_layout Plain Layout
18083 \begin_inset Flex Code
18086 \begin_layout Plain Layout
18093 \begin_inset Quotes erd
18097 \begin_inset Quotes erd
18100 ] What will be displayed on the button or elsewhere as the inset label.
18102 \begin_inset Flex Code
18105 \begin_layout Plain Layout
18113 \begin_inset Flex Code
18116 \begin_layout Plain Layout
18122 ) modify this label on the fly.
18125 \begin_layout Description
18126 \begin_inset Flex Code
18129 \begin_layout Plain Layout
18135 Language dependent preamble; see
18136 \begin_inset CommandInset ref
18138 reference "subsec:I18n"
18145 \begin_layout Description
18146 \begin_inset Flex Code
18149 \begin_layout Plain Layout
18156 \begin_inset Flex Code
18159 \begin_layout Plain Layout
18165 ] The name of the corresponding \SpecialChar LaTeX
18167 Either the environment or command name.
18170 \begin_layout Description
18171 \begin_inset Flex Code
18174 \begin_layout Plain Layout
18181 \begin_inset Flex Code
18184 \begin_layout Plain Layout
18190 ] The optional parameter for the corresponding
18191 \begin_inset Flex Code
18194 \begin_layout Plain Layout
18200 stuff, including possible bracket pairs like
18201 \begin_inset Flex Code
18204 \begin_layout Plain Layout
18211 This parameter cannot be changed from within \SpecialChar LyX
18213 \begin_inset Flex Code
18216 \begin_layout Plain Layout
18222 for customizable parameters).
18223 It will be output as is after all \SpecialChar LaTeX
18225 \begin_inset Flex Code
18228 \begin_layout Plain Layout
18237 \begin_layout Description
18238 \begin_inset Flex Code
18241 \begin_layout Plain Layout
18248 \begin_inset Flex Code
18251 \begin_layout Plain Layout
18252 Command, Environment, None
18257 ] How the style should be translated into \SpecialChar LaTeX
18262 \begin_layout Plain Layout
18263 \begin_inset Flex Code
18266 \begin_layout Plain Layout
18272 is perhaps a bit misleading, since these rules apply to SGML classes too.
18273 Visit the SGML class files for specific examples.
18279 \begin_inset Separator parbreak
18286 \begin_layout Description
18287 \begin_inset Flex Code
18290 \begin_layout Plain Layout
18296 means nothing special
18299 \begin_layout Description
18300 \begin_inset Flex Code
18303 \begin_layout Plain Layout
18310 \begin_inset Flex Code
18313 \begin_layout Plain Layout
18320 {\SpecialChar ldots
18329 \begin_layout Description
18330 \begin_inset Flex Code
18333 \begin_layout Plain Layout
18340 \begin_inset Flex Code
18343 \begin_layout Plain Layout
18350 }\SpecialChar ldots
18365 \begin_layout Standard
18366 Putting the last few things together, the \SpecialChar LaTeX
18367 output will be either:
18370 \begin_layout LyX-Code
18373 LatexName[LatexParam]{\SpecialChar ldots
18377 \begin_layout Standard
18381 \begin_layout LyX-Code
18384 begin{LatexName}[LatexParam] \SpecialChar ldots
18390 \begin_layout Standard
18391 depending upon the \SpecialChar LaTeX
18396 \begin_layout Description
18397 \begin_inset Flex Code
18400 \begin_layout Plain Layout
18407 \begin_inset Flex Code
18410 \begin_layout Plain Layout
18416 ] A string that is put at the beginning of the layout content.
18417 A line break in the output can be indicated by
18418 \begin_inset Flex Code
18421 \begin_layout Plain Layout
18430 \begin_layout Description
18431 \begin_inset Flex Code
18434 \begin_layout Plain Layout
18441 \begin_inset Flex Code
18444 \begin_layout Plain Layout
18451 \begin_inset Flex Code
18454 \begin_layout Plain Layout
18461 \begin_inset Flex Code
18464 \begin_layout Plain Layout
18471 \begin_inset Flex Code
18474 \begin_layout Plain Layout
18480 (indicating a dummy definition ending definitions of charstyles, etc).
18481 This entry is required in and is only meaningful for Flex insets.
18482 Among other things, it determines on which menu this inset will appear.
18484 \begin_inset Flex Code
18487 \begin_layout Plain Layout
18494 \begin_inset Flex Code
18497 \begin_layout Plain Layout
18503 will automatically set
18504 \begin_inset Flex Code
18507 \begin_layout Plain Layout
18515 \begin_inset Flex Code
18518 \begin_layout Plain Layout
18524 can be set to true for
18525 \begin_inset Flex Code
18528 \begin_layout Plain Layout
18534 insets by setting it
18539 \begin_inset Flex Code
18542 \begin_layout Plain Layout
18551 \begin_layout Description
18552 \begin_inset Flex Code
18555 \begin_layout Plain Layout
18562 \begin_inset Flex Code
18565 \begin_layout Plain Layout
18574 \begin_inset space \thinspace{}
18578 \begin_inset Flex Code
18581 \begin_layout Plain Layout
18587 ] Whether multiple paragraphs are permitted in this inset.
18589 \begin_inset Flex Code
18592 \begin_layout Plain Layout
18598 to the same value and
18599 \begin_inset Flex Code
18602 \begin_layout Plain Layout
18608 to the opposite value.
18609 These can be reset to other values, if they are used
18614 \begin_inset Flex Code
18617 \begin_layout Plain Layout
18627 \begin_layout Description
18628 \begin_inset Flex Code
18631 \begin_layout Plain Layout
18638 \begin_inset Flex Code
18641 \begin_layout Plain Layout
18650 \begin_inset space \thinspace{}
18654 \begin_inset Flex Code
18657 \begin_layout Plain Layout
18663 ] Whether fragile commands in this inset should be
18664 \begin_inset Flex Code
18667 \begin_layout Plain Layout
18680 whether the command should itself be protected.) Default is false.
18683 \begin_layout Description
18684 \begin_inset Flex Code
18687 \begin_layout Plain Layout
18694 \begin_inset Flex Code
18697 \begin_layout Plain Layout
18703 ] Deletes an existing
18704 \begin_inset Flex Code
18707 \begin_layout Plain Layout
18716 \begin_layout Description
18717 \begin_inset Flex Code
18720 \begin_layout Plain Layout
18727 \begin_inset Flex Code
18730 \begin_layout Plain Layout
18737 \begin_inset Flex Code
18740 \begin_layout Plain Layout
18746 that has replaced this
18747 \begin_inset Flex Code
18750 \begin_layout Plain Layout
18757 This is used to rename an
18758 \begin_inset Flex Code
18761 \begin_layout Plain Layout
18767 , while keeping backward compatibility.
18770 \begin_layout Description
18771 \begin_inset Flex Code
18774 \begin_layout Plain Layout
18781 \begin_inset Flex Code
18784 \begin_layout Plain Layout
18793 \begin_inset space \thinspace{}
18797 \begin_inset Flex Code
18800 \begin_layout Plain Layout
18806 ] As with paragraph styles, see
18807 \begin_inset CommandInset ref
18809 reference "subsec:Paragraph-Styles"
18817 \begin_layout Description
18818 \begin_inset Flex Code
18821 \begin_layout Plain Layout
18828 \begin_inset Flex Code
18831 \begin_layout Plain Layout
18840 \begin_inset space \thinspace{}
18844 \begin_inset Flex Code
18847 \begin_layout Plain Layout
18853 ] As with paragraph styles, see
18854 \begin_inset CommandInset ref
18856 reference "subsec:Paragraph-Styles"
18864 \begin_layout Description
18865 \begin_inset Flex Code
18868 \begin_layout Plain Layout
18874 As with paragraph styles, see
18875 \begin_inset CommandInset ref
18877 reference "subsec:Paragraph-Styles"
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 ] The prefix to use when creating labels referring to insets of this type.
18905 This allows the use of formatted references.
18908 \begin_layout Description
18909 \begin_inset Flex Code
18912 \begin_layout Plain Layout
18919 \begin_inset Flex Code
18922 \begin_layout Plain Layout
18928 ] As with paragraph styles, see
18929 \begin_inset CommandInset ref
18931 reference "subsec:Paragraph-Styles"
18938 \begin_layout Description
18939 \begin_inset Flex Code
18942 \begin_layout Plain Layout
18949 \begin_inset Flex Code
18952 \begin_layout Plain Layout
18961 \begin_inset space \thinspace{}
18965 \begin_inset Flex Code
18968 \begin_layout Plain Layout
18974 ] Resets the \SpecialChar LaTeX
18975 arguments of this layout (as defined via the
18976 \begin_inset Flex Code
18979 \begin_layout Plain Layout
18986 This is useful if you have copied a style via
18987 \begin_inset Flex Code
18990 \begin_layout Plain Layout
18996 , but you do not want to inherit its (required and optional) arguments.
18999 \begin_layout Description
19000 \begin_inset Flex Code
19003 \begin_layout Plain Layout
19010 \begin_inset Flex Code
19013 \begin_layout Plain Layout
19020 \begin_inset space \thinspace{}
19024 \begin_inset Flex Code
19027 \begin_layout Plain Layout
19035 ] Whether this inset should use the font of its surrounding environment
19037 Default is false: use the font of the surrounding environment.
19040 \begin_layout Description
19041 \begin_inset Flex Code
19044 \begin_layout Plain Layout
19051 \begin_inset Flex Code
19054 \begin_layout Plain Layout
19060 ] A string that is put at the end of the layout content.
19061 A line break in the output can be indicated by
19062 \begin_inset Flex Code
19065 \begin_layout Plain Layout
19074 \begin_layout Description
19075 \begin_inset Flex Code
19078 \begin_layout Plain Layout
19085 \begin_inset Flex Code
19088 \begin_layout Plain Layout
19095 \begin_inset space \thinspace{}
19099 \begin_inset Flex Code
19102 \begin_layout Plain Layout
19110 ] Allow spell-checking the contents of this inset.
19114 \begin_layout Subsection
19116 \begin_inset CommandInset label
19118 name "subsec:Counters"
19125 \begin_layout Standard
19126 It is necessary to define the counters (
19127 \begin_inset Flex Noun
19130 \begin_layout Plain Layout
19137 \begin_inset Flex Noun
19140 \begin_layout Plain Layout
19146 , \SpecialChar ldots
19147 ) in the text class itself.
19148 The standard counters are defined in the file
19149 \begin_inset Flex Code
19152 \begin_layout Plain Layout
19158 , so you may have to do no more than add
19161 \begin_layout LyX-Code
19162 Input stdcounters.inc
19165 \begin_layout Standard
19166 to your layout file to get them to work.
19167 But if you want to define custom counters, then you can do so.
19168 The counter declaration must begin with:
19171 \begin_layout LyX-Code
19172 Counter CounterName
19175 \begin_layout Standard
19177 \begin_inset Flex Code
19180 \begin_layout Plain Layout
19186 ' is replaced by the name of the counter.
19187 And it must end with
19188 \begin_inset Quotes eld
19192 \begin_inset Flex Code
19195 \begin_layout Plain Layout
19202 \begin_inset Quotes erd
19206 The following parameters can also be used:
19209 \begin_layout Description
19210 \begin_inset Flex Code
19213 \begin_layout Plain Layout
19220 \begin_inset Flex Code
19223 \begin_layout Plain Layout
19229 ] Sets the initial value for the counter, to which it will be reset whenever
19231 Normally, one will want the default, 1.
19234 \begin_layout Description
19235 \begin_inset Flex Code
19238 \begin_layout Plain Layout
19245 \begin_inset Flex Code
19248 \begin_layout Plain Layout
19255 \begin_inset Quotes erd
19259 \begin_inset Quotes erd
19262 ] When defined, this string defines how the counter is displayed.
19263 Setting this value sets
19264 \begin_inset Flex Code
19267 \begin_layout Plain Layout
19268 LabelStringAppendix
19274 The following special constructs can be used in the string:
19275 \begin_inset Separator parbreak
19282 \begin_layout Itemize
19283 \begin_inset Flex Code
19286 \begin_layout Plain Layout
19294 will be replaced by the expansion of the
19295 \begin_inset Flex Code
19298 \begin_layout Plain Layout
19305 \begin_inset Flex Code
19308 \begin_layout Plain Layout
19309 LabelStringAppendix
19315 \begin_inset Flex Code
19318 \begin_layout Plain Layout
19328 \begin_layout Itemize
19329 counter values can be expressed using \SpecialChar LaTeX
19331 \begin_inset Newline newline
19335 \begin_inset Flex Code
19338 \begin_layout Plain Layout
19355 \begin_inset Flex Code
19358 \begin_layout Plain Layout
19370 \begin_layout Plain Layout
19380 Actually, the situation is a bit more complicated: any
19399 other than those described below will produce arabic numerals.
19400 It would not be surprising to see this change in the future.
19406 \begin_inset Flex Code
19409 \begin_layout Plain Layout
19415 : 1, 2, 3,\SpecialChar ldots
19417 \begin_inset Flex Code
19420 \begin_layout Plain Layout
19426 for lower-case letters: a, b, c, \SpecialChar ldots
19428 \begin_inset Flex Code
19431 \begin_layout Plain Layout
19437 for upper-case letters: A, B, C, \SpecialChar ldots
19439 \begin_inset Flex Code
19442 \begin_layout Plain Layout
19448 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19450 \begin_inset Flex Code
19453 \begin_layout Plain Layout
19459 for upper-case roman numerals: I, II, III\SpecialChar ldots
19461 \begin_inset Flex Code
19464 \begin_layout Plain Layout
19470 for hebrew numerals.
19474 \begin_layout Standard
19475 If LabelString is not defined, a default value is constructed as follows:
19476 if the counter has a master counter
19477 \begin_inset Flex Code
19480 \begin_layout Plain Layout
19487 \begin_inset Flex Code
19490 \begin_layout Plain Layout
19497 \begin_inset Newline newline
19501 \begin_inset Flex Code
19504 \begin_layout Plain Layout
19514 is used; otherwise the string
19515 \begin_inset Flex Code
19518 \begin_layout Plain Layout
19529 \begin_layout Description
19530 \begin_inset Flex Code
19533 \begin_layout Plain Layout
19534 LabelStringAppendix
19540 \begin_inset Flex Code
19543 \begin_layout Plain Layout
19550 \begin_inset Quotes erd
19554 \begin_inset Quotes erd
19558 \begin_inset Flex Code
19561 \begin_layout Plain Layout
19567 , but for use in the Appendix.
19570 \begin_layout Description
19571 \begin_inset Flex Code
19574 \begin_layout Plain Layout
19581 \begin_inset Flex Code
19584 \begin_layout Plain Layout
19591 \begin_inset Quotes erd
19595 \begin_inset Quotes erd
19598 ] A format for use with formatted references to this counter.
19599 For example, one might want to have references to section numbers appear
19601 \begin_inset Quotes eld
19605 \begin_inset Quotes erd
19609 The string should contain
19610 \begin_inset Quotes eld
19614 \begin_inset Quotes erd
19618 This will be replaced by the counter number itself.
19619 So, for sections, it would be: Section ##.
19622 \begin_layout Description
19623 \begin_inset Flex Code
19626 \begin_layout Plain Layout
19633 \begin_inset Flex Code
19636 \begin_layout Plain Layout
19643 \begin_inset Quotes erd
19647 \begin_inset Quotes erd
19650 ] If this is set to the name of another counter, the present counter will
19651 be reset every time the other one is increased.
19653 \begin_inset Flex Code
19656 \begin_layout Plain Layout
19663 \begin_inset Flex Code
19666 \begin_layout Plain Layout
19675 \begin_layout Subsection
19677 \begin_inset CommandInset label
19679 name "subsec:Font-description"
19686 \begin_layout Standard
19687 A font description looks like this:
19690 \begin_layout LyX-Code
19704 \begin_layout LyX-Code
19708 \begin_layout LyX-Code
19712 \begin_layout Standard
19713 The following commands are available:
19716 \begin_layout Description
19717 \begin_inset Flex Code
19720 \begin_layout Plain Layout
19727 \begin_inset Flex Code
19730 \begin_layout Plain Layout
19739 \begin_inset Flex Code
19742 \begin_layout Plain Layout
19749 \begin_inset Flex Code
19752 \begin_layout Plain Layout
19759 \begin_inset Flex Code
19762 \begin_layout Plain Layout
19769 \begin_inset Flex Code
19772 \begin_layout Plain Layout
19779 \begin_inset Flex Code
19782 \begin_layout Plain Layout
19789 \begin_inset Flex Code
19792 \begin_layout Plain Layout
19799 \begin_inset Flex Code
19802 \begin_layout Plain Layout
19809 \begin_inset Flex Code
19812 \begin_layout Plain Layout
19821 \begin_layout Description
19822 \begin_inset Flex Code
19825 \begin_layout Plain Layout
19832 \begin_inset Flex Code
19835 \begin_layout Plain Layout
19844 \begin_inset Flex Code
19847 \begin_layout Plain Layout
19854 \begin_inset Flex Code
19857 \begin_layout Plain Layout
19866 \begin_layout Description
19867 \begin_inset Flex Code
19870 \begin_layout Plain Layout
19877 \begin_inset Flex Code
19880 \begin_layout Plain Layout
19886 ] Valid arguments are:
19887 \begin_inset Flex Code
19890 \begin_layout Plain Layout
19897 \begin_inset Flex Code
19900 \begin_layout Plain Layout
19907 \begin_inset Flex Code
19910 \begin_layout Plain Layout
19917 \begin_inset Flex Code
19920 \begin_layout Plain Layout
19927 \begin_inset Flex Code
19930 \begin_layout Plain Layout
19937 \begin_inset Flex Code
19940 \begin_layout Plain Layout
19947 \begin_inset Flex Code
19950 \begin_layout Plain Layout
19957 \begin_inset Flex Code
19960 \begin_layout Plain Layout
19967 \begin_inset Flex Code
19970 \begin_layout Plain Layout
19977 \begin_inset Flex Code
19980 \begin_layout Plain Layout
19987 \begin_inset Flex Code
19990 \begin_layout Plain Layout
19997 \begin_inset Flex Code
20000 \begin_layout Plain Layout
20007 Each of these turns on or off the corresponding attribute.
20009 \begin_inset Flex Code
20012 \begin_layout Plain Layout
20018 turns on emphasis, and
20019 \begin_inset Flex Code
20022 \begin_layout Plain Layout
20030 \begin_inset Newline newline
20033 If the latter seems puzzling, remember that the font settings for the present
20034 context are generally inherited from the surrounding context.
20036 \begin_inset Flex Code
20039 \begin_layout Plain Layout
20045 would turn off the emphasis that was anyway in effect, say, in a theorem
20049 \begin_layout Description
20050 \begin_inset Flex Code
20053 \begin_layout Plain Layout
20060 \begin_inset Flex Code
20063 \begin_layout Plain Layout
20072 \begin_inset Flex Code
20075 \begin_layout Plain Layout
20084 \begin_layout Description
20085 \begin_inset Flex Code
20088 \begin_layout Plain Layout
20095 \begin_inset Flex Code
20098 \begin_layout Plain Layout
20107 \begin_inset Flex Code
20110 \begin_layout Plain Layout
20117 \begin_inset Flex Code
20120 \begin_layout Plain Layout
20127 \begin_inset Flex Code
20130 \begin_layout Plain Layout
20139 \begin_layout Description
20140 \begin_inset Flex Code
20143 \begin_layout Plain Layout
20150 \begin_inset Flex Code
20153 \begin_layout Plain Layout
20160 \begin_inset Flex Code
20163 \begin_layout Plain Layout
20170 \begin_inset Flex Code
20173 \begin_layout Plain Layout
20182 \begin_inset Flex Code
20185 \begin_layout Plain Layout
20192 \begin_inset Flex Code
20195 \begin_layout Plain Layout
20202 \begin_inset Flex Code
20205 \begin_layout Plain Layout
20212 \begin_inset Flex Code
20215 \begin_layout Plain Layout
20222 \begin_inset Flex Code
20225 \begin_layout Plain Layout
20234 \begin_layout Subsection
20235 \begin_inset CommandInset label
20237 name "subsec:Citation-format-description"
20241 Citation format description
20244 \begin_layout Standard
20246 \begin_inset Flex Code
20249 \begin_layout Plain Layout
20255 blocks are used to describe how bibliographic information should be displayed,
20256 both within \SpecialChar LyX
20257 itself (in the citation dialog and in tooltips, for example)
20258 and in XHTML output.
20259 Such a block might look like this:
20262 \begin_layout LyX-Code
20266 \begin_layout LyX-Code
20270 \begin_layout LyX-Code
20274 \begin_layout LyX-Code
20278 \begin_layout Standard
20279 The individual lines define how the bibliographic information associated
20280 with an article or book, respectively, is to be displayed, and such a definitio
20281 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20284 defines a default format in the source code that will be used if no specific
20285 definition has been given.
20287 predefines several formats in the file
20288 \begin_inset Flex Code
20291 \begin_layout Plain Layout
20297 , which is included in most of \SpecialChar LyX
20298 's document classes.
20301 \begin_layout Standard
20302 The definitions use a simple language that allows Bib\SpecialChar TeX
20303 keys to be replaced
20305 Keys should be enclosed in
20306 \begin_inset Flex Code
20309 \begin_layout Plain Layout
20316 \begin_inset Flex Code
20319 \begin_layout Plain Layout
20326 So a simple definition might look like this:
20329 \begin_layout LyX-Code
20331 \begin_inset Quotes eld
20335 \begin_inset Quotes erd
20341 \begin_layout Standard
20342 This would print the author, followed by a comma, followed by the title,
20343 in quotes, followed by a period.
20346 \begin_layout Standard
20347 Of course, sometimes you may want to print a key only if it exists.
20348 This can be done by using a conditional construction, such as:
20349 \begin_inset Flex Code
20352 \begin_layout Plain Layout
20354 \begin_inset space ~
20364 \begin_inset Flex Code
20367 \begin_layout Plain Layout
20373 key exists, then print
20374 \begin_inset Quotes eld
20378 \begin_inset space ~
20382 \begin_inset Quotes erd
20385 followed by the volume key.
20386 It is also possible to have an else clause in the conditional, such as:
20387 \begin_inset Newline newline
20391 \begin_inset Flex Code
20394 \begin_layout Plain Layout
20395 {%author%[[%author%]][[%editor%, ed.]]}
20401 \begin_inset Newline newline
20405 \begin_inset Flex Code
20408 \begin_layout Plain Layout
20414 key is printed if it exists; otherwise, the editor key is printed, followed
20416 \begin_inset Quotes eld
20420 \begin_inset space ~
20424 \begin_inset Quotes erd
20427 Note that the key is again enclosed in
20428 \begin_inset Flex Code
20431 \begin_layout Plain Layout
20437 signs; the entire conditional is enclosed in braces; and the if and else
20438 clauses are enclosed in double brackets,
20439 \begin_inset Quotes eld
20443 \begin_inset Flex Code
20446 \begin_layout Plain Layout
20453 \begin_inset Quotes eld
20457 \begin_inset Quotes eld
20461 \begin_inset Flex Code
20464 \begin_layout Plain Layout
20471 \begin_inset Quotes erd
20475 There must be no space between any of these.
20478 \begin_layout Standard
20479 There is one other piece of syntax available in definitions, which looks
20481 \begin_inset Flex Code
20484 \begin_layout Plain Layout
20491 This defines a piece of formatting information that is to be used when
20493 \begin_inset Quotes eld
20497 \begin_inset Quotes erd
20501 Obviously, we do not want to output HTML tags when writing plain text,
20502 so they should be wrapped in
20503 \begin_inset Quotes eld
20507 \begin_inset Quotes erd
20511 \begin_inset Quotes eld
20515 \begin_inset Quotes erd
20521 \begin_layout Standard
20522 Two special sorts of definitions are also possible in a
20523 \begin_inset Flex Code
20526 \begin_layout Plain Layout
20533 An example of the first would be:
20536 \begin_layout LyX-Code
20538 \begin_inset Quotes eld
20542 \begin_inset Quotes erd
20548 \begin_layout Standard
20549 This is an abbreviation, or macro, and it can be used by treating it as
20551 \begin_inset Flex Code
20554 \begin_layout Plain Layout
20563 \begin_inset Flex Code
20566 \begin_layout Plain Layout
20572 exactly as it would treat its definition.
20573 So, let us issue the obvious
20581 \begin_layout LyX-Code
20585 \begin_layout Standard
20586 or anything like it.
20588 shouldn't go into an infinite loop, but it may go into a long one before
20592 \begin_layout Standard
20593 The second sort of special definition might look like this:
20596 \begin_layout LyX-Code
20600 \begin_layout Standard
20601 This defines a translatable piece of text, which allows relevant parts of
20602 the bibliography to be translated.
20603 It can be included in a definition by treating it as a key:
20604 \begin_inset Flex Code
20607 \begin_layout Plain Layout
20614 Several of these are predefined in
20615 \begin_inset Flex Code
20618 \begin_layout Plain Layout
20625 Note that these are not macros, in the sense just defined.
20626 They will not be expanded.
20629 \begin_layout Standard
20630 So here then is an example that use all these features:
20631 \begin_inset VSpace defskip
20637 \begin_layout Standard
20641 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20644 \begin_layout Standard
20645 \begin_inset VSpace defskip
20648 This defines a macro that prints the author, followed by a comma, if the
20650 \begin_inset Flex Code
20653 \begin_layout Plain Layout
20659 key is defined, or else prints the name of the editor, followed by the
20661 \begin_inset Flex Code
20664 \begin_layout Plain Layout
20670 or its translation (it is by default
20671 \begin_inset Quotes eld
20675 \begin_inset Quotes erd
20679 \begin_inset Flex Code
20682 \begin_layout Plain Layout
20689 Note that this is in fact defined in
20690 \begin_inset Flex Code
20693 \begin_layout Plain Layout
20699 , so you can use it in your own definitions, or re-definitions, if you load
20703 \begin_layout Section
20704 \begin_inset CommandInset label
20706 name "sec:Tags-for-XHTML"
20710 Tags for XHTML output
20713 \begin_layout Standard
20714 As with \SpecialChar LaTeX
20715 or DocBook, the format of \SpecialChar LyX
20716 's XHTML output is also controlled by
20717 layout information.
20718 In general, \SpecialChar LyX
20719 provides sensible defaults and, as mentioned earlier, it will
20720 even construct default CSS style rules from the other layout tags.
20721 For example, \SpecialChar LyX
20722 will attempt to use the information provided in the
20723 \begin_inset Flex Code
20726 \begin_layout Plain Layout
20732 declaration for the Chapter style to write CSS that will appropriately
20733 format chapter headings.
20736 \begin_layout Standard
20737 In many cases, then, you may not have to do anything at all to get acceptable
20738 XHTML output for your own environments, custom insets, and so forth.
20739 But in some cases you will, and so \SpecialChar LyX
20740 provides a number of layout tags that
20741 can be used to customize the XHTML and CSS that are generated.
20744 \begin_layout Standard
20745 Note that there are two tags,
20746 \begin_inset Flex Code
20749 \begin_layout Plain Layout
20756 \begin_inset Flex Code
20759 \begin_layout Plain Layout
20765 that may appear outside style and inset declarations.
20767 \begin_inset CommandInset ref
20769 reference "subsec:General-text-class"
20773 for details on these.
20776 \begin_layout Subsection
20777 \begin_inset CommandInset label
20779 name "subsec:Paragraph-Style-XHTML"
20786 \begin_layout Standard
20787 The sort of XHTML \SpecialChar LyX
20788 outputs for a paragraph depends upon whether we are dealing
20789 with a normal paragraph, a command, or an environment, where this is itself
20790 determined by the contents of the corresponding
20791 \begin_inset Flex Code
20794 \begin_layout Plain Layout
20805 \begin_layout Standard
20806 For a command or normal paragraph, the output XHTML has the following form:
20809 \begin_layout LyX-Code
20811 \begin_inset Quotes erd
20815 \begin_inset Quotes erd
20821 \begin_layout LyX-Code
20823 \begin_inset Quotes erd
20827 \begin_inset Quotes erd
20833 \begin_layout LyX-Code
20834 Contents of the paragraph.
20837 \begin_layout LyX-Code
20841 \begin_layout Standard
20842 The label tags are of course omitted if the paragraph does not have a label.
20845 \begin_layout Standard
20846 For an environment that is not some sort of list, the XHTML takes this form:
20849 \begin_layout LyX-Code
20851 \begin_inset Quotes erd
20855 \begin_inset Quotes erd
20861 \begin_layout LyX-Code
20863 \begin_inset Quotes erd
20867 \begin_inset Quotes erd
20871 \begin_inset Quotes erd
20875 \begin_inset Quotes erd
20878 >Environment Label</labeltag>First paragraph.</itemtag>
20881 \begin_layout LyX-Code
20882 <itemtag>Second paragraph.</itemtag>
20885 \begin_layout LyX-Code
20889 \begin_layout Standard
20890 Note that the label is output only for the first paragraph, as it should
20891 be for a theorem, for example.
20895 \begin_layout Standard
20896 For a list, we have one of these forms:
20899 \begin_layout LyX-Code
20901 \begin_inset Quotes erd
20905 \begin_inset Quotes erd
20911 \begin_layout LyX-Code
20913 \begin_inset Quotes erd
20917 \begin_inset Quotes erd
20921 \begin_inset Quotes erd
20925 \begin_inset Quotes erd
20928 >List Label</labeltag>First item.</itemtag>
20931 \begin_layout LyX-Code
20933 \begin_inset Quotes erd
20937 \begin_inset Quotes erd
20941 \begin_inset Quotes erd
20945 \begin_inset Quotes erd
20948 >List Label</labeltag>Second item.</itemtag>
20951 \begin_layout LyX-Code
20955 \begin_layout LyX-Code
20959 \begin_layout LyX-Code
20961 \begin_inset Quotes erd
20965 \begin_inset Quotes erd
20971 \begin_layout LyX-Code
20973 \begin_inset Quotes erd
20977 \begin_inset Quotes erd
20980 >List Label</labeltag><itemtag attr=
20981 \begin_inset Quotes erd
20985 \begin_inset Quotes erd
20988 >First item.</itemtag>
20991 \begin_layout LyX-Code
20993 \begin_inset Quotes erd
20997 \begin_inset Quotes erd
21000 >List Label</labeltag><itemtag attr=
21001 \begin_inset Quotes erd
21005 \begin_inset Quotes erd
21008 >Second item.</itemtag>
21011 \begin_layout LyX-Code
21015 \begin_layout Standard
21016 Note the different orders of
21017 \begin_inset Flex Code
21020 \begin_layout Plain Layout
21027 \begin_inset Flex Code
21030 \begin_layout Plain Layout
21037 Which order we get depends upon the setting of
21038 \begin_inset Flex Code
21041 \begin_layout Plain Layout
21048 \begin_inset Flex Code
21051 \begin_layout Plain Layout
21057 is false (the default), you get the first of these, with the label within
21058 the item; if true, you get the second, with the label outside the item.
21061 \begin_layout Standard
21062 The specific tags and attributes output for each paragraph type can be controlle
21063 d by means of the layout tags we are about to describe.
21064 As mentioned earlier, however, \SpecialChar LyX
21065 uses sensible defaults for many of these,
21066 so you often may not need to do very much to get good XHTML output.
21067 Think of the available tags as there so you can tweak things to your liking.
21070 \begin_layout Description
21071 \begin_inset Flex Code
21074 \begin_layout Plain Layout
21081 \begin_inset Flex Code
21084 \begin_layout Plain Layout
21090 ] Specifies attribute information to be output with the main tag.
21092 \begin_inset Quotes eld
21096 \begin_inset Flex Code
21099 \begin_layout Plain Layout
21106 \begin_inset Quotes erd
21110 By default, \SpecialChar LyX
21112 \begin_inset Quotes eld
21116 \begin_inset Flex Code
21119 \begin_layout Plain Layout
21126 \begin_inset Quotes erd
21130 \begin_inset Flex Code
21133 \begin_layout Plain Layout
21139 is the \SpecialChar LyX
21140 name of the layout, made lowercase, for example: chapter.
21145 contain any style information.
21147 \begin_inset Flex Code
21150 \begin_layout Plain Layout
21159 \begin_layout Description
21160 \begin_inset Flex Code
21163 \begin_layout Plain Layout
21170 \begin_inset Flex Code
21173 \begin_layout Plain Layout
21183 ] Whether to output the default CSS information \SpecialChar LyX
21184 generates for this layout,
21185 even if additional information is explicitly provided via
21186 \begin_inset Flex Code
21189 \begin_layout Plain Layout
21197 \begin_inset Flex Code
21200 \begin_layout Plain Layout
21206 allows you to alter or augment the generated CSS, rather than to override
21209 \begin_inset Flex Code
21212 \begin_layout Plain Layout
21221 \begin_layout Description
21222 \begin_inset Flex Code
21225 \begin_layout Plain Layout
21232 \begin_inset Flex Code
21235 \begin_layout Plain Layout
21241 ] The tag to be used for individual paragraphs of environments, replacing
21243 \begin_inset Flex Code
21246 \begin_layout Plain Layout
21252 in the examples above.
21254 \begin_inset Flex Code
21257 \begin_layout Plain Layout
21266 \begin_layout Description
21267 \begin_inset Flex Code
21270 \begin_layout Plain Layout
21277 \begin_inset Flex Code
21280 \begin_layout Plain Layout
21286 ] Attributes for the item tag.
21288 \begin_inset Quotes eld
21292 \begin_inset Flex Code
21295 \begin_layout Plain Layout
21296 class=`layoutname_item'
21302 \begin_inset Quotes erd
21310 contain any style information.
21312 \begin_inset Flex Code
21315 \begin_layout Plain Layout
21324 \begin_layout Description
21325 \begin_inset Flex Code
21328 \begin_layout Plain Layout
21335 \begin_inset Flex Code
21338 \begin_layout Plain Layout
21344 ] The tag to be used for paragraph and item labels, replacing
21345 \begin_inset Flex Code
21348 \begin_layout Plain Layout
21354 in the examples above.
21356 \begin_inset Flex Code
21359 \begin_layout Plain Layout
21366 \begin_inset Flex Code
21369 \begin_layout Plain Layout
21376 \begin_inset Flex Code
21379 \begin_layout Plain Layout
21386 \begin_inset Flex Code
21389 \begin_layout Plain Layout
21390 Centered_Top_Environment
21395 , in which case it defaults to
21396 \begin_inset Flex Code
21399 \begin_layout Plain Layout
21408 \begin_layout Description
21409 \begin_inset Flex Code
21412 \begin_layout Plain Layout
21419 \begin_inset Flex Code
21422 \begin_layout Plain Layout
21428 ] Attributes for the label tag.
21430 \begin_inset Quotes eld
21434 \begin_inset Flex Code
21437 \begin_layout Plain Layout
21438 class=`layoutname_label'
21444 \begin_inset Quotes erd
21452 contain any style information.
21454 \begin_inset Flex Code
21457 \begin_layout Plain Layout
21466 \begin_layout Description
21467 \begin_inset Flex Code
21470 \begin_layout Plain Layout
21477 \begin_inset Flex Code
21480 \begin_layout Plain Layout
21490 ] Meaningful only for list-like environments, this tag controls whether
21491 the label tag is output before or inside the item tag.
21492 This is used, for example, in the description environment, where we want
21494 \begin_inset Flex Code
21497 \begin_layout Plain Layout
21498 <dt>\SpecialChar ldots
21499 </dt><dd>\SpecialChar ldots
21507 \begin_inset Flex Code
21510 \begin_layout Plain Layout
21516 : The label tag is output inside the item tag.
21519 \begin_layout Description
21520 \begin_inset Flex Code
21523 \begin_layout Plain Layout
21529 Information to be output in the
21530 \begin_inset Flex Code
21533 \begin_layout Plain Layout
21539 section when this style is used.
21540 This might, for example, be used to include a
21541 \begin_inset Flex Code
21544 \begin_layout Plain Layout
21551 \begin_inset Flex Code
21554 \begin_layout Plain Layout
21563 \begin_layout Description
21564 \begin_inset Flex Code
21567 \begin_layout Plain Layout
21573 CSS style information to be included when this style is used.
21574 Note that this will automatically be wrapped in a layout-generated
21575 \begin_inset Flex Code
21578 \begin_layout Plain Layout
21584 block, so only the CSS itself need be included.
21586 \begin_inset Flex Code
21589 \begin_layout Plain Layout
21598 \begin_layout Description
21599 \begin_inset Flex Code
21602 \begin_layout Plain Layout
21609 \begin_inset Flex Code
21612 \begin_layout Plain Layout
21618 ] The tag to be used for the main label, replacing
21619 \begin_inset Flex Code
21622 \begin_layout Plain Layout
21628 in the examples above.
21630 \begin_inset Flex Code
21633 \begin_layout Plain Layout
21642 \begin_layout Description
21643 \begin_inset Flex Code
21646 \begin_layout Plain Layout
21653 \begin_inset Flex Code
21656 \begin_layout Plain Layout
21666 ] Marks this style as the one to be used to generate the
21667 \begin_inset Flex Code
21670 \begin_layout Plain Layout
21676 tag for the XHTML file.
21677 By default, it is false.
21679 \begin_inset Flex Code
21682 \begin_layout Plain Layout
21688 file sets it to true for the
21689 \begin_inset Flex Code
21692 \begin_layout Plain Layout
21702 \begin_layout Subsection
21706 \begin_layout Standard
21707 The XHTML output of insets can also be controlled by information in layout
21712 \begin_layout Plain Layout
21713 At present, this is true only for
21714 \begin_inset Quotes eld
21718 \begin_inset Quotes erd
21721 insets (insets you can type into) and is not true for
21722 \begin_inset Quotes eld
21726 \begin_inset Quotes erd
21729 insets (insets that are associated with dialog boxes).
21734 Here, too, \SpecialChar LyX
21735 tries to provide sensible defaults, and it constructs default
21737 But everything can be customized.
21740 \begin_layout Standard
21741 The XHTML \SpecialChar LyX
21742 outputs for an inset has the following form:
21745 \begin_layout LyX-Code
21747 \begin_inset Quotes erd
21751 \begin_inset Quotes erd
21757 \begin_layout LyX-Code
21758 <labeltag>Label</labeltag>
21761 \begin_layout LyX-Code
21763 \begin_inset Quotes erd
21767 \begin_inset Quotes erd
21770 >Contents of the inset.</innertag>
21773 \begin_layout LyX-Code
21777 \begin_layout Standard
21778 If the inset permits multiple paragraphs—that is, if
21779 \begin_inset Flex Code
21782 \begin_layout Plain Layout
21788 is true—then the contents of the inset will itself be output as paragraphs
21789 formatted according to the styles used for those paragraphs (standard,
21790 quote, and the like).
21791 The label tag is of course omitted if the paragraph does not have a label
21792 and, at present, is always
21793 \begin_inset Flex Code
21796 \begin_layout Plain Layout
21803 The inner tag is optional and, by default, does not appear.
21806 \begin_layout Standard
21807 The specific tags and attributes output for each inset can be controlled
21808 by means of the following layout tags.
21811 \begin_layout Description
21812 \begin_inset Flex Code
21815 \begin_layout Plain Layout
21822 \begin_inset Flex Code
21825 \begin_layout Plain Layout
21831 ] Specifies attribute information to be output with the main tag.
21833 \begin_inset Quotes eld
21837 \begin_inset Flex Code
21840 \begin_layout Plain Layout
21841 class=`myinset' onclick=`\SpecialChar ldots
21848 \begin_inset Quotes erd
21852 By default, \SpecialChar LyX
21854 \begin_inset Quotes eld
21858 \begin_inset Flex Code
21861 \begin_layout Plain Layout
21868 \begin_inset Quotes erd
21872 \begin_inset Flex Code
21875 \begin_layout Plain Layout
21881 is the \SpecialChar LyX
21882 name of the inset, made lowercase and with non-alphanumeric characters
21883 converted to underscores, for example: footnote.
21886 \begin_layout Description
21887 \begin_inset Flex Code
21890 \begin_layout Plain Layout
21897 \begin_inset Flex Code
21900 \begin_layout Plain Layout
21910 ] Whether to output the default CSS information \SpecialChar LyX
21911 generates for this layout,
21912 even if additional information is explicitly provided via
21913 \begin_inset Flex Code
21916 \begin_layout Plain Layout
21924 \begin_inset Flex Code
21927 \begin_layout Plain Layout
21933 allows you to alter or augment the generated CSS, rather than to override
21938 \begin_layout Description
21939 \begin_inset Flex Code
21942 \begin_layout Plain Layout
21949 \begin_inset Flex Code
21952 \begin_layout Plain Layout
21958 ] Attributes for the inner tag.
21960 \begin_inset Quotes eld
21964 \begin_inset Flex Code
21967 \begin_layout Plain Layout
21968 class=`insetname_inner'
21974 \begin_inset Quotes erd
21980 \begin_layout Description
21981 \begin_inset Flex Code
21984 \begin_layout Plain Layout
21991 \begin_inset Flex Code
21994 \begin_layout Plain Layout
22000 ] The inner tag, replacing
22001 \begin_inset Flex Code
22004 \begin_layout Plain Layout
22010 in the examples above.
22011 By default, there is none.
22014 \begin_layout Description
22015 \begin_inset Flex Code
22018 \begin_layout Plain Layout
22025 \begin_inset Flex Code
22028 \begin_layout Plain Layout
22036 ] Whether this inset represents a standalone block of text (such as a footnote)
22037 or instead represents material that is included in the surrounding text
22038 (such as a branch).
22042 \begin_layout Description
22043 \begin_inset Flex Code
22046 \begin_layout Plain Layout
22053 \begin_inset Flex Code
22056 \begin_layout Plain Layout
22062 ] A label for this inset, possibly including a reference to a counter.
22063 For example, for footnote, it might be:
22064 \begin_inset Flex Code
22067 \begin_layout Plain Layout
22076 This is optional, and there is no default.
22079 \begin_layout Description
22080 \begin_inset Flex Code
22083 \begin_layout Plain Layout
22089 Information to be output in the
22090 \begin_inset Flex Code
22093 \begin_layout Plain Layout
22099 section when this style is used.
22100 This might, for example, be used to include a
22101 \begin_inset Flex Code
22104 \begin_layout Plain Layout
22111 \begin_inset Flex Code
22114 \begin_layout Plain Layout
22123 \begin_layout Description
22124 \begin_inset Flex Code
22127 \begin_layout Plain Layout
22133 CSS style information to be included when this style is used.
22134 Note that this will automatically be wrapped in a layout-generated
22135 \begin_inset Flex Code
22138 \begin_layout Plain Layout
22144 block, so only the CSS itself need be included.
22147 \begin_layout Description
22148 \begin_inset Flex Code
22151 \begin_layout Plain Layout
22158 \begin_inset Flex Code
22161 \begin_layout Plain Layout
22167 ] The tag to be used for the main label, replacing
22168 \begin_inset Flex Code
22171 \begin_layout Plain Layout
22177 in the examples above.
22178 The default depends upon the setting of
22179 \begin_inset Flex Code
22182 \begin_layout Plain Layout
22189 \begin_inset Flex Code
22192 \begin_layout Plain Layout
22198 is true, the default is
22199 \begin_inset Flex Code
22202 \begin_layout Plain Layout
22208 ; if it is false, the default is
22209 \begin_inset Flex Code
22212 \begin_layout Plain Layout
22221 \begin_layout Subsection
22225 \begin_layout Standard
22226 The XHTML output for floats too can be controlled by layout information.
22227 The output has the following form:
22230 \begin_layout LyX-Code
22232 \begin_inset Quotes erd
22236 \begin_inset Quotes erd
22242 \begin_layout LyX-Code
22243 Contents of the float.
22246 \begin_layout LyX-Code
22250 \begin_layout Standard
22251 The caption, if there is one, is a separate inset and will be output as
22253 Its appearance can be controlled via the InsetLayout for caption insets.
22257 \begin_layout Description
22258 \begin_inset Flex Code
22261 \begin_layout Plain Layout
22268 \begin_inset Flex Code
22271 \begin_layout Plain Layout
22277 ] Specifies attribute information to be output with the main tag.
22279 \begin_inset Quotes eld
22283 \begin_inset Flex Code
22286 \begin_layout Plain Layout
22287 class=`myfloat' onclick=`\SpecialChar ldots
22294 \begin_inset Quotes erd
22298 By default, \SpecialChar LyX
22300 \begin_inset Quotes eld
22304 \begin_inset Flex Code
22307 \begin_layout Plain Layout
22308 class=`float float-floattype'
22314 \begin_inset Quotes erd
22318 \begin_inset Flex Code
22321 \begin_layout Plain Layout
22327 is \SpecialChar LyX
22328 's name for this type of float, as determined by the float declaration
22330 \begin_inset CommandInset ref
22332 reference "subsec:Floats"
22336 ), though made lowercase and with non-alphanumeric characters converted
22337 to underscores, for example: float-table.
22340 \begin_layout Description
22341 \begin_inset Flex Code
22344 \begin_layout Plain Layout
22350 CSS style information to be included when this float is used.
22351 Note that this will automatically be wrapped in a layout-generated
22352 \begin_inset Flex Code
22355 \begin_layout Plain Layout
22361 block, so only the CSS itself need be included.
22364 \begin_layout Description
22365 \begin_inset Flex Code
22368 \begin_layout Plain Layout
22375 \begin_inset Flex Code
22378 \begin_layout Plain Layout
22384 ] The tag to be used for this float, replacing
22385 \begin_inset Quotes eld
22389 \begin_inset Flex Code
22392 \begin_layout Plain Layout
22399 \begin_inset Quotes erd
22402 in the example above.
22404 \begin_inset Flex Code
22407 \begin_layout Plain Layout
22413 and will rarely need changing.
22416 \begin_layout Subsection
22417 Bibliography formatting
22420 \begin_layout Standard
22421 The bibliography can be formatted using
22422 \begin_inset Flex Code
22425 \begin_layout Plain Layout
22433 \begin_inset CommandInset ref
22435 reference "subsec:Citation-format-description"
22442 \begin_layout Subsection
22447 \begin_layout Standard
22448 We have several times mentioned that \SpecialChar LyX
22449 will generate default CSS style rules
22450 for both insets and paragraph styles, based upon the other layout information
22452 In this section, we shall say a word about which layout information \SpecialChar LyX
22457 \begin_layout Standard
22458 At present, \SpecialChar LyX
22459 auto-generates CSS only for font information, making use of
22461 \begin_inset Flex Code
22464 \begin_layout Plain Layout
22471 \begin_inset Flex Code
22474 \begin_layout Plain Layout
22481 \begin_inset Flex Code
22484 \begin_layout Plain Layout
22491 \begin_inset Flex Code
22494 \begin_layout Plain Layout
22501 \begin_inset Flex Code
22504 \begin_layout Plain Layout
22511 \begin_inset CommandInset ref
22513 reference "subsec:Font-description"
22518 The translation is mostly straightforward and obvious.
22520 \begin_inset Quotes eld
22524 \begin_inset Flex Code
22527 \begin_layout Plain Layout
22534 \begin_inset Quotes erd
22538 \begin_inset Quotes eld
22542 \begin_inset Flex Code
22545 \begin_layout Plain Layout
22546 font-family: sans-serif;
22552 \begin_inset Quotes erd
22556 The correspondence of \SpecialChar LyX
22557 sizes and CSS sizes is a little less obvious but
22558 nonetheless intuitive.
22560 \begin_inset Flex Code
22563 \begin_layout Plain Layout
22570 \begin_inset Flex URL
22573 \begin_layout Plain Layout
22583 \begin_layout Chapter
22584 Including External Material
22585 \begin_inset CommandInset label
22587 name "chap:Including-External-Material"
22594 \begin_layout Standard
22595 \begin_inset Box Shadowbox
22605 height_special "totalheight"
22610 backgroundcolor "none"
22613 \begin_layout Plain Layout
22614 WARNING: This portion of the documentation has not been updated for some
22616 We certainly hope that it is still accurate, but there are no guarantees.
22624 \begin_layout Standard
22625 The use of material from sources external to \SpecialChar LyX
22626 is covered in detail in the
22632 This part of the manual covers what needs to happen behind the scenes for
22633 new sorts of material to be included.
22636 \begin_layout Section
22640 \begin_layout Standard
22641 The external material feature is based on the concept of a
22646 A template is a specification of how \SpecialChar LyX
22647 should interface with a certain kind
22649 As bundled, \SpecialChar LyX
22650 comes with predefined templates for Xfig figures, various
22651 raster format images, chess diagrams, and LilyPond music notation.
22652 You can check the actual list by using the menu
22653 \begin_inset Flex Noun
22656 \begin_layout Plain Layout
22657 Insert\SpecialChar menuseparator
22658 File\SpecialChar menuseparator
22665 Furthermore, it is possible to roll your own template to support a specific
22667 Later we'll describe in more detail what is involved, and hopefully you
22668 will submit all the templates you create so we can include them in a later
22673 \begin_layout Standard
22674 Another basic idea of the external material feature is to distinguish between
22675 the original file that serves as a base for final material and the produced
22676 file that is included in your exported or printed document.
22677 For example, consider the case of a figure produced with
22678 \begin_inset Flex Code
22681 \begin_layout Plain Layout
22688 The Xfig application itself works on an original file with the
22689 \begin_inset Flex Code
22692 \begin_layout Plain Layout
22699 Within Xfig, you create and change your figure, and when you are done,
22701 \begin_inset Flex Code
22704 \begin_layout Plain Layout
22711 When you want to include the figure in your document, you invoke
22712 \begin_inset Flex Code
22715 \begin_layout Plain Layout
22721 in order to create a PostScript file that can readily be included in your
22725 \begin_inset Flex Code
22728 \begin_layout Plain Layout
22734 file is the original file, and the PostScript file is the produced file.
22737 \begin_layout Standard
22738 This distinction is important in order to allow updating of the material
22739 while you are in the process of writing the document.
22740 Furthermore, it provides us with the flexibility that is needed to support
22741 multiple export formats.
22742 For instance, in the case of a plain text file, it is not exactly an award-winn
22743 ing idea to include the figure as raw PostScript.
22744 Instead, you would either prefer to just include a reference to the figure
22745 or try to invoke some graphics to ASCII converter to make the final result
22746 look similar to the real graphics.
22747 The external material management allows you to do this, because it is parametri
22748 zed on the different export formats that \SpecialChar LyX
22752 \begin_layout Standard
22753 Besides supporting the production of different products according to the
22754 exported format, it supports tight integration with editing and viewing
22756 In the case of an Xfig figure, you are able to invoke Xfig on the original
22757 file with a single click from within the external material dialog in \SpecialChar LyX
22759 and also preview the produced PostScript file with Ghostview with another
22761 No more fiddling around with the command line and/or file browsers to locate
22762 and manipulate the original or produced files.
22763 In this way, you are finally able to take full advantage of the many different
22764 applications that are relevant to use when you write your documents, and
22765 ultimately be more productive.
22768 \begin_layout Section
22769 The external template configuration file
22772 \begin_layout Standard
22773 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22775 However, be aware that doing this in an careless manner most probably
22779 introduce an easily exploitable security hole.
22780 So before you do this, please read the discussion about security in
22781 \begin_inset CommandInset ref
22783 reference "sec:Security-discussion"
22790 \begin_layout Standard
22791 Having said that, we encourage you to submit any interesting templates that
22796 \begin_layout Standard
22797 The external templates are defined in the
22798 \begin_inset Flex Code
22801 \begin_layout Plain Layout
22802 LyXDir/lib/external_templates
22808 You can place your own version in
22809 \begin_inset Flex Code
22812 \begin_layout Plain Layout
22813 UserDir/external_templates
22821 \begin_layout Standard
22822 A typical template looks like this:
22825 \begin_layout LyX-Code
22829 \begin_layout LyX-Code
22830 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22833 \begin_layout LyX-Code
22837 \begin_layout LyX-Code
22841 \begin_layout LyX-Code
22845 \begin_layout LyX-Code
22849 \begin_layout LyX-Code
22853 \begin_layout LyX-Code
22854 AutomaticProduction true
22857 \begin_layout LyX-Code
22861 \begin_layout LyX-Code
22865 \begin_layout LyX-Code
22866 Format \SpecialChar LaTeX
22870 \begin_layout LyX-Code
22871 TransformCommand Rotate RotationLatexCommand
22874 \begin_layout LyX-Code
22875 TransformCommand Resize ResizeLatexCommand
22878 \begin_layout LyX-Code
22879 Product "$$RotateFront$$ResizeFront
22882 \begin_layout LyX-Code
22887 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22890 \begin_layout LyX-Code
22891 $$ResizeBack$$RotateBack"
22894 \begin_layout LyX-Code
22898 \begin_layout LyX-Code
22899 UpdateResult "$$AbsPath$$Basename.pstex_t"
22902 \begin_layout LyX-Code
22903 Requirement "graphicx"
22906 \begin_layout LyX-Code
22907 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22910 \begin_layout LyX-Code
22911 ReferencedFile latex "$$AbsPath$$Basename.eps"
22914 \begin_layout LyX-Code
22915 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22918 \begin_layout LyX-Code
22922 \begin_layout LyX-Code
22923 Format PDF\SpecialChar LaTeX
22927 \begin_layout LyX-Code
22928 TransformCommand Rotate RotationLatexCommand
22931 \begin_layout LyX-Code
22932 TransformCommand Resize ResizeLatexCommand
22935 \begin_layout LyX-Code
22936 Product "$$RotateFront$$ResizeFront
22939 \begin_layout LyX-Code
22944 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22947 \begin_layout LyX-Code
22948 $$ResizeBack$$RotateBack"
22951 \begin_layout LyX-Code
22952 UpdateFormat pdftex
22955 \begin_layout LyX-Code
22956 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22959 \begin_layout LyX-Code
22960 Requirement "graphicx"
22963 \begin_layout LyX-Code
22964 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22967 \begin_layout LyX-Code
22968 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22971 \begin_layout LyX-Code
22975 \begin_layout LyX-Code
22979 \begin_layout LyX-Code
22980 Product "$$Contents(
22982 "$$AbsPath$$Basename.asc
22987 \begin_layout LyX-Code
22988 UpdateFormat asciixfig
22991 \begin_layout LyX-Code
22992 UpdateResult "$$AbsPath$$Basename.asc"
22995 \begin_layout LyX-Code
22999 \begin_layout LyX-Code
23003 \begin_layout LyX-Code
23004 Product "<graphic fileref=
23006 "$$AbsOrRelPathMaster$$Basename.eps
23011 \begin_layout LyX-Code
23015 \begin_layout LyX-Code
23019 \begin_layout LyX-Code
23020 UpdateResult "$$AbsPath$$Basename.eps"
23023 \begin_layout LyX-Code
23024 ReferencedFile docbook "$$AbsPath$$Basename.eps"
23027 \begin_layout LyX-Code
23028 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
23031 \begin_layout LyX-Code
23035 \begin_layout LyX-Code
23036 Product "[XFig: $$FName]"
23039 \begin_layout LyX-Code
23043 \begin_layout LyX-Code
23047 \begin_layout Standard
23048 As you can see, the template is enclosed in
23049 \begin_inset Flex Code
23052 \begin_layout Plain Layout
23060 \begin_inset Flex Code
23063 \begin_layout Plain Layout
23070 It contains a header specifying some general settings and, for each supported
23071 primary document file format, a section
23072 \begin_inset Flex Code
23075 \begin_layout Plain Layout
23083 \begin_inset Flex Code
23086 \begin_layout Plain Layout
23095 \begin_layout Subsection
23096 The template header
23099 \begin_layout Description
23100 \begin_inset Flex Code
23103 \begin_layout Plain Layout
23104 AutomaticProduction
23105 \begin_inset space ~
23113 Whether the file represented by the template must be generated by \SpecialChar LyX
23115 This command must occur exactly once.
23118 \begin_layout Description
23119 \begin_inset Flex Code
23122 \begin_layout Plain Layout
23124 \begin_inset space ~
23132 A glob pattern that is used in the file dialog to filter out the desired
23134 If there is more than one possible file extension (e.
23135 \begin_inset space \thinspace{}
23139 \begin_inset space \space{}
23143 \begin_inset Flex Code
23146 \begin_layout Plain Layout
23153 \begin_inset Flex Code
23156 \begin_layout Plain Layout
23162 ), use something like
23163 \begin_inset Flex Code
23166 \begin_layout Plain Layout
23173 This command must occur exactly once.
23176 \begin_layout Description
23177 \begin_inset Flex Code
23180 \begin_layout Plain Layout
23182 \begin_inset space ~
23190 The text that is displayed on the button.
23191 This command must occur exactly once.
23194 \begin_layout Description
23195 \begin_inset Flex Code
23198 \begin_layout Plain Layout
23200 \begin_inset space ~
23204 \begin_inset space ~
23212 The help text that is used in the External dialog.
23213 Provide enough information to explain to the user just what the template
23214 can provide him with.
23215 This command must occur exactly once.
23218 \begin_layout Description
23219 \begin_inset Flex Code
23222 \begin_layout Plain Layout
23224 \begin_inset space ~
23232 The file format of the original file.
23233 This must be the name of a format that is known to \SpecialChar LyX
23235 \begin_inset CommandInset ref
23237 reference "sec:Formats"
23243 \begin_inset Quotes eld
23247 \begin_inset Flex Code
23250 \begin_layout Plain Layout
23257 \begin_inset Quotes erd
23260 if the template can handle original files of more than one format.
23262 will attempt to interrogate the file itself in order to deduce its format
23264 This command must occur exactly once.
23267 \begin_layout Description
23268 \begin_inset Flex Code
23271 \begin_layout Plain Layout
23273 \begin_inset space ~
23281 A unique name for the template.
23282 It must not contain substitution macros (see below).
23285 \begin_layout Description
23286 \begin_inset Flex Code
23289 \begin_layout Plain Layout
23291 \begin_inset space ~
23294 Rotate|Resize|Clip|Extra
23299 This command specifies which transformations are supported by this template.
23300 It may occur zero or more times.
23301 This command enables the corresponding tabs in the external dialog.
23303 \begin_inset Flex Code
23306 \begin_layout Plain Layout
23312 command must have either a corresponding
23313 \begin_inset Flex Code
23316 \begin_layout Plain Layout
23323 \begin_inset Flex Code
23326 \begin_layout Plain Layout
23333 \begin_inset Flex Code
23336 \begin_layout Plain Layout
23343 Otherwise the transformation will not be supported by that format.
23346 \begin_layout Subsection
23350 \begin_layout Description
23351 \begin_inset Flex Code
23354 \begin_layout Plain Layout
23356 \begin_inset space ~
23359 LaTeX|PDFLaTeX|PlainText|DocBook
23364 The primary document file format that this format definition is for.
23365 Not every template has a sensible representation in all document file formats.
23366 Please define nevertheless a
23367 \begin_inset Flex Code
23370 \begin_layout Plain Layout
23376 section for all templates.
23377 Use a dummy text when no representation is available.
23378 Then you can at least see a reference to the external material in the exported
23382 \begin_layout Description
23383 \begin_inset Flex Code
23386 \begin_layout Plain Layout
23388 \begin_inset space ~
23392 \begin_inset space ~
23400 This command defines an additional macro
23401 \begin_inset Flex Code
23404 \begin_layout Plain Layout
23410 for substitution in
23411 \begin_inset Flex Code
23414 \begin_layout Plain Layout
23422 \begin_inset Flex Code
23425 \begin_layout Plain Layout
23431 itself may contain substitution macros.
23432 The advantage over using
23433 \begin_inset Flex Code
23436 \begin_layout Plain Layout
23443 \begin_inset Flex Code
23446 \begin_layout Plain Layout
23452 is that the substituted value of
23453 \begin_inset Flex Code
23456 \begin_layout Plain Layout
23462 is sanitized so that it is a valid optional argument in the document format.
23463 This command may occur zero or more times.
23466 \begin_layout Description
23467 \begin_inset Flex Code
23470 \begin_layout Plain Layout
23472 \begin_inset space ~
23480 The text that is inserted in the exported document.
23481 This is actually the most important command and can be quite complex.
23482 This command must occur exactly once.
23485 \begin_layout Description
23486 \begin_inset Flex Code
23489 \begin_layout Plain Layout
23491 \begin_inset space ~
23499 This command specifies a preamble snippet that will be included in the
23502 It has to be defined using
23503 \begin_inset Flex Code
23506 \begin_layout Plain Layout
23514 \begin_inset Flex Code
23517 \begin_layout Plain Layout
23524 This command may occur zero or more times.
23527 \begin_layout Description
23528 \begin_inset Flex Code
23531 \begin_layout Plain Layout
23533 \begin_inset space ~
23537 \begin_inset space ~
23545 This command denotes files that are created by the conversion process and
23546 are needed for a particular export format.
23547 If the filename is relative, it is interpreted relative to the master document.
23548 This command may be given zero or more times.
23551 \begin_layout Description
23552 \begin_inset Flex Code
23555 \begin_layout Plain Layout
23557 \begin_inset space ~
23565 The name of a required \SpecialChar LaTeX
23567 The package is included via
23568 \begin_inset Flex Code
23571 \begin_layout Plain Layout
23579 in the \SpecialChar LaTeX
23581 This command may occur zero or more times.
23584 \begin_layout Description
23585 \begin_inset Flex Code
23588 \begin_layout Plain Layout
23590 \begin_inset space ~
23594 \begin_inset space ~
23597 RotationLatexCommand
23602 This command specifies that the built in \SpecialChar LaTeX
23603 command should be used for rotation.
23604 This command may occur once or not at all.
23607 \begin_layout Description
23608 \begin_inset Flex Code
23611 \begin_layout Plain Layout
23613 \begin_inset space ~
23617 \begin_inset space ~
23625 This command specifies that the built in \SpecialChar LaTeX
23626 command should be used for resizing.
23627 This command may occur once or not at all.
23630 \begin_layout Description
23631 \begin_inset Flex Code
23634 \begin_layout Plain Layout
23636 \begin_inset space ~
23640 \begin_inset space ~
23643 RotationLatexOption
23648 This command specifies that rotation is done via an optional argument.
23649 This command may occur once or not at all.
23652 \begin_layout Description
23653 \begin_inset Flex Code
23656 \begin_layout Plain Layout
23658 \begin_inset space ~
23662 \begin_inset space ~
23670 This command specifies that resizing is done via an optional argument.
23671 This command may occur once or not at all.
23674 \begin_layout Description
23675 \begin_inset Flex Code
23678 \begin_layout Plain Layout
23680 \begin_inset space ~
23684 \begin_inset space ~
23692 This command specifies that clipping is done via an optional argument.
23693 This command may occur once or not at all.
23696 \begin_layout Description
23697 \begin_inset Flex Code
23700 \begin_layout Plain Layout
23702 \begin_inset space ~
23706 \begin_inset space ~
23714 This command specifies that an extra optional argument is used.
23715 This command may occur once or not at all.
23718 \begin_layout Description
23719 \begin_inset Flex Code
23722 \begin_layout Plain Layout
23724 \begin_inset space ~
23732 The file format of the converted file.
23733 This must be the name of a format that is known to \SpecialChar LyX
23735 \begin_inset Flex Noun
23738 \begin_layout Plain Layout
23739 Tools\SpecialChar menuseparator
23740 Preferences\SpecialChar menuseparator
23741 File Handling\SpecialChar menuseparator
23748 This command must occur exactly once.
23749 If the resulting file format is PDF, you need to specify the format
23750 \begin_inset Flex Code
23753 \begin_layout Plain Layout
23760 This is the PDF format used for including graphics.
23761 The other defined PDF formats are for document export.
23764 \begin_layout Description
23765 \begin_inset Flex Code
23768 \begin_layout Plain Layout
23770 \begin_inset space ~
23778 The file name of the converted file.
23779 The file name must be absolute.
23780 This command must occur exactly once.
23783 \begin_layout Subsection
23784 Preamble definitions
23787 \begin_layout Standard
23788 The external template configuration file may contain additional preamble
23789 definitions enclosed by
23790 \begin_inset Flex Code
23793 \begin_layout Plain Layout
23801 \begin_inset Flex Code
23804 \begin_layout Plain Layout
23811 They can be used by the templates in the
23812 \begin_inset Flex Code
23815 \begin_layout Plain Layout
23824 \begin_layout Section
23825 The substitution mechanism
23828 \begin_layout Standard
23829 When the external material facility invokes an external program, it is done
23830 on the basis of a command defined in the template configuration file.
23831 These commands can contain various macros that are expanded before execution.
23832 Execution always take place in the directory of the containing document.
23835 \begin_layout Standard
23836 Also, whenever external material is to be displayed, the name will be produced
23837 by the substitution mechanism, and most other commands in the template
23838 definition support substitution as well.
23841 \begin_layout Standard
23842 The available macros are the following:
23845 \begin_layout Description
23846 \begin_inset Flex Code
23849 \begin_layout Plain Layout
23850 $$AbsOrRelPathMaster
23855 The file path, absolute or relative to the master \SpecialChar LyX
23859 \begin_layout Description
23860 \begin_inset Flex Code
23863 \begin_layout Plain Layout
23864 $$AbsOrRelPathParent
23869 The file path, absolute or relative to the \SpecialChar LyX
23873 \begin_layout Description
23874 \begin_inset Flex Code
23877 \begin_layout Plain Layout
23883 The absolute file path.
23886 \begin_layout Description
23887 \begin_inset Flex Code
23890 \begin_layout Plain Layout
23896 The filename without path and without the extension.
23899 \begin_layout Description
23900 \begin_inset Flex Code
23903 \begin_layout Plain Layout
23905 \begin_inset Quotes eld
23909 \begin_inset Quotes erd
23917 This macro will expand to the contents of the file with the name
23918 \begin_inset Flex Code
23921 \begin_layout Plain Layout
23930 \begin_layout Description
23931 \begin_inset Flex Code
23934 \begin_layout Plain Layout
23940 The file extension (including the dot).
23943 \begin_layout Description
23944 \begin_inset Flex Code
23947 \begin_layout Plain Layout
23953 This will be the string
23954 \begin_inset Quotes eld
23958 \begin_inset Quotes erd
23961 if the file is in JPEG format, otherwise it will be the string
23962 \begin_inset Quotes eld
23966 \begin_inset Quotes erd
23970 This is useful to avoid uneeded conversions for output formats that support
23971 both PNG and JPEG fomats.
23972 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
23977 \begin_layout Description
23978 \begin_inset Flex Code
23981 \begin_layout Plain Layout
23987 The filename of the file specified in the external material dialog.
23988 This is either an absolute name, or it is relative to the \SpecialChar LyX
23992 \begin_layout Description
23993 \begin_inset Flex Code
23996 \begin_layout Plain Layout
24003 \begin_inset Flex Code
24006 \begin_layout Plain Layout
24012 (absolute name or relative to the \SpecialChar LyX
24016 \begin_layout Description
24017 \begin_inset Flex Code
24020 \begin_layout Plain Layout
24026 The file path, relative to the master \SpecialChar LyX
24030 \begin_layout Description
24031 \begin_inset Flex Code
24034 \begin_layout Plain Layout
24040 The file path, relative to the \SpecialChar LyX
24044 \begin_layout Description
24045 \begin_inset Flex Code
24048 \begin_layout Plain Layout
24054 This macro will expand to the absolute path of the system directory.
24055 This is typically used to point to the various helper scripts that are
24056 bundled with \SpecialChar LyX
24060 \begin_layout Description
24061 \begin_inset Flex Code
24064 \begin_layout Plain Layout
24070 A name and full path to a temporary file which will be automatically deleted
24071 whenever the containing document is closed, or the external material insertion
24075 \begin_layout Standard
24076 All path macros contain a trailing directory separator, so you can construct
24078 \begin_inset space \thinspace{}
24082 \begin_inset space \space{}
24085 the absolute filename with
24086 \begin_inset Flex Code
24089 \begin_layout Plain Layout
24090 $$AbsPath$$Basename$$Extension
24098 \begin_layout Standard
24099 The macros above are substituted in all commands unless otherwise noted.
24101 \begin_inset Flex Code
24104 \begin_layout Plain Layout
24110 supports additionally the following substitutions if they are enabled by
24112 \begin_inset Flex Code
24115 \begin_layout Plain Layout
24122 \begin_inset Flex Code
24125 \begin_layout Plain Layout
24134 \begin_layout Description
24135 \begin_inset Flex Code
24138 \begin_layout Plain Layout
24144 The front part of the resize command.
24147 \begin_layout Description
24148 \begin_inset Flex Code
24151 \begin_layout Plain Layout
24157 The back part of the resize command.
24160 \begin_layout Description
24161 \begin_inset Flex Code
24164 \begin_layout Plain Layout
24170 The front part of the rotation command.
24173 \begin_layout Description
24174 \begin_inset Flex Code
24177 \begin_layout Plain Layout
24183 The back part of the rotation command.
24186 \begin_layout Standard
24187 The value string of the
24188 \begin_inset Flex Code
24191 \begin_layout Plain Layout
24197 command supports additionally the following substitutions if they are enabled
24199 \begin_inset Flex Code
24202 \begin_layout Plain Layout
24209 \begin_inset Flex Code
24212 \begin_layout Plain Layout
24221 \begin_layout Description
24222 \begin_inset Flex Code
24225 \begin_layout Plain Layout
24234 \begin_layout Description
24235 \begin_inset Flex Code
24238 \begin_layout Plain Layout
24247 \begin_layout Description
24248 \begin_inset Flex Code
24251 \begin_layout Plain Layout
24260 \begin_layout Description
24261 \begin_inset Flex Code
24264 \begin_layout Plain Layout
24270 The rotation option.
24273 \begin_layout Standard
24274 You may ask why there are so many path macros.
24275 There are mainly two reasons:
24278 \begin_layout Enumerate
24279 Relative and absolute file names should remain relative or absolute, respectivel
24281 Users may have reasons to prefer either form.
24282 Relative names are useful for portable documents that should work on different
24283 machines, for example.
24284 Absolute names may be required by some programs.
24287 \begin_layout Enumerate
24289 treats relative file names differently than \SpecialChar LyX
24290 and other programs in nested
24292 For \SpecialChar LyX
24293 , a relative file name is always relative to the document that contains
24295 For \SpecialChar LaTeX
24296 , it is always relative to the master document.
24297 These two definitions are identical if you have only one document, but
24298 differ if you have a master document that includes part documents.
24299 That means that relative filenames must be transformed when presented to
24302 Fortunately \SpecialChar LyX
24303 does this automatically for you if you choose the right macros.
24306 \begin_layout Standard
24307 So which path macro should be used in new template definitions? The rule
24311 \begin_layout Itemize
24313 \begin_inset Flex Code
24316 \begin_layout Plain Layout
24322 if an absolute path is required.
24325 \begin_layout Itemize
24327 \begin_inset Flex Code
24330 \begin_layout Plain Layout
24331 $$AbsOrRelPathMaster
24336 if the substituted string is some kind of \SpecialChar LaTeX
24340 \begin_layout Itemize
24342 \begin_inset Flex Code
24345 \begin_layout Plain Layout
24346 $$AbsOrRelPathParent
24351 in order to preserve the user's choice.
24354 \begin_layout Standard
24355 There are special cases where this rule does not work and e.
24356 \begin_inset space \thinspace{}
24360 \begin_inset space \space{}
24363 relative names are needed, but normally it will work just fine.
24364 One example for such a case is the command
24365 \begin_inset Flex Code
24368 \begin_layout Plain Layout
24369 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24374 in the XFig template above: We can't use the absolute name because the
24376 \begin_inset Flex Code
24379 \begin_layout Plain Layout
24385 files needs the relative name in order to rewrite the file content.
24388 \begin_layout Section
24389 Security discussion
24390 \begin_inset CommandInset label
24392 name "sec:Security-discussion"
24399 \begin_layout Standard
24400 The external material feature interfaces with a lot of external programs
24401 and does so automatically, so we have to consider the security implications
24403 In particular, since you have the option of including your own filenames
24404 and/or parameter strings and those are expanded into a command, it seems
24405 that it would be possible to create a malicious document which executes
24406 arbitrary commands when a user views or prints the document.
24407 This is something we definitely want to avoid.
24410 \begin_layout Standard
24411 However, since the external program commands are specified in the template
24412 configuration file only, there are no security issues if \SpecialChar LyX
24413 is properly configure
24414 d with safe templates only.
24415 This is so because the external programs are invoked with the
24416 \begin_inset Flex Code
24419 \begin_layout Plain Layout
24425 -system call rather than the
24426 \begin_inset Flex Code
24429 \begin_layout Plain Layout
24435 system-call, so it's not possible to execute arbitrary commands from the
24436 filename or parameter section via the shell.
24439 \begin_layout Standard
24440 This also implies that you are restricted in what command strings you can
24441 use in the external material templates.
24442 In particular, pipes and redirection are not readily available.
24443 This has to be so if \SpecialChar LyX
24444 should remain safe.
24445 If you want to use some of the shell features, you should write a safe
24446 script to do this in a controlled manner, and then invoke the script from
24447 the command string.
24451 \begin_layout Standard
24452 It is possible to design a template that interacts directly with the shell,
24453 but since this would allow a malicious user to execute arbitrary commands
24454 by writing clever filenames and/or parameters, we generally recommend that
24455 you only use safe scripts that work with the
24456 \begin_inset Flex Code
24459 \begin_layout Plain Layout
24465 system call in a controlled manner.
24466 Of course, for use in a controlled environment, it can be tempting to just
24467 fall back to use ordinary shell scripts.
24468 If you do so, be aware that you
24472 provide an easily exploitable security hole in your system.
24473 Of course it stands to reason that such unsafe templates will never be
24474 included in the standard \SpecialChar LyX
24475 distribution, although we do encourage people
24476 to submit new templates in the open source tradition.
24477 But \SpecialChar LyX
24478 as shipped from the official distribution channels will never have
24482 \begin_layout Standard
24483 Including external material provides a lot of power, and you have to be
24484 careful not to introduce security hazards with this power.
24485 A subtle error in a single line in an innocent looking script can open
24486 the door to huge security problems.
24487 So if you do not fully understand the issues, we recommend that you consult
24488 a knowledgeable security professional or the \SpecialChar LyX
24489 development team if you have
24490 any questions about whether a given template is safe or not.
24491 And do this before you use it in an uncontrolled environment.
24494 \begin_layout Chapter
24496 List of supported \SpecialChar LyX
24497 functions to be used in layouts
24498 \begin_inset CommandInset label
24500 name "chap:List-of-functions"
24507 \begin_layout Standard
24509 \begin_inset Tabular
24510 <lyxtabular version="3" rows="11" columns="8">
24511 <features tabularvalignment="middle">
24512 <column alignment="left" valignment="top">
24513 <column alignment="left" valignment="top">
24514 <column alignment="left" valignment="top">
24515 <column alignment="left" valignment="top">
24516 <column alignment="left" valignment="top">
24517 <column alignment="left" valignment="top">
24518 <column alignment="left" valignment="top">
24519 <column alignment="left" valignment="top">
24521 <cell alignment="left" valignment="top" usebox="none">
24524 \begin_layout Plain Layout
24530 <cell alignment="left" valignment="top" usebox="none">
24533 \begin_layout Plain Layout
24539 <cell alignment="left" valignment="top" usebox="none">
24542 \begin_layout Plain Layout
24548 <cell alignment="left" valignment="top" usebox="none">
24551 \begin_layout Plain Layout
24557 <cell alignment="center" valignment="top" usebox="none">
24560 \begin_layout Plain Layout
24566 <cell alignment="center" valignment="top" usebox="none">
24569 \begin_layout Plain Layout
24575 <cell alignment="center" valignment="top" usebox="none">
24578 \begin_layout Plain Layout
24584 <cell alignment="center" valignment="top" usebox="none">
24587 \begin_layout Plain Layout
24595 <cell alignment="left" valignment="top" usebox="none">
24598 \begin_layout Plain Layout
24604 <cell alignment="left" valignment="top" usebox="none">
24607 \begin_layout Plain Layout
24613 <cell alignment="left" valignment="top" usebox="none">
24616 \begin_layout Plain Layout
24622 <cell alignment="left" valignment="top" usebox="none">
24625 \begin_layout Plain Layout
24631 <cell alignment="center" valignment="top" usebox="none">
24634 \begin_layout Plain Layout
24640 <cell alignment="center" valignment="top" usebox="none">
24643 \begin_layout Plain Layout
24649 <cell alignment="center" valignment="top" usebox="none">
24652 \begin_layout Plain Layout
24658 <cell alignment="center" valignment="top" usebox="none">
24661 \begin_layout Plain Layout
24669 <cell alignment="left" valignment="top" usebox="none">
24672 \begin_layout Plain Layout
24678 <cell alignment="left" valignment="top" usebox="none">
24681 \begin_layout Plain Layout
24687 <cell alignment="left" valignment="top" usebox="none">
24690 \begin_layout Plain Layout
24696 <cell alignment="left" valignment="top" usebox="none">
24699 \begin_layout Plain Layout
24705 <cell alignment="center" valignment="top" usebox="none">
24708 \begin_layout Plain Layout
24714 <cell alignment="center" valignment="top" usebox="none">
24717 \begin_layout Plain Layout
24723 <cell alignment="center" valignment="top" usebox="none">
24726 \begin_layout Plain Layout
24732 <cell alignment="center" valignment="top" usebox="none">
24735 \begin_layout Plain Layout
24743 <cell alignment="left" valignment="top" usebox="none">
24746 \begin_layout Plain Layout
24752 <cell alignment="left" valignment="top" usebox="none">
24755 \begin_layout Plain Layout
24761 <cell alignment="left" valignment="top" usebox="none">
24764 \begin_layout Plain Layout
24770 <cell alignment="left" valignment="top" usebox="none">
24773 \begin_layout Plain Layout
24779 <cell alignment="center" valignment="top" usebox="none">
24782 \begin_layout Plain Layout
24788 <cell alignment="center" valignment="top" usebox="none">
24791 \begin_layout Plain Layout
24797 <cell alignment="center" valignment="top" usebox="none">
24800 \begin_layout Plain Layout
24806 <cell alignment="center" valignment="top" usebox="none">
24809 \begin_layout Plain Layout
24817 <cell alignment="left" valignment="top" usebox="none">
24820 \begin_layout Plain Layout
24826 <cell alignment="left" valignment="top" usebox="none">
24829 \begin_layout Plain Layout
24835 <cell alignment="left" valignment="top" usebox="none">
24838 \begin_layout Plain Layout
24844 <cell alignment="left" valignment="top" usebox="none">
24847 \begin_layout Plain Layout
24853 <cell alignment="center" valignment="top" usebox="none">
24856 \begin_layout Plain Layout
24862 <cell alignment="center" valignment="top" usebox="none">
24865 \begin_layout Plain Layout
24871 <cell alignment="center" valignment="top" usebox="none">
24874 \begin_layout Plain Layout
24880 <cell alignment="center" valignment="top" usebox="none">
24883 \begin_layout Plain Layout
24891 <cell alignment="left" valignment="top" usebox="none">
24894 \begin_layout Plain Layout
24900 <cell alignment="left" valignment="top" usebox="none">
24903 \begin_layout Plain Layout
24909 <cell alignment="left" valignment="top" usebox="none">
24912 \begin_layout Plain Layout
24918 <cell alignment="left" valignment="top" usebox="none">
24921 \begin_layout Plain Layout
24927 <cell alignment="center" valignment="top" usebox="none">
24930 \begin_layout Plain Layout
24936 <cell alignment="center" valignment="top" usebox="none">
24939 \begin_layout Plain Layout
24945 <cell alignment="center" valignment="top" usebox="none">
24948 \begin_layout Plain Layout
24954 <cell alignment="center" valignment="top" usebox="none">
24957 \begin_layout Plain Layout
24965 <cell alignment="left" valignment="top" usebox="none">
24968 \begin_layout Plain Layout
24974 <cell alignment="left" valignment="top" usebox="none">
24977 \begin_layout Plain Layout
24983 <cell alignment="left" valignment="top" usebox="none">
24986 \begin_layout Plain Layout
24992 <cell alignment="left" valignment="top" usebox="none">
24995 \begin_layout Plain Layout
25001 <cell alignment="center" valignment="top" usebox="none">
25004 \begin_layout Plain Layout
25010 <cell alignment="center" valignment="top" usebox="none">
25013 \begin_layout Plain Layout
25019 <cell alignment="center" valignment="top" usebox="none">
25022 \begin_layout Plain Layout
25028 <cell alignment="center" valignment="top" usebox="none">
25031 \begin_layout Plain Layout
25039 <cell alignment="left" valignment="top" usebox="none">
25042 \begin_layout Plain Layout
25048 <cell alignment="left" valignment="top" usebox="none">
25051 \begin_layout Plain Layout
25057 <cell alignment="left" valignment="top" usebox="none">
25060 \begin_layout Plain Layout
25066 <cell alignment="left" valignment="top" usebox="none">
25069 \begin_layout Plain Layout
25075 <cell alignment="center" valignment="top" usebox="none">
25078 \begin_layout Plain Layout
25084 <cell alignment="center" valignment="top" usebox="none">
25087 \begin_layout Plain Layout
25093 <cell alignment="center" valignment="top" usebox="none">
25096 \begin_layout Plain Layout
25102 <cell alignment="center" valignment="top" usebox="none">
25105 \begin_layout Plain Layout
25113 <cell alignment="left" valignment="top" usebox="none">
25116 \begin_layout Plain Layout
25122 <cell alignment="left" valignment="top" usebox="none">
25125 \begin_layout Plain Layout
25131 <cell alignment="left" valignment="top" usebox="none">
25134 \begin_layout Plain Layout
25140 <cell alignment="left" valignment="top" usebox="none">
25143 \begin_layout Plain Layout
25149 <cell alignment="center" valignment="top" usebox="none">
25152 \begin_layout Plain Layout
25158 <cell alignment="center" valignment="top" usebox="none">
25161 \begin_layout Plain Layout
25167 <cell alignment="center" valignment="top" usebox="none">
25170 \begin_layout Plain Layout
25176 <cell alignment="center" valignment="top" usebox="none">
25179 \begin_layout Plain Layout
25187 <cell alignment="left" valignment="top" usebox="none">
25190 \begin_layout Plain Layout
25196 <cell alignment="left" valignment="top" usebox="none">
25199 \begin_layout Plain Layout
25205 <cell alignment="left" valignment="top" usebox="none">
25208 \begin_layout Plain Layout
25214 <cell alignment="left" valignment="top" usebox="none">
25217 \begin_layout Plain Layout
25223 <cell alignment="center" valignment="top" usebox="none">
25226 \begin_layout Plain Layout
25232 <cell alignment="center" valignment="top" usebox="none">
25235 \begin_layout Plain Layout
25241 <cell alignment="center" valignment="top" usebox="none">
25244 \begin_layout Plain Layout
25250 <cell alignment="center" valignment="top" usebox="none">
25253 \begin_layout Plain Layout
25261 <cell alignment="center" valignment="top" usebox="none">
25264 \begin_layout Plain Layout
25270 <cell alignment="center" valignment="top" usebox="none">
25273 \begin_layout Plain Layout
25279 <cell alignment="center" valignment="top" usebox="none">
25282 \begin_layout Plain Layout
25288 <cell alignment="center" valignment="top" usebox="none">
25291 \begin_layout Plain Layout
25297 <cell alignment="center" valignment="top" usebox="none">
25300 \begin_layout Plain Layout
25306 <cell alignment="center" valignment="top" usebox="none">
25309 \begin_layout Plain Layout
25315 <cell alignment="center" valignment="top" usebox="none">
25318 \begin_layout Plain Layout
25324 <cell alignment="center" valignment="top" usebox="none">
25327 \begin_layout Plain Layout
25341 \begin_layout Chapter
25342 Names of available colors to be used in layouts
25343 \begin_inset CommandInset label
25345 name "chap:Names-of-colors"
25352 \begin_layout Standard
25353 The colors listed here are the standard colors and the those that you can
25354 adjust in the \SpecialChar LyX
25358 \begin_layout Description
25371 No particular color – clear or default
25374 \begin_layout Description
25378 \begin_layout Description
25382 \begin_layout Description
25386 \begin_layout Description
25390 \begin_layout Description
25394 \begin_layout Description
25398 \begin_layout Description
25402 \begin_layout Description
25406 \begin_layout Description
25407 added_space Added space marker color
25410 \begin_layout Description
25411 addedtext Added text color
25414 \begin_layout Description
25415 appendix Appendix marker color
25418 \begin_layout Description
25419 background Background color
25422 \begin_layout Description
25423 bottomarea Bottom area color
25426 \begin_layout Description
25427 branchlabel Label color for branches
25430 \begin_layout Description
25431 buttonbg Color used for button background
25434 \begin_layout Description
25435 buttonhoverbg Color used for button background under focus
25438 \begin_layout Description
25439 buttonframe Color for inset button frames
25442 \begin_layout Description
25443 changebar Changebar color
25446 \begin_layout Description
25447 changedtextauthor1 Changed text color author 1
25450 \begin_layout Description
25451 changedtextauthor2 Changed text color author 2
25454 \begin_layout Description
25455 changedtextauthor3 Changed text color author 3
25458 \begin_layout Description
25459 changedtextauthor4 Changed text color author 4
25462 \begin_layout Description
25463 changedtextauthor5 Changed text color author 5
25466 \begin_layout Description
25467 collapsable_inset_frame Collapsable insets framecolor
25470 \begin_layout Description
25471 collapsable_inset_text Collapsable insets text color
25474 \begin_layout Description
25475 command Text color for command insets
25478 \begin_layout Description
25479 commandbg Background color for command insets
25482 \begin_layout Description
25483 commandframe Frame color for command insets
25486 \begin_layout Description
25487 comment color for comments
25490 \begin_layout Description
25491 commentbg Background color of comments
25494 \begin_layout Description
25495 cursor Cursor color
25498 \begin_layout Description
25499 deletedtext Deleted text color
25502 \begin_layout Description
25503 deletedtextmodifier Deleted text modifying color
25506 \begin_layout Description
25507 depthbar Color for the depth bars in the margin
25510 \begin_layout Description
25511 eolmarker End of line marker color
25514 \begin_layout Description
25515 error Color of the \SpecialChar LaTeX
25519 \begin_layout Description
25520 footlabel Label color for footnotes
25523 \begin_layout Description
25524 graphicsbg Graphics inset background color
25527 \begin_layout Description
25528 greyedout Label color for greyedout insets
25531 \begin_layout Description
25532 greyedoutbg Background color of greyedout inset
25535 \begin_layout Description
25536 greyedouttext Color for greyedout inset text
25539 \begin_layout Description
25540 indexlabel Label color for index insets
25543 \begin_layout Description
25544 ignore The color is ignored
25547 \begin_layout Description
25548 inherit The color is inherited
25551 \begin_layout Description
25552 inlinecompletion Inline completion color
25555 \begin_layout Description
25556 insetbg Inset marker background color
25559 \begin_layout Description
25560 insetframe Inset marker frame color
25563 \begin_layout Description
25564 language Color for marking foreign language words
25567 \begin_layout Description
25568 latex Text color in \SpecialChar LaTeX
25572 \begin_layout Description
25573 listingsbg Background color of listings inset
25576 \begin_layout Description
25577 marginlabel Label color for margin notes
25580 \begin_layout Description
25581 math Math inset text color
25584 \begin_layout Description
25585 mathbg Math inset background color
25588 \begin_layout Description
25589 mathcorners Math inset frame color not under focus
25592 \begin_layout Description
25593 mathframe Math inset frame color under focus
25596 \begin_layout Description
25597 mathline Math line color
25600 \begin_layout Description
25601 mathmacrobg Macro math inset background color
25604 \begin_layout Description
25605 mathmacroblend Macro math blended color
25608 \begin_layout Description
25609 mathmacroframe Macro math frame color
25612 \begin_layout Description
25613 mathmacrohoverbg Macro math inset background color hovered
25616 \begin_layout Description
25617 mathmacrolabel Macro math label color
25620 \begin_layout Description
25621 mathmacronewarg Macro template color for new parameters
25624 \begin_layout Description
25625 mathmacrooldarg Macro template color for old parameters
25628 \begin_layout Description
25629 newpage New page color
25632 \begin_layout Description
25633 nonunique_inlinecompletion Inline completion color for the non-unique part
25636 \begin_layout Description
25637 notebg Background color of notes
25640 \begin_layout Description
25641 notelabel Label color for notes
25644 \begin_layout Description
25645 pagebreak Page break/line break color
25648 \begin_layout Description
25649 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25652 \begin_layout Description
25653 phantomtext Text color for phantom insets
25656 \begin_layout Description
25657 preview The color used for previews
25660 \begin_layout Description
25661 previewframe Preview frame color
25664 \begin_layout Description
25665 regexpframe Color for regexp frame
25668 \begin_layout Description
25669 selection Background color of selected text
25672 \begin_layout Description
25673 selectiontext Foreground color of selected text
25676 \begin_layout Description
25677 shadedbg Background color of shaded box
25680 \begin_layout Description
25681 special Special chars text color
25684 \begin_layout Description
25685 tabularline Table line color
25688 \begin_layout Description
25689 tabularonoffline Table line color
25692 \begin_layout Description
25693 urllabel Label color for URL insets
25696 \begin_layout Description
25697 urltext Color for URL inset text