1 #LyX 2.3 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
61 \default_output_format pdf2
63 \bibtex_command default
64 \index_command default
68 \pdf_title "LyX Configuration Manual"
69 \pdf_author "LyX Team"
70 \pdf_subject "LyX-documentation Customization"
71 \pdf_keywords "LyX, documentation, customization"
73 \pdf_bookmarksnumbered true
74 \pdf_bookmarksopen true
75 \pdf_bookmarksopenlevel 1
80 \pdf_pdfusetitle false
81 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
84 \use_package amsmath 0
85 \use_package amssymb 0
88 \use_package mathdots 1
89 \use_package mathtools 0
91 \use_package stackrel 0
92 \use_package stmaryrd 0
93 \use_package undertilde 0
95 \cite_engine_type default
99 \paperorientation portrait
103 \notefontcolor #0000ff
115 \paragraph_separation indent
116 \paragraph_indentation default
117 \quotes_language english
120 \paperpagestyle headings
121 \tracking_changes true
122 \output_changes false
126 \author 424524441 "rgheck"
132 Customizing \SpecialChar LyX
133 : Features for the Advanced User
137 by the \SpecialChar LyX
142 \begin_layout Plain Layout
144 If you have comments or error corrections, please send them to the \SpecialChar LyX
147 \begin_inset CommandInset href
149 target "lyx-docs@lists.lyx.org"
156 \begin_inset Quotes eld
160 \begin_inset Quotes erd
163 in the subject header, and please cc the current maintainer of this file,
164 Richard Heck <rgheck@comcast.net>.
170 \begin_inset Newline newline
174 \begin_inset Newline newline
180 \begin_layout Standard
181 \begin_inset CommandInset toc
182 LatexCommand tableofcontents
189 \begin_layout Standard
190 \begin_inset Note Note
193 \begin_layout Plain Layout
194 Please use change tracking when modifying this document.
195 This makes it easier for our translators to recognize things that have
196 been changed, and it helps the maintainer keep up-to-date with what's been
205 \begin_layout Chapter
209 \begin_layout Standard
210 This manual covers the customization features present in \SpecialChar LyX
212 In it, we discuss issues like keyboard shortcuts, screen previewing options,
213 printer options, sending commands to \SpecialChar LyX
214 via the \SpecialChar LyX
215 Server, internationalization,
216 installing new \SpecialChar LaTeX
217 classes and \SpecialChar LyX
219 We can't possibly hope to touch on everything you can change—our developers
220 add new features faster than we can document them—but we will explain the
221 most common customizations and hopefully point you in the right direction
222 for some of the more obscure ones.
225 \begin_layout Standard
226 \begin_inset Branch OutDated
230 \begin_layout Standard
231 Information from previous versions of this document that now seems to be
232 outdated is contained in the OutDated branch of this document.
233 By default, this information will not appear in the \SpecialChar LaTeX
242 \begin_layout Chapter
247 \begin_layout Standard
248 This chapter aims to help you to find your way through the \SpecialChar LyX
251 Before continuing to read this chapter, you should find out where your
253 library and user directories are by using
254 \begin_inset Flex Noun
257 \begin_layout Plain Layout
258 Help\SpecialChar menuseparator
269 The library directory is the place where \SpecialChar LyX
270 places its system-wide configuration
271 files; the user directory is where you can place your modified versions.
272 We will call the former
273 \begin_inset Flex Code
276 \begin_layout Plain Layout
283 \begin_inset Flex Noun
286 \begin_layout Plain Layout
292 in the remainder of this document.
296 \begin_layout Section
298 \begin_inset Flex Code
301 \begin_layout Plain Layout
310 \begin_layout Standard
311 \begin_inset Flex Code
314 \begin_layout Plain Layout
320 and its sub-directories contain a number of files and that can be used
321 to customize \SpecialChar LyX
323 You can change many of these files from within \SpecialChar LyX
325 \begin_inset Flex Noun
328 \begin_layout Plain Layout
329 Tools\SpecialChar menuseparator
336 Most customization that you will want to do in \SpecialChar LyX
337 is possible through this
339 However, many other inner aspects of \SpecialChar LyX
340 can be customized by modifying the
342 \begin_inset Flex Code
345 \begin_layout Plain Layout
352 These files fall in different categories, described in the following subsection
356 \begin_layout Subsection
357 Automatically generated files
360 \begin_layout Standard
361 The files, which are to be found in
362 \begin_inset Flex Noun
365 \begin_layout Plain Layout
371 , are generated when you configure \SpecialChar LyX
373 They contain various default values that are guessed by inspection.
374 In general, it is not a good idea to modify them, since they might be overwritt
378 \begin_layout Labeling
379 \labelwidthstring 00.00.0000
380 \begin_inset Flex Code
383 \begin_layout Plain Layout
389 contains defaults for various commands.
392 \begin_layout Labeling
393 \labelwidthstring 00.00.0000
394 \begin_inset Flex Code
397 \begin_layout Plain Layout
403 contains the list of packages that have been recognized by \SpecialChar LyX
405 It is currently unused by the \SpecialChar LyX
406 program itself, but the information extracted,
407 and more, is made available with
408 \begin_inset Flex Noun
411 \begin_layout Plain Layout
412 Help\SpecialChar menuseparator
426 \begin_layout Labeling
427 \labelwidthstring 00.00.0000
428 \begin_inset Flex Code
431 \begin_layout Plain Layout
437 the list of text classes that have been found in your
438 \begin_inset Flex Code
441 \begin_layout Plain Layout
447 directories, along with the associated \SpecialChar LaTeX
448 document class and their description.
451 \begin_layout Labeling
452 \labelwidthstring 00.00.0000
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 the list of layout modules found in your
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
475 \begin_layout Labeling
476 \labelwidthstring 00.00.0000
477 \begin_inset Flex Code
480 \begin_layout Plain Layout
486 lists of various sorts of \SpecialChar LaTeX
487 -related files found on your system
490 \begin_layout Labeling
491 \labelwidthstring 00.00.0000
492 \begin_inset Flex Code
495 \begin_layout Plain Layout
496 doc/\SpecialChar LaTeX
502 is automatically generated during configuration from the file
503 \begin_inset Flex Code
506 \begin_layout Plain Layout
514 It contains information on your \SpecialChar LaTeX
518 \begin_layout Subsection
522 \begin_layout Standard
523 These directories are duplicated between
524 \begin_inset Flex Code
527 \begin_layout Plain Layout
534 \begin_inset Flex Code
537 \begin_layout Plain Layout
544 If a particular files exists in both places, the one in
545 \begin_inset Flex Code
548 \begin_layout Plain Layout
557 \begin_layout Labeling
558 \labelwidthstring 00.00.0000
559 \begin_inset Flex Code
562 \begin_layout Plain Layout
568 this directory contains files with the extension
569 \begin_inset Flex Code
572 \begin_layout Plain Layout
578 that define the keybindings used in \SpecialChar LyX
580 If there exists an internationalized version of the bind file named
581 \begin_inset Flex Code
584 \begin_layout Plain Layout
590 , that will be used first.
593 \begin_layout Labeling
594 \labelwidthstring 00.00.0000
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
604 contains graphics files that can be included in documents.
608 \begin_layout Labeling
609 \labelwidthstring 00.00.0000
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 contains \SpecialChar LyX
620 documentation files (including the one you are currently reading).
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
632 deserves special attention, as noted above.
633 The internationalized help docs are in subdirectories
634 \begin_inset Flex Code
637 \begin_layout Plain Layout
644 \begin_inset Quotes eld
648 \begin_inset Quotes erd
651 is the ISO language code.
653 \begin_inset CommandInset ref
655 reference "cha:Internationalizing-LyX"
662 \begin_layout Labeling
663 \labelwidthstring 00.00.0000
664 \begin_inset Flex Code
667 \begin_layout Plain Layout
673 contains example files that explain how to use some features.
674 In the file browser, press the
675 \begin_inset Flex Noun
678 \begin_layout Plain Layout
687 \begin_layout Labeling
688 \labelwidthstring 00.00.0000
689 \begin_inset Flex Code
692 \begin_layout Plain Layout
698 contains image files that are used by the
699 \begin_inset Flex Noun
702 \begin_layout Plain Layout
709 In addition, it also contains the individual icons used in the toolbar
710 and the banners that can be shown when \SpecialChar LyX
714 \begin_layout Labeling
715 \labelwidthstring 00.00.0000
716 \begin_inset Flex Code
719 \begin_layout Plain Layout
725 contains keyboard keymapping files.
727 \begin_inset CommandInset ref
729 reference "sec:International-Keymap-Stuff"
736 \begin_layout Labeling
737 \labelwidthstring 00.00.0000
738 \begin_inset Flex Code
741 \begin_layout Plain Layout
747 contains the text class and module files described in
748 \begin_inset CommandInset ref
750 reference "cha:Installing-New-Document"
757 \begin_layout Labeling
758 \labelwidthstring 00.00.0000
759 \begin_inset Flex Code
762 \begin_layout Plain Layout
769 \begin_inset Flex Code
772 \begin_layout Plain Layout
778 Python scripts used to convert between \SpecialChar LyX
780 These can be run from the command line if, say, you want to batch-convert
784 \begin_layout Labeling
785 \labelwidthstring 00.00.0000
786 \begin_inset Flex Code
789 \begin_layout Plain Layout
795 contains some files that demonstrate the capabilities of the
796 \begin_inset Flex Noun
799 \begin_layout Plain Layout
810 Also contains some scripts used by \SpecialChar LyX
814 \begin_layout Labeling
815 \labelwidthstring 00.00.0000
816 \begin_inset Flex Code
819 \begin_layout Plain Layout
825 contains the standard \SpecialChar LyX
826 template files described in
827 \begin_inset CommandInset ref
829 reference "subsec:Creating-Templates"
836 \begin_layout Labeling
837 \labelwidthstring 00.00.0000
838 \begin_inset Flex Code
841 \begin_layout Plain Layout
847 contains files with the extension
848 \begin_inset Flex Code
851 \begin_layout Plain Layout
857 that define the user interface to \SpecialChar LyX
859 That is, the files define which items appear in which menus and the items
860 appearing on the toolbar.
863 \begin_layout Subsection
864 Files you don't want to modify
867 \begin_layout Standard
868 These files are used internally by \SpecialChar LyX
869 and you generally do not need to modify
870 them unless you are a developer.
873 \begin_layout Labeling
874 \labelwidthstring 00.00.0000
875 \begin_inset Flex Code
878 \begin_layout Plain Layout
884 this file contains the list of \SpecialChar LyX
886 The contents are displayed with the menu entry
887 \begin_inset Flex Noun
890 \begin_layout Plain Layout
891 Help\SpecialChar menuseparator
904 \begin_layout Labeling
905 \labelwidthstring 00.00.0000
906 \begin_inset Flex Code
909 \begin_layout Plain Layout
915 this is a \SpecialChar LaTeX
916 script used during the configuration process.
920 \begin_layout Labeling
921 \labelwidthstring 00.00.0000
922 \begin_inset Flex Code
925 \begin_layout Plain Layout
931 this is a Python script that is used to re-configure \SpecialChar LyX
933 It creates configuration files in the directory it was run from.
936 \begin_layout Subsection
937 Other files needing a line or two
940 \begin_layout Labeling
941 \labelwidthstring 00.00.0000
942 \begin_inset Flex Code
945 \begin_layout Plain Layout
951 this contains tables describing how different character encodings can be
955 \begin_layout Labeling
956 \labelwidthstring 00.00.0000
957 \begin_inset Flex Code
960 \begin_layout Plain Layout
966 this file contains the templates available to the new
967 \begin_inset Flex Noun
970 \begin_layout Plain Layout
981 \begin_inset CommandInset ref
983 reference "chap:Including-External-Material"
990 \begin_layout Labeling
991 \labelwidthstring 00.00.0000
992 \begin_inset Flex Code
995 \begin_layout Plain Layout
1001 this file contains a list of all the languages currently supported by \SpecialChar LyX
1005 \begin_layout Labeling
1006 \labelwidthstring 00.00.0000
1007 \begin_inset Flex Code
1010 \begin_layout Plain Layout
1016 contains information about the supported fonts.
1019 \begin_layout Labeling
1020 \labelwidthstring 00.00.0000
1021 \begin_inset Flex Code
1024 \begin_layout Plain Layout
1030 this file contains translations for internationalized paragraph styles
1032 \begin_inset CommandInset ref
1034 reference "subsec:I18n"
1041 \begin_layout Labeling
1042 \labelwidthstring 00.00.0000
1043 \begin_inset Flex Code
1046 \begin_layout Plain Layout
1052 this file contains information about unicode-encoded glyphs and the way
1053 they are supported by \SpecialChar LyX
1054 via \SpecialChar LaTeX
1058 \begin_layout Section
1059 Your local configuration directory
1062 \begin_layout Standard
1063 Even if you are using \SpecialChar LyX
1064 as an unprivileged user, you might want to change
1066 configuration for your own use.
1068 \begin_inset Flex Code
1071 \begin_layout Plain Layout
1077 directory contains all your personal configuration files.
1078 This is the directory described as
1079 \begin_inset Quotes eld
1083 \begin_inset Quotes erd
1087 \begin_inset Flex Noun
1090 \begin_layout Plain Layout
1091 Help\SpecialChar menuseparator
1093 \begin_inset space ~
1102 This directory is used as a mirror of
1103 \begin_inset Flex Code
1106 \begin_layout Plain Layout
1112 , which means that every file in
1113 \begin_inset Flex Code
1116 \begin_layout Plain Layout
1122 is a replacement for the corresponding file in
1123 \begin_inset Flex Code
1126 \begin_layout Plain Layout
1133 Any configuration file described in the above sections can be placed either
1134 in the system-wide directory, in which case it will affect all users, or
1135 in your local directory for your own use.
1138 \begin_layout Standard
1139 To make things clearer, let's provide a few examples:
1142 \begin_layout Itemize
1143 The preferences set in the
1144 \begin_inset Flex Noun
1147 \begin_layout Plain Layout
1148 Tools\SpecialChar menuseparator
1154 dialog are saved to a file
1155 \begin_inset Flex Code
1158 \begin_layout Plain Layout
1165 \begin_inset Flex Code
1168 \begin_layout Plain Layout
1177 \begin_layout Itemize
1178 When you reconfigure using
1179 \begin_inset Flex Noun
1182 \begin_layout Plain Layout
1183 Tools\SpecialChar menuseparator
1191 \begin_inset Flex Code
1194 \begin_layout Plain Layout
1200 script, and the resulting files are written in your local configuration
1202 This means that any additional text class file that you might have added
1204 \begin_inset Flex Code
1207 \begin_layout Plain Layout
1213 will be added to the list of classes in the
1214 \begin_inset Flex Noun
1217 \begin_layout Plain Layout
1218 Document\SpecialChar menuseparator
1227 \begin_layout Itemize
1228 If you get some updated documentation from \SpecialChar LyX
1229 ftp site and cannot install
1230 it because you do not have sysadmin rights on your system, you can just
1232 \begin_inset Flex Code
1235 \begin_layout Plain Layout
1241 and the items in the
1242 \begin_inset Flex Noun
1245 \begin_layout Plain Layout
1251 menu will open them!
1254 \begin_layout Section
1255 Running \SpecialChar LyX
1256 with multiple configurations
1259 \begin_layout Standard
1260 The configuration freedom of the local configuration directory may not suffice
1261 if you want to have more than one configuration at your disposal.
1262 For example, you may want to be use different key bindings or printer settings
1264 You can achieve this by having several such directories.
1265 You then specify which directory to use at run-time.
1268 \begin_layout Standard
1269 Invoking \SpecialChar LyX
1270 with the command line switch
1271 \begin_inset Flex Code
1274 \begin_layout Plain Layout
1284 instructs the program to read the configuration from that directory, and
1285 not from the default directory.
1286 (You can determine the default directory by running \SpecialChar LyX
1288 \begin_inset Flex Code
1291 \begin_layout Plain Layout
1297 switch.) If the specified directory does not exist, \SpecialChar LyX
1299 for you, just like it does for the default directory on the first time
1300 you run the program.
1301 You can modify the configuration options in this additional user directory
1302 exactly as you would for the default directory.
1303 These directories are completely independent (but read on).
1304 Note that setting the environment variable
1305 \begin_inset Flex Code
1308 \begin_layout Plain Layout
1314 to some value has exactly the same effect.
1317 \begin_layout Standard
1318 Having several configurations also requires more maintenance: if you want
1319 to add a new layout to
1320 \begin_inset Flex Code
1323 \begin_layout Plain Layout
1329 which you want available from all your configurations, you must add it
1330 to each directory separately.
1331 You can avoid this with the following trick: after \SpecialChar LyX
1332 creates the additional
1333 directory, most of the subdirectories (see above) are empty.
1334 If you want the new configuration to mirror an existing one, replace the
1335 empty subdirectory with a symbolic link to the matching subdirectory in
1336 the existing configuration.
1338 \begin_inset Flex Code
1341 \begin_layout Plain Layout
1347 subdirectory, however, since it contains a file written by the configuration
1348 script (also accessible through
1349 \begin_inset Flex Noun
1352 \begin_layout Plain Layout
1353 Tools\SpecialChar menuseparator
1359 ) which is configuration-specific.
1362 \begin_layout Chapter
1363 The Preferences dialog
1366 \begin_layout Standard
1367 All options of the preferences dialog are described in the Appendix
1369 The Preferences Dialog
1376 For some options you might find here more details.
1379 \begin_layout Section
1381 \begin_inset CommandInset label
1390 \begin_layout Standard
1391 The first step is to define your file formats if they are not already defined.
1393 \begin_inset Flex Noun
1396 \begin_layout Plain Layout
1397 Tools\SpecialChar menuseparator
1405 \begin_inset Flex Noun
1408 \begin_layout Plain Layout
1409 File Handling\SpecialChar menuseparator
1416 \begin_inset Flex Noun
1419 \begin_layout Plain Layout
1425 button to define your new format.
1427 \begin_inset Flex Noun
1430 \begin_layout Plain Layout
1436 field contains the name used to identify the format in the GUI.
1438 \begin_inset Flex Noun
1441 \begin_layout Plain Layout
1447 is used to identify the format internally.
1448 You will also need to enter a file extension.
1449 These are all required.
1451 \begin_inset Flex Noun
1454 \begin_layout Plain Layout
1460 field is used to provide a keyboard shortcut on the menus.
1461 (For example, pressing
1462 \begin_inset Flex Noun
1465 \begin_layout Plain Layout
1472 \begin_inset Flex Noun
1475 \begin_layout Plain Layout
1476 Document\SpecialChar menuseparator
1477 View (Other Formats)\SpecialChar menuseparator
1486 \begin_layout Standard
1488 \begin_inset Flex Noun
1491 \begin_layout Plain Layout
1498 \begin_inset Flex Noun
1501 \begin_layout Plain Layout
1508 For example, you might want to use
1509 \begin_inset Flex Noun
1512 \begin_layout Plain Layout
1518 to view PostScript files.
1519 You can enter the command needed to start the program in the corresponding
1521 In defining this command, you can use the four variables listed in the
1523 The viewer is launched when you view an image in \SpecialChar LyX
1525 \begin_inset Flex Noun
1528 \begin_layout Plain Layout
1529 Document\SpecialChar menuseparator
1536 The editor is for example launched when you right-click on an image and
1538 \begin_inset Flex Noun
1541 \begin_layout Plain Layout
1547 in the appearing context menu.
1550 \begin_layout Standard
1552 \begin_inset Flex Noun
1555 \begin_layout Plain Layout
1561 type of a format is optional, but if it is specified, it must be unique
1563 It is used to detect files of this format from the file contents.
1564 For some important file formats there is no MIME type officially registered
1566 \begin_inset CommandInset href
1569 target "http://www.iana.org/assignments/media-types/"
1574 Therefore \SpecialChar LyX
1575 uses the extended list of MIME types as specified by
1576 \begin_inset CommandInset href
1578 name "freedesktop.org"
1579 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1586 \begin_layout Standard
1588 \begin_inset Flex Noun
1591 \begin_layout Plain Layout
1597 option tells \SpecialChar LyX
1598 that a format is suitable for document export.
1599 If this is set and if a suitable conversion route exists (see
1600 \begin_inset CommandInset ref
1602 reference "sec:Converters"
1606 ), the format will appear in the
1607 \begin_inset Flex Noun
1610 \begin_layout Plain Layout
1611 File\SpecialChar menuseparator
1618 The format will also appear in the
1619 \begin_inset Flex Noun
1622 \begin_layout Plain Layout
1623 Document\SpecialChar menuseparator
1629 menu if a viewer is specified for the format.
1630 Pure image formats, such as
1631 \begin_inset Flex Code
1634 \begin_layout Plain Layout
1640 , should not use this option.
1641 Formats that can both represent vector graphics and documents like
1642 \begin_inset Flex Code
1645 \begin_layout Plain Layout
1654 \begin_layout Standard
1656 \begin_inset Flex Noun
1659 \begin_layout Plain Layout
1660 Vector graphics format
1665 tells \SpecialChar LyX
1666 that a format can contain vector graphics.
1667 This information is used to determine the target format of included graphics
1669 \begin_inset Flex Noun
1672 \begin_layout Plain Layout
1679 Included graphics may need to be converted to either
1680 \begin_inset Flex Noun
1683 \begin_layout Plain Layout
1690 \begin_inset Flex Noun
1693 \begin_layout Plain Layout
1700 \begin_inset Flex Noun
1703 \begin_layout Plain Layout
1710 \begin_inset Flex Noun
1713 \begin_layout Plain Layout
1719 cannot handle other image formats.
1720 If an included graphic is not already in
1721 \begin_inset Flex Noun
1724 \begin_layout Plain Layout
1731 \begin_inset Flex Noun
1734 \begin_layout Plain Layout
1741 \begin_inset Flex Noun
1744 \begin_layout Plain Layout
1750 format, it is converted to
1751 \begin_inset Flex Noun
1754 \begin_layout Plain Layout
1760 if the vector format option is set, and otherwise to
1761 \begin_inset Flex Noun
1764 \begin_layout Plain Layout
1773 \begin_layout Section
1777 \begin_layout Standard
1778 Since all conversions from one format to another take place in \SpecialChar LyX
1780 directory, it is sometimes necessary to modify a file before copying it
1781 to the temporary directory in order that the conversion may be performed.
1785 \begin_layout Plain Layout
1786 For example, the file may refer to other files—images, for example—using
1787 relative file names, and these may become invalid when the file is copied
1788 to the temporary directory.
1793 This is done by a Copier: It copies a file to (or from) the temporary directory
1794 and may modify it in the process.
1797 \begin_layout Standard
1798 The definitions of the copiers may use eight variables:
1801 \begin_layout Labeling
1802 \labelwidthstring 00.00.0000
1803 \begin_inset Flex Code
1806 \begin_layout Plain Layout
1812 The \SpecialChar LyX
1813 system directory (e.
1814 \begin_inset space \thinspace{}
1818 \begin_inset space \space{}
1822 \begin_inset Flex Noun
1825 \begin_layout Plain Layout
1834 \begin_layout Labeling
1835 \labelwidthstring 00.00.0000
1836 \begin_inset Flex Code
1839 \begin_layout Plain Layout
1848 \begin_layout Labeling
1849 \labelwidthstring 00.00.0000
1850 \begin_inset Flex Code
1853 \begin_layout Plain Layout
1862 \begin_layout Labeling
1863 \labelwidthstring 00.00.0000
1864 \begin_inset Flex Code
1867 \begin_layout Plain Layout
1873 The base name (without filename extension) in the \SpecialChar LyX
1877 \begin_layout Labeling
1878 \labelwidthstring 00.00.0000
1879 \begin_inset Flex Code
1882 \begin_layout Plain Layout
1888 The full directory path of the \SpecialChar LyX
1892 \begin_layout Labeling
1893 \labelwidthstring 00.00.0000
1894 \begin_inset Flex Code
1897 \begin_layout Plain Layout
1903 The full pathname to the original \SpecialChar LyX
1904 file being processed
1907 \begin_layout Labeling
1908 \labelwidthstring 00.00.0000
1909 \begin_inset Flex Code
1912 \begin_layout Plain Layout
1918 The filename (without any directory path) of the \SpecialChar LyX
1922 \begin_layout Labeling
1923 \labelwidthstring 00.00.0000
1924 \begin_inset Flex Code
1927 \begin_layout Plain Layout
1933 The `\SpecialChar LaTeX
1937 \begin_layout Standard
1938 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1946 It is relevant only when exporting files suitable for such inclusion.
1949 \begin_layout Standard
1950 Copiers can be used to do almost anything with output files.
1951 For example, suppose you want generated pdf files to be copied to a special
1953 \begin_inset Flex Code
1956 \begin_layout Plain Layout
1963 Then you could write a shell script such as this one:
1966 \begin_layout Standard
1967 \begin_inset listings
1971 \begin_layout Plain Layout
1976 \begin_layout Plain Layout
1981 \begin_layout Plain Layout
1983 TOFILE=`basename $2`
1986 \begin_layout Plain Layout
1988 cp $FROMFILE /home/you/pdf/$TOFILE
1993 Save it in your local \SpecialChar LyX
1995 \begin_inset Flex Code
1998 \begin_layout Plain Layout
1999 /home/you/.lyx/scripts/pdfcopier.sh
2004 —and make it executable, if you need to do so on your platform.
2006 \begin_inset Flex Noun
2009 \begin_layout Plain Layout
2010 Tools\SpecialChar menuseparator
2016 dialog, select under
2017 \begin_inset Flex Noun
2020 \begin_layout Plain Layout
2021 File Handling\SpecialChar menuseparator
2028 \begin_inset Flex Noun
2031 \begin_layout Plain Layout
2037 format—or one of the other pdf formats—and enter
2038 \begin_inset Flex Code
2041 \begin_layout Plain Layout
2042 pdfcopier.sh $$i $$o
2048 \begin_inset Flex Noun
2051 \begin_layout Plain Layout
2061 \begin_layout Standard
2062 Copiers are used by \SpecialChar LyX
2063 in various of its own conversions.
2064 For example, if appropriate programs are found, \SpecialChar LyX
2065 will automatically install
2067 \begin_inset Flex Noun
2070 \begin_layout Plain Layout
2077 \begin_inset Flex Noun
2080 \begin_layout Plain Layout
2082 \begin_inset space ~
2091 When these formats are exported, the copier sees that not just the main
2092 HTML file but various associated files (style files, images, etc.) are also
2094 All these files are written to a subdirectory of the directory in which
2095 the original \SpecialChar LyX
2100 \begin_layout Plain Layout
2101 This copier can be customized.
2103 \begin_inset Quotes eld
2107 \begin_inset Quotes erd
2110 argument takes a comma-separated list of extensions to be copied; if it
2111 is omitted, all files will be copied.
2113 \begin_inset Quotes eld
2117 \begin_inset Quotes erd
2120 argument determines the extension added to the generated directory.
2122 \begin_inset Quotes eld
2126 \begin_inset Flex Noun
2129 \begin_layout Plain Layout
2136 \begin_inset Quotes erd
2139 , so HTML generated from
2140 \begin_inset Flex Noun
2143 \begin_layout Plain Layout
2144 /path/to/filename.lyx
2150 \begin_inset Flex Noun
2153 \begin_layout Plain Layout
2154 /path/to/filename.html.LyXconv
2168 \begin_layout Section
2170 \begin_inset CommandInset label
2172 name "sec:Converters"
2179 \begin_layout Standard
2180 You can define your own Converters to convert files between different formats.
2182 \begin_inset Flex Noun
2185 \begin_layout Plain Layout
2186 Tools\SpecialChar menuseparator
2187 Preferences\SpecialChar menuseparator
2188 File Handling\SpecialChar menuseparator
2197 \begin_layout Standard
2198 To define a new converter, select the
2199 \begin_inset Flex Noun
2202 \begin_layout Plain Layout
2204 \begin_inset space ~
2213 \begin_inset Flex Noun
2216 \begin_layout Plain Layout
2218 \begin_inset space ~
2226 from the drop-down lists, enter the command needed for the conversion,
2228 \begin_inset Flex Noun
2231 \begin_layout Plain Layout
2238 Several variables can be used in the definition of converters:
2241 \begin_layout Labeling
2242 \labelwidthstring 00.00.0000
2243 \begin_inset Flex Code
2246 \begin_layout Plain Layout
2252 The \SpecialChar LyX
2256 \begin_layout Labeling
2257 \labelwidthstring 00.00.0000
2258 \begin_inset Flex Code
2261 \begin_layout Plain Layout
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex Code
2275 \begin_layout Plain Layout
2284 \begin_layout Labeling
2285 \labelwidthstring 00.00.0000
2286 \begin_inset Flex Code
2289 \begin_layout Plain Layout
2295 The base filename of the input file (i.
2296 \begin_inset space \thinspace{}
2299 g., without the extension)
2302 \begin_layout Labeling
2303 \labelwidthstring 00.00.0000
2304 \begin_inset Flex Code
2307 \begin_layout Plain Layout
2313 The path to the input file
2316 \begin_layout Labeling
2317 \labelwidthstring 00.00.0000
2318 \begin_inset Flex Code
2321 \begin_layout Plain Layout
2327 The path to the original input file (this is different from $$p when a
2328 chain of converters is called)
2331 \begin_layout Labeling
2332 \labelwidthstring 00.00.0000
2333 \begin_inset Flex Code
2336 \begin_layout Plain Layout
2342 The iconv name for the encoding of the document.
2345 \begin_layout Standard
2347 \begin_inset Flex Noun
2350 \begin_layout Plain Layout
2352 \begin_inset space ~
2360 field you can enter the following flags, separated by commas:
2363 \begin_layout Labeling
2364 \labelwidthstring 00.00.0000
2365 \begin_inset Flex Code
2368 \begin_layout Plain Layout
2374 This converter runs some form of \SpecialChar LaTeX
2376 This will make \SpecialChar LyX
2377 's \SpecialChar LaTeX
2378 error logs available.
2381 \begin_layout Labeling
2382 \labelwidthstring 00.00.0000
2383 \begin_inset Flex Code
2386 \begin_layout Plain Layout
2392 Needs the \SpecialChar LaTeX
2394 \begin_inset Flex Noun
2397 \begin_layout Plain Layout
2403 file for the conversion.
2406 \begin_layout Labeling
2407 \labelwidthstring 00.00.0000
2408 \begin_inset Flex Code
2411 \begin_layout Plain Layout
2418 \begin_inset Quotes eld
2422 \begin_inset Quotes erd
2425 file from the backend, which in practice means a \SpecialChar LaTeX
2426 file like the one we
2427 would export, without
2428 \begin_inset Flex Code
2431 \begin_layout Plain Layout
2440 \begin_layout Labeling
2441 \labelwidthstring 00.00.0000
2442 \begin_inset Flex Code
2445 \begin_layout Plain Layout
2454 \begin_layout Standard
2455 The following three flags are not really flags at all because they take
2457 \begin_inset Flex Noun
2460 \begin_layout Plain Layout
2462 \begin_inset space ~
2466 \begin_inset space ~
2477 \begin_layout Labeling
2478 \labelwidthstring 00.00.0000
2479 \begin_inset Flex Code
2482 \begin_layout Plain Layout
2488 If set, the converter's standard error will be redirected to a file
2489 \begin_inset Flex Code
2492 \begin_layout Plain Layout
2498 , and the script given as argument will be run as:
2499 \begin_inset Flex Code
2502 \begin_layout Plain Layout
2503 script < infile.out > infile.log
2509 The argument may contain
2510 \begin_inset Flex Code
2513 \begin_layout Plain Layout
2522 \begin_layout Labeling
2523 \labelwidthstring 00.00.0000
2524 \begin_inset Flex Code
2527 \begin_layout Plain Layout
2533 The name of the directory in which the converter will dump the generated
2536 will not create this directory, and it does not copy anything into it,
2537 though it will copy this directory to the destination.
2538 The argument may contain
2539 \begin_inset Flex Code
2542 \begin_layout Plain Layout
2548 , which will be replaced by the base name of the input and output files,
2549 respectively, when the directory is copied.
2550 \begin_inset Newline newline
2553 Note that resultdir and usetempdir make no sense together.
2554 The latter will be ignored if the former is given.
2557 \begin_layout Labeling
2558 \labelwidthstring 00.00.0000
2559 \begin_inset Flex Code
2562 \begin_layout Plain Layout
2568 Determines the output file name and may, contain
2569 \begin_inset Flex Code
2572 \begin_layout Plain Layout
2579 Sensible only with resultdir and optional even then; if not given, it defaults
2583 \begin_layout Standard
2584 None of these last three are presently used in any of the converters that
2585 are installed with \SpecialChar LyX
2590 \begin_layout Standard
2591 You do not have to define converters for all formats between which you want
2593 For example, you will note that there is no `\SpecialChar LyX
2594 to PostScript' converter,
2595 but \SpecialChar LyX
2596 will export PostScript.
2597 It does so by first creating a \SpecialChar LaTeX
2598 file (no converter needs to be defined
2599 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2601 and finally converting the resulting DVI file to PostScript.
2603 finds such `chains' of converters automatically, and it will always choose
2604 the shortest possible chain.
2605 You can, though, still define multiple conversion methods between file
2607 For example, the standard \SpecialChar LyX
2608 configuration provides five ways to convert
2613 \begin_layout Enumerate
2615 \begin_inset Flex Noun
2618 \begin_layout Plain Layout
2627 \begin_layout Enumerate
2628 via (DVI and) PostScript, using
2629 \begin_inset Flex Noun
2632 \begin_layout Plain Layout
2641 \begin_layout Enumerate
2643 \begin_inset Flex Noun
2646 \begin_layout Plain Layout
2655 \begin_layout Enumerate
2657 \begin_inset Flex Noun
2660 \begin_layout Plain Layout
2670 \begin_layout Enumerate
2672 \begin_inset Flex Noun
2675 \begin_layout Plain Layout
2685 \begin_layout Standard
2686 To define such alternate chains, you must define multiple target `file formats',
2688 \begin_inset CommandInset ref
2690 reference "sec:Formats"
2695 For example, in the standard configuration, the formats named
2696 \begin_inset Flex Noun
2699 \begin_layout Plain Layout
2706 \begin_inset Flex Noun
2709 \begin_layout Plain Layout
2716 \begin_inset Flex Noun
2719 \begin_layout Plain Layout
2726 \begin_inset Flex Noun
2729 \begin_layout Plain Layout
2736 \begin_inset Flex Noun
2739 \begin_layout Plain Layout
2746 \begin_inset Flex Noun
2749 \begin_layout Plain Layout
2756 \begin_inset Flex Noun
2759 \begin_layout Plain Layout
2766 \begin_inset Flex Noun
2769 \begin_layout Plain Layout
2777 \begin_inset Flex Noun
2780 \begin_layout Plain Layout
2787 \begin_inset Flex Noun
2790 \begin_layout Plain Layout
2797 ) are defined, all of which share the extension
2798 \begin_inset Flex Noun
2801 \begin_layout Plain Layout
2807 , and which correspond to the conversion methods just mentioned.
2810 \begin_layout Chapter
2811 Internationalizing \SpecialChar LyX
2813 \begin_inset CommandInset label
2815 name "cha:Internationalizing-LyX"
2822 \begin_layout Standard
2824 supports using a translated interface.
2825 Last time we checked, \SpecialChar LyX
2826 provided text in thirty languages.
2827 The language of choice is called your
2832 (For further reading on locale settings, see also the documentation for
2833 locale that comes with your operating system.
2834 For Linux, the manual page for
2835 \begin_inset Flex Code
2838 \begin_layout Plain Layout
2844 could be a good place to start).
2847 \begin_layout Standard
2848 Notice that these translations will work, but do contain a few flaws.
2849 In particular, all dialogs have been designed with the English text in
2850 mind, which means that some of the translated text will be too large to
2851 fit within the space allocated.
2852 This is only a display problem and will not cause any harm.
2853 Also, you will find that some of the translations do not define shortcut
2854 keys for everything.
2855 Sometimes, there are simply not enough free letters to do it.
2856 Other times, the translator just hasn't got around to doing it yet.
2857 Our localization team, which you may wish to join,
2861 \begin_layout Plain Layout
2862 If you are a fluent speaker of a language other than English, joining these
2863 teams is a great way to give back to the \SpecialChar LyX
2869 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2873 \begin_layout Section
2874 Translating \SpecialChar LyX
2878 \begin_layout Subsection
2879 Translating the graphical user interface (text messages).
2882 \begin_layout Standard
2885 \begin_inset Flex Code
2888 \begin_layout Plain Layout
2894 library to handle the internationalization of the interface.
2895 To have \SpecialChar LyX
2896 speak your favorite language in all menus and dialogs, you need
2898 \begin_inset Flex Code
2901 \begin_layout Plain Layout
2907 -file for that language.
2908 When this is available, you'll have to generate a
2909 \begin_inset Flex Code
2912 \begin_layout Plain Layout
2918 -file from it and install the
2919 \begin_inset Flex Code
2922 \begin_layout Plain Layout
2929 The process of doing all of this is explained in the documentation for
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2941 It is possible to do this just for yourself, but if you're going to do
2942 it, you might as well share the results of your labors with the rest of
2943 the \SpecialChar LyX
2945 Send a message to the \SpecialChar LyX
2946 developers' list for more information about how
2950 \begin_layout Standard
2951 In short, this is what you should do (xx denotes the language code):
2954 \begin_layout Itemize
2955 Check out the \SpecialChar LyX
2958 \begin_inset CommandInset href
2960 name "information on the web"
2961 target "http://www.lyx.org/HowToUseGIT"
2968 \begin_layout Itemize
2970 \begin_inset Flex Code
2973 \begin_layout Plain Layout
2979 to the folder of the
2980 \begin_inset Flex Code
2983 \begin_layout Plain Layout
2991 \begin_inset Flex Code
2994 \begin_layout Plain Layout
3002 \begin_inset Flex Code
3005 \begin_layout Plain Layout
3011 doesn't exist anywhere, it can be remade with the console command
3012 \begin_inset Flex Code
3015 \begin_layout Plain Layout
3021 in that directory, or you can use an existing po-file for some other language
3025 \begin_layout Itemize
3027 \begin_inset Flex Code
3030 \begin_layout Plain Layout
3040 \begin_layout Plain Layout
3041 This is just a text file, so it can be edited in any text editor.
3042 But there are also specialized programs that support such editing, such
3047 (for all platforms) or
3056 contains a `mode' for editing
3057 \begin_inset Flex Code
3060 \begin_layout Plain Layout
3067 \begin_inset Flex URL
3070 \begin_layout Plain Layout
3072 https://www.gnu.org/software/gettext/manual/html_node/PO-Mode.html
3084 For some menu- and widget-labels, there are also shortcut keys that should
3086 Those keys are marked after a `|', and should be translated according to
3087 the words and phrases of the language.
3088 You should also fill also out the information at the beginning of the new
3090 \begin_inset Flex Code
3093 \begin_layout Plain Layout
3099 -file with your email-address, etc., so people know where to reach you with
3100 suggestions and entertaining flames.
3103 \begin_layout Standard
3104 If you are just doing this on your own, then:
3107 \begin_layout Itemize
3109 \begin_inset Flex Code
3112 \begin_layout Plain Layout
3119 This can be done with
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3124 msgfmt -o xx.mo < xx.po
3132 \begin_layout Itemize
3134 \begin_inset Flex Code
3137 \begin_layout Plain Layout
3143 -file to your locale-tree, at the correct directory for application messages
3148 xx, and under the name
3149 \begin_inset Flex Code
3152 \begin_layout Plain Layout
3159 \begin_inset space \thinspace{}
3163 \begin_inset space \space{}
3167 \begin_inset Flex Code
3170 \begin_layout Plain Layout
3171 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3181 \begin_layout Standard
3182 As said, however, it would be best if the new
3183 \begin_inset Flex Code
3186 \begin_layout Plain Layout
3192 file could be added to the \SpecialChar LyX
3193 distribution, so others can use it.
3194 Adding it involves making additional changes to \SpecialChar LyX
3196 So send an email to the developers' mailing list if you're interested in
3200 \begin_layout Subsubsection
3204 \begin_layout Standard
3205 Sometimes it turns out that one English message needs to be translated into
3206 different messages in the target language.
3207 One example is the message
3208 \begin_inset Flex Code
3211 \begin_layout Plain Layout
3217 which has the German translation
3225 , depending upon exactly what the English
3226 \begin_inset Quotes eld
3230 \begin_inset Quotes erd
3235 \begin_inset Flex Code
3238 \begin_layout Plain Layout
3244 does not handle such ambiguous translations.
3245 Therefore you have to add some context information to the message: Instead
3247 \begin_inset Flex Code
3250 \begin_layout Plain Layout
3257 \begin_inset Flex Code
3260 \begin_layout Plain Layout
3261 To[[as in 'From format x to format y']]
3267 \begin_inset Flex Code
3270 \begin_layout Plain Layout
3271 To[[as in 'From page x to page y']].
3276 Now the two occurrences of
3277 \begin_inset Flex Code
3280 \begin_layout Plain Layout
3287 \begin_inset Flex Code
3290 \begin_layout Plain Layout
3296 and can be translated correctly to
3307 \begin_layout Standard
3308 Of course the context information needs to be stripped off the original
3309 message when no translation is used.
3310 Therefore you have to put it in double square brackets at the end of the
3311 message (see the example above).
3312 The translation mechanism of \SpecialChar LyX
3313 ensures that everything in double square
3314 brackets at the end of messages is removed before displaying the message.
3317 \begin_layout Subsection
3318 Translating the documentation.
3321 \begin_layout Standard
3322 The online documentation (in the
3323 \begin_inset Flex Noun
3326 \begin_layout Plain Layout
3332 -menu) can (and should!) be translated.
3333 If there are translated versions of the documentation available
3337 \begin_layout Plain Layout
3338 As of March 2008, at least some of the documents have been translated into
3339 fourteen languages, with the Tutorial available in a few more.
3344 and the locale is set accordingly, these will be used automagically by
3348 looks for translated versions as
3349 \begin_inset Flex Code
3352 \begin_layout Plain Layout
3353 LyXDir/doc/xx/DocName.lyx
3359 \begin_inset Flex Code
3362 \begin_layout Plain Layout
3368 is the code for the language currently in use.
3369 If there are no translated documents, the default English versions will
3371 Note that the translated versions must have the same filenames (
3372 \begin_inset Flex Code
3375 \begin_layout Plain Layout
3381 above) as the original.
3382 If you feel up to translating the documentation (an excellent way to proof-read
3383 the original documentation by the way!), there are a few things you should
3387 \begin_layout Itemize
3388 Check out the documentation translation web page at
3389 \begin_inset CommandInset href
3391 name "http://www.lyx.org/Translation"
3392 target "http://www.lyx.org/Translation"
3397 That way, you can find out which (if any) documents have already been translate
3398 d into your language.
3399 You can also find out who (if anyone) is organizing the effort to translate
3400 the documentation into your language.
3401 If no one is organizing the effort, please let us know that you're interested.
3404 \begin_layout Standard
3405 Once you get to actually translating, here's a few hints for you that may
3409 \begin_layout Itemize
3410 Join the documentation team! There is information on how to do that in
3411 \begin_inset Flex Code
3414 \begin_layout Plain Layout
3421 \begin_inset Flex Noun
3424 \begin_layout Plain Layout
3425 Help\SpecialChar menuseparator
3431 ), which by the way is the first document you should translate.
3434 \begin_layout Itemize
3435 Learn the typographic conventions for the language you are translating to.
3436 Typography is an ancient art and over the centuries, a great variety of
3437 conventions have developed throughout different parts of the world.
3438 Also study the professional terminology amongst typographers in your country.
3439 Inventing your own terminology will only confuse the users.
3442 (Warning! Typography is addictive!)
3445 \begin_layout Itemize
3446 Make a copy of the document.
3447 This will be your working copy.
3448 You can use this as your personal translated help-file by placing it in
3450 \begin_inset Flex Code
3453 \begin_layout Plain Layout
3460 \begin_inset Note Greyedout
3463 \begin_layout Plain Layout
3468 For a complex document with external material (images, etc.), if you make
3470 \begin_inset space \thinspace{}
3474 \begin_inset space \space{}
3477 in a temp dir, beware that the links to external material may be broken
3478 when the document is moved to a different place.
3479 The best way is to retrieve the \SpecialChar LyX
3481 \begin_inset Flex URL
3484 \begin_layout Plain Layout
3486 http://www.lyx.org/HowToUseGIT
3491 ) and to edit the doc file in place.
3499 \begin_layout Itemize
3500 Sometimes the original document (from the \SpecialChar LyX
3501 team) will be updated.
3502 Use the source viewer at
3503 \begin_inset CommandInset href
3505 name "http://www.lyx.org/trac/timeline"
3506 target "http://www.lyx.org/trac/timeline"
3510 to see what has been changed.
3511 That way you can easily see which parts of the translated document need
3515 \begin_layout Standard
3516 If you ever find an error in the original document, fix it and notify the
3517 rest of the documentation team of the changes! (You didn't forget to join
3518 the documentation team, did you?)
3521 \begin_layout Standard
3522 \begin_inset Branch OutDated
3526 \begin_layout Section
3527 International Keyboard Support
3530 \begin_layout Standard
3533 [Editor's Note: The following section is by
3541 It needs to be fixed to conform to the new Documentation Style sheet and
3542 to make use of the new v1.0 features.
3543 The whole thing also needs to be merged with the section following it.-jw
3544 It may also be badly out of date.-rh (2008)]
3547 \begin_layout Subsection
3548 Defining Own Keymaps: Keymap File Format
3551 \begin_layout Standard
3552 Let's look at a keyboard definition file a little closer.
3553 It is a plain text file defining
3556 \begin_layout Itemize
3557 key-to-key or key-to-string translations
3560 \begin_layout Itemize
3564 \begin_layout Itemize
3565 dead keys exceptions
3568 \begin_layout Standard
3569 To define key-to-key or key-to-string translation, use this command:
3572 \begin_layout Quotation
3573 \begin_inset Flex Code
3576 \begin_layout Plain Layout
3585 \begin_inset Flex Code
3588 \begin_layout Plain Layout
3597 \begin_layout Standard
3599 \begin_inset Flex Code
3602 \begin_layout Plain Layout
3608 is the key to be translated and
3609 \begin_inset Flex Code
3612 \begin_layout Plain Layout
3618 is the string to be inserted into the document.
3619 To define dead keys, use:
3622 \begin_layout Quotation
3623 \begin_inset Flex Code
3626 \begin_layout Plain Layout
3635 \begin_inset Flex Code
3638 \begin_layout Plain Layout
3647 \begin_layout Standard
3649 \begin_inset Flex Code
3652 \begin_layout Plain Layout
3658 is a keyboard key and
3659 \begin_inset Flex Code
3662 \begin_layout Plain Layout
3669 The following dead keys are supported (shortcut name is in parentheses):
3672 \begin_layout Quotation
3676 \begin_inset space \hfill{}
3682 \begin_layout Quotation
3684 \begin_inset space \hfill{}
3690 \begin_layout Quotation
3692 \begin_inset space \hfill{}
3698 \begin_layout Quotation
3700 \begin_inset space \hfill{}
3706 \begin_layout Quotation
3708 \begin_inset space \hfill{}
3714 \begin_layout Quotation
3716 \begin_inset space \hfill{}
3723 \begin_layout Plain Layout
3735 \begin_layout Quotation
3737 \begin_inset space \hfill{}
3743 \begin_layout Quotation
3745 \begin_inset space \hfill{}
3752 \begin_layout Plain Layout
3764 \begin_layout Quotation
3766 \begin_inset space \hfill{}
3772 \begin_layout Quotation
3774 \begin_inset space \hfill{}
3780 \begin_layout Quotation
3782 \begin_inset space \hfill{}
3789 \begin_layout Plain Layout
3801 \begin_layout Quotation
3803 \begin_inset space \hfill{}
3810 \begin_layout Plain Layout
3822 \begin_layout Quotation
3824 \begin_inset space \hfill{}
3830 \begin_layout Quotation
3831 hungarian umlaut (hug)
3832 \begin_inset space \hfill{}
3838 \begin_layout Quotation
3840 \begin_inset space \hfill{}
3846 \begin_layout Quotation
3848 \begin_inset space \hfill{}
3855 \begin_layout Plain Layout
3867 \begin_layout Standard
3868 Since in many international keyboards there are exceptions to what some
3869 dead keys should do, you can define them using
3872 \begin_layout Quotation
3873 \begin_inset Flex Code
3876 \begin_layout Plain Layout
3884 deadkey key outstring
3887 \begin_layout Standard
3888 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3892 \begin_layout Quotation
3893 \begin_inset Flex Code
3896 \begin_layout Plain Layout
3909 \begin_layout Standard
3910 to make it work correctly.
3911 Also, you have to define as exceptions dead keys over i and j, to remove
3912 the dot from them before inserting an accent mark.
3913 I will change this when the time comes, but so far I haven't had time.
3916 \begin_layout Standard
3917 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3920 \begin_inset Flex Code
3923 \begin_layout Plain Layout
3929 have different meaning.
3931 \begin_inset Flex Code
3934 \begin_layout Plain Layout
3940 marks comments, quotes start and end \SpecialChar LaTeX
3942 To enter quote, you'll need to use
3943 \begin_inset Flex Code
3946 \begin_layout Plain Layout
3955 \begin_inset Flex Code
3958 \begin_layout Plain Layout
3965 \begin_inset Flex Code
3968 \begin_layout Plain Layout
3979 \begin_layout Standard
3980 If you make a keyboard description file that works for your language, please
3981 mail it to me, so I can include it in the next keymap distribution.
3984 \begin_layout Standard
3985 More keywords will be supported in keymap configuration file in future,
3989 \begin_layout Itemize
3990 \begin_inset Flex Code
3993 \begin_layout Plain Layout
4004 \begin_inset space \hfill{}
4008 \begin_inset Flex Code
4011 \begin_layout Plain Layout
4020 \begin_layout Itemize
4021 \begin_inset Flex Code
4024 \begin_layout Plain Layout
4035 \begin_inset space \hfill{}
4039 \begin_inset Flex Code
4042 \begin_layout Plain Layout
4048 an external keymap translation program
4051 \begin_layout Standard
4052 Also, it should look into
4053 \begin_inset Flex Code
4056 \begin_layout Plain Layout
4062 file for defaults, too (for example, a
4063 \begin_inset Flex Code
4066 \begin_layout Plain Layout
4074 option to include default keyboard).
4082 \begin_layout Section
4083 International Keymap Stuff
4084 \begin_inset CommandInset label
4086 name "sec:International-Keymap-Stuff"
4093 \begin_layout Standard
4094 \begin_inset Note Note
4097 \begin_layout Plain Layout
4098 In doing the revisions on this document in March 2008, I did not look over
4099 this stuff, as I do not understand it.
4100 It would be good if someone else could do so.
4109 \begin_layout Standard
4110 The next two sections describe the
4111 \begin_inset Flex Code
4114 \begin_layout Plain Layout
4123 \begin_inset Flex Code
4126 \begin_layout Plain Layout
4134 file syntax in detail.
4135 These sections should help you design your own key map if the ones provided
4136 do not meet your needs.
4139 \begin_layout Subsection
4143 \begin_layout Standard
4147 \begin_inset Flex Code
4150 \begin_layout Plain Layout
4156 file maps keystrokes to characters or strings.
4157 As the name suggests, it sets a keyboard mapping.
4159 \begin_inset Flex Code
4162 \begin_layout Plain Layout
4173 \begin_inset Flex Code
4176 \begin_layout Plain Layout
4191 \begin_inset Flex Code
4194 \begin_layout Plain Layout
4207 \begin_inset Flex Code
4210 \begin_layout Plain Layout
4219 \begin_inset Flex Code
4222 \begin_layout Plain Layout
4230 are described in this section.
4233 \begin_layout Labeling
4234 \labelwidthstring 00.00.0000
4235 \begin_inset Flex Code
4238 \begin_layout Plain Layout
4246 Map a character to a string
4249 \begin_layout LyX-Code
4264 \begin_layout Standard
4297 the double-quote (")
4314 must be escaped with a preceding backslash (
4325 \begin_layout Standard
4327 \begin_inset Flex Noun
4330 \begin_layout Plain Layout
4338 statement to cause the symbol
4339 \begin_inset Flex Noun
4342 \begin_layout Plain Layout
4350 to be output for the keystroke
4351 \begin_inset Flex Noun
4354 \begin_layout Plain Layout
4365 \begin_layout LyX-Code
4371 \begin_layout Labeling
4372 \labelwidthstring 00.00.0000
4373 \begin_inset Flex Code
4376 \begin_layout Plain Layout
4384 Specify an accent character
4387 \begin_layout LyX-Code
4396 \begin_layout Standard
4397 This will make the cha
4435 This is the dead key
4439 \begin_layout Plain Layout
4446 refers to a key that does not produce a character by itself, but when followed
4447 with another key, produces the desired accent character.
4448 For example, a German characte
4450 r with an umlaut like
4460 can be produced in this manner.
4469 \begin_layout Standard
4482 and then another key not in
4499 followed by the other, not allowed key, as output.
4503 \begin_inset Flex Noun
4506 \begin_layout Plain Layout
4514 cancels a dead key, so if
4525 \begin_inset Flex Noun
4528 \begin_layout Plain Layout
4537 , the cursor will not go one position backwards but will instead cancel
4553 might have had on the next keystroke.
4557 \begin_layout Standard
4558 The following example specifies that the character ' is to be an acute accent,
4559 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4562 \begin_layout LyX-Code
4565 kmod ' acute aeiouAEIOU
4568 \begin_layout Labeling
4569 \labelwidthstring 00.00.0000
4570 \begin_inset Flex Code
4573 \begin_layout Plain Layout
4579 Specify an exception to the accent character
4582 \begin_layout LyX-Code
4591 \begin_layout Standard
4592 This defines an exce
4633 have been assigned a keystroke with a previous
4636 \begin_inset Flex Code
4639 \begin_layout Plain Layout
4663 must not belong in the
4710 If such a declaration does not exist in
4718 \begin_inset Flex Code
4721 \begin_layout Plain Layout
4755 \begin_inset Flex Code
4758 \begin_layout Plain Layout
4772 \begin_layout Standard
4773 The following command produces causes äi to be produced when you enter acute-i
4777 \begin_layout LyX-Code
4791 \begin_layout Labeling
4792 \labelwidthstring 00.00.0000
4793 \begin_inset Flex Code
4796 \begin_layout Plain Layout
4802 Combine two accent characters
4805 \begin_layout LyX-Code
4811 accent1 accent2 allowed
4814 \begin_layout Standard
4815 This one is getting pretty esoteric.
4816 It allows you to combine the effect
4872 \begin_inset Flex Code
4875 \begin_layout Plain Layout
4903 \begin_layout Standard
4904 Consider this example from the
4905 \begin_inset Flex Code
4908 \begin_layout Plain Layout
4919 \begin_layout LyX-Code
4922 kmod ; acute aeioyvhAEIOYVH
4926 kcomb acute umlaut iyIY
4929 \begin_layout Standard
4930 This allows you to press
4931 \begin_inset Flex Noun
4934 \begin_layout Plain Layout
4942 and get the effect of
4943 \begin_inset Flex Code
4946 \begin_layout Plain Layout
4965 in this case cancels the last dead key, so if you press
4966 \begin_inset Flex Noun
4969 \begin_layout Plain Layout
4978 \begin_inset Flex Code
4981 \begin_layout Plain Layout
4994 \begin_layout Subsection
4998 \begin_layout Standard
5000 \begin_inset Flex Code
5003 \begin_layout Plain Layout
5011 mapping is performed, a
5012 \begin_inset Flex Code
5015 \begin_layout Plain Layout
5025 file maps the strings that the symbols generate to characters in the current
5027 The \SpecialChar LyX
5028 distribution currently includes at least the
5029 \begin_inset Flex Code
5032 \begin_layout Plain Layout
5041 \begin_inset Flex Code
5044 \begin_layout Plain Layout
5055 \begin_layout Standard
5057 \begin_inset Flex Code
5060 \begin_layout Plain Layout
5068 file is a sequence of declarations of the form
5071 \begin_layout LyX-Code
5084 \begin_layout Standard
5085 For example, in order to map
5086 \begin_inset Flex Noun
5089 \begin_layout Plain Layout
5099 to the corresponding character in the iso-8859-1 set (233), the following
5103 \begin_layout LyX-Code
5111 \begin_layout Standard
5113 \begin_inset Flex Code
5116 \begin_layout Plain Layout
5125 \begin_inset Flex Code
5128 \begin_layout Plain Layout
5146 the same character can apply to more than one string.
5148 \begin_inset Flex Code
5151 \begin_layout Plain Layout
5162 \begin_layout LyX-Code
5174 \begin_inset Newline newline
5190 \begin_layout Standard
5192 cannot find a mapping for the string produced by the keystroke or a
5193 deadkey sequence, it will check if it looks like an accented char and try
5194 to draw an accent over the character on screen.
5197 \begin_layout Subsection
5201 \begin_layout Standard
5202 There is a second way to add support for international characters through
5203 so-called dead-keys.
5204 A dead-key works in combination with a letter to produce an accented character.
5205 Here, we'll explain how to create a really simple dead-key to illustrate
5209 \begin_layout Standard
5210 Suppose you happen to need the circumflex character,
5211 \begin_inset Quotes eld
5215 \begin_inset Quotes erd
5220 \begin_inset Flex Noun
5223 \begin_layout Plain Layout
5230 \begin_inset space ~
5234 \begin_inset Flex Noun
5237 \begin_layout Plain Layout
5243 ] to the \SpecialChar LyX
5245 \begin_inset Flex Code
5248 \begin_layout Plain Layout
5255 \begin_inset Flex Code
5258 \begin_layout Plain Layout
5265 Now, whenever you type the
5266 \begin_inset Flex Noun
5269 \begin_layout Plain Layout
5275 -key followed by a letter, that letter will have a circumflex accent on
5277 For example, the sequence
5278 \begin_inset Quotes eld
5282 \begin_inset Flex Noun
5285 \begin_layout Plain Layout
5292 \begin_inset Quotes erd
5295 produces the letter:
5296 \begin_inset Quotes eld
5300 \begin_inset Quotes erd
5304 If you tried to type
5305 \begin_inset Quotes eld
5309 \begin_inset Flex Noun
5312 \begin_layout Plain Layout
5319 \begin_inset Quotes erd
5322 , however, \SpecialChar LyX
5323 will complain with a beep, since a
5324 \begin_inset Quotes eld
5328 \begin_inset Flex Noun
5331 \begin_layout Plain Layout
5338 \begin_inset Quotes erd
5341 never takes a circumflex accent.
5343 \begin_inset Flex Noun
5346 \begin_layout Plain Layout
5352 after a dead-key produces the bare-accent.
5353 Please note this last point! If you bind a key to a dead-key, you'll need
5354 to rebind the character on that key to yet another key.
5356 \begin_inset Flex Noun
5359 \begin_layout Plain Layout
5365 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5368 \begin_layout Standard
5369 One common way to bind dead-keys is to use
5370 \begin_inset Flex Noun
5373 \begin_layout Plain Layout
5380 \begin_inset Flex Noun
5383 \begin_layout Plain Layout
5390 \begin_inset Flex Noun
5393 \begin_layout Plain Layout
5399 in combination with an accent, like
5400 \begin_inset Quotes eld
5404 \begin_inset Flex Noun
5407 \begin_layout Plain Layout
5414 \begin_inset Quotes erd
5418 \begin_inset Quotes eld
5422 \begin_inset Flex Noun
5425 \begin_layout Plain Layout
5432 \begin_inset Quotes erd
5436 \begin_inset Quotes eld
5440 \begin_inset Flex Noun
5443 \begin_layout Plain Layout
5450 \begin_inset Quotes erd
5454 Another way involves using
5455 \begin_inset Flex Code
5458 \begin_layout Plain Layout
5465 \begin_inset Flex Code
5468 \begin_layout Plain Layout
5474 to set up the special
5475 \begin_inset Flex Code
5478 \begin_layout Plain Layout
5486 \begin_inset Flex Code
5489 \begin_layout Plain Layout
5495 acts in some ways just like
5496 \begin_inset Flex Noun
5499 \begin_layout Plain Layout
5505 and permits you to bind keys to accented characters.
5506 You can also turn keys into dead-keys by binding them to something like
5508 \begin_inset Flex Code
5511 \begin_layout Plain Layout
5517 and then binding this symbolic key to the corresponding \SpecialChar LyX
5522 \begin_layout Plain Layout
5527 : This is exactly what I do in my
5528 \begin_inset Flex Code
5531 \begin_layout Plain Layout
5538 \begin_inset Flex Code
5541 \begin_layout Plain Layout
5549 \begin_inset Flex Noun
5552 \begin_layout Plain Layout
5554 \begin_inset space ~
5563 \begin_inset Flex Code
5566 \begin_layout Plain Layout
5572 and a bunch of these
5573 \begin_inset Quotes eld
5577 \begin_inset Flex Code
5580 \begin_layout Plain Layout
5587 \begin_inset Quotes erd
5590 symbolic keys bound such things as
5591 \begin_inset Flex Noun
5594 \begin_layout Plain Layout
5596 \begin_inset space ~
5605 \begin_inset Flex Noun
5608 \begin_layout Plain Layout
5610 \begin_inset space ~
5619 This is how I produce my accented characters.
5624 You can make just about anything into the
5625 \begin_inset Flex Code
5628 \begin_layout Plain Layout
5635 \begin_inset Flex Noun
5638 \begin_layout Plain Layout
5644 keys, a spare function key, etc.
5645 As for the \SpecialChar LyX
5646 commands that produce accents, check the entry for
5647 \begin_inset Flex Code
5650 \begin_layout Plain Layout
5661 You'll find the complete list there.
5664 \begin_layout Subsection
5665 Saving your Language Configuration
5668 \begin_layout Standard
5669 You can edit your preferences so that your desired language environment
5670 is automatically configured when \SpecialChar LyX
5672 \begin_inset Flex Noun
5675 \begin_layout Plain Layout
5676 Edit\SpecialChar menuseparator
5685 \begin_layout Chapter
5686 Installing New Document Classes, Layouts, and Templates
5687 \begin_inset CommandInset label
5689 name "cha:Installing-New-Document"
5694 \begin_inset Argument 1
5697 \begin_layout Plain Layout
5698 Installing New Document Classes
5706 \begin_layout Standard
5707 In this chapter, we describe the procedures for creating and installing
5708 new \SpecialChar LyX
5709 layout and template files, as well as offer a refresher on correctly
5710 installing new \SpecialChar LaTeX
5715 \begin_layout Standard
5716 First, let us a say a few words about how one ought to think about the relation
5717 between \SpecialChar LyX
5718 and \SpecialChar LaTeX
5720 The thing to understand is that, in a certain sense, \SpecialChar LyX
5721 doesn't know anything
5722 about \SpecialChar LaTeX
5724 Indeed, from \SpecialChar LyX
5725 's point of view, \SpecialChar LaTeX
5726 is just one of several
5727 \begin_inset Quotes eld
5731 \begin_inset Quotes erd
5734 in which it is capable of producing output.
5735 Other such formats are DocBook, plaintext, and XHTML.
5737 is, of course, a particularly important format, but very little of the
5738 information \SpecialChar LyX
5739 has about \SpecialChar LaTeX
5740 is actually contained in the program itself.
5744 \begin_layout Plain Layout
5745 Some commands are sufficiently complex that they are
5746 \begin_inset Quotes eld
5750 \begin_inset Quotes erd
5753 into \SpecialChar LyX
5755 But the developers generally regard this as a Bad Thing.
5760 Rather, that information, even for the standard classes like
5761 \begin_inset Flex Code
5764 \begin_layout Plain Layout
5770 , is contained in `layout files'.
5771 Similarly, \SpecialChar LyX
5772 itself does not know much about DocBook or XHTML.
5773 What it knows is contained in layout files.
5776 \begin_layout Standard
5777 You can think of the layout file for a given document class as a translation
5778 manual between \SpecialChar LyX
5779 constructs—paragraphs with their corresponding styles,
5780 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5783 Almost everything \SpecialChar LyX
5785 \begin_inset Flex Code
5788 \begin_layout Plain Layout
5794 , for example, is contained in the file
5795 \begin_inset Flex Code
5798 \begin_layout Plain Layout
5804 and in various other files it includes.
5805 For this reason, anyone intending to write layout files should plan to
5806 study the existing files.
5807 A good place to start is with
5808 \begin_inset Flex Code
5811 \begin_layout Plain Layout
5817 , which is included in
5818 \begin_inset Flex Code
5821 \begin_layout Plain Layout
5828 \begin_inset Flex Code
5831 \begin_layout Plain Layout
5837 , and many of the other layout files for document classes.
5838 This file is where sections and the like are defined:
5839 \begin_inset Flex Code
5842 \begin_layout Plain Layout
5848 tells \SpecialChar LyX
5849 how paragraphs that are marked with the Section, Subsection, etc,
5850 styles can be translated into corresponding \SpecialChar LaTeX
5851 , DocBook, and XHTML commands
5854 \begin_inset Flex Code
5857 \begin_layout Plain Layout
5863 file basically just includes several of these
5864 \begin_inset Flex Code
5867 \begin_layout Plain Layout
5876 \begin_layout Standard
5877 Defining the \SpecialChar LyX
5879 correspondence is not the only thing layout files do, though.
5880 Their other job is to define how the \SpecialChar LyX
5881 constructs themselves will appear
5883 The fact that layout files have these two jobs is often a source of confusion,
5884 because they are completely separate.
5885 Telling \SpecialChar LyX
5886 how to translate a certain paragraph style into \SpecialChar LaTeX
5889 how to display it; conversely, telling \SpecialChar LyX
5890 how to display a certain paragraph
5891 style does not tell \SpecialChar LyX
5892 how to translate it into \SpecialChar LaTeX
5893 (let alone tell \SpecialChar LaTeX
5896 So, in general, when you define a new \SpecialChar LyX
5897 construct, you must always do two
5898 quite separate things: (i)
5899 \begin_inset space ~
5902 tell \SpecialChar LyX
5903 how to translate it into \SpecialChar LaTeX
5905 \begin_inset space ~
5908 tell \SpecialChar LyX
5912 \begin_layout Standard
5913 Much the same is true, of course, as regards \SpecialChar LyX
5914 's other backend formats, though
5915 XHTML is in some ways different, because in that case \SpecialChar LyX
5920 able, to some extent, to use information about how it should display a
5921 paragraph on the screen to output information (in the form of CSS) about
5922 how the paragraph should be displayed in a browser.
5923 Even in this case, however, the distinction between what \SpecialChar LyX
5925 and how things are rendered externally remains in force, and the two can
5926 be controlled separately.
5928 \begin_inset CommandInset ref
5930 reference "sec:Tags-for-XHTML"
5937 \begin_layout Section
5938 Installing new \SpecialChar LaTeX
5942 \begin_layout Standard
5943 Some installations may not include a \SpecialChar LaTeX
5944 package or class file that you would
5945 like to use within \SpecialChar LyX
5947 For example, you might need Foil\SpecialChar TeX
5948 , a package for preparing slides for overhead
5950 Modern \SpecialChar LaTeX
5951 distributions like \SpecialChar TeX
5952 Live (2008 or newer) or MiK\SpecialChar TeX
5953 provide a user interface
5954 for installing such packages.
5955 For example, with MiK\SpecialChar TeX
5956 , you start the program
5957 \begin_inset Quotes eld
5961 \begin_inset space ~
5965 \begin_inset Quotes erd
5968 to get a list of available packages.
5969 To install one of them, right click on it or use the corresponding toolbar
5973 \begin_layout Standard
5974 If your \SpecialChar LaTeX
5975 distribution does not provide such a `package manager', or if the
5976 package is not available from your distribution, then follow these steps
5977 to install it manually:
5980 \begin_layout Enumerate
5981 Get the package from
5982 \begin_inset CommandInset href
5985 target "http://www.ctan.org/"
5992 \begin_layout Enumerate
5993 If the package contains a file with the ending
5994 \begin_inset Quotes eld
5998 \begin_inset Flex Code
6001 \begin_layout Plain Layout
6008 \begin_inset Quotes erd
6011 (is the case for Foil\SpecialChar TeX
6012 ) then open a console, change to the folder of this
6013 file and execute the command
6014 \begin_inset Flex Code
6017 \begin_layout Plain Layout
6024 You have now unpacked the package and have all files to install it.
6025 Most \SpecialChar LaTeX
6026 -packages are not packed and you can skip this step.
6029 \begin_layout Enumerate
6030 Now you need to decide if the package should be available for all users
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
6354 \begin_layout Enumerate
6355 For \SpecialChar TeX
6356 Live execute the command
6357 \begin_inset Flex Code
6360 \begin_layout Plain Layout
6367 If you installed the package for all users, then you will probably need
6368 to have root permissions for that.
6371 \begin_layout Enumerate
6372 For MiK\SpecialChar TeX
6373 , if you have installed the package for all users, start the program
6375 \begin_inset Quotes eld
6379 \begin_inset space ~
6383 \begin_inset Quotes erd
6386 and press the button marked
6387 \begin_inset Quotes eld
6391 \begin_inset Quotes erd
6395 Otherwise start the program
6396 \begin_inset Quotes eld
6400 \begin_inset Quotes erd
6407 \begin_layout Enumerate
6408 Finally, you need to tell \SpecialChar LyX
6409 that there are new packages available.
6410 So, in \SpecialChar LyX
6412 \begin_inset Flex Noun
6415 \begin_layout Plain Layout
6418 \SpecialChar menuseparator
6424 and then restart \SpecialChar LyX
6428 \begin_layout Standard
6429 Now the package is installed.
6430 In our example, the document class
6431 \begin_inset Flex Code
6434 \begin_layout Plain Layout
6436 \begin_inset space ~
6444 will now be available under
6445 \begin_inset Flex Noun
6448 \begin_layout Plain Layout
6449 Document\SpecialChar menuseparator
6450 Settings\SpecialChar menuseparator
6460 \begin_layout Standard
6461 If you would like to use a \SpecialChar LaTeX
6462 document class that is not even listed in the
6464 \begin_inset Flex Noun
6467 \begin_layout Plain Layout
6468 Document\SpecialChar menuseparator
6469 Settings\SpecialChar menuseparator
6475 , then you need to create a `layout' file for it.
6476 That is the topic of the next section.
6479 \begin_layout Section
6480 Types of layout files
6483 \begin_layout Standard
6484 This section describes the various sorts of \SpecialChar LyX
6485 files that contain layout informati
6487 These files describe various paragraph and character styles, determining
6488 how \SpecialChar LyX
6489 should display them and how they should be translated into \SpecialChar LaTeX
6491 XHTML, or whatever output format is being used.
6495 \begin_layout Standard
6496 We shall try to provide a thorough description of the process of writing
6498 However, there are so many different types of documents supported even
6499 by just \SpecialChar LaTeX
6500 that we can't hope to cover every different possibility or problem
6501 you might encounter.
6502 The \SpecialChar LyX
6503 users' list is frequented by people with lots of experience with layout
6504 design who are willing to share what they've learned, so please feel free
6505 to ask questions there.
6508 \begin_layout Standard
6509 As you prepare to write a new layout, it is extremely helpful to look at
6510 the layouts distributed with \SpecialChar LyX
6512 If you write a \SpecialChar LyX
6513 layout for a \SpecialChar LaTeX
6514 document class that might also be used by
6515 others, or write a module that might be useful to others, then you should
6516 consider posting your layout to the
6517 \begin_inset CommandInset href
6519 name "layout section on the LyX wiki"
6520 target "http://wiki.lyx.org/Layouts/Layouts"
6524 or even to the \SpecialChar LyX
6525 developers' list, so that it might be included in \SpecialChar LyX
6530 \begin_layout Plain Layout
6531 Note that \SpecialChar LyX
6532 is licensed under the General Public License, so any material
6533 that is contributed to \SpecialChar LyX
6534 must be similarly licensed.
6542 \begin_layout Subsection
6544 \begin_inset CommandInset label
6546 name "subsec:Layout-modules"
6553 \begin_layout Standard
6554 We have spoken to this point about `layout files'.
6555 But there are different sorts of files that contain layout information.
6556 Layout files, strictly so called, have the
6557 \begin_inset Flex Code
6560 \begin_layout Plain Layout
6566 extension and provide \SpecialChar LyX
6567 with information about document classes.
6568 Since \SpecialChar LyX
6569 1.6 layout information can also be contained in layout
6574 \begin_inset Flex Code
6577 \begin_layout Plain Layout
6584 Modules are to \SpecialChar LaTeX
6585 packages much as layouts are to \SpecialChar LaTeX
6586 classes, and some modules—such
6588 \begin_inset Flex Code
6591 \begin_layout Plain Layout
6597 module—specifically provide support for one package.
6598 In a sense, layout modules are similar to included
6602 \begin_layout Plain Layout
6603 These can have any extension, but by convention have the
6604 \begin_inset Flex Code
6607 \begin_layout Plain Layout
6619 \begin_inset Flex Code
6622 \begin_layout Plain Layout
6628 —in that modules are not specific to a given document class but may be used
6629 with many different classes.
6630 The difference is that using an included file with
6631 \begin_inset Flex Code
6634 \begin_layout Plain Layout
6640 requires editing that file.
6641 Modules, by contrast, are selected in the
6642 \begin_inset Flex Noun
6645 \begin_layout Plain Layout
6646 Document\SpecialChar menuseparator
6655 \begin_layout Standard
6656 Building modules is the easiest way to get started with layout editing,
6657 since it can be as simple as adding a single new paragraph style or flex
6659 But modules may, in principle, contain anything a layout file can contain.
6662 \begin_layout Standard
6663 After creating a new module and copying it to the
6664 \begin_inset Flex Code
6667 \begin_layout Plain Layout
6673 folder, you will need to reconfigure and then restart \SpecialChar LyX
6676 However, changes you make to the module will be seen immediately, if you
6678 \begin_inset Flex Noun
6681 \begin_layout Plain Layout
6682 Document\SpecialChar menuseparator
6688 , highlight something, and then hit
6689 \begin_inset Quotes eld
6693 \begin_inset Quotes erd
6699 It is strongly recommended that you save your work before doing this
6704 it is strongly recommended that you not attempt to edit modules while simultaneo
6705 usly working on actual documents
6708 Though of course the developers strive to keep \SpecialChar LyX
6709 stable in such situations,
6710 syntax errors and the like in your module file could cause strange behavior.
6713 \begin_layout Subsubsection
6717 \begin_layout Standard
6718 Modules are to \SpecialChar LyX
6719 as packages are to \SpecialChar LaTeX
6721 Sometimes, however, you find yourself wanting a specific inset or character
6722 style just for one document and writing a module that will also be available
6723 to other documents makes little sense.
6724 What you need is \SpecialChar LyX
6726 \begin_inset Quotes eld
6730 \begin_inset Quotes erd
6736 \begin_layout Standard
6737 You will find it under
6739 Document\SpecialChar menuseparator
6740 Settings\SpecialChar menuseparator
6744 The large text box allows you to enter anything that you might enter in
6745 a layout file or module.
6746 You can think of a document's local layout, in fact, as a module that belongs
6748 So, in particular, you must enter a
6749 \begin_inset Flex Code
6752 \begin_layout Plain Layout
6759 Any format is acceptable, but one would normally use the format current
6761 (In \SpecialChar LyX
6762 2.2, the current layout format is 60.)
6765 \begin_layout Standard
6766 When you have entered something in the
6767 \begin_inset Flex Code
6770 \begin_layout Plain Layout
6776 pane, \SpecialChar LyX
6778 \begin_inset Quotes eld
6782 \begin_inset Quotes erd
6785 button at the bottom.
6786 Clicking this button will cause \SpecialChar LyX
6787 to determine whether what you have entered
6788 is valid layout information for the chosen format.
6790 will report the result but, unfortunately, will not tell you what errors
6791 there might have been.
6792 These will be written to the terminal, however, if \SpecialChar LyX
6793 is started from a terminal.
6794 You will not be permitted to save your local layout until you have entered
6798 \begin_layout Standard
6799 The warnings at the end of the previous section apply here, too.
6800 Do not play with local layout while you are actually working, especially
6801 if you have not saved your document.
6802 That said, using local layout with a test document can be a very convenient
6803 way to try out layout ideas, or even to start developing a module.
6806 \begin_layout Subsection
6808 \begin_inset Flex Noun
6811 \begin_layout Plain Layout
6820 \begin_layout Standard
6821 There are two situations you are likely to encounter when wanting to support
6822 a new \SpecialChar LaTeX
6823 document class, involving style (
6824 \begin_inset Flex Code
6827 \begin_layout Plain Layout
6833 ) files and \SpecialChar LaTeX2e
6835 \begin_inset Flex Code
6838 \begin_layout Plain Layout
6845 Supporting a style file is usually fairly easy.
6846 Supporting a new class file is a bit harder.
6847 We'll discuss the former in this section and the latter in the next.
6848 Similar remarks apply, of course, if you want to support a new DocBook
6852 \begin_layout Standard
6853 The easier case is the one in which your new document class is provided
6854 as a style file that is to be used in conjunction with an already supported
6856 For the sake of the example, we'll assume that the style file is called
6858 \begin_inset Flex Noun
6861 \begin_layout Plain Layout
6867 and that it is meant to be used with
6868 \begin_inset Flex Noun
6871 \begin_layout Plain Layout
6877 , which is a standard class.
6881 \begin_layout Standard
6882 Start by copying the existing class's layout file into your local directory:
6886 \begin_layout Plain Layout
6887 Of course, which directory is your local directory will vary by platform,
6888 and \SpecialChar LyX
6889 allows you to specify your local directory on startup, too, using
6891 \begin_inset Flex Code
6894 \begin_layout Plain Layout
6908 \begin_layout LyX-Code
6909 cp report.layout ~/.lyx/layouts/myclass.layout
6912 \begin_layout Standard
6914 \begin_inset Flex Code
6917 \begin_layout Plain Layout
6923 and change the line:
6926 \begin_layout LyX-Code
6929 DeclareLaTeXClass{report}
6932 \begin_layout Standard
6936 \begin_layout LyX-Code
6939 DeclareLaTeXClass[report, myclass.sty]{report (myclass)}
6942 \begin_layout Standard
6946 \begin_layout LyX-Code
6948 \begin_inset Newline newline
6954 \begin_inset Newline newline
6960 \begin_layout Standard
6961 near the top of the file.
6964 \begin_layout Standard
6965 Start \SpecialChar LyX
6967 \begin_inset Flex Noun
6970 \begin_layout Plain Layout
6971 Tools\SpecialChar menuseparator
6978 Then restart \SpecialChar LyX
6979 and try creating a new document.
6981 \begin_inset Flex Noun
6984 \begin_layout Plain Layout
6990 " as a document class option in the
6991 \begin_inset Flex Noun
6994 \begin_layout Plain Layout
6995 Document\SpecialChar menuseparator
7002 It is likely that some of the sectioning commands and such in your new
7003 class will work differently from how they worked in the base class—
7004 \begin_inset Flex Code
7007 \begin_layout Plain Layout
7013 in this example—so you can fiddle around with the settings for the different
7014 sections if you wish.
7015 The layout information for sections is contained in
7016 \begin_inset Flex Code
7019 \begin_layout Plain Layout
7025 , but you do not need to copy and change this file.
7026 Instead, you can simply add your changes to your layout file, after the
7028 \begin_inset Flex Code
7031 \begin_layout Plain Layout
7037 , which itself includes
7038 \begin_inset Flex Code
7041 \begin_layout Plain Layout
7048 For example, you might add these lines:
7051 \begin_layout LyX-Code
7055 \begin_layout LyX-Code
7059 \begin_layout LyX-Code
7063 \begin_layout LyX-Code
7067 \begin_layout LyX-Code
7071 \begin_layout Standard
7072 to change the font for chapter headings to sans-serif.
7073 This will override (or, in this case, add to) the existing declaration
7074 for the Chapter style.
7078 \begin_layout Standard
7079 Your new package may also provide commands or environments not present in
7081 In this case, you will want to add these to the layout file.
7083 \begin_inset CommandInset ref
7085 reference "sec:TextClass"
7089 for information on how to do so.
7092 \begin_layout Standard
7094 \begin_inset Flex Noun
7097 \begin_layout Plain Layout
7103 can be used with several different document classes, and even if it cannot,
7104 you might find it easiest just to write a module that you can load with
7106 The simplest possible such module would be:
7109 \begin_layout LyX-Code
7112 DeclareLyXModule{My Package}
7115 \begin_layout LyX-Code
7119 \begin_layout LyX-Code
7120 #Support for mypkg.sty.
7123 \begin_layout LyX-Code
7125 \begin_inset Newline newline
7131 \begin_layout LyX-Code
7133 \begin_inset Newline newline
7139 \begin_layout LyX-Code
7141 \begin_inset Newline newline
7147 \begin_inset Newline newline
7153 \begin_layout Standard
7154 A more complex module might modify the behavior of some existing constructs
7155 or define some new ones.
7157 \begin_inset CommandInset ref
7159 reference "sec:TextClass"
7166 \begin_layout Subsection
7168 \begin_inset Flex Noun
7171 \begin_layout Plain Layout
7180 \begin_layout Standard
7181 There are two possibilities here.
7182 One is that the class file is itself based upon an existing document class.
7183 For example, many thesis classes are based upon
7184 \begin_inset Flex Noun
7187 \begin_layout Plain Layout
7194 To see whether yours is, look for a line like
7197 \begin_layout LyX-Code
7203 \begin_layout Standard
7205 If so, then you may proceed largely as in the previous section, though
7207 \begin_inset Flex Code
7210 \begin_layout Plain Layout
7211 Declare\SpecialChar LaTeX
7217 line will be different.
7218 If your new class is
7219 \begin_inset Flex Code
7222 \begin_layout Plain Layout
7228 and it is based upon
7229 \begin_inset Flex Code
7232 \begin_layout Plain Layout
7238 , then the line should read:
7242 \begin_layout Plain Layout
7243 And it will be easiest if you save the file to
7244 \begin_inset Flex Code
7247 \begin_layout Plain Layout
7254 assumes that the document class has the same name as the layout file.
7263 \begin_layout LyX-Code
7266 DeclareLaTeXClass[thesis,book]{thesis}
7269 \begin_layout Standard
7270 If, on the other hand, the new class is not based upon an existing class,
7271 you will probably have to
7272 \begin_inset Quotes eld
7276 \begin_inset Quotes erd
7280 We strongly suggest copying an existing layout file which uses a similar
7282 class and then modifying it, if you can do so.
7283 At least use an existing file as a starting point so you can find out what
7284 items you need to worry about.
7285 Again, the specifics are covered below.
7288 \begin_layout Subsection
7290 \begin_inset CommandInset label
7292 name "subsec:Creating-Templates"
7299 \begin_layout Standard
7300 Once you have written a layout file for a new document class, you might
7301 want to consider writing a
7306 A template acts as a kind of tutorial for your layout, showing how it might
7307 be used, though containing dummy content.
7308 You can of course look at the various templates included with \SpecialChar LyX
7312 \begin_layout Standard
7313 Templates are created just like usual documents: using \SpecialChar LyX
7315 The only difference is that usual documents contain all possible settings,
7316 including the font scheme and the paper size.
7317 Usually a user doesn't want a template to overwrite his preferred settings
7318 for such parameters.
7319 For that reason, the designer of a template should remove the corresponding
7321 \begin_inset Flex Code
7324 \begin_layout Plain Layout
7333 \begin_inset Flex Code
7336 \begin_layout Plain Layout
7344 from the template \SpecialChar LyX
7346 This can be done with any simple text-editor, for example
7347 \begin_inset Flex Code
7350 \begin_layout Plain Layout
7357 \begin_inset Flex Code
7360 \begin_layout Plain Layout
7369 \begin_layout Standard
7370 Put the edited template files you create in
7371 \begin_inset Flex Code
7374 \begin_layout Plain Layout
7380 , copy the ones you use from the global template directory in
7381 \begin_inset Flex Code
7384 \begin_layout Plain Layout
7390 to the same place, and redefine the template path in the
7391 \begin_inset Flex Noun
7394 \begin_layout Plain Layout
7395 Tools\SpecialChar menuseparator
7396 Preferences\SpecialChar menuseparator
7405 \begin_layout Standard
7406 Note, by the way, that there is a template which has a particular meaning:
7408 \begin_inset Flex Code
7411 \begin_layout Plain Layout
7418 This template is loaded every time you create a new document with
7419 \begin_inset Flex Noun
7422 \begin_layout Plain Layout
7423 File\SpecialChar menuseparator
7429 in order to provide useful defaults.
7430 To create this template from inside \SpecialChar LyX
7431 , all you have to do is to open a document
7432 with the correct settings, and use the
7433 \begin_inset Flex Noun
7436 \begin_layout Plain Layout
7437 Save as Document Defaults
7445 \begin_layout Subsection
7446 Upgrading old layout files
7449 \begin_layout Standard
7450 The format of layout files changes with each \SpecialChar LyX
7451 release, so old layout files
7452 need to be converted to the new format.
7454 reads a layout file in an older format, it automatically calls the
7456 \begin_inset Flex Code
7459 \begin_layout Plain Layout
7465 to convert it to a temporary file in current format.
7466 The original file is left untouched.
7467 If you use the layout file often, then, you may want to convert it permanently,
7468 so that \SpecialChar LyX
7469 does not have to do so itself every time.
7470 To do this, you can call the converter manually:
7473 \begin_layout Enumerate
7475 \begin_inset Flex Code
7478 \begin_layout Plain Layout
7485 \begin_inset Flex Code
7488 \begin_layout Plain Layout
7497 \begin_layout Enumerate
7499 \begin_inset Newline newline
7503 \begin_inset Flex Code
7506 \begin_layout Plain Layout
7507 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7513 \begin_inset Newline newline
7517 \begin_inset Flex Code
7520 \begin_layout Plain Layout
7526 is the name of your \SpecialChar LyX
7530 \begin_layout Standard
7531 Note that manual conversion does not affect included files, so these will
7532 have to be converted separately.
7535 \begin_layout Section
7536 \begin_inset CommandInset label
7538 name "sec:TextClass"
7542 The layout file format
7545 \begin_layout Standard
7546 The following sections describe how layout files are structured and written.
7547 Our advice is to go slowly, save and test often.
7548 It is really not that hard, except that the multitude of options can become
7549 overwhelming, especially if you try to check out too many at once.
7550 It becomes easier if you use existing layouts of \SpecialChar LyX
7551 as examples/reference
7552 or if you modify an existing layout to your needs.
7555 \begin_layout Standard
7556 Note that all the tags used in layout files are case-insensitive.
7558 \begin_inset Flex Code
7561 \begin_layout Plain Layout
7568 \begin_inset Flex Code
7571 \begin_layout Plain Layout
7578 \begin_inset Flex Code
7581 \begin_layout Plain Layout
7587 are really the same tag.
7588 The possible arguments are printed in brackets after the tag's name.
7589 The default argument is typeset
7590 \begin_inset Flex Code
7593 \begin_layout Plain Layout
7602 If the argument has a data type like
7603 \begin_inset Quotes eld
7607 \begin_inset Quotes erd
7611 \begin_inset Quotes eld
7615 \begin_inset Quotes erd
7618 , the default is shown like this:
7619 \begin_inset Flex Code
7622 \begin_layout Plain Layout
7633 \begin_layout Subsection
7634 The document class declaration and classification
7637 \begin_layout Standard
7638 Lines in a layout file which begin with
7639 \begin_inset Flex Code
7642 \begin_layout Plain Layout
7649 There is one exception to this rule.
7651 \begin_inset Flex Code
7654 \begin_layout Plain Layout
7660 files should begin with lines like:
7663 \begin_layout LyX-Code
7666 #% Do not delete the line below; configure depends on this
7669 \begin_layout LyX-Code
7674 DeclareLaTeXClass{Article (Standard Class)}
7677 \begin_layout LyX-Code
7682 DeclareCategory{Articles}
7685 \begin_layout Standard
7686 The second and third lines are used when you (re)configure \SpecialChar LyX
7688 The layout file is read by the \SpecialChar LaTeX
7690 \begin_inset Flex Code
7693 \begin_layout Plain Layout
7699 , in a special mode where
7700 \begin_inset Flex Code
7703 \begin_layout Plain Layout
7710 The first line is just a \SpecialChar LaTeX
7711 comment, the second one contains the mandatory
7712 declaration of the text class and the third line contains the optional
7713 classification of the class.
7714 If these lines appear in a file named
7715 \begin_inset Flex Code
7718 \begin_layout Plain Layout
7724 , then they define a text class of name
7725 \begin_inset Flex Code
7728 \begin_layout Plain Layout
7734 (the name of the layout file) which uses the \SpecialChar LaTeX
7736 \begin_inset Flex Code
7739 \begin_layout Plain Layout
7745 (the default is to use the same name as the layout).
7747 \begin_inset Quotes eld
7750 Article (Standard Class)
7751 \begin_inset Quotes erd
7754 that appears above is used as a description of the text class in the
7755 \begin_inset Flex Noun
7758 \begin_layout Plain Layout
7759 Document\SpecialChar menuseparator
7767 \begin_inset Quotes eld
7771 \begin_inset Quotes erd
7774 in the example) is also used in the
7775 \begin_inset Flex Noun
7778 \begin_layout Plain Layout
7779 Document\SpecialChar menuseparator
7785 dialog: the text classes are grouped by these categories (which are usually
7786 genres, so typical categories are
7787 \begin_inset Quotes eld
7791 \begin_inset Quotes erd
7795 \begin_inset Quotes eld
7799 \begin_inset Quotes erd
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 If no category has been declared, the class will be put in the
7836 \begin_inset Quotes eld
7840 \begin_inset Quotes erd
7846 \begin_layout Standard
7847 Let's assume that you wrote your own text class that uses the
7848 \begin_inset Flex Code
7851 \begin_layout Plain Layout
7857 document class, but where you changed the appearance of the section headings.
7858 If you put it in a file
7859 \begin_inset Flex Code
7862 \begin_layout Plain Layout
7868 , the header of this file should be:
7871 \begin_layout LyX-Code
7874 #% Do not delete the line below; configure depends on this
7877 \begin_layout LyX-Code
7882 DeclareLaTeXClass[article]{Article (with My Own Headings)}
7885 \begin_layout LyX-Code
7890 DeclareCategory{Articles}
7893 \begin_layout Standard
7894 This declares a text class
7895 \begin_inset Flex Code
7898 \begin_layout Plain Layout
7904 , associated with the \SpecialChar LaTeX
7906 \begin_inset Flex Code
7909 \begin_layout Plain Layout
7916 \begin_inset Quotes eld
7919 Article (with My Own Headings)
7920 \begin_inset Quotes erd
7924 If your text class depends on several packages, you can declare it as:
7927 \begin_layout LyX-Code
7930 #% Do not delete the line below; configure depends on this
7933 \begin_layout LyX-Code
7938 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
7941 \begin_layout LyX-Code
7946 DeclareCategory{Articles}
7949 \begin_layout Standard
7950 This indicates that your text class uses the
7951 \begin_inset Flex Code
7954 \begin_layout Plain Layout
7961 Finally, it is also possible to declare classes for DocBook code.
7962 Typical declarations will look like:
7965 \begin_layout LyX-Code
7968 #% Do not delete the line below; configure depends on this
7971 \begin_layout LyX-Code
7976 DeclareDocBookClass[article]{SGML (DocBook Article)}
7979 \begin_layout LyX-Code
7984 DeclareCategory{Articles (DocBook)}
7987 \begin_layout Standard
7988 Note that these declarations can also be given an optional parameter declaring
7989 the name of the document class (but not a list).
7992 \begin_layout Standard
7993 So, to be as explicit as possible, the form of the layout declaration is:
7996 \begin_layout LyX-Code
8001 DeclareLaTeXClass[class,package.sty]{layout description}
8004 \begin_layout LyX-Code
8009 DeclareCategory{category}
8012 \begin_layout Standard
8013 The class need only be specified if the name of the \SpecialChar LaTeX
8015 name of the layout file are different or if there are packages to load.
8016 If the name of the class file is not specified, then \SpecialChar LyX
8018 that it is the same as the name of the layout file.
8021 \begin_layout Standard
8022 When the text class has been modified to your taste, all you have to do
8023 is to copy it either to
8024 \begin_inset Flex Code
8027 \begin_layout Plain Layout
8034 \begin_inset Flex Code
8037 \begin_layout Plain Layout
8044 \begin_inset Flex Noun
8047 \begin_layout Plain Layout
8048 Tools\SpecialChar menuseparator
8054 , exit \SpecialChar LyX
8056 Then your new text class should be available along with the others.
8059 \begin_layout Standard
8060 Once the layout file is installed, you can edit it and see your changes
8061 without having to reconfigure or to restart \SpecialChar LyX
8067 \begin_layout Plain Layout
8068 In versions of \SpecialChar LyX
8069 prior to 1.6, this was not true.
8070 As a result, editing layout files was very time consuming, since you had
8071 constantly to restart \SpecialChar LyX
8077 You can force a reload of the current layout by using the \SpecialChar LyX
8079 \begin_inset Flex Noun
8082 \begin_layout Plain Layout
8089 There is no default binding for this function—though, of course, you can
8090 bind it to a key yourself.
8091 But you will normally use this function simply by entering it in the mini-buffe
8096 \begin_layout Standard
8102 \begin_inset Flex Noun
8105 \begin_layout Plain Layout
8111 is very much an `advanced feature'.
8116 recommended that you save your work before using this function.
8121 recommended that you not attempt to edit layout information while simultaneousl
8122 y working on a document that you care about.
8123 Use a test document.
8124 Syntax errors and the like in your layout file could cause peculiar behavior.
8125 In particular, such errors could cause \SpecialChar LyX
8126 to regard the current layout as
8127 invalid and to attempt to switch to some other layout.
8131 \begin_layout Plain Layout
8132 Really bad syntax errors may even caused \SpecialChar LyX
8134 This is because certain sorts of errors may make \SpecialChar LyX
8145 The \SpecialChar LyX
8146 team strives to keep \SpecialChar LyX
8147 stable in such situations, but safe is better
8152 \begin_layout Plain Layout
8153 While we're giving advice: make regular backups.
8154 And be nice to your mother.
8162 \begin_layout Subsection
8163 The Module declaration
8166 \begin_layout Standard
8167 A module must begin with a line like the following:
8170 \begin_layout LyX-Code
8173 DeclareLyXModule[endnotes.sty]{Endnotes}
8176 \begin_layout Standard
8177 The mandatory argument, in curly brackets, is the name of the module, as
8179 \begin_inset Flex Noun
8182 \begin_layout Plain Layout
8183 Document\SpecialChar menuseparator
8184 Settings\SpecialChar menuseparator
8191 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8193 on which the module depends.
8194 It is also possible to use the form
8195 \begin_inset Flex Noun
8198 \begin_layout Plain Layout
8204 as an optional argument, which declares that the module can only be used
8205 when there exists a conversion chain between the formats `
8206 \begin_inset Flex Code
8209 \begin_layout Plain Layout
8216 \begin_inset Flex Code
8219 \begin_layout Plain Layout
8228 \begin_layout Standard
8229 The module declaration should then be followed by lines like the following
8233 \begin_layout Plain Layout
8234 Preferably in English if the module should be published with \SpecialChar LyX
8236 This description will appear in the list of messages to be translated and
8237 will be thus translated with the next interface update.
8245 \begin_layout LyX-Code
8249 \begin_layout LyX-Code
8250 #Adds an endnote command, in addition to footnotes.
8254 \begin_layout LyX-Code
8255 #You will need to add
8257 theendnotes in TeX code where you
8260 \begin_layout LyX-Code
8261 #want the endnotes to appear.
8265 \begin_layout LyX-Code
8269 \begin_layout LyX-Code
8270 #Requires: somemodule | othermodule
8273 \begin_layout LyX-Code
8274 #Excludes: badmodule
8277 \begin_layout Standard
8278 The description is used in
8279 \begin_inset Flex Noun
8282 \begin_layout Plain Layout
8283 Document\SpecialChar menuseparator
8284 Settings\SpecialChar menuseparator
8290 to provide the user with information about what the module does.
8292 \begin_inset Flex Code
8295 \begin_layout Plain Layout
8301 line is used to identify other modules with which this one must be used;
8303 \begin_inset Flex Code
8306 \begin_layout Plain Layout
8312 line is used to identify modules with which this one may not be used.
8313 Both are optional, and, as shown, multiple modules should be separated
8314 with the pipe symbol: |.
8315 Note that the required modules are treated disjunctively:
8319 of the required modules must be used.
8324 excluded module may be used.
8325 Note that modules are identified here by their filenames without the
8326 \begin_inset Flex Code
8329 \begin_layout Plain Layout
8337 \begin_inset Flex Code
8340 \begin_layout Plain Layout
8347 \begin_inset Flex Code
8350 \begin_layout Plain Layout
8359 \begin_layout Subsection
8363 \begin_layout Standard
8364 The first non-comment line of any layout file, included file, or module
8369 contain the file format number:
8372 \begin_layout Description
8373 \begin_inset Flex Code
8376 \begin_layout Plain Layout
8383 \begin_inset Flex Code
8386 \begin_layout Plain Layout
8392 ] The format number of the layout file.
8395 \begin_layout Standard
8396 This tag was introduced with \SpecialChar LyX
8398 \begin_inset space ~
8402 Layout files from older \SpecialChar LyX
8403 versions do not have an explicit file format and
8404 are considered to have
8405 \begin_inset Flex Code
8408 \begin_layout Plain Layout
8410 \begin_inset space ~
8419 The format for the present version of \SpecialChar LyX
8421 But each version of \SpecialChar LyX
8422 is capable of reading earlier versions' layout files,
8423 just as they are capable of reading files produced by earlier versions
8426 There is, however, no provision for converting to earlier formats.
8429 \begin_layout Subsection
8430 \begin_inset CommandInset label
8432 name "subsec:General-text-class"
8436 General text class parameters
8439 \begin_layout Standard
8440 These are general parameters that govern the behavior of an entire document
8446 mean that they must appear in
8447 \begin_inset Flex Code
8450 \begin_layout Plain Layout
8456 files rather than in modules.
8457 A module can contain any layout tag.)
8460 \begin_layout Description
8461 \begin_inset Flex Code
8464 \begin_layout Plain Layout
8470 Adds information that will be output in the
8471 \begin_inset Flex Code
8474 \begin_layout Plain Layout
8480 block when the document is output to XHTML.
8481 Typically, this would be used to output CSS style information, but it can
8482 be used for anything that can appear in
8483 \begin_inset Flex Code
8486 \begin_layout Plain Layout
8494 \begin_inset Quotes eld
8498 \begin_inset Flex Code
8501 \begin_layout Plain Layout
8508 \begin_inset Quotes erd
8514 \begin_layout Description
8515 \begin_inset Flex Code
8518 \begin_layout Plain Layout
8524 Adds information to the document preamble.
8526 \begin_inset Newline newline
8530 \begin_inset Quotes eld
8534 \begin_inset Flex Code
8537 \begin_layout Plain Layout
8544 \begin_inset Quotes erd
8550 \begin_layout Description
8551 \begin_inset Flex Code
8554 \begin_layout Plain Layout
8560 Defines formats for use in the display of bibliographic information.
8562 \begin_inset CommandInset ref
8564 reference "subsec:Citation-format-description"
8570 \begin_inset Quotes eld
8574 \begin_inset Flex Code
8577 \begin_layout Plain Layout
8584 \begin_inset Quotes erd
8590 \begin_layout Description
8591 \begin_inset Flex Code
8594 \begin_layout Plain Layout
8600 Describes various global options supported by the document class.
8602 \begin_inset CommandInset ref
8604 reference "subsec:ClassOptions"
8610 \begin_inset Quotes eld
8614 \begin_inset Flex Code
8617 \begin_layout Plain Layout
8624 \begin_inset Quotes erd
8630 \begin_layout Description
8631 \begin_inset Flex Code
8634 \begin_layout Plain Layout
8641 \begin_inset Flex Code
8644 \begin_layout Plain Layout
8653 \begin_inset space \thinspace{}
8657 \begin_inset Flex Code
8660 \begin_layout Plain Layout
8666 ] Whether the class should
8670 to having one or two columns.
8671 Can be changed in the
8672 \begin_inset Flex Noun
8675 \begin_layout Plain Layout
8676 Document\SpecialChar menuseparator
8685 \begin_layout Description
8686 \begin_inset Flex Code
8689 \begin_layout Plain Layout
8696 \begin_inset Flex Code
8699 \begin_layout Plain Layout
8705 ] This sequence defines the properties for a counter.
8706 If the counter does not yet exist, it is created; if it does exist, it
8709 \begin_inset Quotes eld
8713 \begin_inset Flex Code
8716 \begin_layout Plain Layout
8723 \begin_inset Quotes erd
8727 \begin_inset Newline newline
8731 \begin_inset CommandInset ref
8733 reference "subsec:Counters"
8737 for details on counters.
8740 \begin_layout Description
8741 \begin_inset Flex Code
8744 \begin_layout Plain Layout
8750 Sets the default font used to display the document.
8752 \begin_inset CommandInset ref
8754 reference "subsec:Font-description"
8758 for how to declare fonts.
8760 \begin_inset Quotes eld
8764 \begin_inset Flex Code
8767 \begin_layout Plain Layout
8774 \begin_inset Quotes erd
8780 \begin_layout Description
8781 \begin_inset Flex Code
8784 \begin_layout Plain Layout
8791 \begin_inset Flex Code
8794 \begin_layout Plain Layout
8800 ] Specifies a module to be included by default with this document class.
8801 The module is specified as filename without the
8802 \begin_inset Flex Code
8805 \begin_layout Plain Layout
8812 The user can still remove the module, but it will be active at the outset.
8813 (This applies only when new files are created, or when this class is chosen
8814 for an existing document.)
8817 \begin_layout Description
8818 \begin_inset Flex Code
8821 \begin_layout Plain Layout
8828 \begin_inset Flex Code
8831 \begin_layout Plain Layout
8837 ] This is the style that will be assigned to new paragraphs, usually
8838 \begin_inset Flex Noun
8841 \begin_layout Plain Layout
8848 This will default to the first defined style if not given, but you are
8849 encouraged to use this directive.
8852 \begin_layout Description
8853 \begin_inset Flex Code
8856 \begin_layout Plain Layout
8863 \begin_inset Flex Code
8866 \begin_layout Plain Layout
8872 ] This tag indicates that the module (which is specified by filename without
8874 \begin_inset Flex Code
8877 \begin_layout Plain Layout
8883 extension) cannot be used with this document class.
8884 This might be used in a journal-specific layout file to prevent, say, the
8886 \begin_inset Flex Code
8889 \begin_layout Plain Layout
8895 module that numbers theorems by section.
8900 be used in a module.
8901 Modules have their own way of excluding other modules (see
8902 \begin_inset CommandInset ref
8904 reference "subsec:Layout-modules"
8911 \begin_layout Description
8912 \begin_inset Flex Code
8915 \begin_layout Plain Layout
8921 Defines a new float.
8923 \begin_inset CommandInset ref
8925 reference "subsec:Floats"
8931 \begin_inset Quotes eld
8935 \begin_inset Flex Code
8938 \begin_layout Plain Layout
8945 \begin_inset Quotes erd
8951 \begin_layout Description
8952 \begin_inset Flex Code
8955 \begin_layout Plain Layout
8961 Sets the information that will be output in the
8962 \begin_inset Flex Code
8965 \begin_layout Plain Layout
8971 block when this document class is output to XHTML.
8972 Note that this will completely override any prior
8973 \begin_inset Flex Code
8976 \begin_layout Plain Layout
8983 \begin_inset Flex Code
8986 \begin_layout Plain Layout
8994 \begin_inset Newline newline
8998 \begin_inset Flex Code
9001 \begin_layout Plain Layout
9007 if you just want to add material to the preamble.) Must end with
9008 \begin_inset Quotes eld
9012 \begin_inset Flex Code
9015 \begin_layout Plain Layout
9022 \begin_inset Quotes erd
9028 \begin_layout Description
9029 \begin_inset Flex Code
9032 \begin_layout Plain Layout
9039 \begin_inset Flex Code
9042 \begin_layout Plain Layout
9048 ] The style to use for the table of contents, bibliography, and so forth,
9049 when the document is output to HTML.
9050 For articles, this should normally be
9051 \begin_inset Flex Code
9054 \begin_layout Plain Layout
9061 \begin_inset Flex Code
9064 \begin_layout Plain Layout
9071 If it is not given, then \SpecialChar LyX
9072 will attempt to figure out which layout to use.
9075 \begin_layout Description
9076 \begin_inset Flex Code
9079 \begin_layout Plain Layout
9086 \begin_inset Flex Code
9089 \begin_layout Plain Layout
9095 ] Modifies the properties of the given counter.
9096 If the counter does not exist, the statement is ignored.
9098 \begin_inset Quotes eld
9102 \begin_inset Flex Code
9105 \begin_layout Plain Layout
9112 \begin_inset Quotes erd
9116 \begin_inset Newline newline
9120 \begin_inset CommandInset ref
9122 reference "subsec:Counters"
9126 for details on counters.
9129 \begin_layout Description
9130 \begin_inset Flex Code
9133 \begin_layout Plain Layout
9140 \begin_inset Flex Code
9143 \begin_layout Plain Layout
9149 ] This allows you to include another layout definition file within yours
9150 to avoid duplicating commands.
9151 Common examples are the standard layout files, for example,
9152 \begin_inset Flex Code
9155 \begin_layout Plain Layout
9161 , which contains most of the basic layouts.
9164 \begin_layout Description
9165 \begin_inset Flex Code
9168 \begin_layout Plain Layout
9175 \begin_inset Flex Code
9178 \begin_layout Plain Layout
9184 ] This section (re-)defines the layout of an inset.
9185 It can be applied to an existing inset or to a new, user-defined inset,
9186 e.g., a new character style.
9188 \begin_inset Quotes eld
9192 \begin_inset Flex Code
9195 \begin_layout Plain Layout
9202 \begin_inset Quotes erd
9206 \begin_inset Newline newline
9210 \begin_inset CommandInset ref
9212 reference "subsec:Flex-insets-and"
9216 for more information.
9220 \begin_layout Description
9221 \begin_inset Flex Code
9224 \begin_layout Plain Layout
9231 \begin_inset Flex Code
9234 \begin_layout Plain Layout
9240 ] A string that indicates the width of the left margin on the screen, for
9242 \begin_inset Quotes eld
9246 \begin_inset Flex Code
9249 \begin_layout Plain Layout
9256 \begin_inset Quotes erd
9260 (Note that this is not a `length', like
9261 \begin_inset Quotes eld
9265 \begin_inset Quotes erd
9271 \begin_layout Description
9272 \begin_inset Flex Code
9275 \begin_layout Plain Layout
9282 \begin_inset Flex Code
9285 \begin_layout Plain Layout
9291 ] Modifies the properties of the given paragraph style.
9292 If the style does not exist, this section is ignored.
9294 \begin_inset Quotes eld
9298 \begin_inset Flex Code
9301 \begin_layout Plain Layout
9308 \begin_inset Quotes erd
9314 \begin_layout Description
9315 \begin_inset Flex Code
9318 \begin_layout Plain Layout
9325 \begin_inset Flex Code
9328 \begin_layout Plain Layout
9334 ] Deletes an existing counter, usually one defined in an included file.
9337 \begin_layout Description
9338 \begin_inset Flex Code
9341 \begin_layout Plain Layout
9348 \begin_inset Flex Code
9351 \begin_layout Plain Layout
9357 ] Deletes an existing float.
9358 This is particularly useful when you want to suppress a float that has
9359 been defined in an input file.
9362 \begin_layout Description
9363 \begin_inset Flex Code
9366 \begin_layout Plain Layout
9373 \begin_inset Flex Code
9376 \begin_layout Plain Layout
9382 ] Deletes an existing style.
9385 \begin_layout Description
9386 \begin_inset Flex Code
9389 \begin_layout Plain Layout
9396 \begin_inset Flex Code
9399 \begin_layout Plain Layout
9405 ] The file format (as defined in the \SpecialChar LyX
9406 preferences) produced by this document
9408 It is mainly useful when
9409 \begin_inset Flex Code
9412 \begin_layout Plain Layout
9419 \begin_inset Flex Code
9422 \begin_layout Plain Layout
9428 and one wants to define a new type of literate document.
9429 The format is reset to
9430 \begin_inset Quotes eld
9434 \begin_inset Flex Code
9437 \begin_layout Plain Layout
9444 \begin_inset Quotes erd
9448 \begin_inset Quotes eld
9452 \begin_inset Flex Code
9455 \begin_layout Plain Layout
9462 \begin_inset Quotes erd
9465 when the corresponding
9466 \begin_inset Flex Code
9469 \begin_layout Plain Layout
9475 parameter is encountered.
9478 \begin_layout Description
9479 \begin_inset Flex Code
9482 \begin_layout Plain Layout
9489 \begin_inset Flex Code
9492 \begin_layout Plain Layout
9503 \begin_inset Flex Code
9506 \begin_layout Plain Layout
9513 \begin_inset Flex Code
9516 \begin_layout Plain Layout
9522 ] Specifies what sort of output documents using this class will produce.
9525 \begin_layout Description
9526 \begin_inset Flex Code
9529 \begin_layout Plain Layout
9536 \begin_inset Flex Code
9539 \begin_layout Plain Layout
9546 \begin_inset Flex Code
9549 \begin_layout Plain Layout
9555 ] Specifies options, given in the second string, for the package named by
9558 \begin_inset Quotes eld
9562 \begin_inset Flex Code
9565 \begin_layout Plain Layout
9566 PackageOptions natbib square
9572 \begin_inset Quotes erd
9576 \begin_inset Flex Code
9579 \begin_layout Plain Layout
9585 to be loaded with the
9586 \begin_inset Flex Code
9589 \begin_layout Plain Layout
9596 (For \SpecialChar TeX
9597 perts, this causes \SpecialChar LyX
9599 \begin_inset Flex Code
9602 \begin_layout Plain Layout
9605 PassOptionsToPackage{natbib}{square}
9611 \begin_inset Flex Code
9614 \begin_layout Plain Layout
9623 \begin_layout Description
9624 \begin_inset Flex Code
9627 \begin_layout Plain Layout
9634 \begin_inset Flex Code
9637 \begin_layout Plain Layout
9646 \begin_inset Flex Code
9649 \begin_layout Plain Layout
9656 \begin_inset Flex Code
9659 \begin_layout Plain Layout
9665 ] The default pagestyle.
9666 Can be changed in the
9667 \begin_inset Flex Noun
9670 \begin_layout Plain Layout
9671 Document\SpecialChar menuseparator
9680 \begin_layout Description
9681 \begin_inset Flex Code
9684 \begin_layout Plain Layout
9690 Sets the preamble for the \SpecialChar LaTeX
9692 Note that this will completely override any prior
9693 \begin_inset Flex Code
9696 \begin_layout Plain Layout
9703 \begin_inset Flex Code
9706 \begin_layout Plain Layout
9714 \begin_inset Flex Code
9717 \begin_layout Plain Layout
9723 if you just want to add material to the preamble.) Must end with
9724 \begin_inset Quotes eld
9728 \begin_inset Flex Code
9731 \begin_layout Plain Layout
9738 \begin_inset Quotes erd
9744 \begin_layout Description
9745 \begin_inset Flex Code
9748 \begin_layout Plain Layout
9755 \begin_inset Flex Code
9758 \begin_layout Plain Layout
9765 \begin_inset Flex Code
9768 \begin_layout Plain Layout
9777 \begin_inset space \thinspace{}
9781 \begin_inset Flex Code
9784 \begin_layout Plain Layout
9790 ] Whether the class already provides the feature
9791 \begin_inset Flex Code
9794 \begin_layout Plain Layout
9801 A feature is in general the name of a package (e.
9802 \begin_inset space \thinspace{}
9806 \begin_inset space \space{}
9810 \begin_inset Flex Code
9813 \begin_layout Plain Layout
9820 \begin_inset Flex Code
9823 \begin_layout Plain Layout
9830 \begin_inset space \thinspace{}
9834 \begin_inset space \space{}
9838 \begin_inset Flex Code
9841 \begin_layout Plain Layout
9848 \begin_inset Flex Code
9851 \begin_layout Plain Layout
9859 \begin_inset CommandInset ref
9861 reference "chap:List-of-functions"
9865 for the list of features.
9868 \begin_layout Description
9869 \begin_inset Flex Code
9872 \begin_layout Plain Layout
9879 \begin_inset Flex Code
9882 \begin_layout Plain Layout
9888 ] Indicates that this layout provides the functionality of the module mentioned,
9889 which should be specified by the filename without the
9890 \begin_inset Flex Code
9893 \begin_layout Plain Layout
9900 This will typically be used if the layout includes the module directly,
9901 rather than using the
9902 \begin_inset Flex Code
9905 \begin_layout Plain Layout
9911 tag to indicate that it ought to be used.
9912 It could also be used in a module that provided an alternate implementation
9913 of the same functionality.
9916 \begin_layout Description
9917 \begin_inset Flex Code
9920 \begin_layout Plain Layout
9927 \begin_inset Flex Code
9930 \begin_layout Plain Layout
9936 ] Creates a new paragraph style if it does not already exist.
9937 If the style does exist, this section is ignored.
9939 \begin_inset Quotes eld
9943 \begin_inset Flex Code
9946 \begin_layout Plain Layout
9953 \begin_inset Quotes erd
9959 \begin_layout Description
9960 \begin_inset Flex Code
9963 \begin_layout Plain Layout
9970 \begin_inset Flex Code
9973 \begin_layout Plain Layout
9979 ] Whether the class requires the feature
9980 \begin_inset Flex Code
9983 \begin_layout Plain Layout
9990 Multiple features must be separated by commas.
9991 Note that you can only request supported features.
9993 \begin_inset CommandInset ref
9995 reference "chap:List-of-functions"
9999 for the list of features.).
10000 If you require a package with specific options, you can additionally use
10002 \begin_inset Flex Code
10005 \begin_layout Plain Layout
10014 \begin_layout Description
10015 \begin_inset Flex Code
10018 \begin_layout Plain Layout
10025 \begin_inset Flex Code
10028 \begin_layout Plain Layout
10034 ] A string that indicates the width of the right margin on the screen, for
10036 \begin_inset Quotes eld
10040 \begin_inset Flex Code
10043 \begin_layout Plain Layout
10050 \begin_inset Quotes erd
10056 \begin_layout Description
10057 \begin_inset Flex Code
10060 \begin_layout Plain Layout
10067 \begin_inset Flex Code
10070 \begin_layout Plain Layout
10076 ] Sets which divisions get numbered.
10078 \begin_inset Newline newline
10082 \begin_inset Flex Code
10085 \begin_layout Plain Layout
10091 counter in \SpecialChar LaTeX
10095 \begin_layout Description
10096 \begin_inset Flex Code
10099 \begin_layout Plain Layout
10106 \begin_inset Flex Code
10109 \begin_layout Plain Layout
10118 \begin_inset space \thinspace{}
10122 \begin_inset Flex Code
10125 \begin_layout Plain Layout
10131 ] Whether the class-default should be printing on one or both sides of the
10133 Can be changed in the
10134 \begin_inset Flex Noun
10137 \begin_layout Plain Layout
10138 Document\SpecialChar menuseparator
10147 \begin_layout Description
10148 \begin_inset Flex Code
10151 \begin_layout Plain Layout
10158 \begin_inset Flex Code
10161 \begin_layout Plain Layout
10167 ] This sequence defines a paragraph style.
10168 If the style does not yet exist, it is created; if it does exist, its parameter
10171 \begin_inset Quotes eld
10175 \begin_inset Flex Code
10178 \begin_layout Plain Layout
10185 \begin_inset Quotes erd
10189 \begin_inset Newline newline
10193 \begin_inset CommandInset ref
10195 reference "subsec:Paragraph-Styles"
10199 for details on paragraph styles.
10202 \begin_layout Description
10203 \begin_inset Flex Code
10206 \begin_layout Plain Layout
10213 \begin_inset Flex Code
10216 \begin_layout Plain Layout
10222 ] The name of the command or environment to be used with
10223 \begin_inset Flex Code
10226 \begin_layout Plain Layout
10235 \begin_layout Description
10236 \begin_inset Flex Code
10239 \begin_layout Plain Layout
10246 \begin_inset Flex Code
10249 \begin_layout Plain Layout
10258 \begin_inset Flex Code
10261 \begin_layout Plain Layout
10267 ] Indicates what kind of markup is used to define the title of a document.
10269 \begin_inset Flex Code
10272 \begin_layout Plain Layout
10278 means that the macro with name
10279 \begin_inset Flex Code
10282 \begin_layout Plain Layout
10288 will be inserted after the last layout which has
10289 \begin_inset Quotes eld
10293 \begin_inset Flex Code
10296 \begin_layout Plain Layout
10298 \begin_inset space ~
10307 \begin_inset Quotes erd
10312 \begin_inset Flex Code
10315 \begin_layout Plain Layout
10321 corresponds to the case where all layouts which have
10322 \begin_inset Quotes eld
10326 \begin_inset Flex Code
10329 \begin_layout Plain Layout
10331 \begin_inset space ~
10340 \begin_inset Quotes erd
10343 should be enclosed into the
10344 \begin_inset Flex Code
10347 \begin_layout Plain Layout
10356 \begin_layout Description
10357 \begin_inset Flex Code
10360 \begin_layout Plain Layout
10367 \begin_inset Flex Code
10370 \begin_layout Plain Layout
10376 ] Sets which divisions are included in the table of contents.
10378 \begin_inset Flex Code
10381 \begin_layout Plain Layout
10387 counter in \SpecialChar LaTeX
10391 \begin_layout Subsection
10392 \begin_inset Flex Code
10395 \begin_layout Plain Layout
10402 \begin_inset CommandInset label
10404 name "subsec:ClassOptions"
10411 \begin_layout Standard
10413 \begin_inset Flex Code
10416 \begin_layout Plain Layout
10422 section can contain the following entries:
10425 \begin_layout Description
10426 \begin_inset Flex Code
10429 \begin_layout Plain Layout
10436 \begin_inset Flex Code
10439 \begin_layout Plain Layout
10445 ] The list of available font sizes for the document's main font, separated
10447 \begin_inset Quotes eld
10451 \begin_inset Flex Code
10454 \begin_layout Plain Layout
10461 \begin_inset Quotes erd
10467 \begin_layout Description
10468 \begin_inset Flex Code
10471 \begin_layout Plain Layout
10477 Used to set the DTD line with XML-based output classes.
10479 \begin_inset space \thinspace{}
10483 \begin_inset Quotes eld
10486 -//OASIS//DTD DocBook V4.2//EN
10487 \begin_inset Quotes erd
10493 \begin_layout Description
10494 \begin_inset Flex Code
10497 \begin_layout Plain Layout
10504 \begin_inset Flex Code
10507 \begin_layout Plain Layout
10508 string="empty|plain|headings|fancy"
10513 ] The list of available page sty\SpecialChar softhyphen
10515 \begin_inset Quotes eld
10519 \begin_inset Flex Code
10522 \begin_layout Plain Layout
10529 \begin_inset Quotes erd
10535 \begin_layout Description
10536 \begin_inset Flex Code
10539 \begin_layout Plain Layout
10546 \begin_inset Flex Code
10549 \begin_layout Plain Layout
10555 ] Some document class options, separated by a comma, that will be added
10556 to the optional part of the
10557 \begin_inset Flex Code
10560 \begin_layout Plain Layout
10571 \begin_layout Standard
10573 \begin_inset Flex Code
10576 \begin_layout Plain Layout
10582 section must end with
10583 \begin_inset Quotes eld
10587 \begin_inset Flex Code
10590 \begin_layout Plain Layout
10597 \begin_inset Quotes erd
10603 \begin_layout Subsection
10605 \begin_inset CommandInset label
10607 name "subsec:Paragraph-Styles"
10614 \begin_layout Standard
10615 A paragraph style description looks like this:
10619 \begin_layout Plain Layout
10620 Note that this will either define a new style or modify an existing one.
10628 \begin_layout LyX-Code
10635 \begin_layout LyX-Code
10639 \begin_layout LyX-Code
10643 \begin_layout Standard
10644 where the following commands are allowed:
10647 \begin_layout Description
10648 \begin_inset Flex Code
10651 \begin_layout Plain Layout
10658 \begin_inset Flex Code
10661 \begin_layout Plain Layout
10666 , left, right, center
10671 ] Paragraph alignment.
10674 \begin_layout Description
10675 \begin_inset Flex Code
10678 \begin_layout Plain Layout
10685 \begin_inset Flex Code
10688 \begin_layout Plain Layout
10693 , left, right, center
10698 ] A comma separated list of permitted alignments.
10699 (Some \SpecialChar LaTeX
10700 styles prohibit certain alignments, since those wouldn't make sense.
10701 For example a right-aligned or centered enumeration isn't possible.)
10704 \begin_layout Description
10705 \begin_inset Flex Code
10708 \begin_layout Plain Layout
10715 \begin_inset Flex Code
10718 \begin_layout Plain Layout
10724 ] Defines argument number <int> of a command\SpecialChar breakableslash
10725 environment associated with
10727 This is useful for things like section headings, and only makes sense with
10730 Every (optional or required) argument of a command or environment – except
10731 for the required argument that is associated with the content of the paragraph
10732 itself – has a separate definition, where the number specifies the order
10734 The definition must end with
10735 \begin_inset Flex Code
10738 \begin_layout Plain Layout
10745 So a command with two optional arguments has:
10749 \begin_layout Quote
10755 \begin_layout Quote
10761 \begin_layout Quote
10767 \begin_layout Quote
10773 \begin_layout Quote
10779 \begin_layout Quote
10785 \begin_layout Standard
10787 \begin_inset Flex Code
10790 \begin_layout Plain Layout
10796 definition, the following specifications are possible:
10799 \begin_layout Itemize
10800 \begin_inset Flex Code
10803 \begin_layout Plain Layout
10810 \begin_inset Flex Code
10813 \begin_layout Plain Layout
10819 The string that will appear both in the menu (to insert this argument)
10820 and on the argument inset button (unless you also specify a separate
10821 \begin_inset Flex Code
10824 \begin_layout Plain Layout
10831 For the menu, you can define an accelerator by appending the respective
10832 character to the string, divided by
10833 \begin_inset Quotes eld
10837 \begin_inset Quotes erd
10841 \begin_inset space \thinspace{}
10845 \begin_inset space \space{}
10849 \begin_inset Quotes eld
10853 \begin_inset Flex Code
10856 \begin_layout Plain Layout
10863 \begin_inset Quotes erd
10869 \begin_layout Itemize
10870 \begin_inset Flex Code
10873 \begin_layout Plain Layout
10880 \begin_inset Flex Code
10883 \begin_layout Plain Layout
10889 A separate string for the menu.
10890 You can define an accelerator by appending the respective character to
10891 the string, divided by
10892 \begin_inset Quotes eld
10896 \begin_inset Quotes erd
10900 \begin_inset space \thinspace{}
10904 \begin_inset space \space{}
10908 \begin_inset Quotes eld
10912 \begin_inset Flex Code
10915 \begin_layout Plain Layout
10922 \begin_inset Quotes erd
10926 This specification is optional.
10927 If it is not given the
10928 \begin_inset Flex Code
10931 \begin_layout Plain Layout
10937 will be used instead for the menu.
10940 \begin_layout Itemize
10941 \begin_inset Flex Code
10944 \begin_layout Plain Layout
10951 \begin_inset Flex Code
10954 \begin_layout Plain Layout
10960 A longer explanatory text that appears in the tooltip when hovering over
10961 the argument inset.
10964 \begin_layout Itemize
10965 \begin_inset Flex Code
10968 \begin_layout Plain Layout
10975 \begin_inset Flex Code
10978 \begin_layout Plain Layout
10987 \begin_inset space \thinspace{}
10991 \begin_inset Flex Code
10994 \begin_layout Plain Layout
11000 ] Declare if this is a mandatory (1) or an optional (0) argument.
11001 Mandatory arguments will be output empty if not given, while optional arguments
11002 will not be output at all.
11003 By default, mandatory arguments are delimited by
11004 \begin_inset Flex Code
11007 \begin_layout Plain Layout
11013 , while optional arguments are delimited by
11014 \begin_inset Flex Code
11017 \begin_layout Plain Layout
11026 \begin_layout Itemize
11027 \begin_inset Flex Code
11030 \begin_layout Plain Layout
11037 \begin_inset Flex Code
11040 \begin_layout Plain Layout
11046 defines another argument (by its number) which this argument requires to
11047 be output if it is itself output.
11049 \begin_inset space \thinspace{}
11052 g., in \SpecialChar LaTeX
11053 commands, optional arguments often require previous optional arguments
11054 to be output (at least empty), as in
11055 \begin_inset Flex Code
11058 \begin_layout Plain Layout
11061 command[][argument]{text}
11067 This can be achieved by the statement
11068 \begin_inset Flex Code
11071 \begin_layout Plain Layout
11078 \begin_inset Flex Code
11081 \begin_layout Plain Layout
11090 \begin_layout Itemize
11091 \begin_inset Flex Code
11094 \begin_layout Plain Layout
11101 \begin_inset Flex Code
11104 \begin_layout Plain Layout
11110 defines a custom left delimiter (instead of
11111 \begin_inset Flex Code
11114 \begin_layout Plain Layout
11121 \begin_inset Flex Code
11124 \begin_layout Plain Layout
11131 A line break in the output can be indicated by
11132 \begin_inset Flex Code
11135 \begin_layout Plain Layout
11144 \begin_layout Itemize
11145 \begin_inset Flex Code
11148 \begin_layout Plain Layout
11155 \begin_inset Flex Code
11158 \begin_layout Plain Layout
11164 defines a custom right delimiter (instead of
11165 \begin_inset Flex Code
11168 \begin_layout Plain Layout
11175 \begin_inset Flex Code
11178 \begin_layout Plain Layout
11185 A line break in the output can be indicated by
11186 \begin_inset Flex Code
11189 \begin_layout Plain Layout
11198 \begin_layout Itemize
11199 \begin_inset Flex Code
11202 \begin_layout Plain Layout
11209 \begin_inset Flex Code
11212 \begin_layout Plain Layout
11218 defines an argument that is inserted if and only if no user-specified arguments
11220 \begin_inset space \thinspace{}
11224 \begin_inset space \space{}
11227 if no argument inset has been inserted (note that also an empty argument
11228 inset omits the DefaultArg).
11229 Multiple arguments need to be separated by comma.
11232 \begin_layout Itemize
11233 \begin_inset Flex Code
11236 \begin_layout Plain Layout
11243 \begin_inset Flex Code
11246 \begin_layout Plain Layout
11252 defines an argument that is inserted in any case (alone or in addition
11253 to user-specified arguments).
11254 Multiple arguments need to be separated by comma.
11257 \begin_layout Itemize
11258 \begin_inset Flex Code
11261 \begin_layout Plain Layout
11267 The font used for the argument content, see
11268 \begin_inset CommandInset ref
11270 reference "subsec:Font-description"
11277 \begin_layout Itemize
11278 \begin_inset Flex Code
11281 \begin_layout Plain Layout
11287 The font used for the label; 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
11308 \begin_inset Flex Code
11311 \begin_layout Plain Layout
11316 , Minimalistic, Conglomerate
11321 ] describes the rendering style used for the inset's frame and buttons.
11324 \begin_layout Itemize
11325 \begin_inset Flex Code
11328 \begin_layout Plain Layout
11335 \begin_inset Flex Code
11338 \begin_layout Plain Layout
11345 \begin_inset Flex Code
11348 \begin_layout Plain Layout
11354 , this argument is automatically inserted when the respective style is selected.
11355 Currently, only one argument per style\SpecialChar breakableslash
11356 layout can be automatically inserted.
11359 \begin_layout Itemize
11360 \begin_inset Flex Code
11363 \begin_layout Plain Layout
11370 \begin_inset Flex Code
11373 \begin_layout Plain Layout
11380 \begin_inset Flex Code
11383 \begin_layout Plain Layout
11389 , this argument will be inserted with a copy of the co-text (either selected
11390 text or the whole paragraph) as content.
11393 \begin_layout Itemize
11394 \begin_inset Flex Code
11397 \begin_layout Plain Layout
11404 \begin_inset Flex Code
11407 \begin_layout Plain Layout
11408 string of characters
11417 Defines individual characters that should be output in raw form, meaning
11418 without special translations that \SpecialChar LaTeX
11420 Note that, contrary to PassThru, this needs to be explicitly defined for
11422 That is, arguments do not inherit PassThruChars from their parent inset
11426 \begin_layout Standard
11427 By default, the text entered in the \SpecialChar LyX
11428 workarea in the respective layout is
11429 the last (mandatory) argument of a command if the
11430 \begin_inset Flex Code
11433 \begin_layout Plain Layout
11440 \begin_inset Flex Code
11443 \begin_layout Plain Layout
11450 However, arguments with the prefix
11451 \begin_inset Flex Code
11454 \begin_layout Plain Layout
11460 are output after this workarea argument.
11461 Note that post-argument numbering restarts at 1, so the first argument
11462 following the workarea argument is
11463 \begin_inset Flex Code
11466 \begin_layout Plain Layout
11473 Post-arguments are ignored in any other
11474 \begin_inset Flex Code
11477 \begin_layout Plain Layout
11484 \begin_inset Flex Code
11487 \begin_layout Plain Layout
11496 \begin_layout Standard
11498 \begin_inset Flex Code
11501 \begin_layout Plain Layout
11510 \begin_inset Flex Code
11513 \begin_layout Plain Layout
11522 \begin_inset Flex Code
11525 \begin_layout Plain Layout
11531 followed by the number (e.
11532 \begin_inset space \thinspace{}
11536 \begin_inset space \space{}
11540 \begin_inset Flex Code
11543 \begin_layout Plain Layout
11553 \begin_layout Description
11554 \begin_inset Flex Code
11557 \begin_layout Plain Layout
11563 Note that this will completely override any prior
11564 \begin_inset Flex Code
11567 \begin_layout Plain Layout
11573 declaration for this style.
11575 \begin_inset Quotes eld
11579 \begin_inset Flex Code
11582 \begin_layout Plain Layout
11589 \begin_inset Quotes erd
11594 \begin_inset CommandInset ref
11596 reference "subsec:I18n"
11600 for details on its use.
11603 \begin_layout Description
11604 \begin_inset Flex Code
11607 \begin_layout Plain Layout
11614 \begin_inset Flex Code
11617 \begin_layout Plain Layout
11627 \begin_layout Plain Layout
11628 Note that a `float' here is a real number, such as: 1.5.
11633 The vertical space with which the last of a chain of paragraphs with this
11634 style is separated from the following paragraph.
11635 If the next paragraph has another style, the separations are not simply
11636 added, but the maximum is taken.
11639 \begin_layout Description
11640 \begin_inset Flex Code
11643 \begin_layout Plain Layout
11650 \begin_inset Flex Code
11653 \begin_layout Plain Layout
11659 ] The category for this style.
11660 This is used to group related styles in the style combobox on the toolbar.
11661 Any string can be used, but you may want to use existing categories with
11666 \begin_layout Description
11667 \begin_inset Flex Code
11670 \begin_layout Plain Layout
11676 Depth of XML command.
11677 Used only with XML-type formats.
11680 \begin_layout Description
11681 \begin_inset Flex Code
11684 \begin_layout Plain Layout
11691 \begin_inset Flex Code
11694 \begin_layout Plain Layout
11700 ] Copies all the features of an existing style into the current one.
11704 \begin_layout Description
11705 \begin_inset Flex Code
11708 \begin_layout Plain Layout
11715 \begin_inset Flex Code
11718 \begin_layout Plain Layout
11724 ] The name of a style whose preamble should be output
11729 This allows to ensure some ordering of the preamble snippets when macros
11730 definitions depend on one another.
11734 \begin_layout Plain Layout
11735 Note that, besides that functionality, there is no way to ensure any ordering
11737 The ordering that you see in a given version of \SpecialChar LyX
11738 may change without warning
11747 \begin_layout Description
11748 \begin_inset Flex Code
11751 \begin_layout Plain Layout
11758 \begin_inset Flex Code
11761 \begin_layout Plain Layout
11766 , Box, Filled_Box, Static
11771 ] The type of label that stands at the end of the paragraph (or sequence
11773 \begin_inset Flex Code
11776 \begin_layout Plain Layout
11783 \begin_inset Newline newline
11787 \begin_inset Flex Code
11790 \begin_layout Plain Layout
11797 \begin_inset Flex Code
11800 \begin_layout Plain Layout
11807 \begin_inset Flex Code
11810 \begin_layout Plain Layout
11818 \begin_inset Flex Code
11821 \begin_layout Plain Layout
11828 \begin_inset Quotes eld
11832 \begin_inset Quotes erd
11836 \begin_inset Flex Code
11839 \begin_layout Plain Layout
11846 \begin_inset space \space{}
11850 \begin_inset Flex Code
11853 \begin_layout Plain Layout
11859 ) is a white (resp.
11860 \begin_inset space ~
11863 black) square suitable for end of proof markers,
11864 \begin_inset Flex Code
11867 \begin_layout Plain Layout
11873 is an explicit text string.
11876 \begin_layout Description
11877 \begin_inset Flex Code
11880 \begin_layout Plain Layout
11887 \begin_inset Flex Code
11890 \begin_layout Plain Layout
11896 ] The string used for a label with a
11897 \begin_inset Flex Code
11900 \begin_layout Plain Layout
11907 \begin_inset Newline newline
11911 \begin_inset Flex Code
11914 \begin_layout Plain Layout
11924 \begin_layout Description
11925 \begin_inset Flex Code
11928 \begin_layout Plain Layout
11934 The font used for both the text body
11940 \begin_inset CommandInset ref
11942 reference "subsec:Font-description"
11947 Note that defining this font automatically defines the
11948 \begin_inset Flex Code
11951 \begin_layout Plain Layout
11958 So you should define this one first if you also want to define
11959 \begin_inset Flex Code
11962 \begin_layout Plain Layout
11971 \begin_layout Description
11972 \begin_inset Flex Code
11975 \begin_layout Plain Layout
11982 \begin_inset Flex Code
11985 \begin_layout Plain Layout
11991 ] Used for backporting new styles to stable \SpecialChar LyX
11993 The first stable version that supports this tag is \SpecialChar LyX
11995 The argument is a number which may either be 0, -1 or any value greater
11998 \begin_inset Flex Code
12001 \begin_layout Plain Layout
12007 flag of a style is greater than zero, it will always be written to the
12009 If a .lyx file is read, the style definitions from the document header are
12010 added to the document class.
12011 Therefore even older \SpecialChar LyX
12012 versions can handle the style.
12014 \begin_inset Flex Code
12017 \begin_layout Plain Layout
12023 is a version number: if the style is read, and the version number is less
12024 than the version number of the already existing style in the document class,
12025 the new style is ignored.
12026 If the version number is greater, the new style replaces the existing style.
12027 A value of -1 means an infinite version number, i.
12028 \begin_inset space \thinspace{}
12032 \begin_inset space \space{}
12035 the style is always used.
12038 \begin_layout Description
12039 \begin_inset Flex Code
12042 \begin_layout Plain Layout
12049 \begin_inset Flex Code
12052 \begin_layout Plain Layout
12061 \begin_inset space \thinspace{}
12065 \begin_inset Flex Code
12068 \begin_layout Plain Layout
12074 ] Usually \SpecialChar LyX
12075 does not allow you to insert more than one space between words,
12076 since a space is considered as the separation between two words, not a
12077 character or symbol of its own.
12078 This is a very fine thing but sometimes annoying, for example, when typing
12079 program code or plain \SpecialChar LaTeX
12082 \begin_inset Flex Code
12085 \begin_layout Plain Layout
12092 Note that \SpecialChar LyX
12093 will create protected blanks for the additional blanks when
12094 in another mode than \SpecialChar LaTeX
12098 \begin_layout Description
12099 \begin_inset Flex Code
12102 \begin_layout Plain Layout
12108 These tags are used with XHTML output.
12110 \begin_inset CommandInset ref
12112 reference "subsec:Paragraph-Style-XHTML"
12119 \begin_layout Description
12120 \begin_inset Flex Code
12123 \begin_layout Plain Layout
12129 [FIXME] (Used only with XML-type formats.)
12132 \begin_layout Description
12133 \begin_inset Flex Code
12136 \begin_layout Plain Layout
12143 \begin_inset Flex Code
12146 \begin_layout Plain Layout
12155 \begin_inset space \thinspace{}
12159 \begin_inset Flex Code
12162 \begin_layout Plain Layout
12169 \begin_inset Flex Code
12172 \begin_layout Plain Layout
12178 , marks the style as to be included in the document preamble and not in
12180 This is useful for document classes that want such information as the title
12181 and author to appear in the preamble.
12182 Note that this works only for styles for which the
12183 \begin_inset Flex Code
12186 \begin_layout Plain Layout
12193 \begin_inset Flex Code
12196 \begin_layout Plain Layout
12203 \begin_inset Flex Code
12206 \begin_layout Plain Layout
12215 \begin_layout Description
12216 \begin_inset Flex Code
12219 \begin_layout Plain Layout
12226 \begin_inset Flex Code
12229 \begin_layout Plain Layout
12238 \begin_inset space \thinspace{}
12242 \begin_inset Flex Code
12245 \begin_layout Plain Layout
12252 \begin_inset Flex Code
12255 \begin_layout Plain Layout
12261 , marks the style as being part of a title block (see also the
12262 \begin_inset Flex Code
12265 \begin_layout Plain Layout
12272 \begin_inset Flex Code
12275 \begin_layout Plain Layout
12284 \begin_layout Description
12285 \begin_inset Flex Code
12288 \begin_layout Plain Layout
12295 \begin_inset Flex Code
12298 \begin_layout Plain Layout
12304 ] The \SpecialChar LaTeX
12305 command sequence declaring an item in a list.
12306 The command is to be defined without the preceding backslash (the default
12308 \begin_inset Quotes eld
12312 \begin_inset Quotes erd
12316 \begin_inset Flex Code
12319 \begin_layout Plain Layout
12327 in the \SpecialChar LaTeX
12331 \begin_layout Description
12332 \begin_inset Flex Code
12335 \begin_layout Plain Layout
12342 \begin_inset Flex Code
12345 \begin_layout Plain Layout
12351 ] This provides extra space between paragraphs that have the same style.
12352 If you put other styles into an environment, each is separated with the
12354 \begin_inset Flex Code
12357 \begin_layout Plain Layout
12364 But the whole items of the environment are additionally separated with
12366 \begin_inset Flex Code
12369 \begin_layout Plain Layout
12376 Note that this is a
12381 \begin_layout Description
12382 \begin_inset Flex Code
12385 \begin_layout Plain Layout
12391 [FIXME] (Used only with XML-type formats.)
12394 \begin_layout Description
12395 \begin_inset Flex Code
12398 \begin_layout Plain Layout
12405 \begin_inset Flex Code
12408 \begin_layout Plain Layout
12417 \begin_inset space \thinspace{}
12421 \begin_inset Flex Code
12424 \begin_layout Plain Layout
12430 ] Usually \SpecialChar LyX
12431 does not allow you to leave a paragraph empty, since it would
12432 lead to empty \SpecialChar LaTeX
12434 There are some cases where this could be desirable however: in a letter
12435 template, the required fields can be provided as empty fields, so that
12436 people do not forget them; in some special classes, a style can be used
12437 as some kind of break, which does not contain actual text.
12440 \begin_layout Description
12441 \begin_inset Flex Code
12444 \begin_layout Plain Layout
12451 \begin_inset Flex Code
12454 \begin_layout Plain Layout
12460 ] The vertical space between the label and the text body.
12461 Only used for labels that are above the text body (
12462 \begin_inset Flex Code
12465 \begin_layout Plain Layout
12472 \begin_inset Newline newline
12476 \begin_inset Flex Code
12479 \begin_layout Plain Layout
12480 Centered_Top_Environment
12488 \begin_layout Description
12489 \begin_inset Flex Code
12492 \begin_layout Plain Layout
12499 \begin_inset Flex Code
12502 \begin_layout Plain Layout
12508 ] The name of the counter for automatic numbering.
12509 In order to have the counter appear with your label, you will need to reference
12511 \begin_inset Flex Code
12514 \begin_layout Plain Layout
12523 This will work with
12524 \begin_inset Flex Code
12527 \begin_layout Plain Layout
12534 \begin_inset Flex Code
12537 \begin_layout Plain Layout
12544 \begin_inset Flex Code
12547 \begin_layout Plain Layout
12554 \begin_inset Flex Code
12557 \begin_layout Plain Layout
12564 \begin_inset Newline newline
12572 \begin_inset Flex Code
12575 \begin_layout Plain Layout
12582 \begin_inset Flex Code
12585 \begin_layout Plain Layout
12591 , though this case is a bit complicated.
12592 Suppose you declare
12593 \begin_inset Quotes eld
12597 \begin_inset Flex Code
12600 \begin_layout Plain Layout
12601 LabelCounter myenum
12607 \begin_inset Quotes erd
12611 Then the actual counters used are
12612 \begin_inset Flex Code
12615 \begin_layout Plain Layout
12622 \begin_inset Flex Code
12625 \begin_layout Plain Layout
12632 \begin_inset Flex Code
12635 \begin_layout Plain Layout
12642 \begin_inset Flex Code
12645 \begin_layout Plain Layout
12651 , much as in \SpecialChar LaTeX
12653 These counters must all be declared separately.
12654 \begin_inset Newline newline
12658 \begin_inset CommandInset ref
12660 reference "subsec:Counters"
12664 for details on counters.
12667 \begin_layout Description
12668 \begin_inset Flex Code
12671 \begin_layout Plain Layout
12677 The font used for the label.
12679 \begin_inset CommandInset ref
12681 reference "subsec:Font-description"
12688 \begin_layout Description
12689 \begin_inset Flex Code
12692 \begin_layout Plain Layout
12699 \begin_inset Flex Code
12702 \begin_layout Plain Layout
12708 ] Text that indicates how far a label should be indented.
12711 \begin_layout Description
12712 \begin_inset Flex Code
12715 \begin_layout Plain Layout
12722 \begin_inset Flex Code
12725 \begin_layout Plain Layout
12731 ] Text that indicates the amount of horizontal space between the label and
12733 Only used for labels that are not above the text body.
12736 \begin_layout Description
12737 \begin_inset Flex Code
12740 \begin_layout Plain Layout
12747 \begin_inset Flex Code
12750 \begin_layout Plain Layout
12756 ] The string used for the label.
12758 \begin_inset Flex Code
12761 \begin_layout Plain Layout
12767 is set, this string can be contain the special formatting commands described
12769 \begin_inset CommandInset ref
12771 reference "subsec:Counters"
12778 \begin_layout Description
12779 \begin_inset Flex Code
12782 \begin_layout Plain Layout
12783 LabelStringAppendix
12789 \begin_inset Flex Code
12792 \begin_layout Plain Layout
12798 ] This is used inside the appendix instead of
12799 \begin_inset Newline newline
12803 \begin_inset Flex Code
12806 \begin_layout Plain Layout
12814 \begin_inset Flex Code
12817 \begin_layout Plain Layout
12824 \begin_inset Newline newline
12828 \begin_inset Flex Code
12831 \begin_layout Plain Layout
12832 LabelStringAppendix
12840 \begin_layout Description
12841 \begin_inset Flex Code
12844 \begin_layout Plain Layout
12850 [FIXME] (Used only with XML-type formats.)
12853 \begin_layout Description
12854 \begin_inset Flex Code
12857 \begin_layout Plain Layout
12864 \begin_inset Flex Code
12867 \begin_layout Plain Layout
12872 , Manual, Static, Above,
12873 \begin_inset Newline newline
12876 Centered, Sensitive, Enumerate,
12877 \begin_inset Newline newline
12880 Itemize, Bibliography
12889 \begin_layout Description
12890 \begin_inset Flex Code
12893 \begin_layout Plain Layout
12899 means the label is the very first word (up to the first real blank).
12900 Use protected spaces if you want more than one word as the label.
12904 \begin_layout Description
12905 \begin_inset Flex Code
12908 \begin_layout Plain Layout
12914 means the label is simply what is declared as
12915 \begin_inset Flex Code
12918 \begin_layout Plain Layout
12925 This will be displayed
12926 \begin_inset Quotes eld
12930 \begin_inset Quotes erd
12933 , at the beginning of the paragraph.
12935 \begin_inset Flex Code
12938 \begin_layout Plain Layout
12945 \begin_inset Flex Code
12948 \begin_layout Plain Layout
12954 , then it will be displayed only in the first paragraph of any sequence
12955 of paragraphs with the same
12956 \begin_inset Flex Code
12959 \begin_layout Plain Layout
12968 \begin_layout Description
12969 \begin_inset Flex Code
12972 \begin_layout Plain Layout
12979 \begin_inset space ~
12983 \begin_inset space ~
12987 \begin_inset Flex Code
12990 \begin_layout Plain Layout
12996 are special cases of
12997 \begin_inset Flex Code
13000 \begin_layout Plain Layout
13007 The label will be printed above the paragraph either at the beginning of
13008 the line or centered.
13011 \begin_layout Description
13012 \begin_inset Flex Code
13015 \begin_layout Plain Layout
13021 is a special case for the caption-labels
13022 \begin_inset Quotes eld
13026 \begin_inset Quotes erd
13030 \begin_inset Quotes eld
13034 \begin_inset Quotes erd
13038 \begin_inset Newline newline
13042 \begin_inset Flex Code
13045 \begin_layout Plain Layout
13051 means the (hardcoded) label string depends on the kind of float: It is
13052 hardcoded to be `FloatType N', where N is the value of the counter associated
13054 For the case that a caption is inserted outside of a float the
13055 \begin_inset Flex Code
13058 \begin_layout Plain Layout
13065 \begin_inset Quotes eld
13069 \begin_inset Quotes erd
13075 \begin_layout Description
13076 \begin_inset Flex Code
13079 \begin_layout Plain Layout
13085 produces the usual sort of enumeration labels.
13086 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13087 small Roman numerals, and uppercase letters for the four possible depths.
13090 \begin_layout Description
13091 \begin_inset Flex Code
13094 \begin_layout Plain Layout
13100 produces various bullets at the different levels.
13101 It is also hardcoded.
13104 \begin_layout Description
13105 \begin_inset Flex Code
13108 \begin_layout Plain Layout
13114 should be used only with
13115 \begin_inset Flex Code
13118 \begin_layout Plain Layout
13119 LatexType BibEnvironment
13128 \begin_layout Description
13129 \begin_inset Flex Code
13132 \begin_layout Plain Layout
13138 Note that this will completely override any prior
13139 \begin_inset Flex Code
13142 \begin_layout Plain Layout
13148 declaration for this style.
13150 \begin_inset Quotes eld
13154 \begin_inset Flex Code
13157 \begin_layout Plain Layout
13164 \begin_inset Quotes erd
13169 \begin_inset CommandInset ref
13171 reference "subsec:I18n"
13175 for details on its use.
13178 \begin_layout Description
13179 \begin_inset Flex Code
13182 \begin_layout Plain Layout
13189 \begin_inset Flex Code
13192 \begin_layout Plain Layout
13198 ] The name of the corresponding \SpecialChar LaTeX
13200 Either the environment or command name.
13203 \begin_layout Description
13204 \begin_inset Flex Code
13207 \begin_layout Plain Layout
13214 \begin_inset Flex Code
13217 \begin_layout Plain Layout
13223 ] An optional parameter for the corresponding
13224 \begin_inset Flex Code
13227 \begin_layout Plain Layout
13234 This parameter cannot be changed from within \SpecialChar LyX
13236 \begin_inset Flex Code
13239 \begin_layout Plain Layout
13245 for customizable parameters).
13246 This will be output as is after all \SpecialChar LaTeX
13248 \begin_inset Flex Code
13251 \begin_layout Plain Layout
13260 \begin_layout Description
13261 \begin_inset Flex Code
13264 \begin_layout Plain Layout
13271 \begin_inset Flex Code
13274 \begin_layout Plain Layout
13279 , Command, Environment, Item_Environment,
13280 \begin_inset Newline newline
13283 List_Environment, Bib_Environment
13288 ] How the style should be translated into \SpecialChar LaTeX
13293 \begin_layout Plain Layout
13294 \begin_inset Flex Code
13297 \begin_layout Plain Layout
13303 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13304 Visit the SGML class files for specific examples.
13313 \begin_layout Description
13314 \begin_inset Flex Code
13317 \begin_layout Plain Layout
13323 means nothing special.
13326 \begin_layout Description
13327 \begin_inset Flex Code
13330 \begin_layout Plain Layout
13337 \begin_inset Flex Code
13340 \begin_layout Plain Layout
13347 {\SpecialChar ldots
13356 \begin_layout Description
13357 \begin_inset Flex Code
13360 \begin_layout Plain Layout
13367 \begin_inset Flex Code
13370 \begin_layout Plain Layout
13377 }\SpecialChar ldots
13393 \begin_layout Description
13394 \begin_inset Flex Code
13397 \begin_layout Plain Layout
13404 \begin_inset Flex Code
13407 \begin_layout Plain Layout
13414 \begin_inset Flex Code
13417 \begin_layout Plain Layout
13425 is generated for each paragraph of this environment.
13429 \begin_layout Description
13430 \begin_inset Flex Code
13433 \begin_layout Plain Layout
13440 \begin_inset Flex Code
13443 \begin_layout Plain Layout
13450 \begin_inset Newline newline
13454 \begin_inset Flex Code
13457 \begin_layout Plain Layout
13463 is passed as an argument to the environment.
13464 \begin_inset Newline newline
13468 \begin_inset Flex Code
13471 \begin_layout Plain Layout
13477 can be defined in the
13478 \begin_inset Flex Noun
13481 \begin_layout Plain Layout
13482 Edit\SpecialChar menuseparator
13484 \begin_inset space ~
13495 \begin_layout Description
13496 \begin_inset Flex Code
13499 \begin_layout Plain Layout
13506 \begin_inset Flex Code
13509 \begin_layout Plain Layout
13515 but adds the necessary mandatory argument (the longest label) to the begin
13516 statement of the bibliography environment:
13517 \begin_inset Newline newline
13521 \begin_inset Flex Code
13524 \begin_layout Plain Layout
13527 begin{thebibliography}{99}
13533 It is therefore only useful for bibliography environments.
13534 The default longest label
13535 \begin_inset Quotes eld
13539 \begin_inset Quotes erd
13542 can be changed by the user in the paragraph settings of a bibliography
13546 \begin_layout Standard
13547 Putting the last few things together, the \SpecialChar LaTeX
13548 output will be either:
13551 \begin_layout LyX-Code
13554 LatexName[LatexParam]{\SpecialChar ldots
13558 \begin_layout Standard
13562 \begin_layout LyX-Code
13565 begin{LatexName}[LatexParam] \SpecialChar ldots
13571 \begin_layout Standard
13572 depending upon the \SpecialChar LaTeX
13577 \begin_layout Description
13578 \begin_inset Flex Code
13581 \begin_layout Plain Layout
13588 \begin_inset Flex Code
13591 \begin_layout Plain Layout
13597 ] A string that is put at the beginning of the style content.
13598 A line break in the output can be indicated by
13599 \begin_inset Flex Code
13602 \begin_layout Plain Layout
13611 \begin_layout Description
13612 \begin_inset Flex Code
13615 \begin_layout Plain Layout
13622 \begin_inset Flex Code
13625 \begin_layout Plain Layout
13631 ] If you put styles into environments, the different
13632 \begin_inset Flex Code
13635 \begin_layout Plain Layout
13641 are not simply added, but added with a factor
13642 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13646 Note that this parameter is also used when
13647 \begin_inset Flex Code
13650 \begin_layout Plain Layout
13657 \begin_inset Flex Code
13660 \begin_layout Plain Layout
13667 \begin_inset Flex Code
13670 \begin_layout Plain Layout
13677 Then it is added to the manual or dynamic margin.
13678 \begin_inset Newline newline
13682 \begin_inset Quotes eld
13686 \begin_inset Flex Code
13689 \begin_layout Plain Layout
13696 \begin_inset Quotes erd
13699 means that the paragraph is indented with the width of
13700 \begin_inset Quotes eld
13704 \begin_inset Flex Code
13707 \begin_layout Plain Layout
13714 \begin_inset Quotes erd
13717 in the normal font.
13718 You can get a negative width by prefixing the string with
13719 \begin_inset Quotes eld
13723 \begin_inset Flex Code
13726 \begin_layout Plain Layout
13733 \begin_inset Quotes erd
13737 This way was chosen so that the look is the same with each used screen
13741 \begin_layout Description
13742 \begin_inset Flex Code
13745 \begin_layout Plain Layout
13752 \begin_inset Flex Code
13755 \begin_layout Plain Layout
13760 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13766 \begin_inset Newline newline
13769 The kind of margin that the style has on the left side.
13773 \begin_layout Description
13774 \begin_inset Flex Code
13777 \begin_layout Plain Layout
13783 just means a fixed margin.
13786 \begin_layout Description
13787 \begin_inset Flex Code
13790 \begin_layout Plain Layout
13796 means that the left margin depends on the string entered in the
13797 \begin_inset Flex Noun
13800 \begin_layout Plain Layout
13801 Edit\SpecialChar menuseparator
13803 \begin_inset space ~
13812 This is used to typeset nice lists without tabulators.
13815 \begin_layout Description
13816 \begin_inset Flex Code
13819 \begin_layout Plain Layout
13825 means that the margin depends on the size of the label.
13826 This is used for automatic enumerated headlines.
13827 It is obvious that the headline
13828 \begin_inset Quotes eld
13831 5.4.3.2.1 Very long headline
13832 \begin_inset Quotes erd
13835 must have a wider left margin (as wide as
13836 \begin_inset Quotes eld
13840 \begin_inset Quotes erd
13843 plus the space) than
13844 \begin_inset Quotes eld
13847 3.2 Very long headline
13848 \begin_inset Quotes erd
13852 \begin_inset Quotes eld
13856 \begin_inset Quotes erd
13859 are not able to do this.
13862 \begin_layout Description
13863 \begin_inset Flex Code
13866 \begin_layout Plain Layout
13872 is similar, but only the very first row of the paragraph is dynamic, while
13873 the others are static; this is used, for example, for descriptions.
13876 \begin_layout Description
13877 \begin_inset Flex Code
13880 \begin_layout Plain Layout
13886 means the margin is chosen in a way that the longest row of this paragraph
13887 fits to the right margin.
13888 This is used to typeset an address on the right edge of the page.
13892 \begin_layout Description
13893 \begin_inset Flex Code
13896 \begin_layout Plain Layout
13903 \begin_inset Flex Code
13906 \begin_layout Plain Layout
13915 \begin_inset space \thinspace{}
13919 \begin_inset Flex Code
13922 \begin_layout Plain Layout
13928 ] Whether fragile commands in this style should be
13929 \begin_inset Flex Code
13932 \begin_layout Plain Layout
13945 whether this command should itself be protected.)
13948 \begin_layout Description
13949 \begin_inset Flex Code
13952 \begin_layout Plain Layout
13959 \begin_inset Flex Code
13962 \begin_layout Plain Layout
13969 \begin_inset space \thinspace{}
13973 \begin_inset Flex Code
13976 \begin_layout Plain Layout
13984 ] Whether newlines are translated into \SpecialChar LaTeX
13986 \begin_inset Flex Code
13989 \begin_layout Plain Layout
14000 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
14002 inside \SpecialChar LyX
14006 \begin_layout Description
14007 \begin_inset Flex Code
14010 \begin_layout Plain Layout
14017 \begin_inset Flex Code
14020 \begin_layout Plain Layout
14029 \begin_inset space \thinspace{}
14033 \begin_inset Flex Code
14036 \begin_layout Plain Layout
14042 ] If set to true, and if
14043 \begin_inset Flex Code
14046 \begin_layout Plain Layout
14053 \begin_inset Flex Code
14056 \begin_layout Plain Layout
14062 ) paragraphs are being indented, then the indentation of such a paragraph
14063 following one of this type will be suppressed.
14064 (So this will not affect the display of non-default paragraphs.)
14067 \begin_layout Description
14068 \begin_inset Flex Code
14071 \begin_layout Plain Layout
14078 \begin_inset Flex Code
14081 \begin_layout Plain Layout
14087 ] Name of a style that has replaced this style.
14088 This is used to rename a style, while keeping backward compatibility.
14091 \begin_layout Description
14092 \begin_inset Flex Code
14095 \begin_layout Plain Layout
14102 \begin_inset Flex Code
14105 \begin_layout Plain Layout
14112 \begin_inset space \thinspace{}
14116 \begin_inset Flex Code
14119 \begin_layout Plain Layout
14125 ] Determines whether consecutive pragraphs of the same type are treated
14126 as belonging together.
14127 This has the effect that the
14128 \begin_inset Flex Code
14131 \begin_layout Plain Layout
14137 is only printed once before such a group.
14138 By default, this is true for
14139 \begin_inset Flex Code
14142 \begin_layout Plain Layout
14149 \begin_inset Flex Code
14152 \begin_layout Plain Layout
14159 \begin_inset Flex Code
14162 \begin_layout Plain Layout
14168 and false for all other types.
14171 \begin_layout Description
14172 \begin_inset Flex Code
14175 \begin_layout Plain Layout
14182 \begin_inset Flex Code
14185 \begin_layout Plain Layout
14194 \begin_inset space \thinspace{}
14198 \begin_inset Flex Code
14201 \begin_layout Plain Layout
14207 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14209 but only by a line break; together with
14210 \begin_inset Flex Code
14213 \begin_layout Plain Layout
14219 , this allows to emulate a plain text editor (like the ERT inset).
14222 \begin_layout Description
14223 \begin_inset Flex Code
14226 \begin_layout Plain Layout
14233 \begin_inset Flex Code
14236 \begin_layout Plain Layout
14242 ] The indent of the very first line of a paragraph.
14244 \begin_inset Newline newline
14248 \begin_inset Flex Code
14251 \begin_layout Plain Layout
14257 will be fixed for a certain style.
14258 The exception is the default style, since the indentation for these paragraphs
14259 can be prohibited with
14260 \begin_inset Flex Code
14263 \begin_layout Plain Layout
14271 \begin_inset Flex Code
14274 \begin_layout Plain Layout
14280 style paragraphs inside environments use the
14281 \begin_inset Flex Code
14284 \begin_layout Plain Layout
14290 of the environment, not their native one.
14292 \begin_inset Flex Code
14295 \begin_layout Plain Layout
14301 paragraphs inside an enumeration are not indented.
14304 \begin_layout Description
14305 \begin_inset Flex Code
14308 \begin_layout Plain Layout
14315 \begin_inset Flex Code
14318 \begin_layout Plain Layout
14324 ] The vertical space between two paragraphs of this style.
14327 \begin_layout Description
14328 \begin_inset Flex Code
14331 \begin_layout Plain Layout
14338 \begin_inset Flex Code
14341 \begin_layout Plain Layout
14348 allows the user to choose either
14349 \begin_inset Quotes eld
14353 \begin_inset Quotes erd
14357 \begin_inset Quotes eld
14361 \begin_inset Quotes erd
14364 to separate paragraphs.
14366 \begin_inset Quotes eld
14370 \begin_inset Quotes erd
14374 \begin_inset Flex Code
14377 \begin_layout Plain Layout
14385 \begin_inset Quotes eld
14389 \begin_inset Quotes erd
14393 \begin_inset Flex Code
14396 \begin_layout Plain Layout
14402 is ignored and all paragraphs are separated by the
14403 \begin_inset Flex Code
14406 \begin_layout Plain Layout
14413 The vertical space is calculated with
14414 \begin_inset Flex Code
14417 \begin_layout Plain Layout
14419 \begin_inset space ~
14428 \begin_inset Flex Code
14431 \begin_layout Plain Layout
14437 is the height of a row with the normal font.
14438 This way, the look stays the same with different screen fonts.
14441 \begin_layout Description
14442 \begin_inset Flex Code
14445 \begin_layout Plain Layout
14452 \begin_inset Flex Code
14455 \begin_layout Plain Layout
14464 \begin_inset space \thinspace{}
14468 \begin_inset Flex Code
14471 \begin_layout Plain Layout
14477 ] Whether the contents of this paragraph should be output in raw form, meaning
14478 without special translations that \SpecialChar LaTeX
14482 \begin_layout Description
14483 \begin_inset Flex Code
14486 \begin_layout Plain Layout
14493 \begin_inset Flex Code
14496 \begin_layout Plain Layout
14506 Defines individual characters that should be output in raw form, meaning
14507 without special translations that \SpecialChar LaTeX
14511 \begin_layout Description
14512 \begin_inset Flex Code
14515 \begin_layout Plain Layout
14521 Information to be included in the \SpecialChar LaTeX
14522 preamble when this style is used.
14523 Used to define macros, load packages, etc., required by this particular
14526 \begin_inset Quotes eld
14530 \begin_inset Flex Code
14533 \begin_layout Plain Layout
14540 \begin_inset Quotes erd
14546 \begin_layout Description
14547 \begin_inset Flex Code
14550 \begin_layout Plain Layout
14557 \begin_inset Flex Code
14560 \begin_layout Plain Layout
14566 ] The prefix to use when creating labels referring to paragraphs of this
14568 This allows the use of formatted references.
14571 \begin_layout Description
14572 \begin_inset Flex Code
14575 \begin_layout Plain Layout
14582 \begin_inset Flex Code
14585 \begin_layout Plain Layout
14591 ] Whether the style requires the feature
14592 \begin_inset Flex Code
14595 \begin_layout Plain Layout
14602 \begin_inset CommandInset ref
14604 reference "chap:List-of-functions"
14608 for the list of features).
14609 If you require a package with specific options, you can additionally use
14611 \begin_inset Flex Code
14614 \begin_layout Plain Layout
14620 as a general text class parameter (see
14621 \begin_inset CommandInset ref
14623 reference "subsec:General-text-class"
14630 \begin_layout Description
14631 \begin_inset Flex Code
14634 \begin_layout Plain Layout
14641 \begin_inset Flex Code
14644 \begin_layout Plain Layout
14653 \begin_inset Flex Code
14656 \begin_layout Plain Layout
14662 ] Resets the \SpecialChar LaTeX
14663 arguments of this style (as defined via the
14664 \begin_inset Flex Code
14667 \begin_layout Plain Layout
14674 This is useful if you have copied a style via
14675 \begin_inset Flex Code
14678 \begin_layout Plain Layout
14684 , but you do not want to inherit its (required and optional) arguments.
14687 \begin_layout Description
14688 \begin_inset Flex Code
14691 \begin_layout Plain Layout
14698 \begin_inset Flex Code
14701 \begin_layout Plain Layout
14707 ] A string that is put at the end of the layout content.
14708 A line break in the output can be indicated by
14709 \begin_inset Flex Code
14712 \begin_layout Plain Layout
14721 \begin_layout Description
14722 \begin_inset Flex Code
14725 \begin_layout Plain Layout
14732 \begin_inset Flex Code
14735 \begin_layout Plain Layout
14742 \begin_inset Flex Code
14745 \begin_layout Plain Layout
14754 \begin_layout Description
14755 \begin_inset Flex Code
14758 \begin_layout Plain Layout
14765 \begin_inset Flex Code
14768 \begin_layout Plain Layout
14777 \begin_inset Flex Code
14780 \begin_layout Plain Layout
14787 \begin_inset Flex Code
14790 \begin_layout Plain Layout
14797 \begin_inset Flex Code
14800 \begin_layout Plain Layout
14802 \begin_inset space ~
14810 ] This defines what the default spacing should be in the style.
14812 \begin_inset Flex Code
14815 \begin_layout Plain Layout
14822 \begin_inset Flex Code
14825 \begin_layout Plain Layout
14832 \begin_inset Flex Code
14835 \begin_layout Plain Layout
14841 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14842 If you specify the argument
14843 \begin_inset Flex Code
14846 \begin_layout Plain Layout
14852 , then you must also provide a value argument which will be the actual multiplie
14854 Note that, contrary to other parameters,
14855 \begin_inset Flex Code
14858 \begin_layout Plain Layout
14864 implies the generation of specific \SpecialChar LaTeX
14865 code, using the \SpecialChar LaTeX
14869 \begin_inset Flex Code
14872 \begin_layout Plain Layout
14881 \begin_layout Description
14882 \begin_inset Flex Code
14885 \begin_layout Plain Layout
14892 \begin_inset Flex Code
14895 \begin_layout Plain Layout
14902 \begin_inset space \thinspace{}
14906 \begin_inset Flex Code
14909 \begin_layout Plain Layout
14917 ] Allow spell-checking paragraphs of this style.
14921 \begin_layout Description
14922 \begin_inset Flex Code
14925 \begin_layout Plain Layout
14931 The font used for the text body .
14933 \begin_inset CommandInset ref
14935 reference "subsec:Font-description"
14942 \begin_layout Description
14943 \begin_inset Flex Code
14946 \begin_layout Plain Layout
14955 \begin_inset Flex Code
14958 \begin_layout Plain Layout
14968 The level of the style in the table of contents.
14969 This is used for automatic numbering of section headings.
14972 \begin_layout Description
14973 \begin_inset Flex Code
14976 \begin_layout Plain Layout
14985 \begin_inset Flex Code
14988 \begin_layout Plain Layout
14999 \begin_inset Flex Code
15002 \begin_layout Plain Layout
15009 \begin_inset Flex Code
15012 \begin_layout Plain Layout
15018 ] This tag determines whether the first line indentation of this paragraph
15019 can be toggled via the Paragraph settings dialog.
15023 \begin_inset Flex Code
15026 \begin_layout Plain Layout
15036 is set, indentation can be toggled if the document settings use
15037 \begin_inset Quotes eld
15041 \begin_inset Quotes erd
15044 paragraph style, with
15045 \begin_inset Flex Code
15048 \begin_layout Plain Layout
15054 , indentation can always be toggled, notwithstanding the document settings,
15056 \begin_inset Flex Code
15059 \begin_layout Plain Layout
15065 , indentation can never be toggled.
15068 \begin_layout Description
15069 \begin_inset Flex Code
15072 \begin_layout Plain Layout
15079 \begin_inset Flex Code
15082 \begin_layout Plain Layout
15088 ] The vertical space with which the very first of a chain of paragraphs
15089 with this style is separated from the previous paragraph.
15090 If the previous paragraph has another style, the separations are not simply
15091 added, but the maximum is taken.
15094 \begin_layout Subsection
15095 \begin_inset CommandInset label
15101 Internationalization of Paragraph Styles
15104 \begin_layout Standard
15106 has long supported internationalization of layout information, but, until
15107 version 2.0, this applied only to the user interface and not to, say, PDF
15109 Thus, French authors were forced to resort to ugly hacks if they wanted
15114 1' instead of `Theorem 1'.
15115 Thanks to Georg Baum, that is no longer the case.
15118 \begin_layout Standard
15120 \begin_inset Flex Code
15123 \begin_layout Plain Layout
15129 defines text that is to appear in the typeset document, it may use
15130 \begin_inset Flex Code
15133 \begin_layout Plain Layout
15140 \begin_inset Flex Code
15143 \begin_layout Plain Layout
15149 to support non-English and even multi-language documents correctly.
15150 The following excerpt (from the
15151 \begin_inset Flex Code
15154 \begin_layout Plain Layout
15160 file) shows how this works:
15163 \begin_layout LyX-Code
15168 \begin_layout LyX-Code
15171 theoremstyle{remark}
15174 \begin_layout LyX-Code
15177 newtheorem{claim}[thm]{
15184 \begin_layout LyX-Code
15188 \begin_layout LyX-Code
15192 \begin_layout LyX-Code
15197 claimname}{_(Claim)}
15200 \begin_layout LyX-Code
15204 \begin_layout LyX-Code
15208 \begin_layout LyX-Code
15217 claimname}{_(Claim)}}
15220 \begin_layout LyX-Code
15225 \begin_layout Standard
15226 In principle, any legal \SpecialChar LaTeX
15228 \begin_inset Flex Code
15231 \begin_layout Plain Layout
15238 \begin_inset Flex Code
15241 \begin_layout Plain Layout
15247 tags, but in practice they will typically look as they do here.
15248 The key to correct translation of the typeset text is the definition of
15249 the \SpecialChar LaTeX
15251 \begin_inset Flex Code
15254 \begin_layout Plain Layout
15263 \begin_inset Flex Code
15266 \begin_layout Plain Layout
15278 \begin_layout Standard
15280 \begin_inset Flex Code
15283 \begin_layout Plain Layout
15289 tag provides for internationalization based upon the overall language of
15291 The contents of the tag will be included in the preamble, just as with
15293 \begin_inset Flex Code
15296 \begin_layout Plain Layout
15303 What makes it special is the use of the
15304 \begin_inset Quotes eld
15308 \begin_inset Quotes erd
15312 \begin_inset Flex Code
15315 \begin_layout Plain Layout
15321 , which will be replaced, when \SpecialChar LyX
15322 produces \SpecialChar LaTeX
15323 output, with the translation of
15324 its argument into the document language.
15327 \begin_layout Standard
15329 \begin_inset Flex Code
15332 \begin_layout Plain Layout
15338 tag is more complex, since it is meant to provide support for multi-language
15339 documents and so offers an interface to the
15340 \begin_inset Flex Code
15343 \begin_layout Plain Layout
15350 Its contents will be added to the preamble once for each language that
15351 appears in the document.
15352 In this case, the argument to
15353 \begin_inset Flex Code
15356 \begin_layout Plain Layout
15362 will be replaced with its translation into the language in question; the
15364 \begin_inset Flex Code
15367 \begin_layout Plain Layout
15373 is replaced by the language name (as used by the babel package).
15376 \begin_layout Standard
15377 A German document that also included a French section would thus have the
15378 following in the preamble:
15381 \begin_layout LyX-Code
15390 claimname}{Affirmation}}
15391 \begin_inset Newline newline
15402 claimname}{Behauptung}}
15403 \begin_inset Newline newline
15410 claimname}{Behauptung}
15413 \begin_layout Standard
15416 \begin_inset Flex Code
15419 \begin_layout Plain Layout
15425 will then conspire to produce the correct text in the output.
15428 \begin_layout Standard
15429 One important point to note here is that the translations are provided by
15431 itself, through the file
15432 \begin_inset Flex Code
15435 \begin_layout Plain Layout
15442 This means, in effect, that
15443 \begin_inset Flex Code
15446 \begin_layout Plain Layout
15453 \begin_inset Flex Code
15456 \begin_layout Plain Layout
15462 are really only of use in layout files that are provided with \SpecialChar LyX
15464 entered in user-created layout files will not be seen by \SpecialChar LyX
15465 's internationalizatio
15466 n routines unless the
15467 \begin_inset Flex Code
15470 \begin_layout Plain Layout
15476 file is modified accordingly.
15477 That said, however, any layout created with the intention that it will
15478 be included with \SpecialChar LyX
15479 should use these tags where appropriate.
15480 Please note that the paragraph style translations provided by \SpecialChar LyX
15482 change with a minor update (e.
15483 \begin_inset space \thinspace{}
15487 \begin_inset space \space{}
15490 from version 2.1.x to 2.1.y).
15491 It is however quite likely that a major update (e.
15492 \begin_inset space \thinspace{}
15496 \begin_inset space \space{}
15499 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15502 \begin_layout Subsection
15504 \begin_inset CommandInset label
15506 name "subsec:Floats"
15513 \begin_layout Standard
15514 It is necessary to define the floats (
15515 \begin_inset Flex Noun
15518 \begin_layout Plain Layout
15525 \begin_inset Flex Noun
15528 \begin_layout Plain Layout
15534 , \SpecialChar ldots
15535 ) in the text class itself.
15536 Standard floats are included in the file
15537 \begin_inset Flex Code
15540 \begin_layout Plain Layout
15546 , so you may have to do no more than add
15549 \begin_layout LyX-Code
15550 Input stdfloats.inc
15553 \begin_layout Standard
15554 to your layout file.
15555 If you want to implement a text class that proposes some other float types
15556 (like the AGU class bundled with \SpecialChar LyX
15557 ), the information below will hopefully
15561 \begin_layout Description
15562 \begin_inset Flex Code
15565 \begin_layout Plain Layout
15572 \begin_inset Flex Code
15575 \begin_layout Plain Layout
15581 =!htbpH] Allowed placement options for this float type.
15582 The value is a string of placement characters.
15583 Possible characters include:
15588 \begin_inset Quotes eld
15592 \begin_inset Quotes erd
15600 \begin_inset Quotes eld
15604 \begin_inset Quotes erd
15612 \begin_inset Quotes eld
15616 \begin_inset Quotes erd
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
15656 The order of the characters in the string does not matter.
15657 If no placement options are allowed, use the string
15664 \begin_layout Description
15665 \begin_inset Flex Code
15668 \begin_layout Plain Layout
15675 \begin_inset Flex Code
15678 \begin_layout Plain Layout
15687 \begin_inset space \thinspace{}
15693 \begin_inset Flex Code
15696 \begin_layout Plain Layout
15706 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15713 \begin_inset Flex Code
15716 \begin_layout Plain Layout
15722 if the float does not support this feature.
15725 \begin_layout Description
15726 \begin_inset Flex Code
15729 \begin_layout Plain Layout
15736 \begin_inset Flex Code
15739 \begin_layout Plain Layout
15748 \begin_inset space \thinspace{}
15754 \begin_inset Flex Code
15757 \begin_layout Plain Layout
15767 ] Defines whether the float has a starred variant that spans columns in
15768 a two column paragraph.
15770 \begin_inset Flex Code
15773 \begin_layout Plain Layout
15779 if the float does not support this feature.
15782 \begin_layout Description
15783 \begin_inset Flex Code
15786 \begin_layout Plain Layout
15793 \begin_inset Flex Code
15796 \begin_layout Plain Layout
15803 \begin_inset Quotes erd
15807 \begin_inset Quotes erd
15810 ] The file name extension of an auxiliary file for the list of figures (or
15813 writes the captions to this file.
15816 \begin_layout Description
15817 \begin_inset Flex Code
15820 \begin_layout Plain Layout
15827 \begin_inset Flex Code
15830 \begin_layout Plain Layout
15837 \begin_inset Quotes erd
15841 \begin_inset Quotes erd
15844 ] The string that will be used in the menus and also for the caption.
15845 This is translated to the current language if babel is used.
15848 \begin_layout Description
15849 \begin_inset Flex Code
15852 \begin_layout Plain Layout
15858 These tags control the XHTML output.
15860 \begin_inset CommandInset ref
15862 reference "sec:Tags-for-XHTML"
15869 \begin_layout Description
15870 \begin_inset Flex Code
15873 \begin_layout Plain Layout
15882 \begin_inset Flex Code
15885 \begin_layout Plain Layout
15894 \begin_inset space \thinspace{}
15898 \begin_inset Flex Code
15901 \begin_layout Plain Layout
15907 ] Indicates whether the float is already defined in the document class or
15908 if instead the \SpecialChar LaTeX
15910 \begin_inset Flex Code
15913 \begin_layout Plain Layout
15919 needs to be loaded to define it on-the-fly.
15921 \begin_inset Flex Code
15924 \begin_layout Plain Layout
15931 \begin_inset Flex Code
15934 \begin_layout Plain Layout
15941 It should be set to
15942 \begin_inset Flex Code
15945 \begin_layout Plain Layout
15951 if the float is already defined by the \SpecialChar LaTeX
15955 \begin_layout Description
15956 \begin_inset Flex Code
15959 \begin_layout Plain Layout
15966 \begin_inset Flex Code
15969 \begin_layout Plain Layout
15976 \begin_inset Quotes erd
15980 \begin_inset Quotes erd
15983 ] The command used to generate a list of floats of this type; the leading
15992 \begin_inset Flex Code
15995 \begin_layout Plain Layout
16001 is false, since there is no standard way to generate this command.
16003 \begin_inset Flex Code
16006 \begin_layout Plain Layout
16012 is true, since in that case there is a standard way to define the command.
16015 \begin_layout Description
16016 \begin_inset Flex Code
16019 \begin_layout Plain Layout
16026 \begin_inset Flex Code
16029 \begin_layout Plain Layout
16036 \begin_inset Quotes erd
16040 \begin_inset Quotes erd
16043 ] A title for a list of floats of this kind (list of figures, tables, or
16045 It is used for the screen label within \SpecialChar LyX
16046 , it is used by \SpecialChar LaTeX
16048 it is used as the title in the XHTML output.
16049 It will be translated to the document language.
16052 \begin_layout Description
16053 \begin_inset Flex Code
16056 \begin_layout Plain Layout
16063 \begin_inset Flex Code
16066 \begin_layout Plain Layout
16073 \begin_inset Quotes erd
16077 \begin_inset Quotes erd
16080 ] This (optional) argument determines whether floats of this class will
16081 be numbered within some sectional unit of the document.
16083 \begin_inset Flex Code
16086 \begin_layout Plain Layout
16093 \begin_inset Quotes eld
16097 \begin_inset Flex Code
16100 \begin_layout Plain Layout
16107 \begin_inset Quotes erd
16110 , the floats will be numbered within chapters.
16114 \begin_layout Description
16115 \begin_inset Flex Code
16118 \begin_layout Plain Layout
16125 \begin_inset Flex Code
16128 \begin_layout Plain Layout
16135 \begin_inset Quotes erd
16139 \begin_inset Quotes erd
16142 ] The default placement for the given class of floats.
16143 The string should be as in standard \SpecialChar LaTeX
16145 \begin_inset Flex Code
16148 \begin_layout Plain Layout
16155 \begin_inset Flex Code
16158 \begin_layout Plain Layout
16165 \begin_inset Flex Code
16168 \begin_layout Plain Layout
16175 \begin_inset Flex Code
16178 \begin_layout Plain Layout
16184 for top, bottom, page, and here, respectively.
16188 \begin_layout Plain Layout
16189 Note that the order of these letters in the string is irrelevant, like in
16196 On top of that there is a new type,
16197 \begin_inset Flex Code
16200 \begin_layout Plain Layout
16206 , which does not really correspond to a float, since it means: put it
16207 \begin_inset Quotes eld
16211 \begin_inset Quotes erd
16215 Note however that the
16216 \begin_inset Flex Code
16219 \begin_layout Plain Layout
16225 specifier is special and, because of implementation details, cannot be
16226 used in non-built in float types.
16227 If you do not understand what this means, just use
16228 \begin_inset Quotes eld
16232 \begin_inset Flex Code
16235 \begin_layout Plain Layout
16242 \begin_inset Quotes erd
16248 \begin_layout Description
16249 \begin_inset Flex Code
16252 \begin_layout Plain Layout
16259 \begin_inset Flex Code
16262 \begin_layout Plain Layout
16268 ] The prefix to use when creating labels referring to floats of this type.
16269 This allows the use of formatted references.
16270 Note that you can remove any
16271 \begin_inset Flex Code
16274 \begin_layout Plain Layout
16280 set by a copied style by using the special value
16281 \begin_inset Quotes eld
16285 \begin_inset Quotes erd
16288 , which must be all caps.
16291 \begin_layout Description
16292 \begin_inset Flex Code
16295 \begin_layout Plain Layout
16302 \begin_inset Flex Code
16305 \begin_layout Plain Layout
16312 \begin_inset Quotes erd
16316 \begin_inset Quotes erd
16319 ] The style used when defining the float using
16320 \begin_inset Flex Code
16323 \begin_layout Plain Layout
16334 \begin_layout Description
16335 \begin_inset Flex Code
16338 \begin_layout Plain Layout
16345 \begin_inset Flex Code
16348 \begin_layout Plain Layout
16355 \begin_inset Quotes erd
16359 \begin_inset Quotes erd
16363 \begin_inset Quotes eld
16367 \begin_inset Quotes erd
16370 of the new class of floats, like program or algorithm.
16371 After the appropriate
16372 \begin_inset Flex Code
16375 \begin_layout Plain Layout
16384 \begin_inset Flex Code
16387 \begin_layout Plain Layout
16396 \begin_inset Flex Code
16399 \begin_layout Plain Layout
16410 \begin_layout Description
16411 \begin_inset Flex Code
16414 \begin_layout Plain Layout
16421 \begin_inset Flex Code
16424 \begin_layout Plain Layout
16431 \begin_inset space \thinspace{}
16435 \begin_inset Flex Code
16438 \begin_layout Plain Layout
16446 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16448 \begin_inset Flex Code
16451 \begin_layout Plain Layout
16457 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16461 \begin_layout Standard
16462 Note that defining a float with type
16463 \begin_inset Flex Code
16466 \begin_layout Plain Layout
16474 automatically defines the corresponding counter with name
16475 \begin_inset Flex Code
16478 \begin_layout Plain Layout
16489 \begin_layout Subsection
16490 Flex insets and InsetLayout
16491 \begin_inset CommandInset label
16493 name "subsec:Flex-insets-and"
16500 \begin_layout Standard
16501 Flex insets come in three different kinds:
16504 \begin_layout Itemize
16506 \begin_inset Flex Code
16509 \begin_layout Plain Layout
16515 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16517 \begin_inset Flex Code
16520 \begin_layout Plain Layout
16529 \begin_inset Flex Code
16532 \begin_layout Plain Layout
16543 \begin_layout Itemize
16545 \begin_inset Flex Code
16548 \begin_layout Plain Layout
16554 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16556 footnote, and the like.
16557 An obvious example is an endnote inset, which is defined in the
16558 \begin_inset Flex Code
16561 \begin_layout Plain Layout
16570 \begin_layout Itemize
16572 \begin_inset Flex Code
16575 \begin_layout Plain Layout
16581 ): For use with DocBook classes.
16584 \begin_layout Standard
16585 Flex insets are defined using the
16586 \begin_inset Flex Code
16589 \begin_layout Plain Layout
16595 tag, which shall be explained in a moment.
16598 \begin_layout Standard
16600 \begin_inset Flex Code
16603 \begin_layout Plain Layout
16609 tag also serves another function: It can be used to customize the general
16610 layout of many different types of insets.
16612 \begin_inset Flex Code
16615 \begin_layout Plain Layout
16621 can be used to customize the layout parameters for footnotes, marginal
16622 notes, note insets, \SpecialChar TeX
16623 code (ERT) insets, branches, listings, indexes, boxes,
16624 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16627 \begin_layout Standard
16629 \begin_inset Flex Code
16632 \begin_layout Plain Layout
16638 definition must begin with a line of the form:
16641 \begin_layout LyX-Code
16645 \begin_layout Standard
16647 \begin_inset Flex Code
16650 \begin_layout Plain Layout
16656 indicates the inset whose layout is being defined, and here there are four
16660 \begin_layout Enumerate
16661 The layout for a pre-existing inset is being modified.
16662 In this case, can be
16663 \begin_inset Flex Code
16666 \begin_layout Plain Layout
16672 any one of the following:
16673 \begin_inset Flex Code
16676 \begin_layout Plain Layout
16683 \begin_inset Flex Code
16686 \begin_layout Plain Layout
16693 \begin_inset Flex Code
16696 \begin_layout Plain Layout
16703 \begin_inset Flex Code
16706 \begin_layout Plain Layout
16713 \begin_inset Flex Code
16716 \begin_layout Plain Layout
16723 \begin_inset Flex Code
16726 \begin_layout Plain Layout
16733 \begin_inset Flex Code
16736 \begin_layout Plain Layout
16743 \begin_inset Flex Code
16746 \begin_layout Plain Layout
16753 \begin_inset Flex Code
16756 \begin_layout Plain Layout
16763 \begin_inset Flex Code
16766 \begin_layout Plain Layout
16773 \begin_inset Flex Code
16776 \begin_layout Plain Layout
16783 \begin_inset Flex Code
16786 \begin_layout Plain Layout
16793 \begin_inset Flex Code
16796 \begin_layout Plain Layout
16803 \begin_inset Flex Code
16806 \begin_layout Plain Layout
16813 \begin_inset Flex Code
16816 \begin_layout Plain Layout
16823 \begin_inset Flex Code
16826 \begin_layout Plain Layout
16833 \begin_inset Flex Code
16836 \begin_layout Plain Layout
16843 \begin_inset Flex Code
16846 \begin_layout Plain Layout
16853 \begin_inset Flex Code
16856 \begin_layout Plain Layout
16863 \begin_inset Flex Code
16866 \begin_layout Plain Layout
16875 \begin_layout Enumerate
16876 The layout for a Flex inset is being defined.
16878 \begin_inset Flex Code
16881 \begin_layout Plain Layout
16887 must be of the form
16888 \begin_inset Quotes eld
16892 \begin_inset Flex Code
16895 \begin_layout Plain Layout
16902 \begin_inset Quotes erd
16906 \begin_inset Flex Code
16909 \begin_layout Plain Layout
16915 may be be any valid identifier not used by a pre-existing Flex inset.
16916 The identifier may include spaces, but in that case the whole thing must
16917 be wrapped in quotes.
16918 Note that the definition of a flex inset
16923 \begin_inset Flex Code
16926 \begin_layout Plain Layout
16932 entry, declaring which type of inset it defines.
16935 \begin_layout Enumerate
16936 The layout for user specific branch is being defined.
16938 \begin_inset Flex Code
16941 \begin_layout Plain Layout
16947 must be of the form
16948 \begin_inset Quotes eld
16952 \begin_inset Flex Code
16955 \begin_layout Plain Layout
16962 \begin_inset Quotes erd
16966 \begin_inset Flex Code
16969 \begin_layout Plain Layout
16975 may be be any valid identifier of branch defined in user's document.
16976 The identifier may include spaces, but in that case the whole thing must
16977 be wrapped in quotes.
16978 The main purpose of this feature is to allow \SpecialChar LaTeX
16979 wrapping around specific
16980 branches as user needs.
16983 \begin_layout Enumerate
16984 The layout of a user (or class) specific caption is being defined.
16986 \begin_inset Flex Code
16989 \begin_layout Plain Layout
16995 must be of the form
16996 \begin_inset Quotes eld
17000 \begin_inset Flex Code
17003 \begin_layout Plain Layout
17010 \begin_inset Quotes erd
17014 \begin_inset Flex Code
17017 \begin_layout Plain Layout
17023 specifies the name of the caption as it appears in the menu.
17024 Have a look at the standard caption (
17025 \begin_inset Flex Code
17028 \begin_layout Plain Layout
17034 ), the specific captions of the KOMA-Script classes (
17035 \begin_inset Flex Code
17038 \begin_layout Plain Layout
17045 \begin_inset Flex Code
17048 \begin_layout Plain Layout
17057 \begin_inset space ~
17063 \begin_inset Flex Code
17066 \begin_layout Plain Layout
17072 ) for applications.
17075 \begin_layout Standard
17077 \begin_inset Flex Code
17080 \begin_layout Plain Layout
17086 definition can contain the following entries:
17089 \begin_layout Description
17090 \begin_inset Flex Code
17093 \begin_layout Plain Layout
17100 \begin_inset Flex Code
17103 \begin_layout Plain Layout
17109 ] Defines argument number of a command\SpecialChar breakableslash
17110 environment associated with the current
17112 The definition must end with
17113 \begin_inset Flex Code
17116 \begin_layout Plain Layout
17124 \begin_inset CommandInset ref
17126 reference "subsec:Paragraph-Styles"
17133 \begin_layout Description
17134 \begin_inset Flex Code
17137 \begin_layout Plain Layout
17143 Preamble for changing language commands; see
17144 \begin_inset CommandInset ref
17146 reference "subsec:I18n"
17153 \begin_layout Description
17154 \begin_inset Flex Code
17157 \begin_layout Plain Layout
17164 \begin_inset Flex Code
17167 \begin_layout Plain Layout
17173 ] The color for the inset's background.
17175 \begin_inset CommandInset ref
17177 reference "chap:Names-of-colors"
17181 for a list of the available color names.
17184 \begin_layout Description
17185 \begin_inset Flex Code
17188 \begin_layout Plain Layout
17195 \begin_inset Flex Code
17198 \begin_layout Plain Layout
17207 \begin_inset space \thinspace{}
17211 \begin_inset Flex Code
17214 \begin_layout Plain Layout
17220 ] Whether to use the content of the inset as the label, when the inset is
17225 \begin_layout Description
17226 \begin_inset Flex Code
17229 \begin_layout Plain Layout
17236 \begin_inset Flex Code
17239 \begin_layout Plain Layout
17245 ] As with paragraph styles, see
17246 \begin_inset CommandInset ref
17248 reference "subsec:Paragraph-Styles"
17253 Note that you need to specify the complete type, e.
17254 \begin_inset space \thinspace{}
17258 \begin_inset space ~
17262 \begin_inset Flex Code
17265 \begin_layout Plain Layout
17266 CopyStyle Flex:<name>
17274 \begin_layout Description
17275 \begin_inset Flex Code
17278 \begin_layout Plain Layout
17285 \begin_inset Flex Code
17288 \begin_layout Plain Layout
17297 \begin_inset space \thinspace{}
17301 \begin_inset Flex Code
17304 \begin_layout Plain Layout
17310 ] Indicates whether the user may employ the Paragraph Settings dialog to
17311 customize the paragraph.
17314 \begin_layout Description
17315 \begin_inset Flex Code
17318 \begin_layout Plain Layout
17325 \begin_inset Flex Code
17328 \begin_layout Plain Layout
17335 \begin_inset Flex Code
17338 \begin_layout Plain Layout
17345 \begin_inset Flex Code
17348 \begin_layout Plain Layout
17354 , describing the rendering style used for the inset's frame and buttons.
17355 Footnotes generally use
17356 \begin_inset Flex Code
17359 \begin_layout Plain Layout
17365 , ERT insets generally
17366 \begin_inset Flex Code
17369 \begin_layout Plain Layout
17375 , and character styles
17376 \begin_inset Flex Code
17379 \begin_layout Plain Layout
17388 \begin_layout Description
17389 \begin_inset Flex Code
17392 \begin_layout Plain Layout
17399 \begin_inset Flex Code
17402 \begin_layout Plain Layout
17411 \begin_inset space \thinspace{}
17417 \begin_inset Flex Code
17420 \begin_layout Plain Layout
17429 \begin_inset Flex Code
17432 \begin_layout Plain Layout
17439 \begin_inset Flex Code
17442 \begin_layout Plain Layout
17449 Indicates whether the environment will stand on its own in the output or
17450 will appear inline with the surrounding text.
17451 If set to false, it is supposed that the \SpecialChar LaTeX
17452 environment ignores white space
17453 (including one newline character) after the
17454 \begin_inset Flex Code
17457 \begin_layout Plain Layout
17470 \begin_inset Flex Code
17473 \begin_layout Plain Layout
17489 \begin_layout Description
17490 \begin_inset Flex Code
17493 \begin_layout Plain Layout
17499 Required at the end of the
17500 \begin_inset Flex Code
17503 \begin_layout Plain Layout
17512 \begin_layout Description
17513 \begin_inset Flex Code
17516 \begin_layout Plain Layout
17522 The font used for both the text body
17528 \begin_inset CommandInset ref
17530 reference "subsec:Font-description"
17535 Note that defining this font automatically defines the
17536 \begin_inset Flex Code
17539 \begin_layout Plain Layout
17545 to the same value, so define this first and define
17546 \begin_inset Flex Code
17549 \begin_layout Plain Layout
17555 later if you want them to be different.
17558 \begin_layout Description
17559 \begin_inset Flex Code
17562 \begin_layout Plain Layout
17563 FixedWidthPreambleEncoding
17569 \begin_inset Flex Code
17572 \begin_layout Plain Layout
17581 \begin_inset space \thinspace{}
17585 \begin_inset Flex Code
17588 \begin_layout Plain Layout
17594 ] Force a fixed width encoding for the translated contents of
17595 \begin_inset Flex Code
17598 \begin_layout Plain Layout
17605 \begin_inset Flex Code
17608 \begin_layout Plain Layout
17614 code generated by this layout.
17615 This is needed for special \SpecialChar LaTeX
17620 that do not work with variable width encodings such as
17625 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17626 backends such as Xe\SpecialChar TeX
17628 Lua\SpecialChar TeX
17632 \begin_layout Description
17633 \begin_inset Flex Code
17636 \begin_layout Plain Layout
17637 ForceLocalFontSwitch
17643 \begin_inset Flex Code
17646 \begin_layout Plain Layout
17655 \begin_inset space \thinspace{}
17659 \begin_inset Flex Code
17662 \begin_layout Plain Layout
17668 ] When using babel, always use a local font switch (
17669 \begin_inset Flex Code
17672 \begin_layout Plain Layout
17680 ), never a global one (such as
17681 \begin_inset Flex Code
17684 \begin_layout Plain Layout
17695 \begin_layout Description
17696 \begin_inset Flex Code
17699 \begin_layout Plain Layout
17706 \begin_inset Flex Code
17709 \begin_layout Plain Layout
17718 \begin_inset space \thinspace{}
17722 \begin_inset Flex Code
17725 \begin_layout Plain Layout
17732 \begin_inset Quotes eld
17736 \begin_inset Quotes erd
17739 language, leading to Left-to-Right (Latin) output, e.
17740 \begin_inset space \thinspace{}
17744 \begin_inset space \space{}
17747 in \SpecialChar TeX
17752 \begin_layout Description
17753 \begin_inset Flex Code
17756 \begin_layout Plain Layout
17763 \begin_inset Flex Code
17766 \begin_layout Plain Layout
17775 \begin_inset space \thinspace{}
17779 \begin_inset Flex Code
17782 \begin_layout Plain Layout
17788 ] Force a a line break in the \SpecialChar LaTeX
17789 output before the inset starts and after
17791 This assures the inset itself is output on its own lines, for parsing purposes.
17794 \begin_layout Description
17795 \begin_inset Flex Code
17798 \begin_layout Plain Layout
17805 \begin_inset Flex Code
17808 \begin_layout Plain Layout
17817 \begin_inset space \thinspace{}
17821 \begin_inset Flex Code
17824 \begin_layout Plain Layout
17830 ] Indicates whether the
17831 \begin_inset Flex Code
17834 \begin_layout Plain Layout
17840 should be used or, instead, the user can change the paragraph style used
17845 \begin_layout Description
17846 \begin_inset Flex Code
17849 \begin_layout Plain Layout
17856 \begin_inset Flex Code
17859 \begin_layout Plain Layout
17868 \begin_inset space \thinspace{}
17872 \begin_inset Flex Code
17875 \begin_layout Plain Layout
17881 ] As with paragraph styles, see
17882 \begin_inset CommandInset ref
17884 reference "subsec:Paragraph-Styles"
17891 \begin_layout Description
17892 \begin_inset Flex Code
17895 \begin_layout Plain Layout
17901 These tags control the XHTML output.
17903 \begin_inset CommandInset ref
17905 reference "sec:Tags-for-XHTML"
17912 \begin_layout Description
17913 \begin_inset Flex Code
17916 \begin_layout Plain Layout
17923 \begin_inset Flex Code
17926 \begin_layout Plain Layout
17935 \begin_inset space \thinspace{}
17939 \begin_inset Flex Code
17942 \begin_layout Plain Layout
17948 ] Whether to include the contents of this inset in the strings generated
17949 for the `Outline' pane.
17950 One would not, for example, want the content of a footnote in a section
17951 header to be included in the TOC displayed in the outline, but one would
17952 normally want the content of a character style displayed.
17953 Default is false: not to include.
17956 \begin_layout Description
17957 \begin_inset Flex Code
17960 \begin_layout Plain Layout
17969 \begin_inset Flex Code
17972 \begin_layout Plain Layout
17981 \begin_inset space \thinspace{}
17985 \begin_inset Flex Code
17988 \begin_layout Plain Layout
17994 ] As with paragraph styles, see
17995 \begin_inset CommandInset ref
17997 reference "subsec:Paragraph-Styles"
18004 \begin_layout Description
18005 \begin_inset Flex Code
18008 \begin_layout Plain Layout
18014 The font used for the label.
18016 \begin_inset CommandInset ref
18018 reference "subsec:Font-description"
18023 Note that this definition can never appear before
18024 \begin_inset Flex Code
18027 \begin_layout Plain Layout
18033 , lest it be ineffective.
18036 \begin_layout Description
18037 \begin_inset Flex Code
18040 \begin_layout Plain Layout
18047 \begin_inset Flex Code
18050 \begin_layout Plain Layout
18057 \begin_inset Quotes erd
18061 \begin_inset Quotes erd
18064 ] What will be displayed on the button or elsewhere as the inset label.
18066 \begin_inset Flex Code
18069 \begin_layout Plain Layout
18077 \begin_inset Flex Code
18080 \begin_layout Plain Layout
18086 ) modify this label on the fly.
18089 \begin_layout Description
18090 \begin_inset Flex Code
18093 \begin_layout Plain Layout
18099 Language dependent preamble; see
18100 \begin_inset CommandInset ref
18102 reference "subsec:I18n"
18109 \begin_layout Description
18110 \begin_inset Flex Code
18113 \begin_layout Plain Layout
18120 \begin_inset Flex Code
18123 \begin_layout Plain Layout
18129 ] The name of the corresponding \SpecialChar LaTeX
18131 Either the environment or command name.
18134 \begin_layout Description
18135 \begin_inset Flex Code
18138 \begin_layout Plain Layout
18145 \begin_inset Flex Code
18148 \begin_layout Plain Layout
18154 ] The optional parameter for the corresponding
18155 \begin_inset Flex Code
18158 \begin_layout Plain Layout
18164 stuff, including possible bracket pairs like
18165 \begin_inset Flex Code
18168 \begin_layout Plain Layout
18175 This parameter cannot be changed from within \SpecialChar LyX
18177 \begin_inset Flex Code
18180 \begin_layout Plain Layout
18186 for customizable parameters).
18187 It will be output as is after all \SpecialChar LaTeX
18189 \begin_inset Flex Code
18192 \begin_layout Plain Layout
18201 \begin_layout Description
18202 \begin_inset Flex Code
18205 \begin_layout Plain Layout
18212 \begin_inset Flex Code
18215 \begin_layout Plain Layout
18216 Command, Environment, None
18221 ] How the style should be translated into \SpecialChar LaTeX
18226 \begin_layout Plain Layout
18227 \begin_inset Flex Code
18230 \begin_layout Plain Layout
18236 is perhaps a bit misleading, since these rules apply to SGML classes too.
18237 Visit the SGML class files for specific examples.
18246 \begin_layout Description
18247 \begin_inset Flex Code
18250 \begin_layout Plain Layout
18256 means nothing special
18259 \begin_layout Description
18260 \begin_inset Flex Code
18263 \begin_layout Plain Layout
18270 \begin_inset Flex Code
18273 \begin_layout Plain Layout
18280 {\SpecialChar ldots
18289 \begin_layout Description
18290 \begin_inset Flex Code
18293 \begin_layout Plain Layout
18300 \begin_inset Flex Code
18303 \begin_layout Plain Layout
18310 }\SpecialChar ldots
18325 \begin_layout Standard
18326 Putting the last few things together, the \SpecialChar LaTeX
18327 output will be either:
18330 \begin_layout LyX-Code
18333 LatexName[LatexParam]{\SpecialChar ldots
18337 \begin_layout Standard
18341 \begin_layout LyX-Code
18344 begin{LatexName}[LatexParam] \SpecialChar ldots
18350 \begin_layout Standard
18351 depending upon the \SpecialChar LaTeX
18356 \begin_layout Description
18357 \begin_inset Flex Code
18360 \begin_layout Plain Layout
18367 \begin_inset Flex Code
18370 \begin_layout Plain Layout
18376 ] A string that is put at the beginning of the layout content.
18377 A line break in the output can be indicated by
18378 \begin_inset Flex Code
18381 \begin_layout Plain Layout
18390 \begin_layout Description
18391 \begin_inset Flex Code
18394 \begin_layout Plain Layout
18401 \begin_inset Flex Code
18404 \begin_layout Plain Layout
18411 \begin_inset Flex Code
18414 \begin_layout Plain Layout
18421 \begin_inset Flex Code
18424 \begin_layout Plain Layout
18431 \begin_inset Flex Code
18434 \begin_layout Plain Layout
18440 (indicating a dummy definition ending definitions of charstyles, etc).
18441 This entry is required in and is only meaningful for Flex insets.
18442 Among other things, it determines on which menu this inset will appear.
18444 \begin_inset Flex Code
18447 \begin_layout Plain Layout
18454 \begin_inset Flex Code
18457 \begin_layout Plain Layout
18463 will automatically set
18464 \begin_inset Flex Code
18467 \begin_layout Plain Layout
18474 \begin_inset Flex Code
18477 \begin_layout Plain Layout
18485 \begin_inset Flex Code
18488 \begin_layout Plain Layout
18494 can be set to true, or
18495 \begin_inset Flex Code
18498 \begin_layout Plain Layout
18505 \begin_inset Flex Code
18508 \begin_layout Plain Layout
18514 insets by setting it
18519 \begin_inset Flex Code
18522 \begin_layout Plain Layout
18531 \begin_layout Description
18532 \begin_inset Flex Code
18535 \begin_layout Plain Layout
18542 \begin_inset Flex Code
18545 \begin_layout Plain Layout
18554 \begin_inset space \thinspace{}
18558 \begin_inset Flex Code
18561 \begin_layout Plain Layout
18567 ] Whether multiple paragraphs are permitted in this inset.
18569 \begin_inset Flex Code
18572 \begin_layout Plain Layout
18578 to the same value and
18579 \begin_inset Flex Code
18582 \begin_layout Plain Layout
18588 to the opposite value.
18589 These can be reset to other values, if they are used
18594 \begin_inset Flex Code
18597 \begin_layout Plain Layout
18607 \begin_layout Description
18608 \begin_inset Flex Code
18611 \begin_layout Plain Layout
18618 \begin_inset Flex Code
18621 \begin_layout Plain Layout
18630 \begin_inset space \thinspace{}
18634 \begin_inset Flex Code
18637 \begin_layout Plain Layout
18643 ] Whether fragile commands in this inset should be
18644 \begin_inset Flex Code
18647 \begin_layout Plain Layout
18660 whether the command should itself be protected.) Default is false.
18663 \begin_layout Description
18664 \begin_inset Flex Code
18667 \begin_layout Plain Layout
18674 \begin_inset Flex Code
18677 \begin_layout Plain Layout
18683 ] Deletes an existing
18684 \begin_inset Flex Code
18687 \begin_layout Plain Layout
18696 \begin_layout Description
18697 \begin_inset Flex Code
18700 \begin_layout Plain Layout
18707 \begin_inset Flex Code
18710 \begin_layout Plain Layout
18717 \begin_inset Flex Code
18720 \begin_layout Plain Layout
18726 that has replaced this
18727 \begin_inset Flex Code
18730 \begin_layout Plain Layout
18737 This is used to rename an
18738 \begin_inset Flex Code
18741 \begin_layout Plain Layout
18747 , while keeping backward compatibility.
18750 \begin_layout Description
18751 \begin_inset Flex Code
18754 \begin_layout Plain Layout
18761 \begin_inset Flex Code
18764 \begin_layout Plain Layout
18773 \begin_inset space \thinspace{}
18777 \begin_inset Flex Code
18780 \begin_layout Plain Layout
18786 ] As with paragraph styles, see
18787 \begin_inset CommandInset ref
18789 reference "subsec:Paragraph-Styles"
18797 \begin_layout Description
18798 \begin_inset Flex Code
18801 \begin_layout Plain Layout
18808 \begin_inset Flex Code
18811 \begin_layout Plain Layout
18820 \begin_inset space \thinspace{}
18824 \begin_inset Flex Code
18827 \begin_layout Plain Layout
18833 ] As with paragraph styles, see
18834 \begin_inset CommandInset ref
18836 reference "subsec:Paragraph-Styles"
18844 \begin_layout Description
18845 \begin_inset Flex Code
18848 \begin_layout Plain Layout
18854 As with paragraph styles, see
18855 \begin_inset CommandInset ref
18857 reference "subsec:Paragraph-Styles"
18864 \begin_layout Description
18865 \begin_inset Flex Code
18868 \begin_layout Plain Layout
18875 \begin_inset Flex Code
18878 \begin_layout Plain Layout
18884 ] The prefix to use when creating labels referring to insets of this type.
18885 This allows the use of formatted references.
18888 \begin_layout Description
18889 \begin_inset Flex Code
18892 \begin_layout Plain Layout
18899 \begin_inset Flex Code
18902 \begin_layout Plain Layout
18908 ] As with paragraph styles, see
18909 \begin_inset CommandInset ref
18911 reference "subsec:Paragraph-Styles"
18918 \begin_layout Description
18919 \begin_inset Flex Code
18922 \begin_layout Plain Layout
18929 \begin_inset Flex Code
18932 \begin_layout Plain Layout
18941 \begin_inset space \thinspace{}
18945 \begin_inset Flex Code
18948 \begin_layout Plain Layout
18954 ] Resets the \SpecialChar LaTeX
18955 arguments of this layout (as defined via the
18956 \begin_inset Flex Code
18959 \begin_layout Plain Layout
18966 This is useful if you have copied a style via
18967 \begin_inset Flex Code
18970 \begin_layout Plain Layout
18976 , but you do not want to inherit its (required and optional) arguments.
18979 \begin_layout Description
18980 \begin_inset Flex Code
18983 \begin_layout Plain Layout
18990 \begin_inset Flex Code
18993 \begin_layout Plain Layout
19000 \begin_inset space \thinspace{}
19004 \begin_inset Flex Code
19007 \begin_layout Plain Layout
19015 ] Whether this inset should use the font of its surrounding environment
19017 Default is false: use the font of the surrounding environment.
19020 \begin_layout Description
19021 \begin_inset Flex Code
19024 \begin_layout Plain Layout
19031 \begin_inset Flex Code
19034 \begin_layout Plain Layout
19040 ] A string that is put at the end of the layout content.
19041 A line break in the output can be indicated by
19042 \begin_inset Flex Code
19045 \begin_layout Plain Layout
19054 \begin_layout Description
19055 \begin_inset Flex Code
19058 \begin_layout Plain Layout
19065 \begin_inset Flex Code
19068 \begin_layout Plain Layout
19075 \begin_inset space \thinspace{}
19079 \begin_inset Flex Code
19082 \begin_layout Plain Layout
19090 ] Allow spell-checking the contents of this inset.
19094 \begin_layout Subsection
19096 \begin_inset CommandInset label
19098 name "subsec:Counters"
19105 \begin_layout Standard
19106 It is necessary to define the counters (
19107 \begin_inset Flex Noun
19110 \begin_layout Plain Layout
19117 \begin_inset Flex Noun
19120 \begin_layout Plain Layout
19126 , \SpecialChar ldots
19127 ) in the text class itself.
19128 The standard counters are defined in the file
19129 \begin_inset Flex Code
19132 \begin_layout Plain Layout
19138 , so you may have to do no more than add
19141 \begin_layout LyX-Code
19142 Input stdcounters.inc
19145 \begin_layout Standard
19146 to your layout file to get them to work.
19147 But if you want to define custom counters, then you can do so.
19148 The counter declaration must begin with:
19151 \begin_layout LyX-Code
19152 Counter CounterName
19155 \begin_layout Standard
19157 \begin_inset Flex Code
19160 \begin_layout Plain Layout
19166 ' is replaced by the name of the counter.
19167 And it must end with
19168 \begin_inset Quotes eld
19172 \begin_inset Flex Code
19175 \begin_layout Plain Layout
19182 \begin_inset Quotes erd
19186 The following parameters can also be used:
19189 \begin_layout Description
19190 \begin_inset Flex Code
19193 \begin_layout Plain Layout
19200 \begin_inset Flex Code
19203 \begin_layout Plain Layout
19209 ] Sets the initial value for the counter, to which it will be reset whenever
19211 Normally, one will want the default, 1.
19214 \begin_layout Description
19215 \begin_inset Flex Code
19218 \begin_layout Plain Layout
19225 \begin_inset Flex Code
19228 \begin_layout Plain Layout
19235 \begin_inset Quotes erd
19239 \begin_inset Quotes erd
19242 ] When defined, this string defines how the counter is displayed.
19243 Setting this value sets
19244 \begin_inset Flex Code
19247 \begin_layout Plain Layout
19248 LabelStringAppendix
19254 The following special constructs can be used in the string:
19258 \begin_layout Itemize
19259 \begin_inset Flex Code
19262 \begin_layout Plain Layout
19270 will be replaced by the expansion of the
19271 \begin_inset Flex Code
19274 \begin_layout Plain Layout
19281 \begin_inset Flex Code
19284 \begin_layout Plain Layout
19285 LabelStringAppendix
19291 \begin_inset Flex Code
19294 \begin_layout Plain Layout
19304 \begin_layout Itemize
19305 counter values can be expressed using \SpecialChar LaTeX
19307 \begin_inset Newline newline
19311 \begin_inset Flex Code
19314 \begin_layout Plain Layout
19331 \begin_inset Flex Code
19334 \begin_layout Plain Layout
19346 \begin_layout Plain Layout
19356 Actually, the situation is a bit more complicated: any
19375 other than those described below will produce arabic numerals.
19376 It would not be surprising to see this change in the future.
19382 \begin_inset Flex Code
19385 \begin_layout Plain Layout
19391 : 1, 2, 3,\SpecialChar ldots
19393 \begin_inset Flex Code
19396 \begin_layout Plain Layout
19402 for lower-case letters: a, b, c, \SpecialChar ldots
19404 \begin_inset Flex Code
19407 \begin_layout Plain Layout
19413 for upper-case letters: A, B, C, \SpecialChar ldots
19415 \begin_inset Flex Code
19418 \begin_layout Plain Layout
19424 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19426 \begin_inset Flex Code
19429 \begin_layout Plain Layout
19435 for upper-case roman numerals: I, II, III\SpecialChar ldots
19437 \begin_inset Flex Code
19440 \begin_layout Plain Layout
19446 for hebrew numerals.
19450 \begin_layout Standard
19451 If LabelString is not defined, a default value is constructed as follows:
19452 if the counter has a master counter
19453 \begin_inset Flex Code
19456 \begin_layout Plain Layout
19463 \begin_inset Flex Code
19466 \begin_layout Plain Layout
19473 \begin_inset Newline newline
19477 \begin_inset Flex Code
19480 \begin_layout Plain Layout
19490 is used; otherwise the string
19491 \begin_inset Flex Code
19494 \begin_layout Plain Layout
19505 \begin_layout Description
19506 \begin_inset Flex Code
19509 \begin_layout Plain Layout
19510 LabelStringAppendix
19516 \begin_inset Flex Code
19519 \begin_layout Plain Layout
19526 \begin_inset Quotes erd
19530 \begin_inset Quotes erd
19534 \begin_inset Flex Code
19537 \begin_layout Plain Layout
19543 , but for use in the Appendix.
19546 \begin_layout Description
19547 \begin_inset Flex Code
19550 \begin_layout Plain Layout
19557 \begin_inset Flex Code
19560 \begin_layout Plain Layout
19567 \begin_inset Quotes erd
19571 \begin_inset Quotes erd
19574 ] A format for use with formatted references to this counter.
19575 For example, one might want to have references to section numbers appear
19577 \begin_inset Quotes eld
19581 \begin_inset Quotes erd
19585 The string should contain
19586 \begin_inset Quotes eld
19590 \begin_inset Quotes erd
19594 This will be replaced by the counter number itself.
19595 So, for sections, it would be: Section ##.
19598 \begin_layout Description
19599 \begin_inset Flex Code
19602 \begin_layout Plain Layout
19609 \begin_inset Flex Code
19612 \begin_layout Plain Layout
19619 \begin_inset Quotes erd
19623 \begin_inset Quotes erd
19626 ] If this is set to the name of another counter, the present counter will
19627 be reset every time the other one is increased.
19629 \begin_inset Flex Code
19632 \begin_layout Plain Layout
19639 \begin_inset Flex Code
19642 \begin_layout Plain Layout
19651 \begin_layout Subsection
19653 \begin_inset CommandInset label
19655 name "subsec:Font-description"
19662 \begin_layout Standard
19663 A font description looks like this:
19666 \begin_layout LyX-Code
19680 \begin_layout LyX-Code
19684 \begin_layout LyX-Code
19688 \begin_layout Standard
19689 The following commands are available:
19692 \begin_layout Description
19693 \begin_inset Flex Code
19696 \begin_layout Plain Layout
19703 \begin_inset Flex Code
19706 \begin_layout Plain Layout
19715 \begin_inset Flex Code
19718 \begin_layout Plain Layout
19725 \begin_inset Flex Code
19728 \begin_layout Plain Layout
19735 \begin_inset Flex Code
19738 \begin_layout Plain Layout
19745 \begin_inset Flex Code
19748 \begin_layout Plain Layout
19755 \begin_inset Flex Code
19758 \begin_layout Plain Layout
19765 \begin_inset Flex Code
19768 \begin_layout Plain Layout
19775 \begin_inset Flex Code
19778 \begin_layout Plain Layout
19785 \begin_inset Flex Code
19788 \begin_layout Plain Layout
19795 \begin_inset Flex Code
19798 \begin_layout Plain Layout
19805 \begin_inset Flex Code
19808 \begin_layout Plain Layout
19815 \begin_inset Flex Code
19818 \begin_layout Plain Layout
19825 \begin_inset Flex Code
19828 \begin_layout Plain Layout
19835 \begin_inset Flex Code
19838 \begin_layout Plain Layout
19845 \begin_inset Flex Code
19848 \begin_layout Plain Layout
19855 \begin_inset Flex Code
19858 \begin_layout Plain Layout
19865 \begin_inset Flex Code
19868 \begin_layout Plain Layout
19875 \begin_inset Flex Code
19878 \begin_layout Plain Layout
19885 \begin_inset Flex Code
19888 \begin_layout Plain Layout
19895 \begin_inset Flex Code
19898 \begin_layout Plain Layout
19907 \begin_layout Description
19908 \begin_inset Flex Code
19911 \begin_layout Plain Layout
19918 \begin_inset Flex Code
19921 \begin_layout Plain Layout
19930 \begin_inset Flex Code
19933 \begin_layout Plain Layout
19940 \begin_inset Flex Code
19943 \begin_layout Plain Layout
19952 \begin_layout Description
19953 \begin_inset Flex Code
19956 \begin_layout Plain Layout
19963 \begin_inset Flex Code
19966 \begin_layout Plain Layout
19972 ] Valid arguments are:
19973 \begin_inset Flex Code
19976 \begin_layout Plain Layout
19983 \begin_inset Flex Code
19986 \begin_layout Plain Layout
19993 \begin_inset Flex Code
19996 \begin_layout Plain Layout
20003 \begin_inset Flex Code
20006 \begin_layout Plain Layout
20013 \begin_inset Flex Code
20016 \begin_layout Plain Layout
20023 \begin_inset Flex Code
20026 \begin_layout Plain Layout
20033 \begin_inset Flex Code
20036 \begin_layout Plain Layout
20043 \begin_inset Flex Code
20046 \begin_layout Plain Layout
20053 \begin_inset Flex Code
20056 \begin_layout Plain Layout
20063 \begin_inset Flex Code
20066 \begin_layout Plain Layout
20073 \begin_inset Flex Code
20076 \begin_layout Plain Layout
20083 \begin_inset Flex Code
20086 \begin_layout Plain Layout
20093 Each of these turns on or off the corresponding attribute.
20095 \begin_inset Flex Code
20098 \begin_layout Plain Layout
20104 turns on emphasis, and
20105 \begin_inset Flex Code
20108 \begin_layout Plain Layout
20116 \begin_inset Newline newline
20119 If the latter seems puzzling, remember that the font settings for the present
20120 context are generally inherited from the surrounding context.
20122 \begin_inset Flex Code
20125 \begin_layout Plain Layout
20131 would turn off the emphasis that was anyway in effect, say, in a theorem
20135 \begin_layout Description
20136 \begin_inset Flex Code
20139 \begin_layout Plain Layout
20146 \begin_inset Flex Code
20149 \begin_layout Plain Layout
20158 \begin_inset Flex Code
20161 \begin_layout Plain Layout
20170 \begin_layout Description
20171 \begin_inset Flex Code
20174 \begin_layout Plain Layout
20181 \begin_inset Flex Code
20184 \begin_layout Plain Layout
20193 \begin_inset Flex Code
20196 \begin_layout Plain Layout
20203 \begin_inset Flex Code
20206 \begin_layout Plain Layout
20213 \begin_inset Flex Code
20216 \begin_layout Plain Layout
20225 \begin_layout Description
20226 \begin_inset Flex Code
20229 \begin_layout Plain Layout
20236 \begin_inset Flex Code
20239 \begin_layout Plain Layout
20246 \begin_inset Flex Code
20249 \begin_layout Plain Layout
20256 \begin_inset Flex Code
20259 \begin_layout Plain Layout
20268 \begin_inset Flex Code
20271 \begin_layout Plain Layout
20278 \begin_inset Flex Code
20281 \begin_layout Plain Layout
20288 \begin_inset Flex Code
20291 \begin_layout Plain Layout
20298 \begin_inset Flex Code
20301 \begin_layout Plain Layout
20308 \begin_inset Flex Code
20311 \begin_layout Plain Layout
20320 \begin_layout Subsection
20321 \begin_inset CommandInset label
20323 name "subsec:Citation-format-description"
20327 Citation format description
20330 \begin_layout Standard
20332 \begin_inset Flex Code
20335 \begin_layout Plain Layout
20341 blocks are used to describe how bibliographic information should be displayed,
20342 both within \SpecialChar LyX
20343 itself (in the citation dialog and in tooltips, for example)
20344 and in XHTML output.
20345 Such a block might look like this:
20348 \begin_layout LyX-Code
20352 \begin_layout LyX-Code
20356 \begin_layout LyX-Code
20360 \begin_layout LyX-Code
20364 \begin_layout Standard
20365 The individual lines define how the bibliographic information associated
20366 with an article or book, respectively, is to be displayed, and such a definitio
20367 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20370 defines a default format in the source code that will be used if no specific
20371 definition has been given.
20373 predefines several formats in the file
20374 \begin_inset Flex Code
20377 \begin_layout Plain Layout
20383 , which is included in most of \SpecialChar LyX
20384 's document classes.
20387 \begin_layout Standard
20388 The definitions use a simple language that allows Bib\SpecialChar TeX
20389 keys to be replaced
20391 Keys should be enclosed in
20392 \begin_inset Flex Code
20395 \begin_layout Plain Layout
20402 \begin_inset Flex Code
20405 \begin_layout Plain Layout
20412 So a simple definition might look like this:
20415 \begin_layout LyX-Code
20417 \begin_inset Quotes eld
20421 \begin_inset Quotes erd
20427 \begin_layout Standard
20428 This would print the author, followed by a comma, followed by the title,
20429 in quotes, followed by a period.
20432 \begin_layout Standard
20433 Of course, sometimes you may want to print a key only if it exists.
20434 This can be done by using a conditional construction, such as:
20435 \begin_inset Flex Code
20438 \begin_layout Plain Layout
20440 \begin_inset space ~
20450 \begin_inset Flex Code
20453 \begin_layout Plain Layout
20459 key exists, then print
20460 \begin_inset Quotes eld
20464 \begin_inset space ~
20468 \begin_inset Quotes erd
20471 followed by the volume key.
20472 It is also possible to have an else clause in the conditional, such as:
20473 \begin_inset Newline newline
20477 \begin_inset Flex Code
20480 \begin_layout Plain Layout
20481 {%author%[[%author%]][[%editor%, ed.]]}
20487 \begin_inset Newline newline
20491 \begin_inset Flex Code
20494 \begin_layout Plain Layout
20500 key is printed if it exists; otherwise, the editor key is printed, followed
20502 \begin_inset Quotes eld
20506 \begin_inset space ~
20510 \begin_inset Quotes erd
20513 Note that the key is again enclosed in
20514 \begin_inset Flex Code
20517 \begin_layout Plain Layout
20523 signs; the entire conditional is enclosed in braces; and the if and else
20524 clauses are enclosed in double brackets,
20525 \begin_inset Quotes eld
20529 \begin_inset Flex Code
20532 \begin_layout Plain Layout
20539 \begin_inset Quotes eld
20543 \begin_inset Quotes eld
20547 \begin_inset Flex Code
20550 \begin_layout Plain Layout
20557 \begin_inset Quotes erd
20561 There must be no space between any of these.
20564 \begin_layout Standard
20565 There is one other piece of syntax available in definitions, which looks
20567 \begin_inset Flex Code
20570 \begin_layout Plain Layout
20577 This defines a piece of formatting information that is to be used when
20579 \begin_inset Quotes eld
20583 \begin_inset Quotes erd
20587 Obviously, we do not want to output HTML tags when writing plain text,
20588 so they should be wrapped in
20589 \begin_inset Quotes eld
20593 \begin_inset Quotes erd
20597 \begin_inset Quotes eld
20601 \begin_inset Quotes erd
20607 \begin_layout Standard
20608 Two special sorts of definitions are also possible in a
20609 \begin_inset Flex Code
20612 \begin_layout Plain Layout
20619 An example of the first would be:
20622 \begin_layout LyX-Code
20624 \begin_inset Quotes eld
20628 \begin_inset Quotes erd
20634 \begin_layout Standard
20635 This is an abbreviation, or macro, and it can be used by treating it as
20637 \begin_inset Flex Code
20640 \begin_layout Plain Layout
20649 \begin_inset Flex Code
20652 \begin_layout Plain Layout
20658 exactly as it would treat its definition.
20659 So, let us issue the obvious
20667 \begin_layout LyX-Code
20671 \begin_layout Standard
20672 or anything like it.
20674 shouldn't go into an infinite loop, but it may go into a long one before
20678 \begin_layout Standard
20679 The second sort of special definition might look like this:
20682 \begin_layout LyX-Code
20686 \begin_layout Standard
20687 This defines a translatable piece of text, which allows relevant parts of
20688 the bibliography to be translated.
20689 It can be included in a definition by treating it as a key:
20690 \begin_inset Flex Code
20693 \begin_layout Plain Layout
20700 Several of these are predefined in
20701 \begin_inset Flex Code
20704 \begin_layout Plain Layout
20711 Note that these are not macros, in the sense just defined.
20712 They will not be expanded.
20715 \begin_layout Standard
20716 So here then is an example that use all these features:
20717 \begin_inset VSpace defskip
20723 \begin_layout Standard
20727 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20730 \begin_layout Standard
20731 \begin_inset VSpace defskip
20734 This defines a macro that prints the author, followed by a comma, if the
20736 \begin_inset Flex Code
20739 \begin_layout Plain Layout
20745 key is defined, or else prints the name of the editor, followed by the
20747 \begin_inset Flex Code
20750 \begin_layout Plain Layout
20756 or its translation (it is by default
20757 \begin_inset Quotes eld
20761 \begin_inset Quotes erd
20765 \begin_inset Flex Code
20768 \begin_layout Plain Layout
20775 Note that this is in fact defined in
20776 \begin_inset Flex Code
20779 \begin_layout Plain Layout
20785 , so you can use it in your own definitions, or re-definitions, if you load
20789 \begin_layout Section
20790 \begin_inset CommandInset label
20792 name "sec:Tags-for-XHTML"
20796 Tags for XHTML output
20799 \begin_layout Standard
20800 As with \SpecialChar LaTeX
20801 or DocBook, the format of \SpecialChar LyX
20802 's XHTML output is also controlled by
20803 layout information.
20804 In general, \SpecialChar LyX
20805 provides sensible defaults and, as mentioned earlier, it will
20806 even construct default CSS style rules from the other layout tags.
20807 For example, \SpecialChar LyX
20808 will attempt to use the information provided in the
20809 \begin_inset Flex Code
20812 \begin_layout Plain Layout
20818 declaration for the Chapter style to write CSS that will appropriately
20819 format chapter headings.
20822 \begin_layout Standard
20823 In many cases, then, you may not have to do anything at all to get acceptable
20824 XHTML output for your own environments, custom insets, and so forth.
20825 But in some cases you will, and so \SpecialChar LyX
20826 provides a number of layout tags that
20827 can be used to customize the XHTML and CSS that are generated.
20830 \begin_layout Standard
20831 Note that there are two tags,
20832 \begin_inset Flex Code
20835 \begin_layout Plain Layout
20842 \begin_inset Flex Code
20845 \begin_layout Plain Layout
20851 that may appear outside style and inset declarations.
20853 \begin_inset CommandInset ref
20855 reference "subsec:General-text-class"
20859 for details on these.
20862 \begin_layout Subsection
20863 \begin_inset CommandInset label
20865 name "subsec:Paragraph-Style-XHTML"
20872 \begin_layout Standard
20873 The sort of XHTML \SpecialChar LyX
20874 outputs for a paragraph depends upon whether we are dealing
20875 with a normal paragraph, a command, or an environment, where this is itself
20876 determined by the contents of the corresponding
20877 \begin_inset Flex Code
20880 \begin_layout Plain Layout
20891 \begin_layout Standard
20892 For a command or normal paragraph, the output XHTML has the following form:
20895 \begin_layout LyX-Code
20897 \begin_inset Quotes erd
20901 \begin_inset Quotes erd
20907 \begin_layout LyX-Code
20909 \begin_inset Quotes erd
20913 \begin_inset Quotes erd
20919 \begin_layout LyX-Code
20920 Contents of the paragraph.
20923 \begin_layout LyX-Code
20927 \begin_layout Standard
20928 The label tags are of course omitted if the paragraph does not have a label.
20931 \begin_layout Standard
20932 For an environment that is not some sort of list, the XHTML takes this form:
20935 \begin_layout LyX-Code
20937 \begin_inset Quotes erd
20941 \begin_inset Quotes erd
20947 \begin_layout LyX-Code
20949 \begin_inset Quotes erd
20953 \begin_inset Quotes erd
20957 \begin_inset Quotes erd
20961 \begin_inset Quotes erd
20964 >Environment Label</labeltag>First paragraph.</itemtag>
20967 \begin_layout LyX-Code
20968 <itemtag>Second paragraph.</itemtag>
20971 \begin_layout LyX-Code
20975 \begin_layout Standard
20976 Note that the label is output only for the first paragraph, as it should
20977 be for a theorem, for example.
20981 \begin_layout Standard
20982 For a list, we have one of these forms:
20985 \begin_layout LyX-Code
20987 \begin_inset Quotes erd
20991 \begin_inset Quotes erd
20997 \begin_layout LyX-Code
20999 \begin_inset Quotes erd
21003 \begin_inset Quotes erd
21007 \begin_inset Quotes erd
21011 \begin_inset Quotes erd
21014 >List Label</labeltag>First item.</itemtag>
21017 \begin_layout LyX-Code
21019 \begin_inset Quotes erd
21023 \begin_inset Quotes erd
21027 \begin_inset Quotes erd
21031 \begin_inset Quotes erd
21034 >List Label</labeltag>Second item.</itemtag>
21037 \begin_layout LyX-Code
21041 \begin_layout LyX-Code
21045 \begin_layout LyX-Code
21047 \begin_inset Quotes erd
21051 \begin_inset Quotes erd
21057 \begin_layout LyX-Code
21059 \begin_inset Quotes erd
21063 \begin_inset Quotes erd
21066 >List Label</labeltag><itemtag attr=
21067 \begin_inset Quotes erd
21071 \begin_inset Quotes erd
21074 >First item.</itemtag>
21077 \begin_layout LyX-Code
21079 \begin_inset Quotes erd
21083 \begin_inset Quotes erd
21086 >List Label</labeltag><itemtag attr=
21087 \begin_inset Quotes erd
21091 \begin_inset Quotes erd
21094 >Second item.</itemtag>
21097 \begin_layout LyX-Code
21101 \begin_layout Standard
21102 Note the different orders of
21103 \begin_inset Flex Code
21106 \begin_layout Plain Layout
21113 \begin_inset Flex Code
21116 \begin_layout Plain Layout
21123 Which order we get depends upon the setting of
21124 \begin_inset Flex Code
21127 \begin_layout Plain Layout
21134 \begin_inset Flex Code
21137 \begin_layout Plain Layout
21143 is false (the default), you get the first of these, with the label within
21144 the item; if true, you get the second, with the label outside the item.
21147 \begin_layout Standard
21148 The specific tags and attributes output for each paragraph type can be controlle
21149 d by means of the layout tags we are about to describe.
21150 As mentioned earlier, however, \SpecialChar LyX
21151 uses sensible defaults for many of these,
21152 so you often may not need to do very much to get good XHTML output.
21153 Think of the available tags as there so you can tweak things to your liking.
21156 \begin_layout Description
21157 \begin_inset Flex Code
21160 \begin_layout Plain Layout
21167 \begin_inset Flex Code
21170 \begin_layout Plain Layout
21176 ] Specifies attribute information to be output with the main tag.
21178 \begin_inset Quotes eld
21182 \begin_inset Flex Code
21185 \begin_layout Plain Layout
21192 \begin_inset Quotes erd
21196 By default, \SpecialChar LyX
21198 \begin_inset Quotes eld
21202 \begin_inset Flex Code
21205 \begin_layout Plain Layout
21212 \begin_inset Quotes erd
21216 \begin_inset Flex Code
21219 \begin_layout Plain Layout
21225 is the \SpecialChar LyX
21226 name of the layout, made lowercase, for example: chapter.
21231 contain any style information.
21233 \begin_inset Flex Code
21236 \begin_layout Plain Layout
21245 \begin_layout Description
21246 \begin_inset Flex Code
21249 \begin_layout Plain Layout
21256 \begin_inset Flex Code
21259 \begin_layout Plain Layout
21269 ] Whether to output the default CSS information \SpecialChar LyX
21270 generates for this layout,
21271 even if additional information is explicitly provided via
21272 \begin_inset Flex Code
21275 \begin_layout Plain Layout
21283 \begin_inset Flex Code
21286 \begin_layout Plain Layout
21292 allows you to alter or augment the generated CSS, rather than to override
21295 \begin_inset Flex Code
21298 \begin_layout Plain Layout
21307 \begin_layout Description
21308 \begin_inset Flex Code
21311 \begin_layout Plain Layout
21318 \begin_inset Flex Code
21321 \begin_layout Plain Layout
21327 ] The tag to be used for individual paragraphs of environments, replacing
21329 \begin_inset Flex Code
21332 \begin_layout Plain Layout
21338 in the examples above.
21340 \begin_inset Flex Code
21343 \begin_layout Plain Layout
21352 \begin_layout Description
21353 \begin_inset Flex Code
21356 \begin_layout Plain Layout
21363 \begin_inset Flex Code
21366 \begin_layout Plain Layout
21372 ] Attributes for the item tag.
21374 \begin_inset Quotes eld
21378 \begin_inset Flex Code
21381 \begin_layout Plain Layout
21382 class=`layoutname_item'
21388 \begin_inset Quotes erd
21396 contain any style information.
21398 \begin_inset Flex Code
21401 \begin_layout Plain Layout
21410 \begin_layout Description
21411 \begin_inset Flex Code
21414 \begin_layout Plain Layout
21421 \begin_inset Flex Code
21424 \begin_layout Plain Layout
21430 ] The tag to be used for paragraph and item labels, replacing
21431 \begin_inset Flex Code
21434 \begin_layout Plain Layout
21440 in the examples above.
21442 \begin_inset Flex Code
21445 \begin_layout Plain Layout
21452 \begin_inset Flex Code
21455 \begin_layout Plain Layout
21462 \begin_inset Flex Code
21465 \begin_layout Plain Layout
21472 \begin_inset Flex Code
21475 \begin_layout Plain Layout
21476 Centered_Top_Environment
21481 , in which case it defaults to
21482 \begin_inset Flex Code
21485 \begin_layout Plain Layout
21494 \begin_layout Description
21495 \begin_inset Flex Code
21498 \begin_layout Plain Layout
21505 \begin_inset Flex Code
21508 \begin_layout Plain Layout
21514 ] Attributes for the label tag.
21516 \begin_inset Quotes eld
21520 \begin_inset Flex Code
21523 \begin_layout Plain Layout
21524 class=`layoutname_label'
21530 \begin_inset Quotes erd
21538 contain any style information.
21540 \begin_inset Flex Code
21543 \begin_layout Plain Layout
21552 \begin_layout Description
21553 \begin_inset Flex Code
21556 \begin_layout Plain Layout
21563 \begin_inset Flex Code
21566 \begin_layout Plain Layout
21576 ] Meaningful only for list-like environments, this tag controls whether
21577 the label tag is output before or inside the item tag.
21578 This is used, for example, in the description environment, where we want
21580 \begin_inset Flex Code
21583 \begin_layout Plain Layout
21584 <dt>\SpecialChar ldots
21585 </dt><dd>\SpecialChar ldots
21593 \begin_inset Flex Code
21596 \begin_layout Plain Layout
21602 : The label tag is output inside the item tag.
21605 \begin_layout Description
21606 \begin_inset Flex Code
21609 \begin_layout Plain Layout
21615 Information to be output in the
21616 \begin_inset Flex Code
21619 \begin_layout Plain Layout
21625 section when this style is used.
21626 This might, for example, be used to include a
21627 \begin_inset Flex Code
21630 \begin_layout Plain Layout
21637 \begin_inset Flex Code
21640 \begin_layout Plain Layout
21649 \begin_layout Description
21650 \begin_inset Flex Code
21653 \begin_layout Plain Layout
21659 CSS style information to be included when this style is used.
21660 Note that this will automatically be wrapped in a layout-generated
21661 \begin_inset Flex Code
21664 \begin_layout Plain Layout
21670 block, so only the CSS itself need be included.
21672 \begin_inset Flex Code
21675 \begin_layout Plain Layout
21684 \begin_layout Description
21685 \begin_inset Flex Code
21688 \begin_layout Plain Layout
21695 \begin_inset Flex Code
21698 \begin_layout Plain Layout
21704 ] The tag to be used for the main label, replacing
21705 \begin_inset Flex Code
21708 \begin_layout Plain Layout
21714 in the examples above.
21716 \begin_inset Flex Code
21719 \begin_layout Plain Layout
21728 \begin_layout Description
21729 \begin_inset Flex Code
21732 \begin_layout Plain Layout
21739 \begin_inset Flex Code
21742 \begin_layout Plain Layout
21752 ] Marks this style as the one to be used to generate the
21753 \begin_inset Flex Code
21756 \begin_layout Plain Layout
21762 tag for the XHTML file.
21763 By default, it is false.
21765 \begin_inset Flex Code
21768 \begin_layout Plain Layout
21774 file sets it to true for the
21775 \begin_inset Flex Code
21778 \begin_layout Plain Layout
21788 \begin_layout Subsection
21792 \begin_layout Standard
21793 The XHTML output of insets can also be controlled by information in layout
21798 \begin_layout Plain Layout
21799 At present, this is true only for
21800 \begin_inset Quotes eld
21804 \begin_inset Quotes erd
21807 insets (insets you can type into) and is not true for
21808 \begin_inset Quotes eld
21812 \begin_inset Quotes erd
21815 insets (insets that are associated with dialog boxes).
21820 Here, too, \SpecialChar LyX
21821 tries to provide sensible defaults, and it constructs default
21823 But everything can be customized.
21826 \begin_layout Standard
21827 The XHTML \SpecialChar LyX
21828 outputs for an inset has the following form:
21831 \begin_layout LyX-Code
21833 \begin_inset Quotes erd
21837 \begin_inset Quotes erd
21843 \begin_layout LyX-Code
21844 <labeltag>Label</labeltag>
21847 \begin_layout LyX-Code
21849 \begin_inset Quotes erd
21853 \begin_inset Quotes erd
21856 >Contents of the inset.</innertag>
21859 \begin_layout LyX-Code
21863 \begin_layout Standard
21864 If the inset permits multiple paragraphs—that is, if
21865 \begin_inset Flex Code
21868 \begin_layout Plain Layout
21874 is true—then the contents of the inset will itself be output as paragraphs
21875 formatted according to the styles used for those paragraphs (standard,
21876 quote, and the like).
21877 The label tag is of course omitted if the paragraph does not have a label
21878 and, at present, is always
21879 \begin_inset Flex Code
21882 \begin_layout Plain Layout
21889 The inner tag is optional and, by default, does not appear.
21892 \begin_layout Standard
21893 The specific tags and attributes output for each inset can be controlled
21894 by means of the following layout tags.
21897 \begin_layout Description
21898 \begin_inset Flex Code
21901 \begin_layout Plain Layout
21908 \begin_inset Flex Code
21911 \begin_layout Plain Layout
21917 ] Specifies attribute information to be output with the main tag.
21919 \begin_inset Quotes eld
21923 \begin_inset Flex Code
21926 \begin_layout Plain Layout
21927 class=`myinset' onclick=`\SpecialChar ldots
21934 \begin_inset Quotes erd
21938 By default, \SpecialChar LyX
21940 \begin_inset Quotes eld
21944 \begin_inset Flex Code
21947 \begin_layout Plain Layout
21954 \begin_inset Quotes erd
21958 \begin_inset Flex Code
21961 \begin_layout Plain Layout
21967 is the \SpecialChar LyX
21968 name of the inset, made lowercase and with non-alphanumeric characters
21969 converted to underscores, for example: footnote.
21972 \begin_layout Description
21973 \begin_inset Flex Code
21976 \begin_layout Plain Layout
21983 \begin_inset Flex Code
21986 \begin_layout Plain Layout
21996 ] Whether to output the default CSS information \SpecialChar LyX
21997 generates for this layout,
21998 even if additional information is explicitly provided via
21999 \begin_inset Flex Code
22002 \begin_layout Plain Layout
22010 \begin_inset Flex Code
22013 \begin_layout Plain Layout
22019 allows you to alter or augment the generated CSS, rather than to override
22024 \begin_layout Description
22025 \begin_inset Flex Code
22028 \begin_layout Plain Layout
22035 \begin_inset Flex Code
22038 \begin_layout Plain Layout
22044 ] Attributes for the inner tag.
22046 \begin_inset Quotes eld
22050 \begin_inset Flex Code
22053 \begin_layout Plain Layout
22054 class=`insetname_inner'
22060 \begin_inset Quotes erd
22066 \begin_layout Description
22067 \begin_inset Flex Code
22070 \begin_layout Plain Layout
22077 \begin_inset Flex Code
22080 \begin_layout Plain Layout
22086 ] The inner tag, replacing
22087 \begin_inset Flex Code
22090 \begin_layout Plain Layout
22096 in the examples above.
22097 By default, there is none.
22100 \begin_layout Description
22101 \begin_inset Flex Code
22104 \begin_layout Plain Layout
22111 \begin_inset Flex Code
22114 \begin_layout Plain Layout
22122 ] Whether this inset represents a standalone block of text (such as a footnote)
22123 or instead represents material that is included in the surrounding text
22124 (such as a branch).
22128 \begin_layout Description
22129 \begin_inset Flex Code
22132 \begin_layout Plain Layout
22139 \begin_inset Flex Code
22142 \begin_layout Plain Layout
22148 ] A label for this inset, possibly including a reference to a counter.
22149 For example, for footnote, it might be:
22150 \begin_inset Flex Code
22153 \begin_layout Plain Layout
22162 This is optional, and there is no default.
22165 \begin_layout Description
22166 \begin_inset Flex Code
22169 \begin_layout Plain Layout
22175 Information to be output in the
22176 \begin_inset Flex Code
22179 \begin_layout Plain Layout
22185 section when this style is used.
22186 This might, for example, be used to include a
22187 \begin_inset Flex Code
22190 \begin_layout Plain Layout
22197 \begin_inset Flex Code
22200 \begin_layout Plain Layout
22209 \begin_layout Description
22210 \begin_inset Flex Code
22213 \begin_layout Plain Layout
22219 CSS style information to be included when this style is used.
22220 Note that this will automatically be wrapped in a layout-generated
22221 \begin_inset Flex Code
22224 \begin_layout Plain Layout
22230 block, so only the CSS itself need be included.
22233 \begin_layout Description
22234 \begin_inset Flex Code
22237 \begin_layout Plain Layout
22244 \begin_inset Flex Code
22247 \begin_layout Plain Layout
22253 ] The tag to be used for the main label, replacing
22254 \begin_inset Flex Code
22257 \begin_layout Plain Layout
22263 in the examples above.
22264 The default depends upon the setting of
22265 \begin_inset Flex Code
22268 \begin_layout Plain Layout
22275 \begin_inset Flex Code
22278 \begin_layout Plain Layout
22284 is true, the default is
22285 \begin_inset Flex Code
22288 \begin_layout Plain Layout
22294 ; if it is false, the default is
22295 \begin_inset Flex Code
22298 \begin_layout Plain Layout
22307 \begin_layout Subsection
22311 \begin_layout Standard
22312 The XHTML output for floats too can be controlled by layout information.
22313 The output has the following form:
22316 \begin_layout LyX-Code
22318 \begin_inset Quotes erd
22322 \begin_inset Quotes erd
22328 \begin_layout LyX-Code
22329 Contents of the float.
22332 \begin_layout LyX-Code
22336 \begin_layout Standard
22337 The caption, if there is one, is a separate inset and will be output as
22339 Its appearance can be controlled via the InsetLayout for caption insets.
22343 \begin_layout Description
22344 \begin_inset Flex Code
22347 \begin_layout Plain Layout
22354 \begin_inset Flex Code
22357 \begin_layout Plain Layout
22363 ] Specifies attribute information to be output with the main tag.
22365 \begin_inset Quotes eld
22369 \begin_inset Flex Code
22372 \begin_layout Plain Layout
22373 class=`myfloat' onclick=`\SpecialChar ldots
22380 \begin_inset Quotes erd
22384 By default, \SpecialChar LyX
22386 \begin_inset Quotes eld
22390 \begin_inset Flex Code
22393 \begin_layout Plain Layout
22394 class=`float float-floattype'
22400 \begin_inset Quotes erd
22404 \begin_inset Flex Code
22407 \begin_layout Plain Layout
22413 is \SpecialChar LyX
22414 's name for this type of float, as determined by the float declaration
22416 \begin_inset CommandInset ref
22418 reference "subsec:Floats"
22422 ), though made lowercase and with non-alphanumeric characters converted
22423 to underscores, for example: float-table.
22426 \begin_layout Description
22427 \begin_inset Flex Code
22430 \begin_layout Plain Layout
22436 CSS style information to be included when this float is used.
22437 Note that this will automatically be wrapped in a layout-generated
22438 \begin_inset Flex Code
22441 \begin_layout Plain Layout
22447 block, so only the CSS itself need be included.
22450 \begin_layout Description
22451 \begin_inset Flex Code
22454 \begin_layout Plain Layout
22461 \begin_inset Flex Code
22464 \begin_layout Plain Layout
22470 ] The tag to be used for this float, replacing
22471 \begin_inset Quotes eld
22475 \begin_inset Flex Code
22478 \begin_layout Plain Layout
22485 \begin_inset Quotes erd
22488 in the example above.
22490 \begin_inset Flex Code
22493 \begin_layout Plain Layout
22499 and will rarely need changing.
22502 \begin_layout Subsection
22503 Bibliography formatting
22506 \begin_layout Standard
22507 The bibliography can be formatted using
22508 \begin_inset Flex Code
22511 \begin_layout Plain Layout
22519 \begin_inset CommandInset ref
22521 reference "subsec:Citation-format-description"
22528 \begin_layout Subsection
22533 \begin_layout Standard
22534 We have several times mentioned that \SpecialChar LyX
22535 will generate default CSS style rules
22536 for both insets and paragraph styles, based upon the other layout information
22538 In this section, we shall say a word about which layout information \SpecialChar LyX
22543 \begin_layout Standard
22544 At present, \SpecialChar LyX
22545 auto-generates CSS only for font information, making use of
22547 \begin_inset Flex Code
22550 \begin_layout Plain Layout
22557 \begin_inset Flex Code
22560 \begin_layout Plain Layout
22567 \begin_inset Flex Code
22570 \begin_layout Plain Layout
22577 \begin_inset Flex Code
22580 \begin_layout Plain Layout
22587 \begin_inset Flex Code
22590 \begin_layout Plain Layout
22597 \begin_inset CommandInset ref
22599 reference "subsec:Font-description"
22604 The translation is mostly straightforward and obvious.
22606 \begin_inset Quotes eld
22610 \begin_inset Flex Code
22613 \begin_layout Plain Layout
22620 \begin_inset Quotes erd
22624 \begin_inset Quotes eld
22628 \begin_inset Flex Code
22631 \begin_layout Plain Layout
22632 font-family: sans-serif;
22638 \begin_inset Quotes erd
22642 The correspondence of \SpecialChar LyX
22643 sizes and CSS sizes is a little less obvious but
22644 nonetheless intuitive.
22646 \begin_inset Flex Code
22649 \begin_layout Plain Layout
22656 \begin_inset Flex URL
22659 \begin_layout Plain Layout
22669 \begin_layout Chapter
22670 Including External Material
22671 \begin_inset CommandInset label
22673 name "chap:Including-External-Material"
22680 \begin_layout Standard
22681 \begin_inset Box Shadowbox
22691 height_special "totalheight"
22696 backgroundcolor "none"
22699 \begin_layout Plain Layout
22700 WARNING: This portion of the documentation has not been updated for some
22702 We certainly hope that it is still accurate, but there are no guarantees.
22710 \begin_layout Standard
22711 The use of material from sources external to \SpecialChar LyX
22712 is covered in detail in the
22718 This part of the manual covers what needs to happen behind the scenes for
22719 new sorts of material to be included.
22722 \begin_layout Section
22726 \begin_layout Standard
22727 The external material feature is based on the concept of a
22732 A template is a specification of how \SpecialChar LyX
22733 should interface with a certain kind
22735 As bundled, \SpecialChar LyX
22736 comes with predefined templates for Xfig figures, various
22737 raster format images, chess diagrams, and LilyPond music notation.
22738 You can check the actual list by using the menu
22739 \begin_inset Flex Noun
22742 \begin_layout Plain Layout
22743 Insert\SpecialChar menuseparator
22744 File\SpecialChar menuseparator
22751 Furthermore, it is possible to roll your own template to support a specific
22753 Later we'll describe in more detail what is involved, and hopefully you
22754 will submit all the templates you create so we can include them in a later
22759 \begin_layout Standard
22760 Another basic idea of the external material feature is to distinguish between
22761 the original file that serves as a base for final material and the produced
22762 file that is included in your exported or printed document.
22763 For example, consider the case of a figure produced with
22764 \begin_inset Flex Code
22767 \begin_layout Plain Layout
22774 The Xfig application itself works on an original file with the
22775 \begin_inset Flex Code
22778 \begin_layout Plain Layout
22785 Within Xfig, you create and change your figure, and when you are done,
22787 \begin_inset Flex Code
22790 \begin_layout Plain Layout
22797 When you want to include the figure in your document, you invoke
22798 \begin_inset Flex Code
22801 \begin_layout Plain Layout
22807 in order to create a PostScript file that can readily be included in your
22811 \begin_inset Flex Code
22814 \begin_layout Plain Layout
22820 file is the original file, and the PostScript file is the produced file.
22823 \begin_layout Standard
22824 This distinction is important in order to allow updating of the material
22825 while you are in the process of writing the document.
22826 Furthermore, it provides us with the flexibility that is needed to support
22827 multiple export formats.
22828 For instance, in the case of a plain text file, it is not exactly an award-winn
22829 ing idea to include the figure as raw PostScript.
22830 Instead, you would either prefer to just include a reference to the figure
22831 or try to invoke some graphics to ASCII converter to make the final result
22832 look similar to the real graphics.
22833 The external material management allows you to do this, because it is parametri
22834 zed on the different export formats that \SpecialChar LyX
22838 \begin_layout Standard
22839 Besides supporting the production of different products according to the
22840 exported format, it supports tight integration with editing and viewing
22842 In the case of an Xfig figure, you are able to invoke Xfig on the original
22843 file with a single click from within the external material dialog in \SpecialChar LyX
22845 and also preview the produced PostScript file with Ghostview with another
22847 No more fiddling around with the command line and/or file browsers to locate
22848 and manipulate the original or produced files.
22849 In this way, you are finally able to take full advantage of the many different
22850 applications that are relevant to use when you write your documents, and
22851 ultimately be more productive.
22854 \begin_layout Section
22855 The external template configuration file
22858 \begin_layout Standard
22859 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22861 However, be aware that doing this in an careless manner most probably
22865 introduce an easily exploitable security hole.
22866 So before you do this, please read the discussion about security in
22867 \begin_inset CommandInset ref
22869 reference "sec:Security-discussion"
22876 \begin_layout Standard
22877 Having said that, we encourage you to submit any interesting templates that
22882 \begin_layout Standard
22883 The external templates are defined in the
22884 \begin_inset Flex Code
22887 \begin_layout Plain Layout
22888 LyXDir/lib/external_templates
22894 You can place your own version in
22895 \begin_inset Flex Code
22898 \begin_layout Plain Layout
22899 UserDir/external_templates
22907 \begin_layout Standard
22908 A typical template looks like this:
22911 \begin_layout LyX-Code
22915 \begin_layout LyX-Code
22916 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22919 \begin_layout LyX-Code
22923 \begin_layout LyX-Code
22927 \begin_layout LyX-Code
22931 \begin_layout LyX-Code
22935 \begin_layout LyX-Code
22939 \begin_layout LyX-Code
22940 AutomaticProduction true
22943 \begin_layout LyX-Code
22947 \begin_layout LyX-Code
22951 \begin_layout LyX-Code
22953 \change_deleted 424524441 1469933132
22956 \change_inserted 424524441 1469933134
22962 \begin_layout LyX-Code
22963 TransformCommand Rotate RotationLatexCommand
22966 \begin_layout LyX-Code
22967 TransformCommand Resize ResizeLatexCommand
22970 \begin_layout LyX-Code
22971 Product "$$RotateFront$$ResizeFront
22974 \begin_layout LyX-Code
22979 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22982 \begin_layout LyX-Code
22983 $$ResizeBack$$RotateBack"
22986 \begin_layout LyX-Code
22990 \begin_layout LyX-Code
22991 UpdateResult "$$AbsPath$$Basename.pstex_t"
22994 \begin_layout LyX-Code
22995 Requirement "graphicx"
22998 \begin_layout LyX-Code
22999 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
23002 \begin_layout LyX-Code
23003 ReferencedFile latex "$$AbsPath$$Basename.eps"
23006 \begin_layout LyX-Code
23007 ReferencedFile dvi "$$AbsPath$$Basename.eps"
23010 \begin_layout LyX-Code
23014 \begin_layout LyX-Code
23016 \change_deleted 424524441 1469933139
23019 \change_inserted 424524441 1469933140
23025 \begin_layout LyX-Code
23026 TransformCommand Rotate RotationLatexCommand
23029 \begin_layout LyX-Code
23030 TransformCommand Resize ResizeLatexCommand
23033 \begin_layout LyX-Code
23034 Product "$$RotateFront$$ResizeFront
23037 \begin_layout LyX-Code
23042 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
23045 \begin_layout LyX-Code
23046 $$ResizeBack$$RotateBack"
23049 \begin_layout LyX-Code
23050 UpdateFormat pdftex
23053 \begin_layout LyX-Code
23054 UpdateResult "$$AbsPath$$Basename.pdftex_t"
23057 \begin_layout LyX-Code
23058 Requirement "graphicx"
23061 \begin_layout LyX-Code
23062 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
23065 \begin_layout LyX-Code
23066 ReferencedFile latex "$$AbsPath$$Basename.pdf"
23069 \begin_layout LyX-Code
23073 \begin_layout LyX-Code
23077 \begin_layout LyX-Code
23078 Product "[XFig: $$FName]"
23081 \begin_layout LyX-Code
23085 \begin_layout LyX-Code
23089 \begin_layout LyX-Code
23090 Product "<graphic fileref=
23092 "$$AbsOrRelPathMaster$$Basename.eps
23097 \begin_layout LyX-Code
23101 \begin_layout LyX-Code
23105 \begin_layout LyX-Code
23106 UpdateResult "$$AbsPath$$Basename.eps"
23109 \begin_layout LyX-Code
23110 ReferencedFile docbook "$$AbsPath$$Basename.eps"
23113 \begin_layout LyX-Code
23114 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
23117 \begin_layout LyX-Code
23121 \begin_layout LyX-Code
23125 \begin_layout Standard
23126 As you can see, the template is enclosed in
23127 \begin_inset Flex Code
23130 \begin_layout Plain Layout
23138 \begin_inset Flex Code
23141 \begin_layout Plain Layout
23148 It contains a header specifying some general settings and, for each supported
23149 primary document file format, a section
23150 \begin_inset Flex Code
23153 \begin_layout Plain Layout
23161 \begin_inset Flex Code
23164 \begin_layout Plain Layout
23173 \begin_layout Subsection
23174 The template header
23177 \begin_layout Description
23178 \begin_inset Flex Code
23181 \begin_layout Plain Layout
23182 AutomaticProduction
23183 \begin_inset space ~
23191 Whether the file represented by the template must be generated by \SpecialChar LyX
23193 This command must occur exactly once.
23196 \begin_layout Description
23197 \begin_inset Flex Code
23200 \begin_layout Plain Layout
23202 \begin_inset space ~
23210 A glob pattern that is used in the file dialog to filter out the desired
23212 If there is more than one possible file extension (e.
23213 \begin_inset space \thinspace{}
23217 \begin_inset space \space{}
23221 \begin_inset Flex Code
23224 \begin_layout Plain Layout
23231 \begin_inset Flex Code
23234 \begin_layout Plain Layout
23240 ), use something like
23241 \begin_inset Flex Code
23244 \begin_layout Plain Layout
23251 This command must occur exactly once.
23254 \begin_layout Description
23255 \begin_inset Flex Code
23258 \begin_layout Plain Layout
23260 \begin_inset space ~
23268 The text that is displayed on the button.
23269 This command must occur exactly once.
23272 \begin_layout Description
23273 \begin_inset Flex Code
23276 \begin_layout Plain Layout
23278 \begin_inset space ~
23282 \begin_inset space ~
23290 The help text that is used in the External dialog.
23291 Provide enough information to explain to the user just what the template
23292 can provide him with.
23293 This command must occur exactly once.
23296 \begin_layout Description
23297 \begin_inset Flex Code
23300 \begin_layout Plain Layout
23302 \begin_inset space ~
23310 The file format of the original file.
23311 This must be the name of a format that is known to \SpecialChar LyX
23313 \begin_inset CommandInset ref
23315 reference "sec:Formats"
23321 \begin_inset Quotes eld
23325 \begin_inset Flex Code
23328 \begin_layout Plain Layout
23335 \begin_inset Quotes erd
23338 if the template can handle original files of more than one format.
23340 will attempt to interrogate the file itself in order to deduce its format
23342 This command must occur exactly once.
23345 \begin_layout Description
23346 \begin_inset Flex Code
23349 \begin_layout Plain Layout
23351 \begin_inset space ~
23359 A unique name for the template.
23360 It must not contain substitution macros (see below).
23363 \begin_layout Description
23364 \begin_inset Flex Code
23367 \begin_layout Plain Layout
23369 \begin_inset space ~
23372 Rotate|Resize|Clip|Extra
23377 This command specifies which transformations are supported by this template.
23378 It may occur zero or more times.
23379 This command enables the corresponding tabs in the external dialog.
23381 \begin_inset Flex Code
23384 \begin_layout Plain Layout
23390 command must have either a corresponding
23391 \begin_inset Flex Code
23394 \begin_layout Plain Layout
23401 \begin_inset Flex Code
23404 \begin_layout Plain Layout
23411 \begin_inset Flex Code
23414 \begin_layout Plain Layout
23421 Otherwise the transformation will not be supported by that format.
23424 \begin_layout Subsection
23428 \begin_layout Description
23429 \begin_inset Flex Code
23432 \begin_layout Plain Layout
23434 \begin_inset space ~
23437 LaTeX|PDFLaTeX|PlainText|DocBook
23438 \change_inserted 424524441 1469933248
23446 The primary document file format that this format definition is for.
23447 Not every template has a sensible representation in all document file formats.
23448 Please define nevertheless a
23449 \begin_inset Flex Code
23452 \begin_layout Plain Layout
23458 section for all templates.
23459 Use a dummy text when no representation is available.
23460 Then you can at least see a reference to the external material in the exported
23464 \begin_layout Description
23465 \begin_inset Flex Code
23468 \begin_layout Plain Layout
23470 \begin_inset space ~
23474 \begin_inset space ~
23482 This command defines an additional macro
23483 \begin_inset Flex Code
23486 \begin_layout Plain Layout
23492 for substitution in
23493 \begin_inset Flex Code
23496 \begin_layout Plain Layout
23504 \begin_inset Flex Code
23507 \begin_layout Plain Layout
23513 itself may contain substitution macros.
23514 The advantage over using
23515 \begin_inset Flex Code
23518 \begin_layout Plain Layout
23525 \begin_inset Flex Code
23528 \begin_layout Plain Layout
23534 is that the substituted value of
23535 \begin_inset Flex Code
23538 \begin_layout Plain Layout
23544 is sanitized so that it is a valid optional argument in the document format.
23545 This command may occur zero or more times.
23548 \begin_layout Description
23549 \begin_inset Flex Code
23552 \begin_layout Plain Layout
23554 \begin_inset space ~
23562 The text that is inserted in the exported document.
23563 This is actually the most important command and can be quite complex.
23564 This command must occur exactly once.
23567 \begin_layout Description
23568 \begin_inset Flex Code
23571 \begin_layout Plain Layout
23573 \begin_inset space ~
23581 This command specifies a preamble snippet that will be included in the
23584 It has to be defined using
23585 \begin_inset Flex Code
23588 \begin_layout Plain Layout
23596 \begin_inset Flex Code
23599 \begin_layout Plain Layout
23606 This command may occur zero or more times.
23609 \begin_layout Description
23610 \begin_inset Flex Code
23613 \begin_layout Plain Layout
23615 \begin_inset space ~
23619 \begin_inset space ~
23627 This command denotes files that are created by the conversion process and
23628 are needed for a particular export format.
23629 If the filename is relative, it is interpreted relative to the master document.
23630 This command may be given zero or more times.
23633 \begin_layout Description
23634 \begin_inset Flex Code
23637 \begin_layout Plain Layout
23639 \begin_inset space ~
23647 The name of a required \SpecialChar LaTeX
23649 The package is included via
23650 \begin_inset Flex Code
23653 \begin_layout Plain Layout
23661 in the \SpecialChar LaTeX
23663 This command may occur zero or more times.
23666 \begin_layout Description
23667 \begin_inset Flex Code
23670 \begin_layout Plain Layout
23672 \begin_inset space ~
23676 \begin_inset space ~
23679 RotationLatexCommand
23684 This command specifies that the built in \SpecialChar LaTeX
23685 command should be used for rotation.
23686 This command may occur once or not at all.
23689 \begin_layout Description
23690 \begin_inset Flex Code
23693 \begin_layout Plain Layout
23695 \begin_inset space ~
23699 \begin_inset space ~
23707 This command specifies that the built in \SpecialChar LaTeX
23708 command should be used for resizing.
23709 This command may occur once or not at all.
23712 \begin_layout Description
23713 \begin_inset Flex Code
23716 \begin_layout Plain Layout
23718 \begin_inset space ~
23722 \begin_inset space ~
23725 RotationLatexOption
23730 This command specifies that rotation is done via an optional argument.
23731 This command may occur once or not at all.
23734 \begin_layout Description
23735 \begin_inset Flex Code
23738 \begin_layout Plain Layout
23740 \begin_inset space ~
23744 \begin_inset space ~
23752 This command specifies that resizing is done via an optional argument.
23753 This command may occur once or not at all.
23756 \begin_layout Description
23757 \begin_inset Flex Code
23760 \begin_layout Plain Layout
23762 \begin_inset space ~
23766 \begin_inset space ~
23774 This command specifies that clipping is done via an optional argument.
23775 This command may occur once or not at all.
23778 \begin_layout Description
23779 \begin_inset Flex Code
23782 \begin_layout Plain Layout
23784 \begin_inset space ~
23788 \begin_inset space ~
23796 This command specifies that an extra optional argument is used.
23797 This command may occur once or not at all.
23800 \begin_layout Description
23801 \begin_inset Flex Code
23804 \begin_layout Plain Layout
23806 \begin_inset space ~
23814 The file format of the converted file.
23815 This must be the name of a format that is known to \SpecialChar LyX
23817 \begin_inset Flex Noun
23820 \begin_layout Plain Layout
23821 Tools\SpecialChar menuseparator
23822 Preferences\SpecialChar menuseparator
23823 File Handling\SpecialChar menuseparator
23830 This command must occur exactly once.
23831 If the resulting file format is PDF, you need to specify the format
23832 \begin_inset Flex Code
23835 \begin_layout Plain Layout
23842 This is the PDF format used for including graphics.
23843 The other defined PDF formats are for document export.
23846 \begin_layout Description
23847 \begin_inset Flex Code
23850 \begin_layout Plain Layout
23852 \begin_inset space ~
23860 The file name of the converted file.
23861 The file name must be absolute.
23862 This command must occur exactly once.
23865 \begin_layout Subsection
23866 Preamble definitions
23869 \begin_layout Standard
23870 The external template configuration file may contain additional preamble
23871 definitions enclosed by
23872 \begin_inset Flex Code
23875 \begin_layout Plain Layout
23883 \begin_inset Flex Code
23886 \begin_layout Plain Layout
23893 They can be used by the templates in the
23894 \begin_inset Flex Code
23897 \begin_layout Plain Layout
23906 \begin_layout Section
23907 The substitution mechanism
23910 \begin_layout Standard
23911 When the external material facility invokes an external program, it is done
23912 on the basis of a command defined in the template configuration file.
23913 These commands can contain various macros that are expanded before execution.
23914 Execution always take place in the directory of the containing document.
23917 \begin_layout Standard
23918 Also, whenever external material is to be displayed, the name will be produced
23919 by the substitution mechanism, and most other commands in the template
23920 definition support substitution as well.
23923 \begin_layout Standard
23924 The available macros are the following:
23927 \begin_layout Description
23928 \begin_inset Flex Code
23931 \begin_layout Plain Layout
23932 $$AbsOrRelPathMaster
23937 The file path, absolute or relative to the master \SpecialChar LyX
23941 \begin_layout Description
23942 \begin_inset Flex Code
23945 \begin_layout Plain Layout
23946 $$AbsOrRelPathParent
23951 The file path, absolute or relative to the \SpecialChar LyX
23955 \begin_layout Description
23956 \begin_inset Flex Code
23959 \begin_layout Plain Layout
23965 The absolute file path.
23968 \begin_layout Description
23969 \begin_inset Flex Code
23972 \begin_layout Plain Layout
23978 The filename without path and without the extension.
23981 \begin_layout Description
23982 \begin_inset Flex Code
23985 \begin_layout Plain Layout
23987 \begin_inset Quotes eld
23991 \begin_inset Quotes erd
23999 This macro will expand to the contents of the file with the name
24000 \begin_inset Flex Code
24003 \begin_layout Plain Layout
24012 \begin_layout Description
24013 \begin_inset Flex Code
24016 \begin_layout Plain Layout
24022 The file extension (including the dot).
24025 \begin_layout Description
24026 \begin_inset Flex Code
24029 \begin_layout Plain Layout
24035 This will be the string
24036 \begin_inset Quotes eld
24040 \begin_inset Quotes erd
24043 if the file is in JPEG format, otherwise it will be the string
24044 \begin_inset Quotes eld
24048 \begin_inset Quotes erd
24052 This is useful to avoid uneeded conversions for output formats that support
24053 both PNG and JPEG fomats.
24054 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
24059 \begin_layout Description
24060 \begin_inset Flex Code
24063 \begin_layout Plain Layout
24069 The filename of the file specified in the external material dialog.
24070 This is either an absolute name, or it is relative to the \SpecialChar LyX
24074 \begin_layout Description
24075 \begin_inset Flex Code
24078 \begin_layout Plain Layout
24085 \begin_inset Flex Code
24088 \begin_layout Plain Layout
24094 (absolute name or relative to the \SpecialChar LyX
24098 \begin_layout Description
24099 \begin_inset Flex Code
24102 \begin_layout Plain Layout
24108 The file path, relative to the master \SpecialChar LyX
24112 \begin_layout Description
24113 \begin_inset Flex Code
24116 \begin_layout Plain Layout
24122 The file path, relative to the \SpecialChar LyX
24126 \begin_layout Description
24127 \begin_inset Flex Code
24130 \begin_layout Plain Layout
24136 This macro will expand to the absolute path of the system directory.
24137 This is typically used to point to the various helper scripts that are
24138 bundled with \SpecialChar LyX
24142 \begin_layout Description
24143 \begin_inset Flex Code
24146 \begin_layout Plain Layout
24152 A name and full path to a temporary file which will be automatically deleted
24153 whenever the containing document is closed, or the external material insertion
24157 \begin_layout Standard
24158 All path macros contain a trailing directory separator, so you can construct
24160 \begin_inset space \thinspace{}
24164 \begin_inset space \space{}
24167 the absolute filename with
24168 \begin_inset Flex Code
24171 \begin_layout Plain Layout
24172 $$AbsPath$$Basename$$Extension
24180 \begin_layout Standard
24181 The macros above are substituted in all commands unless otherwise noted.
24183 \begin_inset Flex Code
24186 \begin_layout Plain Layout
24192 supports additionally the following substitutions if they are enabled by
24194 \begin_inset Flex Code
24197 \begin_layout Plain Layout
24204 \begin_inset Flex Code
24207 \begin_layout Plain Layout
24216 \begin_layout Description
24217 \begin_inset Flex Code
24220 \begin_layout Plain Layout
24226 The front part of the resize command.
24229 \begin_layout Description
24230 \begin_inset Flex Code
24233 \begin_layout Plain Layout
24239 The back part of the resize command.
24242 \begin_layout Description
24243 \begin_inset Flex Code
24246 \begin_layout Plain Layout
24252 The front part of the rotation command.
24255 \begin_layout Description
24256 \begin_inset Flex Code
24259 \begin_layout Plain Layout
24265 The back part of the rotation command.
24268 \begin_layout Standard
24269 The value string of the
24270 \begin_inset Flex Code
24273 \begin_layout Plain Layout
24279 command supports additionally the following substitutions if they are enabled
24281 \begin_inset Flex Code
24284 \begin_layout Plain Layout
24291 \begin_inset Flex Code
24294 \begin_layout Plain Layout
24303 \begin_layout Description
24304 \begin_inset Flex Code
24307 \begin_layout Plain Layout
24316 \begin_layout Description
24317 \begin_inset Flex Code
24320 \begin_layout Plain Layout
24329 \begin_layout Description
24330 \begin_inset Flex Code
24333 \begin_layout Plain Layout
24342 \begin_layout Description
24343 \begin_inset Flex Code
24346 \begin_layout Plain Layout
24352 The rotation option.
24355 \begin_layout Standard
24356 You may ask why there are so many path macros.
24357 There are mainly two reasons:
24360 \begin_layout Enumerate
24361 Relative and absolute file names should remain relative or absolute, respectivel
24363 Users may have reasons to prefer either form.
24364 Relative names are useful for portable documents that should work on different
24365 machines, for example.
24366 Absolute names may be required by some programs.
24369 \begin_layout Enumerate
24371 treats relative file names differently than \SpecialChar LyX
24372 and other programs in nested
24374 For \SpecialChar LyX
24375 , a relative file name is always relative to the document that contains
24377 For \SpecialChar LaTeX
24378 , it is always relative to the master document.
24379 These two definitions are identical if you have only one document, but
24380 differ if you have a master document that includes part documents.
24381 That means that relative filenames must be transformed when presented to
24384 Fortunately \SpecialChar LyX
24385 does this automatically for you if you choose the right macros.
24388 \begin_layout Standard
24389 So which path macro should be used in new template definitions? The rule
24393 \begin_layout Itemize
24395 \begin_inset Flex Code
24398 \begin_layout Plain Layout
24404 if an absolute path is required.
24407 \begin_layout Itemize
24409 \begin_inset Flex Code
24412 \begin_layout Plain Layout
24413 $$AbsOrRelPathMaster
24418 if the substituted string is some kind of \SpecialChar LaTeX
24422 \begin_layout Itemize
24424 \begin_inset Flex Code
24427 \begin_layout Plain Layout
24428 $$AbsOrRelPathParent
24433 in order to preserve the user's choice.
24436 \begin_layout Standard
24437 There are special cases where this rule does not work and e.
24438 \begin_inset space \thinspace{}
24442 \begin_inset space \space{}
24445 relative names are needed, but normally it will work just fine.
24446 One example for such a case is the command
24447 \begin_inset Flex Code
24450 \begin_layout Plain Layout
24451 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24456 in the XFig template above: We can't use the absolute name because the
24458 \begin_inset Flex Code
24461 \begin_layout Plain Layout
24467 files needs the relative name in order to rewrite the file content.
24470 \begin_layout Section
24471 Security discussion
24472 \begin_inset CommandInset label
24474 name "sec:Security-discussion"
24481 \begin_layout Standard
24482 The external material feature interfaces with a lot of external programs
24483 and does so automatically, so we have to consider the security implications
24485 In particular, since you have the option of including your own filenames
24486 and/or parameter strings and those are expanded into a command, it seems
24487 that it would be possible to create a malicious document which executes
24488 arbitrary commands when a user views or prints the document.
24489 This is something we definitely want to avoid.
24492 \begin_layout Standard
24493 However, since the external program commands are specified in the template
24494 configuration file only, there are no security issues if \SpecialChar LyX
24495 is properly configure
24496 d with safe templates only.
24497 This is so because the external programs are invoked with the
24498 \begin_inset Flex Code
24501 \begin_layout Plain Layout
24507 -system call rather than the
24508 \begin_inset Flex Code
24511 \begin_layout Plain Layout
24517 system-call, so it's not possible to execute arbitrary commands from the
24518 filename or parameter section via the shell.
24521 \begin_layout Standard
24522 This also implies that you are restricted in what command strings you can
24523 use in the external material templates.
24524 In particular, pipes and redirection are not readily available.
24525 This has to be so if \SpecialChar LyX
24526 should remain safe.
24527 If you want to use some of the shell features, you should write a safe
24528 script to do this in a controlled manner, and then invoke the script from
24529 the command string.
24533 \begin_layout Standard
24534 It is possible to design a template that interacts directly with the shell,
24535 but since this would allow a malicious user to execute arbitrary commands
24536 by writing clever filenames and/or parameters, we generally recommend that
24537 you only use safe scripts that work with the
24538 \begin_inset Flex Code
24541 \begin_layout Plain Layout
24547 system call in a controlled manner.
24548 Of course, for use in a controlled environment, it can be tempting to just
24549 fall back to use ordinary shell scripts.
24550 If you do so, be aware that you
24554 provide an easily exploitable security hole in your system.
24555 Of course it stands to reason that such unsafe templates will never be
24556 included in the standard \SpecialChar LyX
24557 distribution, although we do encourage people
24558 to submit new templates in the open source tradition.
24559 But \SpecialChar LyX
24560 as shipped from the official distribution channels will never have
24564 \begin_layout Standard
24565 Including external material provides a lot of power, and you have to be
24566 careful not to introduce security hazards with this power.
24567 A subtle error in a single line in an innocent looking script can open
24568 the door to huge security problems.
24569 So if you do not fully understand the issues, we recommend that you consult
24570 a knowledgeable security professional or the \SpecialChar LyX
24571 development team if you have
24572 any questions about whether a given template is safe or not.
24573 And do this before you use it in an uncontrolled environment.
24576 \begin_layout Chapter
24578 List of supported \SpecialChar LyX
24579 functions to be used in layouts
24580 \begin_inset CommandInset label
24582 name "chap:List-of-functions"
24589 \begin_layout Standard
24591 \begin_inset Tabular
24592 <lyxtabular version="3" rows="11" columns="8">
24593 <features tabularvalignment="middle">
24594 <column alignment="left" valignment="top">
24595 <column alignment="left" valignment="top">
24596 <column alignment="left" valignment="top">
24597 <column alignment="left" valignment="top">
24598 <column alignment="left" valignment="top">
24599 <column alignment="left" valignment="top">
24600 <column alignment="left" valignment="top">
24601 <column alignment="left" valignment="top">
24603 <cell alignment="left" valignment="top" usebox="none">
24606 \begin_layout Plain Layout
24612 <cell alignment="left" valignment="top" usebox="none">
24615 \begin_layout Plain Layout
24621 <cell alignment="left" valignment="top" usebox="none">
24624 \begin_layout Plain Layout
24630 <cell alignment="left" valignment="top" usebox="none">
24633 \begin_layout Plain Layout
24639 <cell alignment="center" valignment="top" usebox="none">
24642 \begin_layout Plain Layout
24648 <cell alignment="center" valignment="top" usebox="none">
24651 \begin_layout Plain Layout
24657 <cell alignment="center" valignment="top" usebox="none">
24660 \begin_layout Plain Layout
24666 <cell alignment="center" valignment="top" usebox="none">
24669 \begin_layout Plain Layout
24677 <cell alignment="left" valignment="top" usebox="none">
24680 \begin_layout Plain Layout
24686 <cell alignment="left" valignment="top" usebox="none">
24689 \begin_layout Plain Layout
24695 <cell alignment="left" valignment="top" usebox="none">
24698 \begin_layout Plain Layout
24704 <cell alignment="left" valignment="top" usebox="none">
24707 \begin_layout Plain Layout
24713 <cell alignment="center" valignment="top" usebox="none">
24716 \begin_layout Plain Layout
24722 <cell alignment="center" valignment="top" usebox="none">
24725 \begin_layout Plain Layout
24731 <cell alignment="center" valignment="top" usebox="none">
24734 \begin_layout Plain Layout
24740 <cell alignment="center" valignment="top" usebox="none">
24743 \begin_layout Plain Layout
24751 <cell alignment="left" valignment="top" usebox="none">
24754 \begin_layout Plain Layout
24760 <cell alignment="left" valignment="top" usebox="none">
24763 \begin_layout Plain Layout
24769 <cell alignment="left" valignment="top" usebox="none">
24772 \begin_layout Plain Layout
24778 <cell alignment="left" valignment="top" usebox="none">
24781 \begin_layout Plain Layout
24787 <cell alignment="center" valignment="top" usebox="none">
24790 \begin_layout Plain Layout
24796 <cell alignment="center" valignment="top" usebox="none">
24799 \begin_layout Plain Layout
24805 <cell alignment="center" valignment="top" usebox="none">
24808 \begin_layout Plain Layout
24814 <cell alignment="center" valignment="top" usebox="none">
24817 \begin_layout Plain Layout
24825 <cell alignment="left" valignment="top" usebox="none">
24828 \begin_layout Plain Layout
24834 <cell alignment="left" valignment="top" usebox="none">
24837 \begin_layout Plain Layout
24843 <cell alignment="left" valignment="top" usebox="none">
24846 \begin_layout Plain Layout
24852 <cell alignment="left" valignment="top" usebox="none">
24855 \begin_layout Plain Layout
24861 <cell alignment="center" valignment="top" usebox="none">
24864 \begin_layout Plain Layout
24870 <cell alignment="center" valignment="top" usebox="none">
24873 \begin_layout Plain Layout
24879 <cell alignment="center" valignment="top" usebox="none">
24882 \begin_layout Plain Layout
24888 <cell alignment="center" valignment="top" usebox="none">
24891 \begin_layout Plain Layout
24899 <cell alignment="left" valignment="top" usebox="none">
24902 \begin_layout Plain Layout
24908 <cell alignment="left" valignment="top" usebox="none">
24911 \begin_layout Plain Layout
24917 <cell alignment="left" valignment="top" usebox="none">
24920 \begin_layout Plain Layout
24926 <cell alignment="left" valignment="top" usebox="none">
24929 \begin_layout Plain Layout
24935 <cell alignment="center" valignment="top" usebox="none">
24938 \begin_layout Plain Layout
24944 <cell alignment="center" valignment="top" usebox="none">
24947 \begin_layout Plain Layout
24953 <cell alignment="center" valignment="top" usebox="none">
24956 \begin_layout Plain Layout
24962 <cell alignment="center" valignment="top" usebox="none">
24965 \begin_layout Plain Layout
24973 <cell alignment="left" valignment="top" usebox="none">
24976 \begin_layout Plain Layout
24982 <cell alignment="left" valignment="top" usebox="none">
24985 \begin_layout Plain Layout
24991 <cell alignment="left" valignment="top" usebox="none">
24994 \begin_layout Plain Layout
25000 <cell alignment="left" valignment="top" usebox="none">
25003 \begin_layout Plain Layout
25009 <cell alignment="center" valignment="top" usebox="none">
25012 \begin_layout Plain Layout
25018 <cell alignment="center" valignment="top" usebox="none">
25021 \begin_layout Plain Layout
25027 <cell alignment="center" valignment="top" usebox="none">
25030 \begin_layout Plain Layout
25036 <cell alignment="center" valignment="top" usebox="none">
25039 \begin_layout Plain Layout
25047 <cell alignment="left" valignment="top" usebox="none">
25050 \begin_layout Plain Layout
25056 <cell alignment="left" valignment="top" usebox="none">
25059 \begin_layout Plain Layout
25065 <cell alignment="left" valignment="top" usebox="none">
25068 \begin_layout Plain Layout
25074 <cell alignment="left" valignment="top" usebox="none">
25077 \begin_layout Plain Layout
25083 <cell alignment="center" valignment="top" usebox="none">
25086 \begin_layout Plain Layout
25092 <cell alignment="center" valignment="top" usebox="none">
25095 \begin_layout Plain Layout
25101 <cell alignment="center" valignment="top" usebox="none">
25104 \begin_layout Plain Layout
25110 <cell alignment="center" valignment="top" usebox="none">
25113 \begin_layout Plain Layout
25121 <cell alignment="left" valignment="top" usebox="none">
25124 \begin_layout Plain Layout
25130 <cell alignment="left" valignment="top" usebox="none">
25133 \begin_layout Plain Layout
25139 <cell alignment="left" valignment="top" usebox="none">
25142 \begin_layout Plain Layout
25148 <cell alignment="left" valignment="top" usebox="none">
25151 \begin_layout Plain Layout
25157 <cell alignment="center" valignment="top" usebox="none">
25160 \begin_layout Plain Layout
25166 <cell alignment="center" valignment="top" usebox="none">
25169 \begin_layout Plain Layout
25175 <cell alignment="center" valignment="top" usebox="none">
25178 \begin_layout Plain Layout
25184 <cell alignment="center" valignment="top" usebox="none">
25187 \begin_layout Plain Layout
25195 <cell alignment="left" valignment="top" usebox="none">
25198 \begin_layout Plain Layout
25204 <cell alignment="left" valignment="top" usebox="none">
25207 \begin_layout Plain Layout
25213 <cell alignment="left" valignment="top" usebox="none">
25216 \begin_layout Plain Layout
25222 <cell alignment="left" valignment="top" usebox="none">
25225 \begin_layout Plain Layout
25231 <cell alignment="center" valignment="top" usebox="none">
25234 \begin_layout Plain Layout
25240 <cell alignment="center" valignment="top" usebox="none">
25243 \begin_layout Plain Layout
25249 <cell alignment="center" valignment="top" usebox="none">
25252 \begin_layout Plain Layout
25258 <cell alignment="center" valignment="top" usebox="none">
25261 \begin_layout Plain Layout
25269 <cell alignment="left" valignment="top" usebox="none">
25272 \begin_layout Plain Layout
25278 <cell alignment="left" valignment="top" usebox="none">
25281 \begin_layout Plain Layout
25287 <cell alignment="left" valignment="top" usebox="none">
25290 \begin_layout Plain Layout
25296 <cell alignment="left" valignment="top" usebox="none">
25299 \begin_layout Plain Layout
25305 <cell alignment="center" valignment="top" usebox="none">
25308 \begin_layout Plain Layout
25314 <cell alignment="center" valignment="top" usebox="none">
25317 \begin_layout Plain Layout
25323 <cell alignment="center" valignment="top" usebox="none">
25326 \begin_layout Plain Layout
25332 <cell alignment="center" valignment="top" usebox="none">
25335 \begin_layout Plain Layout
25343 <cell alignment="center" valignment="top" usebox="none">
25346 \begin_layout Plain Layout
25352 <cell alignment="center" valignment="top" usebox="none">
25355 \begin_layout Plain Layout
25361 <cell alignment="center" valignment="top" usebox="none">
25364 \begin_layout Plain Layout
25370 <cell alignment="center" valignment="top" usebox="none">
25373 \begin_layout Plain Layout
25379 <cell alignment="center" valignment="top" usebox="none">
25382 \begin_layout Plain Layout
25388 <cell alignment="center" valignment="top" usebox="none">
25391 \begin_layout Plain Layout
25397 <cell alignment="center" valignment="top" usebox="none">
25400 \begin_layout Plain Layout
25406 <cell alignment="center" valignment="top" usebox="none">
25409 \begin_layout Plain Layout
25423 \begin_layout Chapter
25424 Names of available colors to be used in layouts
25425 \begin_inset CommandInset label
25427 name "chap:Names-of-colors"
25434 \begin_layout Standard
25435 The colors listed here are the standard colors and the those that you can
25436 adjust in the \SpecialChar LyX
25440 \begin_layout Description
25453 No particular color – clear or default
25456 \begin_layout Description
25460 \begin_layout Description
25464 \begin_layout Description
25468 \begin_layout Description
25472 \begin_layout Description
25476 \begin_layout Description
25480 \begin_layout Description
25484 \begin_layout Description
25488 \begin_layout Description
25489 added_space Added space marker color
25492 \begin_layout Description
25493 addedtext Added text color
25496 \begin_layout Description
25497 appendix Appendix marker color
25500 \begin_layout Description
25501 background Background color
25504 \begin_layout Description
25505 bottomarea Bottom area color
25508 \begin_layout Description
25509 branchlabel Label color for branches
25512 \begin_layout Description
25513 buttonbg Color used for button background
25516 \begin_layout Description
25517 buttonhoverbg Color used for button background under focus
25520 \begin_layout Description
25521 buttonframe Color for inset button frames
25524 \begin_layout Description
25525 changebar Changebar color
25528 \begin_layout Description
25529 changedtextauthor1 Changed text color author 1
25532 \begin_layout Description
25533 changedtextauthor2 Changed text color author 2
25536 \begin_layout Description
25537 changedtextauthor3 Changed text color author 3
25540 \begin_layout Description
25541 changedtextauthor4 Changed text color author 4
25544 \begin_layout Description
25545 changedtextauthor5 Changed text color author 5
25548 \begin_layout Description
25549 collapsable_inset_frame Collapsable insets framecolor
25552 \begin_layout Description
25553 collapsable_inset_text Collapsable insets text color
25556 \begin_layout Description
25557 command Text color for command insets
25560 \begin_layout Description
25561 commandbg Background color for command insets
25564 \begin_layout Description
25565 commandframe Frame color for command insets
25568 \begin_layout Description
25569 comment color for comments
25572 \begin_layout Description
25573 commentbg Background color of comments
25576 \begin_layout Description
25577 cursor Cursor color
25580 \begin_layout Description
25581 deletedtext Deleted text color
25584 \begin_layout Description
25585 deletedtextmodifier Deleted text modifying color
25588 \begin_layout Description
25589 depthbar Color for the depth bars in the margin
25592 \begin_layout Description
25593 eolmarker End of line marker color
25596 \begin_layout Description
25597 error Color of the \SpecialChar LaTeX
25601 \begin_layout Description
25602 footlabel Label color for footnotes
25605 \begin_layout Description
25606 graphicsbg Graphics inset background color
25609 \begin_layout Description
25610 greyedout Label color for greyedout insets
25613 \begin_layout Description
25614 greyedoutbg Background color of greyedout inset
25617 \begin_layout Description
25618 greyedouttext Color for greyedout inset text
25621 \begin_layout Description
25622 indexlabel Label color for index insets
25625 \begin_layout Description
25626 ignore The color is ignored
25629 \begin_layout Description
25630 inherit The color is inherited
25633 \begin_layout Description
25634 inlinecompletion Inline completion color
25637 \begin_layout Description
25638 insetbg Inset marker background color
25641 \begin_layout Description
25642 insetframe Inset marker frame color
25645 \begin_layout Description
25646 language Color for marking foreign language words
25649 \begin_layout Description
25650 latex Text color in \SpecialChar LaTeX
25654 \begin_layout Description
25655 listingsbg Background color of listings inset
25658 \begin_layout Description
25659 marginlabel Label color for margin notes
25662 \begin_layout Description
25663 math Math inset text color
25666 \begin_layout Description
25667 mathbg Math inset background color
25670 \begin_layout Description
25671 mathcorners Math inset frame color not under focus
25674 \begin_layout Description
25675 mathframe Math inset frame color under focus
25678 \begin_layout Description
25679 mathline Math line color
25682 \begin_layout Description
25683 mathmacrobg Macro math inset background color
25686 \begin_layout Description
25687 mathmacroblend Macro math blended color
25690 \begin_layout Description
25691 mathmacroframe Macro math frame color
25694 \begin_layout Description
25695 mathmacrohoverbg Macro math inset background color hovered
25698 \begin_layout Description
25699 mathmacrolabel Macro math label color
25702 \begin_layout Description
25703 mathmacronewarg Macro template color for new parameters
25706 \begin_layout Description
25707 mathmacrooldarg Macro template color for old parameters
25710 \begin_layout Description
25711 newpage New page color
25714 \begin_layout Description
25715 nonunique_inlinecompletion Inline completion color for the non-unique part
25718 \begin_layout Description
25719 notebg Background color of notes
25722 \begin_layout Description
25723 notelabel Label color for notes
25726 \begin_layout Description
25727 pagebreak Page break/line break color
25730 \begin_layout Description
25731 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25734 \begin_layout Description
25735 phantomtext Text color for phantom insets
25738 \begin_layout Description
25739 preview The color used for previews
25742 \begin_layout Description
25743 previewframe Preview frame color
25746 \begin_layout Description
25747 regexpframe Color for regexp frame
25750 \begin_layout Description
25751 selection Background color of selected text
25754 \begin_layout Description
25755 selectiontext Foreground color of selected text
25758 \begin_layout Description
25759 shadedbg Background color of shaded box
25762 \begin_layout Description
25763 special Special chars text color
25766 \begin_layout Description
25767 tabularline Table line color
25770 \begin_layout Description
25771 tabularonoffline Table line color
25774 \begin_layout Description
25775 urllabel Label color for URL insets
25778 \begin_layout Description
25779 urltext Color for URL inset text