1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
8 % DO NOT ALTER THIS PREAMBLE!!!
10 % This preamble is designed to ensure that this document prints
11 % out as advertised. If you mess with this preamble,
12 % parts of this document may not print out as expected. If you
13 % have problems LaTeXing this file, please contact
14 % the documentation team
15 % email: lyx-docs@lists.lyx.org
17 % the pages of the TOC is numbered roman
18 % and a pdf-bookmark for the TOC is added
19 \let\myTOC\tableofcontents
20 \renewcommand\tableofcontents{%
22 \pdfbookmark[1]{\contentsname}{}
26 % increase link area for cross-references and autoname them,
27 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
28 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
29 \@ifpackageloaded{babel}{
30 \addto\extrasenglish{%
31 \renewcommand*{\equationautorefname}[1]{}%
32 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
33 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
34 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
38 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
39 \use_default_options false
43 \maintain_unincluded_children false
45 \language_package default
48 \font_roman "lmodern" "default"
49 \font_sans "lmss" "default"
50 \font_typewriter "lmtt" "default"
51 \font_math "auto" "auto"
52 \font_default_family default
53 \use_non_tex_fonts false
56 \font_sf_scale 100 100
57 \font_tt_scale 100 100
59 \default_output_format default
61 \bibtex_command default
62 \index_command default
66 \pdf_title "LyX Configuration Manual"
67 \pdf_author "LyX Team"
68 \pdf_subject "LyX-documentation Customization"
69 \pdf_keywords "LyX, documentation, customization"
71 \pdf_bookmarksnumbered true
72 \pdf_bookmarksopen true
73 \pdf_bookmarksopenlevel 1
78 \pdf_pdfusetitle false
79 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
82 \use_package amsmath 0
83 \use_package amssymb 0
86 \use_package mathdots 1
87 \use_package mathtools 0
89 \use_package stackrel 0
90 \use_package stmaryrd 0
91 \use_package undertilde 0
93 \cite_engine_type default
97 \paperorientation portrait
112 \paragraph_separation indent
113 \paragraph_indentation default
114 \quotes_language english
117 \paperpagestyle headings
118 \tracking_changes false
119 \output_changes false
123 \author -712698321 "Jürgen Spitzmüller"
124 \author -195340706 "Georg Baum"
125 \author 274215730 "scott"
126 \author 1414654397 "Richard Heck"
132 Customizing \SpecialChar LyX
133 : Features for the Advanced User
137 by the \SpecialChar LyX
142 \begin_layout Plain Layout
144 If you have comments or error corrections, please send them to the \SpecialChar LyX
147 \begin_inset CommandInset href
149 target "lyx-docs@lists.lyx.org"
156 \begin_inset Quotes eld
160 \begin_inset Quotes erd
163 in the subject header, and please cc the current maintainer of this file,
164 Richard Heck <rgheck@comcast.net>.
170 \begin_inset Newline newline
174 \begin_inset Newline newline
180 \begin_layout Standard
181 \begin_inset CommandInset toc
182 LatexCommand tableofcontents
189 \begin_layout Standard
190 \begin_inset Note Note
193 \begin_layout Plain Layout
194 Please use change tracking when modifying this document.
195 This makes it easier for our translators to recognize things that have
196 been changed, and it helps the maintainer keep up-to-date with what's been
205 \begin_layout Chapter
209 \begin_layout Standard
210 This manual covers the customization features present in \SpecialChar LyX
212 In it, we discuss issues like keyboard shortcuts, screen previewing options,
213 printer options, sending commands to \SpecialChar LyX
214 via the \SpecialChar LyX
215 Server, internationalization,
216 installing new \SpecialChar LaTeX
217 classes and \SpecialChar LyX
219 We can't possibly hope to touch on everything you can change—our developers
220 add new features faster than we can document them—but we will explain the
221 most common customizations and hopefully point you in the right direction
222 for some of the more obscure ones.
225 \begin_layout Standard
226 \begin_inset Branch OutDated
229 \begin_layout Standard
230 Information from previous versions of this document that now seems to be
231 outdated is contained in the OutDated branch of this document.
232 By default, this information will not appear in the \SpecialChar LaTeX
241 \begin_layout Chapter
246 \begin_layout Standard
247 This chapter aims to help you to find your way through the \SpecialChar LyX
250 Before continuing to read this chapter, you should find out where your
252 library and user directories are by using
253 \begin_inset Flex Noun
256 \begin_layout Plain Layout
257 Help\SpecialChar menuseparator
268 The library directory is the place where \SpecialChar LyX
269 places its system-wide configuration
270 files; the user directory is where you can place your modified versions.
271 We will call the former
272 \begin_inset Flex Code
275 \begin_layout Plain Layout
282 \begin_inset Flex Noun
285 \begin_layout Plain Layout
291 in the remainder of this document.
295 \begin_layout Section
297 \begin_inset Flex Code
300 \begin_layout Plain Layout
309 \begin_layout Standard
310 \begin_inset Flex Code
313 \begin_layout Plain Layout
319 and its sub-directories contain a number of files and that can be used
320 to customize \SpecialChar LyX
322 You can change many of these files from within \SpecialChar LyX
324 \begin_inset Flex Noun
327 \begin_layout Plain Layout
328 Tools\SpecialChar menuseparator
335 Most customization that you will want to do in \SpecialChar LyX
336 is possible through this
338 However, many other inner aspects of \SpecialChar LyX
339 can be customized by modifying the
341 \begin_inset Flex Code
344 \begin_layout Plain Layout
351 These files fall in different categories, described in the following subsection
355 \begin_layout Subsection
356 Automatically generated files
359 \begin_layout Standard
360 The files, which are to be found in
361 \begin_inset Flex Noun
364 \begin_layout Plain Layout
370 , are generated when you configure \SpecialChar LyX
372 They contain various default values that are guessed by inspection.
373 In general, it is not a good idea to modify them, since they might be overwritt
377 \begin_layout Labeling
378 \labelwidthstring 00.00.0000
379 \begin_inset Flex Code
382 \begin_layout Plain Layout
388 contains defaults for various commands.
391 \begin_layout Labeling
392 \labelwidthstring 00.00.0000
393 \begin_inset Flex Code
396 \begin_layout Plain Layout
402 contains the list of packages that have been recognized by \SpecialChar LyX
404 It is currently unused by the \SpecialChar LyX
405 program itself, but the information extracted,
406 and more, is made available with
407 \begin_inset Flex Noun
410 \begin_layout Plain Layout
411 Help\SpecialChar menuseparator
425 \begin_layout Labeling
426 \labelwidthstring 00.00.0000
427 \begin_inset Flex Code
430 \begin_layout Plain Layout
436 the list of text classes that have been found in your
437 \begin_inset Flex Code
440 \begin_layout Plain Layout
446 directories, along with the associated \SpecialChar LaTeX
447 document class and their description.
450 \begin_layout Labeling
451 \labelwidthstring 00.00.0000
452 \begin_inset Flex Code
455 \begin_layout Plain Layout
461 the list of layout modules found in your
462 \begin_inset Flex Code
465 \begin_layout Plain Layout
474 \begin_layout Labeling
475 \labelwidthstring 00.00.0000
476 \begin_inset Flex Code
479 \begin_layout Plain Layout
485 lists of various sorts of \SpecialChar LaTeX
486 -related files found on your system
489 \begin_layout Labeling
490 \labelwidthstring 00.00.0000
491 \begin_inset Flex Code
494 \begin_layout Plain Layout
495 doc/\SpecialChar LaTeX
501 is automatically generated during configuration from the file
502 \begin_inset Flex Code
505 \begin_layout Plain Layout
513 It contains information on your \SpecialChar LaTeX
517 \begin_layout Subsection
521 \begin_layout Standard
522 These directories are duplicated between
523 \begin_inset Flex Code
526 \begin_layout Plain Layout
533 \begin_inset Flex Code
536 \begin_layout Plain Layout
543 If a particular files exists in both places, the one in
544 \begin_inset Flex Code
547 \begin_layout Plain Layout
556 \begin_layout Labeling
557 \labelwidthstring 00.00.0000
558 \begin_inset Flex Code
561 \begin_layout Plain Layout
567 this directory contains files with the extension
568 \begin_inset Flex Code
571 \begin_layout Plain Layout
577 that define the keybindings used in \SpecialChar LyX
579 If there exists an internationalized version of the bind file named
580 \begin_inset Flex Code
583 \begin_layout Plain Layout
589 , that will be used first.
592 \begin_layout Labeling
593 \labelwidthstring 00.00.0000
594 \begin_inset Flex Code
597 \begin_layout Plain Layout
603 contains graphics files that can be included in documents.
607 \begin_layout Labeling
608 \labelwidthstring 00.00.0000
609 \begin_inset Flex Code
612 \begin_layout Plain Layout
618 contains \SpecialChar LyX
619 documentation files (including the one you are currently reading).
621 \begin_inset Flex Code
624 \begin_layout Plain Layout
631 deserves special attention, as noted above.
632 The internationalized help docs are in subdirectories
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
643 \begin_inset Quotes eld
647 \begin_inset Quotes erd
650 is the ISO language code.
652 \begin_inset CommandInset ref
654 reference "cha:Internationalizing-LyX"
661 \begin_layout Labeling
662 \labelwidthstring 00.00.0000
663 \begin_inset Flex Code
666 \begin_layout Plain Layout
672 contains example files that explain how to use some features.
673 In the file browser, press the
674 \begin_inset Flex Noun
677 \begin_layout Plain Layout
686 \begin_layout Labeling
687 \labelwidthstring 00.00.0000
688 \begin_inset Flex Code
691 \begin_layout Plain Layout
697 contains image files that are used by the
698 \begin_inset Flex Noun
701 \begin_layout Plain Layout
708 In addition, it also contains the individual icons used in the toolbar
709 and the banners that can be shown when \SpecialChar LyX
713 \begin_layout Labeling
714 \labelwidthstring 00.00.0000
715 \begin_inset Flex Code
718 \begin_layout Plain Layout
724 contains keyboard keymapping files.
726 \begin_inset CommandInset ref
728 reference "sec:International-Keymap-Stuff"
735 \begin_layout Labeling
736 \labelwidthstring 00.00.0000
737 \begin_inset Flex Code
740 \begin_layout Plain Layout
746 contains the text class and module files described in
747 \begin_inset CommandInset ref
749 reference "cha:Installing-New-Document"
756 \begin_layout Labeling
757 \labelwidthstring 00.00.0000
758 \begin_inset Flex Code
761 \begin_layout Plain Layout
768 \begin_inset Flex Code
771 \begin_layout Plain Layout
777 Python scripts used to convert between \SpecialChar LyX
779 These can be run from the command line if, say, you want to batch-convert
783 \begin_layout Labeling
784 \labelwidthstring 00.00.0000
785 \begin_inset Flex Code
788 \begin_layout Plain Layout
794 contains some files that demonstrate the capabilities of the
795 \begin_inset Flex Noun
798 \begin_layout Plain Layout
809 Also contains some scripts used by \SpecialChar LyX
813 \begin_layout Labeling
814 \labelwidthstring 00.00.0000
815 \begin_inset Flex Code
818 \begin_layout Plain Layout
824 contains the standard \SpecialChar LyX
825 template files described in
826 \begin_inset CommandInset ref
828 reference "subsec:Creating-Templates"
835 \begin_layout Labeling
836 \labelwidthstring 00.00.0000
837 \begin_inset Flex Code
840 \begin_layout Plain Layout
846 contains files with the extension
847 \begin_inset Flex Code
850 \begin_layout Plain Layout
856 that define the user interface to \SpecialChar LyX
858 That is, the files define which items appear in which menus and the items
859 appearing on the toolbar.
862 \begin_layout Subsection
863 Files you don't want to modify
866 \begin_layout Standard
867 These files are used internally by \SpecialChar LyX
868 and you generally do not need to modify
869 them unless you are a developer.
872 \begin_layout Labeling
873 \labelwidthstring 00.00.0000
874 \begin_inset Flex Code
877 \begin_layout Plain Layout
883 this file contains the list of \SpecialChar LyX
885 The contents are displayed with the menu entry
886 \begin_inset Flex Noun
889 \begin_layout Plain Layout
890 Help\SpecialChar menuseparator
903 \begin_layout Labeling
904 \labelwidthstring 00.00.0000
905 \begin_inset Flex Code
908 \begin_layout Plain Layout
914 this is a \SpecialChar LaTeX
915 script used during the configuration process.
919 \begin_layout Labeling
920 \labelwidthstring 00.00.0000
921 \begin_inset Flex Code
924 \begin_layout Plain Layout
930 this is a Python script that is used to re-configure \SpecialChar LyX
932 It creates configuration files in the directory it was run from.
935 \begin_layout Subsection
936 Other files needing a line or two
939 \begin_layout Labeling
940 \labelwidthstring 00.00.0000
941 \begin_inset Flex Code
944 \begin_layout Plain Layout
950 this contains tables describing how different character encodings can be
954 \begin_layout Labeling
955 \labelwidthstring 00.00.0000
956 \begin_inset Flex Code
959 \begin_layout Plain Layout
965 this file contains the templates available to the new
966 \begin_inset Flex Noun
969 \begin_layout Plain Layout
980 \begin_inset CommandInset ref
982 reference "chap:Including-External-Material"
989 \begin_layout Labeling
990 \labelwidthstring 00.00.0000
991 \begin_inset Flex Code
994 \begin_layout Plain Layout
1000 this file contains a list of all the languages currently supported by \SpecialChar LyX
1004 \begin_layout Labeling
1005 \labelwidthstring 00.00.0000
1006 \begin_inset Flex Code
1009 \begin_layout Plain Layout
1015 contains information about the supported fonts.
1018 \begin_layout Labeling
1019 \labelwidthstring 00.00.0000
1020 \begin_inset Flex Code
1023 \begin_layout Plain Layout
1029 this file contains translations for internationalized paragraph styles
1031 \begin_inset CommandInset ref
1033 reference "subsec:I18n"
1040 \begin_layout Labeling
1041 \labelwidthstring 00.00.0000
1042 \begin_inset Flex Code
1045 \begin_layout Plain Layout
1051 this file contains information about unicode-encoded glyphs and the way
1052 they are supported by \SpecialChar LyX
1053 via \SpecialChar LaTeX
1057 \begin_layout Section
1058 Your local configuration directory
1061 \begin_layout Standard
1062 Even if you are using \SpecialChar LyX
1063 as an unprivileged user, you might want to change
1065 configuration for your own use.
1067 \begin_inset Flex Code
1070 \begin_layout Plain Layout
1076 directory contains all your personal configuration files.
1077 This is the directory described as
1078 \begin_inset Quotes eld
1082 \begin_inset Quotes erd
1086 \begin_inset Flex Noun
1089 \begin_layout Plain Layout
1090 Help\SpecialChar menuseparator
1092 \begin_inset space ~
1101 This directory is used as a mirror of
1102 \begin_inset Flex Code
1105 \begin_layout Plain Layout
1111 , which means that every file in
1112 \begin_inset Flex Code
1115 \begin_layout Plain Layout
1121 is a replacement for the corresponding file in
1122 \begin_inset Flex Code
1125 \begin_layout Plain Layout
1132 Any configuration file described in the above sections can be placed either
1133 in the system-wide directory, in which case it will affect all users, or
1134 in your local directory for your own use.
1137 \begin_layout Standard
1138 To make things clearer, let's provide a few examples:
1141 \begin_layout Itemize
1142 The preferences set in the
1143 \begin_inset Flex Noun
1146 \begin_layout Plain Layout
1147 Tools\SpecialChar menuseparator
1153 dialog are saved to a file
1154 \begin_inset Flex Code
1157 \begin_layout Plain Layout
1164 \begin_inset Flex Code
1167 \begin_layout Plain Layout
1176 \begin_layout Itemize
1177 When you reconfigure using
1178 \begin_inset Flex Noun
1181 \begin_layout Plain Layout
1182 Tools\SpecialChar menuseparator
1190 \begin_inset Flex Code
1193 \begin_layout Plain Layout
1199 script, and the resulting files are written in your local configuration
1201 This means that any additional text class file that you might have added
1203 \begin_inset Flex Code
1206 \begin_layout Plain Layout
1212 will be added to the list of classes in the
1213 \begin_inset Flex Noun
1216 \begin_layout Plain Layout
1217 Document\SpecialChar menuseparator
1226 \begin_layout Itemize
1227 If you get some updated documentation from \SpecialChar LyX
1228 ftp site and cannot install
1229 it because you do not have sysadmin rights on your system, you can just
1231 \begin_inset Flex Code
1234 \begin_layout Plain Layout
1240 and the items in the
1241 \begin_inset Flex Noun
1244 \begin_layout Plain Layout
1250 menu will open them!
1253 \begin_layout Section
1254 Running \SpecialChar LyX
1255 with multiple configurations
1258 \begin_layout Standard
1259 The configuration freedom of the local configuration directory may not suffice
1260 if you want to have more than one configuration at your disposal.
1261 For example, you may want to be use different key bindings or printer settings
1263 You can achieve this by having several such directories.
1264 You then specify which directory to use at run-time.
1267 \begin_layout Standard
1268 Invoking \SpecialChar LyX
1269 with the command line switch
1270 \begin_inset Flex Code
1273 \begin_layout Plain Layout
1283 instructs the program to read the configuration from that directory, and
1284 not from the default directory.
1285 (You can determine the default directory by running \SpecialChar LyX
1287 \begin_inset Flex Code
1290 \begin_layout Plain Layout
1296 switch.) If the specified directory does not exist, \SpecialChar LyX
1298 for you, just like it does for the default directory on the first time
1299 you run the program.
1300 You can modify the configuration options in this additional user directory
1301 exactly as you would for the default directory.
1302 These directories are completely independent (but read on).
1303 Note that setting the environment variable
1304 \begin_inset Flex Code
1307 \begin_layout Plain Layout
1313 to some value has exactly the same effect.
1316 \begin_layout Standard
1317 Having several configurations also requires more maintenance: if you want
1318 to add a new layout to
1319 \begin_inset Flex Code
1322 \begin_layout Plain Layout
1328 which you want available from all your configurations, you must add it
1329 to each directory separately.
1330 You can avoid this with the following trick: after \SpecialChar LyX
1331 creates the additional
1332 directory, most of the subdirectories (see above) are empty.
1333 If you want the new configuration to mirror an existing one, replace the
1334 empty subdirectory with a symbolic link to the matching subdirectory in
1335 the existing configuration.
1337 \begin_inset Flex Code
1340 \begin_layout Plain Layout
1346 subdirectory, however, since it contains a file written by the configuration
1347 script (also accessible through
1348 \begin_inset Flex Noun
1351 \begin_layout Plain Layout
1352 Tools\SpecialChar menuseparator
1358 ) which is configuration-specific.
1361 \begin_layout Chapter
1362 The Preferences dialog
1365 \begin_layout Standard
1366 All options of the preferences dialog are described in the Appendix
1368 The Preferences Dialog
1375 For some options you might find here more details.
1378 \begin_layout Section
1380 \begin_inset CommandInset label
1389 \begin_layout Standard
1390 The first step is to define your file formats if they are not already defined.
1392 \begin_inset Flex Noun
1395 \begin_layout Plain Layout
1396 Tools\SpecialChar menuseparator
1404 \begin_inset Flex Noun
1407 \begin_layout Plain Layout
1408 File Handling\SpecialChar menuseparator
1415 \begin_inset Flex Noun
1418 \begin_layout Plain Layout
1424 button to define your new format.
1426 \begin_inset Flex Noun
1429 \begin_layout Plain Layout
1435 field contains the name used to identify the format in the GUI.
1437 \begin_inset Flex Noun
1440 \begin_layout Plain Layout
1446 is used to identify the format internally.
1447 You will also need to enter a file extension.
1448 These are all required.
1450 \begin_inset Flex Noun
1453 \begin_layout Plain Layout
1459 field is used to provide a keyboard shortcut on the menus.
1460 (For example, pressing
1461 \begin_inset Flex Noun
1464 \begin_layout Plain Layout
1471 \begin_inset Flex Noun
1474 \begin_layout Plain Layout
1475 Document\SpecialChar menuseparator
1476 View (Other Formats)\SpecialChar menuseparator
1485 \begin_layout Standard
1487 \begin_inset Flex Noun
1490 \begin_layout Plain Layout
1497 \begin_inset Flex Noun
1500 \begin_layout Plain Layout
1507 For example, you might want to use
1508 \begin_inset Flex Noun
1511 \begin_layout Plain Layout
1517 to view PostScript files.
1518 You can enter the command needed to start the program in the corresponding
1520 In defining this command, you can use the four variables listed in the
1522 The viewer is launched when you view an image in \SpecialChar LyX
1524 \begin_inset Flex Noun
1527 \begin_layout Plain Layout
1528 Document\SpecialChar menuseparator
1535 The editor is for example launched when you right-click on an image and
1537 \begin_inset Flex Noun
1540 \begin_layout Plain Layout
1546 in the appearing context menu.
1549 \begin_layout Standard
1551 \begin_inset Flex Noun
1554 \begin_layout Plain Layout
1560 type of a format is optional, but if it is specified, it must be unique
1562 It is used to detect files of this format from the file contents.
1563 For some important file formats there is no MIME type officially registered
1565 \begin_inset CommandInset href
1568 target "http://www.iana.org/assignments/media-types/"
1573 Therefore \SpecialChar LyX
1574 uses the extended list of MIME types as specified by
1575 \begin_inset CommandInset href
1577 name "freedesktop.org"
1578 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1585 \begin_layout Standard
1587 \begin_inset Flex Noun
1590 \begin_layout Plain Layout
1596 option tells \SpecialChar LyX
1597 that a format is suitable for document export.
1598 If this is set and if a suitable conversion route exists (see
1599 \begin_inset CommandInset ref
1601 reference "sec:Converters"
1605 ), the format will appear in the
1606 \begin_inset Flex Noun
1609 \begin_layout Plain Layout
1610 File\SpecialChar menuseparator
1617 The format will also appear in the
1618 \begin_inset Flex Noun
1621 \begin_layout Plain Layout
1622 Document\SpecialChar menuseparator
1628 menu if a viewer is specified for the format.
1629 Pure image formats, such as
1630 \begin_inset Flex Code
1633 \begin_layout Plain Layout
1639 , should not use this option.
1640 Formats that can both represent vector graphics and documents like
1641 \begin_inset Flex Code
1644 \begin_layout Plain Layout
1653 \begin_layout Standard
1655 \begin_inset Flex Noun
1658 \begin_layout Plain Layout
1659 Vector graphics format
1664 tells \SpecialChar LyX
1665 that a format can contain vector graphics.
1666 This information is used to determine the target format of included graphics
1668 \begin_inset Flex Noun
1671 \begin_layout Plain Layout
1678 Included graphics may need to be converted to either
1679 \begin_inset Flex Noun
1682 \begin_layout Plain Layout
1689 \begin_inset Flex Noun
1692 \begin_layout Plain Layout
1699 \begin_inset Flex Noun
1702 \begin_layout Plain Layout
1709 \begin_inset Flex Noun
1712 \begin_layout Plain Layout
1718 cannot handle other image formats.
1719 If an included graphic is not already in
1720 \begin_inset Flex Noun
1723 \begin_layout Plain Layout
1730 \begin_inset Flex Noun
1733 \begin_layout Plain Layout
1740 \begin_inset Flex Noun
1743 \begin_layout Plain Layout
1749 format, it is converted to
1750 \begin_inset Flex Noun
1753 \begin_layout Plain Layout
1759 if the vector format option is set, and otherwise to
1760 \begin_inset Flex Noun
1763 \begin_layout Plain Layout
1772 \begin_layout Section
1776 \begin_layout Standard
1777 Since all conversions from one format to another take place in \SpecialChar LyX
1779 directory, it is sometimes necessary to modify a file before copying it
1780 to the temporary directory in order that the conversion may be performed.
1784 \begin_layout Plain Layout
1785 For example, the file may refer to other files—images, for example—using
1786 relative file names, and these may become invalid when the file is copied
1787 to the temporary directory.
1792 This is done by a Copier: It copies a file to (or from) the temporary directory
1793 and may modify it in the process.
1796 \begin_layout Standard
1797 The definitions of the copiers may use four variables:
1800 \begin_layout Labeling
1801 \labelwidthstring 00.00.0000
1802 \begin_inset Flex Code
1805 \begin_layout Plain Layout
1811 The \SpecialChar LyX
1812 system directory (e.
1813 \begin_inset space \thinspace{}
1817 \begin_inset space \space{}
1821 \begin_inset Flex Noun
1824 \begin_layout Plain Layout
1833 \begin_layout Labeling
1834 \labelwidthstring 00.00.0000
1835 \begin_inset Flex Code
1838 \begin_layout Plain Layout
1847 \begin_layout Labeling
1848 \labelwidthstring 00.00.0000
1849 \begin_inset Flex Code
1852 \begin_layout Plain Layout
1861 \begin_layout Labeling
1862 \labelwidthstring 00.00.0000
1863 \begin_inset Flex Code
1866 \begin_layout Plain Layout
1872 The base name (without filename extension) in the \SpecialChar LyX
1876 \begin_layout Labeling
1877 \labelwidthstring 00.00.0000
1878 \begin_inset Flex Code
1881 \begin_layout Plain Layout
1887 The full directory path of the \SpecialChar LyX
1891 \begin_layout Labeling
1892 \labelwidthstring 00.00.0000
1893 \begin_inset Flex Code
1896 \begin_layout Plain Layout
1902 The full pathname to the original \SpecialChar LyX
1903 file being processed
1906 \begin_layout Labeling
1907 \labelwidthstring 00.00.0000
1908 \begin_inset Flex Code
1911 \begin_layout Plain Layout
1917 The filename (without any directory path) of the \SpecialChar LyX
1921 \begin_layout Labeling
1922 \labelwidthstring 00.00.0000
1923 \begin_inset Flex Code
1926 \begin_layout Plain Layout
1932 The `\SpecialChar LaTeX
1936 \begin_layout Standard
1937 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1945 It is relevant only when exporting files suitable for such inclusion.
1948 \begin_layout Standard
1949 Copiers can be used to do almost anything with output files.
1950 For example, suppose you want generated pdf files to be copied to a special
1952 \begin_inset Flex Code
1955 \begin_layout Plain Layout
1962 Then you could write a shell script such as this one:
1965 \begin_layout Standard
1966 \begin_inset listings
1970 \begin_layout Plain Layout
1975 \begin_layout Plain Layout
1980 \begin_layout Plain Layout
1982 TOFILE=`basename $2`
1985 \begin_layout Plain Layout
1987 cp $FROMFILE /home/you/pdf/$TOFILE
1992 Save it in your local \SpecialChar LyX
1994 \begin_inset Flex Code
1997 \begin_layout Plain Layout
1998 /home/you/.lyx/scripts/pdfcopier.sh
2003 —and make it executable, if you need to do so on your platform.
2005 \begin_inset Flex Noun
2008 \begin_layout Plain Layout
2009 Tools\SpecialChar menuseparator
2015 dialog, select under
2016 \begin_inset Flex Noun
2019 \begin_layout Plain Layout
2020 File Handling\SpecialChar menuseparator
2027 \begin_inset Flex Noun
2030 \begin_layout Plain Layout
2036 format—or one of the other pdf formats—and enter
2037 \begin_inset Flex Code
2040 \begin_layout Plain Layout
2041 pdfcopier.sh $$i $$o
2047 \begin_inset Flex Noun
2050 \begin_layout Plain Layout
2060 \begin_layout Standard
2061 Copiers are used by \SpecialChar LyX
2062 in various of its own conversions.
2063 For example, if appropriate programs are found, \SpecialChar LyX
2064 will automatically install
2066 \begin_inset Flex Noun
2069 \begin_layout Plain Layout
2076 \begin_inset Flex Noun
2079 \begin_layout Plain Layout
2081 \begin_inset space ~
2090 When these formats are exported, the copier sees that not just the main
2091 HTML file but various associated files (style files, images, etc.) are also
2093 All these files are written to a subdirectory of the directory in which
2094 the original \SpecialChar LyX
2099 \begin_layout Plain Layout
2100 This copier can be customized.
2102 \begin_inset Quotes eld
2106 \begin_inset Quotes erd
2109 argument takes a comma-separated list of extensions to be copied; if it
2110 is omitted, all files will be copied.
2112 \begin_inset Quotes eld
2116 \begin_inset Quotes erd
2119 argument determines the extension added to the generated directory.
2121 \begin_inset Quotes eld
2125 \begin_inset Flex Noun
2128 \begin_layout Plain Layout
2135 \begin_inset Quotes erd
2138 , so HTML generated from
2139 \begin_inset Flex Noun
2142 \begin_layout Plain Layout
2143 /path/to/filename.lyx
2149 \begin_inset Flex Noun
2152 \begin_layout Plain Layout
2153 /path/to/filename.html.LyXconv
2167 \begin_layout Section
2169 \begin_inset CommandInset label
2171 name "sec:Converters"
2178 \begin_layout Standard
2179 You can define your own Converters to convert files between different formats.
2181 \begin_inset Flex Noun
2184 \begin_layout Plain Layout
2185 Tools\SpecialChar menuseparator
2186 Preferences\SpecialChar menuseparator
2187 File Handling\SpecialChar menuseparator
2196 \begin_layout Standard
2197 To define a new converter, select the
2198 \begin_inset Flex Noun
2201 \begin_layout Plain Layout
2203 \begin_inset space ~
2212 \begin_inset Flex Noun
2215 \begin_layout Plain Layout
2217 \begin_inset space ~
2225 from the drop-down lists, enter the command needed for the conversion,
2227 \begin_inset Flex Noun
2230 \begin_layout Plain Layout
2237 Several variables can be used in the definition of converters:
2240 \begin_layout Labeling
2241 \labelwidthstring 00.00.0000
2242 \begin_inset Flex Code
2245 \begin_layout Plain Layout
2251 The \SpecialChar LyX
2255 \begin_layout Labeling
2256 \labelwidthstring 00.00.0000
2257 \begin_inset Flex Code
2260 \begin_layout Plain Layout
2269 \begin_layout Labeling
2270 \labelwidthstring 00.00.0000
2271 \begin_inset Flex Code
2274 \begin_layout Plain Layout
2283 \begin_layout Labeling
2284 \labelwidthstring 00.00.0000
2285 \begin_inset Flex Code
2288 \begin_layout Plain Layout
2294 The base filename of the input file (i.
2295 \begin_inset space \thinspace{}
2298 g., without the extension)
2301 \begin_layout Labeling
2302 \labelwidthstring 00.00.0000
2303 \begin_inset Flex Code
2306 \begin_layout Plain Layout
2312 The path to the input file
2315 \begin_layout Labeling
2316 \labelwidthstring 00.00.0000
2317 \begin_inset Flex Code
2320 \begin_layout Plain Layout
2326 The path to the original input file (this is different from $$p when a
2327 chain of converters is called)
2330 \begin_layout Labeling
2331 \labelwidthstring 00.00.0000
2332 \begin_inset Flex Code
2335 \begin_layout Plain Layout
2341 The iconv name for the encoding of the document.
2344 \begin_layout Standard
2346 \begin_inset Flex Noun
2349 \begin_layout Plain Layout
2351 \begin_inset space ~
2359 field you can enter the following flags, separated by commas:
2362 \begin_layout Labeling
2363 \labelwidthstring 00.00.0000
2364 \begin_inset Flex Code
2367 \begin_layout Plain Layout
2373 This converter runs some form of \SpecialChar LaTeX
2375 This will make \SpecialChar LyX
2376 's \SpecialChar LaTeX
2377 error logs available.
2380 \begin_layout Labeling
2381 \labelwidthstring 00.00.0000
2382 \begin_inset Flex Code
2385 \begin_layout Plain Layout
2391 Needs the \SpecialChar LaTeX
2393 \begin_inset Flex Noun
2396 \begin_layout Plain Layout
2402 file for the conversion.
2405 \begin_layout Labeling
2406 \labelwidthstring 00.00.0000
2407 \begin_inset Flex Code
2410 \begin_layout Plain Layout
2417 \begin_inset Quotes eld
2421 \begin_inset Quotes erd
2424 file from the backend, which in practice means a \SpecialChar LaTeX
2425 file like the one we
2426 would export, without
2427 \begin_inset Flex Code
2430 \begin_layout Plain Layout
2439 \begin_layout Labeling
2440 \labelwidthstring 00.00.0000
2441 \begin_inset Flex Code
2444 \begin_layout Plain Layout
2453 \begin_layout Standard
2454 The following three flags are not really flags at all because they take
2456 \begin_inset Flex Noun
2459 \begin_layout Plain Layout
2461 \begin_inset space ~
2465 \begin_inset space ~
2476 \begin_layout Labeling
2477 \labelwidthstring 00.00.0000
2478 \begin_inset Flex Code
2481 \begin_layout Plain Layout
2487 If set, the converter's standard error will be redirected to a file
2488 \begin_inset Flex Code
2491 \begin_layout Plain Layout
2497 , and the script given as argument will be run as:
2498 \begin_inset Flex Code
2501 \begin_layout Plain Layout
2502 script < infile.out > infile.log
2508 The argument may contain
2509 \begin_inset Flex Code
2512 \begin_layout Plain Layout
2521 \begin_layout Labeling
2522 \labelwidthstring 00.00.0000
2523 \begin_inset Flex Code
2526 \begin_layout Plain Layout
2532 The name of the directory in which the converter will dump the generated
2535 will not create this directory, and it does not copy anything into it,
2536 though it will copy this directory to the destination.
2537 The argument may contain
2538 \begin_inset Flex Code
2541 \begin_layout Plain Layout
2547 , which will be replaced by the base name of the input and output files,
2548 respectively, when the directory is copied.
2549 \begin_inset Newline newline
2552 Note that resultdir and usetempdir make no sense together.
2553 The latter will be ignored if the former is given.
2556 \begin_layout Labeling
2557 \labelwidthstring 00.00.0000
2558 \begin_inset Flex Code
2561 \begin_layout Plain Layout
2567 Determines the output file name and may, contain
2568 \begin_inset Flex Code
2571 \begin_layout Plain Layout
2578 Sensible only with resultdir and optional even then; if not given, it defaults
2582 \begin_layout Standard
2583 None of these last three are presently used in any of the converters that
2584 are installed with \SpecialChar LyX
2589 \begin_layout Standard
2590 You do not have to define converters for all formats between which you want
2592 For example, you will note that there is no `\SpecialChar LyX
2593 to PostScript' converter,
2594 but \SpecialChar LyX
2595 will export PostScript.
2596 It does so by first creating a \SpecialChar LaTeX
2597 file (no converter needs to be defined
2598 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2600 and finally converting the resulting DVI file to PostScript.
2602 finds such `chains' of converters automatically, and it will always choose
2603 the shortest possible chain.
2604 You can, though, still define multiple conversion methods between file
2606 For example, the standard \SpecialChar LyX
2607 configuration provides five ways to convert
2612 \begin_layout Enumerate
2614 \begin_inset Flex Noun
2617 \begin_layout Plain Layout
2626 \begin_layout Enumerate
2627 via (DVI and) PostScript, using
2628 \begin_inset Flex Noun
2631 \begin_layout Plain Layout
2640 \begin_layout Enumerate
2642 \begin_inset Flex Noun
2645 \begin_layout Plain Layout
2654 \begin_layout Enumerate
2656 \begin_inset Flex Noun
2659 \begin_layout Plain Layout
2669 \begin_layout Enumerate
2671 \begin_inset Flex Noun
2674 \begin_layout Plain Layout
2684 \begin_layout Standard
2685 To define such alternate chains, you must define multiple target `file formats',
2687 \begin_inset CommandInset ref
2689 reference "sec:Formats"
2694 For example, in the standard configuration, the formats named
2695 \begin_inset Flex Noun
2698 \begin_layout Plain Layout
2705 \begin_inset Flex Noun
2708 \begin_layout Plain Layout
2715 \begin_inset Flex Noun
2718 \begin_layout Plain Layout
2725 \begin_inset Flex Noun
2728 \begin_layout Plain Layout
2735 \begin_inset Flex Noun
2738 \begin_layout Plain Layout
2745 \begin_inset Flex Noun
2748 \begin_layout Plain Layout
2755 \begin_inset Flex Noun
2758 \begin_layout Plain Layout
2765 \begin_inset Flex Noun
2768 \begin_layout Plain Layout
2776 \begin_inset Flex Noun
2779 \begin_layout Plain Layout
2786 \begin_inset Flex Noun
2789 \begin_layout Plain Layout
2796 ) are defined, all of which share the extension
2797 \begin_inset Flex Noun
2800 \begin_layout Plain Layout
2806 , and which correspond to the conversion methods just mentioned.
2809 \begin_layout Chapter
2810 Internationalizing \SpecialChar LyX
2812 \begin_inset CommandInset label
2814 name "cha:Internationalizing-LyX"
2821 \begin_layout Standard
2823 supports using a translated interface.
2824 Last time we checked, \SpecialChar LyX
2825 provided text in thirty languages.
2826 The language of choice is called your
2831 (For further reading on locale settings, see also the documentation for
2832 locale that comes with your operating system.
2833 For Linux, the manual page for
2834 \begin_inset Flex Code
2837 \begin_layout Plain Layout
2843 could be a good place to start).
2846 \begin_layout Standard
2847 Notice that these translations will work, but do contain a few flaws.
2848 In particular, all dialogs have been designed with the English text in
2849 mind, which means that some of the translated text will be too large to
2850 fit within the space allocated.
2851 This is only a display problem and will not cause any harm.
2852 Also, you will find that some of the translations do not define shortcut
2853 keys for everything.
2854 Sometimes, there are simply not enough free letters to do it.
2855 Other times, the translator just hasn't got around to doing it yet.
2856 Our localization team, which you may wish to join,
2860 \begin_layout Plain Layout
2861 If you are a fluent speaker of a language other than English, joining these
2862 teams is a great way to give back to the \SpecialChar LyX
2868 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2872 \begin_layout Section
2873 Translating \SpecialChar LyX
2877 \begin_layout Subsection
2878 Translating the graphical user interface (text messages).
2881 \begin_layout Standard
2884 \begin_inset Flex Code
2887 \begin_layout Plain Layout
2893 library to handle the internationalization of the interface.
2894 To have \SpecialChar LyX
2895 speak your favorite language in all menus and dialogs, you need
2897 \begin_inset Flex Code
2900 \begin_layout Plain Layout
2906 -file for that language.
2907 When this is available, you'll have to generate a
2908 \begin_inset Flex Code
2911 \begin_layout Plain Layout
2917 -file from it and install the
2918 \begin_inset Flex Code
2921 \begin_layout Plain Layout
2928 The process of doing all of this is explained in the documentation for
2930 \begin_inset Flex Code
2933 \begin_layout Plain Layout
2940 It is possible to do this just for yourself, but if you're going to do
2941 it, you might as well share the results of your labors with the rest of
2942 the \SpecialChar LyX
2944 Send a message to the \SpecialChar LyX
2945 developers' list for more information about how
2949 \begin_layout Standard
2950 In short, this is what you should do (xx denotes the language code):
2953 \begin_layout Itemize
2954 Check out the \SpecialChar LyX
2957 \begin_inset CommandInset href
2959 name "information on the web"
2960 target "http://www.lyx.org/HowToUseSVN"
2967 \begin_layout Itemize
2969 \begin_inset Flex Code
2972 \begin_layout Plain Layout
2978 to the folder of the
2979 \begin_inset Flex Code
2982 \begin_layout Plain Layout
2990 \begin_inset Flex Code
2993 \begin_layout Plain Layout
3001 \begin_inset Flex Code
3004 \begin_layout Plain Layout
3010 doesn't exist anywhere, it can be remade with the console command
3011 \begin_inset Flex Code
3014 \begin_layout Plain Layout
3020 in that directory, or you can use an existing po-file for some other language
3024 \begin_layout Itemize
3026 \begin_inset Flex Code
3029 \begin_layout Plain Layout
3039 \begin_layout Plain Layout
3040 This is just a text file, so it can be edited in any text editor.
3041 But there are also specialized programs that support such editing, such
3046 (for all platforms) or
3055 contains a `mode' for editing
3056 \begin_inset Flex Code
3059 \begin_layout Plain Layout
3070 For some menu- and widget-labels, there are also shortcut keys that should
3072 Those keys are marked after a `|', and should be translated according to
3073 the words and phrases of the language.
3074 You should also fill also out the information at the beginning of the new
3076 \begin_inset Flex Code
3079 \begin_layout Plain Layout
3085 -file with your email-address, etc., so people know where to reach you with
3086 suggestions and entertaining flames.
3089 \begin_layout Standard
3090 If you are just doing this on your own, then:
3093 \begin_layout Itemize
3095 \begin_inset Flex Code
3098 \begin_layout Plain Layout
3105 This can be done with
3106 \begin_inset Flex Code
3109 \begin_layout Plain Layout
3110 msgfmt -o xx.mo < xx.po
3118 \begin_layout Itemize
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3129 -file to your locale-tree, at the correct directory for application messages
3134 xx, and under the name
3135 \begin_inset Flex Code
3138 \begin_layout Plain Layout
3145 \begin_inset space \thinspace{}
3149 \begin_inset space \space{}
3153 \begin_inset Flex Code
3156 \begin_layout Plain Layout
3157 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3167 \begin_layout Standard
3168 As said, however, it would be best if the new
3169 \begin_inset Flex Code
3172 \begin_layout Plain Layout
3178 file could be added to the \SpecialChar LyX
3179 distribution, so others can use it.
3180 Adding it involves making additional changes to \SpecialChar LyX
3182 So send an email to the developers' mailing list if you're interested in
3186 \begin_layout Subsubsection
3190 \begin_layout Standard
3191 Sometimes it turns out that one English message needs to be translated into
3192 different messages in the target language.
3193 One example is the message
3194 \begin_inset Flex Code
3197 \begin_layout Plain Layout
3203 which has the German translation
3211 , depending upon exactly what the English
3212 \begin_inset Quotes eld
3216 \begin_inset Quotes erd
3221 \begin_inset Flex Code
3224 \begin_layout Plain Layout
3230 does not handle such ambiguous translations.
3231 Therefore you have to add some context information to the message: Instead
3233 \begin_inset Flex Code
3236 \begin_layout Plain Layout
3243 \begin_inset Flex Code
3246 \begin_layout Plain Layout
3247 To[[as in 'From format x to format y']]
3253 \begin_inset Flex Code
3256 \begin_layout Plain Layout
3257 To[[as in 'From page x to page y']].
3262 Now the two occurrences of
3263 \begin_inset Flex Code
3266 \begin_layout Plain Layout
3273 \begin_inset Flex Code
3276 \begin_layout Plain Layout
3282 and can be translated correctly to
3293 \begin_layout Standard
3294 Of course the context information needs to be stripped off the original
3295 message when no translation is used.
3296 Therefore you have to put it in double square brackets at the end of the
3297 message (see the example above).
3298 The translation mechanism of \SpecialChar LyX
3299 ensures that everything in double square
3300 brackets at the end of messages is removed before displaying the message.
3303 \begin_layout Subsection
3304 Translating the documentation.
3307 \begin_layout Standard
3308 The online documentation (in the
3309 \begin_inset Flex Noun
3312 \begin_layout Plain Layout
3318 -menu) can (and should!) be translated.
3319 If there are translated versions of the documentation available
3323 \begin_layout Plain Layout
3324 As of March 2008, at least some of the documents have been translated into
3325 fourteen languages, with the Tutorial available in a few more.
3330 and the locale is set accordingly, these will be used automagically by
3334 looks for translated versions as
3335 \begin_inset Flex Code
3338 \begin_layout Plain Layout
3339 LyXDir/doc/xx/DocName.lyx
3345 \begin_inset Flex Code
3348 \begin_layout Plain Layout
3354 is the code for the language currently in use.
3355 If there are no translated documents, the default English versions will
3357 Note that the translated versions must have the same filenames (
3358 \begin_inset Flex Code
3361 \begin_layout Plain Layout
3367 above) as the original.
3368 If you feel up to translating the documentation (an excellent way to proof-read
3369 the original documentation by the way!), there are a few things you should
3373 \begin_layout Itemize
3374 Check out the documentation translation web page at
3375 \begin_inset CommandInset href
3377 name "http://www.lyx.org/Translation"
3378 target "http://www.lyx.org/Translation"
3383 That way, you can find out which (if any) documents have already been translate
3384 d into your language.
3385 You can also find out who (if anyone) is organizing the effort to translate
3386 the documentation into your language.
3387 If no one is organizing the effort, please let us know that you're interested.
3390 \begin_layout Standard
3391 Once you get to actually translating, here's a few hints for you that may
3395 \begin_layout Itemize
3396 Join the documentation team! There is information on how to do that in
3397 \begin_inset Flex Code
3400 \begin_layout Plain Layout
3407 \begin_inset Flex Noun
3410 \begin_layout Plain Layout
3411 Help\SpecialChar menuseparator
3417 ), which by the way is the first document you should translate.
3420 \begin_layout Itemize
3421 Learn the typographic conventions for the language you are translating to.
3422 Typography is an ancient art and over the centuries, a great variety of
3423 conventions have developed throughout different parts of the world.
3424 Also study the professional terminology amongst typographers in your country.
3425 Inventing your own terminology will only confuse the users.
3428 (Warning! Typography is addictive!)
3431 \begin_layout Itemize
3432 Make a copy of the document.
3433 This will be your working copy.
3434 You can use this as your personal translated help-file by placing it in
3436 \begin_inset Flex Code
3439 \begin_layout Plain Layout
3448 \begin_layout Itemize
3449 Sometimes the original document (from the \SpecialChar LyX
3450 team) will be updated.
3451 Use the source viewer at
3452 \begin_inset CommandInset href
3454 name "http://www.lyx.org/trac/timeline"
3455 target "http://www.lyx.org/trac/timeline"
3459 to see what has been changed.
3460 That way you can easily see which parts of the translated document need
3464 \begin_layout Standard
3465 If you ever find an error in the original document, fix it and notify the
3466 rest of the documentation team of the changes! (You didn't forget to join
3467 the documentation team, did you?)
3470 \begin_layout Standard
3471 \begin_inset Branch OutDated
3474 \begin_layout Section
3475 International Keyboard Support
3478 \begin_layout Standard
3481 [Editor's Note: The following section is by
3489 It needs to be fixed to conform to the new Documentation Style sheet and
3490 to make use of the new v1.0 features.
3491 The whole thing also needs to be merged with the section following it.-jw
3492 It may also be badly out of date.-rh (2008)]
3495 \begin_layout Subsection
3496 Defining Own Keymaps: Keymap File Format
3499 \begin_layout Standard
3500 Let's look at a keyboard definition file a little closer.
3501 It is a plain text file defining
3504 \begin_layout Itemize
3505 key-to-key or key-to-string translations
3508 \begin_layout Itemize
3512 \begin_layout Itemize
3513 dead keys exceptions
3516 \begin_layout Standard
3517 To define key-to-key or key-to-string translation, use this command:
3520 \begin_layout Quotation
3521 \begin_inset Flex Code
3524 \begin_layout Plain Layout
3533 \begin_inset Flex Code
3536 \begin_layout Plain Layout
3545 \begin_layout Standard
3547 \begin_inset Flex Code
3550 \begin_layout Plain Layout
3556 is the key to be translated and
3557 \begin_inset Flex Code
3560 \begin_layout Plain Layout
3566 is the string to be inserted into the document.
3567 To define dead keys, use:
3570 \begin_layout Quotation
3571 \begin_inset Flex Code
3574 \begin_layout Plain Layout
3583 \begin_inset Flex Code
3586 \begin_layout Plain Layout
3595 \begin_layout Standard
3597 \begin_inset Flex Code
3600 \begin_layout Plain Layout
3606 is a keyboard key and
3607 \begin_inset Flex Code
3610 \begin_layout Plain Layout
3617 The following dead keys are supported (shortcut name is in parentheses):
3620 \begin_layout Quotation
3624 \begin_inset space \hfill{}
3630 \begin_layout Quotation
3632 \begin_inset space \hfill{}
3638 \begin_layout Quotation
3640 \begin_inset space \hfill{}
3646 \begin_layout Quotation
3648 \begin_inset space \hfill{}
3654 \begin_layout Quotation
3656 \begin_inset space \hfill{}
3662 \begin_layout Quotation
3664 \begin_inset space \hfill{}
3671 \begin_layout Plain Layout
3683 \begin_layout Quotation
3685 \begin_inset space \hfill{}
3691 \begin_layout Quotation
3693 \begin_inset space \hfill{}
3700 \begin_layout Plain Layout
3712 \begin_layout Quotation
3714 \begin_inset space \hfill{}
3720 \begin_layout Quotation
3722 \begin_inset space \hfill{}
3728 \begin_layout Quotation
3730 \begin_inset space \hfill{}
3737 \begin_layout Plain Layout
3749 \begin_layout Quotation
3751 \begin_inset space \hfill{}
3758 \begin_layout Plain Layout
3770 \begin_layout Quotation
3772 \begin_inset space \hfill{}
3778 \begin_layout Quotation
3779 hungarian umlaut (hug)
3780 \begin_inset space \hfill{}
3786 \begin_layout Quotation
3788 \begin_inset space \hfill{}
3794 \begin_layout Quotation
3796 \begin_inset space \hfill{}
3803 \begin_layout Plain Layout
3815 \begin_layout Standard
3816 Since in many international keyboards there are exceptions to what some
3817 dead keys should do, you can define them using
3820 \begin_layout Quotation
3821 \begin_inset Flex Code
3824 \begin_layout Plain Layout
3832 deadkey key outstring
3835 \begin_layout Standard
3836 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3840 \begin_layout Quotation
3841 \begin_inset Flex Code
3844 \begin_layout Plain Layout
3857 \begin_layout Standard
3858 to make it work correctly.
3859 Also, you have to define as exceptions dead keys over i and j, to remove
3860 the dot from them before inserting an accent mark.
3861 I will change this when the time comes, but so far I haven't had time.
3864 \begin_layout Standard
3865 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3868 \begin_inset Flex Code
3871 \begin_layout Plain Layout
3877 have different meaning.
3879 \begin_inset Flex Code
3882 \begin_layout Plain Layout
3888 marks comments, quotes start and end \SpecialChar LaTeX
3890 To enter quote, you'll need to use
3891 \begin_inset Flex Code
3894 \begin_layout Plain Layout
3903 \begin_inset Flex Code
3906 \begin_layout Plain Layout
3913 \begin_inset Flex Code
3916 \begin_layout Plain Layout
3927 \begin_layout Standard
3928 If you make a keyboard description file that works for your language, please
3929 mail it to me, so I can include it in the next keymap distribution.
3932 \begin_layout Standard
3933 More keywords will be supported in keymap configuration file in future,
3937 \begin_layout Itemize
3938 \begin_inset Flex Code
3941 \begin_layout Plain Layout
3952 \begin_inset space \hfill{}
3956 \begin_inset Flex Code
3959 \begin_layout Plain Layout
3968 \begin_layout Itemize
3969 \begin_inset Flex Code
3972 \begin_layout Plain Layout
3983 \begin_inset space \hfill{}
3987 \begin_inset Flex Code
3990 \begin_layout Plain Layout
3996 an external keymap translation program
3999 \begin_layout Standard
4000 Also, it should look into
4001 \begin_inset Flex Code
4004 \begin_layout Plain Layout
4010 file for defaults, too (for example, a
4011 \begin_inset Flex Code
4014 \begin_layout Plain Layout
4022 option to include default keyboard).
4030 \begin_layout Section
4031 International Keymap Stuff
4032 \begin_inset CommandInset label
4034 name "sec:International-Keymap-Stuff"
4041 \begin_layout Standard
4042 \begin_inset Note Note
4045 \begin_layout Plain Layout
4046 In doing the revisions on this document in March 2008, I did not look over
4047 this stuff, as I do not understand it.
4048 It would be good if someone else could do so.
4057 \begin_layout Standard
4058 The next two sections describe the
4059 \begin_inset Flex Code
4062 \begin_layout Plain Layout
4071 \begin_inset Flex Code
4074 \begin_layout Plain Layout
4082 file syntax in detail.
4083 These sections should help you design your own key map if the ones provided
4084 do not meet your needs.
4087 \begin_layout Subsection
4091 \begin_layout Standard
4095 \begin_inset Flex Code
4098 \begin_layout Plain Layout
4104 file maps keystrokes to characters or strings.
4105 As the name suggests, it sets a keyboard mapping.
4107 \begin_inset Flex Code
4110 \begin_layout Plain Layout
4121 \begin_inset Flex Code
4124 \begin_layout Plain Layout
4139 \begin_inset Flex Code
4142 \begin_layout Plain Layout
4155 \begin_inset Flex Code
4158 \begin_layout Plain Layout
4167 \begin_inset Flex Code
4170 \begin_layout Plain Layout
4178 are described in this section.
4181 \begin_layout Labeling
4182 \labelwidthstring 00.00.0000
4183 \begin_inset Flex Code
4186 \begin_layout Plain Layout
4194 Map a character to a string
4197 \begin_layout LyX-Code
4212 \begin_layout Standard
4245 the double-quote (")
4262 must be escaped with a preceding backslash (
4273 \begin_layout Standard
4275 \begin_inset Flex Noun
4278 \begin_layout Plain Layout
4286 statement to cause the symbol
4287 \begin_inset Flex Noun
4290 \begin_layout Plain Layout
4298 to be output for the keystroke
4299 \begin_inset Flex Noun
4302 \begin_layout Plain Layout
4313 \begin_layout LyX-Code
4319 \begin_layout Labeling
4320 \labelwidthstring 00.00.0000
4321 \begin_inset Flex Code
4324 \begin_layout Plain Layout
4332 Specify an accent character
4335 \begin_layout LyX-Code
4344 \begin_layout Standard
4345 This will make the cha
4383 This is the dead key
4387 \begin_layout Plain Layout
4394 refers to a key that does not produce a character by itself, but when followed
4395 with another key, produces the desired accent character.
4396 For example, a German characte
4398 r with an umlaut like
4408 can be produced in this manner.
4417 \begin_layout Standard
4430 and then another key not in
4447 followed by the other, not allowed key, as output.
4451 \begin_inset Flex Noun
4454 \begin_layout Plain Layout
4462 cancels a dead key, so if
4473 \begin_inset Flex Noun
4476 \begin_layout Plain Layout
4485 , the cursor will not go one position backwards but will instead cancel
4501 might have had on the next keystroke.
4505 \begin_layout Standard
4506 The following example specifies that the character ' is to be an acute accent,
4507 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4510 \begin_layout LyX-Code
4513 kmod ' acute aeiouAEIOU
4516 \begin_layout Labeling
4517 \labelwidthstring 00.00.0000
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4527 Specify an exception to the accent character
4530 \begin_layout LyX-Code
4539 \begin_layout Standard
4540 This defines an exce
4581 have been assigned a keystroke with a previous
4584 \begin_inset Flex Code
4587 \begin_layout Plain Layout
4611 must not belong in the
4658 If such a declaration does not exist in
4666 \begin_inset Flex Code
4669 \begin_layout Plain Layout
4703 \begin_inset Flex Code
4706 \begin_layout Plain Layout
4720 \begin_layout Standard
4721 The following command produces causes äi to be produced when you enter acute-i
4725 \begin_layout LyX-Code
4739 \begin_layout Labeling
4740 \labelwidthstring 00.00.0000
4741 \begin_inset Flex Code
4744 \begin_layout Plain Layout
4750 Combine two accent characters
4753 \begin_layout LyX-Code
4759 accent1 accent2 allowed
4762 \begin_layout Standard
4763 This one is getting pretty esoteric.
4764 It allows you to combine the effect
4820 \begin_inset Flex Code
4823 \begin_layout Plain Layout
4851 \begin_layout Standard
4852 Consider this example from the
4853 \begin_inset Flex Code
4856 \begin_layout Plain Layout
4867 \begin_layout LyX-Code
4870 kmod ; acute aeioyvhAEIOYVH
4874 kcomb acute umlaut iyIY
4877 \begin_layout Standard
4878 This allows you to press
4879 \begin_inset Flex Noun
4882 \begin_layout Plain Layout
4890 and get the effect of
4891 \begin_inset Flex Code
4894 \begin_layout Plain Layout
4913 in this case cancels the last dead key, so if you press
4914 \begin_inset Flex Noun
4917 \begin_layout Plain Layout
4926 \begin_inset Flex Code
4929 \begin_layout Plain Layout
4942 \begin_layout Subsection
4946 \begin_layout Standard
4948 \begin_inset Flex Code
4951 \begin_layout Plain Layout
4959 mapping is performed, a
4960 \begin_inset Flex Code
4963 \begin_layout Plain Layout
4973 file maps the strings that the symbols generate to characters in the current
4975 The \SpecialChar LyX
4976 distribution currently includes at least the
4977 \begin_inset Flex Code
4980 \begin_layout Plain Layout
4989 \begin_inset Flex Code
4992 \begin_layout Plain Layout
5003 \begin_layout Standard
5005 \begin_inset Flex Code
5008 \begin_layout Plain Layout
5016 file is a sequence of declarations of the form
5019 \begin_layout LyX-Code
5032 \begin_layout Standard
5033 For example, in order to map
5034 \begin_inset Flex Noun
5037 \begin_layout Plain Layout
5047 to the corresponding character in the iso-8859-1 set (233), the following
5051 \begin_layout LyX-Code
5059 \begin_layout Standard
5061 \begin_inset Flex Code
5064 \begin_layout Plain Layout
5073 \begin_inset Flex Code
5076 \begin_layout Plain Layout
5094 the same character can apply to more than one string.
5096 \begin_inset Flex Code
5099 \begin_layout Plain Layout
5110 \begin_layout LyX-Code
5122 \begin_inset Newline newline
5138 \begin_layout Standard
5140 cannot find a mapping for the string produced by the keystroke or a
5141 deadkey sequence, it will check if it looks like an accented char and try
5142 to draw an accent over the character on screen.
5145 \begin_layout Subsection
5149 \begin_layout Standard
5150 There is a second way to add support for international characters through
5151 so-called dead-keys.
5152 A dead-key works in combination with a letter to produce an accented character.
5153 Here, we'll explain how to create a really simple dead-key to illustrate
5157 \begin_layout Standard
5158 Suppose you happen to need the circumflex character,
5159 \begin_inset Quotes eld
5163 \begin_inset Quotes erd
5168 \begin_inset Flex Noun
5171 \begin_layout Plain Layout
5178 \begin_inset space ~
5182 \begin_inset Flex Noun
5185 \begin_layout Plain Layout
5191 ] to the \SpecialChar LyX
5193 \begin_inset Flex Code
5196 \begin_layout Plain Layout
5203 \begin_inset Flex Code
5206 \begin_layout Plain Layout
5213 Now, whenever you type the
5214 \begin_inset Flex Noun
5217 \begin_layout Plain Layout
5223 -key followed by a letter, that letter will have a circumflex accent on
5225 For example, the sequence
5226 \begin_inset Quotes eld
5230 \begin_inset Flex Noun
5233 \begin_layout Plain Layout
5240 \begin_inset Quotes erd
5243 produces the letter:
5244 \begin_inset Quotes eld
5248 \begin_inset Quotes erd
5252 If you tried to type
5253 \begin_inset Quotes eld
5257 \begin_inset Flex Noun
5260 \begin_layout Plain Layout
5267 \begin_inset Quotes erd
5270 , however, \SpecialChar LyX
5271 will complain with a beep, since a
5272 \begin_inset Quotes eld
5276 \begin_inset Flex Noun
5279 \begin_layout Plain Layout
5286 \begin_inset Quotes erd
5289 never takes a circumflex accent.
5291 \begin_inset Flex Noun
5294 \begin_layout Plain Layout
5300 after a dead-key produces the bare-accent.
5301 Please note this last point! If you bind a key to a dead-key, you'll need
5302 to rebind the character on that key to yet another key.
5304 \begin_inset Flex Noun
5307 \begin_layout Plain Layout
5313 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5316 \begin_layout Standard
5317 One common way to bind dead-keys is to use
5318 \begin_inset Flex Noun
5321 \begin_layout Plain Layout
5328 \begin_inset Flex Noun
5331 \begin_layout Plain Layout
5338 \begin_inset Flex Noun
5341 \begin_layout Plain Layout
5347 in combination with an accent, like
5348 \begin_inset Quotes eld
5352 \begin_inset Flex Noun
5355 \begin_layout Plain Layout
5362 \begin_inset Quotes erd
5366 \begin_inset Quotes eld
5370 \begin_inset Flex Noun
5373 \begin_layout Plain Layout
5380 \begin_inset Quotes erd
5384 \begin_inset Quotes eld
5388 \begin_inset Flex Noun
5391 \begin_layout Plain Layout
5398 \begin_inset Quotes erd
5402 Another way involves using
5403 \begin_inset Flex Code
5406 \begin_layout Plain Layout
5413 \begin_inset Flex Code
5416 \begin_layout Plain Layout
5422 to set up the special
5423 \begin_inset Flex Code
5426 \begin_layout Plain Layout
5434 \begin_inset Flex Code
5437 \begin_layout Plain Layout
5443 acts in some ways just like
5444 \begin_inset Flex Noun
5447 \begin_layout Plain Layout
5453 and permits you to bind keys to accented characters.
5454 You can also turn keys into dead-keys by binding them to something like
5456 \begin_inset Flex Code
5459 \begin_layout Plain Layout
5465 and then binding this symbolic key to the corresponding \SpecialChar LyX
5470 \begin_layout Plain Layout
5475 : This is exactly what I do in my
5476 \begin_inset Flex Code
5479 \begin_layout Plain Layout
5486 \begin_inset Flex Code
5489 \begin_layout Plain Layout
5497 \begin_inset Flex Noun
5500 \begin_layout Plain Layout
5502 \begin_inset space ~
5511 \begin_inset Flex Code
5514 \begin_layout Plain Layout
5520 and a bunch of these
5521 \begin_inset Quotes eld
5525 \begin_inset Flex Code
5528 \begin_layout Plain Layout
5535 \begin_inset Quotes erd
5538 symbolic keys bound such things as
5539 \begin_inset Flex Noun
5542 \begin_layout Plain Layout
5544 \begin_inset space ~
5553 \begin_inset Flex Noun
5556 \begin_layout Plain Layout
5558 \begin_inset space ~
5567 This is how I produce my accented characters.
5572 You can make just about anything into the
5573 \begin_inset Flex Code
5576 \begin_layout Plain Layout
5583 \begin_inset Flex Noun
5586 \begin_layout Plain Layout
5592 keys, a spare function key, etc.
5593 As for the \SpecialChar LyX
5594 commands that produce accents, check the entry for
5595 \begin_inset Flex Code
5598 \begin_layout Plain Layout
5609 You'll find the complete list there.
5612 \begin_layout Subsection
5613 Saving your Language Configuration
5616 \begin_layout Standard
5617 You can edit your preferences so that your desired language environment
5618 is automatically configured when \SpecialChar LyX
5620 \begin_inset Flex Noun
5623 \begin_layout Plain Layout
5624 Edit\SpecialChar menuseparator
5633 \begin_layout Chapter
5634 Installing New Document Classes, Layouts, and Templates
5635 \begin_inset CommandInset label
5637 name "cha:Installing-New-Document"
5642 \begin_inset Argument 1
5645 \begin_layout Plain Layout
5646 Installing New Document Classes
5654 \begin_layout Standard
5655 In this chapter, we describe the procedures for creating and installing
5656 new \SpecialChar LyX
5657 layout and template files, as well as offer a refresher on correctly
5658 installing new \SpecialChar LaTeX
5663 \begin_layout Standard
5664 First, let us a say a few words about how one ought to think about the relation
5665 between \SpecialChar LyX
5666 and \SpecialChar LaTeX
5668 The thing to understand is that, in a certain sense, \SpecialChar LyX
5669 doesn't know anything
5670 about \SpecialChar LaTeX
5672 Indeed, from \SpecialChar LyX
5673 's point of view, \SpecialChar LaTeX
5674 is just one of several
5675 \begin_inset Quotes eld
5679 \begin_inset Quotes erd
5682 in which it is capable of producing output.
5683 Other such formats are DocBook, plaintext, and XHTML.
5685 is, of course, a particularly important format, but very little of the
5686 information \SpecialChar LyX
5687 has about \SpecialChar LaTeX
5688 is actually contained in the program itself.
5692 \begin_layout Plain Layout
5693 Some commands are sufficiently complex that they are
5694 \begin_inset Quotes eld
5698 \begin_inset Quotes erd
5701 into \SpecialChar LyX
5703 But the developers generally regard this as a Bad Thing.
5708 Rather, that information, even for the standard classes like
5709 \begin_inset Flex Code
5712 \begin_layout Plain Layout
5718 , is contained in `layout files'.
5719 Similarly, \SpecialChar LyX
5720 itself does not know much about DocBook or XHTML.
5721 What it knows is contained in layout files.
5724 \begin_layout Standard
5725 You can think of the layout file for a given document class as a translation
5726 manual between \SpecialChar LyX
5727 constructs—paragraphs with their corresponding styles,
5728 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5731 Almost everything \SpecialChar LyX
5733 \begin_inset Flex Code
5736 \begin_layout Plain Layout
5742 , for example, is contained in the file
5743 \begin_inset Flex Code
5746 \begin_layout Plain Layout
5752 and in various other files it includes.
5753 For this reason, anyone intending to write layout files should plan to
5754 study the existing files.
5755 A good place to start is with
5756 \begin_inset Flex Code
5759 \begin_layout Plain Layout
5765 , which is included in
5766 \begin_inset Flex Code
5769 \begin_layout Plain Layout
5776 \begin_inset Flex Code
5779 \begin_layout Plain Layout
5785 , and many of the other layout files for document classes.
5786 This file is where sections and the like are defined:
5787 \begin_inset Flex Code
5790 \begin_layout Plain Layout
5796 tells \SpecialChar LyX
5797 how paragraphs that are marked with the Section, Subsection, etc,
5798 styles can be translated into corresponding \SpecialChar LaTeX
5799 , DocBook, and XHTML commands
5802 \begin_inset Flex Code
5805 \begin_layout Plain Layout
5811 file basically just includes several of these
5812 \begin_inset Flex Code
5815 \begin_layout Plain Layout
5824 \begin_layout Standard
5825 Defining the \SpecialChar LyX
5827 correspondence is not the only thing layout files do, though.
5828 Their other job is to define how the \SpecialChar LyX
5829 constructs themselves will appear
5831 The fact that layout files have these two jobs is often a source of confusion,
5832 because they are completely separate.
5833 Telling \SpecialChar LyX
5834 how to translate a certain paragraph style into \SpecialChar LaTeX
5837 how to display it; conversely, telling \SpecialChar LyX
5838 how to display a certain paragraph
5839 style does not tell \SpecialChar LyX
5840 how to translate it into \SpecialChar LaTeX
5841 (let alone tell \SpecialChar LaTeX
5844 So, in general, when you define a new \SpecialChar LyX
5845 construct, you must always do two
5846 quite separate things: (i)
5847 \begin_inset space ~
5850 tell \SpecialChar LyX
5851 how to translate it into \SpecialChar LaTeX
5853 \begin_inset space ~
5856 tell \SpecialChar LyX
5860 \begin_layout Standard
5861 Much the same is true, of course, as regards \SpecialChar LyX
5862 's other backend formats, though
5863 XHTML is in some ways different, because in that case \SpecialChar LyX
5868 able, to some extent, to use information about how it should display a
5869 paragraph on the screen to output information (in the form of CSS) about
5870 how the paragraph should be displayed in a browser.
5871 Even in this case, however, the distinction between what \SpecialChar LyX
5873 and how things are rendered externally remains in force, and the two can
5874 be controlled separately.
5876 \begin_inset CommandInset ref
5878 reference "sec:Tags-for-XHTML"
5885 \begin_layout Section
5886 Installing new \SpecialChar LaTeX
5890 \begin_layout Standard
5891 Some installations may not include a \SpecialChar LaTeX
5892 package or class file that you would
5893 like to use within \SpecialChar LyX
5895 For example, you might need Foil\SpecialChar TeX
5896 , a package for preparing slides for overhead
5898 Modern \SpecialChar LaTeX
5899 distributions like \SpecialChar TeX
5900 Live (2008 or newer) or MiK\SpecialChar TeX
5901 provide a user interface
5902 for installing such packages.
5903 For example, with MiK\SpecialChar TeX
5904 , you start the program
5905 \begin_inset Quotes eld
5909 \begin_inset space ~
5913 \begin_inset Quotes erd
5916 to get a list of available packages.
5917 To install one of them, right click on it or use the corresponding toolbar
5921 \begin_layout Standard
5922 If your \SpecialChar LaTeX
5923 distribution does not provide such a `package manager', or if the
5924 package is not available from your distribution, then follow these steps
5925 to install it manually:
5928 \begin_layout Enumerate
5929 Get the package from
5930 \begin_inset CommandInset href
5933 target "http://www.ctan.org/"
5940 \begin_layout Enumerate
5941 If the package contains a file with the ending
5942 \begin_inset Quotes eld
5946 \begin_inset Flex Code
5949 \begin_layout Plain Layout
5956 \begin_inset Quotes erd
5959 (is the case for Foil\SpecialChar TeX
5960 ) then open a console, change to the folder of this
5961 file and execute the command
5962 \begin_inset Flex Code
5965 \begin_layout Plain Layout
5972 You have now unpacked the package and have all files to install it.
5973 Most \SpecialChar LaTeX
5974 -packages are not packed and you can skip this step.
5977 \begin_layout Enumerate
5978 Now you need to decide if the package should be available for all users
5980 \begin_inset Separator parbreak
5987 \begin_layout Enumerate
5988 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5989 for all users on your system, then install it in your `local' \SpecialChar TeX
5991 install it in your own `user' \SpecialChar TeX
5993 Where these trees should be created, if they do not already exist, depends
5995 To find this out, look in the file
5996 \begin_inset Flex Code
5999 \begin_layout Plain Layout
6009 \begin_layout Plain Layout
6010 This is usually in the directory
6011 \begin_inset Flex Code
6014 \begin_layout Plain Layout
6020 , though you can execute the command
6021 \begin_inset Flex Code
6024 \begin_layout Plain Layout
6035 The location of the `local' \SpecialChar TeX
6036 tree is defined by the
6037 \begin_inset Flex Code
6040 \begin_layout Plain Layout
6046 variable; this is usually somewhere like
6047 \begin_inset Flex Code
6050 \begin_layout Plain Layout
6051 /usr/local/share/texmf
6057 The location of the `user' \SpecialChar TeX
6059 \begin_inset Flex Code
6062 \begin_layout Plain Layout
6069 \begin_inset Flex Code
6072 \begin_layout Plain Layout
6079 (If these variables are not predefined, you have to define them.) You'll
6080 probably need root permissions to create or modify the `local' tree, but
6081 not for your `user' tree.
6082 \begin_inset Newline newline
6085 In general, it is recommended to install in the user tree because your user
6086 will not be modified or even overwritten when you upgrade your system.
6087 It will typically also be backed up together with everything else when
6088 you backup your home directory (which, of course, you do on a regular basis).
6091 \begin_layout Enumerate
6092 On Windows, if you want the new package to be available for all users on
6093 your system, change to the folder where \SpecialChar LaTeX
6094 is installed and then change to
6096 \begin_inset Flex Code
6099 \begin_layout Plain Layout
6110 (For MiK\SpecialChar TeX
6111 , this would be by default the folder
6112 \begin_inset Flex Code
6115 \begin_layout Plain Layout
6133 \begin_layout Plain Layout
6134 Note that this will be the correct path only on English installations.
6135 On a German one, it would be
6136 \begin_inset Flex Code
6139 \begin_layout Plain Layout
6153 , and similarly for other languages.
6158 Create there a new folder
6159 \begin_inset Flex Code
6162 \begin_layout Plain Layout
6168 and copy all files of the package into it.
6170 \begin_inset Newline newline
6173 If the package should only available for you or you don't have admin permissions
6174 , do the same, but in the local \SpecialChar LaTeX
6177 \begin_inset space \thinspace{}
6180 g., for MiK\SpecialChar TeX
6182 \begin_inset space ~
6185 2.8 under Windows XP, this would be the folder:
6186 \begin_inset Newline newline
6192 \begin_inset Flex Code
6195 \begin_layout Plain Layout
6198 Documents and Settings
6210 \begin_inset Newline newline
6216 \begin_inset Phantom HPhantom
6219 \begin_layout Plain Layout
6230 \begin_inset Flex Code
6233 \begin_layout Plain Layout
6246 \begin_inset Newline newline
6249 On Vista, it would be:
6250 \begin_inset Newline newline
6254 \begin_inset Flex Code
6257 \begin_layout Plain Layout
6283 \begin_layout Enumerate
6284 Now one only need to tell \SpecialChar LaTeX
6285 that there are new files.
6286 This depends on the used \SpecialChar LaTeX
6288 \begin_inset Separator parbreak
6295 \begin_layout Enumerate
6296 For \SpecialChar TeX
6297 Live execute the command
6298 \begin_inset Flex Code
6301 \begin_layout Plain Layout
6308 If you installed the package for all users, then you will probably need
6309 to have root permissions for that.
6312 \begin_layout Enumerate
6313 For MiK\SpecialChar TeX
6314 , if you have installed the package for all users, start the program
6316 \begin_inset Quotes eld
6320 \begin_inset space ~
6324 \begin_inset Quotes erd
6327 and press the button marked
6328 \begin_inset Quotes eld
6332 \begin_inset Quotes erd
6336 Otherwise start the program
6337 \begin_inset Quotes eld
6341 \begin_inset Quotes erd
6348 \begin_layout Enumerate
6349 Finally, you need to tell \SpecialChar LyX
6350 that there are new packages available.
6351 So, in \SpecialChar LyX
6353 \begin_inset Flex Noun
6356 \begin_layout Plain Layout
6359 \SpecialChar menuseparator
6365 and then restart \SpecialChar LyX
6369 \begin_layout Standard
6370 Now the package is installed.
6371 In our example, the document class
6372 \begin_inset Flex Code
6375 \begin_layout Plain Layout
6377 \begin_inset space ~
6385 will now be available under
6386 \begin_inset Flex Noun
6389 \begin_layout Plain Layout
6390 Document\SpecialChar menuseparator
6391 Settings\SpecialChar menuseparator
6401 \begin_layout Standard
6402 If you would like to use a \SpecialChar LaTeX
6403 document class that is not even listed in the
6405 \begin_inset Flex Noun
6408 \begin_layout Plain Layout
6409 Document\SpecialChar menuseparator
6410 Settings\SpecialChar menuseparator
6416 , then you need to create a `layout' file for it.
6417 That is the topic of the next section.
6420 \begin_layout Section
6421 Types of layout files
6424 \begin_layout Standard
6425 This section describes the various sorts of \SpecialChar LyX
6426 files that contain layout informati
6428 These files describe various paragraph and character styles, determining
6429 how \SpecialChar LyX
6430 should display them and how they should be translated into \SpecialChar LaTeX
6432 XHTML, or whatever output format is being used.
6436 \begin_layout Standard
6437 We shall try to provide a thorough description of the process of writing
6439 However, there are so many different types of documents supported even
6440 by just \SpecialChar LaTeX
6441 that we can't hope to cover every different possibility or problem
6442 you might encounter.
6443 The \SpecialChar LyX
6444 users' list is frequented by people with lots of experience with layout
6445 design who are willing to share what they've learned, so please feel free
6446 to ask questions there.
6449 \begin_layout Standard
6450 As you prepare to write a new layout, it is extremely helpful to look at
6451 the layouts distributed with \SpecialChar LyX
6453 If you write a \SpecialChar LyX
6454 layout for a \SpecialChar LaTeX
6455 document class that might also be used by
6456 others, or write a module that might be useful to others, then you should
6457 consider posting your layout to the
6458 \begin_inset CommandInset href
6460 name "layout section on the LyX wiki"
6461 target "http://wiki.lyx.org/Layouts/Layouts"
6465 or even to the \SpecialChar LyX
6466 developers' list, so that it might be included in \SpecialChar LyX
6471 \begin_layout Plain Layout
6472 Note that \SpecialChar LyX
6473 is licensed under the General Public License, so any material
6474 that is contributed to \SpecialChar LyX
6475 must be similarly licensed.
6483 \begin_layout Subsection
6485 \begin_inset CommandInset label
6487 name "subsec:Layout-modules"
6494 \begin_layout Standard
6495 We have spoken to this point about `layout files'.
6496 But there are different sorts of files that contain layout information.
6497 Layout files, strictly so called, have the
6498 \begin_inset Flex Code
6501 \begin_layout Plain Layout
6507 extension and provide \SpecialChar LyX
6508 with information about document classes.
6509 Since \SpecialChar LyX
6510 1.6 layout information can also be contained in layout
6515 \begin_inset Flex Code
6518 \begin_layout Plain Layout
6525 Modules are to \SpecialChar LaTeX
6526 packages much as layouts are to \SpecialChar LaTeX
6527 classes, and some modules—such
6529 \begin_inset Flex Code
6532 \begin_layout Plain Layout
6538 module—specifically provide support for one package.
6539 In a sense, layout modules are similar to included
6543 \begin_layout Plain Layout
6544 These can have any extension, but by convention have the
6545 \begin_inset Flex Code
6548 \begin_layout Plain Layout
6560 \begin_inset Flex Code
6563 \begin_layout Plain Layout
6569 —in that modules are not specific to a given document class but may be used
6570 with many different classes.
6571 The difference is that using an included file with
6572 \begin_inset Flex Code
6575 \begin_layout Plain Layout
6581 requires editing that file.
6582 Modules, by contrast, are selected in the
6583 \begin_inset Flex Noun
6586 \begin_layout Plain Layout
6587 Document\SpecialChar menuseparator
6596 \begin_layout Standard
6597 Building modules is the easiest way to get started with layout editing,
6598 since it can be as simple as adding a single new paragraph style or flex
6600 But modules may, in principle, contain anything a layout file can contain.
6603 \begin_layout Standard
6604 After creating a new module and copying it to the
6605 \begin_inset Flex Code
6608 \begin_layout Plain Layout
6614 folder, you will need to reconfigure and then restart \SpecialChar LyX
6617 However, changes you make to the module will be seen immediately, if you
6619 \begin_inset Flex Noun
6622 \begin_layout Plain Layout
6623 Document\SpecialChar menuseparator
6629 , highlight something, and then hit
6630 \begin_inset Quotes eld
6634 \begin_inset Quotes erd
6640 It is strongly recommended that you save your work before doing this
6645 it is strongly recommended that you not attempt to edit modules while simultaneo
6646 usly working on actual documents
6649 Though of course the developers strive to keep \SpecialChar LyX
6650 stable in such situations,
6651 syntax errors and the like in your module file could cause strange behavior.
6654 \begin_layout Subsubsection
6658 \begin_layout Standard
6659 Modules are to \SpecialChar LyX
6660 as packages are to \SpecialChar LaTeX
6662 Sometimes, however, you find yourself wanting a specific inset or character
6663 style just for one document and writing a module that will also be available
6664 to other documents makes little sense.
6665 What you need is \SpecialChar LyX
6667 \begin_inset Quotes eld
6671 \begin_inset Quotes erd
6677 \begin_layout Standard
6678 You will find it under
6680 Document\SpecialChar menuseparator
6681 Settings\SpecialChar menuseparator
6685 The large text box allows you to enter anything that you might enter in
6686 a layout file or module.
6687 You can think of a document's local layout, in fact, as a module that belongs
6689 So, in particular, you must enter a
6690 \begin_inset Flex Code
6693 \begin_layout Plain Layout
6700 Any format is acceptable, but one would normally use the format current
6702 (In \SpecialChar LyX
6703 2.1, the current layout format is 48.) You should be aware that local
6704 layout is not supported by versions of \SpecialChar LyX
6705 prior to 1.6, so you should not
6706 use it if you want to be able to export your document to \SpecialChar LyX
6708 (without, that is, losing the local layout information).
6709 If you wish to be able to export to 1.6—local layout is supported in 1.6,
6710 though there is no UI for it—then you should use format 11 and, of course,
6711 use only layout constructs that were available in \SpecialChar LyX
6715 \begin_layout Standard
6716 When you have entered something in the
6717 \begin_inset Flex Code
6720 \begin_layout Plain Layout
6726 pane, \SpecialChar LyX
6728 \begin_inset Quotes eld
6732 \begin_inset Quotes erd
6735 button at the bottom.
6736 Clicking this button will cause \SpecialChar LyX
6737 to determine whether what you have entered
6738 is valid layout information for the chosen format.
6740 will report the result but, unfortunately, will not tell you what errors
6741 there might have been.
6742 These will be written to the terminal, however, if \SpecialChar LyX
6743 is started from a terminal.
6744 You will not be permitted to save your local layout until you have entered
6748 \begin_layout Standard
6749 The warnings at the end of the previous section apply here, too.
6750 Do not play with local layout while you are actually working, especially
6751 if you have not saved your document.
6752 That said, using local layout with a test document can be a very convenient
6753 way to try out layout ideas, or even to start developing a module.
6756 \begin_layout Subsection
6758 \begin_inset Flex Noun
6761 \begin_layout Plain Layout
6770 \begin_layout Standard
6771 There are two situations you are likely to encounter when wanting to support
6772 a new \SpecialChar LaTeX
6773 document class, involving style (
6774 \begin_inset Flex Code
6777 \begin_layout Plain Layout
6783 ) files and \SpecialChar LaTeX2e
6785 \begin_inset Flex Code
6788 \begin_layout Plain Layout
6795 Supporting a style file is usually fairly easy.
6796 Supporting a new class file is a bit harder.
6797 We'll discuss the former in this section and the latter in the next.
6798 Similar remarks apply, of course, if you want to support a new DocBook
6802 \begin_layout Standard
6803 The easier case is the one in which your new document class is provided
6804 as a style file that is to be used in conjunction with an already supported
6806 For the sake of the example, we'll assume that the style file is called
6808 \begin_inset Flex Noun
6811 \begin_layout Plain Layout
6817 and that it is meant to be used with
6818 \begin_inset Flex Noun
6821 \begin_layout Plain Layout
6827 , which is a standard class.
6831 \begin_layout Standard
6832 Start by copying the existing class's layout file into your local directory:
6836 \begin_layout Plain Layout
6837 Of course, which directory is your local directory will vary by platform,
6838 and \SpecialChar LyX
6839 allows you to specify your local directory on startup, too, using
6841 \begin_inset Flex Code
6844 \begin_layout Plain Layout
6858 \begin_layout LyX-Code
6859 cp report.layout ~/.lyx/layouts/myclass.layout
6862 \begin_layout Standard
6864 \begin_inset Flex Code
6867 \begin_layout Plain Layout
6873 and change the line:
6876 \begin_layout LyX-Code
6879 Declare\SpecialChar LaTeX
6883 \begin_layout Standard
6887 \begin_layout LyX-Code
6890 Declare\SpecialChar LaTeX
6891 Class[report, myclass.sty]{report (myclass)}
6894 \begin_layout Standard
6898 \begin_layout LyX-Code
6900 \begin_inset Newline newline
6906 \begin_inset Newline newline
6912 \begin_layout Standard
6913 near the top of the file.
6916 \begin_layout Standard
6917 Start \SpecialChar LyX
6919 \begin_inset Flex Noun
6922 \begin_layout Plain Layout
6923 Tools\SpecialChar menuseparator
6930 Then restart \SpecialChar LyX
6931 and try creating a new document.
6933 \begin_inset Flex Noun
6936 \begin_layout Plain Layout
6942 " as a document class option in the
6943 \begin_inset Flex Noun
6946 \begin_layout Plain Layout
6947 Document\SpecialChar menuseparator
6954 It is likely that some of the sectioning commands and such in your new
6955 class will work differently from how they worked in the base class—
6956 \begin_inset Flex Code
6959 \begin_layout Plain Layout
6965 in this example—so you can fiddle around with the settings for the different
6966 sections if you wish.
6967 The layout information for sections is contained in
6968 \begin_inset Flex Code
6971 \begin_layout Plain Layout
6977 , but you do not need to copy and change this file.
6978 Instead, you can simply add your changes to your layout file, after the
6980 \begin_inset Flex Code
6983 \begin_layout Plain Layout
6989 , which itself includes
6990 \begin_inset Flex Code
6993 \begin_layout Plain Layout
7000 For example, you might add these lines:
7003 \begin_layout LyX-Code
7007 \begin_layout LyX-Code
7011 \begin_layout LyX-Code
7015 \begin_layout LyX-Code
7019 \begin_layout LyX-Code
7023 \begin_layout Standard
7024 to change the font for chapter headings to sans-serif.
7025 This will override (or, in this case, add to) the existing declaration
7026 for the Chapter style.
7030 \begin_layout Standard
7031 Your new package may also provide commands or environments not present in
7033 In this case, you will want to add these to the layout file.
7035 \begin_inset CommandInset ref
7037 reference "sec:TextClass"
7041 for information on how to do so.
7044 \begin_layout Standard
7046 \begin_inset Flex Noun
7049 \begin_layout Plain Layout
7055 can be used with several different document classes, and even if it cannot,
7056 you might find it easiest just to write a module that you can load with
7058 The simplest possible such module would be:
7061 \begin_layout LyX-Code
7064 DeclareLyXModule{My Package}
7067 \begin_layout LyX-Code
7071 \begin_layout LyX-Code
7072 #Support for mypkg.sty.
7075 \begin_layout LyX-Code
7077 \begin_inset Newline newline
7083 \begin_layout LyX-Code
7085 \begin_inset Newline newline
7091 \begin_layout LyX-Code
7093 \begin_inset Newline newline
7099 \begin_inset Newline newline
7105 \begin_layout Standard
7106 A more complex module might modify the behavior of some existing constructs
7107 or define some new ones.
7109 \begin_inset CommandInset ref
7111 reference "sec:TextClass"
7118 \begin_layout Subsection
7120 \begin_inset Flex Noun
7123 \begin_layout Plain Layout
7132 \begin_layout Standard
7133 There are two possibilities here.
7134 One is that the class file is itself based upon an existing document class.
7135 For example, many thesis classes are based upon
7136 \begin_inset Flex Noun
7139 \begin_layout Plain Layout
7146 To see whether yours is, look for a line like
7149 \begin_layout LyX-Code
7155 \begin_layout Standard
7157 If so, then you may proceed largely as in the previous section, though
7159 \begin_inset Flex Code
7162 \begin_layout Plain Layout
7163 Declare\SpecialChar LaTeX
7169 line will be different.
7170 If your new class is
7171 \begin_inset Flex Code
7174 \begin_layout Plain Layout
7180 and it is based upon
7181 \begin_inset Flex Code
7184 \begin_layout Plain Layout
7190 , then the line should read:
7194 \begin_layout Plain Layout
7195 And it will be easiest if you save the file to
7196 \begin_inset Flex Code
7199 \begin_layout Plain Layout
7206 assumes that the document class has the same name as the layout file.
7215 \begin_layout LyX-Code
7218 Declare\SpecialChar LaTeX
7219 Class[thesis,book]{thesis}
7222 \begin_layout Standard
7223 If, on the other hand, the new class is not based upon an existing class,
7224 you will probably have to
7225 \begin_inset Quotes eld
7229 \begin_inset Quotes erd
7233 We strongly suggest copying an existing layout file which uses a similar
7235 class and then modifying it, if you can do so.
7236 At least use an existing file as a starting point so you can find out what
7237 items you need to worry about.
7238 Again, the specifics are covered below.
7241 \begin_layout Subsection
7243 \begin_inset CommandInset label
7245 name "subsec:Creating-Templates"
7252 \begin_layout Standard
7253 Once you have written a layout file for a new document class, you might
7254 want to consider writing a
7259 A template acts as a kind of tutorial for your layout, showing how it might
7260 be used, though containing dummy content.
7261 You can of course look at the various templates included with \SpecialChar LyX
7265 \begin_layout Standard
7266 Templates are created just like usual documents: using \SpecialChar LyX
7268 The only difference is that usual documents contain all possible settings,
7269 including the font scheme and the paper size.
7270 Usually a user doesn't want a template to overwrite his preferred settings
7271 for such parameters.
7272 For that reason, the designer of a template should remove the corresponding
7274 \begin_inset Flex Code
7277 \begin_layout Plain Layout
7286 \begin_inset Flex Code
7289 \begin_layout Plain Layout
7297 from the template \SpecialChar LyX
7299 This can be done with any simple text-editor, for example
7300 \begin_inset Flex Code
7303 \begin_layout Plain Layout
7310 \begin_inset Flex Code
7313 \begin_layout Plain Layout
7322 \begin_layout Standard
7323 Put the edited template files you create in
7324 \begin_inset Flex Code
7327 \begin_layout Plain Layout
7333 , copy the ones you use from the global template directory in
7334 \begin_inset Flex Code
7337 \begin_layout Plain Layout
7343 to the same place, and redefine the template path in the
7344 \begin_inset Flex Noun
7347 \begin_layout Plain Layout
7348 Tools\SpecialChar menuseparator
7349 Preferences\SpecialChar menuseparator
7358 \begin_layout Standard
7359 Note, by the way, that there is a template which has a particular meaning:
7361 \begin_inset Flex Code
7364 \begin_layout Plain Layout
7371 This template is loaded every time you create a new document with
7372 \begin_inset Flex Noun
7375 \begin_layout Plain Layout
7376 File\SpecialChar menuseparator
7382 in order to provide useful defaults.
7383 To create this template from inside \SpecialChar LyX
7384 , all you have to do is to open a document
7385 with the correct settings, and use the
7386 \begin_inset Flex Noun
7389 \begin_layout Plain Layout
7390 Save as Document Defaults
7398 \begin_layout Subsection
7399 Upgrading old layout files
7402 \begin_layout Standard
7403 The format of layout files changes with each \SpecialChar LyX
7404 release, so old layout files
7405 need to be converted to the new format.
7407 reads a layout file in an older format, it automatically calls the
7409 \begin_inset Flex Code
7412 \begin_layout Plain Layout
7418 to convert it to a temporary file in current format.
7419 The original file is left untouched.
7420 If you use the layout file often, then, you may want to convert it permanently,
7421 so that \SpecialChar LyX
7422 does not have to do so itself every time.
7423 To do this, you can call the converter manually:
7426 \begin_layout Enumerate
7428 \begin_inset Flex Code
7431 \begin_layout Plain Layout
7438 \begin_inset Flex Code
7441 \begin_layout Plain Layout
7450 \begin_layout Enumerate
7452 \begin_inset Newline newline
7456 \begin_inset Flex Code
7459 \begin_layout Plain Layout
7460 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7466 \begin_inset Newline newline
7470 \begin_inset Flex Code
7473 \begin_layout Plain Layout
7479 is the name of your \SpecialChar LyX
7483 \begin_layout Standard
7484 Note that manual conversion does not affect included files, so these will
7485 have to be converted separately.
7488 \begin_layout Section
7489 \begin_inset CommandInset label
7491 name "sec:TextClass"
7495 The layout file format
7498 \begin_layout Standard
7499 The following sections describe how layout files are structured and written.
7500 Our advice is to go slowly, save and test often.
7501 It is really not that hard, except that the multitude of options can become
7502 overwhelming, especially if you try to check out too many at once.
7503 It becomes easier if you use existing layouts of \SpecialChar LyX
7504 as examples/reference
7505 or if you modify an existing layout to your needs.
7508 \begin_layout Standard
7509 Note that all the tags used in layout files are case-insensitive.
7511 \begin_inset Flex Code
7514 \begin_layout Plain Layout
7521 \begin_inset Flex Code
7524 \begin_layout Plain Layout
7531 \begin_inset Flex Code
7534 \begin_layout Plain Layout
7540 are really the same tag.
7541 The possible arguments are printed in brackets after the tag's name.
7542 The default argument is typeset
7543 \begin_inset Flex Code
7546 \begin_layout Plain Layout
7555 If the argument has a data type like
7556 \begin_inset Quotes eld
7560 \begin_inset Quotes erd
7564 \begin_inset Quotes eld
7568 \begin_inset Quotes erd
7571 , the default is shown like this:
7572 \begin_inset Flex Code
7575 \begin_layout Plain Layout
7586 \begin_layout Subsection
7587 The document class declaration and classification
7590 \begin_layout Standard
7591 Lines in a layout file which begin with
7592 \begin_inset Flex Code
7595 \begin_layout Plain Layout
7602 There is one exception to this rule.
7604 \begin_inset Flex Code
7607 \begin_layout Plain Layout
7613 files should begin with lines like:
7616 \begin_layout LyX-Code
7619 #% Do not delete the line below; configure depends on this
7622 \begin_layout LyX-Code
7627 DeclareLaTeXClass{Article (Standard Class)}
7630 \begin_layout LyX-Code
7635 DeclareCategory{Articles}
7638 \begin_layout Standard
7639 The second and third lines are used when you (re)configure \SpecialChar LyX
7641 The layout file is read by the \SpecialChar LaTeX
7643 \begin_inset Flex Code
7646 \begin_layout Plain Layout
7652 , in a special mode where
7653 \begin_inset Flex Code
7656 \begin_layout Plain Layout
7663 The first line is just a \SpecialChar LaTeX
7664 comment, the second one contains the mandatory
7665 declaration of the text class and the third line contains the optional
7666 classification of the class.
7667 If these lines appear in a file named
7668 \begin_inset Flex Code
7671 \begin_layout Plain Layout
7677 , then they define a text class of name
7678 \begin_inset Flex Code
7681 \begin_layout Plain Layout
7687 (the name of the layout file) which uses the \SpecialChar LaTeX
7689 \begin_inset Flex Code
7692 \begin_layout Plain Layout
7698 (the default is to use the same name as the layout).
7700 \begin_inset Quotes eld
7703 Article (Standard Class)
7704 \begin_inset Quotes erd
7707 that appears above is used as a description of the text class in the
7708 \begin_inset Flex Noun
7711 \begin_layout Plain Layout
7712 Document\SpecialChar menuseparator
7720 \begin_inset Quotes eld
7724 \begin_inset Quotes erd
7727 in the example) is also used in the
7728 \begin_inset Flex Noun
7731 \begin_layout Plain Layout
7732 Document\SpecialChar menuseparator
7738 dialog: the text classes are grouped by these categories (which are usually
7739 genres, so typical categories are
7740 \begin_inset Quotes eld
7744 \begin_inset Quotes erd
7748 \begin_inset Quotes eld
7752 \begin_inset Quotes erd
7756 \begin_inset Quotes eld
7760 \begin_inset Quotes erd
7764 \begin_inset Quotes eld
7768 \begin_inset Quotes erd
7772 \begin_inset Quotes eld
7776 \begin_inset Quotes erd
7780 \begin_inset Quotes eld
7784 \begin_inset Quotes erd
7788 If no category has been declared, the class will be put in the
7789 \begin_inset Quotes eld
7793 \begin_inset Quotes erd
7799 \begin_layout Standard
7800 Let's assume that you wrote your own text class that uses the
7801 \begin_inset Flex Code
7804 \begin_layout Plain Layout
7810 document class, but where you changed the appearance of the section headings.
7811 If you put it in a file
7812 \begin_inset Flex Code
7815 \begin_layout Plain Layout
7821 , the header of this file should be:
7824 \begin_layout LyX-Code
7827 #% Do not delete the line below; configure depends on this
7830 \begin_layout LyX-Code
7835 DeclareLaTeXClass[article]{Article (with My Own Headings)}
7838 \begin_layout LyX-Code
7843 DeclareCategory{Articles}
7846 \begin_layout Standard
7847 This declares a text class
7848 \begin_inset Flex Code
7851 \begin_layout Plain Layout
7857 , associated with the \SpecialChar LaTeX
7859 \begin_inset Flex Code
7862 \begin_layout Plain Layout
7869 \begin_inset Quotes eld
7872 Article (with My Own Headings)
7873 \begin_inset Quotes erd
7877 If your text class depends on several packages, you can declare it as:
7880 \begin_layout LyX-Code
7883 #% Do not delete the line below; configure depends on this
7886 \begin_layout LyX-Code
7891 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
7894 \begin_layout LyX-Code
7899 DeclareCategory{Articles}
7902 \begin_layout Standard
7903 This indicates that your text class uses the
7904 \begin_inset Flex Code
7907 \begin_layout Plain Layout
7914 Finally, it is also possible to declare classes for DocBook code.
7915 Typical declarations will look like:
7918 \begin_layout LyX-Code
7921 #% Do not delete the line below; configure depends on this
7924 \begin_layout LyX-Code
7929 DeclareDocBookClass[article]{SGML (DocBook Article)}
7932 \begin_layout LyX-Code
7937 DeclareCategory{Articles (DocBook)}
7940 \begin_layout Standard
7941 Note that these declarations can also be given an optional parameter declaring
7942 the name of the document class (but not a list).
7945 \begin_layout Standard
7946 So, to be as explicit as possible, the form of the layout declaration is:
7949 \begin_layout LyX-Code
7954 DeclareLaTeXClass[class,package.sty]{layout description}
7957 \begin_layout LyX-Code
7962 DeclareCategory{category}
7965 \begin_layout Standard
7966 The class need only be specified if the name of the \SpecialChar LaTeX
7968 name of the layout file are different or if there are packages to load.
7969 If the name of the class file is not specified, then \SpecialChar LyX
7971 that it is the same as the name of the layout file.
7974 \begin_layout Standard
7975 When the text class has been modified to your taste, all you have to do
7976 is to copy it either to
7977 \begin_inset Flex Code
7980 \begin_layout Plain Layout
7987 \begin_inset Flex Code
7990 \begin_layout Plain Layout
7997 \begin_inset Flex Noun
8000 \begin_layout Plain Layout
8001 Tools\SpecialChar menuseparator
8007 , exit \SpecialChar LyX
8009 Then your new text class should be available along with the others.
8012 \begin_layout Standard
8013 Once the layout file is installed, you can edit it and see your changes
8014 without having to reconfigure or to restart \SpecialChar LyX
8020 \begin_layout Plain Layout
8021 In versions of \SpecialChar LyX
8022 prior to 1.6, this was not true.
8023 As a result, editing layout files was very time consuming, since you had
8024 constantly to restart \SpecialChar LyX
8030 You can force a reload of the current layout by using the \SpecialChar LyX
8032 \begin_inset Flex Noun
8035 \begin_layout Plain Layout
8042 There is no default binding for this function—though, of course, you can
8043 bind it to a key yourself.
8044 But you will normally use this function simply by entering it in the mini-buffe
8049 \begin_layout Standard
8055 \begin_inset Flex Noun
8058 \begin_layout Plain Layout
8064 is very much an `advanced feature'.
8069 recommended that you save your work before using this function.
8074 recommended that you not attempt to edit layout information while simultaneousl
8075 y working on a document that you care about.
8076 Use a test document.
8077 Syntax errors and the like in your layout file could cause peculiar behavior.
8078 In particular, such errors could cause \SpecialChar LyX
8079 to regard the current layout as
8080 invalid and to attempt to switch to some other layout.
8084 \begin_layout Plain Layout
8085 Really bad syntax errors may even caused \SpecialChar LyX
8087 This is because certain sorts of errors may make \SpecialChar LyX
8098 The \SpecialChar LyX
8099 team strives to keep \SpecialChar LyX
8100 stable in such situations, but safe is better
8105 \begin_layout Plain Layout
8106 While we're giving advice: make regular backups.
8107 And be nice to your mother.
8115 \begin_layout Subsection
8116 The Module declaration
8119 \begin_layout Standard
8120 A module must begin with a line like the following:
8123 \begin_layout LyX-Code
8126 DeclareLyXModule[endnotes.sty]{Endnotes}
8129 \begin_layout Standard
8130 The mandatory argument, in curly brackets, is the name of the module, as
8132 \begin_inset Flex Noun
8135 \begin_layout Plain Layout
8136 Document\SpecialChar menuseparator
8137 Settings\SpecialChar menuseparator
8144 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8146 on which the module depends.
8147 It is also possible to use the form
8148 \begin_inset Flex Noun
8151 \begin_layout Plain Layout
8157 as an optional argument, which declares that the module can only be used
8158 when there exists a conversion chain between the formats `
8159 \begin_inset Flex Code
8162 \begin_layout Plain Layout
8169 \begin_inset Flex Code
8172 \begin_layout Plain Layout
8181 \begin_layout Standard
8182 The module declaration should then be followed by lines like the following
8186 \begin_layout Plain Layout
8187 Preferably in English if the module should be published with \SpecialChar LyX
8189 This description will appear in the list of messages to be translated and
8190 will be thus translated with the next interface update.
8198 \begin_layout LyX-Code
8202 \begin_layout LyX-Code
8203 #Adds an endnote command, in addition to footnotes.
8207 \begin_layout LyX-Code
8208 #You will need to add
8210 theendnotes in TeX code where you
8213 \begin_layout LyX-Code
8214 #want the endnotes to appear.
8218 \begin_layout LyX-Code
8222 \begin_layout LyX-Code
8223 #Requires: somemodule | othermodule
8226 \begin_layout LyX-Code
8227 #Excludes: badmodule
8230 \begin_layout Standard
8231 The description is used in
8232 \begin_inset Flex Noun
8235 \begin_layout Plain Layout
8236 Document\SpecialChar menuseparator
8237 Settings\SpecialChar menuseparator
8243 to provide the user with information about what the module does.
8245 \begin_inset Flex Code
8248 \begin_layout Plain Layout
8254 line is used to identify other modules with which this one must be used;
8256 \begin_inset Flex Code
8259 \begin_layout Plain Layout
8265 line is used to identify modules with which this one may not be used.
8266 Both are optional, and, as shown, multiple modules should be separated
8267 with the pipe symbol: |.
8268 Note that the required modules are treated disjunctively:
8272 of the required modules must be used.
8277 excluded module may be used.
8278 Note that modules are identified here by their filenames without the
8279 \begin_inset Flex Code
8282 \begin_layout Plain Layout
8290 \begin_inset Flex Code
8293 \begin_layout Plain Layout
8300 \begin_inset Flex Code
8303 \begin_layout Plain Layout
8312 \begin_layout Subsection
8316 \begin_layout Standard
8317 The first non-comment line of any layout file, included file, or module
8322 contain the file format number:
8325 \begin_layout Description
8326 \begin_inset Flex Code
8329 \begin_layout Plain Layout
8336 \begin_inset Flex Code
8339 \begin_layout Plain Layout
8345 ] The format number of the layout file.
8348 \begin_layout Standard
8349 This tag was introduced with \SpecialChar LyX
8351 \begin_inset space ~
8355 Layout files from older \SpecialChar LyX
8356 versions do not have an explicit file format and
8357 are considered to have
8358 \begin_inset Flex Code
8361 \begin_layout Plain Layout
8363 \begin_inset space ~
8372 The format for the present version of \SpecialChar LyX
8374 But each version of \SpecialChar LyX
8375 is capable of reading earlier versions' layout files,
8376 just as they are capable of reading files produced by earlier versions
8379 There is, however, no provision for converting to earlier formats.
8382 \begin_layout Subsection
8383 \begin_inset CommandInset label
8385 name "subsec:General-text-class"
8389 General text class parameters
8392 \begin_layout Standard
8393 These are general parameters that govern the behavior of an entire document
8399 mean that they must appear in
8400 \begin_inset Flex Code
8403 \begin_layout Plain Layout
8409 files rather than in modules.
8410 A module can contain any layout tag.)
8413 \begin_layout Description
8414 \begin_inset Flex Code
8417 \begin_layout Plain Layout
8423 Adds information that will be output in the
8424 \begin_inset Flex Code
8427 \begin_layout Plain Layout
8433 block when the document is output to XHTML.
8434 Typically, this would be used to output CSS style information, but it can
8435 be used for anything that can appear in
8436 \begin_inset Flex Code
8439 \begin_layout Plain Layout
8447 \begin_inset Quotes eld
8451 \begin_inset Flex Code
8454 \begin_layout Plain Layout
8461 \begin_inset Quotes erd
8467 \begin_layout Description
8468 \begin_inset Flex Code
8471 \begin_layout Plain Layout
8477 Adds information to the document preamble.
8479 \begin_inset Newline newline
8483 \begin_inset Quotes eld
8487 \begin_inset Flex Code
8490 \begin_layout Plain Layout
8497 \begin_inset Quotes erd
8503 \begin_layout Description
8504 \begin_inset Flex Code
8507 \begin_layout Plain Layout
8513 Defines formats for use in the display of bibliographic information.
8515 \begin_inset CommandInset ref
8517 reference "subsec:Citation-format-description"
8523 \begin_inset Quotes eld
8527 \begin_inset Flex Code
8530 \begin_layout Plain Layout
8537 \begin_inset Quotes erd
8543 \begin_layout Description
8544 \begin_inset Flex Code
8547 \begin_layout Plain Layout
8553 Describes various global options supported by the document class.
8555 \begin_inset CommandInset ref
8557 reference "subsec:ClassOptions"
8563 \begin_inset Quotes eld
8567 \begin_inset Flex Code
8570 \begin_layout Plain Layout
8577 \begin_inset Quotes erd
8583 \begin_layout Description
8584 \begin_inset Flex Code
8587 \begin_layout Plain Layout
8594 \begin_inset Flex Code
8597 \begin_layout Plain Layout
8606 \begin_inset space \thinspace{}
8610 \begin_inset Flex Code
8613 \begin_layout Plain Layout
8619 ] Whether the class should
8623 to having one or two columns.
8624 Can be changed in the
8625 \begin_inset Flex Noun
8628 \begin_layout Plain Layout
8629 Document\SpecialChar menuseparator
8638 \begin_layout Description
8639 \begin_inset Flex Code
8642 \begin_layout Plain Layout
8649 \begin_inset Flex Code
8652 \begin_layout Plain Layout
8658 ] This sequence defines the properties for a counter.
8659 If the counter does not yet exist, it is created; if it does exist, it
8662 \begin_inset Quotes eld
8666 \begin_inset Flex Code
8669 \begin_layout Plain Layout
8676 \begin_inset Quotes erd
8680 \begin_inset Newline newline
8684 \begin_inset CommandInset ref
8686 reference "subsec:Counters"
8690 for details on counters.
8693 \begin_layout Description
8694 \begin_inset Flex Code
8697 \begin_layout Plain Layout
8703 Sets the default font used to display the document.
8705 \begin_inset CommandInset ref
8707 reference "subsec:Font-description"
8711 for how to declare fonts.
8713 \begin_inset Quotes eld
8717 \begin_inset Flex Code
8720 \begin_layout Plain Layout
8727 \begin_inset Quotes erd
8733 \begin_layout Description
8734 \begin_inset Flex Code
8737 \begin_layout Plain Layout
8744 \begin_inset Flex Code
8747 \begin_layout Plain Layout
8753 ] Specifies a module to be included by default with this document class.
8754 The module is specified as filename without the
8755 \begin_inset Flex Code
8758 \begin_layout Plain Layout
8765 The user can still remove the module, but it will be active at the outset.
8766 (This applies only when new files are created, or when this class is chosen
8767 for an existing document.)
8770 \begin_layout Description
8771 \begin_inset Flex Code
8774 \begin_layout Plain Layout
8781 \begin_inset Flex Code
8784 \begin_layout Plain Layout
8790 ] This is the style that will be assigned to new paragraphs, usually
8791 \begin_inset Flex Noun
8794 \begin_layout Plain Layout
8801 This will default to the first defined style if not given, but you are
8802 encouraged to use this directive.
8805 \begin_layout Description
8806 \begin_inset Flex Code
8809 \begin_layout Plain Layout
8816 \begin_inset Flex Code
8819 \begin_layout Plain Layout
8825 ] This tag indicates that the module (which is specified by filename without
8827 \begin_inset Flex Code
8830 \begin_layout Plain Layout
8836 extension) cannot be used with this document class.
8837 This might be used in a journal-specific layout file to prevent, say, the
8839 \begin_inset Flex Code
8842 \begin_layout Plain Layout
8848 module that numbers theorems by section.
8853 be used in a module.
8854 Modules have their own way of excluding other modules (see
8855 \begin_inset CommandInset ref
8857 reference "subsec:Layout-modules"
8864 \begin_layout Description
8865 \begin_inset Flex Code
8868 \begin_layout Plain Layout
8874 Defines a new float.
8876 \begin_inset CommandInset ref
8878 reference "subsec:Floats"
8884 \begin_inset Quotes eld
8888 \begin_inset Flex Code
8891 \begin_layout Plain Layout
8898 \begin_inset Quotes erd
8904 \begin_layout Description
8905 \begin_inset Flex Code
8908 \begin_layout Plain Layout
8914 Sets the information that will be output in the
8915 \begin_inset Flex Code
8918 \begin_layout Plain Layout
8924 block when this document class is output to XHTML.
8925 Note that this will completely override any prior
8926 \begin_inset Flex Code
8929 \begin_layout Plain Layout
8936 \begin_inset Flex Code
8939 \begin_layout Plain Layout
8947 \begin_inset Newline newline
8951 \begin_inset Flex Code
8954 \begin_layout Plain Layout
8960 if you just want to add material to the preamble.) Must end with
8961 \begin_inset Quotes eld
8965 \begin_inset Flex Code
8968 \begin_layout Plain Layout
8975 \begin_inset Quotes erd
8981 \begin_layout Description
8982 \begin_inset Flex Code
8985 \begin_layout Plain Layout
8992 \begin_inset Flex Code
8995 \begin_layout Plain Layout
9001 ] The style to use for the table of contents, bibliography, and so forth,
9002 when the document is output to HTML.
9003 For articles, this should normally be
9004 \begin_inset Flex Code
9007 \begin_layout Plain Layout
9014 \begin_inset Flex Code
9017 \begin_layout Plain Layout
9024 If it is not given, then \SpecialChar LyX
9025 will attempt to figure out which layout to use.
9028 \begin_layout Description
9029 \begin_inset Flex Code
9032 \begin_layout Plain Layout
9039 \begin_inset Flex Code
9042 \begin_layout Plain Layout
9048 ] Modifies the properties of the given counter.
9049 If the counter does not exist, the statement is ignored.
9051 \begin_inset Quotes eld
9055 \begin_inset Flex Code
9058 \begin_layout Plain Layout
9065 \begin_inset Quotes erd
9069 \begin_inset Newline newline
9073 \begin_inset CommandInset ref
9075 reference "subsec:Counters"
9079 for details on counters.
9082 \begin_layout Description
9084 \change_deleted 1414654397 1449175404
9085 \begin_inset Flex Code
9088 \begin_layout Plain Layout
9095 \begin_inset Flex Code
9098 \begin_layout Plain Layout
9104 ] Modifies the properties of the given paragraph style.
9105 If the style does not exist, the statement is ignored.
9107 \begin_inset Quotes eld
9111 \begin_inset Flex Code
9114 \begin_layout Plain Layout
9121 \begin_inset Quotes erd
9127 \begin_layout Description
9128 \begin_inset Flex Code
9131 \begin_layout Plain Layout
9138 \begin_inset Flex Code
9141 \begin_layout Plain Layout
9147 ] This allows you to include another layout definition file within yours
9148 to avoid duplicating commands.
9149 Common examples are the standard layout files, for example,
9150 \begin_inset Flex Code
9153 \begin_layout Plain Layout
9159 , which contains most of the basic layouts.
9162 \begin_layout Description
9163 \begin_inset Flex Code
9166 \begin_layout Plain Layout
9173 \begin_inset Flex Code
9176 \begin_layout Plain Layout
9182 ] This section (re-)defines the layout of an inset.
9183 It can be applied to an existing inset or to a new, user-defined inset,
9184 e.g., a new character style.
9186 \begin_inset Quotes eld
9190 \begin_inset Flex Code
9193 \begin_layout Plain Layout
9200 \begin_inset Quotes erd
9204 \begin_inset Newline newline
9208 \begin_inset CommandInset ref
9210 reference "subsec:Flex-insets-and"
9214 for more information.
9218 \begin_layout Description
9219 \begin_inset Flex Code
9222 \begin_layout Plain Layout
9229 \begin_inset Flex Code
9232 \begin_layout Plain Layout
9238 ] A string that indicates the width of the left margin on the screen, for
9240 \begin_inset Quotes eld
9244 \begin_inset Flex Code
9247 \begin_layout Plain Layout
9254 \begin_inset Quotes erd
9258 (Note that this is not a `length', like
9259 \begin_inset Quotes eld
9263 \begin_inset Quotes erd
9269 \begin_layout Description
9271 \change_inserted 1414654397 1449175421
9272 \begin_inset Flex Code
9275 \begin_layout Plain Layout
9277 \change_inserted 1414654397 1449175415
9284 \begin_inset Flex Code
9287 \begin_layout Plain Layout
9289 \change_inserted 1414654397 1449175410
9295 ] Modifies the properties of the given paragraph style.
9296 If the style does not exist, this section is ignored.
9298 \begin_inset Quotes eld
9302 \begin_inset Flex Code
9305 \begin_layout Plain Layout
9307 \change_inserted 1414654397 1449175410
9314 \begin_inset Quotes erd
9320 \begin_layout Description
9321 \begin_inset Flex Code
9324 \begin_layout Plain Layout
9331 \begin_inset Flex Code
9334 \begin_layout Plain Layout
9340 ] Deletes an existing counter, usually one defined in an included file.
9343 \begin_layout Description
9344 \begin_inset Flex Code
9347 \begin_layout Plain Layout
9354 \begin_inset Flex Code
9357 \begin_layout Plain Layout
9363 ] Deletes an existing float.
9364 This is particularly useful when you want to suppress a float that has
9365 been defined in an input file.
9368 \begin_layout Description
9369 \begin_inset Flex Code
9372 \begin_layout Plain Layout
9379 \begin_inset Flex Code
9382 \begin_layout Plain Layout
9388 ] Deletes an existing style.
9391 \begin_layout Description
9392 \begin_inset Flex Code
9395 \begin_layout Plain Layout
9402 \begin_inset Flex Code
9405 \begin_layout Plain Layout
9411 ] The file format (as defined in the \SpecialChar LyX
9412 preferences) produced by this document
9414 It is mainly useful when
9415 \begin_inset Flex Code
9418 \begin_layout Plain Layout
9425 \begin_inset Flex Code
9428 \begin_layout Plain Layout
9434 and one wants to define a new type of literate document.
9435 The format is reset to
9436 \begin_inset Quotes eld
9440 \begin_inset Flex Code
9443 \begin_layout Plain Layout
9450 \begin_inset Quotes erd
9454 \begin_inset Quotes eld
9458 \begin_inset Flex Code
9461 \begin_layout Plain Layout
9468 \begin_inset Quotes erd
9471 when the corresponding
9472 \begin_inset Flex Code
9475 \begin_layout Plain Layout
9481 parameter is encountered.
9484 \begin_layout Description
9485 \begin_inset Flex Code
9488 \begin_layout Plain Layout
9495 \begin_inset Flex Code
9498 \begin_layout Plain Layout
9509 \begin_inset Flex Code
9512 \begin_layout Plain Layout
9519 \begin_inset Flex Code
9522 \begin_layout Plain Layout
9528 ] Specifies what sort of output documents using this class will produce.
9531 \begin_layout Description
9532 \begin_inset Flex Code
9535 \begin_layout Plain Layout
9542 \begin_inset Flex Code
9545 \begin_layout Plain Layout
9552 \begin_inset Flex Code
9555 \begin_layout Plain Layout
9561 ] Specifies options, given in the second string, for the package named by
9564 \begin_inset Quotes eld
9568 \begin_inset Flex Code
9571 \begin_layout Plain Layout
9572 PackageOptions natbib square
9578 \begin_inset Quotes erd
9582 \begin_inset Flex Code
9585 \begin_layout Plain Layout
9591 to be loaded with the
9592 \begin_inset Flex Code
9595 \begin_layout Plain Layout
9602 (For \SpecialChar TeX
9603 perts, this causes \SpecialChar LyX
9605 \begin_inset Flex Code
9608 \begin_layout Plain Layout
9611 PassOptionsToPackage{natbib}{square}
9617 \begin_inset Flex Code
9620 \begin_layout Plain Layout
9629 \begin_layout Description
9630 \begin_inset Flex Code
9633 \begin_layout Plain Layout
9640 \begin_inset Flex Code
9643 \begin_layout Plain Layout
9652 \begin_inset Flex Code
9655 \begin_layout Plain Layout
9662 \begin_inset Flex Code
9665 \begin_layout Plain Layout
9671 ] The default pagestyle.
9672 Can be changed in the
9673 \begin_inset Flex Noun
9676 \begin_layout Plain Layout
9677 Document\SpecialChar menuseparator
9686 \begin_layout Description
9687 \begin_inset Flex Code
9690 \begin_layout Plain Layout
9696 Sets the preamble for the \SpecialChar LaTeX
9698 Note that this will completely override any prior
9699 \begin_inset Flex Code
9702 \begin_layout Plain Layout
9709 \begin_inset Flex Code
9712 \begin_layout Plain Layout
9720 \begin_inset Flex Code
9723 \begin_layout Plain Layout
9729 if you just want to add material to the preamble.) Must end with
9730 \begin_inset Quotes eld
9734 \begin_inset Flex Code
9737 \begin_layout Plain Layout
9744 \begin_inset Quotes erd
9750 \begin_layout Description
9751 \begin_inset Flex Code
9754 \begin_layout Plain Layout
9761 \begin_inset Flex Code
9764 \begin_layout Plain Layout
9771 \begin_inset Flex Code
9774 \begin_layout Plain Layout
9783 \begin_inset space \thinspace{}
9787 \begin_inset Flex Code
9790 \begin_layout Plain Layout
9796 ] Whether the class already provides the feature
9797 \begin_inset Flex Code
9800 \begin_layout Plain Layout
9807 A feature is in general the name of a package (e.
9808 \begin_inset space \thinspace{}
9812 \begin_inset space \space{}
9816 \begin_inset Flex Code
9819 \begin_layout Plain Layout
9826 \begin_inset Flex Code
9829 \begin_layout Plain Layout
9836 \begin_inset space \thinspace{}
9840 \begin_inset space \space{}
9844 \begin_inset Flex Code
9847 \begin_layout Plain Layout
9854 \begin_inset Flex Code
9857 \begin_layout Plain Layout
9865 \begin_inset CommandInset ref
9867 reference "chap:List-of-functions"
9871 for the list of features.
9874 \begin_layout Description
9875 \begin_inset Flex Code
9878 \begin_layout Plain Layout
9885 \begin_inset Flex Code
9888 \begin_layout Plain Layout
9894 ] Indicates that this layout provides the functionality of the module mentioned,
9895 which should be specified by the filename without the
9896 \begin_inset Flex Code
9899 \begin_layout Plain Layout
9906 This will typically be used if the layout includes the module directly,
9907 rather than using the
9908 \begin_inset Flex Code
9911 \begin_layout Plain Layout
9917 tag to indicate that it ought to be used.
9918 It could also be used in a module that provided an alternate implementation
9919 of the same functionality.
9922 \begin_layout Description
9924 \change_inserted 1414654397 1449175396
9925 \begin_inset Flex Code
9928 \begin_layout Plain Layout
9930 \change_inserted 1414654397 1449175389
9937 \begin_inset Flex Code
9940 \begin_layout Plain Layout
9942 \change_inserted 1414654397 1449175384
9948 ] Creates a new paragraph style if it does not already exist.
9949 If the style does exist, this section is ignored.
9951 \begin_inset Quotes eld
9955 \begin_inset Flex Code
9958 \begin_layout Plain Layout
9960 \change_inserted 1414654397 1449175384
9967 \begin_inset Quotes erd
9973 \begin_layout Description
9974 \begin_inset Flex Code
9977 \begin_layout Plain Layout
9984 \begin_inset Flex Code
9987 \begin_layout Plain Layout
9993 ] Whether the class requires the feature
9994 \begin_inset Flex Code
9997 \begin_layout Plain Layout
10004 Multiple features must be separated by commas.
10005 Note that you can only request supported features.
10007 \begin_inset CommandInset ref
10009 reference "chap:List-of-functions"
10013 for the list of features.).
10014 If you require a package with specific options, you can additionally use
10016 \begin_inset Flex Code
10019 \begin_layout Plain Layout
10028 \begin_layout Description
10029 \begin_inset Flex Code
10032 \begin_layout Plain Layout
10039 \begin_inset Flex Code
10042 \begin_layout Plain Layout
10048 ] A string that indicates the width of the right margin on the screen, for
10050 \begin_inset Quotes eld
10054 \begin_inset Flex Code
10057 \begin_layout Plain Layout
10064 \begin_inset Quotes erd
10070 \begin_layout Description
10071 \begin_inset Flex Code
10074 \begin_layout Plain Layout
10081 \begin_inset Flex Code
10084 \begin_layout Plain Layout
10090 ] Sets which divisions get numbered.
10092 \begin_inset Newline newline
10096 \begin_inset Flex Code
10099 \begin_layout Plain Layout
10105 counter in \SpecialChar LaTeX
10109 \begin_layout Description
10110 \begin_inset Flex Code
10113 \begin_layout Plain Layout
10120 \begin_inset Flex Code
10123 \begin_layout Plain Layout
10132 \begin_inset space \thinspace{}
10136 \begin_inset Flex Code
10139 \begin_layout Plain Layout
10145 ] Whether the class-default should be printing on one or both sides of the
10147 Can be changed in the
10148 \begin_inset Flex Noun
10151 \begin_layout Plain Layout
10152 Document\SpecialChar menuseparator
10161 \begin_layout Description
10162 \begin_inset Flex Code
10165 \begin_layout Plain Layout
10172 \begin_inset Flex Code
10175 \begin_layout Plain Layout
10181 ] This sequence defines a paragraph style.
10182 If the style does not yet exist, it is created; if it does exist, its parameter
10185 \begin_inset Quotes eld
10189 \begin_inset Flex Code
10192 \begin_layout Plain Layout
10199 \begin_inset Quotes erd
10203 \begin_inset Newline newline
10207 \begin_inset CommandInset ref
10209 reference "subsec:Paragraph-Styles"
10213 for details on paragraph styles.
10216 \begin_layout Description
10217 \begin_inset Flex Code
10220 \begin_layout Plain Layout
10227 \begin_inset Flex Code
10230 \begin_layout Plain Layout
10236 ] The name of the command or environment to be used with
10237 \begin_inset Flex Code
10240 \begin_layout Plain Layout
10249 \begin_layout Description
10250 \begin_inset Flex Code
10253 \begin_layout Plain Layout
10260 \begin_inset Flex Code
10263 \begin_layout Plain Layout
10272 \begin_inset Flex Code
10275 \begin_layout Plain Layout
10281 ] Indicates what kind of markup is used to define the title of a document.
10283 \begin_inset Flex Code
10286 \begin_layout Plain Layout
10292 means that the macro with name
10293 \begin_inset Flex Code
10296 \begin_layout Plain Layout
10302 will be inserted after the last layout which has
10303 \begin_inset Quotes eld
10307 \begin_inset Flex Code
10310 \begin_layout Plain Layout
10312 \begin_inset space ~
10321 \begin_inset Quotes erd
10326 \begin_inset Flex Code
10329 \begin_layout Plain Layout
10335 corresponds to the case where all layouts which have
10336 \begin_inset Quotes eld
10340 \begin_inset Flex Code
10343 \begin_layout Plain Layout
10345 \begin_inset space ~
10354 \begin_inset Quotes erd
10357 should be enclosed into the
10358 \begin_inset Flex Code
10361 \begin_layout Plain Layout
10370 \begin_layout Description
10371 \begin_inset Flex Code
10374 \begin_layout Plain Layout
10381 \begin_inset Flex Code
10384 \begin_layout Plain Layout
10390 ] Sets which divisions are included in the table of contents.
10392 \begin_inset Flex Code
10395 \begin_layout Plain Layout
10401 counter in \SpecialChar LaTeX
10405 \begin_layout Subsection
10406 \begin_inset Flex Code
10409 \begin_layout Plain Layout
10416 \begin_inset CommandInset label
10418 name "subsec:ClassOptions"
10425 \begin_layout Standard
10427 \begin_inset Flex Code
10430 \begin_layout Plain Layout
10436 section can contain the following entries:
10439 \begin_layout Description
10440 \begin_inset Flex Code
10443 \begin_layout Plain Layout
10450 \begin_inset Flex Code
10453 \begin_layout Plain Layout
10459 ] The list of available font sizes for the document's main font, separated
10461 \begin_inset Quotes eld
10465 \begin_inset Flex Code
10468 \begin_layout Plain Layout
10475 \begin_inset Quotes erd
10481 \begin_layout Description
10482 \begin_inset Flex Code
10485 \begin_layout Plain Layout
10491 Used to set the DTD line with XML-based output classes.
10493 \begin_inset space \thinspace{}
10497 \begin_inset Quotes eld
10500 -//OASIS//DTD DocBook V4.2//EN
10501 \begin_inset Quotes erd
10507 \begin_layout Description
10508 \begin_inset Flex Code
10511 \begin_layout Plain Layout
10518 \begin_inset Flex Code
10521 \begin_layout Plain Layout
10522 string="empty|plain|headings|fancy"
10527 ] The list of available page sty\SpecialChar softhyphen
10529 \begin_inset Quotes eld
10533 \begin_inset Flex Code
10536 \begin_layout Plain Layout
10543 \begin_inset Quotes erd
10549 \begin_layout Description
10550 \begin_inset Flex Code
10553 \begin_layout Plain Layout
10560 \begin_inset Flex Code
10563 \begin_layout Plain Layout
10569 ] Some document class options, separated by a comma, that will be added
10570 to the optional part of the
10571 \begin_inset Flex Code
10574 \begin_layout Plain Layout
10585 \begin_layout Standard
10587 \begin_inset Flex Code
10590 \begin_layout Plain Layout
10596 section must end with
10597 \begin_inset Quotes eld
10601 \begin_inset Flex Code
10604 \begin_layout Plain Layout
10611 \begin_inset Quotes erd
10617 \begin_layout Subsection
10619 \begin_inset CommandInset label
10621 name "subsec:Paragraph-Styles"
10628 \begin_layout Standard
10629 A paragraph style description looks like this:
10633 \begin_layout Plain Layout
10634 Note that this will either define a new style or modify an existing one.
10642 \begin_layout LyX-Code
10649 \begin_layout LyX-Code
10653 \begin_layout LyX-Code
10657 \begin_layout Standard
10658 where the following commands are allowed:
10661 \begin_layout Description
10662 \begin_inset Flex Code
10665 \begin_layout Plain Layout
10672 \begin_inset Flex Code
10675 \begin_layout Plain Layout
10680 , left, right, center
10685 ] Paragraph alignment.
10688 \begin_layout Description
10689 \begin_inset Flex Code
10692 \begin_layout Plain Layout
10699 \begin_inset Flex Code
10702 \begin_layout Plain Layout
10707 , left, right, center
10712 ] A comma separated list of permitted alignments.
10713 (Some \SpecialChar LaTeX
10714 styles prohibit certain alignments, since those wouldn't make sense.
10715 For example a right-aligned or centered enumeration isn't possible.)
10718 \begin_layout Description
10719 \begin_inset Flex Code
10722 \begin_layout Plain Layout
10729 \begin_inset Flex Code
10732 \begin_layout Plain Layout
10738 ] Defines argument number <int> of a command\SpecialChar breakableslash
10739 environment associated with
10741 This is useful for things like section headings, and only makes sense with
10744 Every (optional or required) argument of a command or environment – except
10745 for the required argument that is associated with the content of the paragraph
10746 itself – has a separate definition, where the number specifies the order
10748 The definition must end with
10749 \begin_inset Flex Code
10752 \begin_layout Plain Layout
10759 So a command with two optional arguments has:
10760 \begin_inset Separator parbreak
10767 \begin_layout Quote
10773 \begin_layout Quote
10779 \begin_layout Quote
10785 \begin_layout Quote
10791 \begin_layout Quote
10797 \begin_layout Quote
10803 \begin_layout Standard
10805 \begin_inset Flex Code
10808 \begin_layout Plain Layout
10814 definition, the following specifications are possible:
10817 \begin_layout Itemize
10818 \begin_inset Flex Code
10821 \begin_layout Plain Layout
10828 \begin_inset Flex Code
10831 \begin_layout Plain Layout
10837 The string that will appear both in the menu (to insert this argument)
10838 and on the argument inset button (unless you also specify a separate
10839 \begin_inset Flex Code
10842 \begin_layout Plain Layout
10849 For the menu, you can define an accelerator by appending the respective
10850 character to the string, divided by
10851 \begin_inset Quotes eld
10855 \begin_inset Quotes erd
10859 \begin_inset space \thinspace{}
10863 \begin_inset space \space{}
10867 \begin_inset Quotes eld
10871 \begin_inset Flex Code
10874 \begin_layout Plain Layout
10881 \begin_inset Quotes erd
10887 \begin_layout Itemize
10888 \begin_inset Flex Code
10891 \begin_layout Plain Layout
10898 \begin_inset Flex Code
10901 \begin_layout Plain Layout
10907 A separate string for the menu.
10908 You can define an accelerator by appending the respective character to
10909 the string, divided by
10910 \begin_inset Quotes eld
10914 \begin_inset Quotes erd
10918 \begin_inset space \thinspace{}
10922 \begin_inset space \space{}
10926 \begin_inset Quotes eld
10930 \begin_inset Flex Code
10933 \begin_layout Plain Layout
10940 \begin_inset Quotes erd
10944 This specification is optional.
10945 If it is not given the
10946 \begin_inset Flex Code
10949 \begin_layout Plain Layout
10955 will be used instead for the menu.
10958 \begin_layout Itemize
10959 \begin_inset Flex Code
10962 \begin_layout Plain Layout
10969 \begin_inset Flex Code
10972 \begin_layout Plain Layout
10978 A longer explanatory text that appears in the tooltip when hovering over
10979 the argument inset.
10982 \begin_layout Itemize
10983 \begin_inset Flex Code
10986 \begin_layout Plain Layout
10993 \begin_inset Flex Code
10996 \begin_layout Plain Layout
11005 \begin_inset space \thinspace{}
11009 \begin_inset Flex Code
11012 \begin_layout Plain Layout
11018 ] Declare if this is a mandatory (1) or an optional (0) argument.
11019 Mandatory arguments will be output empty if not given, while optional arguments
11020 will not be output at all.
11021 By default, mandatory arguments are delimited by
11022 \begin_inset Flex Code
11025 \begin_layout Plain Layout
11031 , while optional arguments are delimited by
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 another argument (by its number) which this argument requires to
11065 be output if it is itself output.
11067 \begin_inset space \thinspace{}
11070 g., in \SpecialChar LaTeX
11071 commands, optional arguments often require previous optional arguments
11072 to be output (at least empty), as in
11073 \begin_inset Flex Code
11076 \begin_layout Plain Layout
11079 command[][argument]{text}
11085 This can be achieved by the statement
11086 \begin_inset Flex Code
11089 \begin_layout Plain Layout
11096 \begin_inset Flex Code
11099 \begin_layout Plain Layout
11108 \begin_layout Itemize
11109 \begin_inset Flex Code
11112 \begin_layout Plain Layout
11119 \begin_inset Flex Code
11122 \begin_layout Plain Layout
11128 defines a custom left delimiter (instead of
11129 \begin_inset Flex Code
11132 \begin_layout Plain Layout
11139 \begin_inset Flex Code
11142 \begin_layout Plain Layout
11149 A line break in the output can be indicated by
11150 \begin_inset Flex Code
11153 \begin_layout Plain Layout
11162 \begin_layout Itemize
11163 \begin_inset Flex Code
11166 \begin_layout Plain Layout
11173 \begin_inset Flex Code
11176 \begin_layout Plain Layout
11182 defines a custom right delimiter (instead of
11183 \begin_inset Flex Code
11186 \begin_layout Plain Layout
11193 \begin_inset Flex Code
11196 \begin_layout Plain Layout
11203 A line break in the output can be indicated by
11204 \begin_inset Flex Code
11207 \begin_layout Plain Layout
11216 \begin_layout Itemize
11217 \begin_inset Flex Code
11220 \begin_layout Plain Layout
11227 \begin_inset Flex Code
11230 \begin_layout Plain Layout
11236 defines an argument that is inserted if and only if no user-specified arguments
11238 \begin_inset space \thinspace{}
11242 \begin_inset space \space{}
11245 if no argument inset has been inserted (note that also an empty argument
11246 inset omits the DefaultArg).
11247 Multiple arguments need to be separated by comma.
11250 \begin_layout Itemize
11251 \begin_inset Flex Code
11254 \begin_layout Plain Layout
11261 \begin_inset Flex Code
11264 \begin_layout Plain Layout
11270 defines an argument that is inserted in any case (alone or in addition
11271 to user-specified arguments).
11272 Multiple arguments need to be separated by comma.
11275 \begin_layout Itemize
11276 \begin_inset Flex Code
11279 \begin_layout Plain Layout
11285 The font used for the argument content, see
11286 \begin_inset CommandInset ref
11288 reference "subsec:Font-description"
11295 \begin_layout Itemize
11296 \begin_inset Flex Code
11299 \begin_layout Plain Layout
11305 The font used for the label; see
11306 \begin_inset CommandInset ref
11308 reference "subsec:Font-description"
11315 \begin_layout Itemize
11316 \begin_inset Flex Code
11319 \begin_layout Plain Layout
11326 \begin_inset Flex Code
11329 \begin_layout Plain Layout
11334 , Minimalistic, Conglomerate
11339 ] describes the rendering style used for the inset's frame and buttons.
11342 \begin_layout Itemize
11343 \begin_inset Flex Code
11346 \begin_layout Plain Layout
11353 \begin_inset Flex Code
11356 \begin_layout Plain Layout
11363 \begin_inset Flex Code
11366 \begin_layout Plain Layout
11372 , this argument is automatically inserted when the respective style is selected.
11373 Currently, only one argument per style\SpecialChar breakableslash
11374 layout can be automatically inserted.
11377 \begin_layout Itemize
11378 \begin_inset Flex Code
11381 \begin_layout Plain Layout
11388 \begin_inset Flex Code
11391 \begin_layout Plain Layout
11398 \begin_inset Flex Code
11401 \begin_layout Plain Layout
11407 , this argument will be inserted with a copy of the co-text (either selected
11408 text or the whole paragraph) as content.
11411 \begin_layout Itemize
11412 \begin_inset Flex Code
11415 \begin_layout Plain Layout
11422 \begin_inset Flex Code
11425 \begin_layout Plain Layout
11426 string of characters
11435 Defines individual characters that should be output in raw form, meaning
11436 without special translations that \SpecialChar LaTeX
11438 Note that, contrary to PassThru, this needs to be explicitly defined for
11440 That is, arguments do not inherit PassThruChars from their parent inset
11444 \begin_layout Standard
11445 By default, the text entered in the \SpecialChar LyX
11446 workarea in the respective layout is
11447 the last (mandatory) argument of a command if the
11448 \begin_inset Flex Code
11451 \begin_layout Plain Layout
11458 \begin_inset Flex Code
11461 \begin_layout Plain Layout
11468 However, arguments with the prefix
11469 \begin_inset Flex Code
11472 \begin_layout Plain Layout
11478 are output after this workarea argument.
11479 Note that post-argument numbering restarts at 1, so the first argument
11480 following the workarea argument is
11481 \begin_inset Flex Code
11484 \begin_layout Plain Layout
11491 Post-arguments are ignored in any other
11492 \begin_inset Flex Code
11495 \begin_layout Plain Layout
11502 \begin_inset Flex Code
11505 \begin_layout Plain Layout
11514 \begin_layout Standard
11516 \begin_inset Flex Code
11519 \begin_layout Plain Layout
11528 \begin_inset Flex Code
11531 \begin_layout Plain Layout
11540 \begin_inset Flex Code
11543 \begin_layout Plain Layout
11549 followed by the number (e.
11550 \begin_inset space \thinspace{}
11554 \begin_inset space \space{}
11558 \begin_inset Flex Code
11561 \begin_layout Plain Layout
11571 \begin_layout Description
11572 \begin_inset Flex Code
11575 \begin_layout Plain Layout
11581 Note that this will completely override any prior
11582 \begin_inset Flex Code
11585 \begin_layout Plain Layout
11591 declaration for this style.
11593 \begin_inset Quotes eld
11597 \begin_inset Flex Code
11600 \begin_layout Plain Layout
11607 \begin_inset Quotes erd
11612 \begin_inset CommandInset ref
11614 reference "subsec:I18n"
11618 for details on its use.
11621 \begin_layout Description
11622 \begin_inset Flex Code
11625 \begin_layout Plain Layout
11632 \begin_inset Flex Code
11635 \begin_layout Plain Layout
11645 \begin_layout Plain Layout
11646 Note that a `float' here is a real number, such as: 1.5.
11651 The vertical space with which the last of a chain of paragraphs with this
11652 style is separated from the following paragraph.
11653 If the next paragraph has another style, the separations are not simply
11654 added, but the maximum is taken.
11657 \begin_layout Description
11658 \begin_inset Flex Code
11661 \begin_layout Plain Layout
11668 \begin_inset Flex Code
11671 \begin_layout Plain Layout
11677 ] The category for this style.
11678 This is used to group related styles in the style combobox on the toolbar.
11679 Any string can be used, but you may want to use existing categories with
11684 \begin_layout Description
11685 \begin_inset Flex Code
11688 \begin_layout Plain Layout
11694 Depth of XML command.
11695 Used only with XML-type formats.
11698 \begin_layout Description
11699 \begin_inset Flex Code
11702 \begin_layout Plain Layout
11709 \begin_inset Flex Code
11712 \begin_layout Plain Layout
11718 ] Copies all the features of an existing style into the current one.
11722 \begin_layout Description
11723 \begin_inset Flex Code
11726 \begin_layout Plain Layout
11733 \begin_inset Flex Code
11736 \begin_layout Plain Layout
11742 ] The name of a style whose preamble should be output
11747 This allows to ensure some ordering of the preamble snippets when macros
11748 definitions depend on one another.
11752 \begin_layout Plain Layout
11753 Note that, besides that functionality, there is no way to ensure any ordering
11755 The ordering that you see in a given version of \SpecialChar LyX
11756 may change without warning
11765 \begin_layout Description
11766 \begin_inset Flex Code
11769 \begin_layout Plain Layout
11776 \begin_inset Flex Code
11779 \begin_layout Plain Layout
11784 , Box, Filled_Box, Static
11789 ] The type of label that stands at the end of the paragraph (or sequence
11791 \begin_inset Flex Code
11794 \begin_layout Plain Layout
11801 \begin_inset Newline newline
11805 \begin_inset Flex Code
11808 \begin_layout Plain Layout
11815 \begin_inset Flex Code
11818 \begin_layout Plain Layout
11825 \begin_inset Flex Code
11828 \begin_layout Plain Layout
11836 \begin_inset Flex Code
11839 \begin_layout Plain Layout
11846 \begin_inset Quotes eld
11850 \begin_inset Quotes erd
11854 \begin_inset Flex Code
11857 \begin_layout Plain Layout
11864 \begin_inset space \space{}
11868 \begin_inset Flex Code
11871 \begin_layout Plain Layout
11877 ) is a white (resp.
11878 \begin_inset space ~
11881 black) square suitable for end of proof markers,
11882 \begin_inset Flex Code
11885 \begin_layout Plain Layout
11891 is an explicit text string.
11894 \begin_layout Description
11895 \begin_inset Flex Code
11898 \begin_layout Plain Layout
11905 \begin_inset Flex Code
11908 \begin_layout Plain Layout
11914 ] The string used for a label with a
11915 \begin_inset Flex Code
11918 \begin_layout Plain Layout
11925 \begin_inset Newline newline
11929 \begin_inset Flex Code
11932 \begin_layout Plain Layout
11942 \begin_layout Description
11943 \begin_inset Flex Code
11946 \begin_layout Plain Layout
11952 The font used for both the text body
11958 \begin_inset CommandInset ref
11960 reference "subsec:Font-description"
11965 Note that defining this font automatically defines the
11966 \begin_inset Flex Code
11969 \begin_layout Plain Layout
11976 So you should define this one first if you also want to define
11977 \begin_inset Flex Code
11980 \begin_layout Plain Layout
11989 \begin_layout Description
11990 \begin_inset Flex Code
11993 \begin_layout Plain Layout
12000 \begin_inset Flex Code
12003 \begin_layout Plain Layout
12009 ] Used for backporting new styles to stable \SpecialChar LyX
12011 The first stable version that supports this tag is \SpecialChar LyX
12013 The argument is a number which may either be 0, -1 or any value greater
12016 \begin_inset Flex Code
12019 \begin_layout Plain Layout
12025 flag of a style is greater than zero, it will always be written to the
12027 If a .lyx file is read, the style definitions from the document header are
12028 added to the document class.
12029 Therefore even older \SpecialChar LyX
12030 versions can handle the style.
12032 \begin_inset Flex Code
12035 \begin_layout Plain Layout
12041 is a version number: If the style is read, and the version number is less
12042 than the version number of the already existing style in the document class,
12043 the new style is ignored.
12044 If the version number is greater, the new style replaces the existing style.
12045 A value of -1 means an infinite version number, i.
12046 \begin_inset space \thinspace{}
12050 \begin_inset space \space{}
12053 the style is always used.
12056 \begin_layout Description
12057 \begin_inset Flex Code
12060 \begin_layout Plain Layout
12067 \begin_inset Flex Code
12070 \begin_layout Plain Layout
12079 \begin_inset space \thinspace{}
12083 \begin_inset Flex Code
12086 \begin_layout Plain Layout
12092 ] Usually \SpecialChar LyX
12093 does not allow you to insert more than one space between words,
12094 since a space is considered as the separation between two words, not a
12095 character or symbol of its own.
12096 This is a very fine thing but sometimes annoying, for example, when typing
12097 program code or plain \SpecialChar LaTeX
12100 \begin_inset Flex Code
12103 \begin_layout Plain Layout
12110 Note that \SpecialChar LyX
12111 will create protected blanks for the additional blanks when
12112 in another mode than \SpecialChar LaTeX
12116 \begin_layout Description
12117 \begin_inset Flex Code
12120 \begin_layout Plain Layout
12126 These tags are used with XHTML output.
12128 \begin_inset CommandInset ref
12130 reference "subsec:Paragraph-Style-XHTML"
12137 \begin_layout Description
12138 \begin_inset Flex Code
12141 \begin_layout Plain Layout
12147 [FIXME] (Used only with XML-type formats.)
12150 \begin_layout Description
12151 \begin_inset Flex Code
12154 \begin_layout Plain Layout
12161 \begin_inset Flex Code
12164 \begin_layout Plain Layout
12173 \begin_inset space \thinspace{}
12177 \begin_inset Flex Code
12180 \begin_layout Plain Layout
12187 \begin_inset Flex Code
12190 \begin_layout Plain Layout
12196 , marks the style as to be included in the document preamble and not in
12198 This is useful for document classes that want such information as the title
12199 and author to appear in the preamble.
12200 Note that this works only for styles for which the
12201 \begin_inset Flex Code
12204 \begin_layout Plain Layout
12211 \begin_inset Flex Code
12214 \begin_layout Plain Layout
12221 \begin_inset Flex Code
12224 \begin_layout Plain Layout
12233 \begin_layout Description
12234 \begin_inset Flex Code
12237 \begin_layout Plain Layout
12244 \begin_inset Flex Code
12247 \begin_layout Plain Layout
12256 \begin_inset space \thinspace{}
12260 \begin_inset Flex Code
12263 \begin_layout Plain Layout
12270 \begin_inset Flex Code
12273 \begin_layout Plain Layout
12279 , marks the style as being part of a title block (see also the
12280 \begin_inset Flex Code
12283 \begin_layout Plain Layout
12290 \begin_inset Flex Code
12293 \begin_layout Plain Layout
12302 \begin_layout Description
12303 \begin_inset Flex Code
12306 \begin_layout Plain Layout
12313 \begin_inset Flex Code
12316 \begin_layout Plain Layout
12322 ] The \SpecialChar LaTeX
12323 command sequence declaring an item in a list.
12324 The command is to be defined without the preceding backslash (the default
12326 \begin_inset Quotes eld
12330 \begin_inset Quotes erd
12334 \begin_inset Flex Code
12337 \begin_layout Plain Layout
12345 in the \SpecialChar LaTeX
12349 \begin_layout Description
12350 \begin_inset Flex Code
12353 \begin_layout Plain Layout
12360 \begin_inset Flex Code
12363 \begin_layout Plain Layout
12369 ] This provides extra space between paragraphs that have the same style.
12370 If you put other styles into an environment, each is separated with the
12372 \begin_inset Flex Code
12375 \begin_layout Plain Layout
12382 But the whole items of the environment are additionally separated with
12384 \begin_inset Flex Code
12387 \begin_layout Plain Layout
12394 Note that this is a
12399 \begin_layout Description
12400 \begin_inset Flex Code
12403 \begin_layout Plain Layout
12409 [FIXME] (Used only with XML-type formats.)
12412 \begin_layout Description
12413 \begin_inset Flex Code
12416 \begin_layout Plain Layout
12423 \begin_inset Flex Code
12426 \begin_layout Plain Layout
12435 \begin_inset space \thinspace{}
12439 \begin_inset Flex Code
12442 \begin_layout Plain Layout
12448 ] Usually \SpecialChar LyX
12449 does not allow you to leave a paragraph empty, since it would
12450 lead to empty \SpecialChar LaTeX
12452 There are some cases where this could be desirable however: in a letter
12453 template, the required fields can be provided as empty fields, so that
12454 people do not forget them; in some special classes, a style can be used
12455 as some kind of break, which does not contain actual text.
12458 \begin_layout Description
12459 \begin_inset Flex Code
12462 \begin_layout Plain Layout
12469 \begin_inset Flex Code
12472 \begin_layout Plain Layout
12478 ] The vertical space between the label and the text body.
12479 Only used for labels that are above the text body (
12480 \begin_inset Flex Code
12483 \begin_layout Plain Layout
12490 \begin_inset Newline newline
12494 \begin_inset Flex Code
12497 \begin_layout Plain Layout
12498 Centered_Top_Environment
12506 \begin_layout Description
12507 \begin_inset Flex Code
12510 \begin_layout Plain Layout
12517 \begin_inset Flex Code
12520 \begin_layout Plain Layout
12526 ] The name of the counter for automatic numbering.
12527 In order to have the counter appear with your label, you will need to reference
12529 \begin_inset Flex Code
12532 \begin_layout Plain Layout
12541 This will work with
12542 \begin_inset Flex Code
12545 \begin_layout Plain Layout
12552 \begin_inset Flex Code
12555 \begin_layout Plain Layout
12562 \begin_inset Flex Code
12565 \begin_layout Plain Layout
12572 \begin_inset Flex Code
12575 \begin_layout Plain Layout
12582 \begin_inset Newline newline
12590 \begin_inset Flex Code
12593 \begin_layout Plain Layout
12600 \begin_inset Flex Code
12603 \begin_layout Plain Layout
12609 , though this case is a bit complicated.
12610 Suppose you declare
12611 \begin_inset Quotes eld
12615 \begin_inset Flex Code
12618 \begin_layout Plain Layout
12619 LabelCounter myenum
12625 \begin_inset Quotes erd
12629 Then the actual counters used are
12630 \begin_inset Flex Code
12633 \begin_layout Plain Layout
12640 \begin_inset Flex Code
12643 \begin_layout Plain Layout
12650 \begin_inset Flex Code
12653 \begin_layout Plain Layout
12660 \begin_inset Flex Code
12663 \begin_layout Plain Layout
12669 , much as in \SpecialChar LaTeX
12671 These counters must all be declared separately.
12672 \begin_inset Newline newline
12676 \begin_inset CommandInset ref
12678 reference "subsec:Counters"
12682 for details on counters.
12685 \begin_layout Description
12686 \begin_inset Flex Code
12689 \begin_layout Plain Layout
12695 The font used for the label.
12697 \begin_inset CommandInset ref
12699 reference "subsec:Font-description"
12706 \begin_layout Description
12707 \begin_inset Flex Code
12710 \begin_layout Plain Layout
12717 \begin_inset Flex Code
12720 \begin_layout Plain Layout
12726 ] Text that indicates how far a label should be indented.
12729 \begin_layout Description
12730 \begin_inset Flex Code
12733 \begin_layout Plain Layout
12740 \begin_inset Flex Code
12743 \begin_layout Plain Layout
12749 ] Text that indicates the amount of horizontal space between the label and
12751 Only used for labels that are not above the text body.
12754 \begin_layout Description
12755 \begin_inset Flex Code
12758 \begin_layout Plain Layout
12765 \begin_inset Flex Code
12768 \begin_layout Plain Layout
12774 ] The string used for the label.
12776 \begin_inset Flex Code
12779 \begin_layout Plain Layout
12785 is set, this string can be contain the special formatting commands described
12787 \begin_inset CommandInset ref
12789 reference "subsec:Counters"
12796 \begin_layout Description
12797 \begin_inset Flex Code
12800 \begin_layout Plain Layout
12801 LabelStringAppendix
12807 \begin_inset Flex Code
12810 \begin_layout Plain Layout
12816 ] This is used inside the appendix instead of
12817 \begin_inset Newline newline
12821 \begin_inset Flex Code
12824 \begin_layout Plain Layout
12832 \begin_inset Flex Code
12835 \begin_layout Plain Layout
12842 \begin_inset Newline newline
12846 \begin_inset Flex Code
12849 \begin_layout Plain Layout
12850 LabelStringAppendix
12858 \begin_layout Description
12859 \begin_inset Flex Code
12862 \begin_layout Plain Layout
12868 [FIXME] (Used only with XML-type formats.)
12871 \begin_layout Description
12872 \begin_inset Flex Code
12875 \begin_layout Plain Layout
12882 \begin_inset Flex Code
12885 \begin_layout Plain Layout
12890 , Manual, Static, Above,
12891 \begin_inset Newline newline
12894 Centered, Sensitive, Enumerate,
12895 \begin_inset Newline newline
12898 Itemize, Bibliography
12904 \begin_inset Separator parbreak
12911 \begin_layout Description
12912 \begin_inset Flex Code
12915 \begin_layout Plain Layout
12921 means the label is the very first word (up to the first real blank).
12922 Use protected spaces if you want more than one word as the label.
12926 \begin_layout Description
12927 \begin_inset Flex Code
12930 \begin_layout Plain Layout
12936 means the label is simply what is declared as
12937 \begin_inset Flex Code
12940 \begin_layout Plain Layout
12947 This will be displayed
12948 \begin_inset Quotes eld
12952 \begin_inset Quotes erd
12955 , at the beginning of the paragraph.
12957 \begin_inset Flex Code
12960 \begin_layout Plain Layout
12967 \begin_inset Flex Code
12970 \begin_layout Plain Layout
12976 , then it will be displayed only in the first paragraph of any sequence
12977 of paragraphs with the same
12978 \begin_inset Flex Code
12981 \begin_layout Plain Layout
12990 \begin_layout Description
12991 \begin_inset Flex Code
12994 \begin_layout Plain Layout
13001 \begin_inset space ~
13005 \begin_inset space ~
13009 \begin_inset Flex Code
13012 \begin_layout Plain Layout
13018 are special cases of
13019 \begin_inset Flex Code
13022 \begin_layout Plain Layout
13029 The label will be printed above the paragraph either at the beginning of
13030 the line or centered.
13033 \begin_layout Description
13034 \begin_inset Flex Code
13037 \begin_layout Plain Layout
13043 is a special case for the caption-labels
13044 \begin_inset Quotes eld
13048 \begin_inset Quotes erd
13052 \begin_inset Quotes eld
13056 \begin_inset Quotes erd
13060 \begin_inset Newline newline
13064 \begin_inset Flex Code
13067 \begin_layout Plain Layout
13073 means the (hardcoded) label string depends on the kind of float: It is
13074 hardcoded to be `FloatType N', where N is the value of the counter associated
13076 For the case that a caption is inserted outside of a float the
13077 \begin_inset Flex Code
13080 \begin_layout Plain Layout
13087 \begin_inset Quotes eld
13091 \begin_inset Quotes erd
13097 \begin_layout Description
13098 \begin_inset Flex Code
13101 \begin_layout Plain Layout
13107 produces the usual sort of enumeration labels.
13108 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13109 small Roman numerals, and uppercase letters for the four possible depths.
13112 \begin_layout Description
13113 \begin_inset Flex Code
13116 \begin_layout Plain Layout
13122 produces various bullets at the different levels.
13123 It is also hardcoded.
13126 \begin_layout Description
13127 \begin_inset Flex Code
13130 \begin_layout Plain Layout
13136 should be used only with
13137 \begin_inset Flex Code
13140 \begin_layout Plain Layout
13141 LatexType BibEnvironment
13150 \begin_layout Description
13151 \begin_inset Flex Code
13154 \begin_layout Plain Layout
13160 Note that this will completely override any prior
13161 \begin_inset Flex Code
13164 \begin_layout Plain Layout
13170 declaration for this style.
13172 \begin_inset Quotes eld
13176 \begin_inset Flex Code
13179 \begin_layout Plain Layout
13186 \begin_inset Quotes erd
13191 \begin_inset CommandInset ref
13193 reference "subsec:I18n"
13197 for details on its use.
13200 \begin_layout Description
13201 \begin_inset Flex Code
13204 \begin_layout Plain Layout
13211 \begin_inset Flex Code
13214 \begin_layout Plain Layout
13220 ] The name of the corresponding \SpecialChar LaTeX
13222 Either the environment or command name.
13225 \begin_layout Description
13226 \begin_inset Flex Code
13229 \begin_layout Plain Layout
13236 \begin_inset Flex Code
13239 \begin_layout Plain Layout
13245 ] An optional parameter for the corresponding
13246 \begin_inset Flex Code
13249 \begin_layout Plain Layout
13256 This parameter cannot be changed from within \SpecialChar LyX
13258 \begin_inset Flex Code
13261 \begin_layout Plain Layout
13267 for customizable parameters).
13268 This will be output as is after all \SpecialChar LaTeX
13270 \begin_inset Flex Code
13273 \begin_layout Plain Layout
13282 \begin_layout Description
13283 \begin_inset Flex Code
13286 \begin_layout Plain Layout
13293 \begin_inset Flex Code
13296 \begin_layout Plain Layout
13301 , Command, Environment, Item_Environment,
13302 \begin_inset Newline newline
13305 List_Environment, Bib_Environment
13310 ] How the style should be translated into \SpecialChar LaTeX
13315 \begin_layout Plain Layout
13316 \begin_inset Flex Code
13319 \begin_layout Plain Layout
13325 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13326 Visit the SGML class files for specific examples.
13332 \begin_inset Separator parbreak
13339 \begin_layout Description
13340 \begin_inset Flex Code
13343 \begin_layout Plain Layout
13349 means nothing special.
13352 \begin_layout Description
13353 \begin_inset Flex Code
13356 \begin_layout Plain Layout
13363 \begin_inset Flex Code
13366 \begin_layout Plain Layout
13373 {\SpecialChar ldots
13382 \begin_layout Description
13383 \begin_inset Flex Code
13386 \begin_layout Plain Layout
13393 \begin_inset Flex Code
13396 \begin_layout Plain Layout
13403 }\SpecialChar ldots
13419 \begin_layout Description
13420 \begin_inset Flex Code
13423 \begin_layout Plain Layout
13430 \begin_inset Flex Code
13433 \begin_layout Plain Layout
13440 \begin_inset Flex Code
13443 \begin_layout Plain Layout
13451 is generated for each paragraph of this environment.
13455 \begin_layout Description
13456 \begin_inset Flex Code
13459 \begin_layout Plain Layout
13466 \begin_inset Flex Code
13469 \begin_layout Plain Layout
13476 \begin_inset Newline newline
13480 \begin_inset Flex Code
13483 \begin_layout Plain Layout
13489 is passed as an argument to the environment.
13490 \begin_inset Newline newline
13494 \begin_inset Flex Code
13497 \begin_layout Plain Layout
13503 can be defined in the
13504 \begin_inset Flex Noun
13507 \begin_layout Plain Layout
13508 Edit\SpecialChar menuseparator
13510 \begin_inset space ~
13521 \begin_layout Description
13522 \begin_inset Flex Code
13525 \begin_layout Plain Layout
13532 \begin_inset Flex Code
13535 \begin_layout Plain Layout
13541 but adds additionally the necessary mandatory argument (the longest label)
13542 to the begin statement of the bibliography environment:
13543 \begin_inset Newline newline
13547 \begin_inset Flex Code
13550 \begin_layout Plain Layout
13553 begin{thebibliography}{99}
13558 It is therefore only useful for bibliography environments.
13559 The default longest label
13560 \begin_inset Quotes eld
13564 \begin_inset Quotes erd
13567 can be changed by the user in the paragraph settings of a bibliography
13571 \begin_layout Standard
13572 Putting the last few things together, the \SpecialChar LaTeX
13573 output will be either:
13576 \begin_layout LyX-Code
13579 LatexName[LatexParam]{\SpecialChar ldots
13583 \begin_layout Standard
13587 \begin_layout LyX-Code
13590 begin{LatexName}[LatexParam] \SpecialChar ldots
13596 \begin_layout Standard
13597 depending upon the \SpecialChar LaTeX
13602 \begin_layout Description
13603 \begin_inset Flex Code
13606 \begin_layout Plain Layout
13613 \begin_inset Flex Code
13616 \begin_layout Plain Layout
13622 ] A string that is put at the beginning of the style content.
13623 A line break in the output can be indicated by
13624 \begin_inset Flex Code
13627 \begin_layout Plain Layout
13636 \begin_layout Description
13637 \begin_inset Flex Code
13640 \begin_layout Plain Layout
13647 \begin_inset Flex Code
13650 \begin_layout Plain Layout
13656 ] If you put styles into environments, the different
13657 \begin_inset Flex Code
13660 \begin_layout Plain Layout
13666 are not simply added, but added with a factor
13667 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13671 Note that this parameter is also used when
13672 \begin_inset Flex Code
13675 \begin_layout Plain Layout
13682 \begin_inset Flex Code
13685 \begin_layout Plain Layout
13692 \begin_inset Flex Code
13695 \begin_layout Plain Layout
13702 Then it is added to the manual or dynamic margin.
13703 \begin_inset Newline newline
13707 \begin_inset Quotes eld
13711 \begin_inset Flex Code
13714 \begin_layout Plain Layout
13721 \begin_inset Quotes erd
13724 means that the paragraph is indented with the width of
13725 \begin_inset Quotes eld
13729 \begin_inset Flex Code
13732 \begin_layout Plain Layout
13739 \begin_inset Quotes erd
13742 in the normal font.
13743 You can get a negative width by prefixing the string with
13744 \begin_inset Quotes eld
13748 \begin_inset Flex Code
13751 \begin_layout Plain Layout
13758 \begin_inset Quotes erd
13762 This way was chosen so that the look is the same with each used screen
13766 \begin_layout Description
13767 \begin_inset Flex Code
13770 \begin_layout Plain Layout
13777 \begin_inset Flex Code
13780 \begin_layout Plain Layout
13785 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13791 \begin_inset Newline newline
13794 The kind of margin that the style has on the left side.
13795 \begin_inset Separator parbreak
13802 \begin_layout Description
13803 \begin_inset Flex Code
13806 \begin_layout Plain Layout
13812 just means a fixed margin.
13815 \begin_layout Description
13816 \begin_inset Flex Code
13819 \begin_layout Plain Layout
13825 means that the left margin depends on the string entered in the
13826 \begin_inset Flex Noun
13829 \begin_layout Plain Layout
13830 Edit\SpecialChar menuseparator
13832 \begin_inset space ~
13841 This is used to typeset nice lists without tabulators.
13844 \begin_layout Description
13845 \begin_inset Flex Code
13848 \begin_layout Plain Layout
13854 means that the margin depends on the size of the label.
13855 This is used for automatic enumerated headlines.
13856 It is obvious that the headline
13857 \begin_inset Quotes eld
13860 5.4.3.2.1 Very long headline
13861 \begin_inset Quotes erd
13864 must have a wider left margin (as wide as
13865 \begin_inset Quotes eld
13869 \begin_inset Quotes erd
13872 plus the space) than
13873 \begin_inset Quotes eld
13876 3.2 Very long headline
13877 \begin_inset Quotes erd
13881 \begin_inset Quotes eld
13885 \begin_inset Quotes erd
13888 are not able to do this.
13891 \begin_layout Description
13892 \begin_inset Flex Code
13895 \begin_layout Plain Layout
13901 is similar, but only the very first row of the paragraph is dynamic, while
13902 the others are static; this is used, for example, for descriptions.
13905 \begin_layout Description
13906 \begin_inset Flex Code
13909 \begin_layout Plain Layout
13915 means the margin is chosen in a way that the longest row of this paragraph
13916 fits to the right margin.
13917 This is used to typeset an address on the right edge of the page.
13921 \begin_layout Description
13922 \begin_inset Flex Code
13925 \begin_layout Plain Layout
13932 \begin_inset Flex Code
13935 \begin_layout Plain Layout
13944 \begin_inset space \thinspace{}
13948 \begin_inset Flex Code
13951 \begin_layout Plain Layout
13957 ] Whether fragile commands in this style should be
13958 \begin_inset Flex Code
13961 \begin_layout Plain Layout
13974 whether this command should itself be protected.)
13977 \begin_layout Description
13978 \begin_inset Flex Code
13981 \begin_layout Plain Layout
13988 \begin_inset Flex Code
13991 \begin_layout Plain Layout
13998 \begin_inset space \thinspace{}
14002 \begin_inset Flex Code
14005 \begin_layout Plain Layout
14013 ] Whether newlines are translated into \SpecialChar LaTeX
14015 \begin_inset Flex Code
14018 \begin_layout Plain Layout
14029 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
14031 inside \SpecialChar LyX
14035 \begin_layout Description
14036 \begin_inset Flex Code
14039 \begin_layout Plain Layout
14046 \begin_inset Flex Code
14049 \begin_layout Plain Layout
14058 \begin_inset space \thinspace{}
14062 \begin_inset Flex Code
14065 \begin_layout Plain Layout
14071 ] If set to true, and if
14072 \begin_inset Flex Code
14075 \begin_layout Plain Layout
14082 \begin_inset Flex Code
14085 \begin_layout Plain Layout
14091 ) paragraphs are being indented, then the indentation of such a paragraph
14092 following one of this type will be suppressed.
14093 (So this will not affect the display of non-default paragraphs.)
14096 \begin_layout Description
14097 \begin_inset Flex Code
14100 \begin_layout Plain Layout
14107 \begin_inset Flex Code
14110 \begin_layout Plain Layout
14116 ] Name of a style that has replaced this style.
14117 This is used to rename a style, while keeping backward compatibility.
14120 \begin_layout Description
14121 \begin_inset Flex Code
14124 \begin_layout Plain Layout
14131 \begin_inset Flex Code
14134 \begin_layout Plain Layout
14141 \begin_inset space \thinspace{}
14145 \begin_inset Flex Code
14148 \begin_layout Plain Layout
14154 ] Determines whether consecutive pragraphs of the same type are treated
14155 as belonging together.
14156 This has the effect that the
14157 \begin_inset Flex Code
14160 \begin_layout Plain Layout
14166 is only printed once before such a group.
14167 By default, this is true for
14168 \begin_inset Flex Code
14171 \begin_layout Plain Layout
14178 \begin_inset Flex Code
14181 \begin_layout Plain Layout
14188 \begin_inset Flex Code
14191 \begin_layout Plain Layout
14197 and false for all other types.
14200 \begin_layout Description
14201 \begin_inset Flex Code
14204 \begin_layout Plain Layout
14211 \begin_inset Flex Code
14214 \begin_layout Plain Layout
14223 \begin_inset space \thinspace{}
14227 \begin_inset Flex Code
14230 \begin_layout Plain Layout
14236 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14238 but only by a line break; together with
14239 \begin_inset Flex Code
14242 \begin_layout Plain Layout
14248 , this allows to emulate a plain text editor (like the ERT inset).
14251 \begin_layout Description
14252 \begin_inset Flex Code
14255 \begin_layout Plain Layout
14262 \begin_inset Flex Code
14265 \begin_layout Plain Layout
14271 ] The indent of the very first line of a paragraph.
14273 \begin_inset Newline newline
14277 \begin_inset Flex Code
14280 \begin_layout Plain Layout
14286 will be fixed for a certain style.
14287 The exception is the default style, since the indentation for these paragraphs
14288 can be prohibited with
14289 \begin_inset Flex Code
14292 \begin_layout Plain Layout
14300 \begin_inset Flex Code
14303 \begin_layout Plain Layout
14309 style paragraphs inside environments use the
14310 \begin_inset Flex Code
14313 \begin_layout Plain Layout
14319 of the environment, not their native one.
14321 \begin_inset Flex Code
14324 \begin_layout Plain Layout
14330 paragraphs inside an enumeration are not indented.
14333 \begin_layout Description
14334 \begin_inset Flex Code
14337 \begin_layout Plain Layout
14344 \begin_inset Flex Code
14347 \begin_layout Plain Layout
14353 ] The vertical space between two paragraphs of this style.
14356 \begin_layout Description
14357 \begin_inset Flex Code
14360 \begin_layout Plain Layout
14367 \begin_inset Flex Code
14370 \begin_layout Plain Layout
14377 allows the user to choose either
14378 \begin_inset Quotes eld
14382 \begin_inset Quotes erd
14386 \begin_inset Quotes eld
14390 \begin_inset Quotes erd
14393 to separate paragraphs.
14395 \begin_inset Quotes eld
14399 \begin_inset Quotes erd
14403 \begin_inset Flex Code
14406 \begin_layout Plain Layout
14414 \begin_inset Quotes eld
14418 \begin_inset Quotes erd
14422 \begin_inset Flex Code
14425 \begin_layout Plain Layout
14431 is ignored and all paragraphs are separated by the
14432 \begin_inset Flex Code
14435 \begin_layout Plain Layout
14442 The vertical space is calculated with
14443 \begin_inset Flex Code
14446 \begin_layout Plain Layout
14448 \begin_inset space ~
14457 \begin_inset Flex Code
14460 \begin_layout Plain Layout
14466 is the height of a row with the normal font.
14467 This way, the look stays the same with different screen fonts.
14470 \begin_layout Description
14471 \begin_inset Flex Code
14474 \begin_layout Plain Layout
14481 \begin_inset Flex Code
14484 \begin_layout Plain Layout
14493 \begin_inset space \thinspace{}
14497 \begin_inset Flex Code
14500 \begin_layout Plain Layout
14506 ] Whether the contents of this paragraph should be output in raw form, meaning
14507 without special translations that \SpecialChar LaTeX
14511 \begin_layout Description
14512 \begin_inset Flex Code
14515 \begin_layout Plain Layout
14522 \begin_inset Flex Code
14525 \begin_layout Plain Layout
14535 Defines individual characters that should be output in raw form, meaning
14536 without special translations that \SpecialChar LaTeX
14540 \begin_layout Description
14541 \begin_inset Flex Code
14544 \begin_layout Plain Layout
14550 Information to be included in the \SpecialChar LaTeX
14551 preamble when this style is used.
14552 Used to define macros, load packages, etc., required by this particular
14555 \begin_inset Quotes eld
14559 \begin_inset Flex Code
14562 \begin_layout Plain Layout
14569 \begin_inset Quotes erd
14575 \begin_layout Description
14576 \begin_inset Flex Code
14579 \begin_layout Plain Layout
14586 \begin_inset Flex Code
14589 \begin_layout Plain Layout
14595 ] The prefix to use when creating labels referring to paragraphs of this
14597 This allows the use of formatted references.
14600 \begin_layout Description
14601 \begin_inset Flex Code
14604 \begin_layout Plain Layout
14611 \begin_inset Flex Code
14614 \begin_layout Plain Layout
14620 ] Whether the style requires the feature
14621 \begin_inset Flex Code
14624 \begin_layout Plain Layout
14631 \begin_inset CommandInset ref
14633 reference "chap:List-of-functions"
14637 for the list of features).
14638 If you require a package with specific options, you can additionally use
14640 \begin_inset Flex Code
14643 \begin_layout Plain Layout
14649 as a general text class parameter (see
14650 \begin_inset CommandInset ref
14652 reference "subsec:General-text-class"
14659 \begin_layout Description
14660 \begin_inset Flex Code
14663 \begin_layout Plain Layout
14670 \begin_inset Flex Code
14673 \begin_layout Plain Layout
14682 \begin_inset Flex Code
14685 \begin_layout Plain Layout
14691 ] Resets the \SpecialChar LaTeX
14692 arguments of this style (as defined via the
14693 \begin_inset Flex Code
14696 \begin_layout Plain Layout
14703 This is useful if you have copied a style via
14704 \begin_inset Flex Code
14707 \begin_layout Plain Layout
14713 , but you do not want to inherit its (required and optional) arguments.
14716 \begin_layout Description
14717 \begin_inset Flex Code
14720 \begin_layout Plain Layout
14727 \begin_inset Flex Code
14730 \begin_layout Plain Layout
14736 ] A string that is put at the end of the layout content.
14737 A line break in the output can be indicated by
14738 \begin_inset Flex Code
14741 \begin_layout Plain Layout
14750 \begin_layout Description
14751 \begin_inset Flex Code
14754 \begin_layout Plain Layout
14761 \begin_inset Flex Code
14764 \begin_layout Plain Layout
14771 \begin_inset Flex Code
14774 \begin_layout Plain Layout
14783 \begin_layout Description
14784 \begin_inset Flex Code
14787 \begin_layout Plain Layout
14794 \begin_inset Flex Code
14797 \begin_layout Plain Layout
14806 \begin_inset Flex Code
14809 \begin_layout Plain Layout
14816 \begin_inset Flex Code
14819 \begin_layout Plain Layout
14826 \begin_inset Flex Code
14829 \begin_layout Plain Layout
14831 \begin_inset space ~
14839 ] This defines what the default spacing should be in the style.
14841 \begin_inset Flex Code
14844 \begin_layout Plain Layout
14851 \begin_inset Flex Code
14854 \begin_layout Plain Layout
14861 \begin_inset Flex Code
14864 \begin_layout Plain Layout
14870 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14871 If you specify the argument
14872 \begin_inset Flex Code
14875 \begin_layout Plain Layout
14881 , then you must also provide a value argument which will be the actual multiplie
14883 Note that, contrary to other parameters,
14884 \begin_inset Flex Code
14887 \begin_layout Plain Layout
14893 implies the generation of specific \SpecialChar LaTeX
14894 code, using the \SpecialChar LaTeX
14898 \begin_inset Flex Code
14901 \begin_layout Plain Layout
14910 \begin_layout Description
14911 \begin_inset Flex Code
14914 \begin_layout Plain Layout
14921 \begin_inset Flex Code
14924 \begin_layout Plain Layout
14931 \begin_inset space \thinspace{}
14935 \begin_inset Flex Code
14938 \begin_layout Plain Layout
14946 ] Allow spell-checking paragraphs of this style.
14950 \begin_layout Description
14951 \begin_inset Flex Code
14954 \begin_layout Plain Layout
14960 The font used for the text body .
14962 \begin_inset CommandInset ref
14964 reference "subsec:Font-description"
14971 \begin_layout Description
14972 \begin_inset Flex Code
14975 \begin_layout Plain Layout
14984 \begin_inset Flex Code
14987 \begin_layout Plain Layout
14997 The level of the style in the table of contents.
14998 This is used for automatic numbering of section headings.
15001 \begin_layout Description
15002 \begin_inset Flex Code
15005 \begin_layout Plain Layout
15014 \begin_inset Flex Code
15017 \begin_layout Plain Layout
15028 \begin_inset Flex Code
15031 \begin_layout Plain Layout
15038 \begin_inset Flex Code
15041 \begin_layout Plain Layout
15047 ] This tag determines whether the first line indentation of this paragraph
15048 can be toggled via the Paragraph settings dialog.
15052 \begin_inset Flex Code
15055 \begin_layout Plain Layout
15065 is set, indentation can be toggled if the document settings use
15066 \begin_inset Quotes eld
15070 \begin_inset Quotes erd
15073 paragraph style, with
15074 \begin_inset Flex Code
15077 \begin_layout Plain Layout
15083 , indentation can always be toggled, notwithstanding the document settings,
15085 \begin_inset Flex Code
15088 \begin_layout Plain Layout
15094 , indentation can never be toggled.
15097 \begin_layout Description
15098 \begin_inset Flex Code
15101 \begin_layout Plain Layout
15108 \begin_inset Flex Code
15111 \begin_layout Plain Layout
15117 ] The vertical space with which the very first of a chain of paragraphs
15118 with this style is separated from the previous paragraph.
15119 If the previous paragraph has another style, the separations are not simply
15120 added, but the maximum is taken.
15123 \begin_layout Subsection
15124 \begin_inset CommandInset label
15130 Internationalization of Paragraph Styles
15133 \begin_layout Standard
15135 has long supported internationalization of layout information, but, until
15136 version 2.0, this applied only to the user interface and not to, say, PDF
15138 Thus, French authors were forced to resort to ugly hacks if they wanted
15143 1' instead of `Theorem 1'.
15144 Thanks to Georg Baum, that is no longer the case.
15147 \begin_layout Standard
15149 \begin_inset Flex Code
15152 \begin_layout Plain Layout
15158 defines text that is to appear in the typeset document, it may use
15159 \begin_inset Flex Code
15162 \begin_layout Plain Layout
15169 \begin_inset Flex Code
15172 \begin_layout Plain Layout
15178 to support non-English and even multi-language documents correctly.
15179 The following excerpt (from the
15180 \begin_inset Flex Code
15183 \begin_layout Plain Layout
15189 file) shows how this works:
15192 \begin_layout LyX-Code
15194 \begin_inset Separator parbreak
15201 \begin_layout LyX-Code
15204 theoremstyle{remark}
15207 \begin_layout LyX-Code
15210 newtheorem{claim}[thm]{
15217 \begin_layout LyX-Code
15221 \begin_layout LyX-Code
15225 \begin_layout LyX-Code
15230 claimname}{_(Claim)}
15233 \begin_layout LyX-Code
15237 \begin_layout LyX-Code
15241 \begin_layout LyX-Code
15250 claimname}{_(Claim)}}
15253 \begin_layout LyX-Code
15258 \begin_layout Standard
15259 In principle, any legal \SpecialChar LaTeX
15261 \begin_inset Flex Code
15264 \begin_layout Plain Layout
15271 \begin_inset Flex Code
15274 \begin_layout Plain Layout
15280 tags, but in practice they will typically look as they do here.
15281 The key to correct translation of the typeset text is the definition of
15282 the \SpecialChar LaTeX
15284 \begin_inset Flex Code
15287 \begin_layout Plain Layout
15296 \begin_inset Flex Code
15299 \begin_layout Plain Layout
15311 \begin_layout Standard
15313 \begin_inset Flex Code
15316 \begin_layout Plain Layout
15322 tag provides for internationalization based upon the overall language of
15324 The contents of the tag will be included in the preamble, just as with
15326 \begin_inset Flex Code
15329 \begin_layout Plain Layout
15336 What makes it special is the use of the
15337 \begin_inset Quotes eld
15341 \begin_inset Quotes erd
15345 \begin_inset Flex Code
15348 \begin_layout Plain Layout
15354 , which will be replaced, when \SpecialChar LyX
15355 produces \SpecialChar LaTeX
15356 output, with the translation of
15357 its argument into the document language.
15360 \begin_layout Standard
15362 \begin_inset Flex Code
15365 \begin_layout Plain Layout
15371 tag is more complex, since it is meant to provide support for multi-language
15372 documents and so offers an interface to the
15373 \begin_inset Flex Code
15376 \begin_layout Plain Layout
15383 Its contents will be added to the preamble once for each language that
15384 appears in the document.
15385 In this case, the argument to
15386 \begin_inset Flex Code
15389 \begin_layout Plain Layout
15395 will be replaced with its translation into the language in question; the
15397 \begin_inset Flex Code
15400 \begin_layout Plain Layout
15406 is replaced by the language name (as used by the babel package).
15409 \begin_layout Standard
15410 A German document that also included a French section would thus have the
15411 following in the preamble:
15414 \begin_layout LyX-Code
15423 claimname}{Affirmation}}
15424 \begin_inset Newline newline
15435 claimname}{Behauptung}}
15436 \begin_inset Newline newline
15443 claimname}{Behauptung}
15446 \begin_layout Standard
15449 \begin_inset Flex Code
15452 \begin_layout Plain Layout
15458 will then conspire to produce the correct text in the output.
15461 \begin_layout Standard
15462 One important point to note here is that the translations are provided by
15464 itself, through the file
15465 \begin_inset Flex Code
15468 \begin_layout Plain Layout
15475 This means, in effect, that
15476 \begin_inset Flex Code
15479 \begin_layout Plain Layout
15486 \begin_inset Flex Code
15489 \begin_layout Plain Layout
15495 are really only of use in layout files that are provided with \SpecialChar LyX
15497 entered in user-created layout files will not be seen by \SpecialChar LyX
15498 's internationalizatio
15499 n routines unless the
15500 \begin_inset Flex Code
15503 \begin_layout Plain Layout
15509 file is modified accordingly.
15510 That said, however, any layout created with the intention that it will
15511 be included with \SpecialChar LyX
15512 should use these tags where appropriate.
15513 Please note that the paragraph style translations provided by \SpecialChar LyX
15515 change with a minor update (e.
15516 \begin_inset space \thinspace{}
15520 \begin_inset space \space{}
15523 from version 2.1.x to 2.1.y).
15524 It is however quite likely that a major update (e.
15525 \begin_inset space \thinspace{}
15529 \begin_inset space \space{}
15532 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15535 \begin_layout Subsection
15537 \begin_inset CommandInset label
15539 name "subsec:Floats"
15546 \begin_layout Standard
15547 It is necessary to define the floats (
15548 \begin_inset Flex Noun
15551 \begin_layout Plain Layout
15558 \begin_inset Flex Noun
15561 \begin_layout Plain Layout
15567 , \SpecialChar ldots
15568 ) in the text class itself.
15569 Standard floats are included in the file
15570 \begin_inset Flex Code
15573 \begin_layout Plain Layout
15579 , so you may have to do no more than add
15582 \begin_layout LyX-Code
15583 Input stdfloats.inc
15586 \begin_layout Standard
15587 to your layout file.
15588 If you want to implement a text class that proposes some other float types
15589 (like the AGU class bundled with \SpecialChar LyX
15590 ), the information below will hopefully
15594 \begin_layout Description
15595 \begin_inset Flex Code
15598 \begin_layout Plain Layout
15605 \begin_inset Flex Code
15608 \begin_layout Plain Layout
15614 =!htbpH] Allowed placement options for this float type.
15615 The value is a string of placement characters.
15616 Possible characters include:
15621 \begin_inset Quotes eld
15625 \begin_inset Quotes erd
15633 \begin_inset Quotes eld
15637 \begin_inset Quotes erd
15645 \begin_inset Quotes eld
15649 \begin_inset Quotes erd
15657 \begin_inset Quotes eld
15661 \begin_inset Quotes erd
15669 \begin_inset Quotes eld
15673 \begin_inset Quotes erd
15681 \begin_inset Quotes eld
15685 \begin_inset Quotes erd
15689 The order of the characters in the string does not matter.
15690 If no placement options are allowed, use the string
15697 \begin_layout Description
15698 \begin_inset Flex Code
15701 \begin_layout Plain Layout
15708 \begin_inset Flex Code
15711 \begin_layout Plain Layout
15720 \begin_inset space \thinspace{}
15726 \begin_inset Flex Code
15729 \begin_layout Plain Layout
15739 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15746 \begin_inset Flex Code
15749 \begin_layout Plain Layout
15755 if the float does not support this feature.
15758 \begin_layout Description
15759 \begin_inset Flex Code
15762 \begin_layout Plain Layout
15769 \begin_inset Flex Code
15772 \begin_layout Plain Layout
15781 \begin_inset space \thinspace{}
15787 \begin_inset Flex Code
15790 \begin_layout Plain Layout
15800 ] Defines whether the float has a starred variant that spans columns in
15801 a two column paragraph.
15803 \begin_inset Flex Code
15806 \begin_layout Plain Layout
15812 if the float does not support this feature.
15815 \begin_layout Description
15816 \begin_inset Flex Code
15819 \begin_layout Plain Layout
15826 \begin_inset Flex Code
15829 \begin_layout Plain Layout
15836 \begin_inset Quotes erd
15840 \begin_inset Quotes erd
15843 ] The file name extension of an auxiliary file for the list of figures (or
15846 writes the captions to this file.
15849 \begin_layout Description
15850 \begin_inset Flex Code
15853 \begin_layout Plain Layout
15860 \begin_inset Flex Code
15863 \begin_layout Plain Layout
15870 \begin_inset Quotes erd
15874 \begin_inset Quotes erd
15877 ] The string that will be used in the menus and also for the caption.
15878 This is translated to the current language if babel is used.
15881 \begin_layout Description
15882 \begin_inset Flex Code
15885 \begin_layout Plain Layout
15891 These tags control the XHTML output.
15893 \begin_inset CommandInset ref
15895 reference "sec:Tags-for-XHTML"
15902 \begin_layout Description
15903 \begin_inset Flex Code
15906 \begin_layout Plain Layout
15915 \begin_inset Flex Code
15918 \begin_layout Plain Layout
15927 \begin_inset space \thinspace{}
15931 \begin_inset Flex Code
15934 \begin_layout Plain Layout
15940 ] Indicates whether the float is already defined in the document class or
15941 if instead the \SpecialChar LaTeX
15943 \begin_inset Flex Code
15946 \begin_layout Plain Layout
15952 needs to be loaded to define it on-the-fly.
15954 \begin_inset Flex Code
15957 \begin_layout Plain Layout
15964 \begin_inset Flex Code
15967 \begin_layout Plain Layout
15974 It should be set to
15975 \begin_inset Flex Code
15978 \begin_layout Plain Layout
15984 if the float is already defined by the \SpecialChar LaTeX
15988 \begin_layout Description
15989 \begin_inset Flex Code
15992 \begin_layout Plain Layout
15999 \begin_inset Flex Code
16002 \begin_layout Plain Layout
16009 \begin_inset Quotes erd
16013 \begin_inset Quotes erd
16016 ] The command used to generate a list of floats of this type; the leading
16025 \begin_inset Flex Code
16028 \begin_layout Plain Layout
16034 is false, since there is no standard way to generate this command.
16036 \begin_inset Flex Code
16039 \begin_layout Plain Layout
16045 is true, since in that case there is a standard way to define the command.
16048 \begin_layout Description
16049 \begin_inset Flex Code
16052 \begin_layout Plain Layout
16059 \begin_inset Flex Code
16062 \begin_layout Plain Layout
16069 \begin_inset Quotes erd
16073 \begin_inset Quotes erd
16076 ] A title for a list of floats of this kind (list of figures, tables, or
16078 It is used for the screen label within \SpecialChar LyX
16079 , it is used by \SpecialChar LaTeX
16081 it is used as the title in the XHTML output.
16082 It will be translated to the document language.
16085 \begin_layout Description
16086 \begin_inset Flex Code
16089 \begin_layout Plain Layout
16096 \begin_inset Flex Code
16099 \begin_layout Plain Layout
16106 \begin_inset Quotes erd
16110 \begin_inset Quotes erd
16113 ] This (optional) argument determines whether floats of this class will
16114 be numbered within some sectional unit of the document.
16116 \begin_inset Flex Code
16119 \begin_layout Plain Layout
16126 \begin_inset Quotes eld
16130 \begin_inset Flex Code
16133 \begin_layout Plain Layout
16140 \begin_inset Quotes erd
16143 , the floats will be numbered within chapters.
16147 \begin_layout Description
16148 \begin_inset Flex Code
16151 \begin_layout Plain Layout
16158 \begin_inset Flex Code
16161 \begin_layout Plain Layout
16168 \begin_inset Quotes erd
16172 \begin_inset Quotes erd
16175 ] The default placement for the given class of floats.
16176 The string should be as in standard \SpecialChar LaTeX
16178 \begin_inset Flex Code
16181 \begin_layout Plain Layout
16188 \begin_inset Flex Code
16191 \begin_layout Plain Layout
16198 \begin_inset Flex Code
16201 \begin_layout Plain Layout
16208 \begin_inset Flex Code
16211 \begin_layout Plain Layout
16217 for top, bottom, page, and here, respectively.
16221 \begin_layout Plain Layout
16222 Note that the order of these letters in the string is irrelevant, like in
16229 On top of that there is a new type,
16230 \begin_inset Flex Code
16233 \begin_layout Plain Layout
16239 , which does not really correspond to a float, since it means: put it
16240 \begin_inset Quotes eld
16244 \begin_inset Quotes erd
16248 Note however that the
16249 \begin_inset Flex Code
16252 \begin_layout Plain Layout
16258 specifier is special and, because of implementation details, cannot be
16259 used in non-built in float types.
16260 If you do not understand what this means, just use
16261 \begin_inset Quotes eld
16265 \begin_inset Flex Code
16268 \begin_layout Plain Layout
16275 \begin_inset Quotes erd
16281 \begin_layout Description
16282 \begin_inset Flex Code
16285 \begin_layout Plain Layout
16292 \begin_inset Flex Code
16295 \begin_layout Plain Layout
16301 ] The prefix to use when creating labels referring to floats of this type.
16302 This allows the use of formatted references.
16303 Note that you can remove any
16304 \begin_inset Flex Code
16307 \begin_layout Plain Layout
16313 set by a copied style by using the special value
16314 \begin_inset Quotes eld
16318 \begin_inset Quotes erd
16321 , which must be all caps.
16324 \begin_layout Description
16325 \begin_inset Flex Code
16328 \begin_layout Plain Layout
16335 \begin_inset Flex Code
16338 \begin_layout Plain Layout
16345 \begin_inset Quotes erd
16349 \begin_inset Quotes erd
16352 ] The style used when defining the float using
16353 \begin_inset Flex Code
16356 \begin_layout Plain Layout
16367 \begin_layout Description
16368 \begin_inset Flex Code
16371 \begin_layout Plain Layout
16378 \begin_inset Flex Code
16381 \begin_layout Plain Layout
16388 \begin_inset Quotes erd
16392 \begin_inset Quotes erd
16396 \begin_inset Quotes eld
16400 \begin_inset Quotes erd
16403 of the new class of floats, like program or algorithm.
16404 After the appropriate
16405 \begin_inset Flex Code
16408 \begin_layout Plain Layout
16417 \begin_inset Flex Code
16420 \begin_layout Plain Layout
16429 \begin_inset Flex Code
16432 \begin_layout Plain Layout
16443 \begin_layout Description
16444 \begin_inset Flex Code
16447 \begin_layout Plain Layout
16454 \begin_inset Flex Code
16457 \begin_layout Plain Layout
16464 \begin_inset space \thinspace{}
16468 \begin_inset Flex Code
16471 \begin_layout Plain Layout
16479 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16481 \begin_inset Flex Code
16484 \begin_layout Plain Layout
16490 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16494 \begin_layout Standard
16495 Note that defining a float with type
16496 \begin_inset Flex Code
16499 \begin_layout Plain Layout
16507 automatically defines the corresponding counter with name
16508 \begin_inset Flex Code
16511 \begin_layout Plain Layout
16522 \begin_layout Subsection
16523 Flex insets and InsetLayout
16524 \begin_inset CommandInset label
16526 name "subsec:Flex-insets-and"
16533 \begin_layout Standard
16534 Flex insets come in three different kinds:
16537 \begin_layout Itemize
16539 \begin_inset Flex Code
16542 \begin_layout Plain Layout
16548 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16550 \begin_inset Flex Code
16553 \begin_layout Plain Layout
16562 \begin_inset Flex Code
16565 \begin_layout Plain Layout
16576 \begin_layout Itemize
16578 \begin_inset Flex Code
16581 \begin_layout Plain Layout
16587 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16589 footnote, and the like.
16590 An obvious example is an endnote inset, which is defined in the
16591 \begin_inset Flex Code
16594 \begin_layout Plain Layout
16603 \begin_layout Itemize
16605 \begin_inset Flex Code
16608 \begin_layout Plain Layout
16614 ): For use with DocBook classes.
16617 \begin_layout Standard
16618 Flex insets are defined using the
16619 \begin_inset Flex Code
16622 \begin_layout Plain Layout
16628 tag, which shall be explained in a moment.
16631 \begin_layout Standard
16633 \begin_inset Flex Code
16636 \begin_layout Plain Layout
16642 tag also serves another function: It can be used to customize the general
16643 layout of many different types of insets.
16645 \begin_inset Flex Code
16648 \begin_layout Plain Layout
16654 can be used to customize the layout parameters for footnotes, marginal
16655 notes, note insets, \SpecialChar TeX
16656 code (ERT) insets, branches, listings, indexes, boxes,
16657 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16660 \begin_layout Standard
16662 \begin_inset Flex Code
16665 \begin_layout Plain Layout
16671 definition must begin with a line of the form:
16674 \begin_layout LyX-Code
16678 \begin_layout Standard
16680 \begin_inset Flex Code
16683 \begin_layout Plain Layout
16689 indicates the inset whose layout is being defined, and here there are four
16693 \begin_layout Enumerate
16694 The layout for a pre-existing inset is being modified.
16695 In this case, can be
16696 \begin_inset Flex Code
16699 \begin_layout Plain Layout
16705 any one of the following:
16706 \begin_inset Flex Code
16709 \begin_layout Plain Layout
16716 \begin_inset Flex Code
16719 \begin_layout Plain Layout
16726 \begin_inset Flex Code
16729 \begin_layout Plain Layout
16736 \begin_inset Flex Code
16739 \begin_layout Plain Layout
16746 \begin_inset Flex Code
16749 \begin_layout Plain Layout
16756 \begin_inset Flex Code
16759 \begin_layout Plain Layout
16766 \begin_inset Flex Code
16769 \begin_layout Plain Layout
16776 \begin_inset Flex Code
16779 \begin_layout Plain Layout
16786 \begin_inset Flex Code
16789 \begin_layout Plain Layout
16796 \begin_inset Flex Code
16799 \begin_layout Plain Layout
16806 \begin_inset Flex Code
16809 \begin_layout Plain Layout
16816 \begin_inset Flex Code
16819 \begin_layout Plain Layout
16826 \begin_inset Flex Code
16829 \begin_layout Plain Layout
16836 \begin_inset Flex Code
16839 \begin_layout Plain Layout
16846 \begin_inset Flex Code
16849 \begin_layout Plain Layout
16856 \begin_inset Flex Code
16859 \begin_layout Plain Layout
16866 \begin_inset Flex Code
16869 \begin_layout Plain Layout
16876 \begin_inset Flex Code
16879 \begin_layout Plain Layout
16886 \begin_inset Flex Code
16889 \begin_layout Plain Layout
16896 \begin_inset Flex Code
16899 \begin_layout Plain Layout
16908 \begin_layout Enumerate
16909 The layout for a Flex inset is being defined.
16911 \begin_inset Flex Code
16914 \begin_layout Plain Layout
16920 must be of the form
16921 \begin_inset Quotes eld
16925 \begin_inset Flex Code
16928 \begin_layout Plain Layout
16935 \begin_inset Quotes erd
16939 \begin_inset Flex Code
16942 \begin_layout Plain Layout
16948 may be be any valid identifier not used by a pre-existing Flex inset.
16949 The identifier may include spaces, but in that case the whole thing must
16950 be wrapped in quotes.
16951 Note that the definition of a flex inset
16956 \begin_inset Flex Code
16959 \begin_layout Plain Layout
16965 entry, declaring which type of inset it defines.
16968 \begin_layout Enumerate
16969 The layout for user specific branch is being defined.
16971 \begin_inset Flex Code
16974 \begin_layout Plain Layout
16980 must be of the form
16981 \begin_inset Quotes eld
16985 \begin_inset Flex Code
16988 \begin_layout Plain Layout
16995 \begin_inset Quotes erd
16999 \begin_inset Flex Code
17002 \begin_layout Plain Layout
17008 may be be any valid identifier of branch defined in user's document.
17009 The identifier may include spaces, but in that case the whole thing must
17010 be wrapped in quotes.
17011 The main purpose of this feature is to allow \SpecialChar LaTeX
17012 wrapping around specific
17013 branches as user needs.
17016 \begin_layout Enumerate
17017 The layout of a user (or class) specific caption is being defined.
17019 \begin_inset Flex Code
17022 \begin_layout Plain Layout
17028 must be of the form
17029 \begin_inset Quotes eld
17033 \begin_inset Flex Code
17036 \begin_layout Plain Layout
17043 \begin_inset Quotes erd
17047 \begin_inset Flex Code
17050 \begin_layout Plain Layout
17056 specifies the name of the caption as it appears in the menu.
17057 Have a look at the standard caption (
17058 \begin_inset Flex Code
17061 \begin_layout Plain Layout
17067 ), the specific captions of the KOMA-Script classes (
17068 \begin_inset Flex Code
17071 \begin_layout Plain Layout
17078 \begin_inset Flex Code
17081 \begin_layout Plain Layout
17090 \begin_inset space ~
17096 \begin_inset Flex Code
17099 \begin_layout Plain Layout
17105 ) for applications.
17108 \begin_layout Standard
17110 \begin_inset Flex Code
17113 \begin_layout Plain Layout
17119 definition can contain the following entries:
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 ] Defines argument number of a command\SpecialChar breakableslash
17143 environment associated with the current
17145 The definition must end with
17146 \begin_inset Flex Code
17149 \begin_layout Plain Layout
17157 \begin_inset CommandInset ref
17159 reference "subsec:Paragraph-Styles"
17166 \begin_layout Description
17167 \begin_inset Flex Code
17170 \begin_layout Plain Layout
17176 Preamble for changing language commands; see
17177 \begin_inset CommandInset ref
17179 reference "subsec:I18n"
17186 \begin_layout Description
17187 \begin_inset Flex Code
17190 \begin_layout Plain Layout
17197 \begin_inset Flex Code
17200 \begin_layout Plain Layout
17206 ] The color for the inset's background.
17208 \begin_inset CommandInset ref
17210 reference "chap:Names-of-colors"
17214 for a list of the available color names.
17217 \begin_layout Description
17218 \begin_inset Flex Code
17221 \begin_layout Plain Layout
17228 \begin_inset Flex Code
17231 \begin_layout Plain Layout
17240 \begin_inset space \thinspace{}
17244 \begin_inset Flex Code
17247 \begin_layout Plain Layout
17253 ] Whether to use the content of the inset as the label, when the inset is
17258 \begin_layout Description
17259 \begin_inset Flex Code
17262 \begin_layout Plain Layout
17269 \begin_inset Flex Code
17272 \begin_layout Plain Layout
17278 ] As with paragraph styles, see
17279 \begin_inset CommandInset ref
17281 reference "subsec:Paragraph-Styles"
17286 Note that you need to specify the complete type, e.
17287 \begin_inset space \thinspace{}
17291 \begin_inset space ~
17295 \begin_inset Flex Code
17298 \begin_layout Plain Layout
17299 CopyStyle Flex:<name>
17307 \begin_layout Description
17308 \begin_inset Flex Code
17311 \begin_layout Plain Layout
17318 \begin_inset Flex Code
17321 \begin_layout Plain Layout
17330 \begin_inset space \thinspace{}
17334 \begin_inset Flex Code
17337 \begin_layout Plain Layout
17343 ] Indicates whether the user may employ the Paragraph Settings dialog to
17344 customize the paragraph.
17347 \begin_layout Description
17348 \begin_inset Flex Code
17351 \begin_layout Plain Layout
17358 \begin_inset Flex Code
17361 \begin_layout Plain Layout
17368 \begin_inset Flex Code
17371 \begin_layout Plain Layout
17378 \begin_inset Flex Code
17381 \begin_layout Plain Layout
17387 , describing the rendering style used for the inset's frame and buttons.
17388 Footnotes generally use
17389 \begin_inset Flex Code
17392 \begin_layout Plain Layout
17398 , ERT insets generally
17399 \begin_inset Flex Code
17402 \begin_layout Plain Layout
17408 , and character styles
17409 \begin_inset Flex Code
17412 \begin_layout Plain Layout
17421 \begin_layout Description
17422 \begin_inset Flex Code
17425 \begin_layout Plain Layout
17432 \begin_inset Flex Code
17435 \begin_layout Plain Layout
17444 \begin_inset space \thinspace{}
17450 \begin_inset Flex Code
17453 \begin_layout Plain Layout
17462 \begin_inset Flex Code
17465 \begin_layout Plain Layout
17472 \begin_inset Flex Code
17475 \begin_layout Plain Layout
17482 Indicates whether the environment will stand on its own in the output or
17483 will appear inline with the surrounding text.
17484 If set to false, it is supposed that the \SpecialChar LaTeX
17485 environment ignores white space
17486 (including one newline character) after the
17487 \begin_inset Flex Code
17490 \begin_layout Plain Layout
17503 \begin_inset Flex Code
17506 \begin_layout Plain Layout
17522 \begin_layout Description
17523 \begin_inset Flex Code
17526 \begin_layout Plain Layout
17532 Required at the end of the
17533 \begin_inset Flex Code
17536 \begin_layout Plain Layout
17545 \begin_layout Description
17546 \begin_inset Flex Code
17549 \begin_layout Plain Layout
17555 The font used for both the text body
17561 \begin_inset CommandInset ref
17563 reference "subsec:Font-description"
17568 Note that defining this font automatically defines the
17569 \begin_inset Flex Code
17572 \begin_layout Plain Layout
17578 to the same value, so define this first and define
17579 \begin_inset Flex Code
17582 \begin_layout Plain Layout
17588 later if you want them to be different.
17591 \begin_layout Description
17592 \begin_inset Flex Code
17595 \begin_layout Plain Layout
17596 FixedWidthPreambleEncoding
17602 \begin_inset Flex Code
17605 \begin_layout Plain Layout
17614 \begin_inset space \thinspace{}
17618 \begin_inset Flex Code
17621 \begin_layout Plain Layout
17627 ] Force a fixed width encoding for the translated contents of
17628 \begin_inset Flex Code
17631 \begin_layout Plain Layout
17638 \begin_inset Flex Code
17641 \begin_layout Plain Layout
17647 code generated by this layout.
17648 This is needed for special \SpecialChar LaTeX
17653 that do not work with variable width encodings such as
17658 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17659 backends such as Xe\SpecialChar TeX
17661 Lua\SpecialChar TeX
17665 \begin_layout Description
17666 \begin_inset Flex Code
17669 \begin_layout Plain Layout
17670 ForceLocalFontSwitch
17676 \begin_inset Flex Code
17679 \begin_layout Plain Layout
17688 \begin_inset space \thinspace{}
17692 \begin_inset Flex Code
17695 \begin_layout Plain Layout
17701 ] When using babel, always use a local font switch (
17702 \begin_inset Flex Code
17705 \begin_layout Plain Layout
17713 ), never a global one (such as
17714 \begin_inset Flex Code
17717 \begin_layout Plain Layout
17728 \begin_layout Description
17729 \begin_inset Flex Code
17732 \begin_layout Plain Layout
17739 \begin_inset Flex Code
17742 \begin_layout Plain Layout
17751 \begin_inset space \thinspace{}
17755 \begin_inset Flex Code
17758 \begin_layout Plain Layout
17765 \begin_inset Quotes eld
17769 \begin_inset Quotes erd
17772 language, leading to Left-to-Right (Latin) output, e.
17773 \begin_inset space \thinspace{}
17777 \begin_inset space \space{}
17780 in \SpecialChar TeX
17785 \begin_layout Description
17786 \begin_inset Flex Code
17789 \begin_layout Plain Layout
17796 \begin_inset Flex Code
17799 \begin_layout Plain Layout
17808 \begin_inset space \thinspace{}
17812 \begin_inset Flex Code
17815 \begin_layout Plain Layout
17821 ] Force a a line break in the \SpecialChar LaTeX
17822 output before the inset starts and after
17824 This assures the inset itself is output on its own lines, for parsing purposes.
17827 \begin_layout Description
17828 \begin_inset Flex Code
17831 \begin_layout Plain Layout
17838 \begin_inset Flex Code
17841 \begin_layout Plain Layout
17850 \begin_inset space \thinspace{}
17854 \begin_inset Flex Code
17857 \begin_layout Plain Layout
17863 ] Indicates whether the
17864 \begin_inset Flex Code
17867 \begin_layout Plain Layout
17873 should be used or, instead, the user can change the paragraph style used
17878 \begin_layout Description
17879 \begin_inset Flex Code
17882 \begin_layout Plain Layout
17889 \begin_inset Flex Code
17892 \begin_layout Plain Layout
17901 \begin_inset space \thinspace{}
17905 \begin_inset Flex Code
17908 \begin_layout Plain Layout
17914 ] As with paragraph styles, see
17915 \begin_inset CommandInset ref
17917 reference "subsec:Paragraph-Styles"
17924 \begin_layout Description
17925 \begin_inset Flex Code
17928 \begin_layout Plain Layout
17934 These tags control the XHTML output.
17936 \begin_inset CommandInset ref
17938 reference "sec:Tags-for-XHTML"
17945 \begin_layout Description
17946 \begin_inset Flex Code
17949 \begin_layout Plain Layout
17956 \begin_inset Flex Code
17959 \begin_layout Plain Layout
17968 \begin_inset space \thinspace{}
17972 \begin_inset Flex Code
17975 \begin_layout Plain Layout
17981 ] Whether to include the contents of this inset in the strings generated
17982 for the `Outline' pane.
17983 One would not, for example, want the content of a footnote in a section
17984 header to be included in the TOC displayed in the outline, but one would
17985 normally want the content of a character style displayed.
17986 Default is false: not to include.
17989 \begin_layout Description
17990 \begin_inset Flex Code
17993 \begin_layout Plain Layout
18002 \begin_inset Flex Code
18005 \begin_layout Plain Layout
18014 \begin_inset space \thinspace{}
18018 \begin_inset Flex Code
18021 \begin_layout Plain Layout
18027 ] As with paragraph styles, see
18028 \begin_inset CommandInset ref
18030 reference "subsec:Paragraph-Styles"
18037 \begin_layout Description
18038 \begin_inset Flex Code
18041 \begin_layout Plain Layout
18047 The font used for the label.
18049 \begin_inset CommandInset ref
18051 reference "subsec:Font-description"
18056 Note that this definition can never appear before
18057 \begin_inset Flex Code
18060 \begin_layout Plain Layout
18066 , lest it be ineffective.
18069 \begin_layout Description
18070 \begin_inset Flex Code
18073 \begin_layout Plain Layout
18080 \begin_inset Flex Code
18083 \begin_layout Plain Layout
18090 \begin_inset Quotes erd
18094 \begin_inset Quotes erd
18097 ] What will be displayed on the button or elsewhere as the inset label.
18099 \begin_inset Flex Code
18102 \begin_layout Plain Layout
18110 \begin_inset Flex Code
18113 \begin_layout Plain Layout
18119 ) modify this label on the fly.
18122 \begin_layout Description
18123 \begin_inset Flex Code
18126 \begin_layout Plain Layout
18132 Language dependent preamble; see
18133 \begin_inset CommandInset ref
18135 reference "subsec:I18n"
18142 \begin_layout Description
18143 \begin_inset Flex Code
18146 \begin_layout Plain Layout
18153 \begin_inset Flex Code
18156 \begin_layout Plain Layout
18162 ] The name of the corresponding \SpecialChar LaTeX
18164 Either the environment or command name.
18167 \begin_layout Description
18168 \begin_inset Flex Code
18171 \begin_layout Plain Layout
18178 \begin_inset Flex Code
18181 \begin_layout Plain Layout
18187 ] The optional parameter for the corresponding
18188 \begin_inset Flex Code
18191 \begin_layout Plain Layout
18197 stuff, including possible bracket pairs like
18198 \begin_inset Flex Code
18201 \begin_layout Plain Layout
18208 This parameter cannot be changed from within \SpecialChar LyX
18210 \begin_inset Flex Code
18213 \begin_layout Plain Layout
18219 for customizable parameters).
18220 It will be output as is after all \SpecialChar LaTeX
18222 \begin_inset Flex Code
18225 \begin_layout Plain Layout
18234 \begin_layout Description
18235 \begin_inset Flex Code
18238 \begin_layout Plain Layout
18245 \begin_inset Flex Code
18248 \begin_layout Plain Layout
18249 Command, Environment, None
18254 ] How the style should be translated into \SpecialChar LaTeX
18259 \begin_layout Plain Layout
18260 \begin_inset Flex Code
18263 \begin_layout Plain Layout
18269 is perhaps a bit misleading, since these rules apply to SGML classes too.
18270 Visit the SGML class files for specific examples.
18276 \begin_inset Separator parbreak
18283 \begin_layout Description
18284 \begin_inset Flex Code
18287 \begin_layout Plain Layout
18293 means nothing special
18296 \begin_layout Description
18297 \begin_inset Flex Code
18300 \begin_layout Plain Layout
18307 \begin_inset Flex Code
18310 \begin_layout Plain Layout
18317 {\SpecialChar ldots
18326 \begin_layout Description
18327 \begin_inset Flex Code
18330 \begin_layout Plain Layout
18337 \begin_inset Flex Code
18340 \begin_layout Plain Layout
18347 }\SpecialChar ldots
18362 \begin_layout Standard
18363 Putting the last few things together, the \SpecialChar LaTeX
18364 output will be either:
18367 \begin_layout LyX-Code
18370 LatexName[LatexParam]{\SpecialChar ldots
18374 \begin_layout Standard
18378 \begin_layout LyX-Code
18381 begin{LatexName}[LatexParam] \SpecialChar ldots
18387 \begin_layout Standard
18388 depending upon the \SpecialChar LaTeX
18393 \begin_layout Description
18394 \begin_inset Flex Code
18397 \begin_layout Plain Layout
18404 \begin_inset Flex Code
18407 \begin_layout Plain Layout
18413 ] A string that is put at the beginning of the layout content.
18414 A line break in the output can be indicated by
18415 \begin_inset Flex Code
18418 \begin_layout Plain Layout
18427 \begin_layout Description
18428 \begin_inset Flex Code
18431 \begin_layout Plain Layout
18438 \begin_inset Flex Code
18441 \begin_layout Plain Layout
18448 \begin_inset Flex Code
18451 \begin_layout Plain Layout
18458 \begin_inset Flex Code
18461 \begin_layout Plain Layout
18468 \begin_inset Flex Code
18471 \begin_layout Plain Layout
18477 (indicating a dummy definition ending definitions of charstyles, etc).
18478 This entry is required in and is only meaningful for Flex insets.
18479 Among other things, it determines on which menu this inset will appear.
18481 \begin_inset Flex Code
18484 \begin_layout Plain Layout
18491 \begin_inset Flex Code
18494 \begin_layout Plain Layout
18500 will automatically set
18501 \begin_inset Flex Code
18504 \begin_layout Plain Layout
18512 \begin_inset Flex Code
18515 \begin_layout Plain Layout
18521 can be set to true for
18522 \begin_inset Flex Code
18525 \begin_layout Plain Layout
18531 insets by setting it
18536 \begin_inset Flex Code
18539 \begin_layout Plain Layout
18548 \begin_layout Description
18549 \begin_inset Flex Code
18552 \begin_layout Plain Layout
18559 \begin_inset Flex Code
18562 \begin_layout Plain Layout
18571 \begin_inset space \thinspace{}
18575 \begin_inset Flex Code
18578 \begin_layout Plain Layout
18584 ] Whether multiple paragraphs are permitted in this inset.
18586 \begin_inset Flex Code
18589 \begin_layout Plain Layout
18595 to the same value and
18596 \begin_inset Flex Code
18599 \begin_layout Plain Layout
18605 to the opposite value.
18606 These can be reset to other values, if they are used
18611 \begin_inset Flex Code
18614 \begin_layout Plain Layout
18624 \begin_layout Description
18625 \begin_inset Flex Code
18628 \begin_layout Plain Layout
18635 \begin_inset Flex Code
18638 \begin_layout Plain Layout
18647 \begin_inset space \thinspace{}
18651 \begin_inset Flex Code
18654 \begin_layout Plain Layout
18660 ] Whether fragile commands in this inset should be
18661 \begin_inset Flex Code
18664 \begin_layout Plain Layout
18677 whether the command should itself be protected.) Default is false.
18680 \begin_layout Description
18681 \begin_inset Flex Code
18684 \begin_layout Plain Layout
18691 \begin_inset Flex Code
18694 \begin_layout Plain Layout
18700 ] Deletes an existing
18701 \begin_inset Flex Code
18704 \begin_layout Plain Layout
18713 \begin_layout Description
18714 \begin_inset Flex Code
18717 \begin_layout Plain Layout
18724 \begin_inset Flex Code
18727 \begin_layout Plain Layout
18734 \begin_inset Flex Code
18737 \begin_layout Plain Layout
18743 that has replaced this
18744 \begin_inset Flex Code
18747 \begin_layout Plain Layout
18754 This is used to rename an
18755 \begin_inset Flex Code
18758 \begin_layout Plain Layout
18764 , while keeping backward compatibility.
18767 \begin_layout Description
18768 \begin_inset Flex Code
18771 \begin_layout Plain Layout
18778 \begin_inset Flex Code
18781 \begin_layout Plain Layout
18790 \begin_inset space \thinspace{}
18794 \begin_inset Flex Code
18797 \begin_layout Plain Layout
18803 ] As with paragraph styles, see
18804 \begin_inset CommandInset ref
18806 reference "subsec:Paragraph-Styles"
18814 \begin_layout Description
18815 \begin_inset Flex Code
18818 \begin_layout Plain Layout
18825 \begin_inset Flex Code
18828 \begin_layout Plain Layout
18837 \begin_inset space \thinspace{}
18841 \begin_inset Flex Code
18844 \begin_layout Plain Layout
18850 ] As with paragraph styles, see
18851 \begin_inset CommandInset ref
18853 reference "subsec:Paragraph-Styles"
18861 \begin_layout Description
18862 \begin_inset Flex Code
18865 \begin_layout Plain Layout
18871 As with paragraph styles, see
18872 \begin_inset CommandInset ref
18874 reference "subsec:Paragraph-Styles"
18881 \begin_layout Description
18882 \begin_inset Flex Code
18885 \begin_layout Plain Layout
18892 \begin_inset Flex Code
18895 \begin_layout Plain Layout
18901 ] The prefix to use when creating labels referring to insets of this type.
18902 This allows the use of formatted references.
18905 \begin_layout Description
18906 \begin_inset Flex Code
18909 \begin_layout Plain Layout
18916 \begin_inset Flex Code
18919 \begin_layout Plain Layout
18925 ] As with paragraph styles, see
18926 \begin_inset CommandInset ref
18928 reference "subsec:Paragraph-Styles"
18935 \begin_layout Description
18936 \begin_inset Flex Code
18939 \begin_layout Plain Layout
18946 \begin_inset Flex Code
18949 \begin_layout Plain Layout
18958 \begin_inset space \thinspace{}
18962 \begin_inset Flex Code
18965 \begin_layout Plain Layout
18971 ] Resets the \SpecialChar LaTeX
18972 arguments of this layout (as defined via the
18973 \begin_inset Flex Code
18976 \begin_layout Plain Layout
18983 This is useful if you have copied a style via
18984 \begin_inset Flex Code
18987 \begin_layout Plain Layout
18993 , but you do not want to inherit its (required and optional) arguments.
18996 \begin_layout Description
18997 \begin_inset Flex Code
19000 \begin_layout Plain Layout
19007 \begin_inset Flex Code
19010 \begin_layout Plain Layout
19017 \begin_inset space \thinspace{}
19021 \begin_inset Flex Code
19024 \begin_layout Plain Layout
19032 ] Whether this inset should use the font of its surrounding environment
19034 Default is false: use the font of the surrounding environment.
19037 \begin_layout Description
19038 \begin_inset Flex Code
19041 \begin_layout Plain Layout
19048 \begin_inset Flex Code
19051 \begin_layout Plain Layout
19057 ] A string that is put at the end of the layout content.
19058 A line break in the output can be indicated by
19059 \begin_inset Flex Code
19062 \begin_layout Plain Layout
19071 \begin_layout Description
19072 \begin_inset Flex Code
19075 \begin_layout Plain Layout
19082 \begin_inset Flex Code
19085 \begin_layout Plain Layout
19092 \begin_inset space \thinspace{}
19096 \begin_inset Flex Code
19099 \begin_layout Plain Layout
19107 ] Allow spell-checking the contents of this inset.
19111 \begin_layout Subsection
19113 \begin_inset CommandInset label
19115 name "subsec:Counters"
19122 \begin_layout Standard
19123 It is necessary to define the counters (
19124 \begin_inset Flex Noun
19127 \begin_layout Plain Layout
19134 \begin_inset Flex Noun
19137 \begin_layout Plain Layout
19143 , \SpecialChar ldots
19144 ) in the text class itself.
19145 The standard counters are defined in the file
19146 \begin_inset Flex Code
19149 \begin_layout Plain Layout
19155 , so you may have to do no more than add
19158 \begin_layout LyX-Code
19159 Input stdcounters.inc
19162 \begin_layout Standard
19163 to your layout file to get them to work.
19164 But if you want to define custom counters, then you can do so.
19165 The counter declaration must begin with:
19168 \begin_layout LyX-Code
19169 Counter CounterName
19172 \begin_layout Standard
19174 \begin_inset Flex Code
19177 \begin_layout Plain Layout
19183 ' is replaced by the name of the counter.
19184 And it must end with
19185 \begin_inset Quotes eld
19189 \begin_inset Flex Code
19192 \begin_layout Plain Layout
19199 \begin_inset Quotes erd
19203 The following parameters can also be used:
19206 \begin_layout Description
19207 \begin_inset Flex Code
19210 \begin_layout Plain Layout
19217 \begin_inset Flex Code
19220 \begin_layout Plain Layout
19226 ] Sets the initial value for the counter, to which it will be reset whenever
19228 Normally, one will want the default, 1.
19231 \begin_layout Description
19232 \begin_inset Flex Code
19235 \begin_layout Plain Layout
19242 \begin_inset Flex Code
19245 \begin_layout Plain Layout
19252 \begin_inset Quotes erd
19256 \begin_inset Quotes erd
19259 ] When defined, this string defines how the counter is displayed.
19260 Setting this value sets
19261 \begin_inset Flex Code
19264 \begin_layout Plain Layout
19265 LabelStringAppendix
19271 The following special constructs can be used in the string:
19272 \begin_inset Separator parbreak
19279 \begin_layout Itemize
19280 \begin_inset Flex Code
19283 \begin_layout Plain Layout
19291 will be replaced by the expansion of the
19292 \begin_inset Flex Code
19295 \begin_layout Plain Layout
19302 \begin_inset Flex Code
19305 \begin_layout Plain Layout
19306 LabelStringAppendix
19312 \begin_inset Flex Code
19315 \begin_layout Plain Layout
19325 \begin_layout Itemize
19326 counter values can be expressed using \SpecialChar LaTeX
19328 \begin_inset Newline newline
19332 \begin_inset Flex Code
19335 \begin_layout Plain Layout
19352 \begin_inset Flex Code
19355 \begin_layout Plain Layout
19367 \begin_layout Plain Layout
19377 Actually, the situation is a bit more complicated: any
19396 other than those described below will produce arabic numerals.
19397 It would not be surprising to see this change in the future.
19403 \begin_inset Flex Code
19406 \begin_layout Plain Layout
19412 : 1, 2, 3,\SpecialChar ldots
19414 \begin_inset Flex Code
19417 \begin_layout Plain Layout
19423 for lower-case letters: a, b, c, \SpecialChar ldots
19425 \begin_inset Flex Code
19428 \begin_layout Plain Layout
19434 for upper-case letters: A, B, C, \SpecialChar ldots
19436 \begin_inset Flex Code
19439 \begin_layout Plain Layout
19445 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19447 \begin_inset Flex Code
19450 \begin_layout Plain Layout
19456 for upper-case roman numerals: I, II, III\SpecialChar ldots
19458 \begin_inset Flex Code
19461 \begin_layout Plain Layout
19467 for hebrew numerals.
19471 \begin_layout Standard
19472 If LabelString is not defined, a default value is constructed as follows:
19473 if the counter has a master counter
19474 \begin_inset Flex Code
19477 \begin_layout Plain Layout
19484 \begin_inset Flex Code
19487 \begin_layout Plain Layout
19494 \begin_inset Newline newline
19498 \begin_inset Flex Code
19501 \begin_layout Plain Layout
19511 is used; otherwise the string
19512 \begin_inset Flex Code
19515 \begin_layout Plain Layout
19526 \begin_layout Description
19527 \begin_inset Flex Code
19530 \begin_layout Plain Layout
19531 LabelStringAppendix
19537 \begin_inset Flex Code
19540 \begin_layout Plain Layout
19547 \begin_inset Quotes erd
19551 \begin_inset Quotes erd
19555 \begin_inset Flex Code
19558 \begin_layout Plain Layout
19564 , but for use in the Appendix.
19567 \begin_layout Description
19568 \begin_inset Flex Code
19571 \begin_layout Plain Layout
19578 \begin_inset Flex Code
19581 \begin_layout Plain Layout
19588 \begin_inset Quotes erd
19592 \begin_inset Quotes erd
19595 ] A format for use with formatted references to this counter.
19596 For example, one might want to have references to section numbers appear
19598 \begin_inset Quotes eld
19602 \begin_inset Quotes erd
19606 The string should contain
19607 \begin_inset Quotes eld
19611 \begin_inset Quotes erd
19615 This will be replaced by the counter number itself.
19616 So, for sections, it would be: Section ##.
19619 \begin_layout Description
19620 \begin_inset Flex Code
19623 \begin_layout Plain Layout
19630 \begin_inset Flex Code
19633 \begin_layout Plain Layout
19640 \begin_inset Quotes erd
19644 \begin_inset Quotes erd
19647 ] If this is set to the name of another counter, the present counter will
19648 be reset every time the other one is increased.
19650 \begin_inset Flex Code
19653 \begin_layout Plain Layout
19660 \begin_inset Flex Code
19663 \begin_layout Plain Layout
19672 \begin_layout Subsection
19674 \begin_inset CommandInset label
19676 name "subsec:Font-description"
19683 \begin_layout Standard
19684 A font description looks like this:
19687 \begin_layout LyX-Code
19701 \begin_layout LyX-Code
19705 \begin_layout LyX-Code
19709 \begin_layout Standard
19710 The following commands are available:
19713 \begin_layout Description
19714 \begin_inset Flex Code
19717 \begin_layout Plain Layout
19724 \begin_inset Flex Code
19727 \begin_layout Plain Layout
19736 \begin_inset Flex Code
19739 \begin_layout Plain Layout
19746 \begin_inset Flex Code
19749 \begin_layout Plain Layout
19756 \begin_inset Flex Code
19759 \begin_layout Plain Layout
19766 \begin_inset Flex Code
19769 \begin_layout Plain Layout
19776 \begin_inset Flex Code
19779 \begin_layout Plain Layout
19786 \begin_inset Flex Code
19789 \begin_layout Plain Layout
19796 \begin_inset Flex Code
19799 \begin_layout Plain Layout
19806 \begin_inset Flex Code
19809 \begin_layout Plain Layout
19818 \begin_layout Description
19819 \begin_inset Flex Code
19822 \begin_layout Plain Layout
19829 \begin_inset Flex Code
19832 \begin_layout Plain Layout
19841 \begin_inset Flex Code
19844 \begin_layout Plain Layout
19851 \begin_inset Flex Code
19854 \begin_layout Plain Layout
19863 \begin_layout Description
19864 \begin_inset Flex Code
19867 \begin_layout Plain Layout
19874 \begin_inset Flex Code
19877 \begin_layout Plain Layout
19883 ] Valid arguments are:
19884 \begin_inset Flex Code
19887 \begin_layout Plain Layout
19894 \begin_inset Flex Code
19897 \begin_layout Plain Layout
19904 \begin_inset Flex Code
19907 \begin_layout Plain Layout
19914 \begin_inset Flex Code
19917 \begin_layout Plain Layout
19924 \begin_inset Flex Code
19927 \begin_layout Plain Layout
19934 \begin_inset Flex Code
19937 \begin_layout Plain Layout
19944 \begin_inset Flex Code
19947 \begin_layout Plain Layout
19954 \begin_inset Flex Code
19957 \begin_layout Plain Layout
19964 \begin_inset Flex Code
19967 \begin_layout Plain Layout
19974 \begin_inset Flex Code
19977 \begin_layout Plain Layout
19984 \begin_inset Flex Code
19987 \begin_layout Plain Layout
19994 \begin_inset Flex Code
19997 \begin_layout Plain Layout
20004 Each of these turns on or off the corresponding attribute.
20006 \begin_inset Flex Code
20009 \begin_layout Plain Layout
20015 turns on emphasis, and
20016 \begin_inset Flex Code
20019 \begin_layout Plain Layout
20027 \begin_inset Newline newline
20030 If the latter seems puzzling, remember that the font settings for the present
20031 context are generally inherited from the surrounding context.
20033 \begin_inset Flex Code
20036 \begin_layout Plain Layout
20042 would turn off the emphasis that was anyway in effect, say, in a theorem
20046 \begin_layout Description
20047 \begin_inset Flex Code
20050 \begin_layout Plain Layout
20057 \begin_inset Flex Code
20060 \begin_layout Plain Layout
20069 \begin_inset Flex Code
20072 \begin_layout Plain Layout
20081 \begin_layout Description
20082 \begin_inset Flex Code
20085 \begin_layout Plain Layout
20092 \begin_inset Flex Code
20095 \begin_layout Plain Layout
20104 \begin_inset Flex Code
20107 \begin_layout Plain Layout
20114 \begin_inset Flex Code
20117 \begin_layout Plain Layout
20124 \begin_inset Flex Code
20127 \begin_layout Plain Layout
20136 \begin_layout Description
20137 \begin_inset Flex Code
20140 \begin_layout Plain Layout
20147 \begin_inset Flex Code
20150 \begin_layout Plain Layout
20157 \begin_inset Flex Code
20160 \begin_layout Plain Layout
20167 \begin_inset Flex Code
20170 \begin_layout Plain Layout
20179 \begin_inset Flex Code
20182 \begin_layout Plain Layout
20189 \begin_inset Flex Code
20192 \begin_layout Plain Layout
20199 \begin_inset Flex Code
20202 \begin_layout Plain Layout
20209 \begin_inset Flex Code
20212 \begin_layout Plain Layout
20219 \begin_inset Flex Code
20222 \begin_layout Plain Layout
20231 \begin_layout Subsection
20232 \begin_inset CommandInset label
20234 name "subsec:Citation-format-description"
20238 Citation format description
20241 \begin_layout Standard
20243 \begin_inset Flex Code
20246 \begin_layout Plain Layout
20252 blocks are used to describe how bibliographic information should be displayed,
20253 both within \SpecialChar LyX
20254 itself (in the citation dialog and in tooltips, for example)
20255 and in XHTML output.
20256 Such a block might look like this:
20259 \begin_layout LyX-Code
20263 \begin_layout LyX-Code
20267 \begin_layout LyX-Code
20271 \begin_layout LyX-Code
20275 \begin_layout Standard
20276 The individual lines define how the bibliographic information associated
20277 with an article or book, respectively, is to be displayed, and such a definitio
20278 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20281 defines a default format in the source code that will be used if no specific
20282 definition has been given.
20284 predefines several formats in the file
20285 \begin_inset Flex Code
20288 \begin_layout Plain Layout
20294 , which is included in most of \SpecialChar LyX
20295 's document classes.
20298 \begin_layout Standard
20299 The definitions use a simple language that allows Bib\SpecialChar TeX
20300 keys to be replaced
20302 Keys should be enclosed in
20303 \begin_inset Flex Code
20306 \begin_layout Plain Layout
20313 \begin_inset Flex Code
20316 \begin_layout Plain Layout
20323 So a simple definition might look like this:
20326 \begin_layout LyX-Code
20328 \begin_inset Quotes eld
20332 \begin_inset Quotes erd
20338 \begin_layout Standard
20339 This would print the author, followed by a comma, followed by the title,
20340 in quotes, followed by a period.
20343 \begin_layout Standard
20344 Of course, sometimes you may want to print a key only if it exists.
20345 This can be done by using a conditional construction, such as:
20346 \begin_inset Flex Code
20349 \begin_layout Plain Layout
20351 \begin_inset space ~
20361 \begin_inset Flex Code
20364 \begin_layout Plain Layout
20370 key exists, then print
20371 \begin_inset Quotes eld
20375 \begin_inset space ~
20379 \begin_inset Quotes erd
20382 followed by the volume key.
20383 It is also possible to have an else clause in the conditional, such as:
20384 \begin_inset Newline newline
20388 \begin_inset Flex Code
20391 \begin_layout Plain Layout
20392 {%author%[[%author%]][[%editor%, ed.]]}
20398 \begin_inset Newline newline
20402 \begin_inset Flex Code
20405 \begin_layout Plain Layout
20411 key is printed if it exists; otherwise, the editor key is printed, followed
20413 \begin_inset Quotes eld
20417 \begin_inset space ~
20421 \begin_inset Quotes erd
20424 Note that the key is again enclosed in
20425 \begin_inset Flex Code
20428 \begin_layout Plain Layout
20434 signs; the entire conditional is enclosed in braces; and the if and else
20435 clauses are enclosed in double brackets,
20436 \begin_inset Quotes eld
20440 \begin_inset Flex Code
20443 \begin_layout Plain Layout
20450 \begin_inset Quotes eld
20454 \begin_inset Quotes eld
20458 \begin_inset Flex Code
20461 \begin_layout Plain Layout
20468 \begin_inset Quotes erd
20472 There must be no space between any of these.
20475 \begin_layout Standard
20476 There is one other piece of syntax available in definitions, which looks
20478 \begin_inset Flex Code
20481 \begin_layout Plain Layout
20488 This defines a piece of formatting information that is to be used when
20490 \begin_inset Quotes eld
20494 \begin_inset Quotes erd
20498 Obviously, we do not want to output HTML tags when writing plain text,
20499 so they should be wrapped in
20500 \begin_inset Quotes eld
20504 \begin_inset Quotes erd
20508 \begin_inset Quotes eld
20512 \begin_inset Quotes erd
20518 \begin_layout Standard
20519 Two special sorts of definitions are also possible in a
20520 \begin_inset Flex Code
20523 \begin_layout Plain Layout
20530 An example of the first would be:
20533 \begin_layout LyX-Code
20535 \begin_inset Quotes eld
20539 \begin_inset Quotes erd
20545 \begin_layout Standard
20546 This is an abbreviation, or macro, and it can be used by treating it as
20548 \begin_inset Flex Code
20551 \begin_layout Plain Layout
20560 \begin_inset Flex Code
20563 \begin_layout Plain Layout
20569 exactly as it would treat its definition.
20570 So, let us issue the obvious
20578 \begin_layout LyX-Code
20582 \begin_layout Standard
20583 or anything like it.
20585 shouldn't go into an infinite loop, but it may go into a long one before
20589 \begin_layout Standard
20590 The second sort of special definition might look like this:
20593 \begin_layout LyX-Code
20597 \begin_layout Standard
20598 This defines a translatable piece of text, which allows relevant parts of
20599 the bibliography to be translated.
20600 It can be included in a definition by treating it as a key:
20601 \begin_inset Flex Code
20604 \begin_layout Plain Layout
20611 Several of these are predefined in
20612 \begin_inset Flex Code
20615 \begin_layout Plain Layout
20622 Note that these are not macros, in the sense just defined.
20623 They will not be expanded.
20626 \begin_layout Standard
20627 So here then is an example that use all these features:
20628 \begin_inset VSpace defskip
20634 \begin_layout Standard
20638 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20641 \begin_layout Standard
20642 \begin_inset VSpace defskip
20645 This defines a macro that prints the author, followed by a comma, if the
20647 \begin_inset Flex Code
20650 \begin_layout Plain Layout
20656 key is defined, or else prints the name of the editor, followed by the
20658 \begin_inset Flex Code
20661 \begin_layout Plain Layout
20667 or its translation (it is by default
20668 \begin_inset Quotes eld
20672 \begin_inset Quotes erd
20676 \begin_inset Flex Code
20679 \begin_layout Plain Layout
20686 Note that this is in fact defined in
20687 \begin_inset Flex Code
20690 \begin_layout Plain Layout
20696 , so you can use it in your own definitions, or re-definitions, if you load
20700 \begin_layout Section
20701 \begin_inset CommandInset label
20703 name "sec:Tags-for-XHTML"
20707 Tags for XHTML output
20710 \begin_layout Standard
20711 As with \SpecialChar LaTeX
20712 or DocBook, the format of \SpecialChar LyX
20713 's XHTML output is also controlled by
20714 layout information.
20715 In general, \SpecialChar LyX
20716 provides sensible defaults and, as mentioned earlier, it will
20717 even construct default CSS style rules from the other layout tags.
20718 For example, \SpecialChar LyX
20719 will attempt to use the information provided in the
20720 \begin_inset Flex Code
20723 \begin_layout Plain Layout
20729 declaration for the Chapter style to write CSS that will appropriately
20730 format chapter headings.
20733 \begin_layout Standard
20734 In many cases, then, you may not have to do anything at all to get acceptable
20735 XHTML output for your own environments, custom insets, and so forth.
20736 But in some cases you will, and so \SpecialChar LyX
20737 provides a number of layout tags that
20738 can be used to customize the XHTML and CSS that are generated.
20741 \begin_layout Standard
20742 Note that there are two tags,
20743 \begin_inset Flex Code
20746 \begin_layout Plain Layout
20753 \begin_inset Flex Code
20756 \begin_layout Plain Layout
20762 that may appear outside style and inset declarations.
20764 \begin_inset CommandInset ref
20766 reference "subsec:General-text-class"
20770 for details on these.
20773 \begin_layout Subsection
20774 \begin_inset CommandInset label
20776 name "subsec:Paragraph-Style-XHTML"
20783 \begin_layout Standard
20784 The sort of XHTML \SpecialChar LyX
20785 outputs for a paragraph depends upon whether we are dealing
20786 with a normal paragraph, a command, or an environment, where this is itself
20787 determined by the contents of the corresponding
20788 \begin_inset Flex Code
20791 \begin_layout Plain Layout
20802 \begin_layout Standard
20803 For a command or normal paragraph, the output XHTML has the following form:
20806 \begin_layout LyX-Code
20808 \begin_inset Quotes erd
20812 \begin_inset Quotes erd
20818 \begin_layout LyX-Code
20820 \begin_inset Quotes erd
20824 \begin_inset Quotes erd
20830 \begin_layout LyX-Code
20831 Contents of the paragraph.
20834 \begin_layout LyX-Code
20838 \begin_layout Standard
20839 The label tags are of course omitted if the paragraph does not have a label.
20842 \begin_layout Standard
20843 For an environment that is not some sort of list, the XHTML takes this form:
20846 \begin_layout LyX-Code
20848 \begin_inset Quotes erd
20852 \begin_inset Quotes erd
20858 \begin_layout LyX-Code
20860 \begin_inset Quotes erd
20864 \begin_inset Quotes erd
20868 \begin_inset Quotes erd
20872 \begin_inset Quotes erd
20875 >Environment Label</labeltag>First paragraph.</itemtag>
20878 \begin_layout LyX-Code
20879 <itemtag>Second paragraph.</itemtag>
20882 \begin_layout LyX-Code
20886 \begin_layout Standard
20887 Note that the label is output only for the first paragraph, as it should
20888 be for a theorem, for example.
20892 \begin_layout Standard
20893 For a list, we have one of these forms:
20896 \begin_layout LyX-Code
20898 \begin_inset Quotes erd
20902 \begin_inset Quotes erd
20908 \begin_layout LyX-Code
20910 \begin_inset Quotes erd
20914 \begin_inset Quotes erd
20918 \begin_inset Quotes erd
20922 \begin_inset Quotes erd
20925 >List Label</labeltag>First item.</itemtag>
20928 \begin_layout LyX-Code
20930 \begin_inset Quotes erd
20934 \begin_inset Quotes erd
20938 \begin_inset Quotes erd
20942 \begin_inset Quotes erd
20945 >List Label</labeltag>Second item.</itemtag>
20948 \begin_layout LyX-Code
20952 \begin_layout LyX-Code
20956 \begin_layout LyX-Code
20958 \begin_inset Quotes erd
20962 \begin_inset Quotes erd
20968 \begin_layout LyX-Code
20970 \begin_inset Quotes erd
20974 \begin_inset Quotes erd
20977 >List Label</labeltag><itemtag attr=
20978 \begin_inset Quotes erd
20982 \begin_inset Quotes erd
20985 >First item.</itemtag>
20988 \begin_layout LyX-Code
20990 \begin_inset Quotes erd
20994 \begin_inset Quotes erd
20997 >List Label</labeltag><itemtag attr=
20998 \begin_inset Quotes erd
21002 \begin_inset Quotes erd
21005 >Second item.</itemtag>
21008 \begin_layout LyX-Code
21012 \begin_layout Standard
21013 Note the different orders of
21014 \begin_inset Flex Code
21017 \begin_layout Plain Layout
21024 \begin_inset Flex Code
21027 \begin_layout Plain Layout
21034 Which order we get depends upon the setting of
21035 \begin_inset Flex Code
21038 \begin_layout Plain Layout
21045 \begin_inset Flex Code
21048 \begin_layout Plain Layout
21054 is false (the default), you get the first of these, with the label within
21055 the item; if true, you get the second, with the label outside the item.
21058 \begin_layout Standard
21059 The specific tags and attributes output for each paragraph type can be controlle
21060 d by means of the layout tags we are about to describe.
21061 As mentioned earlier, however, \SpecialChar LyX
21062 uses sensible defaults for many of these,
21063 so you often may not need to do very much to get good XHTML output.
21064 Think of the available tags as there so you can tweak things to your liking.
21067 \begin_layout Description
21068 \begin_inset Flex Code
21071 \begin_layout Plain Layout
21078 \begin_inset Flex Code
21081 \begin_layout Plain Layout
21087 ] Specifies attribute information to be output with the main tag.
21089 \begin_inset Quotes eld
21093 \begin_inset Flex Code
21096 \begin_layout Plain Layout
21103 \begin_inset Quotes erd
21107 By default, \SpecialChar LyX
21109 \begin_inset Quotes eld
21113 \begin_inset Flex Code
21116 \begin_layout Plain Layout
21123 \begin_inset Quotes erd
21127 \begin_inset Flex Code
21130 \begin_layout Plain Layout
21136 is the \SpecialChar LyX
21137 name of the layout, made lowercase, for example: chapter.
21142 contain any style information.
21144 \begin_inset Flex Code
21147 \begin_layout Plain Layout
21156 \begin_layout Description
21157 \begin_inset Flex Code
21160 \begin_layout Plain Layout
21167 \begin_inset Flex Code
21170 \begin_layout Plain Layout
21180 ] Whether to output the default CSS information \SpecialChar LyX
21181 generates for this layout,
21182 even if additional information is explicitly provided via
21183 \begin_inset Flex Code
21186 \begin_layout Plain Layout
21194 \begin_inset Flex Code
21197 \begin_layout Plain Layout
21203 allows you to alter or augment the generated CSS, rather than to override
21206 \begin_inset Flex Code
21209 \begin_layout Plain Layout
21218 \begin_layout Description
21219 \begin_inset Flex Code
21222 \begin_layout Plain Layout
21229 \begin_inset Flex Code
21232 \begin_layout Plain Layout
21238 ] The tag to be used for individual paragraphs of environments, replacing
21240 \begin_inset Flex Code
21243 \begin_layout Plain Layout
21249 in the examples above.
21251 \begin_inset Flex Code
21254 \begin_layout Plain Layout
21263 \begin_layout Description
21264 \begin_inset Flex Code
21267 \begin_layout Plain Layout
21274 \begin_inset Flex Code
21277 \begin_layout Plain Layout
21283 ] Attributes for the item tag.
21285 \begin_inset Quotes eld
21289 \begin_inset Flex Code
21292 \begin_layout Plain Layout
21293 class=`layoutname_item'
21299 \begin_inset Quotes erd
21307 contain any style information.
21309 \begin_inset Flex Code
21312 \begin_layout Plain Layout
21321 \begin_layout Description
21322 \begin_inset Flex Code
21325 \begin_layout Plain Layout
21332 \begin_inset Flex Code
21335 \begin_layout Plain Layout
21341 ] The tag to be used for paragraph and item labels, replacing
21342 \begin_inset Flex Code
21345 \begin_layout Plain Layout
21351 in the examples above.
21353 \begin_inset Flex Code
21356 \begin_layout Plain Layout
21363 \begin_inset Flex Code
21366 \begin_layout Plain Layout
21373 \begin_inset Flex Code
21376 \begin_layout Plain Layout
21383 \begin_inset Flex Code
21386 \begin_layout Plain Layout
21387 Centered_Top_Environment
21392 , in which case it defaults to
21393 \begin_inset Flex Code
21396 \begin_layout Plain Layout
21405 \begin_layout Description
21406 \begin_inset Flex Code
21409 \begin_layout Plain Layout
21416 \begin_inset Flex Code
21419 \begin_layout Plain Layout
21425 ] Attributes for the label tag.
21427 \begin_inset Quotes eld
21431 \begin_inset Flex Code
21434 \begin_layout Plain Layout
21435 class=`layoutname_label'
21441 \begin_inset Quotes erd
21449 contain any style information.
21451 \begin_inset Flex Code
21454 \begin_layout Plain Layout
21463 \begin_layout Description
21464 \begin_inset Flex Code
21467 \begin_layout Plain Layout
21474 \begin_inset Flex Code
21477 \begin_layout Plain Layout
21487 ] Meaningful only for list-like environments, this tag controls whether
21488 the label tag is output before or inside the item tag.
21489 This is used, for example, in the description environment, where we want
21491 \begin_inset Flex Code
21494 \begin_layout Plain Layout
21495 <dt>\SpecialChar ldots
21496 </dt><dd>\SpecialChar ldots
21504 \begin_inset Flex Code
21507 \begin_layout Plain Layout
21513 : The label tag is output inside the item tag.
21516 \begin_layout Description
21517 \begin_inset Flex Code
21520 \begin_layout Plain Layout
21526 Information to be output in the
21527 \begin_inset Flex Code
21530 \begin_layout Plain Layout
21536 section when this style is used.
21537 This might, for example, be used to include a
21538 \begin_inset Flex Code
21541 \begin_layout Plain Layout
21548 \begin_inset Flex Code
21551 \begin_layout Plain Layout
21560 \begin_layout Description
21561 \begin_inset Flex Code
21564 \begin_layout Plain Layout
21570 CSS style information to be included when this style is used.
21571 Note that this will automatically be wrapped in a layout-generated
21572 \begin_inset Flex Code
21575 \begin_layout Plain Layout
21581 block, so only the CSS itself need be included.
21583 \begin_inset Flex Code
21586 \begin_layout Plain Layout
21595 \begin_layout Description
21596 \begin_inset Flex Code
21599 \begin_layout Plain Layout
21606 \begin_inset Flex Code
21609 \begin_layout Plain Layout
21615 ] The tag to be used for the main label, replacing
21616 \begin_inset Flex Code
21619 \begin_layout Plain Layout
21625 in the examples above.
21627 \begin_inset Flex Code
21630 \begin_layout Plain Layout
21639 \begin_layout Description
21640 \begin_inset Flex Code
21643 \begin_layout Plain Layout
21650 \begin_inset Flex Code
21653 \begin_layout Plain Layout
21663 ] Marks this style as the one to be used to generate the
21664 \begin_inset Flex Code
21667 \begin_layout Plain Layout
21673 tag for the XHTML file.
21674 By default, it is false.
21676 \begin_inset Flex Code
21679 \begin_layout Plain Layout
21685 file sets it to true for the
21686 \begin_inset Flex Code
21689 \begin_layout Plain Layout
21699 \begin_layout Subsection
21703 \begin_layout Standard
21704 The XHTML output of insets can also be controlled by information in layout
21709 \begin_layout Plain Layout
21710 At present, this is true only for
21711 \begin_inset Quotes eld
21715 \begin_inset Quotes erd
21718 insets (insets you can type into) and is not true for
21719 \begin_inset Quotes eld
21723 \begin_inset Quotes erd
21726 insets (insets that are associated with dialog boxes).
21731 Here, too, \SpecialChar LyX
21732 tries to provide sensible defaults, and it constructs default
21734 But everything can be customized.
21737 \begin_layout Standard
21738 The XHTML \SpecialChar LyX
21739 outputs for an inset has the following form:
21742 \begin_layout LyX-Code
21744 \begin_inset Quotes erd
21748 \begin_inset Quotes erd
21754 \begin_layout LyX-Code
21755 <labeltag>Label</labeltag>
21758 \begin_layout LyX-Code
21760 \begin_inset Quotes erd
21764 \begin_inset Quotes erd
21767 >Contents of the inset.</innertag>
21770 \begin_layout LyX-Code
21774 \begin_layout Standard
21775 If the inset permits multiple paragraphs—that is, if
21776 \begin_inset Flex Code
21779 \begin_layout Plain Layout
21785 is true—then the contents of the inset will itself be output as paragraphs
21786 formatted according to the styles used for those paragraphs (standard,
21787 quote, and the like).
21788 The label tag is of course omitted if the paragraph does not have a label
21789 and, at present, is always
21790 \begin_inset Flex Code
21793 \begin_layout Plain Layout
21800 The inner tag is optional and, by default, does not appear.
21803 \begin_layout Standard
21804 The specific tags and attributes output for each inset can be controlled
21805 by means of the following layout tags.
21808 \begin_layout Description
21809 \begin_inset Flex Code
21812 \begin_layout Plain Layout
21819 \begin_inset Flex Code
21822 \begin_layout Plain Layout
21828 ] Specifies attribute information to be output with the main tag.
21830 \begin_inset Quotes eld
21834 \begin_inset Flex Code
21837 \begin_layout Plain Layout
21838 class=`myinset' onclick=`\SpecialChar ldots
21845 \begin_inset Quotes erd
21849 By default, \SpecialChar LyX
21851 \begin_inset Quotes eld
21855 \begin_inset Flex Code
21858 \begin_layout Plain Layout
21865 \begin_inset Quotes erd
21869 \begin_inset Flex Code
21872 \begin_layout Plain Layout
21878 is the \SpecialChar LyX
21879 name of the inset, made lowercase and with non-alphanumeric characters
21880 converted to underscores, for example: footnote.
21883 \begin_layout Description
21884 \begin_inset Flex Code
21887 \begin_layout Plain Layout
21894 \begin_inset Flex Code
21897 \begin_layout Plain Layout
21907 ] Whether to output the default CSS information \SpecialChar LyX
21908 generates for this layout,
21909 even if additional information is explicitly provided via
21910 \begin_inset Flex Code
21913 \begin_layout Plain Layout
21921 \begin_inset Flex Code
21924 \begin_layout Plain Layout
21930 allows you to alter or augment the generated CSS, rather than to override
21935 \begin_layout Description
21936 \begin_inset Flex Code
21939 \begin_layout Plain Layout
21946 \begin_inset Flex Code
21949 \begin_layout Plain Layout
21955 ] Attributes for the inner tag.
21957 \begin_inset Quotes eld
21961 \begin_inset Flex Code
21964 \begin_layout Plain Layout
21965 class=`insetname_inner'
21971 \begin_inset Quotes erd
21977 \begin_layout Description
21978 \begin_inset Flex Code
21981 \begin_layout Plain Layout
21988 \begin_inset Flex Code
21991 \begin_layout Plain Layout
21997 ] The inner tag, replacing
21998 \begin_inset Flex Code
22001 \begin_layout Plain Layout
22007 in the examples above.
22008 By default, there is none.
22011 \begin_layout Description
22012 \begin_inset Flex Code
22015 \begin_layout Plain Layout
22022 \begin_inset Flex Code
22025 \begin_layout Plain Layout
22033 ] Whether this inset represents a standalone block of text (such as a footnote)
22034 or instead represents material that is included in the surrounding text
22035 (such as a branch).
22039 \begin_layout Description
22040 \begin_inset Flex Code
22043 \begin_layout Plain Layout
22050 \begin_inset Flex Code
22053 \begin_layout Plain Layout
22059 ] A label for this inset, possibly including a reference to a counter.
22060 For example, for footnote, it might be:
22061 \begin_inset Flex Code
22064 \begin_layout Plain Layout
22073 This is optional, and there is no default.
22076 \begin_layout Description
22077 \begin_inset Flex Code
22080 \begin_layout Plain Layout
22086 Information to be output in the
22087 \begin_inset Flex Code
22090 \begin_layout Plain Layout
22096 section when this style is used.
22097 This might, for example, be used to include a
22098 \begin_inset Flex Code
22101 \begin_layout Plain Layout
22108 \begin_inset Flex Code
22111 \begin_layout Plain Layout
22120 \begin_layout Description
22121 \begin_inset Flex Code
22124 \begin_layout Plain Layout
22130 CSS style information to be included when this style is used.
22131 Note that this will automatically be wrapped in a layout-generated
22132 \begin_inset Flex Code
22135 \begin_layout Plain Layout
22141 block, so only the CSS itself need be included.
22144 \begin_layout Description
22145 \begin_inset Flex Code
22148 \begin_layout Plain Layout
22155 \begin_inset Flex Code
22158 \begin_layout Plain Layout
22164 ] The tag to be used for the main label, replacing
22165 \begin_inset Flex Code
22168 \begin_layout Plain Layout
22174 in the examples above.
22175 The default depends upon the setting of
22176 \begin_inset Flex Code
22179 \begin_layout Plain Layout
22186 \begin_inset Flex Code
22189 \begin_layout Plain Layout
22195 is true, the default is
22196 \begin_inset Flex Code
22199 \begin_layout Plain Layout
22205 ; if it is false, the default is
22206 \begin_inset Flex Code
22209 \begin_layout Plain Layout
22218 \begin_layout Subsection
22222 \begin_layout Standard
22223 The XHTML output for floats too can be controlled by layout information.
22224 The output has the following form:
22227 \begin_layout LyX-Code
22229 \begin_inset Quotes erd
22233 \begin_inset Quotes erd
22239 \begin_layout LyX-Code
22240 Contents of the float.
22243 \begin_layout LyX-Code
22247 \begin_layout Standard
22248 The caption, if there is one, is a separate inset and will be output as
22250 Its appearance can be controlled via the InsetLayout for caption insets.
22254 \begin_layout Description
22255 \begin_inset Flex Code
22258 \begin_layout Plain Layout
22265 \begin_inset Flex Code
22268 \begin_layout Plain Layout
22274 ] Specifies attribute information to be output with the main tag.
22276 \begin_inset Quotes eld
22280 \begin_inset Flex Code
22283 \begin_layout Plain Layout
22284 class=`myfloat' onclick=`\SpecialChar ldots
22291 \begin_inset Quotes erd
22295 By default, \SpecialChar LyX
22297 \begin_inset Quotes eld
22301 \begin_inset Flex Code
22304 \begin_layout Plain Layout
22305 class=`float float-floattype'
22311 \begin_inset Quotes erd
22315 \begin_inset Flex Code
22318 \begin_layout Plain Layout
22324 is \SpecialChar LyX
22325 's name for this type of float, as determined by the float declaration
22327 \begin_inset CommandInset ref
22329 reference "subsec:Floats"
22333 ), though made lowercase and with non-alphanumeric characters converted
22334 to underscores, for example: float-table.
22337 \begin_layout Description
22338 \begin_inset Flex Code
22341 \begin_layout Plain Layout
22347 CSS style information to be included when this float is used.
22348 Note that this will automatically be wrapped in a layout-generated
22349 \begin_inset Flex Code
22352 \begin_layout Plain Layout
22358 block, so only the CSS itself need be included.
22361 \begin_layout Description
22362 \begin_inset Flex Code
22365 \begin_layout Plain Layout
22372 \begin_inset Flex Code
22375 \begin_layout Plain Layout
22381 ] The tag to be used for this float, replacing
22382 \begin_inset Quotes eld
22386 \begin_inset Flex Code
22389 \begin_layout Plain Layout
22396 \begin_inset Quotes erd
22399 in the example above.
22401 \begin_inset Flex Code
22404 \begin_layout Plain Layout
22410 and will rarely need changing.
22413 \begin_layout Subsection
22414 Bibliography formatting
22417 \begin_layout Standard
22418 The bibliography can be formatted using
22419 \begin_inset Flex Code
22422 \begin_layout Plain Layout
22430 \begin_inset CommandInset ref
22432 reference "subsec:Citation-format-description"
22439 \begin_layout Subsection
22444 \begin_layout Standard
22445 We have several times mentioned that \SpecialChar LyX
22446 will generate default CSS style rules
22447 for both insets and paragraph styles, based upon the other layout information
22449 In this section, we shall say a word about which layout information \SpecialChar LyX
22454 \begin_layout Standard
22455 At present, \SpecialChar LyX
22456 auto-generates CSS only for font information, making use of
22458 \begin_inset Flex Code
22461 \begin_layout Plain Layout
22468 \begin_inset Flex Code
22471 \begin_layout Plain Layout
22478 \begin_inset Flex Code
22481 \begin_layout Plain Layout
22488 \begin_inset Flex Code
22491 \begin_layout Plain Layout
22498 \begin_inset Flex Code
22501 \begin_layout Plain Layout
22508 \begin_inset CommandInset ref
22510 reference "subsec:Font-description"
22515 The translation is mostly straightforward and obvious.
22517 \begin_inset Quotes eld
22521 \begin_inset Flex Code
22524 \begin_layout Plain Layout
22531 \begin_inset Quotes erd
22535 \begin_inset Quotes eld
22539 \begin_inset Flex Code
22542 \begin_layout Plain Layout
22543 font-family: sans-serif;
22549 \begin_inset Quotes erd
22553 The correspondence of \SpecialChar LyX
22554 sizes and CSS sizes is a little less obvious but
22555 nonetheless intuitive.
22557 \begin_inset Flex Code
22560 \begin_layout Plain Layout
22567 \begin_inset Flex URL
22570 \begin_layout Plain Layout
22580 \begin_layout Chapter
22581 Including External Material
22582 \begin_inset CommandInset label
22584 name "chap:Including-External-Material"
22591 \begin_layout Standard
22592 \begin_inset Box Shadowbox
22602 height_special "totalheight"
22607 backgroundcolor "none"
22610 \begin_layout Plain Layout
22611 WARNING: This portion of the documentation has not been updated for some
22613 We certainly hope that it is still accurate, but there are no guarantees.
22621 \begin_layout Standard
22622 The use of material from sources external to \SpecialChar LyX
22623 is covered in detail in the
22629 This part of the manual covers what needs to happen behind the scenes for
22630 new sorts of material to be included.
22633 \begin_layout Section
22637 \begin_layout Standard
22638 The external material feature is based on the concept of a
22643 A template is a specification of how \SpecialChar LyX
22644 should interface with a certain kind
22646 As bundled, \SpecialChar LyX
22647 comes with predefined templates for Xfig figures, various
22648 raster format images, chess diagrams, and LilyPond music notation.
22649 You can check the actual list by using the menu
22650 \begin_inset Flex Noun
22653 \begin_layout Plain Layout
22654 Insert\SpecialChar menuseparator
22655 File\SpecialChar menuseparator
22662 Furthermore, it is possible to roll your own template to support a specific
22664 Later we'll describe in more detail what is involved, and hopefully you
22665 will submit all the templates you create so we can include them in a later
22670 \begin_layout Standard
22671 Another basic idea of the external material feature is to distinguish between
22672 the original file that serves as a base for final material and the produced
22673 file that is included in your exported or printed document.
22674 For example, consider the case of a figure produced with
22675 \begin_inset Flex Code
22678 \begin_layout Plain Layout
22685 The Xfig application itself works on an original file with the
22686 \begin_inset Flex Code
22689 \begin_layout Plain Layout
22696 Within Xfig, you create and change your figure, and when you are done,
22698 \begin_inset Flex Code
22701 \begin_layout Plain Layout
22708 When you want to include the figure in your document, you invoke
22709 \begin_inset Flex Code
22712 \begin_layout Plain Layout
22718 in order to create a PostScript file that can readily be included in your
22722 \begin_inset Flex Code
22725 \begin_layout Plain Layout
22731 file is the original file, and the PostScript file is the produced file.
22734 \begin_layout Standard
22735 This distinction is important in order to allow updating of the material
22736 while you are in the process of writing the document.
22737 Furthermore, it provides us with the flexibility that is needed to support
22738 multiple export formats.
22739 For instance, in the case of a plain text file, it is not exactly an award-winn
22740 ing idea to include the figure as raw PostScript.
22741 Instead, you would either prefer to just include a reference to the figure
22742 or try to invoke some graphics to ASCII converter to make the final result
22743 look similar to the real graphics.
22744 The external material management allows you to do this, because it is parametri
22745 zed on the different export formats that \SpecialChar LyX
22749 \begin_layout Standard
22750 Besides supporting the production of different products according to the
22751 exported format, it supports tight integration with editing and viewing
22753 In the case of an Xfig figure, you are able to invoke Xfig on the original
22754 file with a single click from within the external material dialog in \SpecialChar LyX
22756 and also preview the produced PostScript file with Ghostview with another
22758 No more fiddling around with the command line and/or file browsers to locate
22759 and manipulate the original or produced files.
22760 In this way, you are finally able to take full advantage of the many different
22761 applications that are relevant to use when you write your documents, and
22762 ultimately be more productive.
22765 \begin_layout Section
22766 The external template configuration file
22769 \begin_layout Standard
22770 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22772 However, be aware that doing this in an careless manner most probably
22776 introduce an easily exploitable security hole.
22777 So before you do this, please read the discussion about security in
22778 \begin_inset CommandInset ref
22780 reference "sec:Security-discussion"
22787 \begin_layout Standard
22788 Having said that, we encourage you to submit any interesting templates that
22793 \begin_layout Standard
22794 The external templates are defined in the
22795 \begin_inset Flex Code
22798 \begin_layout Plain Layout
22799 LyXDir/lib/external_templates
22805 You can place your own version in
22806 \begin_inset Flex Code
22809 \begin_layout Plain Layout
22810 UserDir/external_templates
22818 \begin_layout Standard
22819 A typical template looks like this:
22822 \begin_layout LyX-Code
22826 \begin_layout LyX-Code
22827 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22830 \begin_layout LyX-Code
22834 \begin_layout LyX-Code
22838 \begin_layout LyX-Code
22842 \begin_layout LyX-Code
22846 \begin_layout LyX-Code
22850 \begin_layout LyX-Code
22851 AutomaticProduction true
22854 \begin_layout LyX-Code
22858 \begin_layout LyX-Code
22862 \begin_layout LyX-Code
22863 Format \SpecialChar LaTeX
22867 \begin_layout LyX-Code
22868 TransformCommand Rotate RotationLatexCommand
22871 \begin_layout LyX-Code
22872 TransformCommand Resize ResizeLatexCommand
22875 \begin_layout LyX-Code
22876 Product "$$RotateFront$$ResizeFront
22879 \begin_layout LyX-Code
22884 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22887 \begin_layout LyX-Code
22888 $$ResizeBack$$RotateBack"
22891 \begin_layout LyX-Code
22895 \begin_layout LyX-Code
22896 UpdateResult "$$AbsPath$$Basename.pstex_t"
22899 \begin_layout LyX-Code
22900 Requirement "graphicx"
22903 \begin_layout LyX-Code
22904 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22907 \begin_layout LyX-Code
22908 ReferencedFile latex "$$AbsPath$$Basename.eps"
22911 \begin_layout LyX-Code
22912 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22915 \begin_layout LyX-Code
22919 \begin_layout LyX-Code
22920 Format PDF\SpecialChar LaTeX
22924 \begin_layout LyX-Code
22925 TransformCommand Rotate RotationLatexCommand
22928 \begin_layout LyX-Code
22929 TransformCommand Resize ResizeLatexCommand
22932 \begin_layout LyX-Code
22933 Product "$$RotateFront$$ResizeFront
22936 \begin_layout LyX-Code
22941 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22944 \begin_layout LyX-Code
22945 $$ResizeBack$$RotateBack"
22948 \begin_layout LyX-Code
22949 UpdateFormat pdftex
22952 \begin_layout LyX-Code
22953 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22956 \begin_layout LyX-Code
22957 Requirement "graphicx"
22960 \begin_layout LyX-Code
22961 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22964 \begin_layout LyX-Code
22965 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22968 \begin_layout LyX-Code
22972 \begin_layout LyX-Code
22976 \begin_layout LyX-Code
22977 Product "$$Contents(
22979 "$$AbsPath$$Basename.asc
22984 \begin_layout LyX-Code
22985 UpdateFormat asciixfig
22988 \begin_layout LyX-Code
22989 UpdateResult "$$AbsPath$$Basename.asc"
22992 \begin_layout LyX-Code
22996 \begin_layout LyX-Code
23000 \begin_layout LyX-Code
23001 Product "<graphic fileref=
23003 "$$AbsOrRelPathMaster$$Basename.eps
23008 \begin_layout LyX-Code
23012 \begin_layout LyX-Code
23016 \begin_layout LyX-Code
23017 UpdateResult "$$AbsPath$$Basename.eps"
23020 \begin_layout LyX-Code
23021 ReferencedFile docbook "$$AbsPath$$Basename.eps"
23024 \begin_layout LyX-Code
23025 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
23028 \begin_layout LyX-Code
23032 \begin_layout LyX-Code
23033 Product "[XFig: $$FName]"
23036 \begin_layout LyX-Code
23040 \begin_layout LyX-Code
23044 \begin_layout Standard
23045 As you can see, the template is enclosed in
23046 \begin_inset Flex Code
23049 \begin_layout Plain Layout
23057 \begin_inset Flex Code
23060 \begin_layout Plain Layout
23067 It contains a header specifying some general settings and, for each supported
23068 primary document file format, a section
23069 \begin_inset Flex Code
23072 \begin_layout Plain Layout
23080 \begin_inset Flex Code
23083 \begin_layout Plain Layout
23092 \begin_layout Subsection
23093 The template header
23096 \begin_layout Description
23097 \begin_inset Flex Code
23100 \begin_layout Plain Layout
23101 AutomaticProduction
23102 \begin_inset space ~
23110 Whether the file represented by the template must be generated by \SpecialChar LyX
23112 This command must occur exactly once.
23115 \begin_layout Description
23116 \begin_inset Flex Code
23119 \begin_layout Plain Layout
23121 \begin_inset space ~
23129 A glob pattern that is used in the file dialog to filter out the desired
23131 If there is more than one possible file extension (e.
23132 \begin_inset space \thinspace{}
23136 \begin_inset space \space{}
23140 \begin_inset Flex Code
23143 \begin_layout Plain Layout
23150 \begin_inset Flex Code
23153 \begin_layout Plain Layout
23159 ), use something like
23160 \begin_inset Flex Code
23163 \begin_layout Plain Layout
23170 This command must occur exactly once.
23173 \begin_layout Description
23174 \begin_inset Flex Code
23177 \begin_layout Plain Layout
23179 \begin_inset space ~
23187 The text that is displayed on the button.
23188 This command must occur exactly once.
23191 \begin_layout Description
23192 \begin_inset Flex Code
23195 \begin_layout Plain Layout
23197 \begin_inset space ~
23201 \begin_inset space ~
23209 The help text that is used in the External dialog.
23210 Provide enough information to explain to the user just what the template
23211 can provide him with.
23212 This command must occur exactly once.
23215 \begin_layout Description
23216 \begin_inset Flex Code
23219 \begin_layout Plain Layout
23221 \begin_inset space ~
23229 The file format of the original file.
23230 This must be the name of a format that is known to \SpecialChar LyX
23232 \begin_inset CommandInset ref
23234 reference "sec:Formats"
23240 \begin_inset Quotes eld
23244 \begin_inset Flex Code
23247 \begin_layout Plain Layout
23254 \begin_inset Quotes erd
23257 if the template can handle original files of more than one format.
23259 will attempt to interrogate the file itself in order to deduce its format
23261 This command must occur exactly once.
23264 \begin_layout Description
23265 \begin_inset Flex Code
23268 \begin_layout Plain Layout
23270 \begin_inset space ~
23278 A unique name for the template.
23279 It must not contain substitution macros (see below).
23282 \begin_layout Description
23283 \begin_inset Flex Code
23286 \begin_layout Plain Layout
23288 \begin_inset space ~
23291 Rotate|Resize|Clip|Extra
23296 This command specifies which transformations are supported by this template.
23297 It may occur zero or more times.
23298 This command enables the corresponding tabs in the external dialog.
23300 \begin_inset Flex Code
23303 \begin_layout Plain Layout
23309 command must have either a corresponding
23310 \begin_inset Flex Code
23313 \begin_layout Plain Layout
23320 \begin_inset Flex Code
23323 \begin_layout Plain Layout
23330 \begin_inset Flex Code
23333 \begin_layout Plain Layout
23340 Otherwise the transformation will not be supported by that format.
23343 \begin_layout Subsection
23347 \begin_layout Description
23348 \begin_inset Flex Code
23351 \begin_layout Plain Layout
23353 \begin_inset space ~
23356 LaTeX|PDFLaTeX|PlainText|DocBook
23361 The primary document file format that this format definition is for.
23362 Not every template has a sensible representation in all document file formats.
23363 Please define nevertheless a
23364 \begin_inset Flex Code
23367 \begin_layout Plain Layout
23373 section for all templates.
23374 Use a dummy text when no representation is available.
23375 Then you can at least see a reference to the external material in the exported
23379 \begin_layout Description
23380 \begin_inset Flex Code
23383 \begin_layout Plain Layout
23385 \begin_inset space ~
23389 \begin_inset space ~
23397 This command defines an additional macro
23398 \begin_inset Flex Code
23401 \begin_layout Plain Layout
23407 for substitution in
23408 \begin_inset Flex Code
23411 \begin_layout Plain Layout
23419 \begin_inset Flex Code
23422 \begin_layout Plain Layout
23428 itself may contain substitution macros.
23429 The advantage over using
23430 \begin_inset Flex Code
23433 \begin_layout Plain Layout
23440 \begin_inset Flex Code
23443 \begin_layout Plain Layout
23449 is that the substituted value of
23450 \begin_inset Flex Code
23453 \begin_layout Plain Layout
23459 is sanitized so that it is a valid optional argument in the document format.
23460 This command may occur zero or more times.
23463 \begin_layout Description
23464 \begin_inset Flex Code
23467 \begin_layout Plain Layout
23469 \begin_inset space ~
23477 The text that is inserted in the exported document.
23478 This is actually the most important command and can be quite complex.
23479 This command must occur exactly once.
23482 \begin_layout Description
23483 \begin_inset Flex Code
23486 \begin_layout Plain Layout
23488 \begin_inset space ~
23496 This command specifies a preamble snippet that will be included in the
23499 It has to be defined using
23500 \begin_inset Flex Code
23503 \begin_layout Plain Layout
23511 \begin_inset Flex Code
23514 \begin_layout Plain Layout
23521 This command may occur zero or more times.
23524 \begin_layout Description
23525 \begin_inset Flex Code
23528 \begin_layout Plain Layout
23530 \begin_inset space ~
23534 \begin_inset space ~
23542 This command denotes files that are created by the conversion process and
23543 are needed for a particular export format.
23544 If the filename is relative, it is interpreted relative to the master document.
23545 This command may be given zero or more times.
23548 \begin_layout Description
23549 \begin_inset Flex Code
23552 \begin_layout Plain Layout
23554 \begin_inset space ~
23562 The name of a required \SpecialChar LaTeX
23564 The package is included via
23565 \begin_inset Flex Code
23568 \begin_layout Plain Layout
23576 in the \SpecialChar LaTeX
23578 This command may occur zero or more times.
23581 \begin_layout Description
23582 \begin_inset Flex Code
23585 \begin_layout Plain Layout
23587 \begin_inset space ~
23591 \begin_inset space ~
23594 RotationLatexCommand
23599 This command specifies that the built in \SpecialChar LaTeX
23600 command should be used for rotation.
23601 This command may occur once or not at all.
23604 \begin_layout Description
23605 \begin_inset Flex Code
23608 \begin_layout Plain Layout
23610 \begin_inset space ~
23614 \begin_inset space ~
23622 This command specifies that the built in \SpecialChar LaTeX
23623 command should be used for resizing.
23624 This command may occur once or not at all.
23627 \begin_layout Description
23628 \begin_inset Flex Code
23631 \begin_layout Plain Layout
23633 \begin_inset space ~
23637 \begin_inset space ~
23640 RotationLatexOption
23645 This command specifies that rotation is done via an optional argument.
23646 This command may occur once or not at all.
23649 \begin_layout Description
23650 \begin_inset Flex Code
23653 \begin_layout Plain Layout
23655 \begin_inset space ~
23659 \begin_inset space ~
23667 This command specifies that resizing is done via an optional argument.
23668 This command may occur once or not at all.
23671 \begin_layout Description
23672 \begin_inset Flex Code
23675 \begin_layout Plain Layout
23677 \begin_inset space ~
23681 \begin_inset space ~
23689 This command specifies that clipping is done via an optional argument.
23690 This command may occur once or not at all.
23693 \begin_layout Description
23694 \begin_inset Flex Code
23697 \begin_layout Plain Layout
23699 \begin_inset space ~
23703 \begin_inset space ~
23711 This command specifies that an extra optional argument is used.
23712 This command may occur once or not at all.
23715 \begin_layout Description
23716 \begin_inset Flex Code
23719 \begin_layout Plain Layout
23721 \begin_inset space ~
23729 The file format of the converted file.
23730 This must be the name of a format that is known to \SpecialChar LyX
23732 \begin_inset Flex Noun
23735 \begin_layout Plain Layout
23736 Tools\SpecialChar menuseparator
23737 Preferences\SpecialChar menuseparator
23738 File Handling\SpecialChar menuseparator
23745 This command must occur exactly once.
23746 If the resulting file format is PDF, you need to specify the format
23747 \begin_inset Flex Code
23750 \begin_layout Plain Layout
23757 This is the PDF format used for including graphics.
23758 The other defined PDF formats are for document export.
23761 \begin_layout Description
23762 \begin_inset Flex Code
23765 \begin_layout Plain Layout
23767 \begin_inset space ~
23775 The file name of the converted file.
23776 The file name must be absolute.
23777 This command must occur exactly once.
23780 \begin_layout Subsection
23781 Preamble definitions
23784 \begin_layout Standard
23785 The external template configuration file may contain additional preamble
23786 definitions enclosed by
23787 \begin_inset Flex Code
23790 \begin_layout Plain Layout
23798 \begin_inset Flex Code
23801 \begin_layout Plain Layout
23808 They can be used by the templates in the
23809 \begin_inset Flex Code
23812 \begin_layout Plain Layout
23821 \begin_layout Section
23822 The substitution mechanism
23825 \begin_layout Standard
23826 When the external material facility invokes an external program, it is done
23827 on the basis of a command defined in the template configuration file.
23828 These commands can contain various macros that are expanded before execution.
23829 Execution always take place in the directory of the containing document.
23832 \begin_layout Standard
23833 Also, whenever external material is to be displayed, the name will be produced
23834 by the substitution mechanism, and most other commands in the template
23835 definition support substitution as well.
23838 \begin_layout Standard
23839 The available macros are the following:
23842 \begin_layout Description
23843 \begin_inset Flex Code
23846 \begin_layout Plain Layout
23847 $$AbsOrRelPathMaster
23852 The file path, absolute or relative to the master \SpecialChar LyX
23856 \begin_layout Description
23857 \begin_inset Flex Code
23860 \begin_layout Plain Layout
23861 $$AbsOrRelPathParent
23866 The file path, absolute or relative to the \SpecialChar LyX
23870 \begin_layout Description
23871 \begin_inset Flex Code
23874 \begin_layout Plain Layout
23880 The absolute file path.
23883 \begin_layout Description
23884 \begin_inset Flex Code
23887 \begin_layout Plain Layout
23893 The filename without path and without the extension.
23896 \begin_layout Description
23897 \begin_inset Flex Code
23900 \begin_layout Plain Layout
23902 \begin_inset Quotes eld
23906 \begin_inset Quotes erd
23914 This macro will expand to the contents of the file with the name
23915 \begin_inset Flex Code
23918 \begin_layout Plain Layout
23927 \begin_layout Description
23928 \begin_inset Flex Code
23931 \begin_layout Plain Layout
23937 The file extension (including the dot).
23940 \begin_layout Description
23941 \begin_inset Flex Code
23944 \begin_layout Plain Layout
23950 This will be the string
23951 \begin_inset Quotes eld
23955 \begin_inset Quotes erd
23958 if the file is in JPEG format, otherwise it will be the string
23959 \begin_inset Quotes eld
23963 \begin_inset Quotes erd
23967 This is useful to avoid uneeded conversions for output formats that support
23968 both PNG and JPEG fomats.
23969 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
23974 \begin_layout Description
23975 \begin_inset Flex Code
23978 \begin_layout Plain Layout
23984 The filename of the file specified in the external material dialog.
23985 This is either an absolute name, or it is relative to the \SpecialChar LyX
23989 \begin_layout Description
23990 \begin_inset Flex Code
23993 \begin_layout Plain Layout
24000 \begin_inset Flex Code
24003 \begin_layout Plain Layout
24009 (absolute name or relative to the \SpecialChar LyX
24013 \begin_layout Description
24014 \begin_inset Flex Code
24017 \begin_layout Plain Layout
24023 The file path, relative to the master \SpecialChar LyX
24027 \begin_layout Description
24028 \begin_inset Flex Code
24031 \begin_layout Plain Layout
24037 The file path, relative to the \SpecialChar LyX
24041 \begin_layout Description
24042 \begin_inset Flex Code
24045 \begin_layout Plain Layout
24051 This macro will expand to the absolute path of the system directory.
24052 This is typically used to point to the various helper scripts that are
24053 bundled with \SpecialChar LyX
24057 \begin_layout Description
24058 \begin_inset Flex Code
24061 \begin_layout Plain Layout
24067 A name and full path to a temporary file which will be automatically deleted
24068 whenever the containing document is closed, or the external material insertion
24072 \begin_layout Standard
24073 All path macros contain a trailing directory separator, so you can construct
24075 \begin_inset space \thinspace{}
24079 \begin_inset space \space{}
24082 the absolute filename with
24083 \begin_inset Flex Code
24086 \begin_layout Plain Layout
24087 $$AbsPath$$Basename$$Extension
24095 \begin_layout Standard
24096 The macros above are substituted in all commands unless otherwise noted.
24098 \begin_inset Flex Code
24101 \begin_layout Plain Layout
24107 supports additionally the following substitutions if they are enabled by
24109 \begin_inset Flex Code
24112 \begin_layout Plain Layout
24119 \begin_inset Flex Code
24122 \begin_layout Plain Layout
24131 \begin_layout Description
24132 \begin_inset Flex Code
24135 \begin_layout Plain Layout
24141 The front part of the resize command.
24144 \begin_layout Description
24145 \begin_inset Flex Code
24148 \begin_layout Plain Layout
24154 The back part of the resize command.
24157 \begin_layout Description
24158 \begin_inset Flex Code
24161 \begin_layout Plain Layout
24167 The front part of the rotation command.
24170 \begin_layout Description
24171 \begin_inset Flex Code
24174 \begin_layout Plain Layout
24180 The back part of the rotation command.
24183 \begin_layout Standard
24184 The value string of the
24185 \begin_inset Flex Code
24188 \begin_layout Plain Layout
24194 command supports additionally the following substitutions if they are enabled
24196 \begin_inset Flex Code
24199 \begin_layout Plain Layout
24206 \begin_inset Flex Code
24209 \begin_layout Plain Layout
24218 \begin_layout Description
24219 \begin_inset Flex Code
24222 \begin_layout Plain Layout
24231 \begin_layout Description
24232 \begin_inset Flex Code
24235 \begin_layout Plain Layout
24244 \begin_layout Description
24245 \begin_inset Flex Code
24248 \begin_layout Plain Layout
24257 \begin_layout Description
24258 \begin_inset Flex Code
24261 \begin_layout Plain Layout
24267 The rotation option.
24270 \begin_layout Standard
24271 You may ask why there are so many path macros.
24272 There are mainly two reasons:
24275 \begin_layout Enumerate
24276 Relative and absolute file names should remain relative or absolute, respectivel
24278 Users may have reasons to prefer either form.
24279 Relative names are useful for portable documents that should work on different
24280 machines, for example.
24281 Absolute names may be required by some programs.
24284 \begin_layout Enumerate
24286 treats relative file names differently than \SpecialChar LyX
24287 and other programs in nested
24289 For \SpecialChar LyX
24290 , a relative file name is always relative to the document that contains
24292 For \SpecialChar LaTeX
24293 , it is always relative to the master document.
24294 These two definitions are identical if you have only one document, but
24295 differ if you have a master document that includes part documents.
24296 That means that relative filenames must be transformed when presented to
24299 Fortunately \SpecialChar LyX
24300 does this automatically for you if you choose the right macros.
24303 \begin_layout Standard
24304 So which path macro should be used in new template definitions? The rule
24308 \begin_layout Itemize
24310 \begin_inset Flex Code
24313 \begin_layout Plain Layout
24319 if an absolute path is required.
24322 \begin_layout Itemize
24324 \begin_inset Flex Code
24327 \begin_layout Plain Layout
24328 $$AbsOrRelPathMaster
24333 if the substituted string is some kind of \SpecialChar LaTeX
24337 \begin_layout Itemize
24339 \begin_inset Flex Code
24342 \begin_layout Plain Layout
24343 $$AbsOrRelPathParent
24348 in order to preserve the user's choice.
24351 \begin_layout Standard
24352 There are special cases where this rule does not work and e.
24353 \begin_inset space \thinspace{}
24357 \begin_inset space \space{}
24360 relative names are needed, but normally it will work just fine.
24361 One example for such a case is the command
24362 \begin_inset Flex Code
24365 \begin_layout Plain Layout
24366 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24371 in the XFig template above: We can't use the absolute name because the
24373 \begin_inset Flex Code
24376 \begin_layout Plain Layout
24382 files needs the relative name in order to rewrite the file content.
24385 \begin_layout Section
24386 Security discussion
24387 \begin_inset CommandInset label
24389 name "sec:Security-discussion"
24396 \begin_layout Standard
24397 The external material feature interfaces with a lot of external programs
24398 and does so automatically, so we have to consider the security implications
24400 In particular, since you have the option of including your own filenames
24401 and/or parameter strings and those are expanded into a command, it seems
24402 that it would be possible to create a malicious document which executes
24403 arbitrary commands when a user views or prints the document.
24404 This is something we definitely want to avoid.
24407 \begin_layout Standard
24408 However, since the external program commands are specified in the template
24409 configuration file only, there are no security issues if \SpecialChar LyX
24410 is properly configure
24411 d with safe templates only.
24412 This is so because the external programs are invoked with the
24413 \begin_inset Flex Code
24416 \begin_layout Plain Layout
24422 -system call rather than the
24423 \begin_inset Flex Code
24426 \begin_layout Plain Layout
24432 system-call, so it's not possible to execute arbitrary commands from the
24433 filename or parameter section via the shell.
24436 \begin_layout Standard
24437 This also implies that you are restricted in what command strings you can
24438 use in the external material templates.
24439 In particular, pipes and redirection are not readily available.
24440 This has to be so if \SpecialChar LyX
24441 should remain safe.
24442 If you want to use some of the shell features, you should write a safe
24443 script to do this in a controlled manner, and then invoke the script from
24444 the command string.
24448 \begin_layout Standard
24449 It is possible to design a template that interacts directly with the shell,
24450 but since this would allow a malicious user to execute arbitrary commands
24451 by writing clever filenames and/or parameters, we generally recommend that
24452 you only use safe scripts that work with the
24453 \begin_inset Flex Code
24456 \begin_layout Plain Layout
24462 system call in a controlled manner.
24463 Of course, for use in a controlled environment, it can be tempting to just
24464 fall back to use ordinary shell scripts.
24465 If you do so, be aware that you
24469 provide an easily exploitable security hole in your system.
24470 Of course it stands to reason that such unsafe templates will never be
24471 included in the standard \SpecialChar LyX
24472 distribution, although we do encourage people
24473 to submit new templates in the open source tradition.
24474 But \SpecialChar LyX
24475 as shipped from the official distribution channels will never have
24479 \begin_layout Standard
24480 Including external material provides a lot of power, and you have to be
24481 careful not to introduce security hazards with this power.
24482 A subtle error in a single line in an innocent looking script can open
24483 the door to huge security problems.
24484 So if you do not fully understand the issues, we recommend that you consult
24485 a knowledgeable security professional or the \SpecialChar LyX
24486 development team if you have
24487 any questions about whether a given template is safe or not.
24488 And do this before you use it in an uncontrolled environment.
24491 \begin_layout Chapter
24493 List of supported \SpecialChar LyX
24494 functions to be used in layouts
24495 \begin_inset CommandInset label
24497 name "chap:List-of-functions"
24504 \begin_layout Standard
24506 \begin_inset Tabular
24507 <lyxtabular version="3" rows="11" columns="8">
24508 <features tabularvalignment="middle">
24509 <column alignment="left" valignment="top">
24510 <column alignment="left" valignment="top">
24511 <column alignment="left" valignment="top">
24512 <column alignment="left" valignment="top">
24513 <column alignment="left" valignment="top">
24514 <column alignment="left" valignment="top">
24515 <column alignment="left" valignment="top">
24516 <column alignment="left" valignment="top">
24518 <cell alignment="left" valignment="top" usebox="none">
24521 \begin_layout Plain Layout
24527 <cell alignment="left" valignment="top" usebox="none">
24530 \begin_layout Plain Layout
24536 <cell alignment="left" valignment="top" usebox="none">
24539 \begin_layout Plain Layout
24545 <cell alignment="left" valignment="top" usebox="none">
24548 \begin_layout Plain Layout
24554 <cell alignment="center" valignment="top" usebox="none">
24557 \begin_layout Plain Layout
24563 <cell alignment="center" valignment="top" usebox="none">
24566 \begin_layout Plain Layout
24572 <cell alignment="center" valignment="top" usebox="none">
24575 \begin_layout Plain Layout
24581 <cell alignment="center" valignment="top" usebox="none">
24584 \begin_layout Plain Layout
24592 <cell alignment="left" valignment="top" usebox="none">
24595 \begin_layout Plain Layout
24601 <cell alignment="left" valignment="top" usebox="none">
24604 \begin_layout Plain Layout
24610 <cell alignment="left" valignment="top" usebox="none">
24613 \begin_layout Plain Layout
24619 <cell alignment="left" valignment="top" usebox="none">
24622 \begin_layout Plain Layout
24628 <cell alignment="center" valignment="top" usebox="none">
24631 \begin_layout Plain Layout
24637 <cell alignment="center" valignment="top" usebox="none">
24640 \begin_layout Plain Layout
24646 <cell alignment="center" valignment="top" usebox="none">
24649 \begin_layout Plain Layout
24655 <cell alignment="center" valignment="top" usebox="none">
24658 \begin_layout Plain Layout
24666 <cell alignment="left" valignment="top" usebox="none">
24669 \begin_layout Plain Layout
24675 <cell alignment="left" valignment="top" usebox="none">
24678 \begin_layout Plain Layout
24684 <cell alignment="left" valignment="top" usebox="none">
24687 \begin_layout Plain Layout
24693 <cell alignment="left" valignment="top" usebox="none">
24696 \begin_layout Plain Layout
24702 <cell alignment="center" valignment="top" usebox="none">
24705 \begin_layout Plain Layout
24711 <cell alignment="center" valignment="top" usebox="none">
24714 \begin_layout Plain Layout
24720 <cell alignment="center" valignment="top" usebox="none">
24723 \begin_layout Plain Layout
24729 <cell alignment="center" valignment="top" usebox="none">
24732 \begin_layout Plain Layout
24740 <cell alignment="left" valignment="top" usebox="none">
24743 \begin_layout Plain Layout
24749 <cell alignment="left" valignment="top" usebox="none">
24752 \begin_layout Plain Layout
24758 <cell alignment="left" valignment="top" usebox="none">
24761 \begin_layout Plain Layout
24767 <cell alignment="left" valignment="top" usebox="none">
24770 \begin_layout Plain Layout
24776 <cell alignment="center" valignment="top" usebox="none">
24779 \begin_layout Plain Layout
24785 <cell alignment="center" valignment="top" usebox="none">
24788 \begin_layout Plain Layout
24794 <cell alignment="center" valignment="top" usebox="none">
24797 \begin_layout Plain Layout
24803 <cell alignment="center" valignment="top" usebox="none">
24806 \begin_layout Plain Layout
24814 <cell alignment="left" valignment="top" usebox="none">
24817 \begin_layout Plain Layout
24823 <cell alignment="left" valignment="top" usebox="none">
24826 \begin_layout Plain Layout
24832 <cell alignment="left" valignment="top" usebox="none">
24835 \begin_layout Plain Layout
24841 <cell alignment="left" valignment="top" usebox="none">
24844 \begin_layout Plain Layout
24850 <cell alignment="center" valignment="top" usebox="none">
24853 \begin_layout Plain Layout
24859 <cell alignment="center" valignment="top" usebox="none">
24862 \begin_layout Plain Layout
24868 <cell alignment="center" valignment="top" usebox="none">
24871 \begin_layout Plain Layout
24877 <cell alignment="center" valignment="top" usebox="none">
24880 \begin_layout Plain Layout
24888 <cell alignment="left" valignment="top" usebox="none">
24891 \begin_layout Plain Layout
24897 <cell alignment="left" valignment="top" usebox="none">
24900 \begin_layout Plain Layout
24906 <cell alignment="left" valignment="top" usebox="none">
24909 \begin_layout Plain Layout
24915 <cell alignment="left" valignment="top" usebox="none">
24918 \begin_layout Plain Layout
24924 <cell alignment="center" valignment="top" usebox="none">
24927 \begin_layout Plain Layout
24933 <cell alignment="center" valignment="top" usebox="none">
24936 \begin_layout Plain Layout
24942 <cell alignment="center" valignment="top" usebox="none">
24945 \begin_layout Plain Layout
24951 <cell alignment="center" valignment="top" usebox="none">
24954 \begin_layout Plain Layout
24962 <cell alignment="left" valignment="top" usebox="none">
24965 \begin_layout Plain Layout
24971 <cell alignment="left" valignment="top" usebox="none">
24974 \begin_layout Plain Layout
24980 <cell alignment="left" valignment="top" usebox="none">
24983 \begin_layout Plain Layout
24989 <cell alignment="left" valignment="top" usebox="none">
24992 \begin_layout Plain Layout
24998 <cell alignment="center" valignment="top" usebox="none">
25001 \begin_layout Plain Layout
25007 <cell alignment="center" valignment="top" usebox="none">
25010 \begin_layout Plain Layout
25016 <cell alignment="center" valignment="top" usebox="none">
25019 \begin_layout Plain Layout
25025 <cell alignment="center" valignment="top" usebox="none">
25028 \begin_layout Plain Layout
25036 <cell alignment="left" valignment="top" usebox="none">
25039 \begin_layout Plain Layout
25045 <cell alignment="left" valignment="top" usebox="none">
25048 \begin_layout Plain Layout
25054 <cell alignment="left" valignment="top" usebox="none">
25057 \begin_layout Plain Layout
25063 <cell alignment="left" valignment="top" usebox="none">
25066 \begin_layout Plain Layout
25072 <cell alignment="center" valignment="top" usebox="none">
25075 \begin_layout Plain Layout
25081 <cell alignment="center" valignment="top" usebox="none">
25084 \begin_layout Plain Layout
25090 <cell alignment="center" valignment="top" usebox="none">
25093 \begin_layout Plain Layout
25099 <cell alignment="center" valignment="top" usebox="none">
25102 \begin_layout Plain Layout
25110 <cell alignment="left" valignment="top" usebox="none">
25113 \begin_layout Plain Layout
25119 <cell alignment="left" valignment="top" usebox="none">
25122 \begin_layout Plain Layout
25128 <cell alignment="left" valignment="top" usebox="none">
25131 \begin_layout Plain Layout
25137 <cell alignment="left" valignment="top" usebox="none">
25140 \begin_layout Plain Layout
25146 <cell alignment="center" valignment="top" usebox="none">
25149 \begin_layout Plain Layout
25155 <cell alignment="center" valignment="top" usebox="none">
25158 \begin_layout Plain Layout
25164 <cell alignment="center" valignment="top" usebox="none">
25167 \begin_layout Plain Layout
25173 <cell alignment="center" valignment="top" usebox="none">
25176 \begin_layout Plain Layout
25184 <cell alignment="left" valignment="top" usebox="none">
25187 \begin_layout Plain Layout
25193 <cell alignment="left" valignment="top" usebox="none">
25196 \begin_layout Plain Layout
25202 <cell alignment="left" valignment="top" usebox="none">
25205 \begin_layout Plain Layout
25211 <cell alignment="left" valignment="top" usebox="none">
25214 \begin_layout Plain Layout
25220 <cell alignment="center" valignment="top" usebox="none">
25223 \begin_layout Plain Layout
25229 <cell alignment="center" valignment="top" usebox="none">
25232 \begin_layout Plain Layout
25238 <cell alignment="center" valignment="top" usebox="none">
25241 \begin_layout Plain Layout
25247 <cell alignment="center" valignment="top" usebox="none">
25250 \begin_layout Plain Layout
25258 <cell alignment="center" valignment="top" usebox="none">
25261 \begin_layout Plain Layout
25267 <cell alignment="center" valignment="top" usebox="none">
25270 \begin_layout Plain Layout
25276 <cell alignment="center" valignment="top" usebox="none">
25279 \begin_layout Plain Layout
25285 <cell alignment="center" valignment="top" usebox="none">
25288 \begin_layout Plain Layout
25294 <cell alignment="center" valignment="top" usebox="none">
25297 \begin_layout Plain Layout
25303 <cell alignment="center" valignment="top" usebox="none">
25306 \begin_layout Plain Layout
25312 <cell alignment="center" valignment="top" usebox="none">
25315 \begin_layout Plain Layout
25321 <cell alignment="center" valignment="top" usebox="none">
25324 \begin_layout Plain Layout
25338 \begin_layout Chapter
25339 Names of available colors to be used in layouts
25340 \begin_inset CommandInset label
25342 name "chap:Names-of-colors"
25349 \begin_layout Standard
25350 The colors listed here are the standard colors and the those that you can
25351 adjust in the \SpecialChar LyX
25355 \begin_layout Description
25368 No particular color – clear or default
25371 \begin_layout Description
25375 \begin_layout Description
25379 \begin_layout Description
25383 \begin_layout Description
25387 \begin_layout Description
25391 \begin_layout Description
25395 \begin_layout Description
25399 \begin_layout Description
25403 \begin_layout Description
25404 added_space Added space marker color
25407 \begin_layout Description
25408 addedtext Added text color
25411 \begin_layout Description
25412 appendix Appendix marker color
25415 \begin_layout Description
25416 background Background color
25419 \begin_layout Description
25420 bottomarea Bottom area color
25423 \begin_layout Description
25424 branchlabel Label color for branches
25427 \begin_layout Description
25428 buttonbg Color used for bottom background
25431 \begin_layout Description
25432 buttonhoverbg Color used for button background under focus
25435 \begin_layout Description
25436 buttonframe Color for inset button frames
25439 \begin_layout Description
25440 changebar Changebar color
25443 \begin_layout Description
25444 changedtextauthor1 Changed text color author 1
25447 \begin_layout Description
25448 changedtextauthor2 Changed text color author 2
25451 \begin_layout Description
25452 changedtextauthor3 Changed text color author 3
25455 \begin_layout Description
25456 changedtextauthor4 Changed text color author 4
25459 \begin_layout Description
25460 changedtextauthor5 Changed text color author 5
25463 \begin_layout Description
25464 collapsable_inset_frame Collapsable insets framecolor
25467 \begin_layout Description
25468 collapsable_inset_text Collapsable insets text color
25471 \begin_layout Description
25472 command Text color for command insets
25475 \begin_layout Description
25476 commandbg Background color for command insets
25479 \begin_layout Description
25480 commandframe Frame color for command insets
25483 \begin_layout Description
25484 comment color for comments
25487 \begin_layout Description
25488 commentbg Background color of comments
25491 \begin_layout Description
25492 cursor Cursor color
25495 \begin_layout Description
25496 deletedtext Deleted text color
25499 \begin_layout Description
25500 deletedtextmodifier Deleted text modifying color
25503 \begin_layout Description
25504 depthbar Color for the depth bars in the margin
25507 \begin_layout Description
25508 eolmarker End of line marker color
25511 \begin_layout Description
25512 error Color of the \SpecialChar LaTeX
25516 \begin_layout Description
25517 footlabel Label color for footnotes
25520 \begin_layout Description
25521 graphicsbg Graphics inset background color
25524 \begin_layout Description
25525 greyedout Label color for greyedout insets
25528 \begin_layout Description
25529 greyedoutbg Background color of greyedout inset
25532 \begin_layout Description
25533 greyedouttext Color for greyedout inset text
25536 \begin_layout Description
25537 indexlabel Label color for index insets
25540 \begin_layout Description
25541 ignore The color is ignored
25544 \begin_layout Description
25545 inherit The color is inherited
25548 \begin_layout Description
25549 inlinecompletion Inline completion color
25552 \begin_layout Description
25553 insetbg Inset marker background color
25556 \begin_layout Description
25557 insetframe Inset marker frame color
25560 \begin_layout Description
25561 language Color for marking foreign language words
25564 \begin_layout Description
25565 latex Text color in \SpecialChar LaTeX
25569 \begin_layout Description
25570 listingsbg Background color of listings inset
25573 \begin_layout Description
25574 marginlabel Label color for margin notes
25577 \begin_layout Description
25578 math Math inset text color
25581 \begin_layout Description
25582 mathbg Math inset background color
25585 \begin_layout Description
25586 mathcorners Math inset frame color not under focus
25589 \begin_layout Description
25590 mathframe Math inset frame color under focus
25593 \begin_layout Description
25594 mathline Math line color
25597 \begin_layout Description
25598 mathmacrobg Macro math inset background color
25601 \begin_layout Description
25602 mathmacroblend Macro math blended color
25605 \begin_layout Description
25606 mathmacroframe Macro math frame color
25609 \begin_layout Description
25610 mathmacrohoverbg Macro math inset background color hovered
25613 \begin_layout Description
25614 mathmacrolabel Macro math label color
25617 \begin_layout Description
25618 mathmacronewarg Macro template color for new parameters
25621 \begin_layout Description
25622 mathmacrooldarg Macro template color for old parameters
25625 \begin_layout Description
25626 newpage New page color
25629 \begin_layout Description
25630 nonunique_inlinecompletion Inline completion color for the non-unique part
25633 \begin_layout Description
25634 notebg Background color of notes
25637 \begin_layout Description
25638 notelabel Label color for notes
25641 \begin_layout Description
25642 pagebreak Page break/line break color
25645 \begin_layout Description
25646 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25649 \begin_layout Description
25650 phantomtext Text color for phantom insets
25653 \begin_layout Description
25654 preview The color used for previews
25657 \begin_layout Description
25658 previewframe Preview frame color
25661 \begin_layout Description
25662 regexpframe Color for regexp frame
25665 \begin_layout Description
25666 selection Background color of selected text
25669 \begin_layout Description
25670 selectiontext Foreground color of selected text
25673 \begin_layout Description
25674 shadedbg Background color of shaded box
25677 \begin_layout Description
25678 special Special chars text color
25681 \begin_layout Description
25682 tabularline Table line color
25685 \begin_layout Description
25686 tabularonoffline Table line color
25689 \begin_layout Description
25690 urllabel Label color for URL insets
25693 \begin_layout Description
25694 urltext Color for URL inset text