1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
9 % DO NOT ALTER THIS PREAMBLE!!!
11 % This preamble is designed to ensure that this document prints
12 % out as advertised. If you mess with this preamble,
13 % parts of this document may not print out as expected. If you
14 % have problems LaTeXing this file, please contact
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
18 % the pages of the TOC is numbered roman
19 % and a pdf-bookmark for the TOC is added
20 \let\myTOC\tableofcontents
21 \renewcommand\tableofcontents{%
23 \pdfbookmark[1]{\contentsname}{}
27 % increase link area for cross-references and autoname them,
28 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
29 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
30 \@ifpackageloaded{babel}{
31 \addto\extrasenglish{%
32 \renewcommand*{\equationautorefname}[1]{}%
33 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
34 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
35 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
39 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
44 \maintain_unincluded_children false
46 \language_package default
49 \font_roman "lmodern" "default"
50 \font_sans "lmss" "default"
51 \font_typewriter "lmtt" "default"
52 \font_math "auto" "auto"
53 \font_default_family default
54 \use_non_tex_fonts false
57 \font_sf_scale 100 100
58 \font_tt_scale 100 100
60 \default_output_format pdf2
62 \bibtex_command default
63 \index_command default
67 \pdf_title "LyX Configuration Manual"
68 \pdf_author "LyX Team"
69 \pdf_subject "LyX-documentation Customization"
70 \pdf_keywords "LyX, documentation, customization"
72 \pdf_bookmarksnumbered true
73 \pdf_bookmarksopen true
74 \pdf_bookmarksopenlevel 1
79 \pdf_pdfusetitle false
80 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
83 \use_package amsmath 0
84 \use_package amssymb 0
87 \use_package mathdots 1
88 \use_package mathtools 0
90 \use_package stackrel 0
91 \use_package stmaryrd 0
92 \use_package undertilde 0
94 \cite_engine_type default
98 \paperorientation portrait
113 \paragraph_separation indent
114 \paragraph_indentation default
115 \quotes_language english
118 \paperpagestyle headings
119 \tracking_changes false
120 \output_changes false
129 Customizing \SpecialChar LyX
130 : Features for the Advanced User
134 by the \SpecialChar LyX
139 \begin_layout Plain Layout
141 If you have comments or error corrections, please send them to the \SpecialChar LyX
144 \begin_inset CommandInset href
146 target "lyx-docs@lists.lyx.org"
153 \begin_inset Quotes eld
157 \begin_inset Quotes erd
160 in the subject header, and please cc the current maintainer of this file,
161 Richard Heck <rgheck@comcast.net>.
167 \begin_inset Newline newline
171 \begin_inset Newline newline
177 \begin_layout Standard
178 \begin_inset CommandInset toc
179 LatexCommand tableofcontents
186 \begin_layout Standard
187 \begin_inset Note Note
190 \begin_layout Plain Layout
191 Please use change tracking when modifying this document.
192 This makes it easier for our translators to recognize things that have
193 been changed, and it helps the maintainer keep up-to-date with what's been
202 \begin_layout Chapter
206 \begin_layout Standard
207 This manual covers the customization features present in \SpecialChar LyX
209 In it, we discuss issues like keyboard shortcuts, screen previewing options,
210 printer options, sending commands to \SpecialChar LyX
211 via the \SpecialChar LyX
212 Server, internationalization,
213 installing new \SpecialChar LaTeX
214 classes and \SpecialChar LyX
216 We can't possibly hope to touch on everything you can change—our developers
217 add new features faster than we can document them—but we will explain the
218 most common customizations and hopefully point you in the right direction
219 for some of the more obscure ones.
222 \begin_layout Standard
223 \begin_inset Branch OutDated
226 \begin_layout Standard
227 Information from previous versions of this document that now seems to be
228 outdated is contained in the OutDated branch of this document.
229 By default, this information will not appear in the \SpecialChar LaTeX
238 \begin_layout Chapter
243 \begin_layout Standard
244 This chapter aims to help you to find your way through the \SpecialChar LyX
247 Before continuing to read this chapter, you should find out where your
249 library and user directories are by using
250 \begin_inset Flex Noun
253 \begin_layout Plain Layout
254 Help\SpecialChar menuseparator
265 The library directory is the place where \SpecialChar LyX
266 places its system-wide configuration
267 files; the user directory is where you can place your modified versions.
268 We will call the former
269 \begin_inset Flex Code
272 \begin_layout Plain Layout
279 \begin_inset Flex Noun
282 \begin_layout Plain Layout
288 in the remainder of this document.
292 \begin_layout Section
294 \begin_inset Flex Code
297 \begin_layout Plain Layout
306 \begin_layout Standard
307 \begin_inset Flex Code
310 \begin_layout Plain Layout
316 and its sub-directories contain a number of files and that can be used
317 to customize \SpecialChar LyX
319 You can change many of these files from within \SpecialChar LyX
321 \begin_inset Flex Noun
324 \begin_layout Plain Layout
325 Tools\SpecialChar menuseparator
332 Most customization that you will want to do in \SpecialChar LyX
333 is possible through this
335 However, many other inner aspects of \SpecialChar LyX
336 can be customized by modifying the
338 \begin_inset Flex Code
341 \begin_layout Plain Layout
348 These files fall in different categories, described in the following subsection
352 \begin_layout Subsection
353 Automatically generated files
356 \begin_layout Standard
357 The files, which are to be found in
358 \begin_inset Flex Noun
361 \begin_layout Plain Layout
367 , are generated when you configure \SpecialChar LyX
369 They contain various default values that are guessed by inspection.
370 In general, it is not a good idea to modify them, since they might be overwritt
374 \begin_layout Labeling
375 \labelwidthstring 00.00.0000
376 \begin_inset Flex Code
379 \begin_layout Plain Layout
385 contains defaults for various commands.
388 \begin_layout Labeling
389 \labelwidthstring 00.00.0000
390 \begin_inset Flex Code
393 \begin_layout Plain Layout
399 contains the list of packages that have been recognized by \SpecialChar LyX
401 It is currently unused by the \SpecialChar LyX
402 program itself, but the information extracted,
403 and more, is made available with
404 \begin_inset Flex Noun
407 \begin_layout Plain Layout
408 Help\SpecialChar menuseparator
422 \begin_layout Labeling
423 \labelwidthstring 00.00.0000
424 \begin_inset Flex Code
427 \begin_layout Plain Layout
433 the list of text classes that have been found in your
434 \begin_inset Flex Code
437 \begin_layout Plain Layout
443 directories, along with the associated \SpecialChar LaTeX
444 document class and their description.
447 \begin_layout Labeling
448 \labelwidthstring 00.00.0000
449 \begin_inset Flex Code
452 \begin_layout Plain Layout
458 the list of layout modules found in your
459 \begin_inset Flex Code
462 \begin_layout Plain Layout
471 \begin_layout Labeling
472 \labelwidthstring 00.00.0000
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 lists of various sorts of \SpecialChar LaTeX
483 -related files found on your system
486 \begin_layout Labeling
487 \labelwidthstring 00.00.0000
488 \begin_inset Flex Code
491 \begin_layout Plain Layout
492 doc/\SpecialChar LaTeX
498 is automatically generated during configuration from the file
499 \begin_inset Flex Code
502 \begin_layout Plain Layout
510 It contains information on your \SpecialChar LaTeX
514 \begin_layout Subsection
518 \begin_layout Standard
519 These directories are duplicated between
520 \begin_inset Flex Code
523 \begin_layout Plain Layout
530 \begin_inset Flex Code
533 \begin_layout Plain Layout
540 If a particular files exists in both places, the one in
541 \begin_inset Flex Code
544 \begin_layout Plain Layout
553 \begin_layout Labeling
554 \labelwidthstring 00.00.0000
555 \begin_inset Flex Code
558 \begin_layout Plain Layout
564 this directory contains files with the extension
565 \begin_inset Flex Code
568 \begin_layout Plain Layout
574 that define the keybindings used in \SpecialChar LyX
576 If there exists an internationalized version of the bind file named
577 \begin_inset Flex Code
580 \begin_layout Plain Layout
586 , that will be used first.
589 \begin_layout Labeling
590 \labelwidthstring 00.00.0000
591 \begin_inset Flex Code
594 \begin_layout Plain Layout
600 contains graphics files that can be included in documents.
604 \begin_layout Labeling
605 \labelwidthstring 00.00.0000
606 \begin_inset Flex Code
609 \begin_layout Plain Layout
615 contains \SpecialChar LyX
616 documentation files (including the one you are currently reading).
618 \begin_inset Flex Code
621 \begin_layout Plain Layout
628 deserves special attention, as noted above.
629 The internationalized help docs are in subdirectories
630 \begin_inset Flex Code
633 \begin_layout Plain Layout
640 \begin_inset Quotes eld
644 \begin_inset Quotes erd
647 is the ISO language code.
649 \begin_inset CommandInset ref
651 reference "cha:Internationalizing-LyX"
658 \begin_layout Labeling
659 \labelwidthstring 00.00.0000
660 \begin_inset Flex Code
663 \begin_layout Plain Layout
669 contains example files that explain how to use some features.
670 In the file browser, press the
671 \begin_inset Flex Noun
674 \begin_layout Plain Layout
683 \begin_layout Labeling
684 \labelwidthstring 00.00.0000
685 \begin_inset Flex Code
688 \begin_layout Plain Layout
694 contains image files that are used by the
695 \begin_inset Flex Noun
698 \begin_layout Plain Layout
705 In addition, it also contains the individual icons used in the toolbar
706 and the banners that can be shown when \SpecialChar LyX
710 \begin_layout Labeling
711 \labelwidthstring 00.00.0000
712 \begin_inset Flex Code
715 \begin_layout Plain Layout
721 contains keyboard keymapping files.
723 \begin_inset CommandInset ref
725 reference "sec:International-Keymap-Stuff"
732 \begin_layout Labeling
733 \labelwidthstring 00.00.0000
734 \begin_inset Flex Code
737 \begin_layout Plain Layout
743 contains the text class and module files described in
744 \begin_inset CommandInset ref
746 reference "cha:Installing-New-Document"
753 \begin_layout Labeling
754 \labelwidthstring 00.00.0000
755 \begin_inset Flex Code
758 \begin_layout Plain Layout
765 \begin_inset Flex Code
768 \begin_layout Plain Layout
774 Python scripts used to convert between \SpecialChar LyX
776 These can be run from the command line if, say, you want to batch-convert
780 \begin_layout Labeling
781 \labelwidthstring 00.00.0000
782 \begin_inset Flex Code
785 \begin_layout Plain Layout
791 contains some files that demonstrate the capabilities of the
792 \begin_inset Flex Noun
795 \begin_layout Plain Layout
806 Also contains some scripts used by \SpecialChar LyX
810 \begin_layout Labeling
811 \labelwidthstring 00.00.0000
812 \begin_inset Flex Code
815 \begin_layout Plain Layout
821 contains the standard \SpecialChar LyX
822 template files described in
823 \begin_inset CommandInset ref
825 reference "subsec:Creating-Templates"
832 \begin_layout Labeling
833 \labelwidthstring 00.00.0000
834 \begin_inset Flex Code
837 \begin_layout Plain Layout
843 contains files with the extension
844 \begin_inset Flex Code
847 \begin_layout Plain Layout
853 that define the user interface to \SpecialChar LyX
855 That is, the files define which items appear in which menus and the items
856 appearing on the toolbar.
859 \begin_layout Subsection
860 Files you don't want to modify
863 \begin_layout Standard
864 These files are used internally by \SpecialChar LyX
865 and you generally do not need to modify
866 them unless you are a developer.
869 \begin_layout Labeling
870 \labelwidthstring 00.00.0000
871 \begin_inset Flex Code
874 \begin_layout Plain Layout
880 this file contains the list of \SpecialChar LyX
882 The contents are displayed with the menu entry
883 \begin_inset Flex Noun
886 \begin_layout Plain Layout
887 Help\SpecialChar menuseparator
900 \begin_layout Labeling
901 \labelwidthstring 00.00.0000
902 \begin_inset Flex Code
905 \begin_layout Plain Layout
911 this is a \SpecialChar LaTeX
912 script used during the configuration process.
916 \begin_layout Labeling
917 \labelwidthstring 00.00.0000
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
927 this is a Python script that is used to re-configure \SpecialChar LyX
929 It creates configuration files in the directory it was run from.
932 \begin_layout Subsection
933 Other files needing a line or two
936 \begin_layout Labeling
937 \labelwidthstring 00.00.0000
938 \begin_inset Flex Code
941 \begin_layout Plain Layout
947 this contains tables describing how different character encodings can be
951 \begin_layout Labeling
952 \labelwidthstring 00.00.0000
953 \begin_inset Flex Code
956 \begin_layout Plain Layout
962 this file contains the templates available to the new
963 \begin_inset Flex Noun
966 \begin_layout Plain Layout
977 \begin_inset CommandInset ref
979 reference "chap:Including-External-Material"
986 \begin_layout Labeling
987 \labelwidthstring 00.00.0000
988 \begin_inset Flex Code
991 \begin_layout Plain Layout
997 this file contains a list of all the languages currently supported by \SpecialChar LyX
1001 \begin_layout Labeling
1002 \labelwidthstring 00.00.0000
1003 \begin_inset Flex Code
1006 \begin_layout Plain Layout
1012 contains information about the supported fonts.
1015 \begin_layout Labeling
1016 \labelwidthstring 00.00.0000
1017 \begin_inset Flex Code
1020 \begin_layout Plain Layout
1026 this file contains translations for internationalized paragraph styles
1028 \begin_inset CommandInset ref
1030 reference "subsec:I18n"
1037 \begin_layout Labeling
1038 \labelwidthstring 00.00.0000
1039 \begin_inset Flex Code
1042 \begin_layout Plain Layout
1048 this file contains information about unicode-encoded glyphs and the way
1049 they are supported by \SpecialChar LyX
1050 via \SpecialChar LaTeX
1054 \begin_layout Section
1055 Your local configuration directory
1058 \begin_layout Standard
1059 Even if you are using \SpecialChar LyX
1060 as an unprivileged user, you might want to change
1062 configuration for your own use.
1064 \begin_inset Flex Code
1067 \begin_layout Plain Layout
1073 directory contains all your personal configuration files.
1074 This is the directory described as
1075 \begin_inset Quotes eld
1079 \begin_inset Quotes erd
1083 \begin_inset Flex Noun
1086 \begin_layout Plain Layout
1087 Help\SpecialChar menuseparator
1089 \begin_inset space ~
1098 This directory is used as a mirror of
1099 \begin_inset Flex Code
1102 \begin_layout Plain Layout
1108 , which means that every file in
1109 \begin_inset Flex Code
1112 \begin_layout Plain Layout
1118 is a replacement for the corresponding file in
1119 \begin_inset Flex Code
1122 \begin_layout Plain Layout
1129 Any configuration file described in the above sections can be placed either
1130 in the system-wide directory, in which case it will affect all users, or
1131 in your local directory for your own use.
1134 \begin_layout Standard
1135 To make things clearer, let's provide a few examples:
1138 \begin_layout Itemize
1139 The preferences set in the
1140 \begin_inset Flex Noun
1143 \begin_layout Plain Layout
1144 Tools\SpecialChar menuseparator
1150 dialog are saved to a file
1151 \begin_inset Flex Code
1154 \begin_layout Plain Layout
1161 \begin_inset Flex Code
1164 \begin_layout Plain Layout
1173 \begin_layout Itemize
1174 When you reconfigure using
1175 \begin_inset Flex Noun
1178 \begin_layout Plain Layout
1179 Tools\SpecialChar menuseparator
1187 \begin_inset Flex Code
1190 \begin_layout Plain Layout
1196 script, and the resulting files are written in your local configuration
1198 This means that any additional text class file that you might have added
1200 \begin_inset Flex Code
1203 \begin_layout Plain Layout
1209 will be added to the list of classes in the
1210 \begin_inset Flex Noun
1213 \begin_layout Plain Layout
1214 Document\SpecialChar menuseparator
1223 \begin_layout Itemize
1224 If you get some updated documentation from \SpecialChar LyX
1225 ftp site and cannot install
1226 it because you do not have sysadmin rights on your system, you can just
1228 \begin_inset Flex Code
1231 \begin_layout Plain Layout
1237 and the items in the
1238 \begin_inset Flex Noun
1241 \begin_layout Plain Layout
1247 menu will open them!
1250 \begin_layout Section
1251 Running \SpecialChar LyX
1252 with multiple configurations
1255 \begin_layout Standard
1256 The configuration freedom of the local configuration directory may not suffice
1257 if you want to have more than one configuration at your disposal.
1258 For example, you may want to be use different key bindings or printer settings
1260 You can achieve this by having several such directories.
1261 You then specify which directory to use at run-time.
1264 \begin_layout Standard
1265 Invoking \SpecialChar LyX
1266 with the command line switch
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1280 instructs the program to read the configuration from that directory, and
1281 not from the default directory.
1282 (You can determine the default directory by running \SpecialChar LyX
1284 \begin_inset Flex Code
1287 \begin_layout Plain Layout
1293 switch.) If the specified directory does not exist, \SpecialChar LyX
1295 for you, just like it does for the default directory on the first time
1296 you run the program.
1297 You can modify the configuration options in this additional user directory
1298 exactly as you would for the default directory.
1299 These directories are completely independent (but read on).
1300 Note that setting the environment variable
1301 \begin_inset Flex Code
1304 \begin_layout Plain Layout
1310 to some value has exactly the same effect.
1313 \begin_layout Standard
1314 Having several configurations also requires more maintenance: if you want
1315 to add a new layout to
1316 \begin_inset Flex Code
1319 \begin_layout Plain Layout
1325 which you want available from all your configurations, you must add it
1326 to each directory separately.
1327 You can avoid this with the following trick: after \SpecialChar LyX
1328 creates the additional
1329 directory, most of the subdirectories (see above) are empty.
1330 If you want the new configuration to mirror an existing one, replace the
1331 empty subdirectory with a symbolic link to the matching subdirectory in
1332 the existing configuration.
1334 \begin_inset Flex Code
1337 \begin_layout Plain Layout
1343 subdirectory, however, since it contains a file written by the configuration
1344 script (also accessible through
1345 \begin_inset Flex Noun
1348 \begin_layout Plain Layout
1349 Tools\SpecialChar menuseparator
1355 ) which is configuration-specific.
1358 \begin_layout Chapter
1359 The Preferences dialog
1362 \begin_layout Standard
1363 All options of the preferences dialog are described in the Appendix
1365 The Preferences Dialog
1372 For some options you might find here more details.
1375 \begin_layout Section
1377 \begin_inset CommandInset label
1386 \begin_layout Standard
1387 The first step is to define your file formats if they are not already defined.
1389 \begin_inset Flex Noun
1392 \begin_layout Plain Layout
1393 Tools\SpecialChar menuseparator
1401 \begin_inset Flex Noun
1404 \begin_layout Plain Layout
1405 File Handling\SpecialChar menuseparator
1412 \begin_inset Flex Noun
1415 \begin_layout Plain Layout
1421 button to define your new format.
1423 \begin_inset Flex Noun
1426 \begin_layout Plain Layout
1432 field contains the name used to identify the format in the GUI.
1434 \begin_inset Flex Noun
1437 \begin_layout Plain Layout
1443 is used to identify the format internally.
1444 You will also need to enter a file extension.
1445 These are all required.
1447 \begin_inset Flex Noun
1450 \begin_layout Plain Layout
1456 field is used to provide a keyboard shortcut on the menus.
1457 (For example, pressing
1458 \begin_inset Flex Noun
1461 \begin_layout Plain Layout
1468 \begin_inset Flex Noun
1471 \begin_layout Plain Layout
1472 Document\SpecialChar menuseparator
1473 View (Other Formats)\SpecialChar menuseparator
1482 \begin_layout Standard
1484 \begin_inset Flex Noun
1487 \begin_layout Plain Layout
1494 \begin_inset Flex Noun
1497 \begin_layout Plain Layout
1504 For example, you might want to use
1505 \begin_inset Flex Noun
1508 \begin_layout Plain Layout
1514 to view PostScript files.
1515 You can enter the command needed to start the program in the corresponding
1517 In defining this command, you can use the four variables listed in the
1519 The viewer is launched when you view an image in \SpecialChar LyX
1521 \begin_inset Flex Noun
1524 \begin_layout Plain Layout
1525 Document\SpecialChar menuseparator
1532 The editor is for example launched when you right-click on an image and
1534 \begin_inset Flex Noun
1537 \begin_layout Plain Layout
1543 in the appearing context menu.
1546 \begin_layout Standard
1548 \begin_inset Flex Noun
1551 \begin_layout Plain Layout
1557 type of a format is optional, but if it is specified, it must be unique
1559 It is used to detect files of this format from the file contents.
1560 For some important file formats there is no MIME type officially registered
1562 \begin_inset CommandInset href
1565 target "http://www.iana.org/assignments/media-types/"
1570 Therefore \SpecialChar LyX
1571 uses the extended list of MIME types as specified by
1572 \begin_inset CommandInset href
1574 name "freedesktop.org"
1575 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1582 \begin_layout Standard
1584 \begin_inset Flex Noun
1587 \begin_layout Plain Layout
1593 option tells \SpecialChar LyX
1594 that a format is suitable for document export.
1595 If this is set and if a suitable conversion route exists (see
1596 \begin_inset CommandInset ref
1598 reference "sec:Converters"
1602 ), the format will appear in the
1603 \begin_inset Flex Noun
1606 \begin_layout Plain Layout
1607 File\SpecialChar menuseparator
1614 The format will also appear in the
1615 \begin_inset Flex Noun
1618 \begin_layout Plain Layout
1619 Document\SpecialChar menuseparator
1625 menu if a viewer is specified for the format.
1626 Pure image formats, such as
1627 \begin_inset Flex Code
1630 \begin_layout Plain Layout
1636 , should not use this option.
1637 Formats that can both represent vector graphics and documents like
1638 \begin_inset Flex Code
1641 \begin_layout Plain Layout
1650 \begin_layout Standard
1652 \begin_inset Flex Noun
1655 \begin_layout Plain Layout
1656 Vector graphics format
1661 tells \SpecialChar LyX
1662 that a format can contain vector graphics.
1663 This information is used to determine the target format of included graphics
1665 \begin_inset Flex Noun
1668 \begin_layout Plain Layout
1675 Included graphics may need to be converted to either
1676 \begin_inset Flex Noun
1679 \begin_layout Plain Layout
1686 \begin_inset Flex Noun
1689 \begin_layout Plain Layout
1696 \begin_inset Flex Noun
1699 \begin_layout Plain Layout
1706 \begin_inset Flex Noun
1709 \begin_layout Plain Layout
1715 cannot handle other image formats.
1716 If an included graphic is not already in
1717 \begin_inset Flex Noun
1720 \begin_layout Plain Layout
1727 \begin_inset Flex Noun
1730 \begin_layout Plain Layout
1737 \begin_inset Flex Noun
1740 \begin_layout Plain Layout
1746 format, it is converted to
1747 \begin_inset Flex Noun
1750 \begin_layout Plain Layout
1756 if the vector format option is set, and otherwise to
1757 \begin_inset Flex Noun
1760 \begin_layout Plain Layout
1769 \begin_layout Section
1773 \begin_layout Standard
1774 Since all conversions from one format to another take place in \SpecialChar LyX
1776 directory, it is sometimes necessary to modify a file before copying it
1777 to the temporary directory in order that the conversion may be performed.
1781 \begin_layout Plain Layout
1782 For example, the file may refer to other files—images, for example—using
1783 relative file names, and these may become invalid when the file is copied
1784 to the temporary directory.
1789 This is done by a Copier: It copies a file to (or from) the temporary directory
1790 and may modify it in the process.
1793 \begin_layout Standard
1794 The definitions of the copiers may use four variables:
1797 \begin_layout Labeling
1798 \labelwidthstring 00.00.0000
1799 \begin_inset Flex Code
1802 \begin_layout Plain Layout
1808 The \SpecialChar LyX
1809 system directory (e.
1810 \begin_inset space \thinspace{}
1814 \begin_inset space \space{}
1818 \begin_inset Flex Noun
1821 \begin_layout Plain Layout
1830 \begin_layout Labeling
1831 \labelwidthstring 00.00.0000
1832 \begin_inset Flex Code
1835 \begin_layout Plain Layout
1844 \begin_layout Labeling
1845 \labelwidthstring 00.00.0000
1846 \begin_inset Flex Code
1849 \begin_layout Plain Layout
1858 \begin_layout Labeling
1859 \labelwidthstring 00.00.0000
1860 \begin_inset Flex Code
1863 \begin_layout Plain Layout
1869 The base name (without filename extension) in the \SpecialChar LyX
1873 \begin_layout Labeling
1874 \labelwidthstring 00.00.0000
1875 \begin_inset Flex Code
1878 \begin_layout Plain Layout
1884 The full directory path of the \SpecialChar LyX
1888 \begin_layout Labeling
1889 \labelwidthstring 00.00.0000
1890 \begin_inset Flex Code
1893 \begin_layout Plain Layout
1899 The full pathname to the original \SpecialChar LyX
1900 file being processed
1903 \begin_layout Labeling
1904 \labelwidthstring 00.00.0000
1905 \begin_inset Flex Code
1908 \begin_layout Plain Layout
1914 The filename (without any directory path) of the \SpecialChar LyX
1918 \begin_layout Labeling
1919 \labelwidthstring 00.00.0000
1920 \begin_inset Flex Code
1923 \begin_layout Plain Layout
1929 The `\SpecialChar LaTeX
1933 \begin_layout Standard
1934 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1942 It is relevant only when exporting files suitable for such inclusion.
1945 \begin_layout Standard
1946 Copiers can be used to do almost anything with output files.
1947 For example, suppose you want generated pdf files to be copied to a special
1949 \begin_inset Flex Code
1952 \begin_layout Plain Layout
1959 Then you could write a shell script such as this one:
1962 \begin_layout Standard
1963 \begin_inset listings
1967 \begin_layout Plain Layout
1972 \begin_layout Plain Layout
1977 \begin_layout Plain Layout
1979 TOFILE=`basename $2`
1982 \begin_layout Plain Layout
1984 cp $FROMFILE /home/you/pdf/$TOFILE
1989 Save it in your local \SpecialChar LyX
1991 \begin_inset Flex Code
1994 \begin_layout Plain Layout
1995 /home/you/.lyx/scripts/pdfcopier.sh
2000 —and make it executable, if you need to do so on your platform.
2002 \begin_inset Flex Noun
2005 \begin_layout Plain Layout
2006 Tools\SpecialChar menuseparator
2012 dialog, select under
2013 \begin_inset Flex Noun
2016 \begin_layout Plain Layout
2017 File Handling\SpecialChar menuseparator
2024 \begin_inset Flex Noun
2027 \begin_layout Plain Layout
2033 format—or one of the other pdf formats—and enter
2034 \begin_inset Flex Code
2037 \begin_layout Plain Layout
2038 pdfcopier.sh $$i $$o
2044 \begin_inset Flex Noun
2047 \begin_layout Plain Layout
2057 \begin_layout Standard
2058 Copiers are used by \SpecialChar LyX
2059 in various of its own conversions.
2060 For example, if appropriate programs are found, \SpecialChar LyX
2061 will automatically install
2063 \begin_inset Flex Noun
2066 \begin_layout Plain Layout
2073 \begin_inset Flex Noun
2076 \begin_layout Plain Layout
2078 \begin_inset space ~
2087 When these formats are exported, the copier sees that not just the main
2088 HTML file but various associated files (style files, images, etc.) are also
2090 All these files are written to a subdirectory of the directory in which
2091 the original \SpecialChar LyX
2096 \begin_layout Plain Layout
2097 This copier can be customized.
2099 \begin_inset Quotes eld
2103 \begin_inset Quotes erd
2106 argument takes a comma-separated list of extensions to be copied; if it
2107 is omitted, all files will be copied.
2109 \begin_inset Quotes eld
2113 \begin_inset Quotes erd
2116 argument determines the extension added to the generated directory.
2118 \begin_inset Quotes eld
2122 \begin_inset Flex Noun
2125 \begin_layout Plain Layout
2132 \begin_inset Quotes erd
2135 , so HTML generated from
2136 \begin_inset Flex Noun
2139 \begin_layout Plain Layout
2140 /path/to/filename.lyx
2146 \begin_inset Flex Noun
2149 \begin_layout Plain Layout
2150 /path/to/filename.html.LyXconv
2164 \begin_layout Section
2166 \begin_inset CommandInset label
2168 name "sec:Converters"
2175 \begin_layout Standard
2176 You can define your own Converters to convert files between different formats.
2178 \begin_inset Flex Noun
2181 \begin_layout Plain Layout
2182 Tools\SpecialChar menuseparator
2183 Preferences\SpecialChar menuseparator
2184 File Handling\SpecialChar menuseparator
2193 \begin_layout Standard
2194 To define a new converter, select the
2195 \begin_inset Flex Noun
2198 \begin_layout Plain Layout
2200 \begin_inset space ~
2209 \begin_inset Flex Noun
2212 \begin_layout Plain Layout
2214 \begin_inset space ~
2222 from the drop-down lists, enter the command needed for the conversion,
2224 \begin_inset Flex Noun
2227 \begin_layout Plain Layout
2234 Several variables can be used in the definition of converters:
2237 \begin_layout Labeling
2238 \labelwidthstring 00.00.0000
2239 \begin_inset Flex Code
2242 \begin_layout Plain Layout
2248 The \SpecialChar LyX
2252 \begin_layout Labeling
2253 \labelwidthstring 00.00.0000
2254 \begin_inset Flex Code
2257 \begin_layout Plain Layout
2266 \begin_layout Labeling
2267 \labelwidthstring 00.00.0000
2268 \begin_inset Flex Code
2271 \begin_layout Plain Layout
2280 \begin_layout Labeling
2281 \labelwidthstring 00.00.0000
2282 \begin_inset Flex Code
2285 \begin_layout Plain Layout
2291 The base filename of the input file (i.
2292 \begin_inset space \thinspace{}
2295 g., without the extension)
2298 \begin_layout Labeling
2299 \labelwidthstring 00.00.0000
2300 \begin_inset Flex Code
2303 \begin_layout Plain Layout
2309 The path to the input file
2312 \begin_layout Labeling
2313 \labelwidthstring 00.00.0000
2314 \begin_inset Flex Code
2317 \begin_layout Plain Layout
2323 The path to the original input file (this is different from $$p when a
2324 chain of converters is called)
2327 \begin_layout Labeling
2328 \labelwidthstring 00.00.0000
2329 \begin_inset Flex Code
2332 \begin_layout Plain Layout
2338 The iconv name for the encoding of the document.
2341 \begin_layout Standard
2343 \begin_inset Flex Noun
2346 \begin_layout Plain Layout
2348 \begin_inset space ~
2356 field you can enter the following flags, separated by commas:
2359 \begin_layout Labeling
2360 \labelwidthstring 00.00.0000
2361 \begin_inset Flex Code
2364 \begin_layout Plain Layout
2370 This converter runs some form of \SpecialChar LaTeX
2372 This will make \SpecialChar LyX
2373 's \SpecialChar LaTeX
2374 error logs available.
2377 \begin_layout Labeling
2378 \labelwidthstring 00.00.0000
2379 \begin_inset Flex Code
2382 \begin_layout Plain Layout
2388 Needs the \SpecialChar LaTeX
2390 \begin_inset Flex Noun
2393 \begin_layout Plain Layout
2399 file for the conversion.
2402 \begin_layout Labeling
2403 \labelwidthstring 00.00.0000
2404 \begin_inset Flex Code
2407 \begin_layout Plain Layout
2414 \begin_inset Quotes eld
2418 \begin_inset Quotes erd
2421 file from the backend, which in practice means a \SpecialChar LaTeX
2422 file like the one we
2423 would export, without
2424 \begin_inset Flex Code
2427 \begin_layout Plain Layout
2436 \begin_layout Labeling
2437 \labelwidthstring 00.00.0000
2438 \begin_inset Flex Code
2441 \begin_layout Plain Layout
2450 \begin_layout Standard
2451 The following three flags are not really flags at all because they take
2453 \begin_inset Flex Noun
2456 \begin_layout Plain Layout
2458 \begin_inset space ~
2462 \begin_inset space ~
2473 \begin_layout Labeling
2474 \labelwidthstring 00.00.0000
2475 \begin_inset Flex Code
2478 \begin_layout Plain Layout
2484 If set, the converter's standard error will be redirected to a file
2485 \begin_inset Flex Code
2488 \begin_layout Plain Layout
2494 , and the script given as argument will be run as:
2495 \begin_inset Flex Code
2498 \begin_layout Plain Layout
2499 script < infile.out > infile.log
2505 The argument may contain
2506 \begin_inset Flex Code
2509 \begin_layout Plain Layout
2518 \begin_layout Labeling
2519 \labelwidthstring 00.00.0000
2520 \begin_inset Flex Code
2523 \begin_layout Plain Layout
2529 The name of the directory in which the converter will dump the generated
2532 will not create this directory, and it does not copy anything into it,
2533 though it will copy this directory to the destination.
2534 The argument may contain
2535 \begin_inset Flex Code
2538 \begin_layout Plain Layout
2544 , which will be replaced by the base name of the input and output files,
2545 respectively, when the directory is copied.
2546 \begin_inset Newline newline
2549 Note that resultdir and usetempdir make no sense together.
2550 The latter will be ignored if the former is given.
2553 \begin_layout Labeling
2554 \labelwidthstring 00.00.0000
2555 \begin_inset Flex Code
2558 \begin_layout Plain Layout
2564 Determines the output file name and may, contain
2565 \begin_inset Flex Code
2568 \begin_layout Plain Layout
2575 Sensible only with resultdir and optional even then; if not given, it defaults
2579 \begin_layout Standard
2580 None of these last three are presently used in any of the converters that
2581 are installed with \SpecialChar LyX
2586 \begin_layout Standard
2587 You do not have to define converters for all formats between which you want
2589 For example, you will note that there is no `\SpecialChar LyX
2590 to PostScript' converter,
2591 but \SpecialChar LyX
2592 will export PostScript.
2593 It does so by first creating a \SpecialChar LaTeX
2594 file (no converter needs to be defined
2595 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2597 and finally converting the resulting DVI file to PostScript.
2599 finds such `chains' of converters automatically, and it will always choose
2600 the shortest possible chain.
2601 You can, though, still define multiple conversion methods between file
2603 For example, the standard \SpecialChar LyX
2604 configuration provides five ways to convert
2609 \begin_layout Enumerate
2611 \begin_inset Flex Noun
2614 \begin_layout Plain Layout
2623 \begin_layout Enumerate
2624 via (DVI and) PostScript, using
2625 \begin_inset Flex Noun
2628 \begin_layout Plain Layout
2637 \begin_layout Enumerate
2639 \begin_inset Flex Noun
2642 \begin_layout Plain Layout
2651 \begin_layout Enumerate
2653 \begin_inset Flex Noun
2656 \begin_layout Plain Layout
2666 \begin_layout Enumerate
2668 \begin_inset Flex Noun
2671 \begin_layout Plain Layout
2681 \begin_layout Standard
2682 To define such alternate chains, you must define multiple target `file formats',
2684 \begin_inset CommandInset ref
2686 reference "sec:Formats"
2691 For example, in the standard configuration, the formats named
2692 \begin_inset Flex Noun
2695 \begin_layout Plain Layout
2702 \begin_inset Flex Noun
2705 \begin_layout Plain Layout
2712 \begin_inset Flex Noun
2715 \begin_layout Plain Layout
2722 \begin_inset Flex Noun
2725 \begin_layout Plain Layout
2732 \begin_inset Flex Noun
2735 \begin_layout Plain Layout
2742 \begin_inset Flex Noun
2745 \begin_layout Plain Layout
2752 \begin_inset Flex Noun
2755 \begin_layout Plain Layout
2762 \begin_inset Flex Noun
2765 \begin_layout Plain Layout
2773 \begin_inset Flex Noun
2776 \begin_layout Plain Layout
2783 \begin_inset Flex Noun
2786 \begin_layout Plain Layout
2793 ) are defined, all of which share the extension
2794 \begin_inset Flex Noun
2797 \begin_layout Plain Layout
2803 , and which correspond to the conversion methods just mentioned.
2806 \begin_layout Chapter
2807 Internationalizing \SpecialChar LyX
2809 \begin_inset CommandInset label
2811 name "cha:Internationalizing-LyX"
2818 \begin_layout Standard
2820 supports using a translated interface.
2821 Last time we checked, \SpecialChar LyX
2822 provided text in thirty languages.
2823 The language of choice is called your
2828 (For further reading on locale settings, see also the documentation for
2829 locale that comes with your operating system.
2830 For Linux, the manual page for
2831 \begin_inset Flex Code
2834 \begin_layout Plain Layout
2840 could be a good place to start).
2843 \begin_layout Standard
2844 Notice that these translations will work, but do contain a few flaws.
2845 In particular, all dialogs have been designed with the English text in
2846 mind, which means that some of the translated text will be too large to
2847 fit within the space allocated.
2848 This is only a display problem and will not cause any harm.
2849 Also, you will find that some of the translations do not define shortcut
2850 keys for everything.
2851 Sometimes, there are simply not enough free letters to do it.
2852 Other times, the translator just hasn't got around to doing it yet.
2853 Our localization team, which you may wish to join,
2857 \begin_layout Plain Layout
2858 If you are a fluent speaker of a language other than English, joining these
2859 teams is a great way to give back to the \SpecialChar LyX
2865 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2869 \begin_layout Section
2870 Translating \SpecialChar LyX
2874 \begin_layout Subsection
2875 Translating the graphical user interface (text messages).
2878 \begin_layout Standard
2881 \begin_inset Flex Code
2884 \begin_layout Plain Layout
2890 library to handle the internationalization of the interface.
2891 To have \SpecialChar LyX
2892 speak your favorite language in all menus and dialogs, you need
2894 \begin_inset Flex Code
2897 \begin_layout Plain Layout
2903 -file for that language.
2904 When this is available, you'll have to generate a
2905 \begin_inset Flex Code
2908 \begin_layout Plain Layout
2914 -file from it and install the
2915 \begin_inset Flex Code
2918 \begin_layout Plain Layout
2925 The process of doing all of this is explained in the documentation for
2927 \begin_inset Flex Code
2930 \begin_layout Plain Layout
2937 It is possible to do this just for yourself, but if you're going to do
2938 it, you might as well share the results of your labors with the rest of
2939 the \SpecialChar LyX
2941 Send a message to the \SpecialChar LyX
2942 developers' list for more information about how
2946 \begin_layout Standard
2947 In short, this is what you should do (xx denotes the language code):
2950 \begin_layout Itemize
2951 Check out the \SpecialChar LyX
2954 \begin_inset CommandInset href
2956 name "information on the web"
2957 target "http://www.lyx.org/HowToUseSVN"
2964 \begin_layout Itemize
2966 \begin_inset Flex Code
2969 \begin_layout Plain Layout
2975 to the folder of the
2976 \begin_inset Flex Code
2979 \begin_layout Plain Layout
2987 \begin_inset Flex Code
2990 \begin_layout Plain Layout
2998 \begin_inset Flex Code
3001 \begin_layout Plain Layout
3007 doesn't exist anywhere, it can be remade with the console command
3008 \begin_inset Flex Code
3011 \begin_layout Plain Layout
3017 in that directory, or you can use an existing po-file for some other language
3021 \begin_layout Itemize
3023 \begin_inset Flex Code
3026 \begin_layout Plain Layout
3036 \begin_layout Plain Layout
3037 This is just a text file, so it can be edited in any text editor.
3038 But there are also specialized programs that support such editing, such
3043 (for all platforms) or
3052 contains a `mode' for editing
3053 \begin_inset Flex Code
3056 \begin_layout Plain Layout
3067 For some menu- and widget-labels, there are also shortcut keys that should
3069 Those keys are marked after a `|', and should be translated according to
3070 the words and phrases of the language.
3071 You should also fill also out the information at the beginning of the new
3073 \begin_inset Flex Code
3076 \begin_layout Plain Layout
3082 -file with your email-address, etc., so people know where to reach you with
3083 suggestions and entertaining flames.
3086 \begin_layout Standard
3087 If you are just doing this on your own, then:
3090 \begin_layout Itemize
3092 \begin_inset Flex Code
3095 \begin_layout Plain Layout
3102 This can be done with
3103 \begin_inset Flex Code
3106 \begin_layout Plain Layout
3107 msgfmt -o xx.mo < xx.po
3115 \begin_layout Itemize
3117 \begin_inset Flex Code
3120 \begin_layout Plain Layout
3126 -file to your locale-tree, at the correct directory for application messages
3131 xx, and under the name
3132 \begin_inset Flex Code
3135 \begin_layout Plain Layout
3142 \begin_inset space \thinspace{}
3146 \begin_inset space \space{}
3150 \begin_inset Flex Code
3153 \begin_layout Plain Layout
3154 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3164 \begin_layout Standard
3165 As said, however, it would be best if the new
3166 \begin_inset Flex Code
3169 \begin_layout Plain Layout
3175 file could be added to the \SpecialChar LyX
3176 distribution, so others can use it.
3177 Adding it involves making additional changes to \SpecialChar LyX
3179 So send an email to the developers' mailing list if you're interested in
3183 \begin_layout Subsubsection
3187 \begin_layout Standard
3188 Sometimes it turns out that one English message needs to be translated into
3189 different messages in the target language.
3190 One example is the message
3191 \begin_inset Flex Code
3194 \begin_layout Plain Layout
3200 which has the German translation
3208 , depending upon exactly what the English
3209 \begin_inset Quotes eld
3213 \begin_inset Quotes erd
3218 \begin_inset Flex Code
3221 \begin_layout Plain Layout
3227 does not handle such ambiguous translations.
3228 Therefore you have to add some context information to the message: Instead
3230 \begin_inset Flex Code
3233 \begin_layout Plain Layout
3240 \begin_inset Flex Code
3243 \begin_layout Plain Layout
3244 To[[as in 'From format x to format y']]
3250 \begin_inset Flex Code
3253 \begin_layout Plain Layout
3254 To[[as in 'From page x to page y']].
3259 Now the two occurrences of
3260 \begin_inset Flex Code
3263 \begin_layout Plain Layout
3270 \begin_inset Flex Code
3273 \begin_layout Plain Layout
3279 and can be translated correctly to
3290 \begin_layout Standard
3291 Of course the context information needs to be stripped off the original
3292 message when no translation is used.
3293 Therefore you have to put it in double square brackets at the end of the
3294 message (see the example above).
3295 The translation mechanism of \SpecialChar LyX
3296 ensures that everything in double square
3297 brackets at the end of messages is removed before displaying the message.
3300 \begin_layout Subsection
3301 Translating the documentation.
3304 \begin_layout Standard
3305 The online documentation (in the
3306 \begin_inset Flex Noun
3309 \begin_layout Plain Layout
3315 -menu) can (and should!) be translated.
3316 If there are translated versions of the documentation available
3320 \begin_layout Plain Layout
3321 As of March 2008, at least some of the documents have been translated into
3322 fourteen languages, with the Tutorial available in a few more.
3327 and the locale is set accordingly, these will be used automagically by
3331 looks for translated versions as
3332 \begin_inset Flex Code
3335 \begin_layout Plain Layout
3336 LyXDir/doc/xx/DocName.lyx
3342 \begin_inset Flex Code
3345 \begin_layout Plain Layout
3351 is the code for the language currently in use.
3352 If there are no translated documents, the default English versions will
3354 Note that the translated versions must have the same filenames (
3355 \begin_inset Flex Code
3358 \begin_layout Plain Layout
3364 above) as the original.
3365 If you feel up to translating the documentation (an excellent way to proof-read
3366 the original documentation by the way!), there are a few things you should
3370 \begin_layout Itemize
3371 Check out the documentation translation web page at
3372 \begin_inset CommandInset href
3374 name "http://www.lyx.org/Translation"
3375 target "http://www.lyx.org/Translation"
3380 That way, you can find out which (if any) documents have already been translate
3381 d into your language.
3382 You can also find out who (if anyone) is organizing the effort to translate
3383 the documentation into your language.
3384 If no one is organizing the effort, please let us know that you're interested.
3387 \begin_layout Standard
3388 Once you get to actually translating, here's a few hints for you that may
3392 \begin_layout Itemize
3393 Join the documentation team! There is information on how to do that in
3394 \begin_inset Flex Code
3397 \begin_layout Plain Layout
3404 \begin_inset Flex Noun
3407 \begin_layout Plain Layout
3408 Help\SpecialChar menuseparator
3414 ), which by the way is the first document you should translate.
3417 \begin_layout Itemize
3418 Learn the typographic conventions for the language you are translating to.
3419 Typography is an ancient art and over the centuries, a great variety of
3420 conventions have developed throughout different parts of the world.
3421 Also study the professional terminology amongst typographers in your country.
3422 Inventing your own terminology will only confuse the users.
3425 (Warning! Typography is addictive!)
3428 \begin_layout Itemize
3429 Make a copy of the document.
3430 This will be your working copy.
3431 You can use this as your personal translated help-file by placing it in
3433 \begin_inset Flex Code
3436 \begin_layout Plain Layout
3445 \begin_layout Itemize
3446 Sometimes the original document (from the \SpecialChar LyX
3447 team) will be updated.
3448 Use the source viewer at
3449 \begin_inset CommandInset href
3451 name "http://www.lyx.org/trac/timeline"
3452 target "http://www.lyx.org/trac/timeline"
3456 to see what has been changed.
3457 That way you can easily see which parts of the translated document need
3461 \begin_layout Standard
3462 If you ever find an error in the original document, fix it and notify the
3463 rest of the documentation team of the changes! (You didn't forget to join
3464 the documentation team, did you?)
3467 \begin_layout Standard
3468 \begin_inset Branch OutDated
3471 \begin_layout Section
3472 International Keyboard Support
3475 \begin_layout Standard
3478 [Editor's Note: The following section is by
3486 It needs to be fixed to conform to the new Documentation Style sheet and
3487 to make use of the new v1.0 features.
3488 The whole thing also needs to be merged with the section following it.-jw
3489 It may also be badly out of date.-rh (2008)]
3492 \begin_layout Subsection
3493 Defining Own Keymaps: Keymap File Format
3496 \begin_layout Standard
3497 Let's look at a keyboard definition file a little closer.
3498 It is a plain text file defining
3501 \begin_layout Itemize
3502 key-to-key or key-to-string translations
3505 \begin_layout Itemize
3509 \begin_layout Itemize
3510 dead keys exceptions
3513 \begin_layout Standard
3514 To define key-to-key or key-to-string translation, use this command:
3517 \begin_layout Quotation
3518 \begin_inset Flex Code
3521 \begin_layout Plain Layout
3530 \begin_inset Flex Code
3533 \begin_layout Plain Layout
3542 \begin_layout Standard
3544 \begin_inset Flex Code
3547 \begin_layout Plain Layout
3553 is the key to be translated and
3554 \begin_inset Flex Code
3557 \begin_layout Plain Layout
3563 is the string to be inserted into the document.
3564 To define dead keys, use:
3567 \begin_layout Quotation
3568 \begin_inset Flex Code
3571 \begin_layout Plain Layout
3580 \begin_inset Flex Code
3583 \begin_layout Plain Layout
3592 \begin_layout Standard
3594 \begin_inset Flex Code
3597 \begin_layout Plain Layout
3603 is a keyboard key and
3604 \begin_inset Flex Code
3607 \begin_layout Plain Layout
3614 The following dead keys are supported (shortcut name is in parentheses):
3617 \begin_layout Quotation
3621 \begin_inset space \hfill{}
3627 \begin_layout Quotation
3629 \begin_inset space \hfill{}
3635 \begin_layout Quotation
3637 \begin_inset space \hfill{}
3643 \begin_layout Quotation
3645 \begin_inset space \hfill{}
3651 \begin_layout Quotation
3653 \begin_inset space \hfill{}
3659 \begin_layout Quotation
3661 \begin_inset space \hfill{}
3668 \begin_layout Plain Layout
3680 \begin_layout Quotation
3682 \begin_inset space \hfill{}
3688 \begin_layout Quotation
3690 \begin_inset space \hfill{}
3697 \begin_layout Plain Layout
3709 \begin_layout Quotation
3711 \begin_inset space \hfill{}
3717 \begin_layout Quotation
3719 \begin_inset space \hfill{}
3725 \begin_layout Quotation
3727 \begin_inset space \hfill{}
3734 \begin_layout Plain Layout
3746 \begin_layout Quotation
3748 \begin_inset space \hfill{}
3755 \begin_layout Plain Layout
3767 \begin_layout Quotation
3769 \begin_inset space \hfill{}
3775 \begin_layout Quotation
3776 hungarian umlaut (hug)
3777 \begin_inset space \hfill{}
3783 \begin_layout Quotation
3785 \begin_inset space \hfill{}
3791 \begin_layout Quotation
3793 \begin_inset space \hfill{}
3800 \begin_layout Plain Layout
3812 \begin_layout Standard
3813 Since in many international keyboards there are exceptions to what some
3814 dead keys should do, you can define them using
3817 \begin_layout Quotation
3818 \begin_inset Flex Code
3821 \begin_layout Plain Layout
3829 deadkey key outstring
3832 \begin_layout Standard
3833 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3837 \begin_layout Quotation
3838 \begin_inset Flex Code
3841 \begin_layout Plain Layout
3854 \begin_layout Standard
3855 to make it work correctly.
3856 Also, you have to define as exceptions dead keys over i and j, to remove
3857 the dot from them before inserting an accent mark.
3858 I will change this when the time comes, but so far I haven't had time.
3861 \begin_layout Standard
3862 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3865 \begin_inset Flex Code
3868 \begin_layout Plain Layout
3874 have different meaning.
3876 \begin_inset Flex Code
3879 \begin_layout Plain Layout
3885 marks comments, quotes start and end \SpecialChar LaTeX
3887 To enter quote, you'll need to use
3888 \begin_inset Flex Code
3891 \begin_layout Plain Layout
3900 \begin_inset Flex Code
3903 \begin_layout Plain Layout
3910 \begin_inset Flex Code
3913 \begin_layout Plain Layout
3924 \begin_layout Standard
3925 If you make a keyboard description file that works for your language, please
3926 mail it to me, so I can include it in the next keymap distribution.
3929 \begin_layout Standard
3930 More keywords will be supported in keymap configuration file in future,
3934 \begin_layout Itemize
3935 \begin_inset Flex Code
3938 \begin_layout Plain Layout
3949 \begin_inset space \hfill{}
3953 \begin_inset Flex Code
3956 \begin_layout Plain Layout
3965 \begin_layout Itemize
3966 \begin_inset Flex Code
3969 \begin_layout Plain Layout
3980 \begin_inset space \hfill{}
3984 \begin_inset Flex Code
3987 \begin_layout Plain Layout
3993 an external keymap translation program
3996 \begin_layout Standard
3997 Also, it should look into
3998 \begin_inset Flex Code
4001 \begin_layout Plain Layout
4007 file for defaults, too (for example, a
4008 \begin_inset Flex Code
4011 \begin_layout Plain Layout
4019 option to include default keyboard).
4027 \begin_layout Section
4028 International Keymap Stuff
4029 \begin_inset CommandInset label
4031 name "sec:International-Keymap-Stuff"
4038 \begin_layout Standard
4039 \begin_inset Note Note
4042 \begin_layout Plain Layout
4043 In doing the revisions on this document in March 2008, I did not look over
4044 this stuff, as I do not understand it.
4045 It would be good if someone else could do so.
4054 \begin_layout Standard
4055 The next two sections describe the
4056 \begin_inset Flex Code
4059 \begin_layout Plain Layout
4068 \begin_inset Flex Code
4071 \begin_layout Plain Layout
4079 file syntax in detail.
4080 These sections should help you design your own key map if the ones provided
4081 do not meet your needs.
4084 \begin_layout Subsection
4088 \begin_layout Standard
4092 \begin_inset Flex Code
4095 \begin_layout Plain Layout
4101 file maps keystrokes to characters or strings.
4102 As the name suggests, it sets a keyboard mapping.
4104 \begin_inset Flex Code
4107 \begin_layout Plain Layout
4118 \begin_inset Flex Code
4121 \begin_layout Plain Layout
4136 \begin_inset Flex Code
4139 \begin_layout Plain Layout
4152 \begin_inset Flex Code
4155 \begin_layout Plain Layout
4164 \begin_inset Flex Code
4167 \begin_layout Plain Layout
4175 are described in this section.
4178 \begin_layout Labeling
4179 \labelwidthstring 00.00.0000
4180 \begin_inset Flex Code
4183 \begin_layout Plain Layout
4191 Map a character to a string
4194 \begin_layout LyX-Code
4209 \begin_layout Standard
4242 the double-quote (")
4259 must be escaped with a preceding backslash (
4270 \begin_layout Standard
4272 \begin_inset Flex Noun
4275 \begin_layout Plain Layout
4283 statement to cause the symbol
4284 \begin_inset Flex Noun
4287 \begin_layout Plain Layout
4295 to be output for the keystroke
4296 \begin_inset Flex Noun
4299 \begin_layout Plain Layout
4310 \begin_layout LyX-Code
4316 \begin_layout Labeling
4317 \labelwidthstring 00.00.0000
4318 \begin_inset Flex Code
4321 \begin_layout Plain Layout
4329 Specify an accent character
4332 \begin_layout LyX-Code
4341 \begin_layout Standard
4342 This will make the cha
4380 This is the dead key
4384 \begin_layout Plain Layout
4391 refers to a key that does not produce a character by itself, but when followed
4392 with another key, produces the desired accent character.
4393 For example, a German characte
4395 r with an umlaut like
4405 can be produced in this manner.
4414 \begin_layout Standard
4427 and then another key not in
4444 followed by the other, not allowed key, as output.
4448 \begin_inset Flex Noun
4451 \begin_layout Plain Layout
4459 cancels a dead key, so if
4470 \begin_inset Flex Noun
4473 \begin_layout Plain Layout
4482 , the cursor will not go one position backwards but will instead cancel
4498 might have had on the next keystroke.
4502 \begin_layout Standard
4503 The following example specifies that the character ' is to be an acute accent,
4504 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4507 \begin_layout LyX-Code
4510 kmod ' acute aeiouAEIOU
4513 \begin_layout Labeling
4514 \labelwidthstring 00.00.0000
4515 \begin_inset Flex Code
4518 \begin_layout Plain Layout
4524 Specify an exception to the accent character
4527 \begin_layout LyX-Code
4536 \begin_layout Standard
4537 This defines an exce
4578 have been assigned a keystroke with a previous
4581 \begin_inset Flex Code
4584 \begin_layout Plain Layout
4608 must not belong in the
4655 If such a declaration does not exist in
4663 \begin_inset Flex Code
4666 \begin_layout Plain Layout
4700 \begin_inset Flex Code
4703 \begin_layout Plain Layout
4717 \begin_layout Standard
4718 The following command produces causes äi to be produced when you enter acute-i
4722 \begin_layout LyX-Code
4736 \begin_layout Labeling
4737 \labelwidthstring 00.00.0000
4738 \begin_inset Flex Code
4741 \begin_layout Plain Layout
4747 Combine two accent characters
4750 \begin_layout LyX-Code
4756 accent1 accent2 allowed
4759 \begin_layout Standard
4760 This one is getting pretty esoteric.
4761 It allows you to combine the effect
4817 \begin_inset Flex Code
4820 \begin_layout Plain Layout
4848 \begin_layout Standard
4849 Consider this example from the
4850 \begin_inset Flex Code
4853 \begin_layout Plain Layout
4864 \begin_layout LyX-Code
4867 kmod ; acute aeioyvhAEIOYVH
4871 kcomb acute umlaut iyIY
4874 \begin_layout Standard
4875 This allows you to press
4876 \begin_inset Flex Noun
4879 \begin_layout Plain Layout
4887 and get the effect of
4888 \begin_inset Flex Code
4891 \begin_layout Plain Layout
4910 in this case cancels the last dead key, so if you press
4911 \begin_inset Flex Noun
4914 \begin_layout Plain Layout
4923 \begin_inset Flex Code
4926 \begin_layout Plain Layout
4939 \begin_layout Subsection
4943 \begin_layout Standard
4945 \begin_inset Flex Code
4948 \begin_layout Plain Layout
4956 mapping is performed, a
4957 \begin_inset Flex Code
4960 \begin_layout Plain Layout
4970 file maps the strings that the symbols generate to characters in the current
4972 The \SpecialChar LyX
4973 distribution currently includes at least the
4974 \begin_inset Flex Code
4977 \begin_layout Plain Layout
4986 \begin_inset Flex Code
4989 \begin_layout Plain Layout
5000 \begin_layout Standard
5002 \begin_inset Flex Code
5005 \begin_layout Plain Layout
5013 file is a sequence of declarations of the form
5016 \begin_layout LyX-Code
5029 \begin_layout Standard
5030 For example, in order to map
5031 \begin_inset Flex Noun
5034 \begin_layout Plain Layout
5044 to the corresponding character in the iso-8859-1 set (233), the following
5048 \begin_layout LyX-Code
5056 \begin_layout Standard
5058 \begin_inset Flex Code
5061 \begin_layout Plain Layout
5070 \begin_inset Flex Code
5073 \begin_layout Plain Layout
5091 the same character can apply to more than one string.
5093 \begin_inset Flex Code
5096 \begin_layout Plain Layout
5107 \begin_layout LyX-Code
5119 \begin_inset Newline newline
5135 \begin_layout Standard
5137 cannot find a mapping for the string produced by the keystroke or a
5138 deadkey sequence, it will check if it looks like an accented char and try
5139 to draw an accent over the character on screen.
5142 \begin_layout Subsection
5146 \begin_layout Standard
5147 There is a second way to add support for international characters through
5148 so-called dead-keys.
5149 A dead-key works in combination with a letter to produce an accented character.
5150 Here, we'll explain how to create a really simple dead-key to illustrate
5154 \begin_layout Standard
5155 Suppose you happen to need the circumflex character,
5156 \begin_inset Quotes eld
5160 \begin_inset Quotes erd
5165 \begin_inset Flex Noun
5168 \begin_layout Plain Layout
5175 \begin_inset space ~
5179 \begin_inset Flex Noun
5182 \begin_layout Plain Layout
5188 ] to the \SpecialChar LyX
5190 \begin_inset Flex Code
5193 \begin_layout Plain Layout
5200 \begin_inset Flex Code
5203 \begin_layout Plain Layout
5210 Now, whenever you type the
5211 \begin_inset Flex Noun
5214 \begin_layout Plain Layout
5220 -key followed by a letter, that letter will have a circumflex accent on
5222 For example, the sequence
5223 \begin_inset Quotes eld
5227 \begin_inset Flex Noun
5230 \begin_layout Plain Layout
5237 \begin_inset Quotes erd
5240 produces the letter:
5241 \begin_inset Quotes eld
5245 \begin_inset Quotes erd
5249 If you tried to type
5250 \begin_inset Quotes eld
5254 \begin_inset Flex Noun
5257 \begin_layout Plain Layout
5264 \begin_inset Quotes erd
5267 , however, \SpecialChar LyX
5268 will complain with a beep, since a
5269 \begin_inset Quotes eld
5273 \begin_inset Flex Noun
5276 \begin_layout Plain Layout
5283 \begin_inset Quotes erd
5286 never takes a circumflex accent.
5288 \begin_inset Flex Noun
5291 \begin_layout Plain Layout
5297 after a dead-key produces the bare-accent.
5298 Please note this last point! If you bind a key to a dead-key, you'll need
5299 to rebind the character on that key to yet another key.
5301 \begin_inset Flex Noun
5304 \begin_layout Plain Layout
5310 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5313 \begin_layout Standard
5314 One common way to bind dead-keys is to use
5315 \begin_inset Flex Noun
5318 \begin_layout Plain Layout
5325 \begin_inset Flex Noun
5328 \begin_layout Plain Layout
5335 \begin_inset Flex Noun
5338 \begin_layout Plain Layout
5344 in combination with an accent, like
5345 \begin_inset Quotes eld
5349 \begin_inset Flex Noun
5352 \begin_layout Plain Layout
5359 \begin_inset Quotes erd
5363 \begin_inset Quotes eld
5367 \begin_inset Flex Noun
5370 \begin_layout Plain Layout
5377 \begin_inset Quotes erd
5381 \begin_inset Quotes eld
5385 \begin_inset Flex Noun
5388 \begin_layout Plain Layout
5395 \begin_inset Quotes erd
5399 Another way involves using
5400 \begin_inset Flex Code
5403 \begin_layout Plain Layout
5410 \begin_inset Flex Code
5413 \begin_layout Plain Layout
5419 to set up the special
5420 \begin_inset Flex Code
5423 \begin_layout Plain Layout
5431 \begin_inset Flex Code
5434 \begin_layout Plain Layout
5440 acts in some ways just like
5441 \begin_inset Flex Noun
5444 \begin_layout Plain Layout
5450 and permits you to bind keys to accented characters.
5451 You can also turn keys into dead-keys by binding them to something like
5453 \begin_inset Flex Code
5456 \begin_layout Plain Layout
5462 and then binding this symbolic key to the corresponding \SpecialChar LyX
5467 \begin_layout Plain Layout
5472 : This is exactly what I do in my
5473 \begin_inset Flex Code
5476 \begin_layout Plain Layout
5483 \begin_inset Flex Code
5486 \begin_layout Plain Layout
5494 \begin_inset Flex Noun
5497 \begin_layout Plain Layout
5499 \begin_inset space ~
5508 \begin_inset Flex Code
5511 \begin_layout Plain Layout
5517 and a bunch of these
5518 \begin_inset Quotes eld
5522 \begin_inset Flex Code
5525 \begin_layout Plain Layout
5532 \begin_inset Quotes erd
5535 symbolic keys bound such things as
5536 \begin_inset Flex Noun
5539 \begin_layout Plain Layout
5541 \begin_inset space ~
5550 \begin_inset Flex Noun
5553 \begin_layout Plain Layout
5555 \begin_inset space ~
5564 This is how I produce my accented characters.
5569 You can make just about anything into the
5570 \begin_inset Flex Code
5573 \begin_layout Plain Layout
5580 \begin_inset Flex Noun
5583 \begin_layout Plain Layout
5589 keys, a spare function key, etc.
5590 As for the \SpecialChar LyX
5591 commands that produce accents, check the entry for
5592 \begin_inset Flex Code
5595 \begin_layout Plain Layout
5606 You'll find the complete list there.
5609 \begin_layout Subsection
5610 Saving your Language Configuration
5613 \begin_layout Standard
5614 You can edit your preferences so that your desired language environment
5615 is automatically configured when \SpecialChar LyX
5617 \begin_inset Flex Noun
5620 \begin_layout Plain Layout
5621 Edit\SpecialChar menuseparator
5630 \begin_layout Chapter
5631 Installing New Document Classes, Layouts, and Templates
5632 \begin_inset CommandInset label
5634 name "cha:Installing-New-Document"
5639 \begin_inset Argument 1
5642 \begin_layout Plain Layout
5643 Installing New Document Classes
5651 \begin_layout Standard
5652 In this chapter, we describe the procedures for creating and installing
5653 new \SpecialChar LyX
5654 layout and template files, as well as offer a refresher on correctly
5655 installing new \SpecialChar LaTeX
5660 \begin_layout Standard
5661 First, let us a say a few words about how one ought to think about the relation
5662 between \SpecialChar LyX
5663 and \SpecialChar LaTeX
5665 The thing to understand is that, in a certain sense, \SpecialChar LyX
5666 doesn't know anything
5667 about \SpecialChar LaTeX
5669 Indeed, from \SpecialChar LyX
5670 's point of view, \SpecialChar LaTeX
5671 is just one of several
5672 \begin_inset Quotes eld
5676 \begin_inset Quotes erd
5679 in which it is capable of producing output.
5680 Other such formats are DocBook, plaintext, and XHTML.
5682 is, of course, a particularly important format, but very little of the
5683 information \SpecialChar LyX
5684 has about \SpecialChar LaTeX
5685 is actually contained in the program itself.
5689 \begin_layout Plain Layout
5690 Some commands are sufficiently complex that they are
5691 \begin_inset Quotes eld
5695 \begin_inset Quotes erd
5698 into \SpecialChar LyX
5700 But the developers generally regard this as a Bad Thing.
5705 Rather, that information, even for the standard classes like
5706 \begin_inset Flex Code
5709 \begin_layout Plain Layout
5715 , is contained in `layout files'.
5716 Similarly, \SpecialChar LyX
5717 itself does not know much about DocBook or XHTML.
5718 What it knows is contained in layout files.
5721 \begin_layout Standard
5722 You can think of the layout file for a given document class as a translation
5723 manual between \SpecialChar LyX
5724 constructs—paragraphs with their corresponding styles,
5725 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5728 Almost everything \SpecialChar LyX
5730 \begin_inset Flex Code
5733 \begin_layout Plain Layout
5739 , for example, is contained in the file
5740 \begin_inset Flex Code
5743 \begin_layout Plain Layout
5749 and in various other files it includes.
5750 For this reason, anyone intending to write layout files should plan to
5751 study the existing files.
5752 A good place to start is with
5753 \begin_inset Flex Code
5756 \begin_layout Plain Layout
5762 , which is included in
5763 \begin_inset Flex Code
5766 \begin_layout Plain Layout
5773 \begin_inset Flex Code
5776 \begin_layout Plain Layout
5782 , and many of the other layout files for document classes.
5783 This file is where sections and the like are defined:
5784 \begin_inset Flex Code
5787 \begin_layout Plain Layout
5793 tells \SpecialChar LyX
5794 how paragraphs that are marked with the Section, Subsection, etc,
5795 styles can be translated into corresponding \SpecialChar LaTeX
5796 , DocBook, and XHTML commands
5799 \begin_inset Flex Code
5802 \begin_layout Plain Layout
5808 file basically just includes several of these
5809 \begin_inset Flex Code
5812 \begin_layout Plain Layout
5821 \begin_layout Standard
5822 Defining the \SpecialChar LyX
5824 correspondence is not the only thing layout files do, though.
5825 Their other job is to define how the \SpecialChar LyX
5826 constructs themselves will appear
5828 The fact that layout files have these two jobs is often a source of confusion,
5829 because they are completely separate.
5830 Telling \SpecialChar LyX
5831 how to translate a certain paragraph style into \SpecialChar LaTeX
5834 how to display it; conversely, telling \SpecialChar LyX
5835 how to display a certain paragraph
5836 style does not tell \SpecialChar LyX
5837 how to translate it into \SpecialChar LaTeX
5838 (let alone tell \SpecialChar LaTeX
5841 So, in general, when you define a new \SpecialChar LyX
5842 construct, you must always do two
5843 quite separate things: (i)
5844 \begin_inset space ~
5847 tell \SpecialChar LyX
5848 how to translate it into \SpecialChar LaTeX
5850 \begin_inset space ~
5853 tell \SpecialChar LyX
5857 \begin_layout Standard
5858 Much the same is true, of course, as regards \SpecialChar LyX
5859 's other backend formats, though
5860 XHTML is in some ways different, because in that case \SpecialChar LyX
5865 able, to some extent, to use information about how it should display a
5866 paragraph on the screen to output information (in the form of CSS) about
5867 how the paragraph should be displayed in a browser.
5868 Even in this case, however, the distinction between what \SpecialChar LyX
5870 and how things are rendered externally remains in force, and the two can
5871 be controlled separately.
5873 \begin_inset CommandInset ref
5875 reference "sec:Tags-for-XHTML"
5882 \begin_layout Section
5883 Installing new \SpecialChar LaTeX
5887 \begin_layout Standard
5888 Some installations may not include a \SpecialChar LaTeX
5889 package or class file that you would
5890 like to use within \SpecialChar LyX
5892 For example, you might need Foil\SpecialChar TeX
5893 , a package for preparing slides for overhead
5895 Modern \SpecialChar LaTeX
5896 distributions like \SpecialChar TeX
5897 Live (2008 or newer) or MiK\SpecialChar TeX
5898 provide a user interface
5899 for installing such packages.
5900 For example, with MiK\SpecialChar TeX
5901 , you start the program
5902 \begin_inset Quotes eld
5906 \begin_inset space ~
5910 \begin_inset Quotes erd
5913 to get a list of available packages.
5914 To install one of them, right click on it or use the corresponding toolbar
5918 \begin_layout Standard
5919 If your \SpecialChar LaTeX
5920 distribution does not provide such a `package manager', or if the
5921 package is not available from your distribution, then follow these steps
5922 to install it manually:
5925 \begin_layout Enumerate
5926 Get the package from
5927 \begin_inset CommandInset href
5930 target "http://www.ctan.org/"
5937 \begin_layout Enumerate
5938 If the package contains a file with the ending
5939 \begin_inset Quotes eld
5943 \begin_inset Flex Code
5946 \begin_layout Plain Layout
5953 \begin_inset Quotes erd
5956 (is the case for Foil\SpecialChar TeX
5957 ) then open a console, change to the folder of this
5958 file and execute the command
5959 \begin_inset Flex Code
5962 \begin_layout Plain Layout
5969 You have now unpacked the package and have all files to install it.
5970 Most \SpecialChar LaTeX
5971 -packages are not packed and you can skip this step.
5974 \begin_layout Enumerate
5975 Now you need to decide if the package should be available for all users
5977 \begin_inset Separator parbreak
5984 \begin_layout Enumerate
5985 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5986 for all users on your system, then install it in your `local' \SpecialChar TeX
5988 install it in your own `user' \SpecialChar TeX
5990 Where these trees should be created, if they do not already exist, depends
5992 To find this out, look in the file
5993 \begin_inset Flex Code
5996 \begin_layout Plain Layout
6006 \begin_layout Plain Layout
6007 This is usually in the directory
6008 \begin_inset Flex Code
6011 \begin_layout Plain Layout
6017 , though you can execute the command
6018 \begin_inset Flex Code
6021 \begin_layout Plain Layout
6032 The location of the `local' \SpecialChar TeX
6033 tree is defined by the
6034 \begin_inset Flex Code
6037 \begin_layout Plain Layout
6043 variable; this is usually somewhere like
6044 \begin_inset Flex Code
6047 \begin_layout Plain Layout
6048 /usr/local/share/texmf
6054 The location of the `user' \SpecialChar TeX
6056 \begin_inset Flex Code
6059 \begin_layout Plain Layout
6066 \begin_inset Flex Code
6069 \begin_layout Plain Layout
6076 (If these variables are not predefined, you have to define them.) You'll
6077 probably need root permissions to create or modify the `local' tree, but
6078 not for your `user' tree.
6079 \begin_inset Newline newline
6082 In general, it is recommended to install in the user tree because your user
6083 will not be modified or even overwritten when you upgrade your system.
6084 It will typically also be backed up together with everything else when
6085 you backup your home directory (which, of course, you do on a regular basis).
6088 \begin_layout Enumerate
6089 On Windows, if you want the new package to be available for all users on
6090 your system, change to the folder where \SpecialChar LaTeX
6091 is installed and then change to
6093 \begin_inset Flex Code
6096 \begin_layout Plain Layout
6107 (For MiK\SpecialChar TeX
6108 , this would be by default the folder
6109 \begin_inset Flex Code
6112 \begin_layout Plain Layout
6130 \begin_layout Plain Layout
6131 Note that this will be the correct path only on English installations.
6132 On a German one, it would be
6133 \begin_inset Flex Code
6136 \begin_layout Plain Layout
6150 , and similarly for other languages.
6155 Create there a new folder
6156 \begin_inset Flex Code
6159 \begin_layout Plain Layout
6165 and copy all files of the package into it.
6167 \begin_inset Newline newline
6170 If the package should only available for you or you don't have admin permissions
6171 , do the same, but in the local \SpecialChar LaTeX
6174 \begin_inset space \thinspace{}
6177 g., for MiK\SpecialChar TeX
6179 \begin_inset space ~
6182 2.8 under Windows XP, this would be the folder:
6183 \begin_inset Newline newline
6189 \begin_inset Flex Code
6192 \begin_layout Plain Layout
6195 Documents and Settings
6207 \begin_inset Newline newline
6213 \begin_inset Phantom HPhantom
6216 \begin_layout Plain Layout
6227 \begin_inset Flex Code
6230 \begin_layout Plain Layout
6243 \begin_inset Newline newline
6246 On Vista, it would be:
6247 \begin_inset Newline newline
6251 \begin_inset Flex Code
6254 \begin_layout Plain Layout
6280 \begin_layout Enumerate
6281 Now one only need to tell \SpecialChar LaTeX
6282 that there are new files.
6283 This depends on the used \SpecialChar LaTeX
6285 \begin_inset Separator parbreak
6292 \begin_layout Enumerate
6293 For \SpecialChar TeX
6294 Live execute the command
6295 \begin_inset Flex Code
6298 \begin_layout Plain Layout
6305 If you installed the package for all users, then you will probably need
6306 to have root permissions for that.
6309 \begin_layout Enumerate
6310 For MiK\SpecialChar TeX
6311 , if you have installed the package for all users, start the program
6313 \begin_inset Quotes eld
6317 \begin_inset space ~
6321 \begin_inset Quotes erd
6324 and press the button marked
6325 \begin_inset Quotes eld
6329 \begin_inset Quotes erd
6333 Otherwise start the program
6334 \begin_inset Quotes eld
6338 \begin_inset Quotes erd
6345 \begin_layout Enumerate
6346 Finally, you need to tell \SpecialChar LyX
6347 that there are new packages available.
6348 So, in \SpecialChar LyX
6350 \begin_inset Flex Noun
6353 \begin_layout Plain Layout
6356 \SpecialChar menuseparator
6362 and then restart \SpecialChar LyX
6366 \begin_layout Standard
6367 Now the package is installed.
6368 In our example, the document class
6369 \begin_inset Flex Code
6372 \begin_layout Plain Layout
6374 \begin_inset space ~
6382 will now be available under
6383 \begin_inset Flex Noun
6386 \begin_layout Plain Layout
6387 Document\SpecialChar menuseparator
6388 Settings\SpecialChar menuseparator
6398 \begin_layout Standard
6399 If you would like to use a \SpecialChar LaTeX
6400 document class that is not even listed in the
6402 \begin_inset Flex Noun
6405 \begin_layout Plain Layout
6406 Document\SpecialChar menuseparator
6407 Settings\SpecialChar menuseparator
6413 , then you need to create a `layout' file for it.
6414 That is the topic of the next section.
6417 \begin_layout Section
6418 Types of layout files
6421 \begin_layout Standard
6422 This section describes the various sorts of \SpecialChar LyX
6423 files that contain layout informati
6425 These files describe various paragraph and character styles, determining
6426 how \SpecialChar LyX
6427 should display them and how they should be translated into \SpecialChar LaTeX
6429 XHTML, or whatever output format is being used.
6433 \begin_layout Standard
6434 We shall try to provide a thorough description of the process of writing
6436 However, there are so many different types of documents supported even
6437 by just \SpecialChar LaTeX
6438 that we can't hope to cover every different possibility or problem
6439 you might encounter.
6440 The \SpecialChar LyX
6441 users' list is frequented by people with lots of experience with layout
6442 design who are willing to share what they've learned, so please feel free
6443 to ask questions there.
6446 \begin_layout Standard
6447 As you prepare to write a new layout, it is extremely helpful to look at
6448 the layouts distributed with \SpecialChar LyX
6450 If you write a \SpecialChar LyX
6451 layout for a \SpecialChar LaTeX
6452 document class that might also be used by
6453 others, or write a module that might be useful to others, then you should
6454 consider posting your layout to the
6455 \begin_inset CommandInset href
6457 name "layout section on the LyX wiki"
6458 target "http://wiki.lyx.org/Layouts/Layouts"
6462 or even to the \SpecialChar LyX
6463 developers' list, so that it might be included in \SpecialChar LyX
6468 \begin_layout Plain Layout
6469 Note that \SpecialChar LyX
6470 is licensed under the General Public License, so any material
6471 that is contributed to \SpecialChar LyX
6472 must be similarly licensed.
6480 \begin_layout Subsection
6482 \begin_inset CommandInset label
6484 name "subsec:Layout-modules"
6491 \begin_layout Standard
6492 We have spoken to this point about `layout files'.
6493 But there are different sorts of files that contain layout information.
6494 Layout files, strictly so called, have the
6495 \begin_inset Flex Code
6498 \begin_layout Plain Layout
6504 extension and provide \SpecialChar LyX
6505 with information about document classes.
6506 Since \SpecialChar LyX
6507 1.6 layout information can also be contained in layout
6512 \begin_inset Flex Code
6515 \begin_layout Plain Layout
6522 Modules are to \SpecialChar LaTeX
6523 packages much as layouts are to \SpecialChar LaTeX
6524 classes, and some modules—such
6526 \begin_inset Flex Code
6529 \begin_layout Plain Layout
6535 module—specifically provide support for one package.
6536 In a sense, layout modules are similar to included
6540 \begin_layout Plain Layout
6541 These can have any extension, but by convention have the
6542 \begin_inset Flex Code
6545 \begin_layout Plain Layout
6557 \begin_inset Flex Code
6560 \begin_layout Plain Layout
6566 —in that modules are not specific to a given document class but may be used
6567 with many different classes.
6568 The difference is that using an included file with
6569 \begin_inset Flex Code
6572 \begin_layout Plain Layout
6578 requires editing that file.
6579 Modules, by contrast, are selected in the
6580 \begin_inset Flex Noun
6583 \begin_layout Plain Layout
6584 Document\SpecialChar menuseparator
6593 \begin_layout Standard
6594 Building modules is the easiest way to get started with layout editing,
6595 since it can be as simple as adding a single new paragraph style or flex
6597 But modules may, in principle, contain anything a layout file can contain.
6600 \begin_layout Standard
6601 After creating a new module and copying it to the
6602 \begin_inset Flex Code
6605 \begin_layout Plain Layout
6611 folder, you will need to reconfigure and then restart \SpecialChar LyX
6614 However, changes you make to the module will be seen immediately, if you
6616 \begin_inset Flex Noun
6619 \begin_layout Plain Layout
6620 Document\SpecialChar menuseparator
6626 , highlight something, and then hit
6627 \begin_inset Quotes eld
6631 \begin_inset Quotes erd
6637 It is strongly recommended that you save your work before doing this
6642 it is strongly recommended that you not attempt to edit modules while simultaneo
6643 usly working on actual documents
6646 Though of course the developers strive to keep \SpecialChar LyX
6647 stable in such situations,
6648 syntax errors and the like in your module file could cause strange behavior.
6651 \begin_layout Subsubsection
6655 \begin_layout Standard
6656 Modules are to \SpecialChar LyX
6657 as packages are to \SpecialChar LaTeX
6659 Sometimes, however, you find yourself wanting a specific inset or character
6660 style just for one document and writing a module that will also be available
6661 to other documents makes little sense.
6662 What you need is \SpecialChar LyX
6664 \begin_inset Quotes eld
6668 \begin_inset Quotes erd
6674 \begin_layout Standard
6675 You will find it under
6677 Document\SpecialChar menuseparator
6678 Settings\SpecialChar menuseparator
6682 The large text box allows you to enter anything that you might enter in
6683 a layout file or module.
6684 You can think of a document's local layout, in fact, as a module that belongs
6686 So, in particular, you must enter a
6687 \begin_inset Flex Code
6690 \begin_layout Plain Layout
6697 Any format is acceptable, but one would normally use the format current
6699 (In \SpecialChar LyX
6700 2.1, the current layout format is 48.) You should be aware that local
6701 layout is not supported by versions of \SpecialChar LyX
6702 prior to 1.6, so you should not
6703 use it if you want to be able to export your document to \SpecialChar LyX
6705 (without, that is, losing the local layout information).
6706 If you wish to be able to export to 1.6—local layout is supported in 1.6,
6707 though there is no UI for it—then you should use format 11 and, of course,
6708 use only layout constructs that were available in \SpecialChar LyX
6712 \begin_layout Standard
6713 When you have entered something in the
6714 \begin_inset Flex Code
6717 \begin_layout Plain Layout
6723 pane, \SpecialChar LyX
6725 \begin_inset Quotes eld
6729 \begin_inset Quotes erd
6732 button at the bottom.
6733 Clicking this button will cause \SpecialChar LyX
6734 to determine whether what you have entered
6735 is valid layout information for the chosen format.
6737 will report the result but, unfortunately, will not tell you what errors
6738 there might have been.
6739 These will be written to the terminal, however, if \SpecialChar LyX
6740 is started from a terminal.
6741 You will not be permitted to save your local layout until you have entered
6745 \begin_layout Standard
6746 The warnings at the end of the previous section apply here, too.
6747 Do not play with local layout while you are actually working, especially
6748 if you have not saved your document.
6749 That said, using local layout with a test document can be a very convenient
6750 way to try out layout ideas, or even to start developing a module.
6753 \begin_layout Subsection
6755 \begin_inset Flex Noun
6758 \begin_layout Plain Layout
6767 \begin_layout Standard
6768 There are two situations you are likely to encounter when wanting to support
6769 a new \SpecialChar LaTeX
6770 document class, involving style (
6771 \begin_inset Flex Code
6774 \begin_layout Plain Layout
6780 ) files and \SpecialChar LaTeX2e
6782 \begin_inset Flex Code
6785 \begin_layout Plain Layout
6792 Supporting a style file is usually fairly easy.
6793 Supporting a new class file is a bit harder.
6794 We'll discuss the former in this section and the latter in the next.
6795 Similar remarks apply, of course, if you want to support a new DocBook
6799 \begin_layout Standard
6800 The easier case is the one in which your new document class is provided
6801 as a style file that is to be used in conjunction with an already supported
6803 For the sake of the example, we'll assume that the style file is called
6805 \begin_inset Flex Noun
6808 \begin_layout Plain Layout
6814 and that it is meant to be used with
6815 \begin_inset Flex Noun
6818 \begin_layout Plain Layout
6824 , which is a standard class.
6828 \begin_layout Standard
6829 Start by copying the existing class's layout file into your local directory:
6833 \begin_layout Plain Layout
6834 Of course, which directory is your local directory will vary by platform,
6835 and \SpecialChar LyX
6836 allows you to specify your local directory on startup, too, using
6838 \begin_inset Flex Code
6841 \begin_layout Plain Layout
6855 \begin_layout LyX-Code
6856 cp report.layout ~/.lyx/layouts/myclass.layout
6859 \begin_layout Standard
6861 \begin_inset Flex Code
6864 \begin_layout Plain Layout
6870 and change the line:
6873 \begin_layout LyX-Code
6876 Declare\SpecialChar LaTeX
6880 \begin_layout Standard
6884 \begin_layout LyX-Code
6887 Declare\SpecialChar LaTeX
6888 Class[report, myclass.sty]{report (myclass)}
6891 \begin_layout Standard
6895 \begin_layout LyX-Code
6897 \begin_inset Newline newline
6903 \begin_inset Newline newline
6909 \begin_layout Standard
6910 near the top of the file.
6913 \begin_layout Standard
6914 Start \SpecialChar LyX
6916 \begin_inset Flex Noun
6919 \begin_layout Plain Layout
6920 Tools\SpecialChar menuseparator
6927 Then restart \SpecialChar LyX
6928 and try creating a new document.
6930 \begin_inset Flex Noun
6933 \begin_layout Plain Layout
6939 " as a document class option in the
6940 \begin_inset Flex Noun
6943 \begin_layout Plain Layout
6944 Document\SpecialChar menuseparator
6951 It is likely that some of the sectioning commands and such in your new
6952 class will work differently from how they worked in the base class—
6953 \begin_inset Flex Code
6956 \begin_layout Plain Layout
6962 in this example—so you can fiddle around with the settings for the different
6963 sections if you wish.
6964 The layout information for sections is contained in
6965 \begin_inset Flex Code
6968 \begin_layout Plain Layout
6974 , but you do not need to copy and change this file.
6975 Instead, you can simply add your changes to your layout file, after the
6977 \begin_inset Flex Code
6980 \begin_layout Plain Layout
6986 , which itself includes
6987 \begin_inset Flex Code
6990 \begin_layout Plain Layout
6997 For example, you might add these lines:
7000 \begin_layout LyX-Code
7004 \begin_layout LyX-Code
7008 \begin_layout LyX-Code
7012 \begin_layout LyX-Code
7016 \begin_layout LyX-Code
7020 \begin_layout Standard
7021 to change the font for chapter headings to sans-serif.
7022 This will override (or, in this case, add to) the existing declaration
7023 for the Chapter style.
7027 \begin_layout Standard
7028 Your new package may also provide commands or environments not present in
7030 In this case, you will want to add these to the layout file.
7032 \begin_inset CommandInset ref
7034 reference "sec:TextClass"
7038 for information on how to do so.
7041 \begin_layout Standard
7043 \begin_inset Flex Noun
7046 \begin_layout Plain Layout
7052 can be used with several different document classes, and even if it cannot,
7053 you might find it easiest just to write a module that you can load with
7055 The simplest possible such module would be:
7058 \begin_layout LyX-Code
7061 DeclareLyXModule{My Package}
7064 \begin_layout LyX-Code
7068 \begin_layout LyX-Code
7069 #Support for mypkg.sty.
7072 \begin_layout LyX-Code
7074 \begin_inset Newline newline
7080 \begin_layout LyX-Code
7082 \begin_inset Newline newline
7088 \begin_layout LyX-Code
7090 \begin_inset Newline newline
7096 \begin_inset Newline newline
7102 \begin_layout Standard
7103 A more complex module might modify the behavior of some existing constructs
7104 or define some new ones.
7106 \begin_inset CommandInset ref
7108 reference "sec:TextClass"
7115 \begin_layout Subsection
7117 \begin_inset Flex Noun
7120 \begin_layout Plain Layout
7129 \begin_layout Standard
7130 There are two possibilities here.
7131 One is that the class file is itself based upon an existing document class.
7132 For example, many thesis classes are based upon
7133 \begin_inset Flex Noun
7136 \begin_layout Plain Layout
7143 To see whether yours is, look for a line like
7146 \begin_layout LyX-Code
7152 \begin_layout Standard
7154 If so, then you may proceed largely as in the previous section, though
7156 \begin_inset Flex Code
7159 \begin_layout Plain Layout
7160 Declare\SpecialChar LaTeX
7166 line will be different.
7167 If your new class is
7168 \begin_inset Flex Code
7171 \begin_layout Plain Layout
7177 and it is based upon
7178 \begin_inset Flex Code
7181 \begin_layout Plain Layout
7187 , then the line should read:
7191 \begin_layout Plain Layout
7192 And it will be easiest if you save the file to
7193 \begin_inset Flex Code
7196 \begin_layout Plain Layout
7203 assumes that the document class has the same name as the layout file.
7212 \begin_layout LyX-Code
7215 Declare\SpecialChar LaTeX
7216 Class[thesis,book]{thesis}
7219 \begin_layout Standard
7220 If, on the other hand, the new class is not based upon an existing class,
7221 you will probably have to
7222 \begin_inset Quotes eld
7226 \begin_inset Quotes erd
7230 We strongly suggest copying an existing layout file which uses a similar
7232 class and then modifying it, if you can do so.
7233 At least use an existing file as a starting point so you can find out what
7234 items you need to worry about.
7235 Again, the specifics are covered below.
7238 \begin_layout Subsection
7240 \begin_inset CommandInset label
7242 name "subsec:Creating-Templates"
7249 \begin_layout Standard
7250 Once you have written a layout file for a new document class, you might
7251 want to consider writing a
7256 A template acts as a kind of tutorial for your layout, showing how it might
7257 be used, though containing dummy content.
7258 You can of course look at the various templates included with \SpecialChar LyX
7262 \begin_layout Standard
7263 Templates are created just like usual documents: using \SpecialChar LyX
7265 The only difference is that usual documents contain all possible settings,
7266 including the font scheme and the paper size.
7267 Usually a user doesn't want a template to overwrite his preferred settings
7268 for such parameters.
7269 For that reason, the designer of a template should remove the corresponding
7271 \begin_inset Flex Code
7274 \begin_layout Plain Layout
7283 \begin_inset Flex Code
7286 \begin_layout Plain Layout
7294 from the template \SpecialChar LyX
7296 This can be done with any simple text-editor, for example
7297 \begin_inset Flex Code
7300 \begin_layout Plain Layout
7307 \begin_inset Flex Code
7310 \begin_layout Plain Layout
7319 \begin_layout Standard
7320 Put the edited template files you create in
7321 \begin_inset Flex Code
7324 \begin_layout Plain Layout
7330 , copy the ones you use from the global template directory in
7331 \begin_inset Flex Code
7334 \begin_layout Plain Layout
7340 to the same place, and redefine the template path in the
7341 \begin_inset Flex Noun
7344 \begin_layout Plain Layout
7345 Tools\SpecialChar menuseparator
7346 Preferences\SpecialChar menuseparator
7355 \begin_layout Standard
7356 Note, by the way, that there is a template which has a particular meaning:
7358 \begin_inset Flex Code
7361 \begin_layout Plain Layout
7368 This template is loaded every time you create a new document with
7369 \begin_inset Flex Noun
7372 \begin_layout Plain Layout
7373 File\SpecialChar menuseparator
7379 in order to provide useful defaults.
7380 To create this template from inside \SpecialChar LyX
7381 , all you have to do is to open a document
7382 with the correct settings, and use the
7383 \begin_inset Flex Noun
7386 \begin_layout Plain Layout
7387 Save as Document Defaults
7395 \begin_layout Subsection
7396 Upgrading old layout files
7399 \begin_layout Standard
7400 The format of layout files changes with each \SpecialChar LyX
7401 release, so old layout files
7402 need to be converted to the new format.
7404 reads a layout file in an older format, it automatically calls the
7406 \begin_inset Flex Code
7409 \begin_layout Plain Layout
7415 to convert it to a temporary file in current format.
7416 The original file is left untouched.
7417 If you use the layout file often, then, you may want to convert it permanently,
7418 so that \SpecialChar LyX
7419 does not have to do so itself every time.
7420 To do this, you can call the converter manually:
7423 \begin_layout Enumerate
7425 \begin_inset Flex Code
7428 \begin_layout Plain Layout
7435 \begin_inset Flex Code
7438 \begin_layout Plain Layout
7447 \begin_layout Enumerate
7449 \begin_inset Newline newline
7453 \begin_inset Flex Code
7456 \begin_layout Plain Layout
7457 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7463 \begin_inset Newline newline
7467 \begin_inset Flex Code
7470 \begin_layout Plain Layout
7476 is the name of your \SpecialChar LyX
7480 \begin_layout Standard
7481 Note that manual conversion does not affect included files, so these will
7482 have to be converted separately.
7485 \begin_layout Section
7486 \begin_inset CommandInset label
7488 name "sec:TextClass"
7492 The layout file format
7495 \begin_layout Standard
7496 The following sections describe how layout files are structured and written.
7497 Our advice is to go slowly, save and test often.
7498 It is really not that hard, except that the multitude of options can become
7499 overwhelming, especially if you try to check out too many at once.
7500 It becomes easier if you use existing layouts of \SpecialChar LyX
7501 as examples/reference
7502 or if you modify an existing layout to your needs.
7505 \begin_layout Standard
7506 Note that all the tags used in layout files are case-insensitive.
7508 \begin_inset Flex Code
7511 \begin_layout Plain Layout
7518 \begin_inset Flex Code
7521 \begin_layout Plain Layout
7528 \begin_inset Flex Code
7531 \begin_layout Plain Layout
7537 are really the same tag.
7538 The possible arguments are printed in brackets after the tag's name.
7539 The default argument is typeset
7540 \begin_inset Flex Code
7543 \begin_layout Plain Layout
7552 If the argument has a data type like
7553 \begin_inset Quotes eld
7557 \begin_inset Quotes erd
7561 \begin_inset Quotes eld
7565 \begin_inset Quotes erd
7568 , the default is shown like this:
7569 \begin_inset Flex Code
7572 \begin_layout Plain Layout
7583 \begin_layout Subsection
7584 The document class declaration and classification
7587 \begin_layout Standard
7588 Lines in a layout file which begin with
7589 \begin_inset Flex Code
7592 \begin_layout Plain Layout
7599 There is one exception to this rule.
7601 \begin_inset Flex Code
7604 \begin_layout Plain Layout
7610 files should begin with lines like:
7613 \begin_layout LyX-Code
7616 #% Do not delete the line below; configure depends on this
7619 \begin_layout LyX-Code
7624 DeclareLaTeXClass{Article (Standard Class)}
7627 \begin_layout LyX-Code
7632 DeclareCategory{Articles}
7635 \begin_layout Standard
7636 The second and third lines are used when you (re)configure \SpecialChar LyX
7638 The layout file is read by the \SpecialChar LaTeX
7640 \begin_inset Flex Code
7643 \begin_layout Plain Layout
7649 , in a special mode where
7650 \begin_inset Flex Code
7653 \begin_layout Plain Layout
7660 The first line is just a \SpecialChar LaTeX
7661 comment, the second one contains the mandatory
7662 declaration of the text class and the third line contains the optional
7663 classification of the class.
7664 If these lines appear in a file named
7665 \begin_inset Flex Code
7668 \begin_layout Plain Layout
7674 , then they define a text class of name
7675 \begin_inset Flex Code
7678 \begin_layout Plain Layout
7684 (the name of the layout file) which uses the \SpecialChar LaTeX
7686 \begin_inset Flex Code
7689 \begin_layout Plain Layout
7695 (the default is to use the same name as the layout).
7697 \begin_inset Quotes eld
7700 Article (Standard Class)
7701 \begin_inset Quotes erd
7704 that appears above is used as a description of the text class in the
7705 \begin_inset Flex Noun
7708 \begin_layout Plain Layout
7709 Document\SpecialChar menuseparator
7717 \begin_inset Quotes eld
7721 \begin_inset Quotes erd
7724 in the example) is also used in the
7725 \begin_inset Flex Noun
7728 \begin_layout Plain Layout
7729 Document\SpecialChar menuseparator
7735 dialog: the text classes are grouped by these categories (which are usually
7736 genres, so typical categories are
7737 \begin_inset Quotes eld
7741 \begin_inset Quotes erd
7745 \begin_inset Quotes eld
7749 \begin_inset Quotes erd
7753 \begin_inset Quotes eld
7757 \begin_inset Quotes erd
7761 \begin_inset Quotes eld
7765 \begin_inset Quotes erd
7769 \begin_inset Quotes eld
7773 \begin_inset Quotes erd
7777 \begin_inset Quotes eld
7781 \begin_inset Quotes erd
7785 If no category has been declared, the class will be put in the
7786 \begin_inset Quotes eld
7790 \begin_inset Quotes erd
7796 \begin_layout Standard
7797 Let's assume that you wrote your own text class that uses the
7798 \begin_inset Flex Code
7801 \begin_layout Plain Layout
7807 document class, but where you changed the appearance of the section headings.
7808 If you put it in a file
7809 \begin_inset Flex Code
7812 \begin_layout Plain Layout
7818 , the header of this file should be:
7821 \begin_layout LyX-Code
7824 #% Do not delete the line below; configure depends on this
7827 \begin_layout LyX-Code
7832 DeclareLaTeXClass[article]{Article (with My Own Headings)}
7835 \begin_layout LyX-Code
7840 DeclareCategory{Articles}
7843 \begin_layout Standard
7844 This declares a text class
7845 \begin_inset Flex Code
7848 \begin_layout Plain Layout
7854 , associated with the \SpecialChar LaTeX
7856 \begin_inset Flex Code
7859 \begin_layout Plain Layout
7866 \begin_inset Quotes eld
7869 Article (with My Own Headings)
7870 \begin_inset Quotes erd
7874 If your text class depends on several packages, you can declare it as:
7877 \begin_layout LyX-Code
7880 #% Do not delete the line below; configure depends on this
7883 \begin_layout LyX-Code
7888 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
7891 \begin_layout LyX-Code
7896 DeclareCategory{Articles}
7899 \begin_layout Standard
7900 This indicates that your text class uses the
7901 \begin_inset Flex Code
7904 \begin_layout Plain Layout
7911 Finally, it is also possible to declare classes for DocBook code.
7912 Typical declarations will look like:
7915 \begin_layout LyX-Code
7918 #% Do not delete the line below; configure depends on this
7921 \begin_layout LyX-Code
7926 DeclareDocBookClass[article]{SGML (DocBook Article)}
7929 \begin_layout LyX-Code
7934 DeclareCategory{Articles (DocBook)}
7937 \begin_layout Standard
7938 Note that these declarations can also be given an optional parameter declaring
7939 the name of the document class (but not a list).
7942 \begin_layout Standard
7943 So, to be as explicit as possible, the form of the layout declaration is:
7946 \begin_layout LyX-Code
7951 DeclareLaTeXClass[class,package.sty]{layout description}
7954 \begin_layout LyX-Code
7959 DeclareCategory{category}
7962 \begin_layout Standard
7963 The class need only be specified if the name of the \SpecialChar LaTeX
7965 name of the layout file are different or if there are packages to load.
7966 If the name of the class file is not specified, then \SpecialChar LyX
7968 that it is the same as the name of the layout file.
7971 \begin_layout Standard
7972 When the text class has been modified to your taste, all you have to do
7973 is to copy it either to
7974 \begin_inset Flex Code
7977 \begin_layout Plain Layout
7984 \begin_inset Flex Code
7987 \begin_layout Plain Layout
7994 \begin_inset Flex Noun
7997 \begin_layout Plain Layout
7998 Tools\SpecialChar menuseparator
8004 , exit \SpecialChar LyX
8006 Then your new text class should be available along with the others.
8009 \begin_layout Standard
8010 Once the layout file is installed, you can edit it and see your changes
8011 without having to reconfigure or to restart \SpecialChar LyX
8017 \begin_layout Plain Layout
8018 In versions of \SpecialChar LyX
8019 prior to 1.6, this was not true.
8020 As a result, editing layout files was very time consuming, since you had
8021 constantly to restart \SpecialChar LyX
8027 You can force a reload of the current layout by using the \SpecialChar LyX
8029 \begin_inset Flex Noun
8032 \begin_layout Plain Layout
8039 There is no default binding for this function—though, of course, you can
8040 bind it to a key yourself.
8041 But you will normally use this function simply by entering it in the mini-buffe
8046 \begin_layout Standard
8052 \begin_inset Flex Noun
8055 \begin_layout Plain Layout
8061 is very much an `advanced feature'.
8066 recommended that you save your work before using this function.
8071 recommended that you not attempt to edit layout information while simultaneousl
8072 y working on a document that you care about.
8073 Use a test document.
8074 Syntax errors and the like in your layout file could cause peculiar behavior.
8075 In particular, such errors could cause \SpecialChar LyX
8076 to regard the current layout as
8077 invalid and to attempt to switch to some other layout.
8081 \begin_layout Plain Layout
8082 Really bad syntax errors may even caused \SpecialChar LyX
8084 This is because certain sorts of errors may make \SpecialChar LyX
8095 The \SpecialChar LyX
8096 team strives to keep \SpecialChar LyX
8097 stable in such situations, but safe is better
8102 \begin_layout Plain Layout
8103 While we're giving advice: make regular backups.
8104 And be nice to your mother.
8112 \begin_layout Subsection
8113 The Module declaration
8116 \begin_layout Standard
8117 A module must begin with a line like the following:
8120 \begin_layout LyX-Code
8123 DeclareLyXModule[endnotes.sty]{Endnotes}
8126 \begin_layout Standard
8127 The mandatory argument, in curly brackets, is the name of the module, as
8129 \begin_inset Flex Noun
8132 \begin_layout Plain Layout
8133 Document\SpecialChar menuseparator
8134 Settings\SpecialChar menuseparator
8141 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8143 on which the module depends.
8144 It is also possible to use the form
8145 \begin_inset Flex Noun
8148 \begin_layout Plain Layout
8154 as an optional argument, which declares that the module can only be used
8155 when there exists a conversion chain between the formats `
8156 \begin_inset Flex Code
8159 \begin_layout Plain Layout
8166 \begin_inset Flex Code
8169 \begin_layout Plain Layout
8178 \begin_layout Standard
8179 The module declaration should then be followed by lines like the following
8183 \begin_layout Plain Layout
8184 Preferably in English if the module should be published with \SpecialChar LyX
8186 This description will appear in the list of messages to be translated and
8187 will be thus translated with the next interface update.
8195 \begin_layout LyX-Code
8199 \begin_layout LyX-Code
8200 #Adds an endnote command, in addition to footnotes.
8204 \begin_layout LyX-Code
8205 #You will need to add
8207 theendnotes in TeX code where you
8210 \begin_layout LyX-Code
8211 #want the endnotes to appear.
8215 \begin_layout LyX-Code
8219 \begin_layout LyX-Code
8220 #Requires: somemodule | othermodule
8223 \begin_layout LyX-Code
8224 #Excludes: badmodule
8227 \begin_layout Standard
8228 The description is used in
8229 \begin_inset Flex Noun
8232 \begin_layout Plain Layout
8233 Document\SpecialChar menuseparator
8234 Settings\SpecialChar menuseparator
8240 to provide the user with information about what the module does.
8242 \begin_inset Flex Code
8245 \begin_layout Plain Layout
8251 line is used to identify other modules with which this one must be used;
8253 \begin_inset Flex Code
8256 \begin_layout Plain Layout
8262 line is used to identify modules with which this one may not be used.
8263 Both are optional, and, as shown, multiple modules should be separated
8264 with the pipe symbol: |.
8265 Note that the required modules are treated disjunctively:
8269 of the required modules must be used.
8274 excluded module may be used.
8275 Note that modules are identified here by their filenames without the
8276 \begin_inset Flex Code
8279 \begin_layout Plain Layout
8287 \begin_inset Flex Code
8290 \begin_layout Plain Layout
8297 \begin_inset Flex Code
8300 \begin_layout Plain Layout
8309 \begin_layout Subsection
8313 \begin_layout Standard
8314 The first non-comment line of any layout file, included file, or module
8319 contain the file format number:
8322 \begin_layout Description
8323 \begin_inset Flex Code
8326 \begin_layout Plain Layout
8333 \begin_inset Flex Code
8336 \begin_layout Plain Layout
8342 ] The format number of the layout file.
8345 \begin_layout Standard
8346 This tag was introduced with \SpecialChar LyX
8348 \begin_inset space ~
8352 Layout files from older \SpecialChar LyX
8353 versions do not have an explicit file format and
8354 are considered to have
8355 \begin_inset Flex Code
8358 \begin_layout Plain Layout
8360 \begin_inset space ~
8369 The format for the present version of \SpecialChar LyX
8371 But each version of \SpecialChar LyX
8372 is capable of reading earlier versions' layout files,
8373 just as they are capable of reading files produced by earlier versions
8376 There is, however, no provision for converting to earlier formats.
8379 \begin_layout Subsection
8380 \begin_inset CommandInset label
8382 name "subsec:General-text-class"
8386 General text class parameters
8389 \begin_layout Standard
8390 These are general parameters that govern the behavior of an entire document
8396 mean that they must appear in
8397 \begin_inset Flex Code
8400 \begin_layout Plain Layout
8406 files rather than in modules.
8407 A module can contain any layout tag.)
8410 \begin_layout Description
8411 \begin_inset Flex Code
8414 \begin_layout Plain Layout
8420 Adds information that will be output in the
8421 \begin_inset Flex Code
8424 \begin_layout Plain Layout
8430 block when the document is output to XHTML.
8431 Typically, this would be used to output CSS style information, but it can
8432 be used for anything that can appear in
8433 \begin_inset Flex Code
8436 \begin_layout Plain Layout
8444 \begin_inset Quotes eld
8448 \begin_inset Flex Code
8451 \begin_layout Plain Layout
8458 \begin_inset Quotes erd
8464 \begin_layout Description
8465 \begin_inset Flex Code
8468 \begin_layout Plain Layout
8474 Adds information to the document preamble.
8476 \begin_inset Newline newline
8480 \begin_inset Quotes eld
8484 \begin_inset Flex Code
8487 \begin_layout Plain Layout
8494 \begin_inset Quotes erd
8500 \begin_layout Description
8501 \begin_inset Flex Code
8504 \begin_layout Plain Layout
8510 Defines formats for use in the display of bibliographic information.
8512 \begin_inset CommandInset ref
8514 reference "subsec:Citation-format-description"
8520 \begin_inset Quotes eld
8524 \begin_inset Flex Code
8527 \begin_layout Plain Layout
8534 \begin_inset Quotes erd
8540 \begin_layout Description
8541 \begin_inset Flex Code
8544 \begin_layout Plain Layout
8550 Describes various global options supported by the document class.
8552 \begin_inset CommandInset ref
8554 reference "subsec:ClassOptions"
8560 \begin_inset Quotes eld
8564 \begin_inset Flex Code
8567 \begin_layout Plain Layout
8574 \begin_inset Quotes erd
8580 \begin_layout Description
8581 \begin_inset Flex Code
8584 \begin_layout Plain Layout
8591 \begin_inset Flex Code
8594 \begin_layout Plain Layout
8603 \begin_inset space \thinspace{}
8607 \begin_inset Flex Code
8610 \begin_layout Plain Layout
8616 ] Whether the class should
8620 to having one or two columns.
8621 Can be changed in the
8622 \begin_inset Flex Noun
8625 \begin_layout Plain Layout
8626 Document\SpecialChar menuseparator
8635 \begin_layout Description
8636 \begin_inset Flex Code
8639 \begin_layout Plain Layout
8646 \begin_inset Flex Code
8649 \begin_layout Plain Layout
8655 ] This sequence defines the properties for a counter.
8656 If the counter does not yet exist, it is created; if it does exist, it
8659 \begin_inset Quotes eld
8663 \begin_inset Flex Code
8666 \begin_layout Plain Layout
8673 \begin_inset Quotes erd
8677 \begin_inset Newline newline
8681 \begin_inset CommandInset ref
8683 reference "subsec:Counters"
8687 for details on counters.
8690 \begin_layout Description
8691 \begin_inset Flex Code
8694 \begin_layout Plain Layout
8700 Sets the default font used to display the document.
8702 \begin_inset CommandInset ref
8704 reference "subsec:Font-description"
8708 for how to declare fonts.
8710 \begin_inset Quotes eld
8714 \begin_inset Flex Code
8717 \begin_layout Plain Layout
8724 \begin_inset Quotes erd
8730 \begin_layout Description
8731 \begin_inset Flex Code
8734 \begin_layout Plain Layout
8741 \begin_inset Flex Code
8744 \begin_layout Plain Layout
8750 ] Specifies a module to be included by default with this document class.
8751 The module is specified as filename without the
8752 \begin_inset Flex Code
8755 \begin_layout Plain Layout
8762 The user can still remove the module, but it will be active at the outset.
8763 (This applies only when new files are created, or when this class is chosen
8764 for an existing document.)
8767 \begin_layout Description
8768 \begin_inset Flex Code
8771 \begin_layout Plain Layout
8778 \begin_inset Flex Code
8781 \begin_layout Plain Layout
8787 ] This is the style that will be assigned to new paragraphs, usually
8788 \begin_inset Flex Noun
8791 \begin_layout Plain Layout
8798 This will default to the first defined style if not given, but you are
8799 encouraged to use this directive.
8802 \begin_layout Description
8803 \begin_inset Flex Code
8806 \begin_layout Plain Layout
8813 \begin_inset Flex Code
8816 \begin_layout Plain Layout
8822 ] This tag indicates that the module (which is specified by filename without
8824 \begin_inset Flex Code
8827 \begin_layout Plain Layout
8833 extension) cannot be used with this document class.
8834 This might be used in a journal-specific layout file to prevent, say, the
8836 \begin_inset Flex Code
8839 \begin_layout Plain Layout
8845 module that numbers theorems by section.
8850 be used in a module.
8851 Modules have their own way of excluding other modules (see
8852 \begin_inset CommandInset ref
8854 reference "subsec:Layout-modules"
8861 \begin_layout Description
8862 \begin_inset Flex Code
8865 \begin_layout Plain Layout
8871 Defines a new float.
8873 \begin_inset CommandInset ref
8875 reference "subsec:Floats"
8881 \begin_inset Quotes eld
8885 \begin_inset Flex Code
8888 \begin_layout Plain Layout
8895 \begin_inset Quotes erd
8901 \begin_layout Description
8902 \begin_inset Flex Code
8905 \begin_layout Plain Layout
8911 Sets the information that will be output in the
8912 \begin_inset Flex Code
8915 \begin_layout Plain Layout
8921 block when this document class is output to XHTML.
8922 Note that this will completely override any prior
8923 \begin_inset Flex Code
8926 \begin_layout Plain Layout
8933 \begin_inset Flex Code
8936 \begin_layout Plain Layout
8944 \begin_inset Newline newline
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8957 if you just want to add material to the preamble.) Must end with
8958 \begin_inset Quotes eld
8962 \begin_inset Flex Code
8965 \begin_layout Plain Layout
8972 \begin_inset Quotes erd
8978 \begin_layout Description
8979 \begin_inset Flex Code
8982 \begin_layout Plain Layout
8989 \begin_inset Flex Code
8992 \begin_layout Plain Layout
8998 ] The style to use for the table of contents, bibliography, and so forth,
8999 when the document is output to HTML.
9000 For articles, this should normally be
9001 \begin_inset Flex Code
9004 \begin_layout Plain Layout
9011 \begin_inset Flex Code
9014 \begin_layout Plain Layout
9021 If it is not given, then \SpecialChar LyX
9022 will attempt to figure out which layout to use.
9025 \begin_layout Description
9026 \begin_inset Flex Code
9029 \begin_layout Plain Layout
9036 \begin_inset Flex Code
9039 \begin_layout Plain Layout
9045 ] Modifies the properties of the given counter.
9046 If the counter does not exist, the statement is ignored.
9048 \begin_inset Quotes eld
9052 \begin_inset Flex Code
9055 \begin_layout Plain Layout
9062 \begin_inset Quotes erd
9066 \begin_inset Newline newline
9070 \begin_inset CommandInset ref
9072 reference "subsec:Counters"
9076 for details on counters.
9079 \begin_layout Description
9080 \begin_inset Flex Code
9083 \begin_layout Plain Layout
9090 \begin_inset Flex Code
9093 \begin_layout Plain Layout
9099 ] This allows you to include another layout definition file within yours
9100 to avoid duplicating commands.
9101 Common examples are the standard layout files, for example,
9102 \begin_inset Flex Code
9105 \begin_layout Plain Layout
9111 , which contains most of the basic layouts.
9114 \begin_layout Description
9115 \begin_inset Flex Code
9118 \begin_layout Plain Layout
9125 \begin_inset Flex Code
9128 \begin_layout Plain Layout
9134 ] This section (re-)defines the layout of an inset.
9135 It can be applied to an existing inset or to a new, user-defined inset,
9136 e.g., a new character style.
9138 \begin_inset Quotes eld
9142 \begin_inset Flex Code
9145 \begin_layout Plain Layout
9152 \begin_inset Quotes erd
9156 \begin_inset Newline newline
9160 \begin_inset CommandInset ref
9162 reference "subsec:Flex-insets-and"
9166 for more information.
9170 \begin_layout Description
9171 \begin_inset Flex Code
9174 \begin_layout Plain Layout
9181 \begin_inset Flex Code
9184 \begin_layout Plain Layout
9190 ] A string that indicates the width of the left margin on the screen, for
9192 \begin_inset Quotes eld
9196 \begin_inset Flex Code
9199 \begin_layout Plain Layout
9206 \begin_inset Quotes erd
9210 (Note that this is not a `length', like
9211 \begin_inset Quotes eld
9215 \begin_inset Quotes erd
9221 \begin_layout Description
9222 \begin_inset Flex Code
9225 \begin_layout Plain Layout
9232 \begin_inset Flex Code
9235 \begin_layout Plain Layout
9241 ] Modifies the properties of the given paragraph style.
9242 If the style does not exist, this section is ignored.
9244 \begin_inset Quotes eld
9248 \begin_inset Flex Code
9251 \begin_layout Plain Layout
9258 \begin_inset Quotes erd
9264 \begin_layout Description
9265 \begin_inset Flex Code
9268 \begin_layout Plain Layout
9275 \begin_inset Flex Code
9278 \begin_layout Plain Layout
9284 ] Deletes an existing counter, usually one defined in an included file.
9287 \begin_layout Description
9288 \begin_inset Flex Code
9291 \begin_layout Plain Layout
9298 \begin_inset Flex Code
9301 \begin_layout Plain Layout
9307 ] Deletes an existing float.
9308 This is particularly useful when you want to suppress a float that has
9309 been defined in an input file.
9312 \begin_layout Description
9313 \begin_inset Flex Code
9316 \begin_layout Plain Layout
9323 \begin_inset Flex Code
9326 \begin_layout Plain Layout
9332 ] Deletes an existing style.
9335 \begin_layout Description
9336 \begin_inset Flex Code
9339 \begin_layout Plain Layout
9346 \begin_inset Flex Code
9349 \begin_layout Plain Layout
9355 ] The file format (as defined in the \SpecialChar LyX
9356 preferences) produced by this document
9358 It is mainly useful when
9359 \begin_inset Flex Code
9362 \begin_layout Plain Layout
9369 \begin_inset Flex Code
9372 \begin_layout Plain Layout
9378 and one wants to define a new type of literate document.
9379 The format is reset to
9380 \begin_inset Quotes eld
9384 \begin_inset Flex Code
9387 \begin_layout Plain Layout
9394 \begin_inset Quotes erd
9398 \begin_inset Quotes eld
9402 \begin_inset Flex Code
9405 \begin_layout Plain Layout
9412 \begin_inset Quotes erd
9415 when the corresponding
9416 \begin_inset Flex Code
9419 \begin_layout Plain Layout
9425 parameter is encountered.
9428 \begin_layout Description
9429 \begin_inset Flex Code
9432 \begin_layout Plain Layout
9439 \begin_inset Flex Code
9442 \begin_layout Plain Layout
9453 \begin_inset Flex Code
9456 \begin_layout Plain Layout
9463 \begin_inset Flex Code
9466 \begin_layout Plain Layout
9472 ] Specifies what sort of output documents using this class will produce.
9475 \begin_layout Description
9476 \begin_inset Flex Code
9479 \begin_layout Plain Layout
9486 \begin_inset Flex Code
9489 \begin_layout Plain Layout
9496 \begin_inset Flex Code
9499 \begin_layout Plain Layout
9505 ] Specifies options, given in the second string, for the package named by
9508 \begin_inset Quotes eld
9512 \begin_inset Flex Code
9515 \begin_layout Plain Layout
9516 PackageOptions natbib square
9522 \begin_inset Quotes erd
9526 \begin_inset Flex Code
9529 \begin_layout Plain Layout
9535 to be loaded with the
9536 \begin_inset Flex Code
9539 \begin_layout Plain Layout
9546 (For \SpecialChar TeX
9547 perts, this causes \SpecialChar LyX
9549 \begin_inset Flex Code
9552 \begin_layout Plain Layout
9555 PassOptionsToPackage{natbib}{square}
9561 \begin_inset Flex Code
9564 \begin_layout Plain Layout
9573 \begin_layout Description
9574 \begin_inset Flex Code
9577 \begin_layout Plain Layout
9584 \begin_inset Flex Code
9587 \begin_layout Plain Layout
9596 \begin_inset Flex Code
9599 \begin_layout Plain Layout
9606 \begin_inset Flex Code
9609 \begin_layout Plain Layout
9615 ] The default pagestyle.
9616 Can be changed in the
9617 \begin_inset Flex Noun
9620 \begin_layout Plain Layout
9621 Document\SpecialChar menuseparator
9630 \begin_layout Description
9631 \begin_inset Flex Code
9634 \begin_layout Plain Layout
9640 Sets the preamble for the \SpecialChar LaTeX
9642 Note that this will completely override any prior
9643 \begin_inset Flex Code
9646 \begin_layout Plain Layout
9653 \begin_inset Flex Code
9656 \begin_layout Plain Layout
9664 \begin_inset Flex Code
9667 \begin_layout Plain Layout
9673 if you just want to add material to the preamble.) Must end with
9674 \begin_inset Quotes eld
9678 \begin_inset Flex Code
9681 \begin_layout Plain Layout
9688 \begin_inset Quotes erd
9694 \begin_layout Description
9695 \begin_inset Flex Code
9698 \begin_layout Plain Layout
9705 \begin_inset Flex Code
9708 \begin_layout Plain Layout
9715 \begin_inset Flex Code
9718 \begin_layout Plain Layout
9727 \begin_inset space \thinspace{}
9731 \begin_inset Flex Code
9734 \begin_layout Plain Layout
9740 ] Whether the class already provides the feature
9741 \begin_inset Flex Code
9744 \begin_layout Plain Layout
9751 A feature is in general the name of a package (e.
9752 \begin_inset space \thinspace{}
9756 \begin_inset space \space{}
9760 \begin_inset Flex Code
9763 \begin_layout Plain Layout
9770 \begin_inset Flex Code
9773 \begin_layout Plain Layout
9780 \begin_inset space \thinspace{}
9784 \begin_inset space \space{}
9788 \begin_inset Flex Code
9791 \begin_layout Plain Layout
9798 \begin_inset Flex Code
9801 \begin_layout Plain Layout
9809 \begin_inset CommandInset ref
9811 reference "chap:List-of-functions"
9815 for the list of features.
9818 \begin_layout Description
9819 \begin_inset Flex Code
9822 \begin_layout Plain Layout
9829 \begin_inset Flex Code
9832 \begin_layout Plain Layout
9838 ] Indicates that this layout provides the functionality of the module mentioned,
9839 which should be specified by the filename without the
9840 \begin_inset Flex Code
9843 \begin_layout Plain Layout
9850 This will typically be used if the layout includes the module directly,
9851 rather than using the
9852 \begin_inset Flex Code
9855 \begin_layout Plain Layout
9861 tag to indicate that it ought to be used.
9862 It could also be used in a module that provided an alternate implementation
9863 of the same functionality.
9866 \begin_layout Description
9867 \begin_inset Flex Code
9870 \begin_layout Plain Layout
9877 \begin_inset Flex Code
9880 \begin_layout Plain Layout
9886 ] Creates a new paragraph style if it does not already exist.
9887 If the style does exist, this section is ignored.
9889 \begin_inset Quotes eld
9893 \begin_inset Flex Code
9896 \begin_layout Plain Layout
9903 \begin_inset Quotes erd
9909 \begin_layout Description
9910 \begin_inset Flex Code
9913 \begin_layout Plain Layout
9920 \begin_inset Flex Code
9923 \begin_layout Plain Layout
9929 ] Whether the class requires the feature
9930 \begin_inset Flex Code
9933 \begin_layout Plain Layout
9940 Multiple features must be separated by commas.
9941 Note that you can only request supported features.
9943 \begin_inset CommandInset ref
9945 reference "chap:List-of-functions"
9949 for the list of features.).
9950 If you require a package with specific options, you can additionally use
9952 \begin_inset Flex Code
9955 \begin_layout Plain Layout
9964 \begin_layout Description
9965 \begin_inset Flex Code
9968 \begin_layout Plain Layout
9975 \begin_inset Flex Code
9978 \begin_layout Plain Layout
9984 ] A string that indicates the width of the right margin on the screen, for
9986 \begin_inset Quotes eld
9990 \begin_inset Flex Code
9993 \begin_layout Plain Layout
10000 \begin_inset Quotes erd
10006 \begin_layout Description
10007 \begin_inset Flex Code
10010 \begin_layout Plain Layout
10017 \begin_inset Flex Code
10020 \begin_layout Plain Layout
10026 ] Sets which divisions get numbered.
10028 \begin_inset Newline newline
10032 \begin_inset Flex Code
10035 \begin_layout Plain Layout
10041 counter in \SpecialChar LaTeX
10045 \begin_layout Description
10046 \begin_inset Flex Code
10049 \begin_layout Plain Layout
10056 \begin_inset Flex Code
10059 \begin_layout Plain Layout
10068 \begin_inset space \thinspace{}
10072 \begin_inset Flex Code
10075 \begin_layout Plain Layout
10081 ] Whether the class-default should be printing on one or both sides of the
10083 Can be changed in the
10084 \begin_inset Flex Noun
10087 \begin_layout Plain Layout
10088 Document\SpecialChar menuseparator
10097 \begin_layout Description
10098 \begin_inset Flex Code
10101 \begin_layout Plain Layout
10108 \begin_inset Flex Code
10111 \begin_layout Plain Layout
10117 ] This sequence defines a paragraph style.
10118 If the style does not yet exist, it is created; if it does exist, its parameter
10121 \begin_inset Quotes eld
10125 \begin_inset Flex Code
10128 \begin_layout Plain Layout
10135 \begin_inset Quotes erd
10139 \begin_inset Newline newline
10143 \begin_inset CommandInset ref
10145 reference "subsec:Paragraph-Styles"
10149 for details on paragraph styles.
10152 \begin_layout Description
10153 \begin_inset Flex Code
10156 \begin_layout Plain Layout
10163 \begin_inset Flex Code
10166 \begin_layout Plain Layout
10172 ] The name of the command or environment to be used with
10173 \begin_inset Flex Code
10176 \begin_layout Plain Layout
10185 \begin_layout Description
10186 \begin_inset Flex Code
10189 \begin_layout Plain Layout
10196 \begin_inset Flex Code
10199 \begin_layout Plain Layout
10208 \begin_inset Flex Code
10211 \begin_layout Plain Layout
10217 ] Indicates what kind of markup is used to define the title of a document.
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10228 means that the macro with name
10229 \begin_inset Flex Code
10232 \begin_layout Plain Layout
10238 will be inserted after the last layout which has
10239 \begin_inset Quotes eld
10243 \begin_inset Flex Code
10246 \begin_layout Plain Layout
10248 \begin_inset space ~
10257 \begin_inset Quotes erd
10262 \begin_inset Flex Code
10265 \begin_layout Plain Layout
10271 corresponds to the case where all layouts which have
10272 \begin_inset Quotes eld
10276 \begin_inset Flex Code
10279 \begin_layout Plain Layout
10281 \begin_inset space ~
10290 \begin_inset Quotes erd
10293 should be enclosed into the
10294 \begin_inset Flex Code
10297 \begin_layout Plain Layout
10306 \begin_layout Description
10307 \begin_inset Flex Code
10310 \begin_layout Plain Layout
10317 \begin_inset Flex Code
10320 \begin_layout Plain Layout
10326 ] Sets which divisions are included in the table of contents.
10328 \begin_inset Flex Code
10331 \begin_layout Plain Layout
10337 counter in \SpecialChar LaTeX
10341 \begin_layout Subsection
10342 \begin_inset Flex Code
10345 \begin_layout Plain Layout
10352 \begin_inset CommandInset label
10354 name "subsec:ClassOptions"
10361 \begin_layout Standard
10363 \begin_inset Flex Code
10366 \begin_layout Plain Layout
10372 section can contain the following entries:
10375 \begin_layout Description
10376 \begin_inset Flex Code
10379 \begin_layout Plain Layout
10386 \begin_inset Flex Code
10389 \begin_layout Plain Layout
10395 ] The list of available font sizes for the document's main font, separated
10397 \begin_inset Quotes eld
10401 \begin_inset Flex Code
10404 \begin_layout Plain Layout
10411 \begin_inset Quotes erd
10417 \begin_layout Description
10418 \begin_inset Flex Code
10421 \begin_layout Plain Layout
10427 Used to set the DTD line with XML-based output classes.
10429 \begin_inset space \thinspace{}
10433 \begin_inset Quotes eld
10436 -//OASIS//DTD DocBook V4.2//EN
10437 \begin_inset Quotes erd
10443 \begin_layout Description
10444 \begin_inset Flex Code
10447 \begin_layout Plain Layout
10454 \begin_inset Flex Code
10457 \begin_layout Plain Layout
10458 string="empty|plain|headings|fancy"
10463 ] The list of available page sty\SpecialChar softhyphen
10465 \begin_inset Quotes eld
10469 \begin_inset Flex Code
10472 \begin_layout Plain Layout
10479 \begin_inset Quotes erd
10485 \begin_layout Description
10486 \begin_inset Flex Code
10489 \begin_layout Plain Layout
10496 \begin_inset Flex Code
10499 \begin_layout Plain Layout
10505 ] Some document class options, separated by a comma, that will be added
10506 to the optional part of the
10507 \begin_inset Flex Code
10510 \begin_layout Plain Layout
10521 \begin_layout Standard
10523 \begin_inset Flex Code
10526 \begin_layout Plain Layout
10532 section must end with
10533 \begin_inset Quotes eld
10537 \begin_inset Flex Code
10540 \begin_layout Plain Layout
10547 \begin_inset Quotes erd
10553 \begin_layout Subsection
10555 \begin_inset CommandInset label
10557 name "subsec:Paragraph-Styles"
10564 \begin_layout Standard
10565 A paragraph style description looks like this:
10569 \begin_layout Plain Layout
10570 Note that this will either define a new style or modify an existing one.
10578 \begin_layout LyX-Code
10585 \begin_layout LyX-Code
10589 \begin_layout LyX-Code
10593 \begin_layout Standard
10594 where the following commands are allowed:
10597 \begin_layout Description
10598 \begin_inset Flex Code
10601 \begin_layout Plain Layout
10608 \begin_inset Flex Code
10611 \begin_layout Plain Layout
10616 , left, right, center
10621 ] Paragraph alignment.
10624 \begin_layout Description
10625 \begin_inset Flex Code
10628 \begin_layout Plain Layout
10635 \begin_inset Flex Code
10638 \begin_layout Plain Layout
10643 , left, right, center
10648 ] A comma separated list of permitted alignments.
10649 (Some \SpecialChar LaTeX
10650 styles prohibit certain alignments, since those wouldn't make sense.
10651 For example a right-aligned or centered enumeration isn't possible.)
10654 \begin_layout Description
10655 \begin_inset Flex Code
10658 \begin_layout Plain Layout
10665 \begin_inset Flex Code
10668 \begin_layout Plain Layout
10674 ] Defines argument number <int> of a command\SpecialChar breakableslash
10675 environment associated with
10677 This is useful for things like section headings, and only makes sense with
10680 Every (optional or required) argument of a command or environment – except
10681 for the required argument that is associated with the content of the paragraph
10682 itself – has a separate definition, where the number specifies the order
10684 The definition must end with
10685 \begin_inset Flex Code
10688 \begin_layout Plain Layout
10695 So a command with two optional arguments has:
10696 \begin_inset Separator parbreak
10703 \begin_layout Quote
10709 \begin_layout Quote
10715 \begin_layout Quote
10721 \begin_layout Quote
10727 \begin_layout Quote
10733 \begin_layout Quote
10739 \begin_layout Standard
10741 \begin_inset Flex Code
10744 \begin_layout Plain Layout
10750 definition, the following specifications are possible:
10753 \begin_layout Itemize
10754 \begin_inset Flex Code
10757 \begin_layout Plain Layout
10764 \begin_inset Flex Code
10767 \begin_layout Plain Layout
10773 The string that will appear both in the menu (to insert this argument)
10774 and on the argument inset button (unless you also specify a separate
10775 \begin_inset Flex Code
10778 \begin_layout Plain Layout
10785 For the menu, you can define an accelerator by appending the respective
10786 character to the string, divided by
10787 \begin_inset Quotes eld
10791 \begin_inset Quotes erd
10795 \begin_inset space \thinspace{}
10799 \begin_inset space \space{}
10803 \begin_inset Quotes eld
10807 \begin_inset Flex Code
10810 \begin_layout Plain Layout
10817 \begin_inset Quotes erd
10823 \begin_layout Itemize
10824 \begin_inset Flex Code
10827 \begin_layout Plain Layout
10834 \begin_inset Flex Code
10837 \begin_layout Plain Layout
10843 A separate string for the menu.
10844 You can define an accelerator by appending the respective character to
10845 the string, divided by
10846 \begin_inset Quotes eld
10850 \begin_inset Quotes erd
10854 \begin_inset space \thinspace{}
10858 \begin_inset space \space{}
10862 \begin_inset Quotes eld
10866 \begin_inset Flex Code
10869 \begin_layout Plain Layout
10876 \begin_inset Quotes erd
10880 This specification is optional.
10881 If it is not given the
10882 \begin_inset Flex Code
10885 \begin_layout Plain Layout
10891 will be used instead for the menu.
10894 \begin_layout Itemize
10895 \begin_inset Flex Code
10898 \begin_layout Plain Layout
10905 \begin_inset Flex Code
10908 \begin_layout Plain Layout
10914 A longer explanatory text that appears in the tooltip when hovering over
10915 the argument inset.
10918 \begin_layout Itemize
10919 \begin_inset Flex Code
10922 \begin_layout Plain Layout
10929 \begin_inset Flex Code
10932 \begin_layout Plain Layout
10941 \begin_inset space \thinspace{}
10945 \begin_inset Flex Code
10948 \begin_layout Plain Layout
10954 ] Declare if this is a mandatory (1) or an optional (0) argument.
10955 Mandatory arguments will be output empty if not given, while optional arguments
10956 will not be output at all.
10957 By default, mandatory arguments are delimited by
10958 \begin_inset Flex Code
10961 \begin_layout Plain Layout
10967 , while optional arguments are delimited by
10968 \begin_inset Flex Code
10971 \begin_layout Plain Layout
10980 \begin_layout Itemize
10981 \begin_inset Flex Code
10984 \begin_layout Plain Layout
10991 \begin_inset Flex Code
10994 \begin_layout Plain Layout
11000 defines another argument (by its number) which this argument requires to
11001 be output if it is itself output.
11003 \begin_inset space \thinspace{}
11006 g., in \SpecialChar LaTeX
11007 commands, optional arguments often require previous optional arguments
11008 to be output (at least empty), as in
11009 \begin_inset Flex Code
11012 \begin_layout Plain Layout
11015 command[][argument]{text}
11021 This can be achieved by the statement
11022 \begin_inset Flex Code
11025 \begin_layout Plain Layout
11032 \begin_inset Flex Code
11035 \begin_layout Plain Layout
11044 \begin_layout Itemize
11045 \begin_inset Flex Code
11048 \begin_layout Plain Layout
11055 \begin_inset Flex Code
11058 \begin_layout Plain Layout
11064 defines a custom left delimiter (instead of
11065 \begin_inset Flex Code
11068 \begin_layout Plain Layout
11075 \begin_inset Flex Code
11078 \begin_layout Plain Layout
11085 A line break in the output can be indicated by
11086 \begin_inset Flex Code
11089 \begin_layout Plain Layout
11098 \begin_layout Itemize
11099 \begin_inset Flex Code
11102 \begin_layout Plain Layout
11109 \begin_inset Flex Code
11112 \begin_layout Plain Layout
11118 defines a custom right delimiter (instead of
11119 \begin_inset Flex Code
11122 \begin_layout Plain Layout
11129 \begin_inset Flex Code
11132 \begin_layout Plain Layout
11139 A line break in the output can be indicated by
11140 \begin_inset Flex Code
11143 \begin_layout Plain Layout
11152 \begin_layout Itemize
11153 \begin_inset Flex Code
11156 \begin_layout Plain Layout
11163 \begin_inset Flex Code
11166 \begin_layout Plain Layout
11172 defines an argument that is inserted if and only if no user-specified arguments
11174 \begin_inset space \thinspace{}
11178 \begin_inset space \space{}
11181 if no argument inset has been inserted (note that also an empty argument
11182 inset omits the DefaultArg).
11183 Multiple arguments need to be separated by comma.
11186 \begin_layout Itemize
11187 \begin_inset Flex Code
11190 \begin_layout Plain Layout
11197 \begin_inset Flex Code
11200 \begin_layout Plain Layout
11206 defines an argument that is inserted in any case (alone or in addition
11207 to user-specified arguments).
11208 Multiple arguments need to be separated by comma.
11211 \begin_layout Itemize
11212 \begin_inset Flex Code
11215 \begin_layout Plain Layout
11221 The font used for the argument content, see
11222 \begin_inset CommandInset ref
11224 reference "subsec:Font-description"
11231 \begin_layout Itemize
11232 \begin_inset Flex Code
11235 \begin_layout Plain Layout
11241 The font used for the label; see
11242 \begin_inset CommandInset ref
11244 reference "subsec:Font-description"
11251 \begin_layout Itemize
11252 \begin_inset Flex Code
11255 \begin_layout Plain Layout
11262 \begin_inset Flex Code
11265 \begin_layout Plain Layout
11270 , Minimalistic, Conglomerate
11275 ] describes the rendering style used for the inset's frame and buttons.
11278 \begin_layout Itemize
11279 \begin_inset Flex Code
11282 \begin_layout Plain Layout
11289 \begin_inset Flex Code
11292 \begin_layout Plain Layout
11299 \begin_inset Flex Code
11302 \begin_layout Plain Layout
11308 , this argument is automatically inserted when the respective style is selected.
11309 Currently, only one argument per style\SpecialChar breakableslash
11310 layout can be automatically inserted.
11313 \begin_layout Itemize
11314 \begin_inset Flex Code
11317 \begin_layout Plain Layout
11324 \begin_inset Flex Code
11327 \begin_layout Plain Layout
11334 \begin_inset Flex Code
11337 \begin_layout Plain Layout
11343 , this argument will be inserted with a copy of the co-text (either selected
11344 text or the whole paragraph) as content.
11347 \begin_layout Itemize
11348 \begin_inset Flex Code
11351 \begin_layout Plain Layout
11358 \begin_inset Flex Code
11361 \begin_layout Plain Layout
11362 string of characters
11371 Defines individual characters that should be output in raw form, meaning
11372 without special translations that \SpecialChar LaTeX
11374 Note that, contrary to PassThru, this needs to be explicitly defined for
11376 That is, arguments do not inherit PassThruChars from their parent inset
11380 \begin_layout Standard
11381 By default, the text entered in the \SpecialChar LyX
11382 workarea in the respective layout is
11383 the last (mandatory) argument of a command if the
11384 \begin_inset Flex Code
11387 \begin_layout Plain Layout
11394 \begin_inset Flex Code
11397 \begin_layout Plain Layout
11404 However, arguments with the prefix
11405 \begin_inset Flex Code
11408 \begin_layout Plain Layout
11414 are output after this workarea argument.
11415 Note that post-argument numbering restarts at 1, so the first argument
11416 following the workarea argument is
11417 \begin_inset Flex Code
11420 \begin_layout Plain Layout
11427 Post-arguments are ignored in any other
11428 \begin_inset Flex Code
11431 \begin_layout Plain Layout
11438 \begin_inset Flex Code
11441 \begin_layout Plain Layout
11450 \begin_layout Standard
11452 \begin_inset Flex Code
11455 \begin_layout Plain Layout
11464 \begin_inset Flex Code
11467 \begin_layout Plain Layout
11476 \begin_inset Flex Code
11479 \begin_layout Plain Layout
11485 followed by the number (e.
11486 \begin_inset space \thinspace{}
11490 \begin_inset space \space{}
11494 \begin_inset Flex Code
11497 \begin_layout Plain Layout
11507 \begin_layout Description
11508 \begin_inset Flex Code
11511 \begin_layout Plain Layout
11517 Note that this will completely override any prior
11518 \begin_inset Flex Code
11521 \begin_layout Plain Layout
11527 declaration for this style.
11529 \begin_inset Quotes eld
11533 \begin_inset Flex Code
11536 \begin_layout Plain Layout
11543 \begin_inset Quotes erd
11548 \begin_inset CommandInset ref
11550 reference "subsec:I18n"
11554 for details on its use.
11557 \begin_layout Description
11558 \begin_inset Flex Code
11561 \begin_layout Plain Layout
11568 \begin_inset Flex Code
11571 \begin_layout Plain Layout
11581 \begin_layout Plain Layout
11582 Note that a `float' here is a real number, such as: 1.5.
11587 The vertical space with which the last of a chain of paragraphs with this
11588 style is separated from the following paragraph.
11589 If the next paragraph has another style, the separations are not simply
11590 added, but the maximum is taken.
11593 \begin_layout Description
11594 \begin_inset Flex Code
11597 \begin_layout Plain Layout
11604 \begin_inset Flex Code
11607 \begin_layout Plain Layout
11613 ] The category for this style.
11614 This is used to group related styles in the style combobox on the toolbar.
11615 Any string can be used, but you may want to use existing categories with
11620 \begin_layout Description
11621 \begin_inset Flex Code
11624 \begin_layout Plain Layout
11630 Depth of XML command.
11631 Used only with XML-type formats.
11634 \begin_layout Description
11635 \begin_inset Flex Code
11638 \begin_layout Plain Layout
11645 \begin_inset Flex Code
11648 \begin_layout Plain Layout
11654 ] Copies all the features of an existing style into the current one.
11658 \begin_layout Description
11659 \begin_inset Flex Code
11662 \begin_layout Plain Layout
11669 \begin_inset Flex Code
11672 \begin_layout Plain Layout
11678 ] The name of a style whose preamble should be output
11683 This allows to ensure some ordering of the preamble snippets when macros
11684 definitions depend on one another.
11688 \begin_layout Plain Layout
11689 Note that, besides that functionality, there is no way to ensure any ordering
11691 The ordering that you see in a given version of \SpecialChar LyX
11692 may change without warning
11701 \begin_layout Description
11702 \begin_inset Flex Code
11705 \begin_layout Plain Layout
11712 \begin_inset Flex Code
11715 \begin_layout Plain Layout
11720 , Box, Filled_Box, Static
11725 ] The type of label that stands at the end of the paragraph (or sequence
11727 \begin_inset Flex Code
11730 \begin_layout Plain Layout
11737 \begin_inset Newline newline
11741 \begin_inset Flex Code
11744 \begin_layout Plain Layout
11751 \begin_inset Flex Code
11754 \begin_layout Plain Layout
11761 \begin_inset Flex Code
11764 \begin_layout Plain Layout
11772 \begin_inset Flex Code
11775 \begin_layout Plain Layout
11782 \begin_inset Quotes eld
11786 \begin_inset Quotes erd
11790 \begin_inset Flex Code
11793 \begin_layout Plain Layout
11800 \begin_inset space \space{}
11804 \begin_inset Flex Code
11807 \begin_layout Plain Layout
11813 ) is a white (resp.
11814 \begin_inset space ~
11817 black) square suitable for end of proof markers,
11818 \begin_inset Flex Code
11821 \begin_layout Plain Layout
11827 is an explicit text string.
11830 \begin_layout Description
11831 \begin_inset Flex Code
11834 \begin_layout Plain Layout
11841 \begin_inset Flex Code
11844 \begin_layout Plain Layout
11850 ] The string used for a label with a
11851 \begin_inset Flex Code
11854 \begin_layout Plain Layout
11861 \begin_inset Newline newline
11865 \begin_inset Flex Code
11868 \begin_layout Plain Layout
11878 \begin_layout Description
11879 \begin_inset Flex Code
11882 \begin_layout Plain Layout
11888 The font used for both the text body
11894 \begin_inset CommandInset ref
11896 reference "subsec:Font-description"
11901 Note that defining this font automatically defines the
11902 \begin_inset Flex Code
11905 \begin_layout Plain Layout
11912 So you should define this one first if you also want to define
11913 \begin_inset Flex Code
11916 \begin_layout Plain Layout
11925 \begin_layout Description
11926 \begin_inset Flex Code
11929 \begin_layout Plain Layout
11936 \begin_inset Flex Code
11939 \begin_layout Plain Layout
11945 ] Used for backporting new styles to stable \SpecialChar LyX
11947 The first stable version that supports this tag is \SpecialChar LyX
11949 The argument is a number which may either be 0, -1 or any value greater
11952 \begin_inset Flex Code
11955 \begin_layout Plain Layout
11961 flag of a style is greater than zero, it will always be written to the
11963 If a .lyx file is read, the style definitions from the document header are
11964 added to the document class.
11965 Therefore even older \SpecialChar LyX
11966 versions can handle the style.
11968 \begin_inset Flex Code
11971 \begin_layout Plain Layout
11977 is a version number: If the style is read, and the version number is less
11978 than the version number of the already existing style in the document class,
11979 the new style is ignored.
11980 If the version number is greater, the new style replaces the existing style.
11981 A value of -1 means an infinite version number, i.
11982 \begin_inset space \thinspace{}
11986 \begin_inset space \space{}
11989 the style is always used.
11992 \begin_layout Description
11993 \begin_inset Flex Code
11996 \begin_layout Plain Layout
12003 \begin_inset Flex Code
12006 \begin_layout Plain Layout
12015 \begin_inset space \thinspace{}
12019 \begin_inset Flex Code
12022 \begin_layout Plain Layout
12028 ] Usually \SpecialChar LyX
12029 does not allow you to insert more than one space between words,
12030 since a space is considered as the separation between two words, not a
12031 character or symbol of its own.
12032 This is a very fine thing but sometimes annoying, for example, when typing
12033 program code or plain \SpecialChar LaTeX
12036 \begin_inset Flex Code
12039 \begin_layout Plain Layout
12046 Note that \SpecialChar LyX
12047 will create protected blanks for the additional blanks when
12048 in another mode than \SpecialChar LaTeX
12052 \begin_layout Description
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12062 These tags are used with XHTML output.
12064 \begin_inset CommandInset ref
12066 reference "subsec:Paragraph-Style-XHTML"
12073 \begin_layout Description
12074 \begin_inset Flex Code
12077 \begin_layout Plain Layout
12083 [FIXME] (Used only with XML-type formats.)
12086 \begin_layout Description
12087 \begin_inset Flex Code
12090 \begin_layout Plain Layout
12097 \begin_inset Flex Code
12100 \begin_layout Plain Layout
12109 \begin_inset space \thinspace{}
12113 \begin_inset Flex Code
12116 \begin_layout Plain Layout
12123 \begin_inset Flex Code
12126 \begin_layout Plain Layout
12132 , marks the style as to be included in the document preamble and not in
12134 This is useful for document classes that want such information as the title
12135 and author to appear in the preamble.
12136 Note that this works only for styles for which the
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12147 \begin_inset Flex Code
12150 \begin_layout Plain Layout
12157 \begin_inset Flex Code
12160 \begin_layout Plain Layout
12169 \begin_layout Description
12170 \begin_inset Flex Code
12173 \begin_layout Plain Layout
12180 \begin_inset Flex Code
12183 \begin_layout Plain Layout
12192 \begin_inset space \thinspace{}
12196 \begin_inset Flex Code
12199 \begin_layout Plain Layout
12206 \begin_inset Flex Code
12209 \begin_layout Plain Layout
12215 , marks the style as being part of a title block (see also the
12216 \begin_inset Flex Code
12219 \begin_layout Plain Layout
12226 \begin_inset Flex Code
12229 \begin_layout Plain Layout
12238 \begin_layout Description
12239 \begin_inset Flex Code
12242 \begin_layout Plain Layout
12249 \begin_inset Flex Code
12252 \begin_layout Plain Layout
12258 ] The \SpecialChar LaTeX
12259 command sequence declaring an item in a list.
12260 The command is to be defined without the preceding backslash (the default
12262 \begin_inset Quotes eld
12266 \begin_inset Quotes erd
12270 \begin_inset Flex Code
12273 \begin_layout Plain Layout
12281 in the \SpecialChar LaTeX
12285 \begin_layout Description
12286 \begin_inset Flex Code
12289 \begin_layout Plain Layout
12296 \begin_inset Flex Code
12299 \begin_layout Plain Layout
12305 ] This provides extra space between paragraphs that have the same style.
12306 If you put other styles into an environment, each is separated with the
12308 \begin_inset Flex Code
12311 \begin_layout Plain Layout
12318 But the whole items of the environment are additionally separated with
12320 \begin_inset Flex Code
12323 \begin_layout Plain Layout
12330 Note that this is a
12335 \begin_layout Description
12336 \begin_inset Flex Code
12339 \begin_layout Plain Layout
12345 [FIXME] (Used only with XML-type formats.)
12348 \begin_layout Description
12349 \begin_inset Flex Code
12352 \begin_layout Plain Layout
12359 \begin_inset Flex Code
12362 \begin_layout Plain Layout
12371 \begin_inset space \thinspace{}
12375 \begin_inset Flex Code
12378 \begin_layout Plain Layout
12384 ] Usually \SpecialChar LyX
12385 does not allow you to leave a paragraph empty, since it would
12386 lead to empty \SpecialChar LaTeX
12388 There are some cases where this could be desirable however: in a letter
12389 template, the required fields can be provided as empty fields, so that
12390 people do not forget them; in some special classes, a style can be used
12391 as some kind of break, which does not contain actual text.
12394 \begin_layout Description
12395 \begin_inset Flex Code
12398 \begin_layout Plain Layout
12405 \begin_inset Flex Code
12408 \begin_layout Plain Layout
12414 ] The vertical space between the label and the text body.
12415 Only used for labels that are above the text body (
12416 \begin_inset Flex Code
12419 \begin_layout Plain Layout
12426 \begin_inset Newline newline
12430 \begin_inset Flex Code
12433 \begin_layout Plain Layout
12434 Centered_Top_Environment
12442 \begin_layout Description
12443 \begin_inset Flex Code
12446 \begin_layout Plain Layout
12453 \begin_inset Flex Code
12456 \begin_layout Plain Layout
12462 ] The name of the counter for automatic numbering.
12463 In order to have the counter appear with your label, you will need to reference
12465 \begin_inset Flex Code
12468 \begin_layout Plain Layout
12477 This will work with
12478 \begin_inset Flex Code
12481 \begin_layout Plain Layout
12488 \begin_inset Flex Code
12491 \begin_layout Plain Layout
12498 \begin_inset Flex Code
12501 \begin_layout Plain Layout
12508 \begin_inset Flex Code
12511 \begin_layout Plain Layout
12518 \begin_inset Newline newline
12526 \begin_inset Flex Code
12529 \begin_layout Plain Layout
12536 \begin_inset Flex Code
12539 \begin_layout Plain Layout
12545 , though this case is a bit complicated.
12546 Suppose you declare
12547 \begin_inset Quotes eld
12551 \begin_inset Flex Code
12554 \begin_layout Plain Layout
12555 LabelCounter myenum
12561 \begin_inset Quotes erd
12565 Then the actual counters used are
12566 \begin_inset Flex Code
12569 \begin_layout Plain Layout
12576 \begin_inset Flex Code
12579 \begin_layout Plain Layout
12586 \begin_inset Flex Code
12589 \begin_layout Plain Layout
12596 \begin_inset Flex Code
12599 \begin_layout Plain Layout
12605 , much as in \SpecialChar LaTeX
12607 These counters must all be declared separately.
12608 \begin_inset Newline newline
12612 \begin_inset CommandInset ref
12614 reference "subsec:Counters"
12618 for details on counters.
12621 \begin_layout Description
12622 \begin_inset Flex Code
12625 \begin_layout Plain Layout
12631 The font used for the label.
12633 \begin_inset CommandInset ref
12635 reference "subsec:Font-description"
12642 \begin_layout Description
12643 \begin_inset Flex Code
12646 \begin_layout Plain Layout
12653 \begin_inset Flex Code
12656 \begin_layout Plain Layout
12662 ] Text that indicates how far a label should be indented.
12665 \begin_layout Description
12666 \begin_inset Flex Code
12669 \begin_layout Plain Layout
12676 \begin_inset Flex Code
12679 \begin_layout Plain Layout
12685 ] Text that indicates the amount of horizontal space between the label and
12687 Only used for labels that are not above the text body.
12690 \begin_layout Description
12691 \begin_inset Flex Code
12694 \begin_layout Plain Layout
12701 \begin_inset Flex Code
12704 \begin_layout Plain Layout
12710 ] The string used for the label.
12712 \begin_inset Flex Code
12715 \begin_layout Plain Layout
12721 is set, this string can be contain the special formatting commands described
12723 \begin_inset CommandInset ref
12725 reference "subsec:Counters"
12732 \begin_layout Description
12733 \begin_inset Flex Code
12736 \begin_layout Plain Layout
12737 LabelStringAppendix
12743 \begin_inset Flex Code
12746 \begin_layout Plain Layout
12752 ] This is used inside the appendix instead of
12753 \begin_inset Newline newline
12757 \begin_inset Flex Code
12760 \begin_layout Plain Layout
12768 \begin_inset Flex Code
12771 \begin_layout Plain Layout
12778 \begin_inset Newline newline
12782 \begin_inset Flex Code
12785 \begin_layout Plain Layout
12786 LabelStringAppendix
12794 \begin_layout Description
12795 \begin_inset Flex Code
12798 \begin_layout Plain Layout
12804 [FIXME] (Used only with XML-type formats.)
12807 \begin_layout Description
12808 \begin_inset Flex Code
12811 \begin_layout Plain Layout
12818 \begin_inset Flex Code
12821 \begin_layout Plain Layout
12826 , Manual, Static, Above,
12827 \begin_inset Newline newline
12830 Centered, Sensitive, Enumerate,
12831 \begin_inset Newline newline
12834 Itemize, Bibliography
12840 \begin_inset Separator parbreak
12847 \begin_layout Description
12848 \begin_inset Flex Code
12851 \begin_layout Plain Layout
12857 means the label is the very first word (up to the first real blank).
12858 Use protected spaces if you want more than one word as the label.
12862 \begin_layout Description
12863 \begin_inset Flex Code
12866 \begin_layout Plain Layout
12872 means the label is simply what is declared as
12873 \begin_inset Flex Code
12876 \begin_layout Plain Layout
12883 This will be displayed
12884 \begin_inset Quotes eld
12888 \begin_inset Quotes erd
12891 , at the beginning of the paragraph.
12893 \begin_inset Flex Code
12896 \begin_layout Plain Layout
12903 \begin_inset Flex Code
12906 \begin_layout Plain Layout
12912 , then it will be displayed only in the first paragraph of any sequence
12913 of paragraphs with the same
12914 \begin_inset Flex Code
12917 \begin_layout Plain Layout
12926 \begin_layout Description
12927 \begin_inset Flex Code
12930 \begin_layout Plain Layout
12937 \begin_inset space ~
12941 \begin_inset space ~
12945 \begin_inset Flex Code
12948 \begin_layout Plain Layout
12954 are special cases of
12955 \begin_inset Flex Code
12958 \begin_layout Plain Layout
12965 The label will be printed above the paragraph either at the beginning of
12966 the line or centered.
12969 \begin_layout Description
12970 \begin_inset Flex Code
12973 \begin_layout Plain Layout
12979 is a special case for the caption-labels
12980 \begin_inset Quotes eld
12984 \begin_inset Quotes erd
12988 \begin_inset Quotes eld
12992 \begin_inset Quotes erd
12996 \begin_inset Newline newline
13000 \begin_inset Flex Code
13003 \begin_layout Plain Layout
13009 means the (hardcoded) label string depends on the kind of float: It is
13010 hardcoded to be `FloatType N', where N is the value of the counter associated
13012 For the case that a caption is inserted outside of a float the
13013 \begin_inset Flex Code
13016 \begin_layout Plain Layout
13023 \begin_inset Quotes eld
13027 \begin_inset Quotes erd
13033 \begin_layout Description
13034 \begin_inset Flex Code
13037 \begin_layout Plain Layout
13043 produces the usual sort of enumeration labels.
13044 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13045 small Roman numerals, and uppercase letters for the four possible depths.
13048 \begin_layout Description
13049 \begin_inset Flex Code
13052 \begin_layout Plain Layout
13058 produces various bullets at the different levels.
13059 It is also hardcoded.
13062 \begin_layout Description
13063 \begin_inset Flex Code
13066 \begin_layout Plain Layout
13072 should be used only with
13073 \begin_inset Flex Code
13076 \begin_layout Plain Layout
13077 LatexType BibEnvironment
13086 \begin_layout Description
13087 \begin_inset Flex Code
13090 \begin_layout Plain Layout
13096 Note that this will completely override any prior
13097 \begin_inset Flex Code
13100 \begin_layout Plain Layout
13106 declaration for this style.
13108 \begin_inset Quotes eld
13112 \begin_inset Flex Code
13115 \begin_layout Plain Layout
13122 \begin_inset Quotes erd
13127 \begin_inset CommandInset ref
13129 reference "subsec:I18n"
13133 for details on its use.
13136 \begin_layout Description
13137 \begin_inset Flex Code
13140 \begin_layout Plain Layout
13147 \begin_inset Flex Code
13150 \begin_layout Plain Layout
13156 ] The name of the corresponding \SpecialChar LaTeX
13158 Either the environment or command name.
13161 \begin_layout Description
13162 \begin_inset Flex Code
13165 \begin_layout Plain Layout
13172 \begin_inset Flex Code
13175 \begin_layout Plain Layout
13181 ] An optional parameter for the corresponding
13182 \begin_inset Flex Code
13185 \begin_layout Plain Layout
13192 This parameter cannot be changed from within \SpecialChar LyX
13194 \begin_inset Flex Code
13197 \begin_layout Plain Layout
13203 for customizable parameters).
13204 This will be output as is after all \SpecialChar LaTeX
13206 \begin_inset Flex Code
13209 \begin_layout Plain Layout
13218 \begin_layout Description
13219 \begin_inset Flex Code
13222 \begin_layout Plain Layout
13229 \begin_inset Flex Code
13232 \begin_layout Plain Layout
13237 , Command, Environment, Item_Environment,
13238 \begin_inset Newline newline
13241 List_Environment, Bib_Environment
13246 ] How the style should be translated into \SpecialChar LaTeX
13251 \begin_layout Plain Layout
13252 \begin_inset Flex Code
13255 \begin_layout Plain Layout
13261 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13262 Visit the SGML class files for specific examples.
13268 \begin_inset Separator parbreak
13275 \begin_layout Description
13276 \begin_inset Flex Code
13279 \begin_layout Plain Layout
13285 means nothing special.
13288 \begin_layout Description
13289 \begin_inset Flex Code
13292 \begin_layout Plain Layout
13299 \begin_inset Flex Code
13302 \begin_layout Plain Layout
13309 {\SpecialChar ldots
13318 \begin_layout Description
13319 \begin_inset Flex Code
13322 \begin_layout Plain Layout
13329 \begin_inset Flex Code
13332 \begin_layout Plain Layout
13339 }\SpecialChar ldots
13355 \begin_layout Description
13356 \begin_inset Flex Code
13359 \begin_layout Plain Layout
13366 \begin_inset Flex Code
13369 \begin_layout Plain Layout
13376 \begin_inset Flex Code
13379 \begin_layout Plain Layout
13387 is generated for each paragraph of this environment.
13391 \begin_layout Description
13392 \begin_inset Flex Code
13395 \begin_layout Plain Layout
13402 \begin_inset Flex Code
13405 \begin_layout Plain Layout
13412 \begin_inset Newline newline
13416 \begin_inset Flex Code
13419 \begin_layout Plain Layout
13425 is passed as an argument to the environment.
13426 \begin_inset Newline newline
13430 \begin_inset Flex Code
13433 \begin_layout Plain Layout
13439 can be defined in the
13440 \begin_inset Flex Noun
13443 \begin_layout Plain Layout
13444 Edit\SpecialChar menuseparator
13446 \begin_inset space ~
13457 \begin_layout Description
13458 \begin_inset Flex Code
13461 \begin_layout Plain Layout
13468 \begin_inset Flex Code
13471 \begin_layout Plain Layout
13477 but adds additionally the necessary mandatory argument (the longest label)
13478 to the begin statement of the bibliography environment:
13479 \begin_inset Newline newline
13483 \begin_inset Flex Code
13486 \begin_layout Plain Layout
13489 begin{thebibliography}{99}
13494 It is therefore only useful for bibliography environments.
13495 The default longest label
13496 \begin_inset Quotes eld
13500 \begin_inset Quotes erd
13503 can be changed by the user in the paragraph settings of a bibliography
13507 \begin_layout Standard
13508 Putting the last few things together, the \SpecialChar LaTeX
13509 output will be either:
13512 \begin_layout LyX-Code
13515 LatexName[LatexParam]{\SpecialChar ldots
13519 \begin_layout Standard
13523 \begin_layout LyX-Code
13526 begin{LatexName}[LatexParam] \SpecialChar ldots
13532 \begin_layout Standard
13533 depending upon the \SpecialChar LaTeX
13538 \begin_layout Description
13539 \begin_inset Flex Code
13542 \begin_layout Plain Layout
13549 \begin_inset Flex Code
13552 \begin_layout Plain Layout
13558 ] A string that is put at the beginning of the style content.
13559 A line break in the output can be indicated by
13560 \begin_inset Flex Code
13563 \begin_layout Plain Layout
13572 \begin_layout Description
13573 \begin_inset Flex Code
13576 \begin_layout Plain Layout
13583 \begin_inset Flex Code
13586 \begin_layout Plain Layout
13592 ] If you put styles into environments, the different
13593 \begin_inset Flex Code
13596 \begin_layout Plain Layout
13602 are not simply added, but added with a factor
13603 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13607 Note that this parameter is also used when
13608 \begin_inset Flex Code
13611 \begin_layout Plain Layout
13618 \begin_inset Flex Code
13621 \begin_layout Plain Layout
13628 \begin_inset Flex Code
13631 \begin_layout Plain Layout
13638 Then it is added to the manual or dynamic margin.
13639 \begin_inset Newline newline
13643 \begin_inset Quotes eld
13647 \begin_inset Flex Code
13650 \begin_layout Plain Layout
13657 \begin_inset Quotes erd
13660 means that the paragraph is indented with the width of
13661 \begin_inset Quotes eld
13665 \begin_inset Flex Code
13668 \begin_layout Plain Layout
13675 \begin_inset Quotes erd
13678 in the normal font.
13679 You can get a negative width by prefixing the string with
13680 \begin_inset Quotes eld
13684 \begin_inset Flex Code
13687 \begin_layout Plain Layout
13694 \begin_inset Quotes erd
13698 This way was chosen so that the look is the same with each used screen
13702 \begin_layout Description
13703 \begin_inset Flex Code
13706 \begin_layout Plain Layout
13713 \begin_inset Flex Code
13716 \begin_layout Plain Layout
13721 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13727 \begin_inset Newline newline
13730 The kind of margin that the style has on the left side.
13731 \begin_inset Separator parbreak
13738 \begin_layout Description
13739 \begin_inset Flex Code
13742 \begin_layout Plain Layout
13748 just means a fixed margin.
13751 \begin_layout Description
13752 \begin_inset Flex Code
13755 \begin_layout Plain Layout
13761 means that the left margin depends on the string entered in the
13762 \begin_inset Flex Noun
13765 \begin_layout Plain Layout
13766 Edit\SpecialChar menuseparator
13768 \begin_inset space ~
13777 This is used to typeset nice lists without tabulators.
13780 \begin_layout Description
13781 \begin_inset Flex Code
13784 \begin_layout Plain Layout
13790 means that the margin depends on the size of the label.
13791 This is used for automatic enumerated headlines.
13792 It is obvious that the headline
13793 \begin_inset Quotes eld
13796 5.4.3.2.1 Very long headline
13797 \begin_inset Quotes erd
13800 must have a wider left margin (as wide as
13801 \begin_inset Quotes eld
13805 \begin_inset Quotes erd
13808 plus the space) than
13809 \begin_inset Quotes eld
13812 3.2 Very long headline
13813 \begin_inset Quotes erd
13817 \begin_inset Quotes eld
13821 \begin_inset Quotes erd
13824 are not able to do this.
13827 \begin_layout Description
13828 \begin_inset Flex Code
13831 \begin_layout Plain Layout
13837 is similar, but only the very first row of the paragraph is dynamic, while
13838 the others are static; this is used, for example, for descriptions.
13841 \begin_layout Description
13842 \begin_inset Flex Code
13845 \begin_layout Plain Layout
13851 means the margin is chosen in a way that the longest row of this paragraph
13852 fits to the right margin.
13853 This is used to typeset an address on the right edge of the page.
13857 \begin_layout Description
13858 \begin_inset Flex Code
13861 \begin_layout Plain Layout
13868 \begin_inset Flex Code
13871 \begin_layout Plain Layout
13880 \begin_inset space \thinspace{}
13884 \begin_inset Flex Code
13887 \begin_layout Plain Layout
13893 ] Whether fragile commands in this style should be
13894 \begin_inset Flex Code
13897 \begin_layout Plain Layout
13910 whether this command should itself be protected.)
13913 \begin_layout Description
13914 \begin_inset Flex Code
13917 \begin_layout Plain Layout
13924 \begin_inset Flex Code
13927 \begin_layout Plain Layout
13934 \begin_inset space \thinspace{}
13938 \begin_inset Flex Code
13941 \begin_layout Plain Layout
13949 ] Whether newlines are translated into \SpecialChar LaTeX
13951 \begin_inset Flex Code
13954 \begin_layout Plain Layout
13965 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
13967 inside \SpecialChar LyX
13971 \begin_layout Description
13972 \begin_inset Flex Code
13975 \begin_layout Plain Layout
13982 \begin_inset Flex Code
13985 \begin_layout Plain Layout
13994 \begin_inset space \thinspace{}
13998 \begin_inset Flex Code
14001 \begin_layout Plain Layout
14007 ] If set to true, and if
14008 \begin_inset Flex Code
14011 \begin_layout Plain Layout
14018 \begin_inset Flex Code
14021 \begin_layout Plain Layout
14027 ) paragraphs are being indented, then the indentation of such a paragraph
14028 following one of this type will be suppressed.
14029 (So this will not affect the display of non-default paragraphs.)
14032 \begin_layout Description
14033 \begin_inset Flex Code
14036 \begin_layout Plain Layout
14043 \begin_inset Flex Code
14046 \begin_layout Plain Layout
14052 ] Name of a style that has replaced this style.
14053 This is used to rename a style, while keeping backward compatibility.
14056 \begin_layout Description
14057 \begin_inset Flex Code
14060 \begin_layout Plain Layout
14067 \begin_inset Flex Code
14070 \begin_layout Plain Layout
14077 \begin_inset space \thinspace{}
14081 \begin_inset Flex Code
14084 \begin_layout Plain Layout
14090 ] Determines whether consecutive pragraphs of the same type are treated
14091 as belonging together.
14092 This has the effect that the
14093 \begin_inset Flex Code
14096 \begin_layout Plain Layout
14102 is only printed once before such a group.
14103 By default, this is true for
14104 \begin_inset Flex Code
14107 \begin_layout Plain Layout
14114 \begin_inset Flex Code
14117 \begin_layout Plain Layout
14124 \begin_inset Flex Code
14127 \begin_layout Plain Layout
14133 and false for all other types.
14136 \begin_layout Description
14137 \begin_inset Flex Code
14140 \begin_layout Plain Layout
14147 \begin_inset Flex Code
14150 \begin_layout Plain Layout
14159 \begin_inset space \thinspace{}
14163 \begin_inset Flex Code
14166 \begin_layout Plain Layout
14172 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14174 but only by a line break; together with
14175 \begin_inset Flex Code
14178 \begin_layout Plain Layout
14184 , this allows to emulate a plain text editor (like the ERT inset).
14187 \begin_layout Description
14188 \begin_inset Flex Code
14191 \begin_layout Plain Layout
14198 \begin_inset Flex Code
14201 \begin_layout Plain Layout
14207 ] The indent of the very first line of a paragraph.
14209 \begin_inset Newline newline
14213 \begin_inset Flex Code
14216 \begin_layout Plain Layout
14222 will be fixed for a certain style.
14223 The exception is the default style, since the indentation for these paragraphs
14224 can be prohibited with
14225 \begin_inset Flex Code
14228 \begin_layout Plain Layout
14236 \begin_inset Flex Code
14239 \begin_layout Plain Layout
14245 style paragraphs inside environments use the
14246 \begin_inset Flex Code
14249 \begin_layout Plain Layout
14255 of the environment, not their native one.
14257 \begin_inset Flex Code
14260 \begin_layout Plain Layout
14266 paragraphs inside an enumeration are not indented.
14269 \begin_layout Description
14270 \begin_inset Flex Code
14273 \begin_layout Plain Layout
14280 \begin_inset Flex Code
14283 \begin_layout Plain Layout
14289 ] The vertical space between two paragraphs of this style.
14292 \begin_layout Description
14293 \begin_inset Flex Code
14296 \begin_layout Plain Layout
14303 \begin_inset Flex Code
14306 \begin_layout Plain Layout
14313 allows the user to choose either
14314 \begin_inset Quotes eld
14318 \begin_inset Quotes erd
14322 \begin_inset Quotes eld
14326 \begin_inset Quotes erd
14329 to separate paragraphs.
14331 \begin_inset Quotes eld
14335 \begin_inset Quotes erd
14339 \begin_inset Flex Code
14342 \begin_layout Plain Layout
14350 \begin_inset Quotes eld
14354 \begin_inset Quotes erd
14358 \begin_inset Flex Code
14361 \begin_layout Plain Layout
14367 is ignored and all paragraphs are separated by the
14368 \begin_inset Flex Code
14371 \begin_layout Plain Layout
14378 The vertical space is calculated with
14379 \begin_inset Flex Code
14382 \begin_layout Plain Layout
14384 \begin_inset space ~
14393 \begin_inset Flex Code
14396 \begin_layout Plain Layout
14402 is the height of a row with the normal font.
14403 This way, the look stays the same with different screen fonts.
14406 \begin_layout Description
14407 \begin_inset Flex Code
14410 \begin_layout Plain Layout
14417 \begin_inset Flex Code
14420 \begin_layout Plain Layout
14429 \begin_inset space \thinspace{}
14433 \begin_inset Flex Code
14436 \begin_layout Plain Layout
14442 ] Whether the contents of this paragraph should be output in raw form, meaning
14443 without special translations that \SpecialChar LaTeX
14447 \begin_layout Description
14448 \begin_inset Flex Code
14451 \begin_layout Plain Layout
14458 \begin_inset Flex Code
14461 \begin_layout Plain Layout
14471 Defines individual characters that should be output in raw form, meaning
14472 without special translations that \SpecialChar LaTeX
14476 \begin_layout Description
14477 \begin_inset Flex Code
14480 \begin_layout Plain Layout
14486 Information to be included in the \SpecialChar LaTeX
14487 preamble when this style is used.
14488 Used to define macros, load packages, etc., required by this particular
14491 \begin_inset Quotes eld
14495 \begin_inset Flex Code
14498 \begin_layout Plain Layout
14505 \begin_inset Quotes erd
14511 \begin_layout Description
14512 \begin_inset Flex Code
14515 \begin_layout Plain Layout
14522 \begin_inset Flex Code
14525 \begin_layout Plain Layout
14531 ] The prefix to use when creating labels referring to paragraphs of this
14533 This allows the use of formatted references.
14536 \begin_layout Description
14537 \begin_inset Flex Code
14540 \begin_layout Plain Layout
14547 \begin_inset Flex Code
14550 \begin_layout Plain Layout
14556 ] Whether the style requires the feature
14557 \begin_inset Flex Code
14560 \begin_layout Plain Layout
14567 \begin_inset CommandInset ref
14569 reference "chap:List-of-functions"
14573 for the list of features).
14574 If you require a package with specific options, you can additionally use
14576 \begin_inset Flex Code
14579 \begin_layout Plain Layout
14585 as a general text class parameter (see
14586 \begin_inset CommandInset ref
14588 reference "subsec:General-text-class"
14595 \begin_layout Description
14596 \begin_inset Flex Code
14599 \begin_layout Plain Layout
14606 \begin_inset Flex Code
14609 \begin_layout Plain Layout
14618 \begin_inset Flex Code
14621 \begin_layout Plain Layout
14627 ] Resets the \SpecialChar LaTeX
14628 arguments of this style (as defined via the
14629 \begin_inset Flex Code
14632 \begin_layout Plain Layout
14639 This is useful if you have copied a style via
14640 \begin_inset Flex Code
14643 \begin_layout Plain Layout
14649 , but you do not want to inherit its (required and optional) arguments.
14652 \begin_layout Description
14653 \begin_inset Flex Code
14656 \begin_layout Plain Layout
14663 \begin_inset Flex Code
14666 \begin_layout Plain Layout
14672 ] A string that is put at the end of the layout content.
14673 A line break in the output can be indicated by
14674 \begin_inset Flex Code
14677 \begin_layout Plain Layout
14686 \begin_layout Description
14687 \begin_inset Flex Code
14690 \begin_layout Plain Layout
14697 \begin_inset Flex Code
14700 \begin_layout Plain Layout
14707 \begin_inset Flex Code
14710 \begin_layout Plain Layout
14719 \begin_layout Description
14720 \begin_inset Flex Code
14723 \begin_layout Plain Layout
14730 \begin_inset Flex Code
14733 \begin_layout Plain Layout
14742 \begin_inset Flex Code
14745 \begin_layout Plain Layout
14752 \begin_inset Flex Code
14755 \begin_layout Plain Layout
14762 \begin_inset Flex Code
14765 \begin_layout Plain Layout
14767 \begin_inset space ~
14775 ] This defines what the default spacing should be in the style.
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
14806 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14807 If you specify the argument
14808 \begin_inset Flex Code
14811 \begin_layout Plain Layout
14817 , then you must also provide a value argument which will be the actual multiplie
14819 Note that, contrary to other parameters,
14820 \begin_inset Flex Code
14823 \begin_layout Plain Layout
14829 implies the generation of specific \SpecialChar LaTeX
14830 code, using the \SpecialChar LaTeX
14834 \begin_inset Flex Code
14837 \begin_layout Plain Layout
14846 \begin_layout Description
14847 \begin_inset Flex Code
14850 \begin_layout Plain Layout
14857 \begin_inset Flex Code
14860 \begin_layout Plain Layout
14867 \begin_inset space \thinspace{}
14871 \begin_inset Flex Code
14874 \begin_layout Plain Layout
14882 ] Allow spell-checking paragraphs of this style.
14886 \begin_layout Description
14887 \begin_inset Flex Code
14890 \begin_layout Plain Layout
14896 The font used for the text body .
14898 \begin_inset CommandInset ref
14900 reference "subsec:Font-description"
14907 \begin_layout Description
14908 \begin_inset Flex Code
14911 \begin_layout Plain Layout
14920 \begin_inset Flex Code
14923 \begin_layout Plain Layout
14933 The level of the style in the table of contents.
14934 This is used for automatic numbering of section headings.
14937 \begin_layout Description
14938 \begin_inset Flex Code
14941 \begin_layout Plain Layout
14950 \begin_inset Flex Code
14953 \begin_layout Plain Layout
14964 \begin_inset Flex Code
14967 \begin_layout Plain Layout
14974 \begin_inset Flex Code
14977 \begin_layout Plain Layout
14983 ] This tag determines whether the first line indentation of this paragraph
14984 can be toggled via the Paragraph settings dialog.
14988 \begin_inset Flex Code
14991 \begin_layout Plain Layout
15001 is set, indentation can be toggled if the document settings use
15002 \begin_inset Quotes eld
15006 \begin_inset Quotes erd
15009 paragraph style, with
15010 \begin_inset Flex Code
15013 \begin_layout Plain Layout
15019 , indentation can always be toggled, notwithstanding the document settings,
15021 \begin_inset Flex Code
15024 \begin_layout Plain Layout
15030 , indentation can never be toggled.
15033 \begin_layout Description
15034 \begin_inset Flex Code
15037 \begin_layout Plain Layout
15044 \begin_inset Flex Code
15047 \begin_layout Plain Layout
15053 ] The vertical space with which the very first of a chain of paragraphs
15054 with this style is separated from the previous paragraph.
15055 If the previous paragraph has another style, the separations are not simply
15056 added, but the maximum is taken.
15059 \begin_layout Subsection
15060 \begin_inset CommandInset label
15066 Internationalization of Paragraph Styles
15069 \begin_layout Standard
15071 has long supported internationalization of layout information, but, until
15072 version 2.0, this applied only to the user interface and not to, say, PDF
15074 Thus, French authors were forced to resort to ugly hacks if they wanted
15079 1' instead of `Theorem 1'.
15080 Thanks to Georg Baum, that is no longer the case.
15083 \begin_layout Standard
15085 \begin_inset Flex Code
15088 \begin_layout Plain Layout
15094 defines text that is to appear in the typeset document, it may use
15095 \begin_inset Flex Code
15098 \begin_layout Plain Layout
15105 \begin_inset Flex Code
15108 \begin_layout Plain Layout
15114 to support non-English and even multi-language documents correctly.
15115 The following excerpt (from the
15116 \begin_inset Flex Code
15119 \begin_layout Plain Layout
15125 file) shows how this works:
15128 \begin_layout LyX-Code
15130 \begin_inset Separator parbreak
15137 \begin_layout LyX-Code
15140 theoremstyle{remark}
15143 \begin_layout LyX-Code
15146 newtheorem{claim}[thm]{
15153 \begin_layout LyX-Code
15157 \begin_layout LyX-Code
15161 \begin_layout LyX-Code
15166 claimname}{_(Claim)}
15169 \begin_layout LyX-Code
15173 \begin_layout LyX-Code
15177 \begin_layout LyX-Code
15186 claimname}{_(Claim)}}
15189 \begin_layout LyX-Code
15194 \begin_layout Standard
15195 In principle, any legal \SpecialChar LaTeX
15197 \begin_inset Flex Code
15200 \begin_layout Plain Layout
15207 \begin_inset Flex Code
15210 \begin_layout Plain Layout
15216 tags, but in practice they will typically look as they do here.
15217 The key to correct translation of the typeset text is the definition of
15218 the \SpecialChar LaTeX
15220 \begin_inset Flex Code
15223 \begin_layout Plain Layout
15232 \begin_inset Flex Code
15235 \begin_layout Plain Layout
15247 \begin_layout Standard
15249 \begin_inset Flex Code
15252 \begin_layout Plain Layout
15258 tag provides for internationalization based upon the overall language of
15260 The contents of the tag will be included in the preamble, just as with
15262 \begin_inset Flex Code
15265 \begin_layout Plain Layout
15272 What makes it special is the use of the
15273 \begin_inset Quotes eld
15277 \begin_inset Quotes erd
15281 \begin_inset Flex Code
15284 \begin_layout Plain Layout
15290 , which will be replaced, when \SpecialChar LyX
15291 produces \SpecialChar LaTeX
15292 output, with the translation of
15293 its argument into the document language.
15296 \begin_layout Standard
15298 \begin_inset Flex Code
15301 \begin_layout Plain Layout
15307 tag is more complex, since it is meant to provide support for multi-language
15308 documents and so offers an interface to the
15309 \begin_inset Flex Code
15312 \begin_layout Plain Layout
15319 Its contents will be added to the preamble once for each language that
15320 appears in the document.
15321 In this case, the argument to
15322 \begin_inset Flex Code
15325 \begin_layout Plain Layout
15331 will be replaced with its translation into the language in question; the
15333 \begin_inset Flex Code
15336 \begin_layout Plain Layout
15342 is replaced by the language name (as used by the babel package).
15345 \begin_layout Standard
15346 A German document that also included a French section would thus have the
15347 following in the preamble:
15350 \begin_layout LyX-Code
15359 claimname}{Affirmation}}
15360 \begin_inset Newline newline
15371 claimname}{Behauptung}}
15372 \begin_inset Newline newline
15379 claimname}{Behauptung}
15382 \begin_layout Standard
15385 \begin_inset Flex Code
15388 \begin_layout Plain Layout
15394 will then conspire to produce the correct text in the output.
15397 \begin_layout Standard
15398 One important point to note here is that the translations are provided by
15400 itself, through the file
15401 \begin_inset Flex Code
15404 \begin_layout Plain Layout
15411 This means, in effect, that
15412 \begin_inset Flex Code
15415 \begin_layout Plain Layout
15422 \begin_inset Flex Code
15425 \begin_layout Plain Layout
15431 are really only of use in layout files that are provided with \SpecialChar LyX
15433 entered in user-created layout files will not be seen by \SpecialChar LyX
15434 's internationalizatio
15435 n routines unless the
15436 \begin_inset Flex Code
15439 \begin_layout Plain Layout
15445 file is modified accordingly.
15446 That said, however, any layout created with the intention that it will
15447 be included with \SpecialChar LyX
15448 should use these tags where appropriate.
15449 Please note that the paragraph style translations provided by \SpecialChar LyX
15451 change with a minor update (e.
15452 \begin_inset space \thinspace{}
15456 \begin_inset space \space{}
15459 from version 2.1.x to 2.1.y).
15460 It is however quite likely that a major update (e.
15461 \begin_inset space \thinspace{}
15465 \begin_inset space \space{}
15468 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15471 \begin_layout Subsection
15473 \begin_inset CommandInset label
15475 name "subsec:Floats"
15482 \begin_layout Standard
15483 It is necessary to define the floats (
15484 \begin_inset Flex Noun
15487 \begin_layout Plain Layout
15494 \begin_inset Flex Noun
15497 \begin_layout Plain Layout
15503 , \SpecialChar ldots
15504 ) in the text class itself.
15505 Standard floats are included in the file
15506 \begin_inset Flex Code
15509 \begin_layout Plain Layout
15515 , so you may have to do no more than add
15518 \begin_layout LyX-Code
15519 Input stdfloats.inc
15522 \begin_layout Standard
15523 to your layout file.
15524 If you want to implement a text class that proposes some other float types
15525 (like the AGU class bundled with \SpecialChar LyX
15526 ), the information below will hopefully
15530 \begin_layout Description
15531 \begin_inset Flex Code
15534 \begin_layout Plain Layout
15541 \begin_inset Flex Code
15544 \begin_layout Plain Layout
15550 =!htbpH] Allowed placement options for this float type.
15551 The value is a string of placement characters.
15552 Possible characters include:
15557 \begin_inset Quotes eld
15561 \begin_inset Quotes erd
15569 \begin_inset Quotes eld
15573 \begin_inset Quotes erd
15581 \begin_inset Quotes eld
15585 \begin_inset Quotes erd
15593 \begin_inset Quotes eld
15597 \begin_inset Quotes erd
15605 \begin_inset Quotes eld
15609 \begin_inset Quotes erd
15617 \begin_inset Quotes eld
15621 \begin_inset Quotes erd
15625 The order of the characters in the string does not matter.
15626 If no placement options are allowed, use the string
15633 \begin_layout Description
15634 \begin_inset Flex Code
15637 \begin_layout Plain Layout
15644 \begin_inset Flex Code
15647 \begin_layout Plain Layout
15656 \begin_inset space \thinspace{}
15662 \begin_inset Flex Code
15665 \begin_layout Plain Layout
15675 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15682 \begin_inset Flex Code
15685 \begin_layout Plain Layout
15691 if the float does not support this feature.
15694 \begin_layout Description
15695 \begin_inset Flex Code
15698 \begin_layout Plain Layout
15705 \begin_inset Flex Code
15708 \begin_layout Plain Layout
15717 \begin_inset space \thinspace{}
15723 \begin_inset Flex Code
15726 \begin_layout Plain Layout
15736 ] Defines whether the float has a starred variant that spans columns in
15737 a two column paragraph.
15739 \begin_inset Flex Code
15742 \begin_layout Plain Layout
15748 if the float does not support this feature.
15751 \begin_layout Description
15752 \begin_inset Flex Code
15755 \begin_layout Plain Layout
15762 \begin_inset Flex Code
15765 \begin_layout Plain Layout
15772 \begin_inset Quotes erd
15776 \begin_inset Quotes erd
15779 ] The file name extension of an auxiliary file for the list of figures (or
15782 writes the captions to this file.
15785 \begin_layout Description
15786 \begin_inset Flex Code
15789 \begin_layout Plain Layout
15796 \begin_inset Flex Code
15799 \begin_layout Plain Layout
15806 \begin_inset Quotes erd
15810 \begin_inset Quotes erd
15813 ] The string that will be used in the menus and also for the caption.
15814 This is translated to the current language if babel is used.
15817 \begin_layout Description
15818 \begin_inset Flex Code
15821 \begin_layout Plain Layout
15827 These tags control the XHTML output.
15829 \begin_inset CommandInset ref
15831 reference "sec:Tags-for-XHTML"
15838 \begin_layout Description
15839 \begin_inset Flex Code
15842 \begin_layout Plain Layout
15851 \begin_inset Flex Code
15854 \begin_layout Plain Layout
15863 \begin_inset space \thinspace{}
15867 \begin_inset Flex Code
15870 \begin_layout Plain Layout
15876 ] Indicates whether the float is already defined in the document class or
15877 if instead the \SpecialChar LaTeX
15879 \begin_inset Flex Code
15882 \begin_layout Plain Layout
15888 needs to be loaded to define it on-the-fly.
15890 \begin_inset Flex Code
15893 \begin_layout Plain Layout
15900 \begin_inset Flex Code
15903 \begin_layout Plain Layout
15910 It should be set to
15911 \begin_inset Flex Code
15914 \begin_layout Plain Layout
15920 if the float is already defined by the \SpecialChar LaTeX
15924 \begin_layout Description
15925 \begin_inset Flex Code
15928 \begin_layout Plain Layout
15935 \begin_inset Flex Code
15938 \begin_layout Plain Layout
15945 \begin_inset Quotes erd
15949 \begin_inset Quotes erd
15952 ] The command used to generate a list of floats of this type; the leading
15961 \begin_inset Flex Code
15964 \begin_layout Plain Layout
15970 is false, since there is no standard way to generate this command.
15972 \begin_inset Flex Code
15975 \begin_layout Plain Layout
15981 is true, since in that case there is a standard way to define the command.
15984 \begin_layout Description
15985 \begin_inset Flex Code
15988 \begin_layout Plain Layout
15995 \begin_inset Flex Code
15998 \begin_layout Plain Layout
16005 \begin_inset Quotes erd
16009 \begin_inset Quotes erd
16012 ] A title for a list of floats of this kind (list of figures, tables, or
16014 It is used for the screen label within \SpecialChar LyX
16015 , it is used by \SpecialChar LaTeX
16017 it is used as the title in the XHTML output.
16018 It will be translated to the document language.
16021 \begin_layout Description
16022 \begin_inset Flex Code
16025 \begin_layout Plain Layout
16032 \begin_inset Flex Code
16035 \begin_layout Plain Layout
16042 \begin_inset Quotes erd
16046 \begin_inset Quotes erd
16049 ] This (optional) argument determines whether floats of this class will
16050 be numbered within some sectional unit of the document.
16052 \begin_inset Flex Code
16055 \begin_layout Plain Layout
16062 \begin_inset Quotes eld
16066 \begin_inset Flex Code
16069 \begin_layout Plain Layout
16076 \begin_inset Quotes erd
16079 , the floats will be numbered within chapters.
16083 \begin_layout Description
16084 \begin_inset Flex Code
16087 \begin_layout Plain Layout
16094 \begin_inset Flex Code
16097 \begin_layout Plain Layout
16104 \begin_inset Quotes erd
16108 \begin_inset Quotes erd
16111 ] The default placement for the given class of floats.
16112 The string should be as in standard \SpecialChar LaTeX
16114 \begin_inset Flex Code
16117 \begin_layout Plain Layout
16124 \begin_inset Flex Code
16127 \begin_layout Plain Layout
16134 \begin_inset Flex Code
16137 \begin_layout Plain Layout
16144 \begin_inset Flex Code
16147 \begin_layout Plain Layout
16153 for top, bottom, page, and here, respectively.
16157 \begin_layout Plain Layout
16158 Note that the order of these letters in the string is irrelevant, like in
16165 On top of that there is a new type,
16166 \begin_inset Flex Code
16169 \begin_layout Plain Layout
16175 , which does not really correspond to a float, since it means: put it
16176 \begin_inset Quotes eld
16180 \begin_inset Quotes erd
16184 Note however that the
16185 \begin_inset Flex Code
16188 \begin_layout Plain Layout
16194 specifier is special and, because of implementation details, cannot be
16195 used in non-built in float types.
16196 If you do not understand what this means, just use
16197 \begin_inset Quotes eld
16201 \begin_inset Flex Code
16204 \begin_layout Plain Layout
16211 \begin_inset Quotes erd
16217 \begin_layout Description
16218 \begin_inset Flex Code
16221 \begin_layout Plain Layout
16228 \begin_inset Flex Code
16231 \begin_layout Plain Layout
16237 ] The prefix to use when creating labels referring to floats of this type.
16238 This allows the use of formatted references.
16239 Note that you can remove any
16240 \begin_inset Flex Code
16243 \begin_layout Plain Layout
16249 set by a copied style by using the special value
16250 \begin_inset Quotes eld
16254 \begin_inset Quotes erd
16257 , which must be all caps.
16260 \begin_layout Description
16261 \begin_inset Flex Code
16264 \begin_layout Plain Layout
16271 \begin_inset Flex Code
16274 \begin_layout Plain Layout
16281 \begin_inset Quotes erd
16285 \begin_inset Quotes erd
16288 ] The style used when defining the float using
16289 \begin_inset Flex Code
16292 \begin_layout Plain Layout
16303 \begin_layout Description
16304 \begin_inset Flex Code
16307 \begin_layout Plain Layout
16314 \begin_inset Flex Code
16317 \begin_layout Plain Layout
16324 \begin_inset Quotes erd
16328 \begin_inset Quotes erd
16332 \begin_inset Quotes eld
16336 \begin_inset Quotes erd
16339 of the new class of floats, like program or algorithm.
16340 After the appropriate
16341 \begin_inset Flex Code
16344 \begin_layout Plain Layout
16353 \begin_inset Flex Code
16356 \begin_layout Plain Layout
16365 \begin_inset Flex Code
16368 \begin_layout Plain Layout
16379 \begin_layout Description
16380 \begin_inset Flex Code
16383 \begin_layout Plain Layout
16390 \begin_inset Flex Code
16393 \begin_layout Plain Layout
16400 \begin_inset space \thinspace{}
16404 \begin_inset Flex Code
16407 \begin_layout Plain Layout
16415 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16417 \begin_inset Flex Code
16420 \begin_layout Plain Layout
16426 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16430 \begin_layout Standard
16431 Note that defining a float with type
16432 \begin_inset Flex Code
16435 \begin_layout Plain Layout
16443 automatically defines the corresponding counter with name
16444 \begin_inset Flex Code
16447 \begin_layout Plain Layout
16458 \begin_layout Subsection
16459 Flex insets and InsetLayout
16460 \begin_inset CommandInset label
16462 name "subsec:Flex-insets-and"
16469 \begin_layout Standard
16470 Flex insets come in three different kinds:
16473 \begin_layout Itemize
16475 \begin_inset Flex Code
16478 \begin_layout Plain Layout
16484 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16486 \begin_inset Flex Code
16489 \begin_layout Plain Layout
16498 \begin_inset Flex Code
16501 \begin_layout Plain Layout
16512 \begin_layout Itemize
16514 \begin_inset Flex Code
16517 \begin_layout Plain Layout
16523 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16525 footnote, and the like.
16526 An obvious example is an endnote inset, which is defined in the
16527 \begin_inset Flex Code
16530 \begin_layout Plain Layout
16539 \begin_layout Itemize
16541 \begin_inset Flex Code
16544 \begin_layout Plain Layout
16550 ): For use with DocBook classes.
16553 \begin_layout Standard
16554 Flex insets are defined using the
16555 \begin_inset Flex Code
16558 \begin_layout Plain Layout
16564 tag, which shall be explained in a moment.
16567 \begin_layout Standard
16569 \begin_inset Flex Code
16572 \begin_layout Plain Layout
16578 tag also serves another function: It can be used to customize the general
16579 layout of many different types of insets.
16581 \begin_inset Flex Code
16584 \begin_layout Plain Layout
16590 can be used to customize the layout parameters for footnotes, marginal
16591 notes, note insets, \SpecialChar TeX
16592 code (ERT) insets, branches, listings, indexes, boxes,
16593 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16596 \begin_layout Standard
16598 \begin_inset Flex Code
16601 \begin_layout Plain Layout
16607 definition must begin with a line of the form:
16610 \begin_layout LyX-Code
16614 \begin_layout Standard
16616 \begin_inset Flex Code
16619 \begin_layout Plain Layout
16625 indicates the inset whose layout is being defined, and here there are four
16629 \begin_layout Enumerate
16630 The layout for a pre-existing inset is being modified.
16631 In this case, can be
16632 \begin_inset Flex Code
16635 \begin_layout Plain Layout
16641 any one of the following:
16642 \begin_inset Flex Code
16645 \begin_layout Plain Layout
16652 \begin_inset Flex Code
16655 \begin_layout Plain Layout
16662 \begin_inset Flex Code
16665 \begin_layout Plain Layout
16672 \begin_inset Flex Code
16675 \begin_layout Plain Layout
16682 \begin_inset Flex Code
16685 \begin_layout Plain Layout
16692 \begin_inset Flex Code
16695 \begin_layout Plain Layout
16702 \begin_inset Flex Code
16705 \begin_layout Plain Layout
16712 \begin_inset Flex Code
16715 \begin_layout Plain Layout
16722 \begin_inset Flex Code
16725 \begin_layout Plain Layout
16732 \begin_inset Flex Code
16735 \begin_layout Plain Layout
16742 \begin_inset Flex Code
16745 \begin_layout Plain Layout
16752 \begin_inset Flex Code
16755 \begin_layout Plain Layout
16762 \begin_inset Flex Code
16765 \begin_layout Plain Layout
16772 \begin_inset Flex Code
16775 \begin_layout Plain Layout
16782 \begin_inset Flex Code
16785 \begin_layout Plain Layout
16792 \begin_inset Flex Code
16795 \begin_layout Plain Layout
16802 \begin_inset Flex Code
16805 \begin_layout Plain Layout
16812 \begin_inset Flex Code
16815 \begin_layout Plain Layout
16822 \begin_inset Flex Code
16825 \begin_layout Plain Layout
16832 \begin_inset Flex Code
16835 \begin_layout Plain Layout
16844 \begin_layout Enumerate
16845 The layout for a Flex inset is being defined.
16847 \begin_inset Flex Code
16850 \begin_layout Plain Layout
16856 must be of the form
16857 \begin_inset Quotes eld
16861 \begin_inset Flex Code
16864 \begin_layout Plain Layout
16871 \begin_inset Quotes erd
16875 \begin_inset Flex Code
16878 \begin_layout Plain Layout
16884 may be be any valid identifier not used by a pre-existing Flex inset.
16885 The identifier may include spaces, but in that case the whole thing must
16886 be wrapped in quotes.
16887 Note that the definition of a flex inset
16892 \begin_inset Flex Code
16895 \begin_layout Plain Layout
16901 entry, declaring which type of inset it defines.
16904 \begin_layout Enumerate
16905 The layout for user specific branch is being defined.
16907 \begin_inset Flex Code
16910 \begin_layout Plain Layout
16916 must be of the form
16917 \begin_inset Quotes eld
16921 \begin_inset Flex Code
16924 \begin_layout Plain Layout
16931 \begin_inset Quotes erd
16935 \begin_inset Flex Code
16938 \begin_layout Plain Layout
16944 may be be any valid identifier of branch defined in user's document.
16945 The identifier may include spaces, but in that case the whole thing must
16946 be wrapped in quotes.
16947 The main purpose of this feature is to allow \SpecialChar LaTeX
16948 wrapping around specific
16949 branches as user needs.
16952 \begin_layout Enumerate
16953 The layout of a user (or class) specific caption is being defined.
16955 \begin_inset Flex Code
16958 \begin_layout Plain Layout
16964 must be of the form
16965 \begin_inset Quotes eld
16969 \begin_inset Flex Code
16972 \begin_layout Plain Layout
16979 \begin_inset Quotes erd
16983 \begin_inset Flex Code
16986 \begin_layout Plain Layout
16992 specifies the name of the caption as it appears in the menu.
16993 Have a look at the standard caption (
16994 \begin_inset Flex Code
16997 \begin_layout Plain Layout
17003 ), the specific captions of the KOMA-Script classes (
17004 \begin_inset Flex Code
17007 \begin_layout Plain Layout
17014 \begin_inset Flex Code
17017 \begin_layout Plain Layout
17026 \begin_inset space ~
17032 \begin_inset Flex Code
17035 \begin_layout Plain Layout
17041 ) for applications.
17044 \begin_layout Standard
17046 \begin_inset Flex Code
17049 \begin_layout Plain Layout
17055 definition can contain the following entries:
17058 \begin_layout Description
17059 \begin_inset Flex Code
17062 \begin_layout Plain Layout
17069 \begin_inset Flex Code
17072 \begin_layout Plain Layout
17078 ] Defines argument number of a command\SpecialChar breakableslash
17079 environment associated with the current
17081 The definition must end with
17082 \begin_inset Flex Code
17085 \begin_layout Plain Layout
17093 \begin_inset CommandInset ref
17095 reference "subsec:Paragraph-Styles"
17102 \begin_layout Description
17103 \begin_inset Flex Code
17106 \begin_layout Plain Layout
17112 Preamble for changing language commands; see
17113 \begin_inset CommandInset ref
17115 reference "subsec:I18n"
17122 \begin_layout Description
17123 \begin_inset Flex Code
17126 \begin_layout Plain Layout
17133 \begin_inset Flex Code
17136 \begin_layout Plain Layout
17142 ] The color for the inset's background.
17144 \begin_inset CommandInset ref
17146 reference "chap:Names-of-colors"
17150 for a list of the available color names.
17153 \begin_layout Description
17154 \begin_inset Flex Code
17157 \begin_layout Plain Layout
17164 \begin_inset Flex Code
17167 \begin_layout Plain Layout
17176 \begin_inset space \thinspace{}
17180 \begin_inset Flex Code
17183 \begin_layout Plain Layout
17189 ] Whether to use the content of the inset as the label, when the inset is
17194 \begin_layout Description
17195 \begin_inset Flex Code
17198 \begin_layout Plain Layout
17205 \begin_inset Flex Code
17208 \begin_layout Plain Layout
17214 ] As with paragraph styles, see
17215 \begin_inset CommandInset ref
17217 reference "subsec:Paragraph-Styles"
17222 Note that you need to specify the complete type, e.
17223 \begin_inset space \thinspace{}
17227 \begin_inset space ~
17231 \begin_inset Flex Code
17234 \begin_layout Plain Layout
17235 CopyStyle Flex:<name>
17243 \begin_layout Description
17244 \begin_inset Flex Code
17247 \begin_layout Plain Layout
17254 \begin_inset Flex Code
17257 \begin_layout Plain Layout
17266 \begin_inset space \thinspace{}
17270 \begin_inset Flex Code
17273 \begin_layout Plain Layout
17279 ] Indicates whether the user may employ the Paragraph Settings dialog to
17280 customize the paragraph.
17283 \begin_layout Description
17284 \begin_inset Flex Code
17287 \begin_layout Plain Layout
17294 \begin_inset Flex Code
17297 \begin_layout Plain Layout
17304 \begin_inset Flex Code
17307 \begin_layout Plain Layout
17314 \begin_inset Flex Code
17317 \begin_layout Plain Layout
17323 , describing the rendering style used for the inset's frame and buttons.
17324 Footnotes generally use
17325 \begin_inset Flex Code
17328 \begin_layout Plain Layout
17334 , ERT insets generally
17335 \begin_inset Flex Code
17338 \begin_layout Plain Layout
17344 , and character styles
17345 \begin_inset Flex Code
17348 \begin_layout Plain Layout
17357 \begin_layout Description
17358 \begin_inset Flex Code
17361 \begin_layout Plain Layout
17368 \begin_inset Flex Code
17371 \begin_layout Plain Layout
17380 \begin_inset space \thinspace{}
17386 \begin_inset Flex Code
17389 \begin_layout Plain Layout
17398 \begin_inset Flex Code
17401 \begin_layout Plain Layout
17408 \begin_inset Flex Code
17411 \begin_layout Plain Layout
17418 Indicates whether the environment will stand on its own in the output or
17419 will appear inline with the surrounding text.
17420 If set to false, it is supposed that the \SpecialChar LaTeX
17421 environment ignores white space
17422 (including one newline character) after the
17423 \begin_inset Flex Code
17426 \begin_layout Plain Layout
17439 \begin_inset Flex Code
17442 \begin_layout Plain Layout
17458 \begin_layout Description
17459 \begin_inset Flex Code
17462 \begin_layout Plain Layout
17468 Required at the end of the
17469 \begin_inset Flex Code
17472 \begin_layout Plain Layout
17481 \begin_layout Description
17482 \begin_inset Flex Code
17485 \begin_layout Plain Layout
17491 The font used for both the text body
17497 \begin_inset CommandInset ref
17499 reference "subsec:Font-description"
17504 Note that defining this font automatically defines the
17505 \begin_inset Flex Code
17508 \begin_layout Plain Layout
17514 to the same value, so define this first and define
17515 \begin_inset Flex Code
17518 \begin_layout Plain Layout
17524 later if you want them to be different.
17527 \begin_layout Description
17528 \begin_inset Flex Code
17531 \begin_layout Plain Layout
17532 FixedWidthPreambleEncoding
17538 \begin_inset Flex Code
17541 \begin_layout Plain Layout
17550 \begin_inset space \thinspace{}
17554 \begin_inset Flex Code
17557 \begin_layout Plain Layout
17563 ] Force a fixed width encoding for the translated contents of
17564 \begin_inset Flex Code
17567 \begin_layout Plain Layout
17574 \begin_inset Flex Code
17577 \begin_layout Plain Layout
17583 code generated by this layout.
17584 This is needed for special \SpecialChar LaTeX
17589 that do not work with variable width encodings such as
17594 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17595 backends such as Xe\SpecialChar TeX
17597 Lua\SpecialChar TeX
17601 \begin_layout Description
17602 \begin_inset Flex Code
17605 \begin_layout Plain Layout
17606 ForceLocalFontSwitch
17612 \begin_inset Flex Code
17615 \begin_layout Plain Layout
17624 \begin_inset space \thinspace{}
17628 \begin_inset Flex Code
17631 \begin_layout Plain Layout
17637 ] When using babel, always use a local font switch (
17638 \begin_inset Flex Code
17641 \begin_layout Plain Layout
17649 ), never a global one (such as
17650 \begin_inset Flex Code
17653 \begin_layout Plain Layout
17664 \begin_layout Description
17665 \begin_inset Flex Code
17668 \begin_layout Plain Layout
17675 \begin_inset Flex Code
17678 \begin_layout Plain Layout
17687 \begin_inset space \thinspace{}
17691 \begin_inset Flex Code
17694 \begin_layout Plain Layout
17701 \begin_inset Quotes eld
17705 \begin_inset Quotes erd
17708 language, leading to Left-to-Right (Latin) output, e.
17709 \begin_inset space \thinspace{}
17713 \begin_inset space \space{}
17716 in \SpecialChar TeX
17721 \begin_layout Description
17722 \begin_inset Flex Code
17725 \begin_layout Plain Layout
17732 \begin_inset Flex Code
17735 \begin_layout Plain Layout
17744 \begin_inset space \thinspace{}
17748 \begin_inset Flex Code
17751 \begin_layout Plain Layout
17757 ] Force a a line break in the \SpecialChar LaTeX
17758 output before the inset starts and after
17760 This assures the inset itself is output on its own lines, for parsing purposes.
17763 \begin_layout Description
17764 \begin_inset Flex Code
17767 \begin_layout Plain Layout
17774 \begin_inset Flex Code
17777 \begin_layout Plain Layout
17786 \begin_inset space \thinspace{}
17790 \begin_inset Flex Code
17793 \begin_layout Plain Layout
17799 ] Indicates whether the
17800 \begin_inset Flex Code
17803 \begin_layout Plain Layout
17809 should be used or, instead, the user can change the paragraph style used
17814 \begin_layout Description
17815 \begin_inset Flex Code
17818 \begin_layout Plain Layout
17825 \begin_inset Flex Code
17828 \begin_layout Plain Layout
17837 \begin_inset space \thinspace{}
17841 \begin_inset Flex Code
17844 \begin_layout Plain Layout
17850 ] As with paragraph styles, see
17851 \begin_inset CommandInset ref
17853 reference "subsec:Paragraph-Styles"
17860 \begin_layout Description
17861 \begin_inset Flex Code
17864 \begin_layout Plain Layout
17870 These tags control the XHTML output.
17872 \begin_inset CommandInset ref
17874 reference "sec:Tags-for-XHTML"
17881 \begin_layout Description
17882 \begin_inset Flex Code
17885 \begin_layout Plain Layout
17892 \begin_inset Flex Code
17895 \begin_layout Plain Layout
17904 \begin_inset space \thinspace{}
17908 \begin_inset Flex Code
17911 \begin_layout Plain Layout
17917 ] Whether to include the contents of this inset in the strings generated
17918 for the `Outline' pane.
17919 One would not, for example, want the content of a footnote in a section
17920 header to be included in the TOC displayed in the outline, but one would
17921 normally want the content of a character style displayed.
17922 Default is false: not to include.
17925 \begin_layout Description
17926 \begin_inset Flex Code
17929 \begin_layout Plain Layout
17938 \begin_inset Flex Code
17941 \begin_layout Plain Layout
17950 \begin_inset space \thinspace{}
17954 \begin_inset Flex Code
17957 \begin_layout Plain Layout
17963 ] As with paragraph styles, see
17964 \begin_inset CommandInset ref
17966 reference "subsec:Paragraph-Styles"
17973 \begin_layout Description
17974 \begin_inset Flex Code
17977 \begin_layout Plain Layout
17983 The font used for the label.
17985 \begin_inset CommandInset ref
17987 reference "subsec:Font-description"
17992 Note that this definition can never appear before
17993 \begin_inset Flex Code
17996 \begin_layout Plain Layout
18002 , lest it be ineffective.
18005 \begin_layout Description
18006 \begin_inset Flex Code
18009 \begin_layout Plain Layout
18016 \begin_inset Flex Code
18019 \begin_layout Plain Layout
18026 \begin_inset Quotes erd
18030 \begin_inset Quotes erd
18033 ] What will be displayed on the button or elsewhere as the inset label.
18035 \begin_inset Flex Code
18038 \begin_layout Plain Layout
18046 \begin_inset Flex Code
18049 \begin_layout Plain Layout
18055 ) modify this label on the fly.
18058 \begin_layout Description
18059 \begin_inset Flex Code
18062 \begin_layout Plain Layout
18068 Language dependent preamble; see
18069 \begin_inset CommandInset ref
18071 reference "subsec:I18n"
18078 \begin_layout Description
18079 \begin_inset Flex Code
18082 \begin_layout Plain Layout
18089 \begin_inset Flex Code
18092 \begin_layout Plain Layout
18098 ] The name of the corresponding \SpecialChar LaTeX
18100 Either the environment or command name.
18103 \begin_layout Description
18104 \begin_inset Flex Code
18107 \begin_layout Plain Layout
18114 \begin_inset Flex Code
18117 \begin_layout Plain Layout
18123 ] The optional parameter for the corresponding
18124 \begin_inset Flex Code
18127 \begin_layout Plain Layout
18133 stuff, including possible bracket pairs like
18134 \begin_inset Flex Code
18137 \begin_layout Plain Layout
18144 This parameter cannot be changed from within \SpecialChar LyX
18146 \begin_inset Flex Code
18149 \begin_layout Plain Layout
18155 for customizable parameters).
18156 It will be output as is after all \SpecialChar LaTeX
18158 \begin_inset Flex Code
18161 \begin_layout Plain Layout
18170 \begin_layout Description
18171 \begin_inset Flex Code
18174 \begin_layout Plain Layout
18181 \begin_inset Flex Code
18184 \begin_layout Plain Layout
18185 Command, Environment, None
18190 ] How the style should be translated into \SpecialChar LaTeX
18195 \begin_layout Plain Layout
18196 \begin_inset Flex Code
18199 \begin_layout Plain Layout
18205 is perhaps a bit misleading, since these rules apply to SGML classes too.
18206 Visit the SGML class files for specific examples.
18212 \begin_inset Separator parbreak
18219 \begin_layout Description
18220 \begin_inset Flex Code
18223 \begin_layout Plain Layout
18229 means nothing special
18232 \begin_layout Description
18233 \begin_inset Flex Code
18236 \begin_layout Plain Layout
18243 \begin_inset Flex Code
18246 \begin_layout Plain Layout
18253 {\SpecialChar ldots
18262 \begin_layout Description
18263 \begin_inset Flex Code
18266 \begin_layout Plain Layout
18273 \begin_inset Flex Code
18276 \begin_layout Plain Layout
18283 }\SpecialChar ldots
18298 \begin_layout Standard
18299 Putting the last few things together, the \SpecialChar LaTeX
18300 output will be either:
18303 \begin_layout LyX-Code
18306 LatexName[LatexParam]{\SpecialChar ldots
18310 \begin_layout Standard
18314 \begin_layout LyX-Code
18317 begin{LatexName}[LatexParam] \SpecialChar ldots
18323 \begin_layout Standard
18324 depending upon the \SpecialChar LaTeX
18329 \begin_layout Description
18330 \begin_inset Flex Code
18333 \begin_layout Plain Layout
18340 \begin_inset Flex Code
18343 \begin_layout Plain Layout
18349 ] A string that is put at the beginning of the layout content.
18350 A line break in the output can be indicated by
18351 \begin_inset Flex Code
18354 \begin_layout Plain Layout
18363 \begin_layout Description
18364 \begin_inset Flex Code
18367 \begin_layout Plain Layout
18374 \begin_inset Flex Code
18377 \begin_layout Plain Layout
18384 \begin_inset Flex Code
18387 \begin_layout Plain Layout
18394 \begin_inset Flex Code
18397 \begin_layout Plain Layout
18404 \begin_inset Flex Code
18407 \begin_layout Plain Layout
18413 (indicating a dummy definition ending definitions of charstyles, etc).
18414 This entry is required in and is only meaningful for Flex insets.
18415 Among other things, it determines on which menu this inset will appear.
18417 \begin_inset Flex Code
18420 \begin_layout Plain Layout
18427 \begin_inset Flex Code
18430 \begin_layout Plain Layout
18436 will automatically set
18437 \begin_inset Flex Code
18440 \begin_layout Plain Layout
18448 \begin_inset Flex Code
18451 \begin_layout Plain Layout
18457 can be set to true for
18458 \begin_inset Flex Code
18461 \begin_layout Plain Layout
18467 insets by setting it
18472 \begin_inset Flex Code
18475 \begin_layout Plain Layout
18484 \begin_layout Description
18485 \begin_inset Flex Code
18488 \begin_layout Plain Layout
18495 \begin_inset Flex Code
18498 \begin_layout Plain Layout
18507 \begin_inset space \thinspace{}
18511 \begin_inset Flex Code
18514 \begin_layout Plain Layout
18520 ] Whether multiple paragraphs are permitted in this inset.
18522 \begin_inset Flex Code
18525 \begin_layout Plain Layout
18531 to the same value and
18532 \begin_inset Flex Code
18535 \begin_layout Plain Layout
18541 to the opposite value.
18542 These can be reset to other values, if they are used
18547 \begin_inset Flex Code
18550 \begin_layout Plain Layout
18560 \begin_layout Description
18561 \begin_inset Flex Code
18564 \begin_layout Plain Layout
18571 \begin_inset Flex Code
18574 \begin_layout Plain Layout
18583 \begin_inset space \thinspace{}
18587 \begin_inset Flex Code
18590 \begin_layout Plain Layout
18596 ] Whether fragile commands in this inset should be
18597 \begin_inset Flex Code
18600 \begin_layout Plain Layout
18613 whether the command should itself be protected.) Default is false.
18616 \begin_layout Description
18617 \begin_inset Flex Code
18620 \begin_layout Plain Layout
18627 \begin_inset Flex Code
18630 \begin_layout Plain Layout
18636 ] Deletes an existing
18637 \begin_inset Flex Code
18640 \begin_layout Plain Layout
18649 \begin_layout Description
18650 \begin_inset Flex Code
18653 \begin_layout Plain Layout
18660 \begin_inset Flex Code
18663 \begin_layout Plain Layout
18670 \begin_inset Flex Code
18673 \begin_layout Plain Layout
18679 that has replaced this
18680 \begin_inset Flex Code
18683 \begin_layout Plain Layout
18690 This is used to rename an
18691 \begin_inset Flex Code
18694 \begin_layout Plain Layout
18700 , while keeping backward compatibility.
18703 \begin_layout Description
18704 \begin_inset Flex Code
18707 \begin_layout Plain Layout
18714 \begin_inset Flex Code
18717 \begin_layout Plain Layout
18726 \begin_inset space \thinspace{}
18730 \begin_inset Flex Code
18733 \begin_layout Plain Layout
18739 ] As with paragraph styles, see
18740 \begin_inset CommandInset ref
18742 reference "subsec:Paragraph-Styles"
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
18807 As with paragraph styles, see
18808 \begin_inset CommandInset ref
18810 reference "subsec:Paragraph-Styles"
18817 \begin_layout Description
18818 \begin_inset Flex Code
18821 \begin_layout Plain Layout
18828 \begin_inset Flex Code
18831 \begin_layout Plain Layout
18837 ] The prefix to use when creating labels referring to insets of this type.
18838 This allows the use of formatted references.
18841 \begin_layout Description
18842 \begin_inset Flex Code
18845 \begin_layout Plain Layout
18852 \begin_inset Flex Code
18855 \begin_layout Plain Layout
18861 ] As with paragraph styles, see
18862 \begin_inset CommandInset ref
18864 reference "subsec:Paragraph-Styles"
18871 \begin_layout Description
18872 \begin_inset Flex Code
18875 \begin_layout Plain Layout
18882 \begin_inset Flex Code
18885 \begin_layout Plain Layout
18894 \begin_inset space \thinspace{}
18898 \begin_inset Flex Code
18901 \begin_layout Plain Layout
18907 ] Resets the \SpecialChar LaTeX
18908 arguments of this layout (as defined via the
18909 \begin_inset Flex Code
18912 \begin_layout Plain Layout
18919 This is useful if you have copied a style via
18920 \begin_inset Flex Code
18923 \begin_layout Plain Layout
18929 , but you do not want to inherit its (required and optional) arguments.
18932 \begin_layout Description
18933 \begin_inset Flex Code
18936 \begin_layout Plain Layout
18943 \begin_inset Flex Code
18946 \begin_layout Plain Layout
18953 \begin_inset space \thinspace{}
18957 \begin_inset Flex Code
18960 \begin_layout Plain Layout
18968 ] Whether this inset should use the font of its surrounding environment
18970 Default is false: use the font of the surrounding environment.
18973 \begin_layout Description
18974 \begin_inset Flex Code
18977 \begin_layout Plain Layout
18984 \begin_inset Flex Code
18987 \begin_layout Plain Layout
18993 ] A string that is put at the end of the layout content.
18994 A line break in the output can be indicated by
18995 \begin_inset Flex Code
18998 \begin_layout Plain Layout
19007 \begin_layout Description
19008 \begin_inset Flex Code
19011 \begin_layout Plain Layout
19018 \begin_inset Flex Code
19021 \begin_layout Plain Layout
19028 \begin_inset space \thinspace{}
19032 \begin_inset Flex Code
19035 \begin_layout Plain Layout
19043 ] Allow spell-checking the contents of this inset.
19047 \begin_layout Subsection
19049 \begin_inset CommandInset label
19051 name "subsec:Counters"
19058 \begin_layout Standard
19059 It is necessary to define the counters (
19060 \begin_inset Flex Noun
19063 \begin_layout Plain Layout
19070 \begin_inset Flex Noun
19073 \begin_layout Plain Layout
19079 , \SpecialChar ldots
19080 ) in the text class itself.
19081 The standard counters are defined in the file
19082 \begin_inset Flex Code
19085 \begin_layout Plain Layout
19091 , so you may have to do no more than add
19094 \begin_layout LyX-Code
19095 Input stdcounters.inc
19098 \begin_layout Standard
19099 to your layout file to get them to work.
19100 But if you want to define custom counters, then you can do so.
19101 The counter declaration must begin with:
19104 \begin_layout LyX-Code
19105 Counter CounterName
19108 \begin_layout Standard
19110 \begin_inset Flex Code
19113 \begin_layout Plain Layout
19119 ' is replaced by the name of the counter.
19120 And it must end with
19121 \begin_inset Quotes eld
19125 \begin_inset Flex Code
19128 \begin_layout Plain Layout
19135 \begin_inset Quotes erd
19139 The following parameters can also be used:
19142 \begin_layout Description
19143 \begin_inset Flex Code
19146 \begin_layout Plain Layout
19153 \begin_inset Flex Code
19156 \begin_layout Plain Layout
19162 ] Sets the initial value for the counter, to which it will be reset whenever
19164 Normally, one will want the default, 1.
19167 \begin_layout Description
19168 \begin_inset Flex Code
19171 \begin_layout Plain Layout
19178 \begin_inset Flex Code
19181 \begin_layout Plain Layout
19188 \begin_inset Quotes erd
19192 \begin_inset Quotes erd
19195 ] When defined, this string defines how the counter is displayed.
19196 Setting this value sets
19197 \begin_inset Flex Code
19200 \begin_layout Plain Layout
19201 LabelStringAppendix
19207 The following special constructs can be used in the string:
19208 \begin_inset Separator parbreak
19215 \begin_layout Itemize
19216 \begin_inset Flex Code
19219 \begin_layout Plain Layout
19227 will be replaced by the expansion of the
19228 \begin_inset Flex Code
19231 \begin_layout Plain Layout
19238 \begin_inset Flex Code
19241 \begin_layout Plain Layout
19242 LabelStringAppendix
19248 \begin_inset Flex Code
19251 \begin_layout Plain Layout
19261 \begin_layout Itemize
19262 counter values can be expressed using \SpecialChar LaTeX
19264 \begin_inset Newline newline
19268 \begin_inset Flex Code
19271 \begin_layout Plain Layout
19288 \begin_inset Flex Code
19291 \begin_layout Plain Layout
19303 \begin_layout Plain Layout
19313 Actually, the situation is a bit more complicated: any
19332 other than those described below will produce arabic numerals.
19333 It would not be surprising to see this change in the future.
19339 \begin_inset Flex Code
19342 \begin_layout Plain Layout
19348 : 1, 2, 3,\SpecialChar ldots
19350 \begin_inset Flex Code
19353 \begin_layout Plain Layout
19359 for lower-case letters: a, b, c, \SpecialChar ldots
19361 \begin_inset Flex Code
19364 \begin_layout Plain Layout
19370 for upper-case letters: A, B, C, \SpecialChar ldots
19372 \begin_inset Flex Code
19375 \begin_layout Plain Layout
19381 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19383 \begin_inset Flex Code
19386 \begin_layout Plain Layout
19392 for upper-case roman numerals: I, II, III\SpecialChar ldots
19394 \begin_inset Flex Code
19397 \begin_layout Plain Layout
19403 for hebrew numerals.
19407 \begin_layout Standard
19408 If LabelString is not defined, a default value is constructed as follows:
19409 if the counter has a master counter
19410 \begin_inset Flex Code
19413 \begin_layout Plain Layout
19420 \begin_inset Flex Code
19423 \begin_layout Plain Layout
19430 \begin_inset Newline newline
19434 \begin_inset Flex Code
19437 \begin_layout Plain Layout
19447 is used; otherwise the string
19448 \begin_inset Flex Code
19451 \begin_layout Plain Layout
19462 \begin_layout Description
19463 \begin_inset Flex Code
19466 \begin_layout Plain Layout
19467 LabelStringAppendix
19473 \begin_inset Flex Code
19476 \begin_layout Plain Layout
19483 \begin_inset Quotes erd
19487 \begin_inset Quotes erd
19491 \begin_inset Flex Code
19494 \begin_layout Plain Layout
19500 , but for use in the Appendix.
19503 \begin_layout Description
19504 \begin_inset Flex Code
19507 \begin_layout Plain Layout
19514 \begin_inset Flex Code
19517 \begin_layout Plain Layout
19524 \begin_inset Quotes erd
19528 \begin_inset Quotes erd
19531 ] A format for use with formatted references to this counter.
19532 For example, one might want to have references to section numbers appear
19534 \begin_inset Quotes eld
19538 \begin_inset Quotes erd
19542 The string should contain
19543 \begin_inset Quotes eld
19547 \begin_inset Quotes erd
19551 This will be replaced by the counter number itself.
19552 So, for sections, it would be: Section ##.
19555 \begin_layout Description
19556 \begin_inset Flex Code
19559 \begin_layout Plain Layout
19566 \begin_inset Flex Code
19569 \begin_layout Plain Layout
19576 \begin_inset Quotes erd
19580 \begin_inset Quotes erd
19583 ] If this is set to the name of another counter, the present counter will
19584 be reset every time the other one is increased.
19586 \begin_inset Flex Code
19589 \begin_layout Plain Layout
19596 \begin_inset Flex Code
19599 \begin_layout Plain Layout
19608 \begin_layout Subsection
19610 \begin_inset CommandInset label
19612 name "subsec:Font-description"
19619 \begin_layout Standard
19620 A font description looks like this:
19623 \begin_layout LyX-Code
19637 \begin_layout LyX-Code
19641 \begin_layout LyX-Code
19645 \begin_layout Standard
19646 The following commands are available:
19649 \begin_layout Description
19650 \begin_inset Flex Code
19653 \begin_layout Plain Layout
19660 \begin_inset Flex Code
19663 \begin_layout Plain Layout
19672 \begin_inset Flex Code
19675 \begin_layout Plain Layout
19682 \begin_inset Flex Code
19685 \begin_layout Plain Layout
19692 \begin_inset Flex Code
19695 \begin_layout Plain Layout
19702 \begin_inset Flex Code
19705 \begin_layout Plain Layout
19712 \begin_inset Flex Code
19715 \begin_layout Plain Layout
19722 \begin_inset Flex Code
19725 \begin_layout Plain Layout
19732 \begin_inset Flex Code
19735 \begin_layout Plain Layout
19742 \begin_inset Flex Code
19745 \begin_layout Plain Layout
19754 \begin_layout Description
19755 \begin_inset Flex Code
19758 \begin_layout Plain Layout
19765 \begin_inset Flex Code
19768 \begin_layout Plain Layout
19777 \begin_inset Flex Code
19780 \begin_layout Plain Layout
19787 \begin_inset Flex Code
19790 \begin_layout Plain Layout
19799 \begin_layout Description
19800 \begin_inset Flex Code
19803 \begin_layout Plain Layout
19810 \begin_inset Flex Code
19813 \begin_layout Plain Layout
19819 ] Valid arguments are:
19820 \begin_inset Flex Code
19823 \begin_layout Plain Layout
19830 \begin_inset Flex Code
19833 \begin_layout Plain Layout
19840 \begin_inset Flex Code
19843 \begin_layout Plain Layout
19850 \begin_inset Flex Code
19853 \begin_layout Plain Layout
19860 \begin_inset Flex Code
19863 \begin_layout Plain Layout
19870 \begin_inset Flex Code
19873 \begin_layout Plain Layout
19880 \begin_inset Flex Code
19883 \begin_layout Plain Layout
19890 \begin_inset Flex Code
19893 \begin_layout Plain Layout
19900 \begin_inset Flex Code
19903 \begin_layout Plain Layout
19910 \begin_inset Flex Code
19913 \begin_layout Plain Layout
19920 \begin_inset Flex Code
19923 \begin_layout Plain Layout
19930 \begin_inset Flex Code
19933 \begin_layout Plain Layout
19940 Each of these turns on or off the corresponding attribute.
19942 \begin_inset Flex Code
19945 \begin_layout Plain Layout
19951 turns on emphasis, and
19952 \begin_inset Flex Code
19955 \begin_layout Plain Layout
19963 \begin_inset Newline newline
19966 If the latter seems puzzling, remember that the font settings for the present
19967 context are generally inherited from the surrounding context.
19969 \begin_inset Flex Code
19972 \begin_layout Plain Layout
19978 would turn off the emphasis that was anyway in effect, say, in a theorem
19982 \begin_layout Description
19983 \begin_inset Flex Code
19986 \begin_layout Plain Layout
19993 \begin_inset Flex Code
19996 \begin_layout Plain Layout
20005 \begin_inset Flex Code
20008 \begin_layout Plain Layout
20017 \begin_layout Description
20018 \begin_inset Flex Code
20021 \begin_layout Plain Layout
20028 \begin_inset Flex Code
20031 \begin_layout Plain Layout
20040 \begin_inset Flex Code
20043 \begin_layout Plain Layout
20050 \begin_inset Flex Code
20053 \begin_layout Plain Layout
20060 \begin_inset Flex Code
20063 \begin_layout Plain Layout
20072 \begin_layout Description
20073 \begin_inset Flex Code
20076 \begin_layout Plain Layout
20083 \begin_inset Flex Code
20086 \begin_layout Plain Layout
20093 \begin_inset Flex Code
20096 \begin_layout Plain Layout
20103 \begin_inset Flex Code
20106 \begin_layout Plain Layout
20115 \begin_inset Flex Code
20118 \begin_layout Plain Layout
20125 \begin_inset Flex Code
20128 \begin_layout Plain Layout
20135 \begin_inset Flex Code
20138 \begin_layout Plain Layout
20145 \begin_inset Flex Code
20148 \begin_layout Plain Layout
20155 \begin_inset Flex Code
20158 \begin_layout Plain Layout
20167 \begin_layout Subsection
20168 \begin_inset CommandInset label
20170 name "subsec:Citation-format-description"
20174 Citation format description
20177 \begin_layout Standard
20179 \begin_inset Flex Code
20182 \begin_layout Plain Layout
20188 blocks are used to describe how bibliographic information should be displayed,
20189 both within \SpecialChar LyX
20190 itself (in the citation dialog and in tooltips, for example)
20191 and in XHTML output.
20192 Such a block might look like this:
20195 \begin_layout LyX-Code
20199 \begin_layout LyX-Code
20203 \begin_layout LyX-Code
20207 \begin_layout LyX-Code
20211 \begin_layout Standard
20212 The individual lines define how the bibliographic information associated
20213 with an article or book, respectively, is to be displayed, and such a definitio
20214 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20217 defines a default format in the source code that will be used if no specific
20218 definition has been given.
20220 predefines several formats in the file
20221 \begin_inset Flex Code
20224 \begin_layout Plain Layout
20230 , which is included in most of \SpecialChar LyX
20231 's document classes.
20234 \begin_layout Standard
20235 The definitions use a simple language that allows Bib\SpecialChar TeX
20236 keys to be replaced
20238 Keys should be enclosed in
20239 \begin_inset Flex Code
20242 \begin_layout Plain Layout
20249 \begin_inset Flex Code
20252 \begin_layout Plain Layout
20259 So a simple definition might look like this:
20262 \begin_layout LyX-Code
20264 \begin_inset Quotes eld
20268 \begin_inset Quotes erd
20274 \begin_layout Standard
20275 This would print the author, followed by a comma, followed by the title,
20276 in quotes, followed by a period.
20279 \begin_layout Standard
20280 Of course, sometimes you may want to print a key only if it exists.
20281 This can be done by using a conditional construction, such as:
20282 \begin_inset Flex Code
20285 \begin_layout Plain Layout
20287 \begin_inset space ~
20297 \begin_inset Flex Code
20300 \begin_layout Plain Layout
20306 key exists, then print
20307 \begin_inset Quotes eld
20311 \begin_inset space ~
20315 \begin_inset Quotes erd
20318 followed by the volume key.
20319 It is also possible to have an else clause in the conditional, such as:
20320 \begin_inset Newline newline
20324 \begin_inset Flex Code
20327 \begin_layout Plain Layout
20328 {%author%[[%author%]][[%editor%, ed.]]}
20334 \begin_inset Newline newline
20338 \begin_inset Flex Code
20341 \begin_layout Plain Layout
20347 key is printed if it exists; otherwise, the editor key is printed, followed
20349 \begin_inset Quotes eld
20353 \begin_inset space ~
20357 \begin_inset Quotes erd
20360 Note that the key is again enclosed in
20361 \begin_inset Flex Code
20364 \begin_layout Plain Layout
20370 signs; the entire conditional is enclosed in braces; and the if and else
20371 clauses are enclosed in double brackets,
20372 \begin_inset Quotes eld
20376 \begin_inset Flex Code
20379 \begin_layout Plain Layout
20386 \begin_inset Quotes eld
20390 \begin_inset Quotes eld
20394 \begin_inset Flex Code
20397 \begin_layout Plain Layout
20404 \begin_inset Quotes erd
20408 There must be no space between any of these.
20411 \begin_layout Standard
20412 There is one other piece of syntax available in definitions, which looks
20414 \begin_inset Flex Code
20417 \begin_layout Plain Layout
20424 This defines a piece of formatting information that is to be used when
20426 \begin_inset Quotes eld
20430 \begin_inset Quotes erd
20434 Obviously, we do not want to output HTML tags when writing plain text,
20435 so they should be wrapped in
20436 \begin_inset Quotes eld
20440 \begin_inset Quotes erd
20444 \begin_inset Quotes eld
20448 \begin_inset Quotes erd
20454 \begin_layout Standard
20455 Two special sorts of definitions are also possible in a
20456 \begin_inset Flex Code
20459 \begin_layout Plain Layout
20466 An example of the first would be:
20469 \begin_layout LyX-Code
20471 \begin_inset Quotes eld
20475 \begin_inset Quotes erd
20481 \begin_layout Standard
20482 This is an abbreviation, or macro, and it can be used by treating it as
20484 \begin_inset Flex Code
20487 \begin_layout Plain Layout
20496 \begin_inset Flex Code
20499 \begin_layout Plain Layout
20505 exactly as it would treat its definition.
20506 So, let us issue the obvious
20514 \begin_layout LyX-Code
20518 \begin_layout Standard
20519 or anything like it.
20521 shouldn't go into an infinite loop, but it may go into a long one before
20525 \begin_layout Standard
20526 The second sort of special definition might look like this:
20529 \begin_layout LyX-Code
20533 \begin_layout Standard
20534 This defines a translatable piece of text, which allows relevant parts of
20535 the bibliography to be translated.
20536 It can be included in a definition by treating it as a key:
20537 \begin_inset Flex Code
20540 \begin_layout Plain Layout
20547 Several of these are predefined in
20548 \begin_inset Flex Code
20551 \begin_layout Plain Layout
20558 Note that these are not macros, in the sense just defined.
20559 They will not be expanded.
20562 \begin_layout Standard
20563 So here then is an example that use all these features:
20564 \begin_inset VSpace defskip
20570 \begin_layout Standard
20574 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20577 \begin_layout Standard
20578 \begin_inset VSpace defskip
20581 This defines a macro that prints the author, followed by a comma, if the
20583 \begin_inset Flex Code
20586 \begin_layout Plain Layout
20592 key is defined, or else prints the name of the editor, followed by the
20594 \begin_inset Flex Code
20597 \begin_layout Plain Layout
20603 or its translation (it is by default
20604 \begin_inset Quotes eld
20608 \begin_inset Quotes erd
20612 \begin_inset Flex Code
20615 \begin_layout Plain Layout
20622 Note that this is in fact defined in
20623 \begin_inset Flex Code
20626 \begin_layout Plain Layout
20632 , so you can use it in your own definitions, or re-definitions, if you load
20636 \begin_layout Section
20637 \begin_inset CommandInset label
20639 name "sec:Tags-for-XHTML"
20643 Tags for XHTML output
20646 \begin_layout Standard
20647 As with \SpecialChar LaTeX
20648 or DocBook, the format of \SpecialChar LyX
20649 's XHTML output is also controlled by
20650 layout information.
20651 In general, \SpecialChar LyX
20652 provides sensible defaults and, as mentioned earlier, it will
20653 even construct default CSS style rules from the other layout tags.
20654 For example, \SpecialChar LyX
20655 will attempt to use the information provided in the
20656 \begin_inset Flex Code
20659 \begin_layout Plain Layout
20665 declaration for the Chapter style to write CSS that will appropriately
20666 format chapter headings.
20669 \begin_layout Standard
20670 In many cases, then, you may not have to do anything at all to get acceptable
20671 XHTML output for your own environments, custom insets, and so forth.
20672 But in some cases you will, and so \SpecialChar LyX
20673 provides a number of layout tags that
20674 can be used to customize the XHTML and CSS that are generated.
20677 \begin_layout Standard
20678 Note that there are two tags,
20679 \begin_inset Flex Code
20682 \begin_layout Plain Layout
20689 \begin_inset Flex Code
20692 \begin_layout Plain Layout
20698 that may appear outside style and inset declarations.
20700 \begin_inset CommandInset ref
20702 reference "subsec:General-text-class"
20706 for details on these.
20709 \begin_layout Subsection
20710 \begin_inset CommandInset label
20712 name "subsec:Paragraph-Style-XHTML"
20719 \begin_layout Standard
20720 The sort of XHTML \SpecialChar LyX
20721 outputs for a paragraph depends upon whether we are dealing
20722 with a normal paragraph, a command, or an environment, where this is itself
20723 determined by the contents of the corresponding
20724 \begin_inset Flex Code
20727 \begin_layout Plain Layout
20738 \begin_layout Standard
20739 For a command or normal paragraph, the output XHTML has the following form:
20742 \begin_layout LyX-Code
20744 \begin_inset Quotes erd
20748 \begin_inset Quotes erd
20754 \begin_layout LyX-Code
20756 \begin_inset Quotes erd
20760 \begin_inset Quotes erd
20766 \begin_layout LyX-Code
20767 Contents of the paragraph.
20770 \begin_layout LyX-Code
20774 \begin_layout Standard
20775 The label tags are of course omitted if the paragraph does not have a label.
20778 \begin_layout Standard
20779 For an environment that is not some sort of list, the XHTML takes this form:
20782 \begin_layout LyX-Code
20784 \begin_inset Quotes erd
20788 \begin_inset Quotes erd
20794 \begin_layout LyX-Code
20796 \begin_inset Quotes erd
20800 \begin_inset Quotes erd
20804 \begin_inset Quotes erd
20808 \begin_inset Quotes erd
20811 >Environment Label</labeltag>First paragraph.</itemtag>
20814 \begin_layout LyX-Code
20815 <itemtag>Second paragraph.</itemtag>
20818 \begin_layout LyX-Code
20822 \begin_layout Standard
20823 Note that the label is output only for the first paragraph, as it should
20824 be for a theorem, for example.
20828 \begin_layout Standard
20829 For a list, we have one of these forms:
20832 \begin_layout LyX-Code
20834 \begin_inset Quotes erd
20838 \begin_inset Quotes erd
20844 \begin_layout LyX-Code
20846 \begin_inset Quotes erd
20850 \begin_inset Quotes erd
20854 \begin_inset Quotes erd
20858 \begin_inset Quotes erd
20861 >List Label</labeltag>First item.</itemtag>
20864 \begin_layout LyX-Code
20866 \begin_inset Quotes erd
20870 \begin_inset Quotes erd
20874 \begin_inset Quotes erd
20878 \begin_inset Quotes erd
20881 >List Label</labeltag>Second item.</itemtag>
20884 \begin_layout LyX-Code
20888 \begin_layout LyX-Code
20892 \begin_layout LyX-Code
20894 \begin_inset Quotes erd
20898 \begin_inset Quotes erd
20904 \begin_layout LyX-Code
20906 \begin_inset Quotes erd
20910 \begin_inset Quotes erd
20913 >List Label</labeltag><itemtag attr=
20914 \begin_inset Quotes erd
20918 \begin_inset Quotes erd
20921 >First item.</itemtag>
20924 \begin_layout LyX-Code
20926 \begin_inset Quotes erd
20930 \begin_inset Quotes erd
20933 >List Label</labeltag><itemtag attr=
20934 \begin_inset Quotes erd
20938 \begin_inset Quotes erd
20941 >Second item.</itemtag>
20944 \begin_layout LyX-Code
20948 \begin_layout Standard
20949 Note the different orders of
20950 \begin_inset Flex Code
20953 \begin_layout Plain Layout
20960 \begin_inset Flex Code
20963 \begin_layout Plain Layout
20970 Which order we get depends upon the setting of
20971 \begin_inset Flex Code
20974 \begin_layout Plain Layout
20981 \begin_inset Flex Code
20984 \begin_layout Plain Layout
20990 is false (the default), you get the first of these, with the label within
20991 the item; if true, you get the second, with the label outside the item.
20994 \begin_layout Standard
20995 The specific tags and attributes output for each paragraph type can be controlle
20996 d by means of the layout tags we are about to describe.
20997 As mentioned earlier, however, \SpecialChar LyX
20998 uses sensible defaults for many of these,
20999 so you often may not need to do very much to get good XHTML output.
21000 Think of the available tags as there so you can tweak things to your liking.
21003 \begin_layout Description
21004 \begin_inset Flex Code
21007 \begin_layout Plain Layout
21014 \begin_inset Flex Code
21017 \begin_layout Plain Layout
21023 ] Specifies attribute information to be output with the main tag.
21025 \begin_inset Quotes eld
21029 \begin_inset Flex Code
21032 \begin_layout Plain Layout
21039 \begin_inset Quotes erd
21043 By default, \SpecialChar LyX
21045 \begin_inset Quotes eld
21049 \begin_inset Flex Code
21052 \begin_layout Plain Layout
21059 \begin_inset Quotes erd
21063 \begin_inset Flex Code
21066 \begin_layout Plain Layout
21072 is the \SpecialChar LyX
21073 name of the layout, made lowercase, for example: chapter.
21078 contain any style information.
21080 \begin_inset Flex Code
21083 \begin_layout Plain Layout
21092 \begin_layout Description
21093 \begin_inset Flex Code
21096 \begin_layout Plain Layout
21103 \begin_inset Flex Code
21106 \begin_layout Plain Layout
21116 ] Whether to output the default CSS information \SpecialChar LyX
21117 generates for this layout,
21118 even if additional information is explicitly provided via
21119 \begin_inset Flex Code
21122 \begin_layout Plain Layout
21130 \begin_inset Flex Code
21133 \begin_layout Plain Layout
21139 allows you to alter or augment the generated CSS, rather than to override
21142 \begin_inset Flex Code
21145 \begin_layout Plain Layout
21154 \begin_layout Description
21155 \begin_inset Flex Code
21158 \begin_layout Plain Layout
21165 \begin_inset Flex Code
21168 \begin_layout Plain Layout
21174 ] The tag to be used for individual paragraphs of environments, replacing
21176 \begin_inset Flex Code
21179 \begin_layout Plain Layout
21185 in the examples above.
21187 \begin_inset Flex Code
21190 \begin_layout Plain Layout
21199 \begin_layout Description
21200 \begin_inset Flex Code
21203 \begin_layout Plain Layout
21210 \begin_inset Flex Code
21213 \begin_layout Plain Layout
21219 ] Attributes for the item tag.
21221 \begin_inset Quotes eld
21225 \begin_inset Flex Code
21228 \begin_layout Plain Layout
21229 class=`layoutname_item'
21235 \begin_inset Quotes erd
21243 contain any style information.
21245 \begin_inset Flex Code
21248 \begin_layout Plain Layout
21257 \begin_layout Description
21258 \begin_inset Flex Code
21261 \begin_layout Plain Layout
21268 \begin_inset Flex Code
21271 \begin_layout Plain Layout
21277 ] The tag to be used for paragraph and item labels, replacing
21278 \begin_inset Flex Code
21281 \begin_layout Plain Layout
21287 in the examples above.
21289 \begin_inset Flex Code
21292 \begin_layout Plain Layout
21299 \begin_inset Flex Code
21302 \begin_layout Plain Layout
21309 \begin_inset Flex Code
21312 \begin_layout Plain Layout
21319 \begin_inset Flex Code
21322 \begin_layout Plain Layout
21323 Centered_Top_Environment
21328 , in which case it defaults to
21329 \begin_inset Flex Code
21332 \begin_layout Plain Layout
21341 \begin_layout Description
21342 \begin_inset Flex Code
21345 \begin_layout Plain Layout
21352 \begin_inset Flex Code
21355 \begin_layout Plain Layout
21361 ] Attributes for the label tag.
21363 \begin_inset Quotes eld
21367 \begin_inset Flex Code
21370 \begin_layout Plain Layout
21371 class=`layoutname_label'
21377 \begin_inset Quotes erd
21385 contain any style information.
21387 \begin_inset Flex Code
21390 \begin_layout Plain Layout
21399 \begin_layout Description
21400 \begin_inset Flex Code
21403 \begin_layout Plain Layout
21410 \begin_inset Flex Code
21413 \begin_layout Plain Layout
21423 ] Meaningful only for list-like environments, this tag controls whether
21424 the label tag is output before or inside the item tag.
21425 This is used, for example, in the description environment, where we want
21427 \begin_inset Flex Code
21430 \begin_layout Plain Layout
21431 <dt>\SpecialChar ldots
21432 </dt><dd>\SpecialChar ldots
21440 \begin_inset Flex Code
21443 \begin_layout Plain Layout
21449 : The label tag is output inside the item tag.
21452 \begin_layout Description
21453 \begin_inset Flex Code
21456 \begin_layout Plain Layout
21462 Information to be output in the
21463 \begin_inset Flex Code
21466 \begin_layout Plain Layout
21472 section when this style is used.
21473 This might, for example, be used to include a
21474 \begin_inset Flex Code
21477 \begin_layout Plain Layout
21484 \begin_inset Flex Code
21487 \begin_layout Plain Layout
21496 \begin_layout Description
21497 \begin_inset Flex Code
21500 \begin_layout Plain Layout
21506 CSS style information to be included when this style is used.
21507 Note that this will automatically be wrapped in a layout-generated
21508 \begin_inset Flex Code
21511 \begin_layout Plain Layout
21517 block, so only the CSS itself need be included.
21519 \begin_inset Flex Code
21522 \begin_layout Plain Layout
21531 \begin_layout Description
21532 \begin_inset Flex Code
21535 \begin_layout Plain Layout
21542 \begin_inset Flex Code
21545 \begin_layout Plain Layout
21551 ] The tag to be used for the main label, replacing
21552 \begin_inset Flex Code
21555 \begin_layout Plain Layout
21561 in the examples above.
21563 \begin_inset Flex Code
21566 \begin_layout Plain Layout
21575 \begin_layout Description
21576 \begin_inset Flex Code
21579 \begin_layout Plain Layout
21586 \begin_inset Flex Code
21589 \begin_layout Plain Layout
21599 ] Marks this style as the one to be used to generate the
21600 \begin_inset Flex Code
21603 \begin_layout Plain Layout
21609 tag for the XHTML file.
21610 By default, it is false.
21612 \begin_inset Flex Code
21615 \begin_layout Plain Layout
21621 file sets it to true for the
21622 \begin_inset Flex Code
21625 \begin_layout Plain Layout
21635 \begin_layout Subsection
21639 \begin_layout Standard
21640 The XHTML output of insets can also be controlled by information in layout
21645 \begin_layout Plain Layout
21646 At present, this is true only for
21647 \begin_inset Quotes eld
21651 \begin_inset Quotes erd
21654 insets (insets you can type into) and is not true for
21655 \begin_inset Quotes eld
21659 \begin_inset Quotes erd
21662 insets (insets that are associated with dialog boxes).
21667 Here, too, \SpecialChar LyX
21668 tries to provide sensible defaults, and it constructs default
21670 But everything can be customized.
21673 \begin_layout Standard
21674 The XHTML \SpecialChar LyX
21675 outputs for an inset has the following form:
21678 \begin_layout LyX-Code
21680 \begin_inset Quotes erd
21684 \begin_inset Quotes erd
21690 \begin_layout LyX-Code
21691 <labeltag>Label</labeltag>
21694 \begin_layout LyX-Code
21696 \begin_inset Quotes erd
21700 \begin_inset Quotes erd
21703 >Contents of the inset.</innertag>
21706 \begin_layout LyX-Code
21710 \begin_layout Standard
21711 If the inset permits multiple paragraphs—that is, if
21712 \begin_inset Flex Code
21715 \begin_layout Plain Layout
21721 is true—then the contents of the inset will itself be output as paragraphs
21722 formatted according to the styles used for those paragraphs (standard,
21723 quote, and the like).
21724 The label tag is of course omitted if the paragraph does not have a label
21725 and, at present, is always
21726 \begin_inset Flex Code
21729 \begin_layout Plain Layout
21736 The inner tag is optional and, by default, does not appear.
21739 \begin_layout Standard
21740 The specific tags and attributes output for each inset can be controlled
21741 by means of the following layout tags.
21744 \begin_layout Description
21745 \begin_inset Flex Code
21748 \begin_layout Plain Layout
21755 \begin_inset Flex Code
21758 \begin_layout Plain Layout
21764 ] Specifies attribute information to be output with the main tag.
21766 \begin_inset Quotes eld
21770 \begin_inset Flex Code
21773 \begin_layout Plain Layout
21774 class=`myinset' onclick=`\SpecialChar ldots
21781 \begin_inset Quotes erd
21785 By default, \SpecialChar LyX
21787 \begin_inset Quotes eld
21791 \begin_inset Flex Code
21794 \begin_layout Plain Layout
21801 \begin_inset Quotes erd
21805 \begin_inset Flex Code
21808 \begin_layout Plain Layout
21814 is the \SpecialChar LyX
21815 name of the inset, made lowercase and with non-alphanumeric characters
21816 converted to underscores, for example: footnote.
21819 \begin_layout Description
21820 \begin_inset Flex Code
21823 \begin_layout Plain Layout
21830 \begin_inset Flex Code
21833 \begin_layout Plain Layout
21843 ] Whether to output the default CSS information \SpecialChar LyX
21844 generates for this layout,
21845 even if additional information is explicitly provided via
21846 \begin_inset Flex Code
21849 \begin_layout Plain Layout
21857 \begin_inset Flex Code
21860 \begin_layout Plain Layout
21866 allows you to alter or augment the generated CSS, rather than to override
21871 \begin_layout Description
21872 \begin_inset Flex Code
21875 \begin_layout Plain Layout
21882 \begin_inset Flex Code
21885 \begin_layout Plain Layout
21891 ] Attributes for the inner tag.
21893 \begin_inset Quotes eld
21897 \begin_inset Flex Code
21900 \begin_layout Plain Layout
21901 class=`insetname_inner'
21907 \begin_inset Quotes erd
21913 \begin_layout Description
21914 \begin_inset Flex Code
21917 \begin_layout Plain Layout
21924 \begin_inset Flex Code
21927 \begin_layout Plain Layout
21933 ] The inner tag, replacing
21934 \begin_inset Flex Code
21937 \begin_layout Plain Layout
21943 in the examples above.
21944 By default, there is none.
21947 \begin_layout Description
21948 \begin_inset Flex Code
21951 \begin_layout Plain Layout
21958 \begin_inset Flex Code
21961 \begin_layout Plain Layout
21969 ] Whether this inset represents a standalone block of text (such as a footnote)
21970 or instead represents material that is included in the surrounding text
21971 (such as a branch).
21975 \begin_layout Description
21976 \begin_inset Flex Code
21979 \begin_layout Plain Layout
21986 \begin_inset Flex Code
21989 \begin_layout Plain Layout
21995 ] A label for this inset, possibly including a reference to a counter.
21996 For example, for footnote, it might be:
21997 \begin_inset Flex Code
22000 \begin_layout Plain Layout
22009 This is optional, and there is no default.
22012 \begin_layout Description
22013 \begin_inset Flex Code
22016 \begin_layout Plain Layout
22022 Information to be output in the
22023 \begin_inset Flex Code
22026 \begin_layout Plain Layout
22032 section when this style is used.
22033 This might, for example, be used to include a
22034 \begin_inset Flex Code
22037 \begin_layout Plain Layout
22044 \begin_inset Flex Code
22047 \begin_layout Plain Layout
22056 \begin_layout Description
22057 \begin_inset Flex Code
22060 \begin_layout Plain Layout
22066 CSS style information to be included when this style is used.
22067 Note that this will automatically be wrapped in a layout-generated
22068 \begin_inset Flex Code
22071 \begin_layout Plain Layout
22077 block, so only the CSS itself need be included.
22080 \begin_layout Description
22081 \begin_inset Flex Code
22084 \begin_layout Plain Layout
22091 \begin_inset Flex Code
22094 \begin_layout Plain Layout
22100 ] The tag to be used for the main label, replacing
22101 \begin_inset Flex Code
22104 \begin_layout Plain Layout
22110 in the examples above.
22111 The default depends upon the setting of
22112 \begin_inset Flex Code
22115 \begin_layout Plain Layout
22122 \begin_inset Flex Code
22125 \begin_layout Plain Layout
22131 is true, the default is
22132 \begin_inset Flex Code
22135 \begin_layout Plain Layout
22141 ; if it is false, the default is
22142 \begin_inset Flex Code
22145 \begin_layout Plain Layout
22154 \begin_layout Subsection
22158 \begin_layout Standard
22159 The XHTML output for floats too can be controlled by layout information.
22160 The output has the following form:
22163 \begin_layout LyX-Code
22165 \begin_inset Quotes erd
22169 \begin_inset Quotes erd
22175 \begin_layout LyX-Code
22176 Contents of the float.
22179 \begin_layout LyX-Code
22183 \begin_layout Standard
22184 The caption, if there is one, is a separate inset and will be output as
22186 Its appearance can be controlled via the InsetLayout for caption insets.
22190 \begin_layout Description
22191 \begin_inset Flex Code
22194 \begin_layout Plain Layout
22201 \begin_inset Flex Code
22204 \begin_layout Plain Layout
22210 ] Specifies attribute information to be output with the main tag.
22212 \begin_inset Quotes eld
22216 \begin_inset Flex Code
22219 \begin_layout Plain Layout
22220 class=`myfloat' onclick=`\SpecialChar ldots
22227 \begin_inset Quotes erd
22231 By default, \SpecialChar LyX
22233 \begin_inset Quotes eld
22237 \begin_inset Flex Code
22240 \begin_layout Plain Layout
22241 class=`float float-floattype'
22247 \begin_inset Quotes erd
22251 \begin_inset Flex Code
22254 \begin_layout Plain Layout
22260 is \SpecialChar LyX
22261 's name for this type of float, as determined by the float declaration
22263 \begin_inset CommandInset ref
22265 reference "subsec:Floats"
22269 ), though made lowercase and with non-alphanumeric characters converted
22270 to underscores, for example: float-table.
22273 \begin_layout Description
22274 \begin_inset Flex Code
22277 \begin_layout Plain Layout
22283 CSS style information to be included when this float is used.
22284 Note that this will automatically be wrapped in a layout-generated
22285 \begin_inset Flex Code
22288 \begin_layout Plain Layout
22294 block, so only the CSS itself need be included.
22297 \begin_layout Description
22298 \begin_inset Flex Code
22301 \begin_layout Plain Layout
22308 \begin_inset Flex Code
22311 \begin_layout Plain Layout
22317 ] The tag to be used for this float, replacing
22318 \begin_inset Quotes eld
22322 \begin_inset Flex Code
22325 \begin_layout Plain Layout
22332 \begin_inset Quotes erd
22335 in the example above.
22337 \begin_inset Flex Code
22340 \begin_layout Plain Layout
22346 and will rarely need changing.
22349 \begin_layout Subsection
22350 Bibliography formatting
22353 \begin_layout Standard
22354 The bibliography can be formatted using
22355 \begin_inset Flex Code
22358 \begin_layout Plain Layout
22366 \begin_inset CommandInset ref
22368 reference "subsec:Citation-format-description"
22375 \begin_layout Subsection
22380 \begin_layout Standard
22381 We have several times mentioned that \SpecialChar LyX
22382 will generate default CSS style rules
22383 for both insets and paragraph styles, based upon the other layout information
22385 In this section, we shall say a word about which layout information \SpecialChar LyX
22390 \begin_layout Standard
22391 At present, \SpecialChar LyX
22392 auto-generates CSS only for font information, making use of
22394 \begin_inset Flex Code
22397 \begin_layout Plain Layout
22404 \begin_inset Flex Code
22407 \begin_layout Plain Layout
22414 \begin_inset Flex Code
22417 \begin_layout Plain Layout
22424 \begin_inset Flex Code
22427 \begin_layout Plain Layout
22434 \begin_inset Flex Code
22437 \begin_layout Plain Layout
22444 \begin_inset CommandInset ref
22446 reference "subsec:Font-description"
22451 The translation is mostly straightforward and obvious.
22453 \begin_inset Quotes eld
22457 \begin_inset Flex Code
22460 \begin_layout Plain Layout
22467 \begin_inset Quotes erd
22471 \begin_inset Quotes eld
22475 \begin_inset Flex Code
22478 \begin_layout Plain Layout
22479 font-family: sans-serif;
22485 \begin_inset Quotes erd
22489 The correspondence of \SpecialChar LyX
22490 sizes and CSS sizes is a little less obvious but
22491 nonetheless intuitive.
22493 \begin_inset Flex Code
22496 \begin_layout Plain Layout
22503 \begin_inset Flex URL
22506 \begin_layout Plain Layout
22516 \begin_layout Chapter
22517 Including External Material
22518 \begin_inset CommandInset label
22520 name "chap:Including-External-Material"
22527 \begin_layout Standard
22528 \begin_inset Box Shadowbox
22538 height_special "totalheight"
22543 backgroundcolor "none"
22546 \begin_layout Plain Layout
22547 WARNING: This portion of the documentation has not been updated for some
22549 We certainly hope that it is still accurate, but there are no guarantees.
22557 \begin_layout Standard
22558 The use of material from sources external to \SpecialChar LyX
22559 is covered in detail in the
22565 This part of the manual covers what needs to happen behind the scenes for
22566 new sorts of material to be included.
22569 \begin_layout Section
22573 \begin_layout Standard
22574 The external material feature is based on the concept of a
22579 A template is a specification of how \SpecialChar LyX
22580 should interface with a certain kind
22582 As bundled, \SpecialChar LyX
22583 comes with predefined templates for Xfig figures, various
22584 raster format images, chess diagrams, and LilyPond music notation.
22585 You can check the actual list by using the menu
22586 \begin_inset Flex Noun
22589 \begin_layout Plain Layout
22590 Insert\SpecialChar menuseparator
22591 File\SpecialChar menuseparator
22598 Furthermore, it is possible to roll your own template to support a specific
22600 Later we'll describe in more detail what is involved, and hopefully you
22601 will submit all the templates you create so we can include them in a later
22606 \begin_layout Standard
22607 Another basic idea of the external material feature is to distinguish between
22608 the original file that serves as a base for final material and the produced
22609 file that is included in your exported or printed document.
22610 For example, consider the case of a figure produced with
22611 \begin_inset Flex Code
22614 \begin_layout Plain Layout
22621 The Xfig application itself works on an original file with the
22622 \begin_inset Flex Code
22625 \begin_layout Plain Layout
22632 Within Xfig, you create and change your figure, and when you are done,
22634 \begin_inset Flex Code
22637 \begin_layout Plain Layout
22644 When you want to include the figure in your document, you invoke
22645 \begin_inset Flex Code
22648 \begin_layout Plain Layout
22654 in order to create a PostScript file that can readily be included in your
22658 \begin_inset Flex Code
22661 \begin_layout Plain Layout
22667 file is the original file, and the PostScript file is the produced file.
22670 \begin_layout Standard
22671 This distinction is important in order to allow updating of the material
22672 while you are in the process of writing the document.
22673 Furthermore, it provides us with the flexibility that is needed to support
22674 multiple export formats.
22675 For instance, in the case of a plain text file, it is not exactly an award-winn
22676 ing idea to include the figure as raw PostScript.
22677 Instead, you would either prefer to just include a reference to the figure
22678 or try to invoke some graphics to ASCII converter to make the final result
22679 look similar to the real graphics.
22680 The external material management allows you to do this, because it is parametri
22681 zed on the different export formats that \SpecialChar LyX
22685 \begin_layout Standard
22686 Besides supporting the production of different products according to the
22687 exported format, it supports tight integration with editing and viewing
22689 In the case of an Xfig figure, you are able to invoke Xfig on the original
22690 file with a single click from within the external material dialog in \SpecialChar LyX
22692 and also preview the produced PostScript file with Ghostview with another
22694 No more fiddling around with the command line and/or file browsers to locate
22695 and manipulate the original or produced files.
22696 In this way, you are finally able to take full advantage of the many different
22697 applications that are relevant to use when you write your documents, and
22698 ultimately be more productive.
22701 \begin_layout Section
22702 The external template configuration file
22705 \begin_layout Standard
22706 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22708 However, be aware that doing this in an careless manner most probably
22712 introduce an easily exploitable security hole.
22713 So before you do this, please read the discussion about security in
22714 \begin_inset CommandInset ref
22716 reference "sec:Security-discussion"
22723 \begin_layout Standard
22724 Having said that, we encourage you to submit any interesting templates that
22729 \begin_layout Standard
22730 The external templates are defined in the
22731 \begin_inset Flex Code
22734 \begin_layout Plain Layout
22735 LyXDir/lib/external_templates
22741 You can place your own version in
22742 \begin_inset Flex Code
22745 \begin_layout Plain Layout
22746 UserDir/external_templates
22754 \begin_layout Standard
22755 A typical template looks like this:
22758 \begin_layout LyX-Code
22762 \begin_layout LyX-Code
22763 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22766 \begin_layout LyX-Code
22770 \begin_layout LyX-Code
22774 \begin_layout LyX-Code
22778 \begin_layout LyX-Code
22782 \begin_layout LyX-Code
22786 \begin_layout LyX-Code
22787 AutomaticProduction true
22790 \begin_layout LyX-Code
22794 \begin_layout LyX-Code
22798 \begin_layout LyX-Code
22799 Format \SpecialChar LaTeX
22803 \begin_layout LyX-Code
22804 TransformCommand Rotate RotationLatexCommand
22807 \begin_layout LyX-Code
22808 TransformCommand Resize ResizeLatexCommand
22811 \begin_layout LyX-Code
22812 Product "$$RotateFront$$ResizeFront
22815 \begin_layout LyX-Code
22820 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22823 \begin_layout LyX-Code
22824 $$ResizeBack$$RotateBack"
22827 \begin_layout LyX-Code
22831 \begin_layout LyX-Code
22832 UpdateResult "$$AbsPath$$Basename.pstex_t"
22835 \begin_layout LyX-Code
22836 Requirement "graphicx"
22839 \begin_layout LyX-Code
22840 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22843 \begin_layout LyX-Code
22844 ReferencedFile latex "$$AbsPath$$Basename.eps"
22847 \begin_layout LyX-Code
22848 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22851 \begin_layout LyX-Code
22855 \begin_layout LyX-Code
22856 Format PDF\SpecialChar LaTeX
22860 \begin_layout LyX-Code
22861 TransformCommand Rotate RotationLatexCommand
22864 \begin_layout LyX-Code
22865 TransformCommand Resize ResizeLatexCommand
22868 \begin_layout LyX-Code
22869 Product "$$RotateFront$$ResizeFront
22872 \begin_layout LyX-Code
22877 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22880 \begin_layout LyX-Code
22881 $$ResizeBack$$RotateBack"
22884 \begin_layout LyX-Code
22885 UpdateFormat pdftex
22888 \begin_layout LyX-Code
22889 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22892 \begin_layout LyX-Code
22893 Requirement "graphicx"
22896 \begin_layout LyX-Code
22897 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22900 \begin_layout LyX-Code
22901 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22904 \begin_layout LyX-Code
22908 \begin_layout LyX-Code
22912 \begin_layout LyX-Code
22913 Product "$$Contents(
22915 "$$AbsPath$$Basename.asc
22920 \begin_layout LyX-Code
22921 UpdateFormat asciixfig
22924 \begin_layout LyX-Code
22925 UpdateResult "$$AbsPath$$Basename.asc"
22928 \begin_layout LyX-Code
22932 \begin_layout LyX-Code
22936 \begin_layout LyX-Code
22937 Product "<graphic fileref=
22939 "$$AbsOrRelPathMaster$$Basename.eps
22944 \begin_layout LyX-Code
22948 \begin_layout LyX-Code
22952 \begin_layout LyX-Code
22953 UpdateResult "$$AbsPath$$Basename.eps"
22956 \begin_layout LyX-Code
22957 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22960 \begin_layout LyX-Code
22961 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22964 \begin_layout LyX-Code
22968 \begin_layout LyX-Code
22969 Product "[XFig: $$FName]"
22972 \begin_layout LyX-Code
22976 \begin_layout LyX-Code
22980 \begin_layout Standard
22981 As you can see, the template is enclosed in
22982 \begin_inset Flex Code
22985 \begin_layout Plain Layout
22993 \begin_inset Flex Code
22996 \begin_layout Plain Layout
23003 It contains a header specifying some general settings and, for each supported
23004 primary document file format, a section
23005 \begin_inset Flex Code
23008 \begin_layout Plain Layout
23016 \begin_inset Flex Code
23019 \begin_layout Plain Layout
23028 \begin_layout Subsection
23029 The template header
23032 \begin_layout Description
23033 \begin_inset Flex Code
23036 \begin_layout Plain Layout
23037 AutomaticProduction
23038 \begin_inset space ~
23046 Whether the file represented by the template must be generated by \SpecialChar LyX
23048 This command must occur exactly once.
23051 \begin_layout Description
23052 \begin_inset Flex Code
23055 \begin_layout Plain Layout
23057 \begin_inset space ~
23065 A glob pattern that is used in the file dialog to filter out the desired
23067 If there is more than one possible file extension (e.
23068 \begin_inset space \thinspace{}
23072 \begin_inset space \space{}
23076 \begin_inset Flex Code
23079 \begin_layout Plain Layout
23086 \begin_inset Flex Code
23089 \begin_layout Plain Layout
23095 ), use something like
23096 \begin_inset Flex Code
23099 \begin_layout Plain Layout
23106 This command must occur exactly once.
23109 \begin_layout Description
23110 \begin_inset Flex Code
23113 \begin_layout Plain Layout
23115 \begin_inset space ~
23123 The text that is displayed on the button.
23124 This command must occur exactly once.
23127 \begin_layout Description
23128 \begin_inset Flex Code
23131 \begin_layout Plain Layout
23133 \begin_inset space ~
23137 \begin_inset space ~
23145 The help text that is used in the External dialog.
23146 Provide enough information to explain to the user just what the template
23147 can provide him with.
23148 This command must occur exactly once.
23151 \begin_layout Description
23152 \begin_inset Flex Code
23155 \begin_layout Plain Layout
23157 \begin_inset space ~
23165 The file format of the original file.
23166 This must be the name of a format that is known to \SpecialChar LyX
23168 \begin_inset CommandInset ref
23170 reference "sec:Formats"
23176 \begin_inset Quotes eld
23180 \begin_inset Flex Code
23183 \begin_layout Plain Layout
23190 \begin_inset Quotes erd
23193 if the template can handle original files of more than one format.
23195 will attempt to interrogate the file itself in order to deduce its format
23197 This command must occur exactly once.
23200 \begin_layout Description
23201 \begin_inset Flex Code
23204 \begin_layout Plain Layout
23206 \begin_inset space ~
23214 A unique name for the template.
23215 It must not contain substitution macros (see below).
23218 \begin_layout Description
23219 \begin_inset Flex Code
23222 \begin_layout Plain Layout
23224 \begin_inset space ~
23227 Rotate|Resize|Clip|Extra
23232 This command specifies which transformations are supported by this template.
23233 It may occur zero or more times.
23234 This command enables the corresponding tabs in the external dialog.
23236 \begin_inset Flex Code
23239 \begin_layout Plain Layout
23245 command must have either a corresponding
23246 \begin_inset Flex Code
23249 \begin_layout Plain Layout
23256 \begin_inset Flex Code
23259 \begin_layout Plain Layout
23266 \begin_inset Flex Code
23269 \begin_layout Plain Layout
23276 Otherwise the transformation will not be supported by that format.
23279 \begin_layout Subsection
23283 \begin_layout Description
23284 \begin_inset Flex Code
23287 \begin_layout Plain Layout
23289 \begin_inset space ~
23292 LaTeX|PDFLaTeX|PlainText|DocBook
23297 The primary document file format that this format definition is for.
23298 Not every template has a sensible representation in all document file formats.
23299 Please define nevertheless a
23300 \begin_inset Flex Code
23303 \begin_layout Plain Layout
23309 section for all templates.
23310 Use a dummy text when no representation is available.
23311 Then you can at least see a reference to the external material in the exported
23315 \begin_layout Description
23316 \begin_inset Flex Code
23319 \begin_layout Plain Layout
23321 \begin_inset space ~
23325 \begin_inset space ~
23333 This command defines an additional macro
23334 \begin_inset Flex Code
23337 \begin_layout Plain Layout
23343 for substitution in
23344 \begin_inset Flex Code
23347 \begin_layout Plain Layout
23355 \begin_inset Flex Code
23358 \begin_layout Plain Layout
23364 itself may contain substitution macros.
23365 The advantage over using
23366 \begin_inset Flex Code
23369 \begin_layout Plain Layout
23376 \begin_inset Flex Code
23379 \begin_layout Plain Layout
23385 is that the substituted value of
23386 \begin_inset Flex Code
23389 \begin_layout Plain Layout
23395 is sanitized so that it is a valid optional argument in the document format.
23396 This command may occur zero or more times.
23399 \begin_layout Description
23400 \begin_inset Flex Code
23403 \begin_layout Plain Layout
23405 \begin_inset space ~
23413 The text that is inserted in the exported document.
23414 This is actually the most important command and can be quite complex.
23415 This command must occur exactly once.
23418 \begin_layout Description
23419 \begin_inset Flex Code
23422 \begin_layout Plain Layout
23424 \begin_inset space ~
23432 This command specifies a preamble snippet that will be included in the
23435 It has to be defined using
23436 \begin_inset Flex Code
23439 \begin_layout Plain Layout
23447 \begin_inset Flex Code
23450 \begin_layout Plain Layout
23457 This command may occur zero or more times.
23460 \begin_layout Description
23461 \begin_inset Flex Code
23464 \begin_layout Plain Layout
23466 \begin_inset space ~
23470 \begin_inset space ~
23478 This command denotes files that are created by the conversion process and
23479 are needed for a particular export format.
23480 If the filename is relative, it is interpreted relative to the master document.
23481 This command may be given zero or more times.
23484 \begin_layout Description
23485 \begin_inset Flex Code
23488 \begin_layout Plain Layout
23490 \begin_inset space ~
23498 The name of a required \SpecialChar LaTeX
23500 The package is included via
23501 \begin_inset Flex Code
23504 \begin_layout Plain Layout
23512 in the \SpecialChar LaTeX
23514 This command may occur zero or more times.
23517 \begin_layout Description
23518 \begin_inset Flex Code
23521 \begin_layout Plain Layout
23523 \begin_inset space ~
23527 \begin_inset space ~
23530 RotationLatexCommand
23535 This command specifies that the built in \SpecialChar LaTeX
23536 command should be used for rotation.
23537 This command may occur once or not at all.
23540 \begin_layout Description
23541 \begin_inset Flex Code
23544 \begin_layout Plain Layout
23546 \begin_inset space ~
23550 \begin_inset space ~
23558 This command specifies that the built in \SpecialChar LaTeX
23559 command should be used for resizing.
23560 This command may occur once or not at all.
23563 \begin_layout Description
23564 \begin_inset Flex Code
23567 \begin_layout Plain Layout
23569 \begin_inset space ~
23573 \begin_inset space ~
23576 RotationLatexOption
23581 This command specifies that rotation is done via an optional argument.
23582 This command may occur once or not at all.
23585 \begin_layout Description
23586 \begin_inset Flex Code
23589 \begin_layout Plain Layout
23591 \begin_inset space ~
23595 \begin_inset space ~
23603 This command specifies that resizing is done via an optional argument.
23604 This command may occur once or not at all.
23607 \begin_layout Description
23608 \begin_inset Flex Code
23611 \begin_layout Plain Layout
23613 \begin_inset space ~
23617 \begin_inset space ~
23625 This command specifies that clipping is done via an optional argument.
23626 This command may occur once or not at all.
23629 \begin_layout Description
23630 \begin_inset Flex Code
23633 \begin_layout Plain Layout
23635 \begin_inset space ~
23639 \begin_inset space ~
23647 This command specifies that an extra optional argument is used.
23648 This command may occur once or not at all.
23651 \begin_layout Description
23652 \begin_inset Flex Code
23655 \begin_layout Plain Layout
23657 \begin_inset space ~
23665 The file format of the converted file.
23666 This must be the name of a format that is known to \SpecialChar LyX
23668 \begin_inset Flex Noun
23671 \begin_layout Plain Layout
23672 Tools\SpecialChar menuseparator
23673 Preferences\SpecialChar menuseparator
23674 File Handling\SpecialChar menuseparator
23681 This command must occur exactly once.
23682 If the resulting file format is PDF, you need to specify the format
23683 \begin_inset Flex Code
23686 \begin_layout Plain Layout
23693 This is the PDF format used for including graphics.
23694 The other defined PDF formats are for document export.
23697 \begin_layout Description
23698 \begin_inset Flex Code
23701 \begin_layout Plain Layout
23703 \begin_inset space ~
23711 The file name of the converted file.
23712 The file name must be absolute.
23713 This command must occur exactly once.
23716 \begin_layout Subsection
23717 Preamble definitions
23720 \begin_layout Standard
23721 The external template configuration file may contain additional preamble
23722 definitions enclosed by
23723 \begin_inset Flex Code
23726 \begin_layout Plain Layout
23734 \begin_inset Flex Code
23737 \begin_layout Plain Layout
23744 They can be used by the templates in the
23745 \begin_inset Flex Code
23748 \begin_layout Plain Layout
23757 \begin_layout Section
23758 The substitution mechanism
23761 \begin_layout Standard
23762 When the external material facility invokes an external program, it is done
23763 on the basis of a command defined in the template configuration file.
23764 These commands can contain various macros that are expanded before execution.
23765 Execution always take place in the directory of the containing document.
23768 \begin_layout Standard
23769 Also, whenever external material is to be displayed, the name will be produced
23770 by the substitution mechanism, and most other commands in the template
23771 definition support substitution as well.
23774 \begin_layout Standard
23775 The available macros are the following:
23778 \begin_layout Description
23779 \begin_inset Flex Code
23782 \begin_layout Plain Layout
23783 $$AbsOrRelPathMaster
23788 The file path, absolute or relative to the master \SpecialChar LyX
23792 \begin_layout Description
23793 \begin_inset Flex Code
23796 \begin_layout Plain Layout
23797 $$AbsOrRelPathParent
23802 The file path, absolute or relative to the \SpecialChar LyX
23806 \begin_layout Description
23807 \begin_inset Flex Code
23810 \begin_layout Plain Layout
23816 The absolute file path.
23819 \begin_layout Description
23820 \begin_inset Flex Code
23823 \begin_layout Plain Layout
23829 The filename without path and without the extension.
23832 \begin_layout Description
23833 \begin_inset Flex Code
23836 \begin_layout Plain Layout
23838 \begin_inset Quotes eld
23842 \begin_inset Quotes erd
23850 This macro will expand to the contents of the file with the name
23851 \begin_inset Flex Code
23854 \begin_layout Plain Layout
23863 \begin_layout Description
23864 \begin_inset Flex Code
23867 \begin_layout Plain Layout
23873 The file extension (including the dot).
23876 \begin_layout Description
23877 \begin_inset Flex Code
23880 \begin_layout Plain Layout
23886 This will be the string
23887 \begin_inset Quotes eld
23891 \begin_inset Quotes erd
23894 if the file is in JPEG format, otherwise it will be the string
23895 \begin_inset Quotes eld
23899 \begin_inset Quotes erd
23903 This is useful to avoid uneeded conversions for output formats that support
23904 both PNG and JPEG fomats.
23905 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
23910 \begin_layout Description
23911 \begin_inset Flex Code
23914 \begin_layout Plain Layout
23920 The filename of the file specified in the external material dialog.
23921 This is either an absolute name, or it is relative to the \SpecialChar LyX
23925 \begin_layout Description
23926 \begin_inset Flex Code
23929 \begin_layout Plain Layout
23936 \begin_inset Flex Code
23939 \begin_layout Plain Layout
23945 (absolute name or relative to the \SpecialChar LyX
23949 \begin_layout Description
23950 \begin_inset Flex Code
23953 \begin_layout Plain Layout
23959 The file path, relative to the master \SpecialChar LyX
23963 \begin_layout Description
23964 \begin_inset Flex Code
23967 \begin_layout Plain Layout
23973 The file path, relative to the \SpecialChar LyX
23977 \begin_layout Description
23978 \begin_inset Flex Code
23981 \begin_layout Plain Layout
23987 This macro will expand to the absolute path of the system directory.
23988 This is typically used to point to the various helper scripts that are
23989 bundled with \SpecialChar LyX
23993 \begin_layout Description
23994 \begin_inset Flex Code
23997 \begin_layout Plain Layout
24003 A name and full path to a temporary file which will be automatically deleted
24004 whenever the containing document is closed, or the external material insertion
24008 \begin_layout Standard
24009 All path macros contain a trailing directory separator, so you can construct
24011 \begin_inset space \thinspace{}
24015 \begin_inset space \space{}
24018 the absolute filename with
24019 \begin_inset Flex Code
24022 \begin_layout Plain Layout
24023 $$AbsPath$$Basename$$Extension
24031 \begin_layout Standard
24032 The macros above are substituted in all commands unless otherwise noted.
24034 \begin_inset Flex Code
24037 \begin_layout Plain Layout
24043 supports additionally the following substitutions if they are enabled by
24045 \begin_inset Flex Code
24048 \begin_layout Plain Layout
24055 \begin_inset Flex Code
24058 \begin_layout Plain Layout
24067 \begin_layout Description
24068 \begin_inset Flex Code
24071 \begin_layout Plain Layout
24077 The front part of the resize command.
24080 \begin_layout Description
24081 \begin_inset Flex Code
24084 \begin_layout Plain Layout
24090 The back part of the resize command.
24093 \begin_layout Description
24094 \begin_inset Flex Code
24097 \begin_layout Plain Layout
24103 The front part of the rotation command.
24106 \begin_layout Description
24107 \begin_inset Flex Code
24110 \begin_layout Plain Layout
24116 The back part of the rotation command.
24119 \begin_layout Standard
24120 The value string of the
24121 \begin_inset Flex Code
24124 \begin_layout Plain Layout
24130 command supports additionally the following substitutions if they are enabled
24132 \begin_inset Flex Code
24135 \begin_layout Plain Layout
24142 \begin_inset Flex Code
24145 \begin_layout Plain Layout
24154 \begin_layout Description
24155 \begin_inset Flex Code
24158 \begin_layout Plain Layout
24167 \begin_layout Description
24168 \begin_inset Flex Code
24171 \begin_layout Plain Layout
24180 \begin_layout Description
24181 \begin_inset Flex Code
24184 \begin_layout Plain Layout
24193 \begin_layout Description
24194 \begin_inset Flex Code
24197 \begin_layout Plain Layout
24203 The rotation option.
24206 \begin_layout Standard
24207 You may ask why there are so many path macros.
24208 There are mainly two reasons:
24211 \begin_layout Enumerate
24212 Relative and absolute file names should remain relative or absolute, respectivel
24214 Users may have reasons to prefer either form.
24215 Relative names are useful for portable documents that should work on different
24216 machines, for example.
24217 Absolute names may be required by some programs.
24220 \begin_layout Enumerate
24222 treats relative file names differently than \SpecialChar LyX
24223 and other programs in nested
24225 For \SpecialChar LyX
24226 , a relative file name is always relative to the document that contains
24228 For \SpecialChar LaTeX
24229 , it is always relative to the master document.
24230 These two definitions are identical if you have only one document, but
24231 differ if you have a master document that includes part documents.
24232 That means that relative filenames must be transformed when presented to
24235 Fortunately \SpecialChar LyX
24236 does this automatically for you if you choose the right macros.
24239 \begin_layout Standard
24240 So which path macro should be used in new template definitions? The rule
24244 \begin_layout Itemize
24246 \begin_inset Flex Code
24249 \begin_layout Plain Layout
24255 if an absolute path is required.
24258 \begin_layout Itemize
24260 \begin_inset Flex Code
24263 \begin_layout Plain Layout
24264 $$AbsOrRelPathMaster
24269 if the substituted string is some kind of \SpecialChar LaTeX
24273 \begin_layout Itemize
24275 \begin_inset Flex Code
24278 \begin_layout Plain Layout
24279 $$AbsOrRelPathParent
24284 in order to preserve the user's choice.
24287 \begin_layout Standard
24288 There are special cases where this rule does not work and e.
24289 \begin_inset space \thinspace{}
24293 \begin_inset space \space{}
24296 relative names are needed, but normally it will work just fine.
24297 One example for such a case is the command
24298 \begin_inset Flex Code
24301 \begin_layout Plain Layout
24302 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24307 in the XFig template above: We can't use the absolute name because the
24309 \begin_inset Flex Code
24312 \begin_layout Plain Layout
24318 files needs the relative name in order to rewrite the file content.
24321 \begin_layout Section
24322 Security discussion
24323 \begin_inset CommandInset label
24325 name "sec:Security-discussion"
24332 \begin_layout Standard
24333 The external material feature interfaces with a lot of external programs
24334 and does so automatically, so we have to consider the security implications
24336 In particular, since you have the option of including your own filenames
24337 and/or parameter strings and those are expanded into a command, it seems
24338 that it would be possible to create a malicious document which executes
24339 arbitrary commands when a user views or prints the document.
24340 This is something we definitely want to avoid.
24343 \begin_layout Standard
24344 However, since the external program commands are specified in the template
24345 configuration file only, there are no security issues if \SpecialChar LyX
24346 is properly configure
24347 d with safe templates only.
24348 This is so because the external programs are invoked with the
24349 \begin_inset Flex Code
24352 \begin_layout Plain Layout
24358 -system call rather than the
24359 \begin_inset Flex Code
24362 \begin_layout Plain Layout
24368 system-call, so it's not possible to execute arbitrary commands from the
24369 filename or parameter section via the shell.
24372 \begin_layout Standard
24373 This also implies that you are restricted in what command strings you can
24374 use in the external material templates.
24375 In particular, pipes and redirection are not readily available.
24376 This has to be so if \SpecialChar LyX
24377 should remain safe.
24378 If you want to use some of the shell features, you should write a safe
24379 script to do this in a controlled manner, and then invoke the script from
24380 the command string.
24384 \begin_layout Standard
24385 It is possible to design a template that interacts directly with the shell,
24386 but since this would allow a malicious user to execute arbitrary commands
24387 by writing clever filenames and/or parameters, we generally recommend that
24388 you only use safe scripts that work with the
24389 \begin_inset Flex Code
24392 \begin_layout Plain Layout
24398 system call in a controlled manner.
24399 Of course, for use in a controlled environment, it can be tempting to just
24400 fall back to use ordinary shell scripts.
24401 If you do so, be aware that you
24405 provide an easily exploitable security hole in your system.
24406 Of course it stands to reason that such unsafe templates will never be
24407 included in the standard \SpecialChar LyX
24408 distribution, although we do encourage people
24409 to submit new templates in the open source tradition.
24410 But \SpecialChar LyX
24411 as shipped from the official distribution channels will never have
24415 \begin_layout Standard
24416 Including external material provides a lot of power, and you have to be
24417 careful not to introduce security hazards with this power.
24418 A subtle error in a single line in an innocent looking script can open
24419 the door to huge security problems.
24420 So if you do not fully understand the issues, we recommend that you consult
24421 a knowledgeable security professional or the \SpecialChar LyX
24422 development team if you have
24423 any questions about whether a given template is safe or not.
24424 And do this before you use it in an uncontrolled environment.
24427 \begin_layout Chapter
24429 List of supported \SpecialChar LyX
24430 functions to be used in layouts
24431 \begin_inset CommandInset label
24433 name "chap:List-of-functions"
24440 \begin_layout Standard
24442 \begin_inset Tabular
24443 <lyxtabular version="3" rows="11" columns="8">
24444 <features tabularvalignment="middle">
24445 <column alignment="left" valignment="top">
24446 <column alignment="left" valignment="top">
24447 <column alignment="left" valignment="top">
24448 <column alignment="left" valignment="top">
24449 <column alignment="left" valignment="top">
24450 <column alignment="left" valignment="top">
24451 <column alignment="left" valignment="top">
24452 <column alignment="left" valignment="top">
24454 <cell alignment="left" valignment="top" usebox="none">
24457 \begin_layout Plain Layout
24463 <cell alignment="left" valignment="top" usebox="none">
24466 \begin_layout Plain Layout
24472 <cell alignment="left" valignment="top" usebox="none">
24475 \begin_layout Plain Layout
24481 <cell alignment="left" valignment="top" usebox="none">
24484 \begin_layout Plain Layout
24490 <cell alignment="center" valignment="top" usebox="none">
24493 \begin_layout Plain Layout
24499 <cell alignment="center" valignment="top" usebox="none">
24502 \begin_layout Plain Layout
24508 <cell alignment="center" valignment="top" usebox="none">
24511 \begin_layout Plain Layout
24517 <cell alignment="center" valignment="top" usebox="none">
24520 \begin_layout Plain Layout
24528 <cell alignment="left" valignment="top" usebox="none">
24531 \begin_layout Plain Layout
24537 <cell alignment="left" valignment="top" usebox="none">
24540 \begin_layout Plain Layout
24546 <cell alignment="left" valignment="top" usebox="none">
24549 \begin_layout Plain Layout
24555 <cell alignment="left" valignment="top" usebox="none">
24558 \begin_layout Plain Layout
24564 <cell alignment="center" valignment="top" usebox="none">
24567 \begin_layout Plain Layout
24573 <cell alignment="center" valignment="top" usebox="none">
24576 \begin_layout Plain Layout
24582 <cell alignment="center" valignment="top" usebox="none">
24585 \begin_layout Plain Layout
24591 <cell alignment="center" valignment="top" usebox="none">
24594 \begin_layout Plain Layout
24602 <cell alignment="left" valignment="top" usebox="none">
24605 \begin_layout Plain Layout
24611 <cell alignment="left" valignment="top" usebox="none">
24614 \begin_layout Plain Layout
24620 <cell alignment="left" valignment="top" usebox="none">
24623 \begin_layout Plain Layout
24629 <cell alignment="left" valignment="top" usebox="none">
24632 \begin_layout Plain Layout
24638 <cell alignment="center" valignment="top" usebox="none">
24641 \begin_layout Plain Layout
24647 <cell alignment="center" valignment="top" usebox="none">
24650 \begin_layout Plain Layout
24656 <cell alignment="center" valignment="top" usebox="none">
24659 \begin_layout Plain Layout
24665 <cell alignment="center" valignment="top" usebox="none">
24668 \begin_layout Plain Layout
24676 <cell alignment="left" valignment="top" usebox="none">
24679 \begin_layout Plain Layout
24685 <cell alignment="left" valignment="top" usebox="none">
24688 \begin_layout Plain Layout
24694 <cell alignment="left" valignment="top" usebox="none">
24697 \begin_layout Plain Layout
24703 <cell alignment="left" valignment="top" usebox="none">
24706 \begin_layout Plain Layout
24712 <cell alignment="center" valignment="top" usebox="none">
24715 \begin_layout Plain Layout
24721 <cell alignment="center" valignment="top" usebox="none">
24724 \begin_layout Plain Layout
24730 <cell alignment="center" valignment="top" usebox="none">
24733 \begin_layout Plain Layout
24739 <cell alignment="center" valignment="top" usebox="none">
24742 \begin_layout Plain Layout
24750 <cell alignment="left" valignment="top" usebox="none">
24753 \begin_layout Plain Layout
24759 <cell alignment="left" valignment="top" usebox="none">
24762 \begin_layout Plain Layout
24768 <cell alignment="left" valignment="top" usebox="none">
24771 \begin_layout Plain Layout
24777 <cell alignment="left" valignment="top" usebox="none">
24780 \begin_layout Plain Layout
24786 <cell alignment="center" valignment="top" usebox="none">
24789 \begin_layout Plain Layout
24795 <cell alignment="center" valignment="top" usebox="none">
24798 \begin_layout Plain Layout
24804 <cell alignment="center" valignment="top" usebox="none">
24807 \begin_layout Plain Layout
24813 <cell alignment="center" valignment="top" usebox="none">
24816 \begin_layout Plain Layout
24824 <cell alignment="left" valignment="top" usebox="none">
24827 \begin_layout Plain Layout
24833 <cell alignment="left" valignment="top" usebox="none">
24836 \begin_layout Plain Layout
24842 <cell alignment="left" valignment="top" usebox="none">
24845 \begin_layout Plain Layout
24851 <cell alignment="left" valignment="top" usebox="none">
24854 \begin_layout Plain Layout
24860 <cell alignment="center" valignment="top" usebox="none">
24863 \begin_layout Plain Layout
24869 <cell alignment="center" valignment="top" usebox="none">
24872 \begin_layout Plain Layout
24878 <cell alignment="center" valignment="top" usebox="none">
24881 \begin_layout Plain Layout
24887 <cell alignment="center" valignment="top" usebox="none">
24890 \begin_layout Plain Layout
24898 <cell alignment="left" valignment="top" usebox="none">
24901 \begin_layout Plain Layout
24907 <cell alignment="left" valignment="top" usebox="none">
24910 \begin_layout Plain Layout
24916 <cell alignment="left" valignment="top" usebox="none">
24919 \begin_layout Plain Layout
24925 <cell alignment="left" valignment="top" usebox="none">
24928 \begin_layout Plain Layout
24934 <cell alignment="center" valignment="top" usebox="none">
24937 \begin_layout Plain Layout
24943 <cell alignment="center" valignment="top" usebox="none">
24946 \begin_layout Plain Layout
24952 <cell alignment="center" valignment="top" usebox="none">
24955 \begin_layout Plain Layout
24961 <cell alignment="center" valignment="top" usebox="none">
24964 \begin_layout Plain Layout
24972 <cell alignment="left" valignment="top" usebox="none">
24975 \begin_layout Plain Layout
24981 <cell alignment="left" valignment="top" usebox="none">
24984 \begin_layout Plain Layout
24990 <cell alignment="left" valignment="top" usebox="none">
24993 \begin_layout Plain Layout
24999 <cell alignment="left" valignment="top" usebox="none">
25002 \begin_layout Plain Layout
25008 <cell alignment="center" valignment="top" usebox="none">
25011 \begin_layout Plain Layout
25017 <cell alignment="center" valignment="top" usebox="none">
25020 \begin_layout Plain Layout
25026 <cell alignment="center" valignment="top" usebox="none">
25029 \begin_layout Plain Layout
25035 <cell alignment="center" valignment="top" usebox="none">
25038 \begin_layout Plain Layout
25046 <cell alignment="left" valignment="top" usebox="none">
25049 \begin_layout Plain Layout
25055 <cell alignment="left" valignment="top" usebox="none">
25058 \begin_layout Plain Layout
25064 <cell alignment="left" valignment="top" usebox="none">
25067 \begin_layout Plain Layout
25073 <cell alignment="left" valignment="top" usebox="none">
25076 \begin_layout Plain Layout
25082 <cell alignment="center" valignment="top" usebox="none">
25085 \begin_layout Plain Layout
25091 <cell alignment="center" valignment="top" usebox="none">
25094 \begin_layout Plain Layout
25100 <cell alignment="center" valignment="top" usebox="none">
25103 \begin_layout Plain Layout
25109 <cell alignment="center" valignment="top" usebox="none">
25112 \begin_layout Plain Layout
25120 <cell alignment="left" valignment="top" usebox="none">
25123 \begin_layout Plain Layout
25129 <cell alignment="left" valignment="top" usebox="none">
25132 \begin_layout Plain Layout
25138 <cell alignment="left" valignment="top" usebox="none">
25141 \begin_layout Plain Layout
25147 <cell alignment="left" valignment="top" usebox="none">
25150 \begin_layout Plain Layout
25156 <cell alignment="center" valignment="top" usebox="none">
25159 \begin_layout Plain Layout
25165 <cell alignment="center" valignment="top" usebox="none">
25168 \begin_layout Plain Layout
25174 <cell alignment="center" valignment="top" usebox="none">
25177 \begin_layout Plain Layout
25183 <cell alignment="center" valignment="top" usebox="none">
25186 \begin_layout Plain Layout
25194 <cell alignment="center" valignment="top" usebox="none">
25197 \begin_layout Plain Layout
25203 <cell alignment="center" valignment="top" usebox="none">
25206 \begin_layout Plain Layout
25212 <cell alignment="center" valignment="top" usebox="none">
25215 \begin_layout Plain Layout
25221 <cell alignment="center" valignment="top" usebox="none">
25224 \begin_layout Plain Layout
25230 <cell alignment="center" valignment="top" usebox="none">
25233 \begin_layout Plain Layout
25239 <cell alignment="center" valignment="top" usebox="none">
25242 \begin_layout Plain Layout
25248 <cell alignment="center" valignment="top" usebox="none">
25251 \begin_layout Plain Layout
25257 <cell alignment="center" valignment="top" usebox="none">
25260 \begin_layout Plain Layout
25274 \begin_layout Chapter
25275 Names of available colors to be used in layouts
25276 \begin_inset CommandInset label
25278 name "chap:Names-of-colors"
25285 \begin_layout Standard
25286 The colors listed here are the standard colors and the those that you can
25287 adjust in the \SpecialChar LyX
25291 \begin_layout Description
25304 No particular color – clear or default
25307 \begin_layout Description
25311 \begin_layout Description
25315 \begin_layout Description
25319 \begin_layout Description
25323 \begin_layout Description
25327 \begin_layout Description
25331 \begin_layout Description
25335 \begin_layout Description
25339 \begin_layout Description
25340 added_space Added space marker color
25343 \begin_layout Description
25344 addedtext Added text color
25347 \begin_layout Description
25348 appendix Appendix marker color
25351 \begin_layout Description
25352 background Background color
25355 \begin_layout Description
25356 bottomarea Bottom area color
25359 \begin_layout Description
25360 branchlabel Label color for branches
25363 \begin_layout Description
25364 buttonbg Color used for bottom background
25367 \begin_layout Description
25368 buttonhoverbg Color used for button background under focus
25371 \begin_layout Description
25372 buttonframe Color for inset button frames
25375 \begin_layout Description
25376 changebar Changebar color
25379 \begin_layout Description
25380 changedtextauthor1 Changed text color author 1
25383 \begin_layout Description
25384 changedtextauthor2 Changed text color author 2
25387 \begin_layout Description
25388 changedtextauthor3 Changed text color author 3
25391 \begin_layout Description
25392 changedtextauthor4 Changed text color author 4
25395 \begin_layout Description
25396 changedtextauthor5 Changed text color author 5
25399 \begin_layout Description
25400 collapsable_inset_frame Collapsable insets framecolor
25403 \begin_layout Description
25404 collapsable_inset_text Collapsable insets text color
25407 \begin_layout Description
25408 command Text color for command insets
25411 \begin_layout Description
25412 commandbg Background color for command insets
25415 \begin_layout Description
25416 commandframe Frame color for command insets
25419 \begin_layout Description
25420 comment color for comments
25423 \begin_layout Description
25424 commentbg Background color of comments
25427 \begin_layout Description
25428 cursor Cursor color
25431 \begin_layout Description
25432 deletedtext Deleted text color
25435 \begin_layout Description
25436 deletedtextmodifier Deleted text modifying color
25439 \begin_layout Description
25440 depthbar Color for the depth bars in the margin
25443 \begin_layout Description
25444 eolmarker End of line marker color
25447 \begin_layout Description
25448 error Color of the \SpecialChar LaTeX
25452 \begin_layout Description
25453 footlabel Label color for footnotes
25456 \begin_layout Description
25457 graphicsbg Graphics inset background color
25460 \begin_layout Description
25461 greyedout Label color for greyedout insets
25464 \begin_layout Description
25465 greyedoutbg Background color of greyedout inset
25468 \begin_layout Description
25469 greyedouttext Color for greyedout inset text
25472 \begin_layout Description
25473 indexlabel Label color for index insets
25476 \begin_layout Description
25477 ignore The color is ignored
25480 \begin_layout Description
25481 inherit The color is inherited
25484 \begin_layout Description
25485 inlinecompletion Inline completion color
25488 \begin_layout Description
25489 insetbg Inset marker background color
25492 \begin_layout Description
25493 insetframe Inset marker frame color
25496 \begin_layout Description
25497 language Color for marking foreign language words
25500 \begin_layout Description
25501 latex Text color in \SpecialChar LaTeX
25505 \begin_layout Description
25506 listingsbg Background color of listings inset
25509 \begin_layout Description
25510 marginlabel Label color for margin notes
25513 \begin_layout Description
25514 math Math inset text color
25517 \begin_layout Description
25518 mathbg Math inset background color
25521 \begin_layout Description
25522 mathcorners Math inset frame color not under focus
25525 \begin_layout Description
25526 mathframe Math inset frame color under focus
25529 \begin_layout Description
25530 mathline Math line color
25533 \begin_layout Description
25534 mathmacrobg Macro math inset background color
25537 \begin_layout Description
25538 mathmacroblend Macro math blended color
25541 \begin_layout Description
25542 mathmacroframe Macro math frame color
25545 \begin_layout Description
25546 mathmacrohoverbg Macro math inset background color hovered
25549 \begin_layout Description
25550 mathmacrolabel Macro math label color
25553 \begin_layout Description
25554 mathmacronewarg Macro template color for new parameters
25557 \begin_layout Description
25558 mathmacrooldarg Macro template color for old parameters
25561 \begin_layout Description
25562 newpage New page color
25565 \begin_layout Description
25566 nonunique_inlinecompletion Inline completion color for the non-unique part
25569 \begin_layout Description
25570 notebg Background color of notes
25573 \begin_layout Description
25574 notelabel Label color for notes
25577 \begin_layout Description
25578 pagebreak Page break/line break color
25581 \begin_layout Description
25582 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25585 \begin_layout Description
25586 phantomtext Text color for phantom insets
25589 \begin_layout Description
25590 preview The color used for previews
25593 \begin_layout Description
25594 previewframe Preview frame color
25597 \begin_layout Description
25598 regexpframe Color for regexp frame
25601 \begin_layout Description
25602 selection Background color of selected text
25605 \begin_layout Description
25606 selectiontext Foreground color of selected text
25609 \begin_layout Description
25610 shadedbg Background color of shaded box
25613 \begin_layout Description
25614 special Special chars text color
25617 \begin_layout Description
25618 tabularline Table line color
25621 \begin_layout Description
25622 tabularonoffline Table line color
25625 \begin_layout Description
25626 urllabel Label color for URL insets
25629 \begin_layout Description
25630 urltext Color for URL inset text