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 \usepackage{ifpdf} % part of the hyperref bundle
18 \ifpdf % if pdflatex is used
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC is numbered roman
27 % and a pdf-bookmark for the TOC is added
28 \let\myTOC\tableofcontents
29 \renewcommand\tableofcontents{%
31 \pdfbookmark[1]{\contentsname}{}
35 % increase link area for cross-references and autoname them,
36 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
37 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
38 \@ifpackageloaded{babel}{
39 \addto\extrasenglish{%
40 \renewcommand*{\equationautorefname}[1]{}%
41 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
42 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
43 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
47 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
48 \use_default_options false
52 \maintain_unincluded_children false
55 InsetLayout Flex:MenuItem
64 \newcommand*{\menuitem}[1]{{\sffamily #1}}
68 # In case we need to do with sans...
69 #InsetLayout CharStyle:Code
74 #\renewcommand{\code}[1]{{\sffamily #1}}
79 \language_package default
82 \font_roman "default" "default"
83 \font_sans "default" "default"
84 \font_typewriter "default" "default"
85 \font_math "auto" "auto"
86 \font_default_family default
87 \use_non_tex_fonts false
90 \font_sf_scale 100 100
91 \font_tt_scale 100 100
93 \default_output_format default
95 \bibtex_command default
96 \index_command default
100 \pdf_title "LyX Configuration Manual"
101 \pdf_author "LyX Team"
102 \pdf_subject "LyX-documentation Customization"
103 \pdf_keywords "LyX, documentation, customization"
105 \pdf_bookmarksnumbered true
106 \pdf_bookmarksopen true
107 \pdf_bookmarksopenlevel 1
108 \pdf_breaklinks false
112 \pdf_pdfusetitle false
113 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
116 \use_package amsmath 0
117 \use_package amssymb 0
118 \use_package cancel 0
120 \use_package mathdots 1
121 \use_package mathtools 0
122 \use_package mhchem 0
123 \use_package stackrel 0
124 \use_package stmaryrd 0
125 \use_package undertilde 0
127 \cite_engine_type default
131 \paperorientation portrait
146 \paragraph_separation indent
147 \paragraph_indentation default
148 \quotes_language english
151 \paperpagestyle headings
152 \tracking_changes false
153 \output_changes false
162 Customizing \SpecialChar LyX
163 : Features for the Advanced User
167 by the \SpecialChar LyX
172 \begin_layout Plain Layout
174 If you have comments or error corrections, please send them to the \SpecialChar LyX
177 \begin_inset CommandInset href
179 target "lyx-docs@lists.lyx.org"
186 \begin_inset Quotes eld
190 \begin_inset Quotes erd
193 in the subject header, and please cc the current maintainer of this file,
194 Richard Heck <rgheck@comcast.net>.
200 \begin_inset Newline newline
204 \begin_inset Newline newline
210 \begin_layout Standard
211 \begin_inset CommandInset toc
212 LatexCommand tableofcontents
219 \begin_layout Standard
220 \begin_inset Note Note
223 \begin_layout Plain Layout
224 Please use change tracking when modifying this document.
225 This makes it easier for our translators to recognize things that have
226 been changed, and it helps the maintainer keep up-to-date with what's been
235 \begin_layout Chapter
239 \begin_layout Standard
240 This manual covers the customization features present in \SpecialChar LyX
242 In it, we discuss issues like keyboard shortcuts, screen previewing options,
243 printer options, sending commands to \SpecialChar LyX
244 via the \SpecialChar LyX
245 Server, internationalization,
246 installing new \SpecialChar LaTeX
247 classes and \SpecialChar LyX
249 We can't possibly hope to touch on everything you can change—our developers
250 add new features faster than we can document them—but we will explain the
251 most common customizations and hopefully point you in the right direction
252 for some of the more obscure ones.
255 \begin_layout Standard
256 \begin_inset Branch OutDated
259 \begin_layout Standard
260 Information from previous versions of this document that now seems to be
261 outdated is contained in the OutDated branch of this document.
262 By default, this information will not appear in the \SpecialChar LaTeX
271 \begin_layout Chapter
276 \begin_layout Standard
277 This chapter aims to help you to find your way through the \SpecialChar LyX
280 Before continuing to read this chapter, you should find out where your
282 library and user directories are by using
283 \begin_inset Flex MenuItem
286 \begin_layout Plain Layout
287 Help\SpecialChar menuseparator
298 The library directory is the place where \SpecialChar LyX
299 places its system-wide configuration
300 files; the user directory is where you can place your modified versions.
301 We will call the former
302 \begin_inset Flex Code
305 \begin_layout Plain Layout
312 \begin_inset Flex MenuItem
315 \begin_layout Plain Layout
321 in the remainder of this document.
325 \begin_layout Section
327 \begin_inset Flex Code
330 \begin_layout Plain Layout
339 \begin_layout Standard
340 \begin_inset Flex Code
343 \begin_layout Plain Layout
349 and its sub-directories contain a number of files and that can be used
350 to customize \SpecialChar LyX
352 You can change many of these files from within \SpecialChar LyX
354 \begin_inset Flex MenuItem
357 \begin_layout Plain Layout
358 Tools\SpecialChar menuseparator
365 Most customization that you will want to do in \SpecialChar LyX
366 is possible through this
368 However, many other inner aspects of \SpecialChar LyX
369 can be customized by modifying the
371 \begin_inset Flex Code
374 \begin_layout Plain Layout
381 These files fall in different categories, described in the following subsection
385 \begin_layout Subsection
386 Automatically generated files
389 \begin_layout Standard
390 The files, which are to be found in
391 \begin_inset Flex MenuItem
394 \begin_layout Plain Layout
400 , are generated when you configure \SpecialChar LyX
402 They contain various default values that are guessed by inspection.
403 In general, it is not a good idea to modify them, since they might be overwritt
407 \begin_layout Labeling
408 \labelwidthstring 00.00.0000
409 \begin_inset Flex Code
412 \begin_layout Plain Layout
418 contains defaults for various commands.
421 \begin_layout Labeling
422 \labelwidthstring 00.00.0000
423 \begin_inset Flex Code
426 \begin_layout Plain Layout
432 contains the list of packages that have been recognized by \SpecialChar LyX
434 It is currently unused by the \SpecialChar LyX
435 program itself, but the information extracted,
436 and more, is made available with
437 \begin_inset Flex MenuItem
440 \begin_layout Plain Layout
441 Help\SpecialChar menuseparator
455 \begin_layout Labeling
456 \labelwidthstring 00.00.0000
457 \begin_inset Flex Code
460 \begin_layout Plain Layout
466 the list of text classes that have been found in your
467 \begin_inset Flex Code
470 \begin_layout Plain Layout
476 directories, along with the associated \SpecialChar LaTeX
477 document class and their description.
480 \begin_layout Labeling
481 \labelwidthstring 00.00.0000
482 \begin_inset Flex Code
485 \begin_layout Plain Layout
491 the list of layout modules found in your
492 \begin_inset Flex Code
495 \begin_layout Plain Layout
504 \begin_layout Labeling
505 \labelwidthstring 00.00.0000
506 \begin_inset Flex Code
509 \begin_layout Plain Layout
515 lists of various sorts of \SpecialChar LaTeX
516 -related files found on your system
519 \begin_layout Labeling
520 \labelwidthstring 00.00.0000
521 \begin_inset Flex Code
524 \begin_layout Plain Layout
525 doc/\SpecialChar LaTeX
531 is automatically generated during configuration from the file
532 \begin_inset Flex Code
535 \begin_layout Plain Layout
543 It contains information on your \SpecialChar LaTeX
547 \begin_layout Subsection
551 \begin_layout Standard
552 These directories are duplicated between
553 \begin_inset Flex Code
556 \begin_layout Plain Layout
563 \begin_inset Flex Code
566 \begin_layout Plain Layout
573 If a particular files exists in both places, the one in
574 \begin_inset Flex Code
577 \begin_layout Plain Layout
586 \begin_layout Labeling
587 \labelwidthstring 00.00.0000
588 \begin_inset Flex Code
591 \begin_layout Plain Layout
597 this directory contains files with the extension
598 \begin_inset Flex Code
601 \begin_layout Plain Layout
607 that define the keybindings used in \SpecialChar LyX
609 If there exists an internationalized version of the bind file named
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 , that will be used first.
622 \begin_layout Labeling
623 \labelwidthstring 00.00.0000
624 \begin_inset Flex Code
627 \begin_layout Plain Layout
633 contains graphics files that can be included in documents.
637 \begin_layout Labeling
638 \labelwidthstring 00.00.0000
639 \begin_inset Flex Code
642 \begin_layout Plain Layout
648 contains \SpecialChar LyX
649 documentation files (including the one you are currently reading).
651 \begin_inset Flex Code
654 \begin_layout Plain Layout
661 deserves special attention, as noted above.
662 The internationalized help docs are in subdirectories
663 \begin_inset Flex Code
666 \begin_layout Plain Layout
673 \begin_inset Quotes eld
677 \begin_inset Quotes erd
680 is the ISO language code.
682 \begin_inset CommandInset ref
684 reference "cha:Internationalizing-LyX"
691 \begin_layout Labeling
692 \labelwidthstring 00.00.0000
693 \begin_inset Flex Code
696 \begin_layout Plain Layout
702 contains example files that explain how to use some features.
703 In the file browser, press the
704 \begin_inset Flex MenuItem
707 \begin_layout Plain Layout
716 \begin_layout Labeling
717 \labelwidthstring 00.00.0000
718 \begin_inset Flex Code
721 \begin_layout Plain Layout
727 contains image files that are used by the
728 \begin_inset Flex MenuItem
731 \begin_layout Plain Layout
738 In addition, it also contains the individual icons used in the toolbar
739 and the banners that can be shown when \SpecialChar LyX
743 \begin_layout Labeling
744 \labelwidthstring 00.00.0000
745 \begin_inset Flex Code
748 \begin_layout Plain Layout
754 contains keyboard keymapping files.
756 \begin_inset CommandInset ref
758 reference "sec:International-Keymap-Stuff"
765 \begin_layout Labeling
766 \labelwidthstring 00.00.0000
767 \begin_inset Flex Code
770 \begin_layout Plain Layout
776 contains the text class and module files described in
777 \begin_inset CommandInset ref
779 reference "cha:Installing-New-Document"
786 \begin_layout Labeling
787 \labelwidthstring 00.00.0000
788 \begin_inset Flex Code
791 \begin_layout Plain Layout
798 \begin_inset Flex Code
801 \begin_layout Plain Layout
807 Python scripts used to convert between \SpecialChar LyX
809 These can be run from the command line if, say, you want to batch-convert
813 \begin_layout Labeling
814 \labelwidthstring 00.00.0000
815 \begin_inset Flex Code
818 \begin_layout Plain Layout
824 contains some files that demonstrate the capabilities of the
825 \begin_inset Flex MenuItem
828 \begin_layout Plain Layout
839 Also contains some scripts used by \SpecialChar LyX
843 \begin_layout Labeling
844 \labelwidthstring 00.00.0000
845 \begin_inset Flex Code
848 \begin_layout Plain Layout
854 contains the standard \SpecialChar LyX
855 template files described in
856 \begin_inset CommandInset ref
858 reference "subsec:Creating-Templates"
865 \begin_layout Labeling
866 \labelwidthstring 00.00.0000
867 \begin_inset Flex Code
870 \begin_layout Plain Layout
876 contains files with the extension
877 \begin_inset Flex Code
880 \begin_layout Plain Layout
886 that define the user interface to \SpecialChar LyX
888 That is, the files define which items appear in which menus and the items
889 appearing on the toolbar.
892 \begin_layout Subsection
893 Files you don't want to modify
896 \begin_layout Standard
897 These files are used internally by \SpecialChar LyX
898 and you generally do not need to modify
899 them unless you are a developer.
902 \begin_layout Labeling
903 \labelwidthstring 00.00.0000
904 \begin_inset Flex Code
907 \begin_layout Plain Layout
913 this file contains the list of \SpecialChar LyX
915 The contents are displayed with the menu entry
916 \begin_inset Flex MenuItem
919 \begin_layout Plain Layout
920 Help\SpecialChar menuseparator
933 \begin_layout Labeling
934 \labelwidthstring 00.00.0000
935 \begin_inset Flex Code
938 \begin_layout Plain Layout
944 this is a \SpecialChar LaTeX
945 script used during the configuration process.
949 \begin_layout Labeling
950 \labelwidthstring 00.00.0000
951 \begin_inset Flex Code
954 \begin_layout Plain Layout
960 this is a Python script that is used to re-configure \SpecialChar LyX
962 It creates configuration files in the directory it was run from.
965 \begin_layout Subsection
966 Other files needing a line or two
969 \begin_layout Labeling
970 \labelwidthstring 00.00.0000
971 \begin_inset Flex Code
974 \begin_layout Plain Layout
980 this contains tables describing how different character encodings can be
984 \begin_layout Labeling
985 \labelwidthstring 00.00.0000
986 \begin_inset Flex Code
989 \begin_layout Plain Layout
995 this file contains the templates available to the new
996 \begin_inset Flex MenuItem
999 \begin_layout Plain Layout
1001 \begin_inset space ~
1010 \begin_inset CommandInset ref
1012 reference "chap:Including-External-Material"
1019 \begin_layout Labeling
1020 \labelwidthstring 00.00.0000
1021 \begin_inset Flex Code
1024 \begin_layout Plain Layout
1030 this file contains a list of all the languages currently supported by \SpecialChar LyX
1034 \begin_layout Labeling
1035 \labelwidthstring 00.00.0000
1036 \begin_inset Flex Code
1039 \begin_layout Plain Layout
1045 contains information about the supported fonts.
1048 \begin_layout Labeling
1049 \labelwidthstring 00.00.0000
1050 \begin_inset Flex Code
1053 \begin_layout Plain Layout
1059 this file contains translations for internationalized paragraph styles
1061 \begin_inset CommandInset ref
1063 reference "subsec:I18n"
1070 \begin_layout Labeling
1071 \labelwidthstring 00.00.0000
1072 \begin_inset Flex Code
1075 \begin_layout Plain Layout
1081 this file contains information about unicode-encoded glyphs and the way
1082 they are supported by \SpecialChar LyX
1083 via \SpecialChar LaTeX
1087 \begin_layout Section
1088 Your local configuration directory
1091 \begin_layout Standard
1092 Even if you are using \SpecialChar LyX
1093 as an unprivileged user, you might want to change
1095 configuration for your own use.
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1106 directory contains all your personal configuration files.
1107 This is the directory described as
1108 \begin_inset Quotes eld
1112 \begin_inset Quotes erd
1116 \begin_inset Flex MenuItem
1119 \begin_layout Plain Layout
1120 Help\SpecialChar menuseparator
1122 \begin_inset space ~
1131 This directory is used as a mirror of
1132 \begin_inset Flex Code
1135 \begin_layout Plain Layout
1141 , which means that every file in
1142 \begin_inset Flex Code
1145 \begin_layout Plain Layout
1151 is a replacement for the corresponding file in
1152 \begin_inset Flex Code
1155 \begin_layout Plain Layout
1162 Any configuration file described in the above sections can be placed either
1163 in the system-wide directory, in which case it will affect all users, or
1164 in your local directory for your own use.
1167 \begin_layout Standard
1168 To make things clearer, let's provide a few examples:
1171 \begin_layout Itemize
1172 The preferences set in the
1173 \begin_inset Flex MenuItem
1176 \begin_layout Plain Layout
1177 Tools\SpecialChar menuseparator
1183 dialog are saved to a file
1184 \begin_inset Flex Code
1187 \begin_layout Plain Layout
1194 \begin_inset Flex Code
1197 \begin_layout Plain Layout
1206 \begin_layout Itemize
1207 When you reconfigure using
1208 \begin_inset Flex MenuItem
1211 \begin_layout Plain Layout
1212 Tools\SpecialChar menuseparator
1220 \begin_inset Flex Code
1223 \begin_layout Plain Layout
1229 script, and the resulting files are written in your local configuration
1231 This means that any additional text class file that you might have added
1233 \begin_inset Flex Code
1236 \begin_layout Plain Layout
1242 will be added to the list of classes in the
1243 \begin_inset Flex MenuItem
1246 \begin_layout Plain Layout
1247 Document\SpecialChar menuseparator
1256 \begin_layout Itemize
1257 If you get some updated documentation from \SpecialChar LyX
1258 ftp site and cannot install
1259 it because you do not have sysadmin rights on your system, you can just
1261 \begin_inset Flex Code
1264 \begin_layout Plain Layout
1270 and the items in the
1271 \begin_inset Flex MenuItem
1274 \begin_layout Plain Layout
1280 menu will open them!
1283 \begin_layout Section
1284 Running \SpecialChar LyX
1285 with multiple configurations
1288 \begin_layout Standard
1289 The configuration freedom of the local configuration directory may not suffice
1290 if you want to have more than one configuration at your disposal.
1291 For example, you may want to be use different key bindings or printer settings
1293 You can achieve this by having several such directories.
1294 You then specify which directory to use at run-time.
1297 \begin_layout Standard
1298 Invoking \SpecialChar LyX
1299 with the command line switch
1300 \begin_inset Flex Code
1303 \begin_layout Plain Layout
1313 instructs the program to read the configuration from that directory, and
1314 not from the default directory.
1315 (You can determine the default directory by running \SpecialChar LyX
1317 \begin_inset Flex Code
1320 \begin_layout Plain Layout
1326 switch.) If the specified directory does not exist, \SpecialChar LyX
1328 for you, just like it does for the default directory on the first time
1329 you run the program.
1330 You can modify the configuration options in this additional user directory
1331 exactly as you would for the default directory.
1332 These directories are completely independent (but read on).
1333 Note that setting the environment variable
1334 \begin_inset Flex Code
1337 \begin_layout Plain Layout
1343 to some value has exactly the same effect.
1346 \begin_layout Standard
1347 Having several configurations also requires more maintenance: if you want
1348 to add a new layout to
1349 \begin_inset Flex Code
1352 \begin_layout Plain Layout
1358 which you want available from all your configurations, you must add it
1359 to each directory separately.
1360 You can avoid this with the following trick: after \SpecialChar LyX
1361 creates the additional
1362 directory, most of the subdirectories (see above) are empty.
1363 If you want the new configuration to mirror an existing one, replace the
1364 empty subdirectory with a symbolic link to the matching subdirectory in
1365 the existing configuration.
1367 \begin_inset Flex Code
1370 \begin_layout Plain Layout
1376 subdirectory, however, since it contains a file written by the configuration
1377 script (also accessible through
1378 \begin_inset Flex MenuItem
1381 \begin_layout Plain Layout
1382 Tools\SpecialChar menuseparator
1388 ) which is configuration-specific.
1391 \begin_layout Chapter
1392 The Preferences dialog
1395 \begin_layout Standard
1396 All options of the preferences dialog are described in the Appendix
1398 The Preferences Dialog
1405 For some options you might find here more details.
1408 \begin_layout Section
1410 \begin_inset CommandInset label
1419 \begin_layout Standard
1420 The first step is to define your file formats if they are not already defined.
1422 \begin_inset Flex MenuItem
1425 \begin_layout Plain Layout
1426 Tools\SpecialChar menuseparator
1434 \begin_inset Flex MenuItem
1437 \begin_layout Plain Layout
1438 File Handling\SpecialChar menuseparator
1445 \begin_inset Flex MenuItem
1448 \begin_layout Plain Layout
1454 button to define your new format.
1456 \begin_inset Flex MenuItem
1459 \begin_layout Plain Layout
1465 field contains the name used to identify the format in the GUI.
1467 \begin_inset Flex MenuItem
1470 \begin_layout Plain Layout
1476 is used to identify the format internally.
1477 You will also need to enter a file extension.
1478 These are all required.
1480 \begin_inset Flex MenuItem
1483 \begin_layout Plain Layout
1489 field is used to provide a keyboard shortcut on the menus.
1490 (For example, pressing
1491 \begin_inset Flex MenuItem
1494 \begin_layout Plain Layout
1501 \begin_inset Flex MenuItem
1504 \begin_layout Plain Layout
1505 Document\SpecialChar menuseparator
1506 View (Other Formats)\SpecialChar menuseparator
1515 \begin_layout Standard
1517 \begin_inset Flex MenuItem
1520 \begin_layout Plain Layout
1527 \begin_inset Flex MenuItem
1530 \begin_layout Plain Layout
1537 For example, you might want to use
1538 \begin_inset Flex MenuItem
1541 \begin_layout Plain Layout
1547 to view PostScript files.
1548 You can enter the command needed to start the program in the corresponding
1550 In defining this command, you can use the four variables listed in the
1552 The viewer is launched when you view an image in \SpecialChar LyX
1554 \begin_inset Flex MenuItem
1557 \begin_layout Plain Layout
1558 Document\SpecialChar menuseparator
1565 The editor is for example launched when you right-click on an image and
1567 \begin_inset Flex MenuItem
1570 \begin_layout Plain Layout
1576 in the appearing context menu.
1579 \begin_layout Standard
1581 \begin_inset Flex MenuItem
1584 \begin_layout Plain Layout
1590 type of a format is optional, but if it is specified, it must be unique
1592 It is used to detect files of this format from the file contents.
1593 For some important file formats there is no MIME type officially registered
1595 \begin_inset CommandInset href
1598 target "http://www.iana.org/assignments/media-types/"
1603 Therefore \SpecialChar LyX
1604 uses the extended list of MIME types as specified by
1605 \begin_inset CommandInset href
1607 name "freedesktop.org"
1608 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1615 \begin_layout Standard
1617 \begin_inset Flex MenuItem
1620 \begin_layout Plain Layout
1626 option tells \SpecialChar LyX
1627 that a format is suitable for document export.
1628 If this is set and if a suitable conversion route exists (see
1629 \begin_inset CommandInset ref
1631 reference "sec:Converters"
1635 ), the format will appear in the
1636 \begin_inset Flex MenuItem
1639 \begin_layout Plain Layout
1640 File\SpecialChar menuseparator
1647 The format will also appear in the
1648 \begin_inset Flex MenuItem
1651 \begin_layout Plain Layout
1652 Document\SpecialChar menuseparator
1658 menu if a viewer is specified for the format.
1659 Pure image formats, such as
1660 \begin_inset Flex Code
1663 \begin_layout Plain Layout
1669 , should not use this option.
1670 Formats that can both represent vector graphics and documents like
1671 \begin_inset Flex Code
1674 \begin_layout Plain Layout
1683 \begin_layout Standard
1685 \begin_inset Flex MenuItem
1688 \begin_layout Plain Layout
1689 Vector graphics format
1694 tells \SpecialChar LyX
1695 that a format can contain vector graphics.
1696 This information is used to determine the target format of included graphics
1698 \begin_inset Flex MenuItem
1701 \begin_layout Plain Layout
1708 Included graphics may need to be converted to either
1709 \begin_inset Flex MenuItem
1712 \begin_layout Plain Layout
1719 \begin_inset Flex MenuItem
1722 \begin_layout Plain Layout
1729 \begin_inset Flex MenuItem
1732 \begin_layout Plain Layout
1739 \begin_inset Flex MenuItem
1742 \begin_layout Plain Layout
1748 cannot handle other image formats.
1749 If an included graphic is not already in
1750 \begin_inset Flex MenuItem
1753 \begin_layout Plain Layout
1760 \begin_inset Flex MenuItem
1763 \begin_layout Plain Layout
1770 \begin_inset Flex MenuItem
1773 \begin_layout Plain Layout
1779 format, it is converted to
1780 \begin_inset Flex MenuItem
1783 \begin_layout Plain Layout
1789 if the vector format option is set, and otherwise to
1790 \begin_inset Flex MenuItem
1793 \begin_layout Plain Layout
1802 \begin_layout Section
1806 \begin_layout Standard
1807 Since all conversions from one format to another take place in \SpecialChar LyX
1809 directory, it is sometimes necessary to modify a file before copying it
1810 to the temporary directory in order that the conversion may be performed.
1814 \begin_layout Plain Layout
1815 For example, the file may refer to other files—images, for example—using
1816 relative file names, and these may become invalid when the file is copied
1817 to the temporary directory.
1822 This is done by a Copier: It copies a file to (or from) the temporary directory
1823 and may modify it in the process.
1826 \begin_layout Standard
1827 The definitions of the copiers may use four variables:
1830 \begin_layout Labeling
1831 \labelwidthstring 00.00.0000
1832 \begin_inset Flex Code
1835 \begin_layout Plain Layout
1841 The \SpecialChar LyX
1842 system directory (e.
1843 \begin_inset space \thinspace{}
1847 \begin_inset space \space{}
1851 \begin_inset Flex MenuItem
1854 \begin_layout Plain Layout
1863 \begin_layout Labeling
1864 \labelwidthstring 00.00.0000
1865 \begin_inset Flex Code
1868 \begin_layout Plain Layout
1877 \begin_layout Labeling
1878 \labelwidthstring 00.00.0000
1879 \begin_inset Flex Code
1882 \begin_layout Plain Layout
1891 \begin_layout Labeling
1892 \labelwidthstring 00.00.0000
1893 \begin_inset Flex Code
1896 \begin_layout Plain Layout
1902 The base name (without filename extension) in the \SpecialChar LyX
1906 \begin_layout Labeling
1907 \labelwidthstring 00.00.0000
1908 \begin_inset Flex Code
1911 \begin_layout Plain Layout
1917 The full 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 full pathname to the original \SpecialChar LyX
1933 file being processed
1936 \begin_layout Labeling
1937 \labelwidthstring 00.00.0000
1938 \begin_inset Flex Code
1941 \begin_layout Plain Layout
1947 The filename (without any directory path) of the \SpecialChar LyX
1951 \begin_layout Labeling
1952 \labelwidthstring 00.00.0000
1953 \begin_inset Flex Code
1956 \begin_layout Plain Layout
1962 The `\SpecialChar LaTeX
1966 \begin_layout Standard
1967 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1975 It is relevant only when exporting files suitable for such inclusion.
1978 \begin_layout Standard
1979 Copiers can be used to do almost anything with output files.
1980 For example, suppose you want generated pdf files to be copied to a special
1982 \begin_inset Flex Code
1985 \begin_layout Plain Layout
1992 Then you could write a shell script such as this one:
1995 \begin_layout Standard
1996 \begin_inset listings
2000 \begin_layout Plain Layout
2005 \begin_layout Plain Layout
2010 \begin_layout Plain Layout
2012 TOFILE=`basename $2`
2015 \begin_layout Plain Layout
2017 cp $FROMFILE /home/you/pdf/$TOFILE
2022 Save it in your local \SpecialChar LyX
2024 \begin_inset Flex Code
2027 \begin_layout Plain Layout
2028 /home/you/.lyx/scripts/pdfcopier.sh
2033 —and make it executable, if you need to do so on your platform.
2035 \begin_inset Flex MenuItem
2038 \begin_layout Plain Layout
2039 Tools\SpecialChar menuseparator
2045 dialog, select under
2046 \begin_inset Flex MenuItem
2049 \begin_layout Plain Layout
2050 File Handling\SpecialChar menuseparator
2057 \begin_inset Flex MenuItem
2060 \begin_layout Plain Layout
2066 format—or one of the other pdf formats—and enter
2067 \begin_inset Flex Code
2070 \begin_layout Plain Layout
2071 pdfcopier.sh $$i $$o
2077 \begin_inset Flex MenuItem
2080 \begin_layout Plain Layout
2090 \begin_layout Standard
2091 Copiers are used by \SpecialChar LyX
2092 in various of its own conversions.
2093 For example, if appropriate programs are found, \SpecialChar LyX
2094 will automatically install
2096 \begin_inset Flex MenuItem
2099 \begin_layout Plain Layout
2106 \begin_inset Flex MenuItem
2109 \begin_layout Plain Layout
2111 \begin_inset space ~
2120 When these formats are exported, the copier sees that not just the main
2121 HTML file but various associated files (style files, images, etc.) are also
2123 All these files are written to a subdirectory of the directory in which
2124 the original \SpecialChar LyX
2129 \begin_layout Plain Layout
2130 This copier can be customized.
2132 \begin_inset Quotes eld
2136 \begin_inset Quotes erd
2139 argument takes a comma-separated list of extensions to be copied; if it
2140 is omitted, all files will be copied.
2142 \begin_inset Quotes eld
2146 \begin_inset Quotes erd
2149 argument determines the extension added to the generated directory.
2151 \begin_inset Quotes eld
2155 \begin_inset Flex MenuItem
2158 \begin_layout Plain Layout
2165 \begin_inset Quotes erd
2168 , so HTML generated from
2169 \begin_inset Flex MenuItem
2172 \begin_layout Plain Layout
2173 /path/to/filename.lyx
2179 \begin_inset Flex MenuItem
2182 \begin_layout Plain Layout
2183 /path/to/filename.html.LyXconv
2197 \begin_layout Section
2199 \begin_inset CommandInset label
2201 name "sec:Converters"
2208 \begin_layout Standard
2209 You can define your own Converters to convert files between different formats.
2211 \begin_inset Flex MenuItem
2214 \begin_layout Plain Layout
2215 Tools\SpecialChar menuseparator
2216 Preferences\SpecialChar menuseparator
2217 File Handling\SpecialChar menuseparator
2226 \begin_layout Standard
2227 To define a new converter, select the
2228 \begin_inset Flex MenuItem
2231 \begin_layout Plain Layout
2233 \begin_inset space ~
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2247 \begin_inset space ~
2255 from the drop-down lists, enter the command needed for the conversion,
2257 \begin_inset Flex MenuItem
2260 \begin_layout Plain Layout
2267 Several variables can be used in the definition of converters:
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex Code
2275 \begin_layout Plain Layout
2281 The \SpecialChar LyX
2285 \begin_layout Labeling
2286 \labelwidthstring 00.00.0000
2287 \begin_inset Flex Code
2290 \begin_layout Plain Layout
2299 \begin_layout Labeling
2300 \labelwidthstring 00.00.0000
2301 \begin_inset Flex Code
2304 \begin_layout Plain Layout
2313 \begin_layout Labeling
2314 \labelwidthstring 00.00.0000
2315 \begin_inset Flex Code
2318 \begin_layout Plain Layout
2324 The base filename of the input file (i.
2325 \begin_inset space \thinspace{}
2328 g., without the extension)
2331 \begin_layout Labeling
2332 \labelwidthstring 00.00.0000
2333 \begin_inset Flex Code
2336 \begin_layout Plain Layout
2342 The path to the input file
2345 \begin_layout Labeling
2346 \labelwidthstring 00.00.0000
2347 \begin_inset Flex Code
2350 \begin_layout Plain Layout
2356 The path to the original input file (this is different from $$p when a
2357 chain of converters is called)
2360 \begin_layout Labeling
2361 \labelwidthstring 00.00.0000
2362 \begin_inset Flex Code
2365 \begin_layout Plain Layout
2371 The iconv name for the encoding of the document.
2374 \begin_layout Standard
2376 \begin_inset Flex MenuItem
2379 \begin_layout Plain Layout
2381 \begin_inset space ~
2389 field you can enter the following flags, separated by commas:
2392 \begin_layout Labeling
2393 \labelwidthstring 00.00.0000
2394 \begin_inset Flex Code
2397 \begin_layout Plain Layout
2403 This converter runs some form of \SpecialChar LaTeX
2405 This will make \SpecialChar LyX
2406 's \SpecialChar LaTeX
2407 error logs available.
2410 \begin_layout Labeling
2411 \labelwidthstring 00.00.0000
2412 \begin_inset Flex Code
2415 \begin_layout Plain Layout
2421 Needs the \SpecialChar LaTeX
2423 \begin_inset Flex MenuItem
2426 \begin_layout Plain Layout
2432 file for the conversion.
2435 \begin_layout Labeling
2436 \labelwidthstring 00.00.0000
2437 \begin_inset Flex Code
2440 \begin_layout Plain Layout
2447 \begin_inset Quotes eld
2451 \begin_inset Quotes erd
2454 file from the backend, which in practice means a \SpecialChar LaTeX
2455 file like the one we
2456 would export, without
2457 \begin_inset Flex Code
2460 \begin_layout Plain Layout
2469 \begin_layout Labeling
2470 \labelwidthstring 00.00.0000
2471 \begin_inset Flex Code
2474 \begin_layout Plain Layout
2483 \begin_layout Standard
2484 The following three flags are not really flags at all because they take
2486 \begin_inset Flex MenuItem
2489 \begin_layout Plain Layout
2491 \begin_inset space ~
2495 \begin_inset space ~
2506 \begin_layout Labeling
2507 \labelwidthstring 00.00.0000
2508 \begin_inset Flex Code
2511 \begin_layout Plain Layout
2517 If set, the converter's standard error will be redirected to a file
2518 \begin_inset Flex Code
2521 \begin_layout Plain Layout
2527 , and the script given as argument will be run as:
2528 \begin_inset Flex Code
2531 \begin_layout Plain Layout
2532 script < infile.out > infile.log
2538 The argument may contain
2539 \begin_inset Flex Code
2542 \begin_layout Plain Layout
2551 \begin_layout Labeling
2552 \labelwidthstring 00.00.0000
2553 \begin_inset Flex Code
2556 \begin_layout Plain Layout
2562 The name of the directory in which the converter will dump the generated
2565 will not create this directory, and it does not copy anything into it,
2566 though it will copy this directory to the destination.
2567 The argument may contain
2568 \begin_inset Flex Code
2571 \begin_layout Plain Layout
2577 , which will be replaced by the base name of the input and output files,
2578 respectively, when the directory is copied.
2579 \begin_inset Newline newline
2582 Note that resultdir and usetempdir make no sense together.
2583 The latter will be ignored if the former is given.
2586 \begin_layout Labeling
2587 \labelwidthstring 00.00.0000
2588 \begin_inset Flex Code
2591 \begin_layout Plain Layout
2597 Determines the output file name and may, contain
2598 \begin_inset Flex Code
2601 \begin_layout Plain Layout
2608 Sensible only with resultdir and optional even then; if not given, it defaults
2612 \begin_layout Standard
2613 None of these last three are presently used in any of the converters that
2614 are installed with \SpecialChar LyX
2619 \begin_layout Standard
2620 You do not have to define converters for all formats between which you want
2622 For example, you will note that there is no `\SpecialChar LyX
2623 to PostScript' converter,
2624 but \SpecialChar LyX
2625 will export PostScript.
2626 It does so by first creating a \SpecialChar LaTeX
2627 file (no converter needs to be defined
2628 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2630 and finally converting the resulting DVI file to PostScript.
2632 finds such `chains' of converters automatically, and it will always choose
2633 the shortest possible chain.
2634 You can, though, still define multiple conversion methods between file
2636 For example, the standard \SpecialChar LyX
2637 configuration provides five ways to convert
2642 \begin_layout Enumerate
2644 \begin_inset Flex MenuItem
2647 \begin_layout Plain Layout
2656 \begin_layout Enumerate
2657 via (DVI and) PostScript, using
2658 \begin_inset Flex MenuItem
2661 \begin_layout Plain Layout
2670 \begin_layout Enumerate
2672 \begin_inset Flex MenuItem
2675 \begin_layout Plain Layout
2684 \begin_layout Enumerate
2686 \begin_inset Flex MenuItem
2689 \begin_layout Plain Layout
2699 \begin_layout Enumerate
2701 \begin_inset Flex MenuItem
2704 \begin_layout Plain Layout
2714 \begin_layout Standard
2715 To define such alternate chains, you must define multiple target `file formats',
2717 \begin_inset CommandInset ref
2719 reference "sec:Formats"
2724 For example, in the standard configuration, the formats named
2725 \begin_inset Flex MenuItem
2728 \begin_layout Plain Layout
2735 \begin_inset Flex MenuItem
2738 \begin_layout Plain Layout
2745 \begin_inset Flex MenuItem
2748 \begin_layout Plain Layout
2755 \begin_inset Flex MenuItem
2758 \begin_layout Plain Layout
2765 \begin_inset Flex MenuItem
2768 \begin_layout Plain Layout
2775 \begin_inset Flex MenuItem
2778 \begin_layout Plain Layout
2785 \begin_inset Flex MenuItem
2788 \begin_layout Plain Layout
2795 \begin_inset Flex MenuItem
2798 \begin_layout Plain Layout
2806 \begin_inset Flex MenuItem
2809 \begin_layout Plain Layout
2816 \begin_inset Flex MenuItem
2819 \begin_layout Plain Layout
2826 ) are defined, all of which share the extension
2827 \begin_inset Flex MenuItem
2830 \begin_layout Plain Layout
2836 , and which correspond to the conversion methods just mentioned.
2839 \begin_layout Chapter
2840 Internationalizing \SpecialChar LyX
2842 \begin_inset CommandInset label
2844 name "cha:Internationalizing-LyX"
2851 \begin_layout Standard
2853 supports using a translated interface.
2854 Last time we checked, \SpecialChar LyX
2855 provided text in thirty languages.
2856 The language of choice is called your
2861 (For further reading on locale settings, see also the documentation for
2862 locale that comes with your operating system.
2863 For Linux, the manual page for
2864 \begin_inset Flex Code
2867 \begin_layout Plain Layout
2873 could be a good place to start).
2876 \begin_layout Standard
2877 Notice that these translations will work, but do contain a few flaws.
2878 In particular, all dialogs have been designed with the English text in
2879 mind, which means that some of the translated text will be too large to
2880 fit within the space allocated.
2881 This is only a display problem and will not cause any harm.
2882 Also, you will find that some of the translations do not define shortcut
2883 keys for everything.
2884 Sometimes, there are simply not enough free letters to do it.
2885 Other times, the translator just hasn't got around to doing it yet.
2886 Our localization team, which you may wish to join,
2890 \begin_layout Plain Layout
2891 If you are a fluent speaker of a language other than English, joining these
2892 teams is a great way to give back to the \SpecialChar LyX
2898 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2902 \begin_layout Section
2903 Translating \SpecialChar LyX
2907 \begin_layout Subsection
2908 Translating the graphical user interface (text messages).
2911 \begin_layout Standard
2914 \begin_inset Flex Code
2917 \begin_layout Plain Layout
2923 library to handle the internationalization of the interface.
2924 To have \SpecialChar LyX
2925 speak your favorite language in all menus and dialogs, you need
2927 \begin_inset Flex Code
2930 \begin_layout Plain Layout
2936 -file for that language.
2937 When this is available, you'll have to generate a
2938 \begin_inset Flex Code
2941 \begin_layout Plain Layout
2947 -file from it and install the
2948 \begin_inset Flex Code
2951 \begin_layout Plain Layout
2958 The process of doing all of this is explained in the documentation for
2960 \begin_inset Flex Code
2963 \begin_layout Plain Layout
2970 It is possible to do this just for yourself, but if you're going to do
2971 it, you might as well share the results of your labors with the rest of
2972 the \SpecialChar LyX
2974 Send a message to the \SpecialChar LyX
2975 developers' list for more information about how
2979 \begin_layout Standard
2980 In short, this is what you should do (xx denotes the language code):
2983 \begin_layout Itemize
2984 Check out the \SpecialChar LyX
2987 \begin_inset CommandInset href
2989 name "information on the web"
2990 target "http://www.lyx.org/HowToUseSVN"
2997 \begin_layout Itemize
2999 \begin_inset Flex Code
3002 \begin_layout Plain Layout
3008 to the folder of the
3009 \begin_inset Flex Code
3012 \begin_layout Plain Layout
3020 \begin_inset Flex Code
3023 \begin_layout Plain Layout
3031 \begin_inset Flex Code
3034 \begin_layout Plain Layout
3040 doesn't exist anywhere, it can be remade with the console command
3041 \begin_inset Flex Code
3044 \begin_layout Plain Layout
3050 in that directory, or you can use an existing po-file for some other language
3054 \begin_layout Itemize
3056 \begin_inset Flex Code
3059 \begin_layout Plain Layout
3069 \begin_layout Plain Layout
3070 This is just a text file, so it can be edited in any text editor.
3071 But there are also specialized programs that support such editing, such
3076 (for all platforms) or
3085 contains a `mode' for editing
3086 \begin_inset Flex Code
3089 \begin_layout Plain Layout
3100 For some menu- and widget-labels, there are also shortcut keys that should
3102 Those keys are marked after a `|', and should be translated according to
3103 the words and phrases of the language.
3104 You should also fill also out the information at the beginning of the new
3106 \begin_inset Flex Code
3109 \begin_layout Plain Layout
3115 -file with your email-address, etc., so people know where to reach you with
3116 suggestions and entertaining flames.
3119 \begin_layout Standard
3120 If you are just doing this on your own, then:
3123 \begin_layout Itemize
3125 \begin_inset Flex Code
3128 \begin_layout Plain Layout
3135 This can be done with
3136 \begin_inset Flex Code
3139 \begin_layout Plain Layout
3140 msgfmt -o xx.mo < xx.po
3148 \begin_layout Itemize
3150 \begin_inset Flex Code
3153 \begin_layout Plain Layout
3159 -file to your locale-tree, at the correct directory for application messages
3164 xx, and under the name
3165 \begin_inset Flex Code
3168 \begin_layout Plain Layout
3175 \begin_inset space \thinspace{}
3179 \begin_inset space \space{}
3183 \begin_inset Flex Code
3186 \begin_layout Plain Layout
3187 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3197 \begin_layout Standard
3198 As said, however, it would be best if the new
3199 \begin_inset Flex Code
3202 \begin_layout Plain Layout
3208 file could be added to the \SpecialChar LyX
3209 distribution, so others can use it.
3210 Adding it involves making additional changes to \SpecialChar LyX
3212 So send an email to the developers' mailing list if you're interested in
3216 \begin_layout Subsubsection
3220 \begin_layout Standard
3221 Sometimes it turns out that one English message needs to be translated into
3222 different messages in the target language.
3223 One example is the message
3224 \begin_inset Flex Code
3227 \begin_layout Plain Layout
3233 which has the German translation
3241 , depending upon exactly what the English
3242 \begin_inset Quotes eld
3246 \begin_inset Quotes erd
3251 \begin_inset Flex Code
3254 \begin_layout Plain Layout
3260 does not handle such ambiguous translations.
3261 Therefore you have to add some context information to the message: Instead
3263 \begin_inset Flex Code
3266 \begin_layout Plain Layout
3273 \begin_inset Flex Code
3276 \begin_layout Plain Layout
3277 To[[as in 'From format x to format y']]
3283 \begin_inset Flex Code
3286 \begin_layout Plain Layout
3287 To[[as in 'From page x to page y']].
3292 Now the two occurrences of
3293 \begin_inset Flex Code
3296 \begin_layout Plain Layout
3303 \begin_inset Flex Code
3306 \begin_layout Plain Layout
3312 and can be translated correctly to
3323 \begin_layout Standard
3324 Of course the context information needs to be stripped off the original
3325 message when no translation is used.
3326 Therefore you have to put it in double square brackets at the end of the
3327 message (see the example above).
3328 The translation mechanism of \SpecialChar LyX
3329 ensures that everything in double square
3330 brackets at the end of messages is removed before displaying the message.
3333 \begin_layout Subsection
3334 Translating the documentation.
3337 \begin_layout Standard
3338 The online documentation (in the
3339 \begin_inset Flex MenuItem
3342 \begin_layout Plain Layout
3348 -menu) can (and should!) be translated.
3349 If there are translated versions of the documentation available
3353 \begin_layout Plain Layout
3354 As of March 2008, at least some of the documents have been translated into
3355 fourteen languages, with the Tutorial available in a few more.
3360 and the locale is set accordingly, these will be used automagically by
3364 looks for translated versions as
3365 \begin_inset Flex Code
3368 \begin_layout Plain Layout
3369 LyXDir/doc/xx/DocName.lyx
3375 \begin_inset Flex Code
3378 \begin_layout Plain Layout
3384 is the code for the language currently in use.
3385 If there are no translated documents, the default English versions will
3387 Note that the translated versions must have the same filenames (
3388 \begin_inset Flex Code
3391 \begin_layout Plain Layout
3397 above) as the original.
3398 If you feel up to translating the documentation (an excellent way to proof-read
3399 the original documentation by the way!), there are a few things you should
3403 \begin_layout Itemize
3404 Check out the documentation translation web page at
3405 \begin_inset CommandInset href
3407 name "http://www.lyx.org/Translation"
3408 target "http://www.lyx.org/Translation"
3413 That way, you can find out which (if any) documents have already been translate
3414 d into your language.
3415 You can also find out who (if anyone) is organizing the effort to translate
3416 the documentation into your language.
3417 If no one is organizing the effort, please let us know that you're interested.
3420 \begin_layout Standard
3421 Once you get to actually translating, here's a few hints for you that may
3425 \begin_layout Itemize
3426 Join the documentation team! There is information on how to do that in
3427 \begin_inset Flex Code
3430 \begin_layout Plain Layout
3437 \begin_inset Flex MenuItem
3440 \begin_layout Plain Layout
3441 Help\SpecialChar menuseparator
3447 ), which by the way is the first document you should translate.
3450 \begin_layout Itemize
3451 Learn the typographic conventions for the language you are translating to.
3452 Typography is an ancient art and over the centuries, a great variety of
3453 conventions have developed throughout different parts of the world.
3454 Also study the professional terminology amongst typographers in your country.
3455 Inventing your own terminology will only confuse the users.
3458 (Warning! Typography is addictive!)
3461 \begin_layout Itemize
3462 Make a copy of the document.
3463 This will be your working copy.
3464 You can use this as your personal translated help-file by placing it in
3466 \begin_inset Flex Code
3469 \begin_layout Plain Layout
3478 \begin_layout Itemize
3479 Sometimes the original document (from the \SpecialChar LyX
3480 team) will be updated.
3481 Use the source viewer at
3482 \begin_inset CommandInset href
3484 name "http://www.lyx.org/trac/timeline"
3485 target "http://www.lyx.org/trac/timeline"
3489 to see what has been changed.
3490 That way you can easily see which parts of the translated document need
3494 \begin_layout Standard
3495 If you ever find an error in the original document, fix it and notify the
3496 rest of the documentation team of the changes! (You didn't forget to join
3497 the documentation team, did you?)
3500 \begin_layout Standard
3501 \begin_inset Branch OutDated
3504 \begin_layout Section
3505 International Keyboard Support
3508 \begin_layout Standard
3511 [Editor's Note: The following section is by
3519 It needs to be fixed to conform to the new Documentation Style sheet and
3520 to make use of the new v1.0 features.
3521 The whole thing also needs to be merged with the section following it.-jw
3522 It may also be badly out of date.-rh (2008)]
3525 \begin_layout Subsection
3526 Defining Own Keymaps: Keymap File Format
3529 \begin_layout Standard
3530 Let's look at a keyboard definition file a little closer.
3531 It is a plain text file defining
3534 \begin_layout Itemize
3535 key-to-key or key-to-string translations
3538 \begin_layout Itemize
3542 \begin_layout Itemize
3543 dead keys exceptions
3546 \begin_layout Standard
3547 To define key-to-key or key-to-string translation, use this command:
3550 \begin_layout Quotation
3551 \begin_inset Flex Code
3554 \begin_layout Plain Layout
3563 \begin_inset Flex Code
3566 \begin_layout Plain Layout
3575 \begin_layout Standard
3577 \begin_inset Flex Code
3580 \begin_layout Plain Layout
3586 is the key to be translated and
3587 \begin_inset Flex Code
3590 \begin_layout Plain Layout
3596 is the string to be inserted into the document.
3597 To define dead keys, use:
3600 \begin_layout Quotation
3601 \begin_inset Flex Code
3604 \begin_layout Plain Layout
3613 \begin_inset Flex Code
3616 \begin_layout Plain Layout
3625 \begin_layout Standard
3627 \begin_inset Flex Code
3630 \begin_layout Plain Layout
3636 is a keyboard key and
3637 \begin_inset Flex Code
3640 \begin_layout Plain Layout
3647 The following dead keys are supported (shortcut name is in parentheses):
3650 \begin_layout Quotation
3654 \begin_inset space \hfill{}
3660 \begin_layout Quotation
3662 \begin_inset space \hfill{}
3668 \begin_layout Quotation
3670 \begin_inset space \hfill{}
3676 \begin_layout Quotation
3678 \begin_inset space \hfill{}
3684 \begin_layout Quotation
3686 \begin_inset space \hfill{}
3692 \begin_layout Quotation
3694 \begin_inset space \hfill{}
3701 \begin_layout Plain Layout
3713 \begin_layout Quotation
3715 \begin_inset space \hfill{}
3721 \begin_layout Quotation
3723 \begin_inset space \hfill{}
3730 \begin_layout Plain Layout
3742 \begin_layout Quotation
3744 \begin_inset space \hfill{}
3750 \begin_layout Quotation
3752 \begin_inset space \hfill{}
3758 \begin_layout Quotation
3760 \begin_inset space \hfill{}
3767 \begin_layout Plain Layout
3779 \begin_layout Quotation
3781 \begin_inset space \hfill{}
3788 \begin_layout Plain Layout
3800 \begin_layout Quotation
3802 \begin_inset space \hfill{}
3808 \begin_layout Quotation
3809 hungarian umlaut (hug)
3810 \begin_inset space \hfill{}
3816 \begin_layout Quotation
3818 \begin_inset space \hfill{}
3824 \begin_layout Quotation
3826 \begin_inset space \hfill{}
3833 \begin_layout Plain Layout
3845 \begin_layout Standard
3846 Since in many international keyboards there are exceptions to what some
3847 dead keys should do, you can define them using
3850 \begin_layout Quotation
3851 \begin_inset Flex Code
3854 \begin_layout Plain Layout
3862 deadkey key outstring
3865 \begin_layout Standard
3866 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3870 \begin_layout Quotation
3871 \begin_inset Flex Code
3874 \begin_layout Plain Layout
3887 \begin_layout Standard
3888 to make it work correctly.
3889 Also, you have to define as exceptions dead keys over i and j, to remove
3890 the dot from them before inserting an accent mark.
3891 I will change this when the time comes, but so far I haven't had time.
3894 \begin_layout Standard
3895 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3898 \begin_inset Flex Code
3901 \begin_layout Plain Layout
3907 have different meaning.
3909 \begin_inset Flex Code
3912 \begin_layout Plain Layout
3918 marks comments, quotes start and end \SpecialChar LaTeX
3920 To enter quote, you'll need to use
3921 \begin_inset Flex Code
3924 \begin_layout Plain Layout
3933 \begin_inset Flex Code
3936 \begin_layout Plain Layout
3943 \begin_inset Flex Code
3946 \begin_layout Plain Layout
3957 \begin_layout Standard
3958 If you make a keyboard description file that works for your language, please
3959 mail it to me, so I can include it in the next keymap distribution.
3962 \begin_layout Standard
3963 More keywords will be supported in keymap configuration file in future,
3967 \begin_layout Itemize
3968 \begin_inset Flex Code
3971 \begin_layout Plain Layout
3982 \begin_inset space \hfill{}
3986 \begin_inset Flex Code
3989 \begin_layout Plain Layout
3998 \begin_layout Itemize
3999 \begin_inset Flex Code
4002 \begin_layout Plain Layout
4013 \begin_inset space \hfill{}
4017 \begin_inset Flex Code
4020 \begin_layout Plain Layout
4026 an external keymap translation program
4029 \begin_layout Standard
4030 Also, it should look into
4031 \begin_inset Flex Code
4034 \begin_layout Plain Layout
4040 file for defaults, too (for example, a
4041 \begin_inset Flex Code
4044 \begin_layout Plain Layout
4052 option to include default keyboard).
4060 \begin_layout Section
4061 International Keymap Stuff
4062 \begin_inset CommandInset label
4064 name "sec:International-Keymap-Stuff"
4071 \begin_layout Standard
4072 \begin_inset Note Note
4075 \begin_layout Plain Layout
4076 In doing the revisions on this document in March 2008, I did not look over
4077 this stuff, as I do not understand it.
4078 It would be good if someone else could do so.
4087 \begin_layout Standard
4088 The next two sections describe the
4089 \begin_inset Flex Code
4092 \begin_layout Plain Layout
4101 \begin_inset Flex Code
4104 \begin_layout Plain Layout
4112 file syntax in detail.
4113 These sections should help you design your own key map if the ones provided
4114 do not meet your needs.
4117 \begin_layout Subsection
4121 \begin_layout Standard
4125 \begin_inset Flex Code
4128 \begin_layout Plain Layout
4134 file maps keystrokes to characters or strings.
4135 As the name suggests, it sets a keyboard mapping.
4137 \begin_inset Flex Code
4140 \begin_layout Plain Layout
4151 \begin_inset Flex Code
4154 \begin_layout Plain Layout
4169 \begin_inset Flex Code
4172 \begin_layout Plain Layout
4185 \begin_inset Flex Code
4188 \begin_layout Plain Layout
4197 \begin_inset Flex Code
4200 \begin_layout Plain Layout
4208 are described in this section.
4211 \begin_layout Labeling
4212 \labelwidthstring 00.00.0000
4213 \begin_inset Flex Code
4216 \begin_layout Plain Layout
4224 Map a character to a string
4227 \begin_layout LyX-Code
4242 \begin_layout Standard
4275 the double-quote (")
4292 must be escaped with a preceding backslash (
4303 \begin_layout Standard
4305 \begin_inset Flex MenuItem
4308 \begin_layout Plain Layout
4316 statement to cause the symbol
4317 \begin_inset Flex MenuItem
4320 \begin_layout Plain Layout
4328 to be output for the keystroke
4329 \begin_inset Flex MenuItem
4332 \begin_layout Plain Layout
4343 \begin_layout LyX-Code
4349 \begin_layout Labeling
4350 \labelwidthstring 00.00.0000
4351 \begin_inset Flex Code
4354 \begin_layout Plain Layout
4362 Specify an accent character
4365 \begin_layout LyX-Code
4374 \begin_layout Standard
4375 This will make the cha
4413 This is the dead key
4417 \begin_layout Plain Layout
4424 refers to a key that does not produce a character by itself, but when followed
4425 with another key, produces the desired accent character.
4426 For example, a German characte
4428 r with an umlaut like
4438 can be produced in this manner.
4447 \begin_layout Standard
4460 and then another key not in
4477 followed by the other, not allowed key, as output.
4481 \begin_inset Flex MenuItem
4484 \begin_layout Plain Layout
4492 cancels a dead key, so if
4503 \begin_inset Flex MenuItem
4506 \begin_layout Plain Layout
4515 , the cursor will not go one position backwards but will instead cancel
4531 might have had on the next keystroke.
4535 \begin_layout Standard
4536 The following example specifies that the character ' is to be an acute accent,
4537 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4540 \begin_layout LyX-Code
4543 kmod ' acute aeiouAEIOU
4546 \begin_layout Labeling
4547 \labelwidthstring 00.00.0000
4548 \begin_inset Flex Code
4551 \begin_layout Plain Layout
4557 Specify an exception to the accent character
4560 \begin_layout LyX-Code
4569 \begin_layout Standard
4570 This defines an exce
4611 have been assigned a keystroke with a previous
4614 \begin_inset Flex Code
4617 \begin_layout Plain Layout
4641 must not belong in the
4688 If such a declaration does not exist in
4696 \begin_inset Flex Code
4699 \begin_layout Plain Layout
4733 \begin_inset Flex Code
4736 \begin_layout Plain Layout
4750 \begin_layout Standard
4751 The following command produces causes äi to be produced when you enter acute-i
4755 \begin_layout LyX-Code
4769 \begin_layout Labeling
4770 \labelwidthstring 00.00.0000
4771 \begin_inset Flex Code
4774 \begin_layout Plain Layout
4780 Combine two accent characters
4783 \begin_layout LyX-Code
4789 accent1 accent2 allowed
4792 \begin_layout Standard
4793 This one is getting pretty esoteric.
4794 It allows you to combine the effect
4850 \begin_inset Flex Code
4853 \begin_layout Plain Layout
4881 \begin_layout Standard
4882 Consider this example from the
4883 \begin_inset Flex Code
4886 \begin_layout Plain Layout
4897 \begin_layout LyX-Code
4900 kmod ; acute aeioyvhAEIOYVH
4904 kcomb acute umlaut iyIY
4907 \begin_layout Standard
4908 This allows you to press
4909 \begin_inset Flex MenuItem
4912 \begin_layout Plain Layout
4920 and get the effect of
4921 \begin_inset Flex Code
4924 \begin_layout Plain Layout
4943 in this case cancels the last dead key, so if you press
4944 \begin_inset Flex MenuItem
4947 \begin_layout Plain Layout
4956 \begin_inset Flex Code
4959 \begin_layout Plain Layout
4972 \begin_layout Subsection
4976 \begin_layout Standard
4978 \begin_inset Flex Code
4981 \begin_layout Plain Layout
4989 mapping is performed, a
4990 \begin_inset Flex Code
4993 \begin_layout Plain Layout
5003 file maps the strings that the symbols generate to characters in the current
5005 The \SpecialChar LyX
5006 distribution currently includes at least the
5007 \begin_inset Flex Code
5010 \begin_layout Plain Layout
5019 \begin_inset Flex Code
5022 \begin_layout Plain Layout
5033 \begin_layout Standard
5035 \begin_inset Flex Code
5038 \begin_layout Plain Layout
5046 file is a sequence of declarations of the form
5049 \begin_layout LyX-Code
5062 \begin_layout Standard
5063 For example, in order to map
5064 \begin_inset Flex MenuItem
5067 \begin_layout Plain Layout
5077 to the corresponding character in the iso-8859-1 set (233), the following
5081 \begin_layout LyX-Code
5089 \begin_layout Standard
5091 \begin_inset Flex Code
5094 \begin_layout Plain Layout
5103 \begin_inset Flex Code
5106 \begin_layout Plain Layout
5124 the same character can apply to more than one string.
5126 \begin_inset Flex Code
5129 \begin_layout Plain Layout
5140 \begin_layout LyX-Code
5152 \begin_inset Newline newline
5168 \begin_layout Standard
5170 cannot find a mapping for the string produced by the keystroke or a
5171 deadkey sequence, it will check if it looks like an accented char and try
5172 to draw an accent over the character on screen.
5175 \begin_layout Subsection
5179 \begin_layout Standard
5180 There is a second way to add support for international characters through
5181 so-called dead-keys.
5182 A dead-key works in combination with a letter to produce an accented character.
5183 Here, we'll explain how to create a really simple dead-key to illustrate
5187 \begin_layout Standard
5188 Suppose you happen to need the circumflex character,
5189 \begin_inset Quotes eld
5193 \begin_inset Quotes erd
5198 \begin_inset Flex MenuItem
5201 \begin_layout Plain Layout
5208 \begin_inset space ~
5212 \begin_inset Flex MenuItem
5215 \begin_layout Plain Layout
5221 ] to the \SpecialChar LyX
5223 \begin_inset Flex Code
5226 \begin_layout Plain Layout
5233 \begin_inset Flex Code
5236 \begin_layout Plain Layout
5243 Now, whenever you type the
5244 \begin_inset Flex MenuItem
5247 \begin_layout Plain Layout
5253 -key followed by a letter, that letter will have a circumflex accent on
5255 For example, the sequence
5256 \begin_inset Quotes eld
5260 \begin_inset Flex MenuItem
5263 \begin_layout Plain Layout
5270 \begin_inset Quotes erd
5273 produces the letter:
5274 \begin_inset Quotes eld
5278 \begin_inset Quotes erd
5282 If you tried to type
5283 \begin_inset Quotes eld
5287 \begin_inset Flex MenuItem
5290 \begin_layout Plain Layout
5297 \begin_inset Quotes erd
5300 , however, \SpecialChar LyX
5301 will complain with a beep, since a
5302 \begin_inset Quotes eld
5306 \begin_inset Flex MenuItem
5309 \begin_layout Plain Layout
5316 \begin_inset Quotes erd
5319 never takes a circumflex accent.
5321 \begin_inset Flex MenuItem
5324 \begin_layout Plain Layout
5330 after a dead-key produces the bare-accent.
5331 Please note this last point! If you bind a key to a dead-key, you'll need
5332 to rebind the character on that key to yet another key.
5334 \begin_inset Flex MenuItem
5337 \begin_layout Plain Layout
5343 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5346 \begin_layout Standard
5347 One common way to bind dead-keys is to use
5348 \begin_inset Flex MenuItem
5351 \begin_layout Plain Layout
5358 \begin_inset Flex MenuItem
5361 \begin_layout Plain Layout
5368 \begin_inset Flex MenuItem
5371 \begin_layout Plain Layout
5377 in combination with an accent, like
5378 \begin_inset Quotes eld
5382 \begin_inset Flex MenuItem
5385 \begin_layout Plain Layout
5392 \begin_inset Quotes erd
5396 \begin_inset Quotes eld
5400 \begin_inset Flex MenuItem
5403 \begin_layout Plain Layout
5410 \begin_inset Quotes erd
5414 \begin_inset Quotes eld
5418 \begin_inset Flex MenuItem
5421 \begin_layout Plain Layout
5428 \begin_inset Quotes erd
5432 Another way involves using
5433 \begin_inset Flex Code
5436 \begin_layout Plain Layout
5443 \begin_inset Flex Code
5446 \begin_layout Plain Layout
5452 to set up the special
5453 \begin_inset Flex Code
5456 \begin_layout Plain Layout
5464 \begin_inset Flex Code
5467 \begin_layout Plain Layout
5473 acts in some ways just like
5474 \begin_inset Flex MenuItem
5477 \begin_layout Plain Layout
5483 and permits you to bind keys to accented characters.
5484 You can also turn keys into dead-keys by binding them to something like
5486 \begin_inset Flex Code
5489 \begin_layout Plain Layout
5495 and then binding this symbolic key to the corresponding \SpecialChar LyX
5500 \begin_layout Plain Layout
5505 : This is exactly what I do in my
5506 \begin_inset Flex Code
5509 \begin_layout Plain Layout
5516 \begin_inset Flex Code
5519 \begin_layout Plain Layout
5527 \begin_inset Flex MenuItem
5530 \begin_layout Plain Layout
5532 \begin_inset space ~
5541 \begin_inset Flex Code
5544 \begin_layout Plain Layout
5550 and a bunch of these
5551 \begin_inset Quotes eld
5555 \begin_inset Flex Code
5558 \begin_layout Plain Layout
5565 \begin_inset Quotes erd
5568 symbolic keys bound such things as
5569 \begin_inset Flex MenuItem
5572 \begin_layout Plain Layout
5574 \begin_inset space ~
5583 \begin_inset Flex MenuItem
5586 \begin_layout Plain Layout
5588 \begin_inset space ~
5597 This is how I produce my accented characters.
5602 You can make just about anything into the
5603 \begin_inset Flex Code
5606 \begin_layout Plain Layout
5613 \begin_inset Flex MenuItem
5616 \begin_layout Plain Layout
5622 keys, a spare function key, etc.
5623 As for the \SpecialChar LyX
5624 commands that produce accents, check the entry for
5625 \begin_inset Flex Code
5628 \begin_layout Plain Layout
5639 You'll find the complete list there.
5642 \begin_layout Subsection
5643 Saving your Language Configuration
5646 \begin_layout Standard
5647 You can edit your preferences so that your desired language environment
5648 is automatically configured when \SpecialChar LyX
5650 \begin_inset Flex MenuItem
5653 \begin_layout Plain Layout
5654 Edit\SpecialChar menuseparator
5663 \begin_layout Chapter
5664 Installing New Document Classes, Layouts, and Templates
5665 \begin_inset CommandInset label
5667 name "cha:Installing-New-Document"
5672 \begin_inset Argument 1
5675 \begin_layout Plain Layout
5676 Installing New Document Classes
5684 \begin_layout Standard
5685 In this chapter, we describe the procedures for creating and installing
5686 new \SpecialChar LyX
5687 layout and template files, as well as offer a refresher on correctly
5688 installing new \SpecialChar LaTeX
5693 \begin_layout Standard
5694 First, let us a say a few words about how one ought to think about the relation
5695 between \SpecialChar LyX
5696 and \SpecialChar LaTeX
5698 The thing to understand is that, in a certain sense, \SpecialChar LyX
5699 doesn't know anything
5700 about \SpecialChar LaTeX
5702 Indeed, from \SpecialChar LyX
5703 's point of view, \SpecialChar LaTeX
5704 is just one of several
5705 \begin_inset Quotes eld
5709 \begin_inset Quotes erd
5712 in which it is capable of producing output.
5713 Other such formats are DocBook, plaintext, and XHTML.
5715 is, of course, a particularly important format, but very little of the
5716 information \SpecialChar LyX
5717 has about \SpecialChar LaTeX
5718 is actually contained in the program itself.
5722 \begin_layout Plain Layout
5723 Some commands are sufficiently complex that they are
5724 \begin_inset Quotes eld
5728 \begin_inset Quotes erd
5731 into \SpecialChar LyX
5733 But the developers generally regard this as a Bad Thing.
5738 Rather, that information, even for the standard classes like
5739 \begin_inset Flex Code
5742 \begin_layout Plain Layout
5748 , is contained in `layout files'.
5749 Similarly, \SpecialChar LyX
5750 itself does not know much about DocBook or XHTML.
5751 What it knows is contained in layout files.
5754 \begin_layout Standard
5755 You can think of the layout file for a given document class as a translation
5756 manual between \SpecialChar LyX
5757 constructs—paragraphs with their corresponding styles,
5758 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5761 Almost everything \SpecialChar LyX
5763 \begin_inset Flex Code
5766 \begin_layout Plain Layout
5772 , for example, is contained in the file
5773 \begin_inset Flex Code
5776 \begin_layout Plain Layout
5782 and in various other files it includes.
5783 For this reason, anyone intending to write layout files should plan to
5784 study the existing files.
5785 A good place to start is with
5786 \begin_inset Flex Code
5789 \begin_layout Plain Layout
5795 , which is included in
5796 \begin_inset Flex Code
5799 \begin_layout Plain Layout
5806 \begin_inset Flex Code
5809 \begin_layout Plain Layout
5815 , and many of the other layout files for document classes.
5816 This file is where sections and the like are defined:
5817 \begin_inset Flex Code
5820 \begin_layout Plain Layout
5826 tells \SpecialChar LyX
5827 how paragraphs that are marked with the Section, Subsection, etc,
5828 styles can be translated into corresponding \SpecialChar LaTeX
5829 , DocBook, and XHTML commands
5832 \begin_inset Flex Code
5835 \begin_layout Plain Layout
5841 file basically just includes several of these
5842 \begin_inset Flex Code
5845 \begin_layout Plain Layout
5854 \begin_layout Standard
5855 Defining the \SpecialChar LyX
5857 correspondence is not the only thing layout files do, though.
5858 Their other job is to define how the \SpecialChar LyX
5859 constructs themselves will appear
5861 The fact that layout files have these two jobs is often a source of confusion,
5862 because they are completely separate.
5863 Telling \SpecialChar LyX
5864 how to translate a certain paragraph style into \SpecialChar LaTeX
5867 how to display it; conversely, telling \SpecialChar LyX
5868 how to display a certain paragraph
5869 style does not tell \SpecialChar LyX
5870 how to translate it into \SpecialChar LaTeX
5871 (let alone tell \SpecialChar LaTeX
5874 So, in general, when you define a new \SpecialChar LyX
5875 construct, you must always do two
5876 quite separate things: (i)
5877 \begin_inset space ~
5880 tell \SpecialChar LyX
5881 how to translate it into \SpecialChar LaTeX
5883 \begin_inset space ~
5886 tell \SpecialChar LyX
5890 \begin_layout Standard
5891 Much the same is true, of course, as regards \SpecialChar LyX
5892 's other backend formats, though
5893 XHTML is in some ways different, because in that case \SpecialChar LyX
5898 able, to some extent, to use information about how it should display a
5899 paragraph on the screen to output information (in the form of CSS) about
5900 how the paragraph should be displayed in a browser.
5901 Even in this case, however, the distinction between what \SpecialChar LyX
5903 and how things are rendered externally remains in force, and the two can
5904 be controlled separately.
5906 \begin_inset CommandInset ref
5908 reference "sec:Tags-for-XHTML"
5915 \begin_layout Section
5916 Installing new \SpecialChar LaTeX
5920 \begin_layout Standard
5921 Some installations may not include a \SpecialChar LaTeX
5922 package or class file that you would
5923 like to use within \SpecialChar LyX
5925 For example, you might need Foil\SpecialChar TeX
5926 , a package for preparing slides for overhead
5928 Modern \SpecialChar LaTeX
5929 distributions like \SpecialChar TeX
5930 Live (2008 or newer) or MiK\SpecialChar TeX
5931 provide a user interface
5932 for installing such packages.
5933 For example, with MiK\SpecialChar TeX
5934 , you start the program
5935 \begin_inset Quotes eld
5939 \begin_inset space ~
5943 \begin_inset Quotes erd
5946 to get a list of available packages.
5947 To install one of them, right click on it or use the corresponding toolbar
5951 \begin_layout Standard
5952 If your \SpecialChar LaTeX
5953 distribution does not provide such a `package manager', or if the
5954 package is not available from your distribution, then follow these steps
5955 to install it manually:
5958 \begin_layout Enumerate
5959 Get the package from
5960 \begin_inset CommandInset href
5963 target "http://www.ctan.org/"
5970 \begin_layout Enumerate
5971 If the package contains a file with the ending
5972 \begin_inset Quotes eld
5976 \begin_inset Flex Code
5979 \begin_layout Plain Layout
5986 \begin_inset Quotes erd
5989 (is the case for Foil\SpecialChar TeX
5990 ) then open a console, change to the folder of this
5991 file and execute the command
5992 \begin_inset Flex Code
5995 \begin_layout Plain Layout
6002 You have now unpacked the package and have all files to install it.
6003 Most \SpecialChar LaTeX
6004 -packages are not packed and you can skip this step.
6007 \begin_layout Enumerate
6008 Now you need to decide if the package should be available for all users
6010 \begin_inset Separator parbreak
6017 \begin_layout Enumerate
6018 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
6019 for all users on your system, then install it in your `local' \SpecialChar TeX
6021 install it in your own `user' \SpecialChar TeX
6023 Where these trees should be created, if they do not already exist, depends
6025 To find this out, look in the file
6026 \begin_inset Flex Code
6029 \begin_layout Plain Layout
6039 \begin_layout Plain Layout
6040 This is usually in the directory
6041 \begin_inset Flex Code
6044 \begin_layout Plain Layout
6050 , though you can execute the command
6051 \begin_inset Flex Code
6054 \begin_layout Plain Layout
6065 The location of the `local' \SpecialChar TeX
6066 tree is defined by the
6067 \begin_inset Flex Code
6070 \begin_layout Plain Layout
6076 variable; this is usually somewhere like
6077 \begin_inset Flex Code
6080 \begin_layout Plain Layout
6081 /usr/local/share/texmf
6087 The location of the `user' \SpecialChar TeX
6089 \begin_inset Flex Code
6092 \begin_layout Plain Layout
6099 \begin_inset Flex Code
6102 \begin_layout Plain Layout
6109 (If these variables are not predefined, you have to define them.) You'll
6110 probably need root permissions to create or modify the `local' tree, but
6111 not for your `user' tree.
6112 \begin_inset Newline newline
6115 In general, it is recommended to install in the user tree because your user
6116 will not be modified or even overwritten when you upgrade your system.
6117 It will typically also be backed up together with everything else when
6118 you backup your home directory (which, of course, you do on a regular basis).
6121 \begin_layout Enumerate
6122 On Windows, if you want the new package to be available for all users on
6123 your system, change to the folder where \SpecialChar LaTeX
6124 is installed and then change to
6126 \begin_inset Flex Code
6129 \begin_layout Plain Layout
6140 (For MiK\SpecialChar TeX
6141 , this would be by default the folder
6142 \begin_inset Flex Code
6145 \begin_layout Plain Layout
6163 \begin_layout Plain Layout
6164 Note that this will be the correct path only on English installations.
6165 On a German one, it would be
6166 \begin_inset Flex Code
6169 \begin_layout Plain Layout
6183 , and similarly for other languages.
6188 Create there a new folder
6189 \begin_inset Flex Code
6192 \begin_layout Plain Layout
6198 and copy all files of the package into it.
6200 \begin_inset Newline newline
6203 If the package should only available for you or you don't have admin permissions
6204 , do the same, but in the local \SpecialChar LaTeX
6207 \begin_inset space \thinspace{}
6210 g., for MiK\SpecialChar TeX
6212 \begin_inset space ~
6215 2.8 under Windows XP, this would be the folder:
6216 \begin_inset Newline newline
6222 \begin_inset Flex Code
6225 \begin_layout Plain Layout
6228 Documents and Settings
6240 \begin_inset Newline newline
6246 \begin_inset Phantom HPhantom
6249 \begin_layout Plain Layout
6260 \begin_inset Flex Code
6263 \begin_layout Plain Layout
6276 \begin_inset Newline newline
6279 On Vista, it would be:
6280 \begin_inset Newline newline
6284 \begin_inset Flex Code
6287 \begin_layout Plain Layout
6313 \begin_layout Enumerate
6314 Now one only need to tell \SpecialChar LaTeX
6315 that there are new files.
6316 This depends on the used \SpecialChar LaTeX
6318 \begin_inset Separator parbreak
6325 \begin_layout Enumerate
6326 For \SpecialChar TeX
6327 Live execute the command
6328 \begin_inset Flex Code
6331 \begin_layout Plain Layout
6338 If you installed the package for all users, then you will probably need
6339 to have root permissions for that.
6342 \begin_layout Enumerate
6343 For MiK\SpecialChar TeX
6344 , if you have installed the package for all users, start the program
6346 \begin_inset Quotes eld
6350 \begin_inset space ~
6354 \begin_inset Quotes erd
6357 and press the button marked
6358 \begin_inset Quotes eld
6362 \begin_inset Quotes erd
6366 Otherwise start the program
6367 \begin_inset Quotes eld
6371 \begin_inset Quotes erd
6378 \begin_layout Enumerate
6379 Finally, you need to tell \SpecialChar LyX
6380 that there are new packages available.
6381 So, in \SpecialChar LyX
6383 \begin_inset Flex MenuItem
6386 \begin_layout Plain Layout
6389 \SpecialChar menuseparator
6395 and then restart \SpecialChar LyX
6399 \begin_layout Standard
6400 Now the package is installed.
6401 In our example, the document class
6402 \begin_inset Flex Code
6405 \begin_layout Plain Layout
6407 \begin_inset space ~
6415 will now be available under
6416 \begin_inset Flex MenuItem
6419 \begin_layout Plain Layout
6420 Document\SpecialChar menuseparator
6421 Settings\SpecialChar menuseparator
6431 \begin_layout Standard
6432 If you would like to use a \SpecialChar LaTeX
6433 document class that is not even listed in the
6435 \begin_inset Flex MenuItem
6438 \begin_layout Plain Layout
6439 Document\SpecialChar menuseparator
6440 Settings\SpecialChar menuseparator
6446 , then you need to create a `layout' file for it.
6447 That is the topic of the next section.
6450 \begin_layout Section
6451 Types of layout files
6454 \begin_layout Standard
6455 This section describes the various sorts of \SpecialChar LyX
6456 files that contain layout informati
6458 These files describe various paragraph and character styles, determining
6459 how \SpecialChar LyX
6460 should display them and how they should be translated into \SpecialChar LaTeX
6462 XHTML, or whatever output format is being used.
6466 \begin_layout Standard
6467 We shall try to provide a thorough description of the process of writing
6469 However, there are so many different types of documents supported even
6470 by just \SpecialChar LaTeX
6471 that we can't hope to cover every different possibility or problem
6472 you might encounter.
6473 The \SpecialChar LyX
6474 users' list is frequented by people with lots of experience with layout
6475 design who are willing to share what they've learned, so please feel free
6476 to ask questions there.
6479 \begin_layout Standard
6480 As you prepare to write a new layout, it is extremely helpful to look at
6481 the layouts distributed with \SpecialChar LyX
6483 If you write a \SpecialChar LyX
6484 layout for a \SpecialChar LaTeX
6485 document class that might also be used by
6486 others, or write a module that might be useful to others, then you should
6487 consider posting your layout to the
6488 \begin_inset CommandInset href
6490 name "layout section on the LyX wiki"
6491 target "http://wiki.lyx.org/Layouts/Layouts"
6495 or even to the \SpecialChar LyX
6496 developers' list, so that it might be included in \SpecialChar LyX
6501 \begin_layout Plain Layout
6502 Note that \SpecialChar LyX
6503 is licensed under the General Public License, so any material
6504 that is contributed to \SpecialChar LyX
6505 must be similarly licensed.
6513 \begin_layout Subsection
6515 \begin_inset CommandInset label
6517 name "subsec:Layout-modules"
6524 \begin_layout Standard
6525 We have spoken to this point about `layout files'.
6526 But there are different sorts of files that contain layout information.
6527 Layout files, strictly so called, have the
6528 \begin_inset Flex Code
6531 \begin_layout Plain Layout
6537 extension and provide \SpecialChar LyX
6538 with information about document classes.
6539 Since \SpecialChar LyX
6540 1.6 layout information can also be contained in layout
6545 \begin_inset Flex Code
6548 \begin_layout Plain Layout
6555 Modules are to \SpecialChar LaTeX
6556 packages much as layouts are to \SpecialChar LaTeX
6557 classes, and some modules—such
6559 \begin_inset Flex Code
6562 \begin_layout Plain Layout
6568 module—specifically provide support for one package.
6569 In a sense, layout modules are similar to included
6573 \begin_layout Plain Layout
6574 These can have any extension, but by convention have the
6575 \begin_inset Flex Code
6578 \begin_layout Plain Layout
6590 \begin_inset Flex Code
6593 \begin_layout Plain Layout
6599 —in that modules are not specific to a given document class but may be used
6600 with many different classes.
6601 The difference is that using an included file with
6602 \begin_inset Flex Code
6605 \begin_layout Plain Layout
6611 requires editing that file.
6612 Modules, by contrast, are selected in the
6613 \begin_inset Flex MenuItem
6616 \begin_layout Plain Layout
6617 Document\SpecialChar menuseparator
6626 \begin_layout Standard
6627 Building modules is the easiest way to get started with layout editing,
6628 since it can be as simple as adding a single new paragraph style or flex
6630 But modules may, in principle, contain anything a layout file can contain.
6633 \begin_layout Standard
6634 After creating a new module and copying it to the
6635 \begin_inset Flex Code
6638 \begin_layout Plain Layout
6644 folder, you will need to reconfigure and then restart \SpecialChar LyX
6647 However, changes you make to the module will be seen immediately, if you
6649 \begin_inset Flex MenuItem
6652 \begin_layout Plain Layout
6653 Document\SpecialChar menuseparator
6659 , highlight something, and then hit
6660 \begin_inset Quotes eld
6664 \begin_inset Quotes erd
6670 It is strongly recommended that you save your work before doing this
6675 it is strongly recommended that you not attempt to edit modules while simultaneo
6676 usly working on actual documents
6679 Though of course the developers strive to keep \SpecialChar LyX
6680 stable in such situations,
6681 syntax errors and the like in your module file could cause strange behavior.
6684 \begin_layout Subsubsection
6688 \begin_layout Standard
6689 Modules are to \SpecialChar LyX
6690 as packages are to \SpecialChar LaTeX
6692 Sometimes, however, you find yourself wanting a specific inset or character
6693 style just for one document and writing a module that will also be available
6694 to other documents makes little sense.
6695 What you need is \SpecialChar LyX
6697 \begin_inset Quotes eld
6701 \begin_inset Quotes erd
6707 \begin_layout Standard
6708 You will find it under
6710 Document\SpecialChar menuseparator
6711 Settings\SpecialChar menuseparator
6715 The large text box allows you to enter anything that you might enter in
6716 a layout file or module.
6717 You can think of a document's local layout, in fact, as a module that belongs
6719 So, in particular, you must enter a
6720 \begin_inset Flex Code
6723 \begin_layout Plain Layout
6730 Any format is acceptable, but one would normally use the format current
6732 (In \SpecialChar LyX
6733 2.1, the current layout format is 48.) You should be aware that local
6734 layout is not supported by versions of \SpecialChar LyX
6735 prior to 1.6, so you should not
6736 use it if you want to be able to export your document to \SpecialChar LyX
6738 (without, that is, losing the local layout information).
6739 If you wish to be able to export to 1.6—local layout is supported in 1.6,
6740 though there is no UI for it—then you should use format 11 and, of course,
6741 use only layout constructs that were available in \SpecialChar LyX
6745 \begin_layout Standard
6746 When you have entered something in the
6747 \begin_inset Flex Code
6750 \begin_layout Plain Layout
6756 pane, \SpecialChar LyX
6758 \begin_inset Quotes eld
6762 \begin_inset Quotes erd
6765 button at the bottom.
6766 Clicking this button will cause \SpecialChar LyX
6767 to determine whether what you have entered
6768 is valid layout information for the chosen format.
6770 will report the result but, unfortunately, will not tell you what errors
6771 there might have been.
6772 These will be written to the terminal, however, if \SpecialChar LyX
6773 is started from a terminal.
6774 You will not be permitted to save your local layout until you have entered
6778 \begin_layout Standard
6779 The warnings at the end of the previous section apply here, too.
6780 Do not play with local layout while you are actually working, especially
6781 if you have not saved your document.
6782 That said, using local layout with a test document can be a very convenient
6783 way to try out layout ideas, or even to start developing a module.
6786 \begin_layout Subsection
6788 \begin_inset Flex MenuItem
6791 \begin_layout Plain Layout
6800 \begin_layout Standard
6801 There are two situations you are likely to encounter when wanting to support
6802 a new \SpecialChar LaTeX
6803 document class, involving style (
6804 \begin_inset Flex Code
6807 \begin_layout Plain Layout
6813 ) files and \SpecialChar LaTeX2e
6815 \begin_inset Flex Code
6818 \begin_layout Plain Layout
6825 Supporting a style file is usually fairly easy.
6826 Supporting a new class file is a bit harder.
6827 We'll discuss the former in this section and the latter in the next.
6828 Similar remarks apply, of course, if you want to support a new DocBook
6832 \begin_layout Standard
6833 The easier case is the one in which your new document class is provided
6834 as a style file that is to be used in conjunction with an already supported
6836 For the sake of the example, we'll assume that the style file is called
6838 \begin_inset Flex MenuItem
6841 \begin_layout Plain Layout
6847 and that it is meant to be used with
6848 \begin_inset Flex MenuItem
6851 \begin_layout Plain Layout
6857 , which is a standard class.
6861 \begin_layout Standard
6862 Start by copying the existing class's layout file into your local directory:
6866 \begin_layout Plain Layout
6867 Of course, which directory is your local directory will vary by platform,
6868 and \SpecialChar LyX
6869 allows you to specify your local directory on startup, too, using
6871 \begin_inset Flex Code
6874 \begin_layout Plain Layout
6888 \begin_layout LyX-Code
6889 cp report.layout ~/.lyx/layouts/myclass.layout
6892 \begin_layout Standard
6894 \begin_inset Flex Code
6897 \begin_layout Plain Layout
6903 and change the line:
6906 \begin_layout LyX-Code
6909 Declare\SpecialChar LaTeX
6913 \begin_layout Standard
6917 \begin_layout LyX-Code
6920 Declare\SpecialChar LaTeX
6921 Class[report, myclass.sty]{report (myclass)}
6924 \begin_layout Standard
6928 \begin_layout LyX-Code
6930 \begin_inset Newline newline
6936 \begin_inset Newline newline
6942 \begin_layout Standard
6943 near the top of the file.
6946 \begin_layout Standard
6947 Start \SpecialChar LyX
6949 \begin_inset Flex MenuItem
6952 \begin_layout Plain Layout
6953 Tools\SpecialChar menuseparator
6960 Then restart \SpecialChar LyX
6961 and try creating a new document.
6963 \begin_inset Flex MenuItem
6966 \begin_layout Plain Layout
6972 " as a document class option in the
6973 \begin_inset Flex MenuItem
6976 \begin_layout Plain Layout
6977 Document\SpecialChar menuseparator
6984 It is likely that some of the sectioning commands and such in your new
6985 class will work differently from how they worked in the base class—
6986 \begin_inset Flex Code
6989 \begin_layout Plain Layout
6995 in this example—so you can fiddle around with the settings for the different
6996 sections if you wish.
6997 The layout information for sections is contained in
6998 \begin_inset Flex Code
7001 \begin_layout Plain Layout
7007 , but you do not need to copy and change this file.
7008 Instead, you can simply add your changes to your layout file, after the
7010 \begin_inset Flex Code
7013 \begin_layout Plain Layout
7019 , which itself includes
7020 \begin_inset Flex Code
7023 \begin_layout Plain Layout
7030 For example, you might add these lines:
7033 \begin_layout LyX-Code
7037 \begin_layout LyX-Code
7041 \begin_layout LyX-Code
7045 \begin_layout LyX-Code
7049 \begin_layout LyX-Code
7053 \begin_layout Standard
7054 to change the font for chapter headings to sans-serif.
7055 This will override (or, in this case, add to) the existing declaration
7056 for the Chapter style.
7060 \begin_layout Standard
7061 Your new package may also provide commands or environments not present in
7063 In this case, you will want to add these to the layout file.
7065 \begin_inset CommandInset ref
7067 reference "sec:TextClass"
7071 for information on how to do so.
7074 \begin_layout Standard
7076 \begin_inset Flex MenuItem
7079 \begin_layout Plain Layout
7085 can be used with several different document classes, and even if it cannot,
7086 you might find it easiest just to write a module that you can load with
7088 The simplest possible such module would be:
7091 \begin_layout LyX-Code
7094 DeclareLyXModule{My Package}
7097 \begin_layout LyX-Code
7101 \begin_layout LyX-Code
7102 #Support for mypkg.sty.
7105 \begin_layout LyX-Code
7107 \begin_inset Newline newline
7113 \begin_layout LyX-Code
7115 \begin_inset Newline newline
7121 \begin_layout LyX-Code
7123 \begin_inset Newline newline
7129 \begin_inset Newline newline
7135 \begin_layout Standard
7136 A more complex module might modify the behavior of some existing constructs
7137 or define some new ones.
7139 \begin_inset CommandInset ref
7141 reference "sec:TextClass"
7148 \begin_layout Subsection
7150 \begin_inset Flex MenuItem
7153 \begin_layout Plain Layout
7162 \begin_layout Standard
7163 There are two possibilities here.
7164 One is that the class file is itself based upon an existing document class.
7165 For example, many thesis classes are based upon
7166 \begin_inset Flex MenuItem
7169 \begin_layout Plain Layout
7176 To see whether yours is, look for a line like
7179 \begin_layout LyX-Code
7185 \begin_layout Standard
7187 If so, then you may proceed largely as in the previous section, though
7189 \begin_inset Flex Code
7192 \begin_layout Plain Layout
7193 Declare\SpecialChar LaTeX
7199 line will be different.
7200 If your new class is
7201 \begin_inset Flex Code
7204 \begin_layout Plain Layout
7210 and it is based upon
7211 \begin_inset Flex Code
7214 \begin_layout Plain Layout
7220 , then the line should read:
7224 \begin_layout Plain Layout
7225 And it will be easiest if you save the file to
7226 \begin_inset Flex Code
7229 \begin_layout Plain Layout
7236 assumes that the document class has the same name as the layout file.
7245 \begin_layout LyX-Code
7248 Declare\SpecialChar LaTeX
7249 Class[thesis,book]{thesis}
7252 \begin_layout Standard
7253 If, on the other hand, the new class is not based upon an existing class,
7254 you will probably have to
7255 \begin_inset Quotes eld
7259 \begin_inset Quotes erd
7263 We strongly suggest copying an existing layout file which uses a similar
7265 class and then modifying it, if you can do so.
7266 At least use an existing file as a starting point so you can find out what
7267 items you need to worry about.
7268 Again, the specifics are covered below.
7271 \begin_layout Subsection
7273 \begin_inset CommandInset label
7275 name "subsec:Creating-Templates"
7282 \begin_layout Standard
7283 Once you have written a layout file for a new document class, you might
7284 want to consider writing a
7289 A template acts as a kind of tutorial for your layout, showing how it might
7290 be used, though containing dummy content.
7291 You can of course look at the various templates included with \SpecialChar LyX
7295 \begin_layout Standard
7296 Templates are created just like usual documents: using \SpecialChar LyX
7298 The only difference is that usual documents contain all possible settings,
7299 including the font scheme and the paper size.
7300 Usually a user doesn't want a template to overwrite his preferred settings
7301 for such parameters.
7302 For that reason, the designer of a template should remove the corresponding
7304 \begin_inset Flex Code
7307 \begin_layout Plain Layout
7316 \begin_inset Flex Code
7319 \begin_layout Plain Layout
7327 from the template \SpecialChar LyX
7329 This can be done with any simple text-editor, for example
7330 \begin_inset Flex Code
7333 \begin_layout Plain Layout
7340 \begin_inset Flex Code
7343 \begin_layout Plain Layout
7352 \begin_layout Standard
7353 Put the edited template files you create in
7354 \begin_inset Flex Code
7357 \begin_layout Plain Layout
7363 , copy the ones you use from the global template directory in
7364 \begin_inset Flex Code
7367 \begin_layout Plain Layout
7373 to the same place, and redefine the template path in the
7374 \begin_inset Flex MenuItem
7377 \begin_layout Plain Layout
7378 Tools\SpecialChar menuseparator
7379 Preferences\SpecialChar menuseparator
7388 \begin_layout Standard
7389 Note, by the way, that there is a template which has a particular meaning:
7391 \begin_inset Flex Code
7394 \begin_layout Plain Layout
7401 This template is loaded every time you create a new document with
7402 \begin_inset Flex MenuItem
7405 \begin_layout Plain Layout
7406 File\SpecialChar menuseparator
7412 in order to provide useful defaults.
7413 To create this template from inside \SpecialChar LyX
7414 , all you have to do is to open a document
7415 with the correct settings, and use the
7416 \begin_inset Flex MenuItem
7419 \begin_layout Plain Layout
7420 Save as Document Defaults
7428 \begin_layout Subsection
7429 Upgrading old layout files
7432 \begin_layout Standard
7433 The format of layout files changes with each \SpecialChar LyX
7434 release, so old layout files
7435 need to be converted to the new format.
7437 reads a layout file in an older format, it automatically calls the
7439 \begin_inset Flex Code
7442 \begin_layout Plain Layout
7448 to convert it to a temporary file in current format.
7449 The original file is left untouched.
7450 If you use the layout file often, then, you may want to convert it permanently,
7451 so that \SpecialChar LyX
7452 does not have to do so itself every time.
7453 To do this, you can call the converter manually:
7456 \begin_layout Enumerate
7458 \begin_inset Flex Code
7461 \begin_layout Plain Layout
7468 \begin_inset Flex Code
7471 \begin_layout Plain Layout
7480 \begin_layout Enumerate
7482 \begin_inset Newline newline
7486 \begin_inset Flex Code
7489 \begin_layout Plain Layout
7490 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7496 \begin_inset Newline newline
7500 \begin_inset Flex Code
7503 \begin_layout Plain Layout
7509 is the name of your \SpecialChar LyX
7513 \begin_layout Standard
7514 Note that manual conversion does not affect included files, so these will
7515 have to be converted separately.
7518 \begin_layout Section
7519 \begin_inset CommandInset label
7521 name "sec:TextClass"
7525 The layout file format
7528 \begin_layout Standard
7529 The following sections describe how layout files are structured and written.
7530 Our advice is to go slowly, save and test often.
7531 It is really not that hard, except that the multitude of options can become
7532 overwhelming, especially if you try to check out too many at once.
7533 It becomes easier if you use existing layouts of \SpecialChar LyX
7534 as examples/reference
7535 or if you modify an existing layout to your needs.
7538 \begin_layout Standard
7539 Note that all the tags used in layout files are case-insensitive.
7541 \begin_inset Flex Code
7544 \begin_layout Plain Layout
7551 \begin_inset Flex Code
7554 \begin_layout Plain Layout
7561 \begin_inset Flex Code
7564 \begin_layout Plain Layout
7570 are really the same tag.
7571 The possible arguments are printed in brackets after the tag's name.
7572 The default argument is typeset
7573 \begin_inset Flex Code
7576 \begin_layout Plain Layout
7585 If the argument has a data type like
7586 \begin_inset Quotes eld
7590 \begin_inset Quotes erd
7594 \begin_inset Quotes eld
7598 \begin_inset Quotes erd
7601 , the default is shown like this:
7602 \begin_inset Flex Code
7605 \begin_layout Plain Layout
7616 \begin_layout Subsection
7617 The document class declaration and classification
7620 \begin_layout Standard
7621 Lines in a layout file which begin with
7622 \begin_inset Flex Code
7625 \begin_layout Plain Layout
7632 There is one exception to this rule.
7634 \begin_inset Flex Code
7637 \begin_layout Plain Layout
7643 files should begin with lines like:
7646 \begin_layout LyX-Code
7649 #% Do not delete the line below; configure depends on this
7652 \begin_layout LyX-Code
7657 DeclareLaTeXClass{Article (Standard Class)}
7660 \begin_layout LyX-Code
7665 DeclareCategory{Articles}
7668 \begin_layout Standard
7669 The second and third lines are used when you (re)configure \SpecialChar LyX
7671 The layout file is read by the \SpecialChar LaTeX
7673 \begin_inset Flex Code
7676 \begin_layout Plain Layout
7682 , in a special mode where
7683 \begin_inset Flex Code
7686 \begin_layout Plain Layout
7693 The first line is just a \SpecialChar LaTeX
7694 comment, the second one contains the mandatory
7695 declaration of the text class and the third line contains the optional
7696 classification of the class.
7697 If these lines appear in a file named
7698 \begin_inset Flex Code
7701 \begin_layout Plain Layout
7707 , then they define a text class of name
7708 \begin_inset Flex Code
7711 \begin_layout Plain Layout
7717 (the name of the layout file) which uses the \SpecialChar LaTeX
7719 \begin_inset Flex Code
7722 \begin_layout Plain Layout
7728 (the default is to use the same name as the layout).
7730 \begin_inset Quotes eld
7733 Article (Standard Class)
7734 \begin_inset Quotes erd
7737 that appears above is used as a description of the text class in the
7738 \begin_inset Flex MenuItem
7741 \begin_layout Plain Layout
7742 Document\SpecialChar menuseparator
7750 \begin_inset Quotes eld
7754 \begin_inset Quotes erd
7757 in the example) is also used in the
7758 \begin_inset Flex MenuItem
7761 \begin_layout Plain Layout
7762 Document\SpecialChar menuseparator
7768 dialog: the text classes are grouped by these categories (which are usually
7769 genres, so typical categories are
7770 \begin_inset Quotes eld
7774 \begin_inset Quotes erd
7778 \begin_inset Quotes eld
7782 \begin_inset Quotes erd
7786 \begin_inset Quotes eld
7790 \begin_inset Quotes erd
7794 \begin_inset Quotes eld
7798 \begin_inset Quotes erd
7802 \begin_inset Quotes eld
7806 \begin_inset Quotes erd
7810 \begin_inset Quotes eld
7814 \begin_inset Quotes erd
7818 If no category has been declared, the class will be put in the
7819 \begin_inset Quotes eld
7823 \begin_inset Quotes erd
7829 \begin_layout Standard
7830 Let's assume that you wrote your own text class that uses the
7831 \begin_inset Flex Code
7834 \begin_layout Plain Layout
7840 document class, but where you changed the appearance of the section headings.
7841 If you put it in a file
7842 \begin_inset Flex Code
7845 \begin_layout Plain Layout
7851 , the header of this file should be:
7854 \begin_layout LyX-Code
7857 #% Do not delete the line below; configure depends on this
7860 \begin_layout LyX-Code
7865 DeclareLaTeXClass[article]{Article (with My Own Headings)}
7868 \begin_layout LyX-Code
7873 DeclareCategory{Articles}
7876 \begin_layout Standard
7877 This declares a text class
7878 \begin_inset Flex Code
7881 \begin_layout Plain Layout
7887 , associated with the \SpecialChar LaTeX
7889 \begin_inset Flex Code
7892 \begin_layout Plain Layout
7899 \begin_inset Quotes eld
7902 Article (with My Own Headings)
7903 \begin_inset Quotes erd
7907 If your text class depends on several packages, you can declare it as:
7910 \begin_layout LyX-Code
7913 #% Do not delete the line below; configure depends on this
7916 \begin_layout LyX-Code
7921 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
7924 \begin_layout LyX-Code
7929 DeclareCategory{Articles}
7932 \begin_layout Standard
7933 This indicates that your text class uses the
7934 \begin_inset Flex Code
7937 \begin_layout Plain Layout
7944 Finally, it is also possible to declare classes for DocBook code.
7945 Typical declarations will look like:
7948 \begin_layout LyX-Code
7951 #% Do not delete the line below; configure depends on this
7954 \begin_layout LyX-Code
7959 DeclareDocBookClass[article]{SGML (DocBook Article)}
7962 \begin_layout LyX-Code
7967 DeclareCategory{Articles (DocBook)}
7970 \begin_layout Standard
7971 Note that these declarations can also be given an optional parameter declaring
7972 the name of the document class (but not a list).
7975 \begin_layout Standard
7976 So, to be as explicit as possible, the form of the layout declaration is:
7979 \begin_layout LyX-Code
7984 DeclareLaTeXClass[class,package.sty]{layout description}
7987 \begin_layout LyX-Code
7992 DeclareCategory{category}
7995 \begin_layout Standard
7996 The class need only be specified if the name of the \SpecialChar LaTeX
7998 name of the layout file are different or if there are packages to load.
7999 If the name of the class file is not specified, then \SpecialChar LyX
8001 that it is the same as the name of the layout file.
8004 \begin_layout Standard
8005 When the text class has been modified to your taste, all you have to do
8006 is to copy it either to
8007 \begin_inset Flex Code
8010 \begin_layout Plain Layout
8017 \begin_inset Flex Code
8020 \begin_layout Plain Layout
8027 \begin_inset Flex MenuItem
8030 \begin_layout Plain Layout
8031 Tools\SpecialChar menuseparator
8037 , exit \SpecialChar LyX
8039 Then your new text class should be available along with the others.
8042 \begin_layout Standard
8043 Once the layout file is installed, you can edit it and see your changes
8044 without having to reconfigure or to restart \SpecialChar LyX
8050 \begin_layout Plain Layout
8051 In versions of \SpecialChar LyX
8052 prior to 1.6, this was not true.
8053 As a result, editing layout files was very time consuming, since you had
8054 constantly to restart \SpecialChar LyX
8060 You can force a reload of the current layout by using the \SpecialChar LyX
8062 \begin_inset Flex MenuItem
8065 \begin_layout Plain Layout
8072 There is no default binding for this function—though, of course, you can
8073 bind it to a key yourself.
8074 But you will normally use this function simply by entering it in the mini-buffe
8079 \begin_layout Standard
8085 \begin_inset Flex MenuItem
8088 \begin_layout Plain Layout
8094 is very much an `advanced feature'.
8099 recommended that you save your work before using this function.
8104 recommended that you not attempt to edit layout information while simultaneousl
8105 y working on a document that you care about.
8106 Use a test document.
8107 Syntax errors and the like in your layout file could cause peculiar behavior.
8108 In particular, such errors could cause \SpecialChar LyX
8109 to regard the current layout as
8110 invalid and to attempt to switch to some other layout.
8114 \begin_layout Plain Layout
8115 Really bad syntax errors may even caused \SpecialChar LyX
8117 This is because certain sorts of errors may make \SpecialChar LyX
8128 The \SpecialChar LyX
8129 team strives to keep \SpecialChar LyX
8130 stable in such situations, but safe is better
8135 \begin_layout Plain Layout
8136 While we're giving advice: make regular backups.
8137 And be nice to your mother.
8145 \begin_layout Subsection
8146 The Module declaration
8149 \begin_layout Standard
8150 A module must begin with a line like the following:
8153 \begin_layout LyX-Code
8156 DeclareLyXModule[endnotes.sty]{Endnotes}
8159 \begin_layout Standard
8160 The mandatory argument, in curly brackets, is the name of the module, as
8162 \begin_inset Flex MenuItem
8165 \begin_layout Plain Layout
8166 Document\SpecialChar menuseparator
8167 Settings\SpecialChar menuseparator
8174 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8176 on which the module depends.
8177 It is also possible to use the form
8178 \begin_inset Flex MenuItem
8181 \begin_layout Plain Layout
8187 as an optional argument, which declares that the module can only be used
8188 when there exists a conversion chain between the formats `
8189 \begin_inset Flex Code
8192 \begin_layout Plain Layout
8199 \begin_inset Flex Code
8202 \begin_layout Plain Layout
8211 \begin_layout Standard
8212 The module declaration should then be followed by lines like the following
8216 \begin_layout Plain Layout
8217 Preferably in English if the module should be published with \SpecialChar LyX
8219 This description will appear in the list of messages to be translated and
8220 will be thus translated with the next interface update.
8228 \begin_layout LyX-Code
8232 \begin_layout LyX-Code
8233 #Adds an endnote command, in addition to footnotes.
8237 \begin_layout LyX-Code
8238 #You will need to add
8240 theendnotes in TeX code where you
8243 \begin_layout LyX-Code
8244 #want the endnotes to appear.
8248 \begin_layout LyX-Code
8252 \begin_layout LyX-Code
8253 #Requires: somemodule | othermodule
8256 \begin_layout LyX-Code
8257 #Excludes: badmodule
8260 \begin_layout Standard
8261 The description is used in
8262 \begin_inset Flex MenuItem
8265 \begin_layout Plain Layout
8266 Document\SpecialChar menuseparator
8267 Settings\SpecialChar menuseparator
8273 to provide the user with information about what the module does.
8275 \begin_inset Flex Code
8278 \begin_layout Plain Layout
8284 line is used to identify other modules with which this one must be used;
8286 \begin_inset Flex Code
8289 \begin_layout Plain Layout
8295 line is used to identify modules with which this one may not be used.
8296 Both are optional, and, as shown, multiple modules should be separated
8297 with the pipe symbol: |.
8298 Note that the required modules are treated disjunctively:
8302 of the required modules must be used.
8307 excluded module may be used.
8308 Note that modules are identified here by their filenames without the
8309 \begin_inset Flex Code
8312 \begin_layout Plain Layout
8320 \begin_inset Flex Code
8323 \begin_layout Plain Layout
8330 \begin_inset Flex Code
8333 \begin_layout Plain Layout
8342 \begin_layout Subsection
8346 \begin_layout Standard
8347 The first non-comment line of any layout file, included file, or module
8352 contain the file format number:
8355 \begin_layout Description
8356 \begin_inset Flex Code
8359 \begin_layout Plain Layout
8366 \begin_inset Flex Code
8369 \begin_layout Plain Layout
8375 ] The format number of the layout file.
8378 \begin_layout Standard
8379 This tag was introduced with \SpecialChar LyX
8381 \begin_inset space ~
8385 Layout files from older \SpecialChar LyX
8386 versions do not have an explicit file format and
8387 are considered to have
8388 \begin_inset Flex Code
8391 \begin_layout Plain Layout
8393 \begin_inset space ~
8402 The format for the present version of \SpecialChar LyX
8404 But each version of \SpecialChar LyX
8405 is capable of reading earlier versions' layout files,
8406 just as they are capable of reading files produced by earlier versions
8409 There is, however, no provision for converting to earlier formats.
8412 \begin_layout Subsection
8413 \begin_inset CommandInset label
8415 name "subsec:General-text-class"
8419 General text class parameters
8422 \begin_layout Standard
8423 These are general parameters that govern the behavior of an entire document
8429 mean that they must appear in
8430 \begin_inset Flex Code
8433 \begin_layout Plain Layout
8439 files rather than in modules.
8440 A module can contain any layout tag.)
8443 \begin_layout Description
8444 \begin_inset Flex Code
8447 \begin_layout Plain Layout
8453 Adds information that will be output in the
8454 \begin_inset Flex Code
8457 \begin_layout Plain Layout
8463 block when the document is output to XHTML.
8464 Typically, this would be used to output CSS style information, but it can
8465 be used for anything that can appear in
8466 \begin_inset Flex Code
8469 \begin_layout Plain Layout
8477 \begin_inset Quotes eld
8481 \begin_inset Flex Code
8484 \begin_layout Plain Layout
8491 \begin_inset Quotes erd
8497 \begin_layout Description
8498 \begin_inset Flex Code
8501 \begin_layout Plain Layout
8507 Adds information to the document preamble.
8509 \begin_inset Newline newline
8513 \begin_inset Quotes eld
8517 \begin_inset Flex Code
8520 \begin_layout Plain Layout
8527 \begin_inset Quotes erd
8533 \begin_layout Description
8534 \begin_inset Flex Code
8537 \begin_layout Plain Layout
8543 Defines formats for use in the display of bibliographic information.
8545 \begin_inset CommandInset ref
8547 reference "subsec:Citation-format-description"
8553 \begin_inset Quotes eld
8557 \begin_inset Flex Code
8560 \begin_layout Plain Layout
8567 \begin_inset Quotes erd
8573 \begin_layout Description
8574 \begin_inset Flex Code
8577 \begin_layout Plain Layout
8583 Describes various global options supported by the document class.
8585 \begin_inset CommandInset ref
8587 reference "subsec:ClassOptions"
8593 \begin_inset Quotes eld
8597 \begin_inset Flex Code
8600 \begin_layout Plain Layout
8607 \begin_inset Quotes erd
8613 \begin_layout Description
8614 \begin_inset Flex Code
8617 \begin_layout Plain Layout
8624 \begin_inset Flex Code
8627 \begin_layout Plain Layout
8636 \begin_inset space \thinspace{}
8640 \begin_inset Flex Code
8643 \begin_layout Plain Layout
8649 ] Whether the class should
8653 to having one or two columns.
8654 Can be changed in the
8655 \begin_inset Flex MenuItem
8658 \begin_layout Plain Layout
8659 Document\SpecialChar menuseparator
8668 \begin_layout Description
8669 \begin_inset Flex Code
8672 \begin_layout Plain Layout
8679 \begin_inset Flex Code
8682 \begin_layout Plain Layout
8688 ] This sequence defines the properties for a counter.
8689 If the counter does not yet exist, it is created; if it does exist, it
8692 \begin_inset Quotes eld
8696 \begin_inset Flex Code
8699 \begin_layout Plain Layout
8706 \begin_inset Quotes erd
8710 \begin_inset Newline newline
8714 \begin_inset CommandInset ref
8716 reference "subsec:Counters"
8720 for details on counters.
8723 \begin_layout Description
8724 \begin_inset Flex Code
8727 \begin_layout Plain Layout
8733 Sets the default font used to display the document.
8735 \begin_inset CommandInset ref
8737 reference "subsec:Font-description"
8741 for how to declare fonts.
8743 \begin_inset Quotes eld
8747 \begin_inset Flex Code
8750 \begin_layout Plain Layout
8757 \begin_inset Quotes erd
8763 \begin_layout Description
8764 \begin_inset Flex Code
8767 \begin_layout Plain Layout
8774 \begin_inset Flex Code
8777 \begin_layout Plain Layout
8783 ] Specifies a module to be included by default with this document class.
8784 The module is specified as filename without the
8785 \begin_inset Flex Code
8788 \begin_layout Plain Layout
8795 The user can still remove the module, but it will be active at the outset.
8796 (This applies only when new files are created, or when this class is chosen
8797 for an existing document.)
8800 \begin_layout Description
8801 \begin_inset Flex Code
8804 \begin_layout Plain Layout
8811 \begin_inset Flex Code
8814 \begin_layout Plain Layout
8820 ] This is the style that will be assigned to new paragraphs, usually
8821 \begin_inset Flex MenuItem
8824 \begin_layout Plain Layout
8831 This will default to the first defined style if not given, but you are
8832 encouraged to use this directive.
8835 \begin_layout Description
8836 \begin_inset Flex Code
8839 \begin_layout Plain Layout
8846 \begin_inset Flex Code
8849 \begin_layout Plain Layout
8855 ] This tag indicates that the module (which is specified by filename without
8857 \begin_inset Flex Code
8860 \begin_layout Plain Layout
8866 extension) cannot be used with this document class.
8867 This might be used in a journal-specific layout file to prevent, say, the
8869 \begin_inset Flex Code
8872 \begin_layout Plain Layout
8878 module that numbers theorems by section.
8883 be used in a module.
8884 Modules have their own way of excluding other modules (see
8885 \begin_inset CommandInset ref
8887 reference "subsec:Layout-modules"
8894 \begin_layout Description
8895 \begin_inset Flex Code
8898 \begin_layout Plain Layout
8904 Defines a new float.
8906 \begin_inset CommandInset ref
8908 reference "subsec:Floats"
8914 \begin_inset Quotes eld
8918 \begin_inset Flex Code
8921 \begin_layout Plain Layout
8928 \begin_inset Quotes erd
8934 \begin_layout Description
8935 \begin_inset Flex Code
8938 \begin_layout Plain Layout
8944 Sets the information that will be output in the
8945 \begin_inset Flex Code
8948 \begin_layout Plain Layout
8954 block when this document class is output to XHTML.
8955 Note that this will completely override any prior
8956 \begin_inset Flex Code
8959 \begin_layout Plain Layout
8966 \begin_inset Flex Code
8969 \begin_layout Plain Layout
8977 \begin_inset Newline newline
8981 \begin_inset Flex Code
8984 \begin_layout Plain Layout
8990 if you just want to add material to the preamble.) Must end with
8991 \begin_inset Quotes eld
8995 \begin_inset Flex Code
8998 \begin_layout Plain Layout
9005 \begin_inset Quotes erd
9011 \begin_layout Description
9012 \begin_inset Flex Code
9015 \begin_layout Plain Layout
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9031 ] The style to use for the table of contents, bibliography, and so forth,
9032 when the document is output to HTML.
9033 For articles, this should normally be
9034 \begin_inset Flex Code
9037 \begin_layout Plain Layout
9044 \begin_inset Flex Code
9047 \begin_layout Plain Layout
9054 If it is not given, then \SpecialChar LyX
9055 will attempt to figure out which layout to use.
9058 \begin_layout Description
9059 \begin_inset Flex Code
9062 \begin_layout Plain Layout
9069 \begin_inset Flex Code
9072 \begin_layout Plain Layout
9078 ] Modifies the properties of the given counter.
9079 If the counter does not exist, the statement is ignored.
9081 \begin_inset Quotes eld
9085 \begin_inset Flex Code
9088 \begin_layout Plain Layout
9095 \begin_inset Quotes erd
9099 \begin_inset Newline newline
9103 \begin_inset CommandInset ref
9105 reference "subsec:Counters"
9109 for details on counters.
9112 \begin_layout Description
9113 \begin_inset Flex Code
9116 \begin_layout Plain Layout
9123 \begin_inset Flex Code
9126 \begin_layout Plain Layout
9132 ] Modifies the properties of the given paragraph style.
9133 If the style does not exist, the statement is ignored.
9135 \begin_inset Quotes eld
9139 \begin_inset Flex Code
9142 \begin_layout Plain Layout
9149 \begin_inset Quotes erd
9155 \begin_layout Description
9156 \begin_inset Flex Code
9159 \begin_layout Plain Layout
9166 \begin_inset Flex Code
9169 \begin_layout Plain Layout
9175 ] This allows you to include another layout definition file within yours
9176 to avoid duplicating commands.
9177 Common examples are the standard layout files, for example,
9178 \begin_inset Flex Code
9181 \begin_layout Plain Layout
9187 , which contains most of the basic layouts.
9190 \begin_layout Description
9191 \begin_inset Flex Code
9194 \begin_layout Plain Layout
9201 \begin_inset Flex Code
9204 \begin_layout Plain Layout
9210 ] This section (re-)defines the layout of an inset.
9211 It can be applied to an existing inset or to a new, user-defined inset,
9212 e.g., a new character style.
9214 \begin_inset Quotes eld
9218 \begin_inset Flex Code
9221 \begin_layout Plain Layout
9228 \begin_inset Quotes erd
9232 \begin_inset Newline newline
9236 \begin_inset CommandInset ref
9238 reference "subsec:Flex-insets-and"
9242 for more information.
9246 \begin_layout Description
9247 \begin_inset Flex Code
9250 \begin_layout Plain Layout
9257 \begin_inset Flex Code
9260 \begin_layout Plain Layout
9266 ] A string that indicates the width of the left margin on the screen, for
9268 \begin_inset Quotes eld
9272 \begin_inset Flex Code
9275 \begin_layout Plain Layout
9282 \begin_inset Quotes erd
9286 (Note that this is not a `length', like
9287 \begin_inset Quotes eld
9291 \begin_inset Quotes erd
9297 \begin_layout Description
9298 \begin_inset Flex Code
9301 \begin_layout Plain Layout
9308 \begin_inset Flex Code
9311 \begin_layout Plain Layout
9317 ] Deletes an existing counter, usually one defined in an included file.
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 float.
9341 This is particularly useful when you want to suppress a float that has
9342 been defined in an input file.
9345 \begin_layout Description
9346 \begin_inset Flex Code
9349 \begin_layout Plain Layout
9356 \begin_inset Flex Code
9359 \begin_layout Plain Layout
9365 ] Deletes an existing style.
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 ] The file format (as defined in the \SpecialChar LyX
9389 preferences) produced by this document
9391 It is mainly useful when
9392 \begin_inset Flex Code
9395 \begin_layout Plain Layout
9402 \begin_inset Flex Code
9405 \begin_layout Plain Layout
9411 and one wants to define a new type of literate document.
9412 The format is reset to
9413 \begin_inset Quotes eld
9417 \begin_inset Flex Code
9420 \begin_layout Plain Layout
9427 \begin_inset Quotes erd
9431 \begin_inset Quotes eld
9435 \begin_inset Flex Code
9438 \begin_layout Plain Layout
9445 \begin_inset Quotes erd
9448 when the corresponding
9449 \begin_inset Flex Code
9452 \begin_layout Plain Layout
9458 parameter is encountered.
9461 \begin_layout Description
9462 \begin_inset Flex Code
9465 \begin_layout Plain Layout
9472 \begin_inset Flex Code
9475 \begin_layout Plain Layout
9486 \begin_inset Flex Code
9489 \begin_layout Plain Layout
9496 \begin_inset Flex Code
9499 \begin_layout Plain Layout
9505 ] Specifies what sort of output documents using this class will produce.
9508 \begin_layout Description
9509 \begin_inset Flex Code
9512 \begin_layout Plain Layout
9519 \begin_inset Flex Code
9522 \begin_layout Plain Layout
9529 \begin_inset Flex Code
9532 \begin_layout Plain Layout
9538 ] Specifies options, given in the second string, for the package named by
9541 \begin_inset Quotes eld
9545 \begin_inset Flex Code
9548 \begin_layout Plain Layout
9549 PackageOptions natbib square
9555 \begin_inset Quotes erd
9559 \begin_inset Flex Code
9562 \begin_layout Plain Layout
9568 to be loaded with the
9569 \begin_inset Flex Code
9572 \begin_layout Plain Layout
9579 (For \SpecialChar TeX
9580 perts, this causes \SpecialChar LyX
9582 \begin_inset Flex Code
9585 \begin_layout Plain Layout
9588 PassOptionsToPackage{natbib}{square}
9594 \begin_inset Flex Code
9597 \begin_layout Plain Layout
9606 \begin_layout Description
9607 \begin_inset Flex Code
9610 \begin_layout Plain Layout
9617 \begin_inset Flex Code
9620 \begin_layout Plain Layout
9629 \begin_inset Flex Code
9632 \begin_layout Plain Layout
9639 \begin_inset Flex Code
9642 \begin_layout Plain Layout
9648 ] The default pagestyle.
9649 Can be changed in the
9650 \begin_inset Flex MenuItem
9653 \begin_layout Plain Layout
9654 Document\SpecialChar menuseparator
9663 \begin_layout Description
9664 \begin_inset Flex Code
9667 \begin_layout Plain Layout
9673 Sets the preamble for the \SpecialChar LaTeX
9675 Note that this will completely override any prior
9676 \begin_inset Flex Code
9679 \begin_layout Plain Layout
9686 \begin_inset Flex Code
9689 \begin_layout Plain Layout
9697 \begin_inset Flex Code
9700 \begin_layout Plain Layout
9706 if you just want to add material to the preamble.) Must end with
9707 \begin_inset Quotes eld
9711 \begin_inset Flex Code
9714 \begin_layout Plain Layout
9721 \begin_inset Quotes erd
9727 \begin_layout Description
9728 \begin_inset Flex Code
9731 \begin_layout Plain Layout
9738 \begin_inset Flex Code
9741 \begin_layout Plain Layout
9748 \begin_inset Flex Code
9751 \begin_layout Plain Layout
9760 \begin_inset space \thinspace{}
9764 \begin_inset Flex Code
9767 \begin_layout Plain Layout
9773 ] Whether the class already provides the feature
9774 \begin_inset Flex Code
9777 \begin_layout Plain Layout
9784 A feature is in general the name of a package (e.
9785 \begin_inset space \thinspace{}
9789 \begin_inset space \space{}
9793 \begin_inset Flex Code
9796 \begin_layout Plain Layout
9803 \begin_inset Flex Code
9806 \begin_layout Plain Layout
9813 \begin_inset space \thinspace{}
9817 \begin_inset space \space{}
9821 \begin_inset Flex Code
9824 \begin_layout Plain Layout
9831 \begin_inset Flex Code
9834 \begin_layout Plain Layout
9842 \begin_inset CommandInset ref
9844 reference "chap:List-of-functions"
9848 for the list of features.
9851 \begin_layout Description
9852 \begin_inset Flex Code
9855 \begin_layout Plain Layout
9862 \begin_inset Flex Code
9865 \begin_layout Plain Layout
9871 ] Indicates that this layout provides the functionality of the module mentioned,
9872 which should be specified by the filename without the
9873 \begin_inset Flex Code
9876 \begin_layout Plain Layout
9883 This will typically be used if the layout includes the module directly,
9884 rather than using the
9885 \begin_inset Flex Code
9888 \begin_layout Plain Layout
9894 tag to indicate that it ought to be used.
9895 It could also be used in a module that provided an alternate implementation
9896 of the same functionality.
9899 \begin_layout Description
9900 \begin_inset Flex Code
9903 \begin_layout Plain Layout
9910 \begin_inset Flex Code
9913 \begin_layout Plain Layout
9919 ] Whether the class requires the feature
9920 \begin_inset Flex Code
9923 \begin_layout Plain Layout
9930 Multiple features must be separated by commas.
9931 Note that you can only request supported features.
9933 \begin_inset CommandInset ref
9935 reference "chap:List-of-functions"
9939 for the list of features.).
9940 If you require a package with specific options, you can additionally use
9942 \begin_inset Flex Code
9945 \begin_layout Plain Layout
9954 \begin_layout Description
9955 \begin_inset Flex Code
9958 \begin_layout Plain Layout
9965 \begin_inset Flex Code
9968 \begin_layout Plain Layout
9974 ] A string that indicates the width of the right margin on the screen, for
9976 \begin_inset Quotes eld
9980 \begin_inset Flex Code
9983 \begin_layout Plain Layout
9990 \begin_inset Quotes erd
9996 \begin_layout Description
9997 \begin_inset Flex Code
10000 \begin_layout Plain Layout
10007 \begin_inset Flex Code
10010 \begin_layout Plain Layout
10016 ] Sets which divisions get numbered.
10018 \begin_inset Newline newline
10022 \begin_inset Flex Code
10025 \begin_layout Plain Layout
10031 counter in \SpecialChar LaTeX
10035 \begin_layout Description
10036 \begin_inset Flex Code
10039 \begin_layout Plain Layout
10046 \begin_inset Flex Code
10049 \begin_layout Plain Layout
10058 \begin_inset space \thinspace{}
10062 \begin_inset Flex Code
10065 \begin_layout Plain Layout
10071 ] Whether the class-default should be printing on one or both sides of the
10073 Can be changed in the
10074 \begin_inset Flex MenuItem
10077 \begin_layout Plain Layout
10078 Document\SpecialChar menuseparator
10087 \begin_layout Description
10088 \begin_inset Flex Code
10091 \begin_layout Plain Layout
10098 \begin_inset Flex Code
10101 \begin_layout Plain Layout
10107 ] This sequence defines a paragraph style.
10108 If the style does not yet exist, it is created; if it does exist, its parameter
10111 \begin_inset Quotes eld
10115 \begin_inset Flex Code
10118 \begin_layout Plain Layout
10125 \begin_inset Quotes erd
10129 \begin_inset Newline newline
10133 \begin_inset CommandInset ref
10135 reference "subsec:Paragraph-Styles"
10139 for details on paragraph styles.
10142 \begin_layout Description
10143 \begin_inset Flex Code
10146 \begin_layout Plain Layout
10153 \begin_inset Flex Code
10156 \begin_layout Plain Layout
10162 ] The name of the command or environment to be used with
10163 \begin_inset Flex Code
10166 \begin_layout Plain Layout
10175 \begin_layout Description
10176 \begin_inset Flex Code
10179 \begin_layout Plain Layout
10186 \begin_inset Flex Code
10189 \begin_layout Plain Layout
10198 \begin_inset Flex Code
10201 \begin_layout Plain Layout
10207 ] Indicates what kind of markup is used to define the title of a document.
10209 \begin_inset Flex Code
10212 \begin_layout Plain Layout
10218 means that the macro with name
10219 \begin_inset Flex Code
10222 \begin_layout Plain Layout
10228 will be inserted after the last layout which has
10229 \begin_inset Quotes eld
10233 \begin_inset Flex Code
10236 \begin_layout Plain Layout
10238 \begin_inset space ~
10247 \begin_inset Quotes erd
10252 \begin_inset Flex Code
10255 \begin_layout Plain Layout
10261 corresponds to the case where all layouts which have
10262 \begin_inset Quotes eld
10266 \begin_inset Flex Code
10269 \begin_layout Plain Layout
10271 \begin_inset space ~
10280 \begin_inset Quotes erd
10283 should be enclosed into the
10284 \begin_inset Flex Code
10287 \begin_layout Plain Layout
10296 \begin_layout Description
10297 \begin_inset Flex Code
10300 \begin_layout Plain Layout
10307 \begin_inset Flex Code
10310 \begin_layout Plain Layout
10316 ] Sets which divisions are included in the table of contents.
10318 \begin_inset Flex Code
10321 \begin_layout Plain Layout
10327 counter in \SpecialChar LaTeX
10331 \begin_layout Subsection
10332 \begin_inset Flex Code
10335 \begin_layout Plain Layout
10342 \begin_inset CommandInset label
10344 name "subsec:ClassOptions"
10351 \begin_layout Standard
10353 \begin_inset Flex Code
10356 \begin_layout Plain Layout
10362 section can contain the following entries:
10365 \begin_layout Description
10366 \begin_inset Flex Code
10369 \begin_layout Plain Layout
10376 \begin_inset Flex Code
10379 \begin_layout Plain Layout
10385 ] The list of available font sizes for the document's main font, separated
10387 \begin_inset Quotes eld
10391 \begin_inset Flex Code
10394 \begin_layout Plain Layout
10401 \begin_inset Quotes erd
10407 \begin_layout Description
10408 \begin_inset Flex Code
10411 \begin_layout Plain Layout
10417 Used to set the DTD line with XML-based output classes.
10419 \begin_inset space \thinspace{}
10423 \begin_inset Quotes eld
10426 -//OASIS//DTD DocBook V4.2//EN
10427 \begin_inset Quotes erd
10433 \begin_layout Description
10434 \begin_inset Flex Code
10437 \begin_layout Plain Layout
10444 \begin_inset Flex Code
10447 \begin_layout Plain Layout
10448 string="empty|plain|headings|fancy"
10453 ] The list of available page sty\SpecialChar softhyphen
10455 \begin_inset Quotes eld
10459 \begin_inset Flex Code
10462 \begin_layout Plain Layout
10469 \begin_inset Quotes erd
10475 \begin_layout Description
10476 \begin_inset Flex Code
10479 \begin_layout Plain Layout
10486 \begin_inset Flex Code
10489 \begin_layout Plain Layout
10495 ] Some document class options, separated by a comma, that will be added
10496 to the optional part of the
10497 \begin_inset Flex Code
10500 \begin_layout Plain Layout
10511 \begin_layout Standard
10513 \begin_inset Flex Code
10516 \begin_layout Plain Layout
10522 section must end with
10523 \begin_inset Quotes eld
10527 \begin_inset Flex Code
10530 \begin_layout Plain Layout
10537 \begin_inset Quotes erd
10543 \begin_layout Subsection
10545 \begin_inset CommandInset label
10547 name "subsec:Paragraph-Styles"
10554 \begin_layout Standard
10555 A paragraph style description looks like this:
10559 \begin_layout Plain Layout
10560 Note that this will either define a new style or modify an existing one.
10568 \begin_layout LyX-Code
10575 \begin_layout LyX-Code
10579 \begin_layout LyX-Code
10583 \begin_layout Standard
10584 where the following commands are allowed:
10587 \begin_layout Description
10588 \begin_inset Flex Code
10591 \begin_layout Plain Layout
10598 \begin_inset Flex Code
10601 \begin_layout Plain Layout
10606 , left, right, center
10611 ] Paragraph alignment.
10614 \begin_layout Description
10615 \begin_inset Flex Code
10618 \begin_layout Plain Layout
10625 \begin_inset Flex Code
10628 \begin_layout Plain Layout
10633 , left, right, center
10638 ] A comma separated list of permitted alignments.
10639 (Some \SpecialChar LaTeX
10640 styles prohibit certain alignments, since those wouldn't make sense.
10641 For example a right-aligned or centered enumeration isn't possible.)
10644 \begin_layout Description
10645 \begin_inset Flex Code
10648 \begin_layout Plain Layout
10655 \begin_inset Flex Code
10658 \begin_layout Plain Layout
10664 ] Defines argument number <int> of a command\SpecialChar breakableslash
10665 environment associated with
10667 This is useful for things like section headings, and only makes sense with
10670 Every (optional or required) argument of a command or environment – except
10671 for the required argument that is associated with the content of the paragraph
10672 itself – has a separate definition, where the number specifies the order
10674 The definition must end with
10675 \begin_inset Flex Code
10678 \begin_layout Plain Layout
10685 So a command with two optional arguments has:
10686 \begin_inset Separator parbreak
10693 \begin_layout Quote
10699 \begin_layout Quote
10705 \begin_layout Quote
10711 \begin_layout Quote
10717 \begin_layout Quote
10723 \begin_layout Quote
10729 \begin_layout Standard
10731 \begin_inset Flex Code
10734 \begin_layout Plain Layout
10740 definition, the following specifications are possible:
10743 \begin_layout Itemize
10744 \begin_inset Flex Code
10747 \begin_layout Plain Layout
10754 \begin_inset Flex Code
10757 \begin_layout Plain Layout
10763 The string that will appear both in the menu (to insert this argument)
10764 and on the argument inset button (unless you also specify a separate
10765 \begin_inset Flex Code
10768 \begin_layout Plain Layout
10775 For the menu, you can define an accelerator by appending the respective
10776 character to the string, divided by
10777 \begin_inset Quotes eld
10781 \begin_inset Quotes erd
10785 \begin_inset space \thinspace{}
10789 \begin_inset space \space{}
10793 \begin_inset Quotes eld
10797 \begin_inset Flex Code
10800 \begin_layout Plain Layout
10807 \begin_inset Quotes erd
10813 \begin_layout Itemize
10814 \begin_inset Flex Code
10817 \begin_layout Plain Layout
10824 \begin_inset Flex Code
10827 \begin_layout Plain Layout
10833 A separate string for the menu.
10834 You can define an accelerator by appending the respective character to
10835 the string, divided by
10836 \begin_inset Quotes eld
10840 \begin_inset Quotes erd
10844 \begin_inset space \thinspace{}
10848 \begin_inset space \space{}
10852 \begin_inset Quotes eld
10856 \begin_inset Flex Code
10859 \begin_layout Plain Layout
10866 \begin_inset Quotes erd
10870 This specification is optional.
10871 If it is not given the
10872 \begin_inset Flex Code
10875 \begin_layout Plain Layout
10881 will be used instead for the menu.
10884 \begin_layout Itemize
10885 \begin_inset Flex Code
10888 \begin_layout Plain Layout
10895 \begin_inset Flex Code
10898 \begin_layout Plain Layout
10904 A longer explanatory text that appears in the tooltip when hovering over
10905 the argument inset.
10908 \begin_layout Itemize
10909 \begin_inset Flex Code
10912 \begin_layout Plain Layout
10919 \begin_inset Flex Code
10922 \begin_layout Plain Layout
10931 \begin_inset space \thinspace{}
10935 \begin_inset Flex Code
10938 \begin_layout Plain Layout
10944 ] Declare if this is a mandatory (1) or an optional (0) argument.
10945 Mandatory arguments will be output empty if not given, while optional arguments
10946 will not be output at all.
10947 By default, mandatory arguments are delimited by
10948 \begin_inset Flex Code
10951 \begin_layout Plain Layout
10957 , while optional arguments are delimited by
10958 \begin_inset Flex Code
10961 \begin_layout Plain Layout
10970 \begin_layout Itemize
10971 \begin_inset Flex Code
10974 \begin_layout Plain Layout
10981 \begin_inset Flex Code
10984 \begin_layout Plain Layout
10990 defines another argument (by its number) which this argument requires to
10991 be output if it is itself output.
10993 \begin_inset space \thinspace{}
10996 g., in \SpecialChar LaTeX
10997 commands, optional arguments often require previous optional arguments
10998 to be output (at least empty), as in
10999 \begin_inset Flex Code
11002 \begin_layout Plain Layout
11005 command[][argument]{text}
11011 This can be achieved by the statement
11012 \begin_inset Flex Code
11015 \begin_layout Plain Layout
11022 \begin_inset Flex Code
11025 \begin_layout Plain Layout
11034 \begin_layout Itemize
11035 \begin_inset Flex Code
11038 \begin_layout Plain Layout
11045 \begin_inset Flex Code
11048 \begin_layout Plain Layout
11054 defines a custom left delimiter (instead of
11055 \begin_inset Flex Code
11058 \begin_layout Plain Layout
11065 \begin_inset Flex Code
11068 \begin_layout Plain Layout
11075 A line break in the output can be indicated by
11076 \begin_inset Flex Code
11079 \begin_layout Plain Layout
11088 \begin_layout Itemize
11089 \begin_inset Flex Code
11092 \begin_layout Plain Layout
11099 \begin_inset Flex Code
11102 \begin_layout Plain Layout
11108 defines a custom right delimiter (instead of
11109 \begin_inset Flex Code
11112 \begin_layout Plain Layout
11119 \begin_inset Flex Code
11122 \begin_layout Plain Layout
11129 A line break in the output can be indicated by
11130 \begin_inset Flex Code
11133 \begin_layout Plain Layout
11142 \begin_layout Itemize
11143 \begin_inset Flex Code
11146 \begin_layout Plain Layout
11153 \begin_inset Flex Code
11156 \begin_layout Plain Layout
11162 defines an argument that is inserted if and only if no user-specified arguments
11164 \begin_inset space \thinspace{}
11168 \begin_inset space \space{}
11171 if no argument inset has been inserted (note that also an empty argument
11172 inset omits the DefaultArg).
11173 Multiple arguments need to be separated by comma.
11176 \begin_layout Itemize
11177 \begin_inset Flex Code
11180 \begin_layout Plain Layout
11187 \begin_inset Flex Code
11190 \begin_layout Plain Layout
11196 defines an argument that is inserted in any case (alone or in addition
11197 to user-specified arguments).
11198 Multiple arguments need to be separated by comma.
11201 \begin_layout Itemize
11202 \begin_inset Flex Code
11205 \begin_layout Plain Layout
11211 The font used for the argument content, see
11212 \begin_inset CommandInset ref
11214 reference "subsec:Font-description"
11221 \begin_layout Itemize
11222 \begin_inset Flex Code
11225 \begin_layout Plain Layout
11231 The font used for the label; see
11232 \begin_inset CommandInset ref
11234 reference "subsec:Font-description"
11241 \begin_layout Itemize
11242 \begin_inset Flex Code
11245 \begin_layout Plain Layout
11252 \begin_inset Flex Code
11255 \begin_layout Plain Layout
11260 , Minimalistic, Conglomerate
11265 ] describes the rendering style used for the inset's frame and buttons.
11268 \begin_layout Itemize
11269 \begin_inset Flex Code
11272 \begin_layout Plain Layout
11279 \begin_inset Flex Code
11282 \begin_layout Plain Layout
11289 \begin_inset Flex Code
11292 \begin_layout Plain Layout
11298 , this argument is automatically inserted when the respective style is selected.
11299 Currently, only one argument per style\SpecialChar breakableslash
11300 layout can be automatically inserted.
11303 \begin_layout Itemize
11304 \begin_inset Flex Code
11307 \begin_layout Plain Layout
11314 \begin_inset Flex Code
11317 \begin_layout Plain Layout
11324 \begin_inset Flex Code
11327 \begin_layout Plain Layout
11333 , this argument will be inserted with a copy of the co-text (either selected
11334 text or the whole paragraph) as content.
11337 \begin_layout Itemize
11338 \begin_inset Flex Code
11341 \begin_layout Plain Layout
11348 \begin_inset Flex Code
11351 \begin_layout Plain Layout
11352 string of characters
11361 Defines individual characters that should be output in raw form, meaning
11362 without special translations that \SpecialChar LaTeX
11364 Note that, contrary to PassThru, this needs to be explicitly defined for
11366 That is, arguments do not inherit PassThruChars from their parent inset
11370 \begin_layout Standard
11371 By default, the text entered in the \SpecialChar LyX
11372 workarea in the respective layout is
11373 the last (mandatory) argument of a command if the
11374 \begin_inset Flex Code
11377 \begin_layout Plain Layout
11384 \begin_inset Flex Code
11387 \begin_layout Plain Layout
11394 However, arguments with the prefix
11395 \begin_inset Flex Code
11398 \begin_layout Plain Layout
11404 are output after this workarea argument.
11405 Note that post-argument numbering restarts at 1, so the first argument
11406 following the workarea argument is
11407 \begin_inset Flex Code
11410 \begin_layout Plain Layout
11417 Post-arguments are ignored in any other
11418 \begin_inset Flex Code
11421 \begin_layout Plain Layout
11428 \begin_inset Flex Code
11431 \begin_layout Plain Layout
11440 \begin_layout Standard
11442 \begin_inset Flex Code
11445 \begin_layout Plain Layout
11454 \begin_inset Flex Code
11457 \begin_layout Plain Layout
11466 \begin_inset Flex Code
11469 \begin_layout Plain Layout
11475 followed by the number (e.
11476 \begin_inset space \thinspace{}
11480 \begin_inset space \space{}
11484 \begin_inset Flex Code
11487 \begin_layout Plain Layout
11497 \begin_layout Description
11498 \begin_inset Flex Code
11501 \begin_layout Plain Layout
11507 Note that this will completely override any prior
11508 \begin_inset Flex Code
11511 \begin_layout Plain Layout
11517 declaration for this style.
11519 \begin_inset Quotes eld
11523 \begin_inset Flex Code
11526 \begin_layout Plain Layout
11533 \begin_inset Quotes erd
11538 \begin_inset CommandInset ref
11540 reference "subsec:I18n"
11544 for details on its use.
11547 \begin_layout Description
11548 \begin_inset Flex Code
11551 \begin_layout Plain Layout
11558 \begin_inset Flex Code
11561 \begin_layout Plain Layout
11571 \begin_layout Plain Layout
11572 Note that a `float' here is a real number, such as: 1.5.
11577 The vertical space with which the last of a chain of paragraphs with this
11578 style is separated from the following paragraph.
11579 If the next paragraph has another style, the separations are not simply
11580 added, but the maximum is taken.
11583 \begin_layout Description
11584 \begin_inset Flex Code
11587 \begin_layout Plain Layout
11594 \begin_inset Flex Code
11597 \begin_layout Plain Layout
11603 ] The category for this style.
11604 This is used to group related styles in the style combobox on the toolbar.
11605 Any string can be used, but you may want to use existing categories with
11610 \begin_layout Description
11611 \begin_inset Flex Code
11614 \begin_layout Plain Layout
11620 Depth of XML command.
11621 Used only with XML-type formats.
11624 \begin_layout Description
11625 \begin_inset Flex Code
11628 \begin_layout Plain Layout
11635 \begin_inset Flex Code
11638 \begin_layout Plain Layout
11644 ] Copies all the features of an existing style into the current one.
11648 \begin_layout Description
11649 \begin_inset Flex Code
11652 \begin_layout Plain Layout
11659 \begin_inset Flex Code
11662 \begin_layout Plain Layout
11668 ] The name of a style whose preamble should be output
11673 This allows to ensure some ordering of the preamble snippets when macros
11674 definitions depend on one another.
11678 \begin_layout Plain Layout
11679 Note that, besides that functionality, there is no way to ensure any ordering
11681 The ordering that you see in a given version of \SpecialChar LyX
11682 may change without warning
11691 \begin_layout Description
11692 \begin_inset Flex Code
11695 \begin_layout Plain Layout
11702 \begin_inset Flex Code
11705 \begin_layout Plain Layout
11710 , Box, Filled_Box, Static
11715 ] The type of label that stands at the end of the paragraph (or sequence
11717 \begin_inset Flex Code
11720 \begin_layout Plain Layout
11727 \begin_inset Newline newline
11731 \begin_inset Flex Code
11734 \begin_layout Plain Layout
11741 \begin_inset Flex Code
11744 \begin_layout Plain Layout
11751 \begin_inset Flex Code
11754 \begin_layout Plain Layout
11762 \begin_inset Flex Code
11765 \begin_layout Plain Layout
11772 \begin_inset Quotes eld
11776 \begin_inset Quotes erd
11780 \begin_inset Flex Code
11783 \begin_layout Plain Layout
11790 \begin_inset space \space{}
11794 \begin_inset Flex Code
11797 \begin_layout Plain Layout
11803 ) is a white (resp.
11804 \begin_inset space ~
11807 black) square suitable for end of proof markers,
11808 \begin_inset Flex Code
11811 \begin_layout Plain Layout
11817 is an explicit text string.
11820 \begin_layout Description
11821 \begin_inset Flex Code
11824 \begin_layout Plain Layout
11831 \begin_inset Flex Code
11834 \begin_layout Plain Layout
11840 ] The string used for a label with a
11841 \begin_inset Flex Code
11844 \begin_layout Plain Layout
11851 \begin_inset Newline newline
11855 \begin_inset Flex Code
11858 \begin_layout Plain Layout
11868 \begin_layout Description
11869 \begin_inset Flex Code
11872 \begin_layout Plain Layout
11878 The font used for both the text body
11884 \begin_inset CommandInset ref
11886 reference "subsec:Font-description"
11891 Note that defining this font automatically defines the
11892 \begin_inset Flex Code
11895 \begin_layout Plain Layout
11902 So you should define this one first if you also want to define
11903 \begin_inset Flex Code
11906 \begin_layout Plain Layout
11915 \begin_layout Description
11916 \begin_inset Flex Code
11919 \begin_layout Plain Layout
11926 \begin_inset Flex Code
11929 \begin_layout Plain Layout
11935 ] Used for backporting new styles to stable \SpecialChar LyX
11937 The first stable version that supports this tag is \SpecialChar LyX
11939 The argument is a number which may either be 0, -1 or any value greater
11942 \begin_inset Flex Code
11945 \begin_layout Plain Layout
11951 flag of a style is greater than zero, it will always be written to the
11953 If a .lyx file is read, the style definitions from the document header are
11954 added to the document class.
11955 Therefore even older \SpecialChar LyX
11956 versions can handle the style.
11958 \begin_inset Flex Code
11961 \begin_layout Plain Layout
11967 is a version number: If the style is read, and the version number is less
11968 than the version number of the already existing style in the document class,
11969 the new style is ignored.
11970 If the version number is greater, the new style replaces the existing style.
11971 A value of -1 means an infinite version number, i.
11972 \begin_inset space \thinspace{}
11976 \begin_inset space \space{}
11979 the style is always used.
11982 \begin_layout Description
11983 \begin_inset Flex Code
11986 \begin_layout Plain Layout
11993 \begin_inset Flex Code
11996 \begin_layout Plain Layout
12005 \begin_inset space \thinspace{}
12009 \begin_inset Flex Code
12012 \begin_layout Plain Layout
12018 ] Usually \SpecialChar LyX
12019 does not allow you to insert more than one space between words,
12020 since a space is considered as the separation between two words, not a
12021 character or symbol of its own.
12022 This is a very fine thing but sometimes annoying, for example, when typing
12023 program code or plain \SpecialChar LaTeX
12026 \begin_inset Flex Code
12029 \begin_layout Plain Layout
12036 Note that \SpecialChar LyX
12037 will create protected blanks for the additional blanks when
12038 in another mode than \SpecialChar LaTeX
12042 \begin_layout Description
12043 \begin_inset Flex Code
12046 \begin_layout Plain Layout
12052 These tags are used with XHTML output.
12054 \begin_inset CommandInset ref
12056 reference "subsec:Paragraph-Style-XHTML"
12063 \begin_layout Description
12064 \begin_inset Flex Code
12067 \begin_layout Plain Layout
12073 [FIXME] (Used only with XML-type formats.)
12076 \begin_layout Description
12077 \begin_inset Flex Code
12080 \begin_layout Plain Layout
12087 \begin_inset Flex Code
12090 \begin_layout Plain Layout
12099 \begin_inset space \thinspace{}
12103 \begin_inset Flex Code
12106 \begin_layout Plain Layout
12113 \begin_inset Flex Code
12116 \begin_layout Plain Layout
12122 , marks the style as to be included in the document preamble and not in
12124 This is useful for document classes that want such information as the title
12125 and author to appear in the preamble.
12126 Note that this works only for styles for which the
12127 \begin_inset Flex Code
12130 \begin_layout Plain Layout
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12147 \begin_inset Flex Code
12150 \begin_layout Plain Layout
12159 \begin_layout Description
12160 \begin_inset Flex Code
12163 \begin_layout Plain Layout
12170 \begin_inset Flex Code
12173 \begin_layout Plain Layout
12182 \begin_inset space \thinspace{}
12186 \begin_inset Flex Code
12189 \begin_layout Plain Layout
12196 \begin_inset Flex Code
12199 \begin_layout Plain Layout
12205 , marks the style as being part of a title block (see also the
12206 \begin_inset Flex Code
12209 \begin_layout Plain Layout
12216 \begin_inset Flex Code
12219 \begin_layout Plain Layout
12228 \begin_layout Description
12229 \begin_inset Flex Code
12232 \begin_layout Plain Layout
12239 \begin_inset Flex Code
12242 \begin_layout Plain Layout
12248 ] The \SpecialChar LaTeX
12249 command sequence declaring an item in a list.
12250 The command is to be defined without the preceding backslash (the default
12252 \begin_inset Quotes eld
12256 \begin_inset Quotes erd
12260 \begin_inset Flex Code
12263 \begin_layout Plain Layout
12271 in the \SpecialChar LaTeX
12275 \begin_layout Description
12276 \begin_inset Flex Code
12279 \begin_layout Plain Layout
12286 \begin_inset Flex Code
12289 \begin_layout Plain Layout
12295 ] This provides extra space between paragraphs that have the same style.
12296 If you put other styles into an environment, each is separated with the
12298 \begin_inset Flex Code
12301 \begin_layout Plain Layout
12308 But the whole items of the environment are additionally separated with
12310 \begin_inset Flex Code
12313 \begin_layout Plain Layout
12320 Note that this is a
12325 \begin_layout Description
12326 \begin_inset Flex Code
12329 \begin_layout Plain Layout
12335 [FIXME] (Used only with XML-type formats.)
12338 \begin_layout Description
12339 \begin_inset Flex Code
12342 \begin_layout Plain Layout
12349 \begin_inset Flex Code
12352 \begin_layout Plain Layout
12361 \begin_inset space \thinspace{}
12365 \begin_inset Flex Code
12368 \begin_layout Plain Layout
12374 ] Usually \SpecialChar LyX
12375 does not allow you to leave a paragraph empty, since it would
12376 lead to empty \SpecialChar LaTeX
12378 There are some cases where this could be desirable however: in a letter
12379 template, the required fields can be provided as empty fields, so that
12380 people do not forget them; in some special classes, a style can be used
12381 as some kind of break, which does not contain actual text.
12384 \begin_layout Description
12385 \begin_inset Flex Code
12388 \begin_layout Plain Layout
12395 \begin_inset Flex Code
12398 \begin_layout Plain Layout
12404 ] The vertical space between the label and the text body.
12405 Only used for labels that are above the text body (
12406 \begin_inset Flex Code
12409 \begin_layout Plain Layout
12416 \begin_inset Newline newline
12420 \begin_inset Flex Code
12423 \begin_layout Plain Layout
12424 Centered_Top_Environment
12432 \begin_layout Description
12433 \begin_inset Flex Code
12436 \begin_layout Plain Layout
12443 \begin_inset Flex Code
12446 \begin_layout Plain Layout
12452 ] The name of the counter for automatic numbering.
12453 In order to have the counter appear with your label, you will need to reference
12455 \begin_inset Flex Code
12458 \begin_layout Plain Layout
12467 This will work with
12468 \begin_inset Flex Code
12471 \begin_layout Plain Layout
12478 \begin_inset Flex Code
12481 \begin_layout Plain Layout
12488 \begin_inset Flex Code
12491 \begin_layout Plain Layout
12498 \begin_inset Flex Code
12501 \begin_layout Plain Layout
12508 \begin_inset Newline newline
12516 \begin_inset Flex Code
12519 \begin_layout Plain Layout
12526 \begin_inset Flex Code
12529 \begin_layout Plain Layout
12535 , though this case is a bit complicated.
12536 Suppose you declare
12537 \begin_inset Quotes eld
12541 \begin_inset Flex Code
12544 \begin_layout Plain Layout
12545 LabelCounter myenum
12551 \begin_inset Quotes erd
12555 Then the actual counters used are
12556 \begin_inset Flex Code
12559 \begin_layout Plain Layout
12566 \begin_inset Flex Code
12569 \begin_layout Plain Layout
12576 \begin_inset Flex Code
12579 \begin_layout Plain Layout
12586 \begin_inset Flex Code
12589 \begin_layout Plain Layout
12595 , much as in \SpecialChar LaTeX
12597 These counters must all be declared separately.
12598 \begin_inset Newline newline
12602 \begin_inset CommandInset ref
12604 reference "subsec:Counters"
12608 for details on counters.
12611 \begin_layout Description
12612 \begin_inset Flex Code
12615 \begin_layout Plain Layout
12621 The font used for the label.
12623 \begin_inset CommandInset ref
12625 reference "subsec:Font-description"
12632 \begin_layout Description
12633 \begin_inset Flex Code
12636 \begin_layout Plain Layout
12643 \begin_inset Flex Code
12646 \begin_layout Plain Layout
12652 ] Text that indicates how far a label should be indented.
12655 \begin_layout Description
12656 \begin_inset Flex Code
12659 \begin_layout Plain Layout
12666 \begin_inset Flex Code
12669 \begin_layout Plain Layout
12675 ] Text that indicates the amount of horizontal space between the label and
12677 Only used for labels that are not above the text body.
12680 \begin_layout Description
12681 \begin_inset Flex Code
12684 \begin_layout Plain Layout
12691 \begin_inset Flex Code
12694 \begin_layout Plain Layout
12700 ] The string used for the label.
12702 \begin_inset Flex Code
12705 \begin_layout Plain Layout
12711 is set, this string can be contain the special formatting commands described
12713 \begin_inset CommandInset ref
12715 reference "subsec:Counters"
12722 \begin_layout Description
12723 \begin_inset Flex Code
12726 \begin_layout Plain Layout
12727 LabelStringAppendix
12733 \begin_inset Flex Code
12736 \begin_layout Plain Layout
12742 ] This is used inside the appendix instead of
12743 \begin_inset Newline newline
12747 \begin_inset Flex Code
12750 \begin_layout Plain Layout
12758 \begin_inset Flex Code
12761 \begin_layout Plain Layout
12768 \begin_inset Newline newline
12772 \begin_inset Flex Code
12775 \begin_layout Plain Layout
12776 LabelStringAppendix
12784 \begin_layout Description
12785 \begin_inset Flex Code
12788 \begin_layout Plain Layout
12794 [FIXME] (Used only with XML-type formats.)
12797 \begin_layout Description
12798 \begin_inset Flex Code
12801 \begin_layout Plain Layout
12808 \begin_inset Flex Code
12811 \begin_layout Plain Layout
12816 , Manual, Static, Above,
12817 \begin_inset Newline newline
12820 Centered, Sensitive, Enumerate,
12821 \begin_inset Newline newline
12824 Itemize, Bibliography
12830 \begin_inset Separator parbreak
12837 \begin_layout Description
12838 \begin_inset Flex Code
12841 \begin_layout Plain Layout
12847 means the label is the very first word (up to the first real blank).
12848 Use protected spaces if you want more than one word as the label.
12852 \begin_layout Description
12853 \begin_inset Flex Code
12856 \begin_layout Plain Layout
12862 means the label is simply what is declared as
12863 \begin_inset Flex Code
12866 \begin_layout Plain Layout
12873 This will be displayed
12874 \begin_inset Quotes eld
12878 \begin_inset Quotes erd
12881 , at the beginning of the paragraph.
12883 \begin_inset Flex Code
12886 \begin_layout Plain Layout
12893 \begin_inset Flex Code
12896 \begin_layout Plain Layout
12902 , then it will be displayed only in the first paragraph of any sequence
12903 of paragraphs with the same
12904 \begin_inset Flex Code
12907 \begin_layout Plain Layout
12916 \begin_layout Description
12917 \begin_inset Flex Code
12920 \begin_layout Plain Layout
12927 \begin_inset space ~
12931 \begin_inset space ~
12935 \begin_inset Flex Code
12938 \begin_layout Plain Layout
12944 are special cases of
12945 \begin_inset Flex Code
12948 \begin_layout Plain Layout
12955 The label will be printed above the paragraph either at the beginning of
12956 the line or centered.
12959 \begin_layout Description
12960 \begin_inset Flex Code
12963 \begin_layout Plain Layout
12969 is a special case for the caption-labels
12970 \begin_inset Quotes eld
12974 \begin_inset Quotes erd
12978 \begin_inset Quotes eld
12982 \begin_inset Quotes erd
12986 \begin_inset Newline newline
12990 \begin_inset Flex Code
12993 \begin_layout Plain Layout
12999 means the (hardcoded) label string depends on the kind of float: It is
13000 hardcoded to be `FloatType N', where N is the value of the counter associated
13002 For the case that a caption is inserted outside of a float the
13003 \begin_inset Flex Code
13006 \begin_layout Plain Layout
13013 \begin_inset Quotes eld
13017 \begin_inset Quotes erd
13023 \begin_layout Description
13024 \begin_inset Flex Code
13027 \begin_layout Plain Layout
13033 produces the usual sort of enumeration labels.
13034 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13035 small Roman numerals, and uppercase letters for the four possible depths.
13038 \begin_layout Description
13039 \begin_inset Flex Code
13042 \begin_layout Plain Layout
13048 produces various bullets at the different levels.
13049 It is also hardcoded.
13052 \begin_layout Description
13053 \begin_inset Flex Code
13056 \begin_layout Plain Layout
13062 should be used only with
13063 \begin_inset Flex Code
13066 \begin_layout Plain Layout
13067 LatexType BibEnvironment
13076 \begin_layout Description
13077 \begin_inset Flex Code
13080 \begin_layout Plain Layout
13086 Note that this will completely override any prior
13087 \begin_inset Flex Code
13090 \begin_layout Plain Layout
13096 declaration for this style.
13098 \begin_inset Quotes eld
13102 \begin_inset Flex Code
13105 \begin_layout Plain Layout
13112 \begin_inset Quotes erd
13117 \begin_inset CommandInset ref
13119 reference "subsec:I18n"
13123 for details on its use.
13126 \begin_layout Description
13127 \begin_inset Flex Code
13130 \begin_layout Plain Layout
13137 \begin_inset Flex Code
13140 \begin_layout Plain Layout
13146 ] The name of the corresponding \SpecialChar LaTeX
13148 Either the environment or command name.
13151 \begin_layout Description
13152 \begin_inset Flex Code
13155 \begin_layout Plain Layout
13162 \begin_inset Flex Code
13165 \begin_layout Plain Layout
13171 ] An optional parameter for the corresponding
13172 \begin_inset Flex Code
13175 \begin_layout Plain Layout
13182 This parameter cannot be changed from within \SpecialChar LyX
13184 \begin_inset Flex Code
13187 \begin_layout Plain Layout
13193 for customizable parameters).
13194 This will be output as is after all \SpecialChar LaTeX
13196 \begin_inset Flex Code
13199 \begin_layout Plain Layout
13208 \begin_layout Description
13209 \begin_inset Flex Code
13212 \begin_layout Plain Layout
13219 \begin_inset Flex Code
13222 \begin_layout Plain Layout
13227 , Command, Environment, Item_Environment,
13228 \begin_inset Newline newline
13231 List_Environment, Bib_Environment
13236 ] How the style should be translated into \SpecialChar LaTeX
13241 \begin_layout Plain Layout
13242 \begin_inset Flex Code
13245 \begin_layout Plain Layout
13251 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13252 Visit the SGML class files for specific examples.
13258 \begin_inset Separator parbreak
13265 \begin_layout Description
13266 \begin_inset Flex Code
13269 \begin_layout Plain Layout
13275 means nothing special.
13278 \begin_layout Description
13279 \begin_inset Flex Code
13282 \begin_layout Plain Layout
13289 \begin_inset Flex Code
13292 \begin_layout Plain Layout
13299 {\SpecialChar ldots
13308 \begin_layout Description
13309 \begin_inset Flex Code
13312 \begin_layout Plain Layout
13319 \begin_inset Flex Code
13322 \begin_layout Plain Layout
13329 }\SpecialChar ldots
13345 \begin_layout Description
13346 \begin_inset Flex Code
13349 \begin_layout Plain Layout
13356 \begin_inset Flex Code
13359 \begin_layout Plain Layout
13366 \begin_inset Flex Code
13369 \begin_layout Plain Layout
13377 is generated for each paragraph of this environment.
13381 \begin_layout Description
13382 \begin_inset Flex Code
13385 \begin_layout Plain Layout
13392 \begin_inset Flex Code
13395 \begin_layout Plain Layout
13402 \begin_inset Newline newline
13406 \begin_inset Flex Code
13409 \begin_layout Plain Layout
13415 is passed as an argument to the environment.
13416 \begin_inset Newline newline
13420 \begin_inset Flex Code
13423 \begin_layout Plain Layout
13429 can be defined in the
13430 \begin_inset Flex MenuItem
13433 \begin_layout Plain Layout
13434 Edit\SpecialChar menuseparator
13436 \begin_inset space ~
13447 \begin_layout Description
13448 \begin_inset Flex Code
13451 \begin_layout Plain Layout
13458 \begin_inset Flex Code
13461 \begin_layout Plain Layout
13467 but adds additionally the necessary mandatory argument (the longest label)
13468 to the begin statement of the bibliography environment:
13469 \begin_inset Newline newline
13473 \begin_inset Flex Code
13476 \begin_layout Plain Layout
13479 begin{thebibliography}{99}
13484 It is therefore only useful for bibliography environments.
13485 The default longest label
13486 \begin_inset Quotes eld
13490 \begin_inset Quotes erd
13493 can be changed by the user in the paragraph settings of a bibliography
13497 \begin_layout Standard
13498 Putting the last few things together, the \SpecialChar LaTeX
13499 output will be either:
13502 \begin_layout LyX-Code
13505 LatexName[LatexParam]{\SpecialChar ldots
13509 \begin_layout Standard
13513 \begin_layout LyX-Code
13516 begin{LatexName}[LatexParam] \SpecialChar ldots
13522 \begin_layout Standard
13523 depending upon the \SpecialChar LaTeX
13528 \begin_layout Description
13529 \begin_inset Flex Code
13532 \begin_layout Plain Layout
13539 \begin_inset Flex Code
13542 \begin_layout Plain Layout
13548 ] A string that is put at the beginning of the style content.
13549 A line break in the output can be indicated by
13550 \begin_inset Flex Code
13553 \begin_layout Plain Layout
13562 \begin_layout Description
13563 \begin_inset Flex Code
13566 \begin_layout Plain Layout
13573 \begin_inset Flex Code
13576 \begin_layout Plain Layout
13582 ] If you put styles into environments, the different
13583 \begin_inset Flex Code
13586 \begin_layout Plain Layout
13592 are not simply added, but added with a factor
13593 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13597 Note that this parameter is also used when
13598 \begin_inset Flex Code
13601 \begin_layout Plain Layout
13608 \begin_inset Flex Code
13611 \begin_layout Plain Layout
13618 \begin_inset Flex Code
13621 \begin_layout Plain Layout
13628 Then it is added to the manual or dynamic margin.
13629 \begin_inset Newline newline
13633 \begin_inset Quotes eld
13637 \begin_inset Flex Code
13640 \begin_layout Plain Layout
13647 \begin_inset Quotes erd
13650 means that the paragraph is indented with the width of
13651 \begin_inset Quotes eld
13655 \begin_inset Flex Code
13658 \begin_layout Plain Layout
13665 \begin_inset Quotes erd
13668 in the normal font.
13669 You can get a negative width by prefixing the string with
13670 \begin_inset Quotes eld
13674 \begin_inset Flex Code
13677 \begin_layout Plain Layout
13684 \begin_inset Quotes erd
13688 This way was chosen so that the look is the same with each used screen
13692 \begin_layout Description
13693 \begin_inset Flex Code
13696 \begin_layout Plain Layout
13703 \begin_inset Flex Code
13706 \begin_layout Plain Layout
13711 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13717 \begin_inset Newline newline
13720 The kind of margin that the style has on the left side.
13721 \begin_inset Separator parbreak
13728 \begin_layout Description
13729 \begin_inset Flex Code
13732 \begin_layout Plain Layout
13738 just means a fixed margin.
13741 \begin_layout Description
13742 \begin_inset Flex Code
13745 \begin_layout Plain Layout
13751 means that the left margin depends on the string entered in the
13752 \begin_inset Flex MenuItem
13755 \begin_layout Plain Layout
13756 Edit\SpecialChar menuseparator
13758 \begin_inset space ~
13767 This is used to typeset nice lists without tabulators.
13770 \begin_layout Description
13771 \begin_inset Flex Code
13774 \begin_layout Plain Layout
13780 means that the margin depends on the size of the label.
13781 This is used for automatic enumerated headlines.
13782 It is obvious that the headline
13783 \begin_inset Quotes eld
13786 5.4.3.2.1 Very long headline
13787 \begin_inset Quotes erd
13790 must have a wider left margin (as wide as
13791 \begin_inset Quotes eld
13795 \begin_inset Quotes erd
13798 plus the space) than
13799 \begin_inset Quotes eld
13802 3.2 Very long headline
13803 \begin_inset Quotes erd
13807 \begin_inset Quotes eld
13811 \begin_inset Quotes erd
13814 are not able to do this.
13817 \begin_layout Description
13818 \begin_inset Flex Code
13821 \begin_layout Plain Layout
13827 is similar, but only the very first row of the paragraph is dynamic, while
13828 the others are static; this is used, for example, for descriptions.
13831 \begin_layout Description
13832 \begin_inset Flex Code
13835 \begin_layout Plain Layout
13841 means the margin is chosen in a way that the longest row of this paragraph
13842 fits to the right margin.
13843 This is used to typeset an address on the right edge of the page.
13847 \begin_layout Description
13848 \begin_inset Flex Code
13851 \begin_layout Plain Layout
13858 \begin_inset Flex Code
13861 \begin_layout Plain Layout
13870 \begin_inset space \thinspace{}
13874 \begin_inset Flex Code
13877 \begin_layout Plain Layout
13883 ] Whether fragile commands in this style should be
13884 \begin_inset Flex Code
13887 \begin_layout Plain Layout
13900 whether this command should itself be protected.)
13903 \begin_layout Description
13904 \begin_inset Flex Code
13907 \begin_layout Plain Layout
13914 \begin_inset Flex Code
13917 \begin_layout Plain Layout
13924 \begin_inset space \thinspace{}
13928 \begin_inset Flex Code
13931 \begin_layout Plain Layout
13939 ] Whether newlines are translated into \SpecialChar LaTeX
13941 \begin_inset Flex Code
13944 \begin_layout Plain Layout
13955 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
13957 inside \SpecialChar LyX
13961 \begin_layout Description
13962 \begin_inset Flex Code
13965 \begin_layout Plain Layout
13972 \begin_inset Flex Code
13975 \begin_layout Plain Layout
13984 \begin_inset space \thinspace{}
13988 \begin_inset Flex Code
13991 \begin_layout Plain Layout
13997 ] If set to true, and if
13998 \begin_inset Flex Code
14001 \begin_layout Plain Layout
14008 \begin_inset Flex Code
14011 \begin_layout Plain Layout
14017 ) paragraphs are being indented, then the indentation of such a paragraph
14018 following one of this type will be suppressed.
14019 (So this will not affect the display of non-default paragraphs.)
14022 \begin_layout Description
14023 \begin_inset Flex Code
14026 \begin_layout Plain Layout
14033 \begin_inset Flex Code
14036 \begin_layout Plain Layout
14042 ] Name of a style that has replaced this style.
14043 This is used to rename a style, while keeping backward compatibility.
14046 \begin_layout Description
14047 \begin_inset Flex Code
14050 \begin_layout Plain Layout
14057 \begin_inset Flex Code
14060 \begin_layout Plain Layout
14067 \begin_inset space \thinspace{}
14071 \begin_inset Flex Code
14074 \begin_layout Plain Layout
14080 ] Determines whether consecutive pragraphs of the same type are treated
14081 as belonging together.
14082 This has the effect that the
14083 \begin_inset Flex Code
14086 \begin_layout Plain Layout
14092 is only printed once before such a group.
14093 By default, this is true for
14094 \begin_inset Flex Code
14097 \begin_layout Plain Layout
14104 \begin_inset Flex Code
14107 \begin_layout Plain Layout
14114 \begin_inset Flex Code
14117 \begin_layout Plain Layout
14123 and false for all other types.
14126 \begin_layout Description
14127 \begin_inset Flex Code
14130 \begin_layout Plain Layout
14137 \begin_inset Flex Code
14140 \begin_layout Plain Layout
14149 \begin_inset space \thinspace{}
14153 \begin_inset Flex Code
14156 \begin_layout Plain Layout
14162 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14164 but only by a line break; together with
14165 \begin_inset Flex Code
14168 \begin_layout Plain Layout
14174 , this allows to emulate a plain text editor (like the ERT inset).
14177 \begin_layout Description
14178 \begin_inset Flex Code
14181 \begin_layout Plain Layout
14188 \begin_inset Flex Code
14191 \begin_layout Plain Layout
14197 ] The indent of the very first line of a paragraph.
14199 \begin_inset Newline newline
14203 \begin_inset Flex Code
14206 \begin_layout Plain Layout
14212 will be fixed for a certain style.
14213 The exception is the default style, since the indentation for these paragraphs
14214 can be prohibited with
14215 \begin_inset Flex Code
14218 \begin_layout Plain Layout
14226 \begin_inset Flex Code
14229 \begin_layout Plain Layout
14235 style paragraphs inside environments use the
14236 \begin_inset Flex Code
14239 \begin_layout Plain Layout
14245 of the environment, not their native one.
14247 \begin_inset Flex Code
14250 \begin_layout Plain Layout
14256 paragraphs inside an enumeration are not indented.
14259 \begin_layout Description
14260 \begin_inset Flex Code
14263 \begin_layout Plain Layout
14270 \begin_inset Flex Code
14273 \begin_layout Plain Layout
14279 ] The vertical space between two paragraphs of this style.
14282 \begin_layout Description
14283 \begin_inset Flex Code
14286 \begin_layout Plain Layout
14293 \begin_inset Flex Code
14296 \begin_layout Plain Layout
14303 allows the user to choose either
14304 \begin_inset Quotes eld
14308 \begin_inset Quotes erd
14312 \begin_inset Quotes eld
14316 \begin_inset Quotes erd
14319 to separate paragraphs.
14321 \begin_inset Quotes eld
14325 \begin_inset Quotes erd
14329 \begin_inset Flex Code
14332 \begin_layout Plain Layout
14340 \begin_inset Quotes eld
14344 \begin_inset Quotes erd
14348 \begin_inset Flex Code
14351 \begin_layout Plain Layout
14357 is ignored and all paragraphs are separated by the
14358 \begin_inset Flex Code
14361 \begin_layout Plain Layout
14368 The vertical space is calculated with
14369 \begin_inset Flex Code
14372 \begin_layout Plain Layout
14374 \begin_inset space ~
14383 \begin_inset Flex Code
14386 \begin_layout Plain Layout
14392 is the height of a row with the normal font.
14393 This way, the look stays the same with different screen fonts.
14396 \begin_layout Description
14397 \begin_inset Flex Code
14400 \begin_layout Plain Layout
14407 \begin_inset Flex Code
14410 \begin_layout Plain Layout
14419 \begin_inset space \thinspace{}
14423 \begin_inset Flex Code
14426 \begin_layout Plain Layout
14432 ] Whether the contents of this paragraph should be output in raw form, meaning
14433 without special translations that \SpecialChar LaTeX
14437 \begin_layout Description
14438 \begin_inset Flex Code
14441 \begin_layout Plain Layout
14448 \begin_inset Flex Code
14451 \begin_layout Plain Layout
14461 Defines individual characters that should be output in raw form, meaning
14462 without special translations that \SpecialChar LaTeX
14466 \begin_layout Description
14467 \begin_inset Flex Code
14470 \begin_layout Plain Layout
14476 Information to be included in the \SpecialChar LaTeX
14477 preamble when this style is used.
14478 Used to define macros, load packages, etc., required by this particular
14481 \begin_inset Quotes eld
14485 \begin_inset Flex Code
14488 \begin_layout Plain Layout
14495 \begin_inset Quotes erd
14501 \begin_layout Description
14502 \begin_inset Flex Code
14505 \begin_layout Plain Layout
14512 \begin_inset Flex Code
14515 \begin_layout Plain Layout
14521 ] The prefix to use when creating labels referring to paragraphs of this
14523 This allows the use of formatted references.
14526 \begin_layout Description
14527 \begin_inset Flex Code
14530 \begin_layout Plain Layout
14537 \begin_inset Flex Code
14540 \begin_layout Plain Layout
14546 ] Whether the style requires the feature
14547 \begin_inset Flex Code
14550 \begin_layout Plain Layout
14557 \begin_inset CommandInset ref
14559 reference "chap:List-of-functions"
14563 for the list of features).
14564 If you require a package with specific options, you can additionally use
14566 \begin_inset Flex Code
14569 \begin_layout Plain Layout
14575 as a general text class parameter (see
14576 \begin_inset CommandInset ref
14578 reference "subsec:General-text-class"
14585 \begin_layout Description
14586 \begin_inset Flex Code
14589 \begin_layout Plain Layout
14596 \begin_inset Flex Code
14599 \begin_layout Plain Layout
14608 \begin_inset Flex Code
14611 \begin_layout Plain Layout
14617 ] Resets the \SpecialChar LaTeX
14618 arguments of this style (as defined via the
14619 \begin_inset Flex Code
14622 \begin_layout Plain Layout
14629 This is useful if you have copied a style via
14630 \begin_inset Flex Code
14633 \begin_layout Plain Layout
14639 , but you do not want to inherit its (required and optional) arguments.
14642 \begin_layout Description
14643 \begin_inset Flex Code
14646 \begin_layout Plain Layout
14653 \begin_inset Flex Code
14656 \begin_layout Plain Layout
14662 ] A string that is put at the end of the layout content.
14663 A line break in the output can be indicated by
14664 \begin_inset Flex Code
14667 \begin_layout Plain Layout
14676 \begin_layout Description
14677 \begin_inset Flex Code
14680 \begin_layout Plain Layout
14687 \begin_inset Flex Code
14690 \begin_layout Plain Layout
14697 \begin_inset Flex Code
14700 \begin_layout Plain Layout
14709 \begin_layout Description
14710 \begin_inset Flex Code
14713 \begin_layout Plain Layout
14720 \begin_inset Flex Code
14723 \begin_layout Plain Layout
14732 \begin_inset Flex Code
14735 \begin_layout Plain Layout
14742 \begin_inset Flex Code
14745 \begin_layout Plain Layout
14752 \begin_inset Flex Code
14755 \begin_layout Plain Layout
14757 \begin_inset space ~
14765 ] This defines what the default spacing should be in the style.
14767 \begin_inset Flex Code
14770 \begin_layout Plain Layout
14777 \begin_inset Flex Code
14780 \begin_layout Plain Layout
14787 \begin_inset Flex Code
14790 \begin_layout Plain Layout
14796 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14797 If you specify the argument
14798 \begin_inset Flex Code
14801 \begin_layout Plain Layout
14807 , then you must also provide a value argument which will be the actual multiplie
14809 Note that, contrary to other parameters,
14810 \begin_inset Flex Code
14813 \begin_layout Plain Layout
14819 implies the generation of specific \SpecialChar LaTeX
14820 code, using the \SpecialChar LaTeX
14824 \begin_inset Flex Code
14827 \begin_layout Plain Layout
14836 \begin_layout Description
14837 \begin_inset Flex Code
14840 \begin_layout Plain Layout
14847 \begin_inset Flex Code
14850 \begin_layout Plain Layout
14857 \begin_inset space \thinspace{}
14861 \begin_inset Flex Code
14864 \begin_layout Plain Layout
14872 ] Allow spell-checking paragraphs of this style.
14876 \begin_layout Description
14877 \begin_inset Flex Code
14880 \begin_layout Plain Layout
14886 The font used for the text body .
14888 \begin_inset CommandInset ref
14890 reference "subsec:Font-description"
14897 \begin_layout Description
14898 \begin_inset Flex Code
14901 \begin_layout Plain Layout
14910 \begin_inset Flex Code
14913 \begin_layout Plain Layout
14923 The level of the style in the table of contents.
14924 This is used for automatic numbering of section headings.
14927 \begin_layout Description
14928 \begin_inset Flex Code
14931 \begin_layout Plain Layout
14940 \begin_inset Flex Code
14943 \begin_layout Plain Layout
14954 \begin_inset Flex Code
14957 \begin_layout Plain Layout
14964 \begin_inset Flex Code
14967 \begin_layout Plain Layout
14973 ] This tag determines whether the first line indentation of this paragraph
14974 can be toggled via the Paragraph settings dialog.
14978 \begin_inset Flex Code
14981 \begin_layout Plain Layout
14991 is set, indentation can be toggled if the document settings use
14992 \begin_inset Quotes eld
14996 \begin_inset Quotes erd
14999 paragraph style, with
15000 \begin_inset Flex Code
15003 \begin_layout Plain Layout
15009 , indentation can always be toggled, notwithstanding the document settings,
15011 \begin_inset Flex Code
15014 \begin_layout Plain Layout
15020 , indentation can never be toggled.
15023 \begin_layout Description
15024 \begin_inset Flex Code
15027 \begin_layout Plain Layout
15034 \begin_inset Flex Code
15037 \begin_layout Plain Layout
15043 ] The vertical space with which the very first of a chain of paragraphs
15044 with this style is separated from the previous paragraph.
15045 If the previous paragraph has another style, the separations are not simply
15046 added, but the maximum is taken.
15049 \begin_layout Subsection
15050 \begin_inset CommandInset label
15056 Internationalization of Paragraph Styles
15059 \begin_layout Standard
15061 has long supported internationalization of layout information, but, until
15062 version 2.0, this applied only to the user interface and not to, say, PDF
15064 Thus, French authors were forced to resort to ugly hacks if they wanted
15069 1' instead of `Theorem 1'.
15070 Thanks to Georg Baum, that is no longer the case.
15073 \begin_layout Standard
15075 \begin_inset Flex Code
15078 \begin_layout Plain Layout
15084 defines text that is to appear in the typeset document, it may use
15085 \begin_inset Flex Code
15088 \begin_layout Plain Layout
15095 \begin_inset Flex Code
15098 \begin_layout Plain Layout
15104 to support non-English and even multi-language documents correctly.
15105 The following excerpt (from the
15106 \begin_inset Flex Code
15109 \begin_layout Plain Layout
15115 file) shows how this works:
15118 \begin_layout LyX-Code
15120 \begin_inset Separator parbreak
15127 \begin_layout LyX-Code
15130 theoremstyle{remark}
15133 \begin_layout LyX-Code
15136 newtheorem{claim}[thm]{
15143 \begin_layout LyX-Code
15147 \begin_layout LyX-Code
15151 \begin_layout LyX-Code
15156 claimname}{_(Claim)}
15159 \begin_layout LyX-Code
15163 \begin_layout LyX-Code
15167 \begin_layout LyX-Code
15176 claimname}{_(Claim)}}
15179 \begin_layout LyX-Code
15184 \begin_layout Standard
15185 In principle, any legal \SpecialChar LaTeX
15187 \begin_inset Flex Code
15190 \begin_layout Plain Layout
15197 \begin_inset Flex Code
15200 \begin_layout Plain Layout
15206 tags, but in practice they will typically look as they do here.
15207 The key to correct translation of the typeset text is the definition of
15208 the \SpecialChar LaTeX
15210 \begin_inset Flex Code
15213 \begin_layout Plain Layout
15222 \begin_inset Flex Code
15225 \begin_layout Plain Layout
15237 \begin_layout Standard
15239 \begin_inset Flex Code
15242 \begin_layout Plain Layout
15248 tag provides for internationalization based upon the overall language of
15250 The contents of the tag will be included in the preamble, just as with
15252 \begin_inset Flex Code
15255 \begin_layout Plain Layout
15262 What makes it special is the use of the
15263 \begin_inset Quotes eld
15267 \begin_inset Quotes erd
15271 \begin_inset Flex Code
15274 \begin_layout Plain Layout
15280 , which will be replaced, when \SpecialChar LyX
15281 produces \SpecialChar LaTeX
15282 output, with the translation of
15283 its argument into the document language.
15286 \begin_layout Standard
15288 \begin_inset Flex Code
15291 \begin_layout Plain Layout
15297 tag is more complex, since it is meant to provide support for multi-language
15298 documents and so offers an interface to the
15299 \begin_inset Flex Code
15302 \begin_layout Plain Layout
15309 Its contents will be added to the preamble once for each language that
15310 appears in the document.
15311 In this case, the argument to
15312 \begin_inset Flex Code
15315 \begin_layout Plain Layout
15321 will be replaced with its translation into the language in question; the
15323 \begin_inset Flex Code
15326 \begin_layout Plain Layout
15332 is replaced by the language name (as used by the babel package).
15335 \begin_layout Standard
15336 A German document that also included a French section would thus have the
15337 following in the preamble:
15340 \begin_layout LyX-Code
15349 claimname}{Affirmation}}
15350 \begin_inset Newline newline
15361 claimname}{Behauptung}}
15362 \begin_inset Newline newline
15369 claimname}{Behauptung}
15372 \begin_layout Standard
15375 \begin_inset Flex Code
15378 \begin_layout Plain Layout
15384 will then conspire to produce the correct text in the output.
15387 \begin_layout Standard
15388 One important point to note here is that the translations are provided by
15390 itself, through the file
15391 \begin_inset Flex Code
15394 \begin_layout Plain Layout
15401 This means, in effect, that
15402 \begin_inset Flex Code
15405 \begin_layout Plain Layout
15412 \begin_inset Flex Code
15415 \begin_layout Plain Layout
15421 are really only of use in layout files that are provided with \SpecialChar LyX
15423 entered in user-created layout files will not be seen by \SpecialChar LyX
15424 's internationalizatio
15425 n routines unless the
15426 \begin_inset Flex Code
15429 \begin_layout Plain Layout
15435 file is modified accordingly.
15436 That said, however, any layout created with the intention that it will
15437 be included with \SpecialChar LyX
15438 should use these tags where appropriate.
15439 Please note that the paragraph style translations provided by \SpecialChar LyX
15441 change with a minor update (e.
15442 \begin_inset space \thinspace{}
15446 \begin_inset space \space{}
15449 from version 2.1.x to 2.1.y).
15450 It is however quite likely that a major update (e.
15451 \begin_inset space \thinspace{}
15455 \begin_inset space \space{}
15458 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15461 \begin_layout Subsection
15463 \begin_inset CommandInset label
15465 name "subsec:Floats"
15472 \begin_layout Standard
15473 It is necessary to define the floats (
15474 \begin_inset Flex MenuItem
15477 \begin_layout Plain Layout
15484 \begin_inset Flex MenuItem
15487 \begin_layout Plain Layout
15493 , \SpecialChar ldots
15494 ) in the text class itself.
15495 Standard floats are included in the file
15496 \begin_inset Flex Code
15499 \begin_layout Plain Layout
15505 , so you may have to do no more than add
15508 \begin_layout LyX-Code
15509 Input stdfloats.inc
15512 \begin_layout Standard
15513 to your layout file.
15514 If you want to implement a text class that proposes some other float types
15515 (like the AGU class bundled with \SpecialChar LyX
15516 ), the information below will hopefully
15520 \begin_layout Description
15521 \begin_inset Flex Code
15524 \begin_layout Plain Layout
15531 \begin_inset Flex Code
15534 \begin_layout Plain Layout
15540 =!htbpH] Allowed placement options for this float type.
15541 The value is a string of placement characters.
15542 Possible characters include:
15547 \begin_inset Quotes eld
15551 \begin_inset Quotes erd
15559 \begin_inset Quotes eld
15563 \begin_inset Quotes erd
15571 \begin_inset Quotes eld
15575 \begin_inset Quotes erd
15583 \begin_inset Quotes eld
15587 \begin_inset Quotes erd
15595 \begin_inset Quotes eld
15599 \begin_inset Quotes erd
15607 \begin_inset Quotes eld
15611 \begin_inset Quotes erd
15615 The order of the characters in the string does not matter.
15616 If no placement options are allowed, use the string
15623 \begin_layout Description
15624 \begin_inset Flex Code
15627 \begin_layout Plain Layout
15634 \begin_inset Flex Code
15637 \begin_layout Plain Layout
15646 \begin_inset space \thinspace{}
15652 \begin_inset Flex Code
15655 \begin_layout Plain Layout
15665 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15672 \begin_inset Flex Code
15675 \begin_layout Plain Layout
15681 if the float does not support this feature.
15684 \begin_layout Description
15685 \begin_inset Flex Code
15688 \begin_layout Plain Layout
15695 \begin_inset Flex Code
15698 \begin_layout Plain Layout
15707 \begin_inset space \thinspace{}
15713 \begin_inset Flex Code
15716 \begin_layout Plain Layout
15726 ] Defines whether the float has a starred variant that spans columns in
15727 a two column paragraph.
15729 \begin_inset Flex Code
15732 \begin_layout Plain Layout
15738 if the float does not support this feature.
15741 \begin_layout Description
15742 \begin_inset Flex Code
15745 \begin_layout Plain Layout
15752 \begin_inset Flex Code
15755 \begin_layout Plain Layout
15762 \begin_inset Quotes erd
15766 \begin_inset Quotes erd
15769 ] The file name extension of an auxiliary file for the list of figures (or
15772 writes the captions to this file.
15775 \begin_layout Description
15776 \begin_inset Flex Code
15779 \begin_layout Plain Layout
15786 \begin_inset Flex Code
15789 \begin_layout Plain Layout
15796 \begin_inset Quotes erd
15800 \begin_inset Quotes erd
15803 ] The string that will be used in the menus and also for the caption.
15804 This is translated to the current language if babel is used.
15807 \begin_layout Description
15808 \begin_inset Flex Code
15811 \begin_layout Plain Layout
15817 These tags control the XHTML output.
15819 \begin_inset CommandInset ref
15821 reference "sec:Tags-for-XHTML"
15828 \begin_layout Description
15829 \begin_inset Flex Code
15832 \begin_layout Plain Layout
15841 \begin_inset Flex Code
15844 \begin_layout Plain Layout
15853 \begin_inset space \thinspace{}
15857 \begin_inset Flex Code
15860 \begin_layout Plain Layout
15866 ] Indicates whether the float is already defined in the document class or
15867 if instead the \SpecialChar LaTeX
15869 \begin_inset Flex Code
15872 \begin_layout Plain Layout
15878 needs to be loaded to define it on-the-fly.
15880 \begin_inset Flex Code
15883 \begin_layout Plain Layout
15890 \begin_inset Flex Code
15893 \begin_layout Plain Layout
15900 It should be set to
15901 \begin_inset Flex Code
15904 \begin_layout Plain Layout
15910 if the float is already defined by the \SpecialChar LaTeX
15914 \begin_layout Description
15915 \begin_inset Flex Code
15918 \begin_layout Plain Layout
15925 \begin_inset Flex Code
15928 \begin_layout Plain Layout
15935 \begin_inset Quotes erd
15939 \begin_inset Quotes erd
15942 ] The command used to generate a list of floats of this type; the leading
15951 \begin_inset Flex Code
15954 \begin_layout Plain Layout
15960 is false, since there is no standard way to generate this command.
15962 \begin_inset Flex Code
15965 \begin_layout Plain Layout
15971 is true, since in that case there is a standard way to define the command.
15974 \begin_layout Description
15975 \begin_inset Flex Code
15978 \begin_layout Plain Layout
15985 \begin_inset Flex Code
15988 \begin_layout Plain Layout
15995 \begin_inset Quotes erd
15999 \begin_inset Quotes erd
16002 ] A title for a list of floats of this kind (list of figures, tables, or
16004 It is used for the screen label within \SpecialChar LyX
16005 , it is used by \SpecialChar LaTeX
16007 it is used as the title in the XHTML output.
16008 It will be translated to the document language.
16011 \begin_layout Description
16012 \begin_inset Flex Code
16015 \begin_layout Plain Layout
16022 \begin_inset Flex Code
16025 \begin_layout Plain Layout
16032 \begin_inset Quotes erd
16036 \begin_inset Quotes erd
16039 ] This (optional) argument determines whether floats of this class will
16040 be numbered within some sectional unit of the document.
16042 \begin_inset Flex Code
16045 \begin_layout Plain Layout
16052 \begin_inset Quotes eld
16056 \begin_inset Flex Code
16059 \begin_layout Plain Layout
16066 \begin_inset Quotes erd
16069 , the floats will be numbered within chapters.
16073 \begin_layout Description
16074 \begin_inset Flex Code
16077 \begin_layout Plain Layout
16084 \begin_inset Flex Code
16087 \begin_layout Plain Layout
16094 \begin_inset Quotes erd
16098 \begin_inset Quotes erd
16101 ] The default placement for the given class of floats.
16102 The string should be as in standard \SpecialChar LaTeX
16104 \begin_inset Flex Code
16107 \begin_layout Plain Layout
16114 \begin_inset Flex Code
16117 \begin_layout Plain Layout
16124 \begin_inset Flex Code
16127 \begin_layout Plain Layout
16134 \begin_inset Flex Code
16137 \begin_layout Plain Layout
16143 for top, bottom, page, and here, respectively.
16147 \begin_layout Plain Layout
16148 Note that the order of these letters in the string is irrelevant, like in
16155 On top of that there is a new type,
16156 \begin_inset Flex Code
16159 \begin_layout Plain Layout
16165 , which does not really correspond to a float, since it means: put it
16166 \begin_inset Quotes eld
16170 \begin_inset Quotes erd
16174 Note however that the
16175 \begin_inset Flex Code
16178 \begin_layout Plain Layout
16184 specifier is special and, because of implementation details, cannot be
16185 used in non-built in float types.
16186 If you do not understand what this means, just use
16187 \begin_inset Quotes eld
16191 \begin_inset Flex Code
16194 \begin_layout Plain Layout
16201 \begin_inset Quotes erd
16207 \begin_layout Description
16208 \begin_inset Flex Code
16211 \begin_layout Plain Layout
16218 \begin_inset Flex Code
16221 \begin_layout Plain Layout
16227 ] The prefix to use when creating labels referring to floats of this type.
16228 This allows the use of formatted references.
16229 Note that you can remove any
16230 \begin_inset Flex Code
16233 \begin_layout Plain Layout
16239 set by a copied style by using the special value
16240 \begin_inset Quotes eld
16244 \begin_inset Quotes erd
16247 , which must be all caps.
16250 \begin_layout Description
16251 \begin_inset Flex Code
16254 \begin_layout Plain Layout
16261 \begin_inset Flex Code
16264 \begin_layout Plain Layout
16271 \begin_inset Quotes erd
16275 \begin_inset Quotes erd
16278 ] The style used when defining the float using
16279 \begin_inset Flex Code
16282 \begin_layout Plain Layout
16293 \begin_layout Description
16294 \begin_inset Flex Code
16297 \begin_layout Plain Layout
16304 \begin_inset Flex Code
16307 \begin_layout Plain Layout
16314 \begin_inset Quotes erd
16318 \begin_inset Quotes erd
16322 \begin_inset Quotes eld
16326 \begin_inset Quotes erd
16329 of the new class of floats, like program or algorithm.
16330 After the appropriate
16331 \begin_inset Flex Code
16334 \begin_layout Plain Layout
16343 \begin_inset Flex Code
16346 \begin_layout Plain Layout
16355 \begin_inset Flex Code
16358 \begin_layout Plain Layout
16369 \begin_layout Description
16370 \begin_inset Flex Code
16373 \begin_layout Plain Layout
16380 \begin_inset Flex Code
16383 \begin_layout Plain Layout
16390 \begin_inset space \thinspace{}
16394 \begin_inset Flex Code
16397 \begin_layout Plain Layout
16405 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16407 \begin_inset Flex Code
16410 \begin_layout Plain Layout
16416 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16420 \begin_layout Standard
16421 Note that defining a float with type
16422 \begin_inset Flex Code
16425 \begin_layout Plain Layout
16433 automatically defines the corresponding counter with name
16434 \begin_inset Flex Code
16437 \begin_layout Plain Layout
16448 \begin_layout Subsection
16449 Flex insets and InsetLayout
16450 \begin_inset CommandInset label
16452 name "subsec:Flex-insets-and"
16459 \begin_layout Standard
16460 Flex insets come in three different kinds:
16463 \begin_layout Itemize
16465 \begin_inset Flex Code
16468 \begin_layout Plain Layout
16474 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16476 \begin_inset Flex Code
16479 \begin_layout Plain Layout
16488 \begin_inset Flex Code
16491 \begin_layout Plain Layout
16502 \begin_layout Itemize
16504 \begin_inset Flex Code
16507 \begin_layout Plain Layout
16513 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16515 footnote, and the like.
16516 An obvious example is an endnote inset, which is defined in the
16517 \begin_inset Flex Code
16520 \begin_layout Plain Layout
16529 \begin_layout Itemize
16531 \begin_inset Flex Code
16534 \begin_layout Plain Layout
16540 ): For use with DocBook classes.
16543 \begin_layout Standard
16544 Flex insets are defined using the
16545 \begin_inset Flex Code
16548 \begin_layout Plain Layout
16554 tag, which shall be explained in a moment.
16557 \begin_layout Standard
16559 \begin_inset Flex Code
16562 \begin_layout Plain Layout
16568 tag also serves another function: It can be used to customize the general
16569 layout of many different types of insets.
16571 \begin_inset Flex Code
16574 \begin_layout Plain Layout
16580 can be used to customize the layout parameters for footnotes, marginal
16581 notes, note insets, \SpecialChar TeX
16582 code (ERT) insets, branches, listings, indexes, boxes,
16583 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16586 \begin_layout Standard
16588 \begin_inset Flex Code
16591 \begin_layout Plain Layout
16597 definition must begin with a line of the form:
16600 \begin_layout LyX-Code
16604 \begin_layout Standard
16606 \begin_inset Flex Code
16609 \begin_layout Plain Layout
16615 indicates the inset whose layout is being defined, and here there are four
16619 \begin_layout Enumerate
16620 The layout for a pre-existing inset is being modified.
16621 In this case, can be
16622 \begin_inset Flex Code
16625 \begin_layout Plain Layout
16631 any one of the following:
16632 \begin_inset Flex Code
16635 \begin_layout Plain Layout
16642 \begin_inset Flex Code
16645 \begin_layout Plain Layout
16652 \begin_inset Flex Code
16655 \begin_layout Plain Layout
16662 \begin_inset Flex Code
16665 \begin_layout Plain Layout
16672 \begin_inset Flex Code
16675 \begin_layout Plain Layout
16682 \begin_inset Flex Code
16685 \begin_layout Plain Layout
16692 \begin_inset Flex Code
16695 \begin_layout Plain Layout
16702 \begin_inset Flex Code
16705 \begin_layout Plain Layout
16712 \begin_inset Flex Code
16715 \begin_layout Plain Layout
16722 \begin_inset Flex Code
16725 \begin_layout Plain Layout
16732 \begin_inset Flex Code
16735 \begin_layout Plain Layout
16742 \begin_inset Flex Code
16745 \begin_layout Plain Layout
16752 \begin_inset Flex Code
16755 \begin_layout Plain Layout
16762 \begin_inset Flex Code
16765 \begin_layout Plain Layout
16772 \begin_inset Flex Code
16775 \begin_layout Plain Layout
16782 \begin_inset Flex Code
16785 \begin_layout Plain Layout
16792 \begin_inset Flex Code
16795 \begin_layout Plain Layout
16802 \begin_inset Flex Code
16805 \begin_layout Plain Layout
16812 \begin_inset Flex Code
16815 \begin_layout Plain Layout
16822 \begin_inset Flex Code
16825 \begin_layout Plain Layout
16834 \begin_layout Enumerate
16835 The layout for a Flex inset is being defined.
16837 \begin_inset Flex Code
16840 \begin_layout Plain Layout
16846 must be of the form
16847 \begin_inset Quotes eld
16851 \begin_inset Flex Code
16854 \begin_layout Plain Layout
16861 \begin_inset Quotes erd
16865 \begin_inset Flex Code
16868 \begin_layout Plain Layout
16874 may be be any valid identifier not used by a pre-existing Flex inset.
16875 The identifier may include spaces, but in that case the whole thing must
16876 be wrapped in quotes.
16877 Note that the definition of a flex inset
16882 \begin_inset Flex Code
16885 \begin_layout Plain Layout
16891 entry, declaring which type of inset it defines.
16894 \begin_layout Enumerate
16895 The layout for user specific branch is being defined.
16897 \begin_inset Flex Code
16900 \begin_layout Plain Layout
16906 must be of the form
16907 \begin_inset Quotes eld
16911 \begin_inset Flex Code
16914 \begin_layout Plain Layout
16921 \begin_inset Quotes erd
16925 \begin_inset Flex Code
16928 \begin_layout Plain Layout
16934 may be be any valid identifier of branch defined in user's document.
16935 The identifier may include spaces, but in that case the whole thing must
16936 be wrapped in quotes.
16937 The main purpose of this feature is to allow \SpecialChar LaTeX
16938 wrapping around specific
16939 branches as user needs.
16942 \begin_layout Enumerate
16943 The layout of a user (or class) specific caption is being defined.
16945 \begin_inset Flex Code
16948 \begin_layout Plain Layout
16954 must be of the form
16955 \begin_inset Quotes eld
16959 \begin_inset Flex Code
16962 \begin_layout Plain Layout
16969 \begin_inset Quotes erd
16973 \begin_inset Flex Code
16976 \begin_layout Plain Layout
16982 specifies the name of the caption as it appears in the menu.
16983 Have a look at the standard caption (
16984 \begin_inset Flex Code
16987 \begin_layout Plain Layout
16993 ), the specific captions of the KOMA-Script classes (
16994 \begin_inset Flex Code
16997 \begin_layout Plain Layout
17004 \begin_inset Flex Code
17007 \begin_layout Plain Layout
17016 \begin_inset space ~
17022 \begin_inset Flex Code
17025 \begin_layout Plain Layout
17031 ) for applications.
17034 \begin_layout Standard
17036 \begin_inset Flex Code
17039 \begin_layout Plain Layout
17045 definition can contain the following entries:
17048 \begin_layout Description
17049 \begin_inset Flex Code
17052 \begin_layout Plain Layout
17059 \begin_inset Flex Code
17062 \begin_layout Plain Layout
17068 ] Defines argument number of a command\SpecialChar breakableslash
17069 environment associated with the current
17071 The definition must end with
17072 \begin_inset Flex Code
17075 \begin_layout Plain Layout
17083 \begin_inset CommandInset ref
17085 reference "subsec:Paragraph-Styles"
17092 \begin_layout Description
17093 \begin_inset Flex Code
17096 \begin_layout Plain Layout
17102 Preamble for changing language commands; see
17103 \begin_inset CommandInset ref
17105 reference "subsec:I18n"
17112 \begin_layout Description
17113 \begin_inset Flex Code
17116 \begin_layout Plain Layout
17123 \begin_inset Flex Code
17126 \begin_layout Plain Layout
17132 ] The color for the inset's background.
17134 \begin_inset CommandInset ref
17136 reference "chap:Names-of-colors"
17140 for a list of the available color names.
17143 \begin_layout Description
17144 \begin_inset Flex Code
17147 \begin_layout Plain Layout
17154 \begin_inset Flex Code
17157 \begin_layout Plain Layout
17166 \begin_inset space \thinspace{}
17170 \begin_inset Flex Code
17173 \begin_layout Plain Layout
17179 ] Whether to use the content of the inset as the label, when the inset is
17184 \begin_layout Description
17185 \begin_inset Flex Code
17188 \begin_layout Plain Layout
17195 \begin_inset Flex Code
17198 \begin_layout Plain Layout
17204 ] As with paragraph styles, see
17205 \begin_inset CommandInset ref
17207 reference "subsec:Paragraph-Styles"
17212 Note that you need to specify the complete type, e.
17213 \begin_inset space \thinspace{}
17217 \begin_inset space ~
17221 \begin_inset Flex Code
17224 \begin_layout Plain Layout
17225 CopyStyle Flex:<name>
17233 \begin_layout Description
17234 \begin_inset Flex Code
17237 \begin_layout Plain Layout
17244 \begin_inset Flex Code
17247 \begin_layout Plain Layout
17256 \begin_inset space \thinspace{}
17260 \begin_inset Flex Code
17263 \begin_layout Plain Layout
17269 ] Indicates whether the user may employ the Paragraph Settings dialog to
17270 customize the paragraph.
17273 \begin_layout Description
17274 \begin_inset Flex Code
17277 \begin_layout Plain Layout
17284 \begin_inset Flex Code
17287 \begin_layout Plain Layout
17294 \begin_inset Flex Code
17297 \begin_layout Plain Layout
17304 \begin_inset Flex Code
17307 \begin_layout Plain Layout
17313 , describing the rendering style used for the inset's frame and buttons.
17314 Footnotes generally use
17315 \begin_inset Flex Code
17318 \begin_layout Plain Layout
17324 , ERT insets generally
17325 \begin_inset Flex Code
17328 \begin_layout Plain Layout
17334 , and character styles
17335 \begin_inset Flex Code
17338 \begin_layout Plain Layout
17347 \begin_layout Description
17348 \begin_inset Flex Code
17351 \begin_layout Plain Layout
17358 \begin_inset Flex Code
17361 \begin_layout Plain Layout
17370 \begin_inset space \thinspace{}
17376 \begin_inset Flex Code
17379 \begin_layout Plain Layout
17388 \begin_inset Flex Code
17391 \begin_layout Plain Layout
17398 \begin_inset Flex Code
17401 \begin_layout Plain Layout
17408 Indicates whether the environment will stand on its own in the output or
17409 will appear inline with the surrounding text.
17410 If set to false, it is supposed that the \SpecialChar LaTeX
17411 environment ignores white space
17412 (including one newline character) after the
17413 \begin_inset Flex Code
17416 \begin_layout Plain Layout
17429 \begin_inset Flex Code
17432 \begin_layout Plain Layout
17448 \begin_layout Description
17449 \begin_inset Flex Code
17452 \begin_layout Plain Layout
17458 Required at the end of the
17459 \begin_inset Flex Code
17462 \begin_layout Plain Layout
17471 \begin_layout Description
17472 \begin_inset Flex Code
17475 \begin_layout Plain Layout
17481 The font used for both the text body
17487 \begin_inset CommandInset ref
17489 reference "subsec:Font-description"
17494 Note that defining this font automatically defines the
17495 \begin_inset Flex Code
17498 \begin_layout Plain Layout
17504 to the same value, so define this first and define
17505 \begin_inset Flex Code
17508 \begin_layout Plain Layout
17514 later if you want them to be different.
17517 \begin_layout Description
17518 \begin_inset Flex Code
17521 \begin_layout Plain Layout
17522 FixedWidthPreambleEncoding
17528 \begin_inset Flex Code
17531 \begin_layout Plain Layout
17540 \begin_inset space \thinspace{}
17544 \begin_inset Flex Code
17547 \begin_layout Plain Layout
17553 ] Force a fixed width encoding for the translated contents of
17554 \begin_inset Flex Code
17557 \begin_layout Plain Layout
17564 \begin_inset Flex Code
17567 \begin_layout Plain Layout
17573 code generated by this layout.
17574 This is needed for special \SpecialChar LaTeX
17579 that do not work with variable width encodings such as
17584 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17585 backends such as Xe\SpecialChar TeX
17587 Lua\SpecialChar TeX
17591 \begin_layout Description
17592 \begin_inset Flex Code
17595 \begin_layout Plain Layout
17596 ForceLocalFontSwitch
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 ] When using babel, always use a local font switch (
17628 \begin_inset Flex Code
17631 \begin_layout Plain Layout
17639 ), never a global one (such as
17640 \begin_inset Flex Code
17643 \begin_layout Plain Layout
17654 \begin_layout Description
17655 \begin_inset Flex Code
17658 \begin_layout Plain Layout
17665 \begin_inset Flex Code
17668 \begin_layout Plain Layout
17677 \begin_inset space \thinspace{}
17681 \begin_inset Flex Code
17684 \begin_layout Plain Layout
17691 \begin_inset Quotes eld
17695 \begin_inset Quotes erd
17698 language, leading to Left-to-Right (Latin) output, e.
17699 \begin_inset space \thinspace{}
17703 \begin_inset space \space{}
17706 in \SpecialChar TeX
17711 \begin_layout Description
17712 \begin_inset Flex Code
17715 \begin_layout Plain Layout
17722 \begin_inset Flex Code
17725 \begin_layout Plain Layout
17734 \begin_inset space \thinspace{}
17738 \begin_inset Flex Code
17741 \begin_layout Plain Layout
17747 ] Force a a line break in the \SpecialChar LaTeX
17748 output before the inset starts and after
17750 This assures the inset itself is output on its own lines, for parsing purposes.
17753 \begin_layout Description
17754 \begin_inset Flex Code
17757 \begin_layout Plain Layout
17764 \begin_inset Flex Code
17767 \begin_layout Plain Layout
17776 \begin_inset space \thinspace{}
17780 \begin_inset Flex Code
17783 \begin_layout Plain Layout
17789 ] Indicates whether the
17790 \begin_inset Flex Code
17793 \begin_layout Plain Layout
17799 should be used or, instead, the user can change the paragraph style used
17804 \begin_layout Description
17805 \begin_inset Flex Code
17808 \begin_layout Plain Layout
17815 \begin_inset Flex Code
17818 \begin_layout Plain Layout
17827 \begin_inset space \thinspace{}
17831 \begin_inset Flex Code
17834 \begin_layout Plain Layout
17840 ] As with paragraph styles, see
17841 \begin_inset CommandInset ref
17843 reference "subsec:Paragraph-Styles"
17850 \begin_layout Description
17851 \begin_inset Flex Code
17854 \begin_layout Plain Layout
17860 These tags control the XHTML output.
17862 \begin_inset CommandInset ref
17864 reference "sec:Tags-for-XHTML"
17871 \begin_layout Description
17872 \begin_inset Flex Code
17875 \begin_layout Plain Layout
17882 \begin_inset Flex Code
17885 \begin_layout Plain Layout
17894 \begin_inset space \thinspace{}
17898 \begin_inset Flex Code
17901 \begin_layout Plain Layout
17907 ] Whether to include the contents of this inset in the strings generated
17908 for the `Outline' pane.
17909 One would not, for example, want the content of a footnote in a section
17910 header to be included in the TOC displayed in the outline, but one would
17911 normally want the content of a character style displayed.
17912 Default is false: not to include.
17915 \begin_layout Description
17916 \begin_inset Flex Code
17919 \begin_layout Plain Layout
17928 \begin_inset Flex Code
17931 \begin_layout Plain Layout
17940 \begin_inset space \thinspace{}
17944 \begin_inset Flex Code
17947 \begin_layout Plain Layout
17953 ] As with paragraph styles, see
17954 \begin_inset CommandInset ref
17956 reference "subsec:Paragraph-Styles"
17963 \begin_layout Description
17964 \begin_inset Flex Code
17967 \begin_layout Plain Layout
17973 The font used for the label.
17975 \begin_inset CommandInset ref
17977 reference "subsec:Font-description"
17982 Note that this definition can never appear before
17983 \begin_inset Flex Code
17986 \begin_layout Plain Layout
17992 , lest it be ineffective.
17995 \begin_layout Description
17996 \begin_inset Flex Code
17999 \begin_layout Plain Layout
18006 \begin_inset Flex Code
18009 \begin_layout Plain Layout
18016 \begin_inset Quotes erd
18020 \begin_inset Quotes erd
18023 ] What will be displayed on the button or elsewhere as the inset label.
18025 \begin_inset Flex Code
18028 \begin_layout Plain Layout
18036 \begin_inset Flex Code
18039 \begin_layout Plain Layout
18045 ) modify this label on the fly.
18048 \begin_layout Description
18049 \begin_inset Flex Code
18052 \begin_layout Plain Layout
18058 Language dependent preamble; see
18059 \begin_inset CommandInset ref
18061 reference "subsec:I18n"
18068 \begin_layout Description
18069 \begin_inset Flex Code
18072 \begin_layout Plain Layout
18079 \begin_inset Flex Code
18082 \begin_layout Plain Layout
18088 ] The name of the corresponding \SpecialChar LaTeX
18090 Either the environment or command name.
18093 \begin_layout Description
18094 \begin_inset Flex Code
18097 \begin_layout Plain Layout
18104 \begin_inset Flex Code
18107 \begin_layout Plain Layout
18113 ] The optional parameter for the corresponding
18114 \begin_inset Flex Code
18117 \begin_layout Plain Layout
18123 stuff, including possible bracket pairs like
18124 \begin_inset Flex Code
18127 \begin_layout Plain Layout
18134 This parameter cannot be changed from within \SpecialChar LyX
18136 \begin_inset Flex Code
18139 \begin_layout Plain Layout
18145 for customizable parameters).
18146 It will be output as is after all \SpecialChar LaTeX
18148 \begin_inset Flex Code
18151 \begin_layout Plain Layout
18160 \begin_layout Description
18161 \begin_inset Flex Code
18164 \begin_layout Plain Layout
18171 \begin_inset Flex Code
18174 \begin_layout Plain Layout
18175 Command, Environment, None
18180 ] How the style should be translated into \SpecialChar LaTeX
18185 \begin_layout Plain Layout
18186 \begin_inset Flex Code
18189 \begin_layout Plain Layout
18195 is perhaps a bit misleading, since these rules apply to SGML classes too.
18196 Visit the SGML class files for specific examples.
18202 \begin_inset Separator parbreak
18209 \begin_layout Description
18210 \begin_inset Flex Code
18213 \begin_layout Plain Layout
18219 means nothing special
18222 \begin_layout Description
18223 \begin_inset Flex Code
18226 \begin_layout Plain Layout
18233 \begin_inset Flex Code
18236 \begin_layout Plain Layout
18243 {\SpecialChar ldots
18252 \begin_layout Description
18253 \begin_inset Flex Code
18256 \begin_layout Plain Layout
18263 \begin_inset Flex Code
18266 \begin_layout Plain Layout
18273 }\SpecialChar ldots
18288 \begin_layout Standard
18289 Putting the last few things together, the \SpecialChar LaTeX
18290 output will be either:
18293 \begin_layout LyX-Code
18296 LatexName[LatexParam]{\SpecialChar ldots
18300 \begin_layout Standard
18304 \begin_layout LyX-Code
18307 begin{LatexName}[LatexParam] \SpecialChar ldots
18313 \begin_layout Standard
18314 depending upon the \SpecialChar LaTeX
18319 \begin_layout Description
18320 \begin_inset Flex Code
18323 \begin_layout Plain Layout
18330 \begin_inset Flex Code
18333 \begin_layout Plain Layout
18339 ] A string that is put at the beginning of the layout content.
18340 A line break in the output can be indicated by
18341 \begin_inset Flex Code
18344 \begin_layout Plain Layout
18353 \begin_layout Description
18354 \begin_inset Flex Code
18357 \begin_layout Plain Layout
18364 \begin_inset Flex Code
18367 \begin_layout Plain Layout
18374 \begin_inset Flex Code
18377 \begin_layout Plain Layout
18384 \begin_inset Flex Code
18387 \begin_layout Plain Layout
18394 \begin_inset Flex Code
18397 \begin_layout Plain Layout
18403 (indicating a dummy definition ending definitions of charstyles, etc).
18404 This entry is required in and is only meaningful for Flex insets.
18405 Among other things, it determines on which menu this inset will appear.
18407 \begin_inset Flex Code
18410 \begin_layout Plain Layout
18417 \begin_inset Flex Code
18420 \begin_layout Plain Layout
18426 will automatically set
18427 \begin_inset Flex Code
18430 \begin_layout Plain Layout
18438 \begin_inset Flex Code
18441 \begin_layout Plain Layout
18447 can be set to true for
18448 \begin_inset Flex Code
18451 \begin_layout Plain Layout
18457 insets by setting it
18462 \begin_inset Flex Code
18465 \begin_layout Plain Layout
18474 \begin_layout Description
18475 \begin_inset Flex Code
18478 \begin_layout Plain Layout
18485 \begin_inset Flex Code
18488 \begin_layout Plain Layout
18497 \begin_inset space \thinspace{}
18501 \begin_inset Flex Code
18504 \begin_layout Plain Layout
18510 ] Whether multiple paragraphs are permitted in this inset.
18512 \begin_inset Flex Code
18515 \begin_layout Plain Layout
18521 to the same value and
18522 \begin_inset Flex Code
18525 \begin_layout Plain Layout
18531 to the opposite value.
18532 These can be reset to other values, if they are used
18537 \begin_inset Flex Code
18540 \begin_layout Plain Layout
18550 \begin_layout Description
18551 \begin_inset Flex Code
18554 \begin_layout Plain Layout
18561 \begin_inset Flex Code
18564 \begin_layout Plain Layout
18573 \begin_inset space \thinspace{}
18577 \begin_inset Flex Code
18580 \begin_layout Plain Layout
18586 ] Whether fragile commands in this inset should be
18587 \begin_inset Flex Code
18590 \begin_layout Plain Layout
18603 whether the command should itself be protected.) Default is false.
18606 \begin_layout Description
18607 \begin_inset Flex Code
18610 \begin_layout Plain Layout
18617 \begin_inset Flex Code
18620 \begin_layout Plain Layout
18626 ] Deletes an existing
18627 \begin_inset Flex Code
18630 \begin_layout Plain Layout
18639 \begin_layout Description
18640 \begin_inset Flex Code
18643 \begin_layout Plain Layout
18650 \begin_inset Flex Code
18653 \begin_layout Plain Layout
18660 \begin_inset Flex Code
18663 \begin_layout Plain Layout
18669 that has replaced this
18670 \begin_inset Flex Code
18673 \begin_layout Plain Layout
18680 This is used to rename an
18681 \begin_inset Flex Code
18684 \begin_layout Plain Layout
18690 , while keeping backward compatibility.
18693 \begin_layout Description
18694 \begin_inset Flex Code
18697 \begin_layout Plain Layout
18704 \begin_inset Flex Code
18707 \begin_layout Plain Layout
18716 \begin_inset space \thinspace{}
18720 \begin_inset Flex Code
18723 \begin_layout Plain Layout
18729 ] As with paragraph styles, see
18730 \begin_inset CommandInset ref
18732 reference "subsec:Paragraph-Styles"
18740 \begin_layout Description
18741 \begin_inset Flex Code
18744 \begin_layout Plain Layout
18751 \begin_inset Flex Code
18754 \begin_layout Plain Layout
18763 \begin_inset space \thinspace{}
18767 \begin_inset Flex Code
18770 \begin_layout Plain Layout
18776 ] As with paragraph styles, see
18777 \begin_inset CommandInset ref
18779 reference "subsec:Paragraph-Styles"
18787 \begin_layout Description
18788 \begin_inset Flex Code
18791 \begin_layout Plain Layout
18797 As with paragraph styles, see
18798 \begin_inset CommandInset ref
18800 reference "subsec:Paragraph-Styles"
18807 \begin_layout Description
18808 \begin_inset Flex Code
18811 \begin_layout Plain Layout
18818 \begin_inset Flex Code
18821 \begin_layout Plain Layout
18827 ] The prefix to use when creating labels referring to insets of this type.
18828 This allows the use of formatted references.
18831 \begin_layout Description
18832 \begin_inset Flex Code
18835 \begin_layout Plain Layout
18842 \begin_inset Flex Code
18845 \begin_layout Plain Layout
18851 ] As with paragraph styles, see
18852 \begin_inset CommandInset ref
18854 reference "subsec:Paragraph-Styles"
18861 \begin_layout Description
18862 \begin_inset Flex Code
18865 \begin_layout Plain Layout
18872 \begin_inset Flex Code
18875 \begin_layout Plain Layout
18884 \begin_inset space \thinspace{}
18888 \begin_inset Flex Code
18891 \begin_layout Plain Layout
18897 ] Resets the \SpecialChar LaTeX
18898 arguments of this layout (as defined via the
18899 \begin_inset Flex Code
18902 \begin_layout Plain Layout
18909 This is useful if you have copied a style via
18910 \begin_inset Flex Code
18913 \begin_layout Plain Layout
18919 , but you do not want to inherit its (required and optional) arguments.
18922 \begin_layout Description
18923 \begin_inset Flex Code
18926 \begin_layout Plain Layout
18933 \begin_inset Flex Code
18936 \begin_layout Plain Layout
18943 \begin_inset space \thinspace{}
18947 \begin_inset Flex Code
18950 \begin_layout Plain Layout
18958 ] Whether this inset should use the font of its surrounding environment
18960 Default is false: use the font of the surrounding environment.
18963 \begin_layout Description
18964 \begin_inset Flex Code
18967 \begin_layout Plain Layout
18974 \begin_inset Flex Code
18977 \begin_layout Plain Layout
18983 ] A string that is put at the end of the layout content.
18984 A line break in the output can be indicated by
18985 \begin_inset Flex Code
18988 \begin_layout Plain Layout
18997 \begin_layout Description
18998 \begin_inset Flex Code
19001 \begin_layout Plain Layout
19008 \begin_inset Flex Code
19011 \begin_layout Plain Layout
19018 \begin_inset space \thinspace{}
19022 \begin_inset Flex Code
19025 \begin_layout Plain Layout
19033 ] Allow spell-checking the contents of this inset.
19037 \begin_layout Subsection
19039 \begin_inset CommandInset label
19041 name "subsec:Counters"
19048 \begin_layout Standard
19049 It is necessary to define the counters (
19050 \begin_inset Flex MenuItem
19053 \begin_layout Plain Layout
19060 \begin_inset Flex MenuItem
19063 \begin_layout Plain Layout
19069 , \SpecialChar ldots
19070 ) in the text class itself.
19071 The standard counters are defined in the file
19072 \begin_inset Flex Code
19075 \begin_layout Plain Layout
19081 , so you may have to do no more than add
19084 \begin_layout LyX-Code
19085 Input stdcounters.inc
19088 \begin_layout Standard
19089 to your layout file to get them to work.
19090 But if you want to define custom counters, then you can do so.
19091 The counter declaration must begin with:
19094 \begin_layout LyX-Code
19095 Counter CounterName
19098 \begin_layout Standard
19100 \begin_inset Flex Code
19103 \begin_layout Plain Layout
19109 ' is replaced by the name of the counter.
19110 And it must end with
19111 \begin_inset Quotes eld
19115 \begin_inset Flex Code
19118 \begin_layout Plain Layout
19125 \begin_inset Quotes erd
19129 The following parameters can also be used:
19132 \begin_layout Description
19133 \begin_inset Flex Code
19136 \begin_layout Plain Layout
19143 \begin_inset Flex Code
19146 \begin_layout Plain Layout
19152 ] Sets the initial value for the counter, to which it will be reset whenever
19154 Normally, one will want the default, 1.
19157 \begin_layout Description
19158 \begin_inset Flex Code
19161 \begin_layout Plain Layout
19168 \begin_inset Flex Code
19171 \begin_layout Plain Layout
19178 \begin_inset Quotes erd
19182 \begin_inset Quotes erd
19185 ] When defined, this string defines how the counter is displayed.
19186 Setting this value sets
19187 \begin_inset Flex Code
19190 \begin_layout Plain Layout
19191 LabelStringAppendix
19197 The following special constructs can be used in the string:
19198 \begin_inset Separator parbreak
19205 \begin_layout Itemize
19206 \begin_inset Flex Code
19209 \begin_layout Plain Layout
19217 will be replaced by the expansion of the
19218 \begin_inset Flex Code
19221 \begin_layout Plain Layout
19228 \begin_inset Flex Code
19231 \begin_layout Plain Layout
19232 LabelStringAppendix
19238 \begin_inset Flex Code
19241 \begin_layout Plain Layout
19251 \begin_layout Itemize
19252 counter values can be expressed using \SpecialChar LaTeX
19254 \begin_inset Newline newline
19258 \begin_inset Flex Code
19261 \begin_layout Plain Layout
19278 \begin_inset Flex Code
19281 \begin_layout Plain Layout
19293 \begin_layout Plain Layout
19303 Actually, the situation is a bit more complicated: any
19322 other than those described below will produce arabic numerals.
19323 It would not be surprising to see this change in the future.
19329 \begin_inset Flex Code
19332 \begin_layout Plain Layout
19338 : 1, 2, 3,\SpecialChar ldots
19340 \begin_inset Flex Code
19343 \begin_layout Plain Layout
19349 for lower-case letters: a, b, c, \SpecialChar ldots
19351 \begin_inset Flex Code
19354 \begin_layout Plain Layout
19360 for upper-case letters: A, B, C, \SpecialChar ldots
19362 \begin_inset Flex Code
19365 \begin_layout Plain Layout
19371 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19373 \begin_inset Flex Code
19376 \begin_layout Plain Layout
19382 for upper-case roman numerals: I, II, III\SpecialChar ldots
19384 \begin_inset Flex Code
19387 \begin_layout Plain Layout
19393 for hebrew numerals.
19397 \begin_layout Standard
19398 If LabelString is not defined, a default value is constructed as follows:
19399 if the counter has a master counter
19400 \begin_inset Flex Code
19403 \begin_layout Plain Layout
19410 \begin_inset Flex Code
19413 \begin_layout Plain Layout
19420 \begin_inset Newline newline
19424 \begin_inset Flex Code
19427 \begin_layout Plain Layout
19437 is used; otherwise the string
19438 \begin_inset Flex Code
19441 \begin_layout Plain Layout
19452 \begin_layout Description
19453 \begin_inset Flex Code
19456 \begin_layout Plain Layout
19457 LabelStringAppendix
19463 \begin_inset Flex Code
19466 \begin_layout Plain Layout
19473 \begin_inset Quotes erd
19477 \begin_inset Quotes erd
19481 \begin_inset Flex Code
19484 \begin_layout Plain Layout
19490 , but for use in the Appendix.
19493 \begin_layout Description
19494 \begin_inset Flex Code
19497 \begin_layout Plain Layout
19504 \begin_inset Flex Code
19507 \begin_layout Plain Layout
19514 \begin_inset Quotes erd
19518 \begin_inset Quotes erd
19521 ] A format for use with formatted references to this counter.
19522 For example, one might want to have references to section numbers appear
19524 \begin_inset Quotes eld
19528 \begin_inset Quotes erd
19532 The string should contain
19533 \begin_inset Quotes eld
19537 \begin_inset Quotes erd
19541 This will be replaced by the counter number itself.
19542 So, for sections, it would be: Section ##.
19545 \begin_layout Description
19546 \begin_inset Flex Code
19549 \begin_layout Plain Layout
19556 \begin_inset Flex Code
19559 \begin_layout Plain Layout
19566 \begin_inset Quotes erd
19570 \begin_inset Quotes erd
19573 ] If this is set to the name of another counter, the present counter will
19574 be reset every time the other one is increased.
19576 \begin_inset Flex Code
19579 \begin_layout Plain Layout
19586 \begin_inset Flex Code
19589 \begin_layout Plain Layout
19598 \begin_layout Subsection
19600 \begin_inset CommandInset label
19602 name "subsec:Font-description"
19609 \begin_layout Standard
19610 A font description looks like this:
19613 \begin_layout LyX-Code
19627 \begin_layout LyX-Code
19631 \begin_layout LyX-Code
19635 \begin_layout Standard
19636 The following commands are available:
19639 \begin_layout Description
19640 \begin_inset Flex Code
19643 \begin_layout Plain Layout
19650 \begin_inset Flex Code
19653 \begin_layout Plain Layout
19662 \begin_inset Flex Code
19665 \begin_layout Plain Layout
19672 \begin_inset Flex Code
19675 \begin_layout Plain Layout
19682 \begin_inset Flex Code
19685 \begin_layout Plain Layout
19692 \begin_inset Flex Code
19695 \begin_layout Plain Layout
19702 \begin_inset Flex Code
19705 \begin_layout Plain Layout
19712 \begin_inset Flex Code
19715 \begin_layout Plain Layout
19722 \begin_inset Flex Code
19725 \begin_layout Plain Layout
19732 \begin_inset Flex Code
19735 \begin_layout Plain Layout
19744 \begin_layout Description
19745 \begin_inset Flex Code
19748 \begin_layout Plain Layout
19755 \begin_inset Flex Code
19758 \begin_layout Plain Layout
19767 \begin_inset Flex Code
19770 \begin_layout Plain Layout
19777 \begin_inset Flex Code
19780 \begin_layout Plain Layout
19789 \begin_layout Description
19790 \begin_inset Flex Code
19793 \begin_layout Plain Layout
19800 \begin_inset Flex Code
19803 \begin_layout Plain Layout
19809 ] Valid arguments are:
19810 \begin_inset Flex Code
19813 \begin_layout Plain Layout
19820 \begin_inset Flex Code
19823 \begin_layout Plain Layout
19830 \begin_inset Flex Code
19833 \begin_layout Plain Layout
19840 \begin_inset Flex Code
19843 \begin_layout Plain Layout
19850 \begin_inset Flex Code
19853 \begin_layout Plain Layout
19860 \begin_inset Flex Code
19863 \begin_layout Plain Layout
19870 \begin_inset Flex Code
19873 \begin_layout Plain Layout
19880 \begin_inset Flex Code
19883 \begin_layout Plain Layout
19890 \begin_inset Flex Code
19893 \begin_layout Plain Layout
19900 \begin_inset Flex Code
19903 \begin_layout Plain Layout
19910 \begin_inset Flex Code
19913 \begin_layout Plain Layout
19920 \begin_inset Flex Code
19923 \begin_layout Plain Layout
19930 Each of these turns on or off the corresponding attribute.
19932 \begin_inset Flex Code
19935 \begin_layout Plain Layout
19941 turns on emphasis, and
19942 \begin_inset Flex Code
19945 \begin_layout Plain Layout
19953 \begin_inset Newline newline
19956 If the latter seems puzzling, remember that the font settings for the present
19957 context are generally inherited from the surrounding context.
19959 \begin_inset Flex Code
19962 \begin_layout Plain Layout
19968 would turn off the emphasis that was anyway in effect, say, in a theorem
19972 \begin_layout Description
19973 \begin_inset Flex Code
19976 \begin_layout Plain Layout
19983 \begin_inset Flex Code
19986 \begin_layout Plain Layout
19995 \begin_inset Flex Code
19998 \begin_layout Plain Layout
20007 \begin_layout Description
20008 \begin_inset Flex Code
20011 \begin_layout Plain Layout
20018 \begin_inset Flex Code
20021 \begin_layout Plain Layout
20030 \begin_inset Flex Code
20033 \begin_layout Plain Layout
20040 \begin_inset Flex Code
20043 \begin_layout Plain Layout
20050 \begin_inset Flex Code
20053 \begin_layout Plain Layout
20062 \begin_layout Description
20063 \begin_inset Flex Code
20066 \begin_layout Plain Layout
20073 \begin_inset Flex Code
20076 \begin_layout Plain Layout
20083 \begin_inset Flex Code
20086 \begin_layout Plain Layout
20093 \begin_inset Flex Code
20096 \begin_layout Plain Layout
20105 \begin_inset Flex Code
20108 \begin_layout Plain Layout
20115 \begin_inset Flex Code
20118 \begin_layout Plain Layout
20125 \begin_inset Flex Code
20128 \begin_layout Plain Layout
20135 \begin_inset Flex Code
20138 \begin_layout Plain Layout
20145 \begin_inset Flex Code
20148 \begin_layout Plain Layout
20157 \begin_layout Subsection
20158 \begin_inset CommandInset label
20160 name "subsec:Citation-format-description"
20164 Citation format description
20167 \begin_layout Standard
20169 \begin_inset Flex Code
20172 \begin_layout Plain Layout
20178 blocks are used to describe how bibliographic information should be displayed,
20179 both within \SpecialChar LyX
20180 itself (in the citation dialog and in tooltips, for example)
20181 and in XHTML output.
20182 Such a block might look like this:
20185 \begin_layout LyX-Code
20189 \begin_layout LyX-Code
20193 \begin_layout LyX-Code
20197 \begin_layout LyX-Code
20201 \begin_layout Standard
20202 The individual lines define how the bibliographic information associated
20203 with an article or book, respectively, is to be displayed, and such a definitio
20204 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20207 defines a default format in the source code that will be used if no specific
20208 definition has been given.
20210 predefines several formats in the file
20211 \begin_inset Flex Code
20214 \begin_layout Plain Layout
20220 , which is included in most of \SpecialChar LyX
20221 's document classes.
20224 \begin_layout Standard
20225 The definitions use a simple language that allows Bib\SpecialChar TeX
20226 keys to be replaced
20228 Keys should be enclosed in
20229 \begin_inset Flex Code
20232 \begin_layout Plain Layout
20239 \begin_inset Flex Code
20242 \begin_layout Plain Layout
20249 So a simple definition might look like this:
20252 \begin_layout LyX-Code
20254 \begin_inset Quotes eld
20258 \begin_inset Quotes erd
20264 \begin_layout Standard
20265 This would print the author, followed by a comma, followed by the title,
20266 in quotes, followed by a period.
20269 \begin_layout Standard
20270 Of course, sometimes you may want to print a key only if it exists.
20271 This can be done by using a conditional construction, such as:
20272 \begin_inset Flex Code
20275 \begin_layout Plain Layout
20277 \begin_inset space ~
20287 \begin_inset Flex Code
20290 \begin_layout Plain Layout
20296 key exists, then print
20297 \begin_inset Quotes eld
20301 \begin_inset space ~
20305 \begin_inset Quotes erd
20308 followed by the volume key.
20309 It is also possible to have an else clause in the conditional, such as:
20310 \begin_inset Newline newline
20314 \begin_inset Flex Code
20317 \begin_layout Plain Layout
20318 {%author%[[%author%]][[%editor%, ed.]]}
20324 \begin_inset Newline newline
20328 \begin_inset Flex Code
20331 \begin_layout Plain Layout
20337 key is printed if it exists; otherwise, the editor key is printed, followed
20339 \begin_inset Quotes eld
20343 \begin_inset space ~
20347 \begin_inset Quotes erd
20350 Note that the key is again enclosed in
20351 \begin_inset Flex Code
20354 \begin_layout Plain Layout
20360 signs; the entire conditional is enclosed in braces; and the if and else
20361 clauses are enclosed in double brackets,
20362 \begin_inset Quotes eld
20366 \begin_inset Flex Code
20369 \begin_layout Plain Layout
20376 \begin_inset Quotes eld
20380 \begin_inset Quotes eld
20384 \begin_inset Flex Code
20387 \begin_layout Plain Layout
20394 \begin_inset Quotes erd
20398 There must be no space between any of these.
20401 \begin_layout Standard
20402 There is one other piece of syntax available in definitions, which looks
20404 \begin_inset Flex Code
20407 \begin_layout Plain Layout
20414 This defines a piece of formatting information that is to be used when
20416 \begin_inset Quotes eld
20420 \begin_inset Quotes erd
20424 Obviously, we do not want to output HTML tags when writing plain text,
20425 so they should be wrapped in
20426 \begin_inset Quotes eld
20430 \begin_inset Quotes erd
20434 \begin_inset Quotes eld
20438 \begin_inset Quotes erd
20444 \begin_layout Standard
20445 Two special sorts of definitions are also possible in a
20446 \begin_inset Flex Code
20449 \begin_layout Plain Layout
20456 An example of the first would be:
20459 \begin_layout LyX-Code
20461 \begin_inset Quotes eld
20465 \begin_inset Quotes erd
20471 \begin_layout Standard
20472 This is an abbreviation, or macro, and it can be used by treating it as
20474 \begin_inset Flex Code
20477 \begin_layout Plain Layout
20486 \begin_inset Flex Code
20489 \begin_layout Plain Layout
20495 exactly as it would treat its definition.
20496 So, let us issue the obvious
20504 \begin_layout LyX-Code
20508 \begin_layout Standard
20509 or anything like it.
20511 shouldn't go into an infinite loop, but it may go into a long one before
20515 \begin_layout Standard
20516 The second sort of special definition might look like this:
20519 \begin_layout LyX-Code
20523 \begin_layout Standard
20524 This defines a translatable piece of text, which allows relevant parts of
20525 the bibliography to be translated.
20526 It can be included in a definition by treating it as a key:
20527 \begin_inset Flex Code
20530 \begin_layout Plain Layout
20537 Several of these are predefined in
20538 \begin_inset Flex Code
20541 \begin_layout Plain Layout
20548 Note that these are not macros, in the sense just defined.
20549 They will not be expanded.
20552 \begin_layout Standard
20553 So here then is an example that use all these features:
20554 \begin_inset VSpace defskip
20560 \begin_layout Standard
20564 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20567 \begin_layout Standard
20568 \begin_inset VSpace defskip
20571 This defines a macro that prints the author, followed by a comma, if the
20573 \begin_inset Flex Code
20576 \begin_layout Plain Layout
20582 key is defined, or else prints the name of the editor, followed by the
20584 \begin_inset Flex Code
20587 \begin_layout Plain Layout
20593 or its translation (it is by default
20594 \begin_inset Quotes eld
20598 \begin_inset Quotes erd
20602 \begin_inset Flex Code
20605 \begin_layout Plain Layout
20612 Note that this is in fact defined in
20613 \begin_inset Flex Code
20616 \begin_layout Plain Layout
20622 , so you can use it in your own definitions, or re-definitions, if you load
20626 \begin_layout Section
20627 \begin_inset CommandInset label
20629 name "sec:Tags-for-XHTML"
20633 Tags for XHTML output
20636 \begin_layout Standard
20637 As with \SpecialChar LaTeX
20638 or DocBook, the format of \SpecialChar LyX
20639 's XHTML output is also controlled by
20640 layout information.
20641 In general, \SpecialChar LyX
20642 provides sensible defaults and, as mentioned earlier, it will
20643 even construct default CSS style rules from the other layout tags.
20644 For example, \SpecialChar LyX
20645 will attempt to use the information provided in the
20646 \begin_inset Flex Code
20649 \begin_layout Plain Layout
20655 declaration for the Chapter style to write CSS that will appropriately
20656 format chapter headings.
20659 \begin_layout Standard
20660 In many cases, then, you may not have to do anything at all to get acceptable
20661 XHTML output for your own environments, custom insets, and so forth.
20662 But in some cases you will, and so \SpecialChar LyX
20663 provides a number of layout tags that
20664 can be used to customize the XHTML and CSS that are generated.
20667 \begin_layout Standard
20668 Note that there are two tags,
20669 \begin_inset Flex Code
20672 \begin_layout Plain Layout
20679 \begin_inset Flex Code
20682 \begin_layout Plain Layout
20688 that may appear outside style and inset declarations.
20690 \begin_inset CommandInset ref
20692 reference "subsec:General-text-class"
20696 for details on these.
20699 \begin_layout Subsection
20700 \begin_inset CommandInset label
20702 name "subsec:Paragraph-Style-XHTML"
20709 \begin_layout Standard
20710 The sort of XHTML \SpecialChar LyX
20711 outputs for a paragraph depends upon whether we are dealing
20712 with a normal paragraph, a command, or an environment, where this is itself
20713 determined by the contents of the corresponding
20714 \begin_inset Flex Code
20717 \begin_layout Plain Layout
20728 \begin_layout Standard
20729 For a command or normal paragraph, the output XHTML has the following form:
20732 \begin_layout LyX-Code
20734 \begin_inset Quotes erd
20738 \begin_inset Quotes erd
20744 \begin_layout LyX-Code
20746 \begin_inset Quotes erd
20750 \begin_inset Quotes erd
20756 \begin_layout LyX-Code
20757 Contents of the paragraph.
20760 \begin_layout LyX-Code
20764 \begin_layout Standard
20765 The label tags are of course omitted if the paragraph does not have a label.
20768 \begin_layout Standard
20769 For an environment that is not some sort of list, the XHTML takes this form:
20772 \begin_layout LyX-Code
20774 \begin_inset Quotes erd
20778 \begin_inset Quotes erd
20784 \begin_layout LyX-Code
20786 \begin_inset Quotes erd
20790 \begin_inset Quotes erd
20794 \begin_inset Quotes erd
20798 \begin_inset Quotes erd
20801 >Environment Label</labeltag>First paragraph.</itemtag>
20804 \begin_layout LyX-Code
20805 <itemtag>Second paragraph.</itemtag>
20808 \begin_layout LyX-Code
20812 \begin_layout Standard
20813 Note that the label is output only for the first paragraph, as it should
20814 be for a theorem, for example.
20818 \begin_layout Standard
20819 For a list, we have one of these forms:
20822 \begin_layout LyX-Code
20824 \begin_inset Quotes erd
20828 \begin_inset Quotes erd
20834 \begin_layout LyX-Code
20836 \begin_inset Quotes erd
20840 \begin_inset Quotes erd
20844 \begin_inset Quotes erd
20848 \begin_inset Quotes erd
20851 >List Label</labeltag>First item.</itemtag>
20854 \begin_layout LyX-Code
20856 \begin_inset Quotes erd
20860 \begin_inset Quotes erd
20864 \begin_inset Quotes erd
20868 \begin_inset Quotes erd
20871 >List Label</labeltag>Second item.</itemtag>
20874 \begin_layout LyX-Code
20878 \begin_layout LyX-Code
20882 \begin_layout LyX-Code
20884 \begin_inset Quotes erd
20888 \begin_inset Quotes erd
20894 \begin_layout LyX-Code
20896 \begin_inset Quotes erd
20900 \begin_inset Quotes erd
20903 >List Label</labeltag><itemtag attr=
20904 \begin_inset Quotes erd
20908 \begin_inset Quotes erd
20911 >First item.</itemtag>
20914 \begin_layout LyX-Code
20916 \begin_inset Quotes erd
20920 \begin_inset Quotes erd
20923 >List Label</labeltag><itemtag attr=
20924 \begin_inset Quotes erd
20928 \begin_inset Quotes erd
20931 >Second item.</itemtag>
20934 \begin_layout LyX-Code
20938 \begin_layout Standard
20939 Note the different orders of
20940 \begin_inset Flex Code
20943 \begin_layout Plain Layout
20950 \begin_inset Flex Code
20953 \begin_layout Plain Layout
20960 Which order we get depends upon the setting of
20961 \begin_inset Flex Code
20964 \begin_layout Plain Layout
20971 \begin_inset Flex Code
20974 \begin_layout Plain Layout
20980 is false (the default), you get the first of these, with the label within
20981 the item; if true, you get the second, with the label outside the item.
20984 \begin_layout Standard
20985 The specific tags and attributes output for each paragraph type can be controlle
20986 d by means of the layout tags we are about to describe.
20987 As mentioned earlier, however, \SpecialChar LyX
20988 uses sensible defaults for many of these,
20989 so you often may not need to do very much to get good XHTML output.
20990 Think of the available tags as there so you can tweak things to your liking.
20993 \begin_layout Description
20994 \begin_inset Flex Code
20997 \begin_layout Plain Layout
21004 \begin_inset Flex Code
21007 \begin_layout Plain Layout
21013 ] Specifies attribute information to be output with the main tag.
21015 \begin_inset Quotes eld
21019 \begin_inset Flex Code
21022 \begin_layout Plain Layout
21029 \begin_inset Quotes erd
21033 By default, \SpecialChar LyX
21035 \begin_inset Quotes eld
21039 \begin_inset Flex Code
21042 \begin_layout Plain Layout
21049 \begin_inset Quotes erd
21053 \begin_inset Flex Code
21056 \begin_layout Plain Layout
21062 is the \SpecialChar LyX
21063 name of the layout, made lowercase, for example: chapter.
21068 contain any style information.
21070 \begin_inset Flex Code
21073 \begin_layout Plain Layout
21082 \begin_layout Description
21083 \begin_inset Flex Code
21086 \begin_layout Plain Layout
21093 \begin_inset Flex Code
21096 \begin_layout Plain Layout
21106 ] Whether to output the default CSS information \SpecialChar LyX
21107 generates for this layout,
21108 even if additional information is explicitly provided via
21109 \begin_inset Flex Code
21112 \begin_layout Plain Layout
21120 \begin_inset Flex Code
21123 \begin_layout Plain Layout
21129 allows you to alter or augment the generated CSS, rather than to override
21132 \begin_inset Flex Code
21135 \begin_layout Plain Layout
21144 \begin_layout Description
21145 \begin_inset Flex Code
21148 \begin_layout Plain Layout
21155 \begin_inset Flex Code
21158 \begin_layout Plain Layout
21164 ] The tag to be used for individual paragraphs of environments, replacing
21166 \begin_inset Flex Code
21169 \begin_layout Plain Layout
21175 in the examples above.
21177 \begin_inset Flex Code
21180 \begin_layout Plain Layout
21189 \begin_layout Description
21190 \begin_inset Flex Code
21193 \begin_layout Plain Layout
21200 \begin_inset Flex Code
21203 \begin_layout Plain Layout
21209 ] Attributes for the item tag.
21211 \begin_inset Quotes eld
21215 \begin_inset Flex Code
21218 \begin_layout Plain Layout
21219 class=`layoutname_item'
21225 \begin_inset Quotes erd
21233 contain any style information.
21235 \begin_inset Flex Code
21238 \begin_layout Plain Layout
21247 \begin_layout Description
21248 \begin_inset Flex Code
21251 \begin_layout Plain Layout
21258 \begin_inset Flex Code
21261 \begin_layout Plain Layout
21267 ] The tag to be used for paragraph and item labels, replacing
21268 \begin_inset Flex Code
21271 \begin_layout Plain Layout
21277 in the examples above.
21279 \begin_inset Flex Code
21282 \begin_layout Plain Layout
21289 \begin_inset Flex Code
21292 \begin_layout Plain Layout
21299 \begin_inset Flex Code
21302 \begin_layout Plain Layout
21309 \begin_inset Flex Code
21312 \begin_layout Plain Layout
21313 Centered_Top_Environment
21318 , in which case it defaults to
21319 \begin_inset Flex Code
21322 \begin_layout Plain Layout
21331 \begin_layout Description
21332 \begin_inset Flex Code
21335 \begin_layout Plain Layout
21342 \begin_inset Flex Code
21345 \begin_layout Plain Layout
21351 ] Attributes for the label tag.
21353 \begin_inset Quotes eld
21357 \begin_inset Flex Code
21360 \begin_layout Plain Layout
21361 class=`layoutname_label'
21367 \begin_inset Quotes erd
21375 contain any style information.
21377 \begin_inset Flex Code
21380 \begin_layout Plain Layout
21389 \begin_layout Description
21390 \begin_inset Flex Code
21393 \begin_layout Plain Layout
21400 \begin_inset Flex Code
21403 \begin_layout Plain Layout
21413 ] Meaningful only for list-like environments, this tag controls whether
21414 the label tag is output before or inside the item tag.
21415 This is used, for example, in the description environment, where we want
21417 \begin_inset Flex Code
21420 \begin_layout Plain Layout
21421 <dt>\SpecialChar ldots
21422 </dt><dd>\SpecialChar ldots
21430 \begin_inset Flex Code
21433 \begin_layout Plain Layout
21439 : The label tag is output inside the item tag.
21442 \begin_layout Description
21443 \begin_inset Flex Code
21446 \begin_layout Plain Layout
21452 Information to be output in the
21453 \begin_inset Flex Code
21456 \begin_layout Plain Layout
21462 section when this style is used.
21463 This might, for example, be used to include a
21464 \begin_inset Flex Code
21467 \begin_layout Plain Layout
21474 \begin_inset Flex Code
21477 \begin_layout Plain Layout
21486 \begin_layout Description
21487 \begin_inset Flex Code
21490 \begin_layout Plain Layout
21496 CSS style information to be included when this style is used.
21497 Note that this will automatically be wrapped in a layout-generated
21498 \begin_inset Flex Code
21501 \begin_layout Plain Layout
21507 block, so only the CSS itself need be included.
21509 \begin_inset Flex Code
21512 \begin_layout Plain Layout
21521 \begin_layout Description
21522 \begin_inset Flex Code
21525 \begin_layout Plain Layout
21532 \begin_inset Flex Code
21535 \begin_layout Plain Layout
21541 ] The tag to be used for the main label, replacing
21542 \begin_inset Flex Code
21545 \begin_layout Plain Layout
21551 in the examples above.
21553 \begin_inset Flex Code
21556 \begin_layout Plain Layout
21565 \begin_layout Description
21566 \begin_inset Flex Code
21569 \begin_layout Plain Layout
21576 \begin_inset Flex Code
21579 \begin_layout Plain Layout
21589 ] Marks this style as the one to be used to generate the
21590 \begin_inset Flex Code
21593 \begin_layout Plain Layout
21599 tag for the XHTML file.
21600 By default, it is false.
21602 \begin_inset Flex Code
21605 \begin_layout Plain Layout
21611 file sets it to true for the
21612 \begin_inset Flex Code
21615 \begin_layout Plain Layout
21625 \begin_layout Subsection
21629 \begin_layout Standard
21630 The XHTML output of insets can also be controlled by information in layout
21635 \begin_layout Plain Layout
21636 At present, this is true only for
21637 \begin_inset Quotes eld
21641 \begin_inset Quotes erd
21644 insets (insets you can type into) and is not true for
21645 \begin_inset Quotes eld
21649 \begin_inset Quotes erd
21652 insets (insets that are associated with dialog boxes).
21657 Here, too, \SpecialChar LyX
21658 tries to provide sensible defaults, and it constructs default
21660 But everything can be customized.
21663 \begin_layout Standard
21664 The XHTML \SpecialChar LyX
21665 outputs for an inset has the following form:
21668 \begin_layout LyX-Code
21670 \begin_inset Quotes erd
21674 \begin_inset Quotes erd
21680 \begin_layout LyX-Code
21681 <labeltag>Label</labeltag>
21684 \begin_layout LyX-Code
21686 \begin_inset Quotes erd
21690 \begin_inset Quotes erd
21693 >Contents of the inset.</innertag>
21696 \begin_layout LyX-Code
21700 \begin_layout Standard
21701 If the inset permits multiple paragraphs—that is, if
21702 \begin_inset Flex Code
21705 \begin_layout Plain Layout
21711 is true—then the contents of the inset will itself be output as paragraphs
21712 formatted according to the styles used for those paragraphs (standard,
21713 quote, and the like).
21714 The label tag is of course omitted if the paragraph does not have a label
21715 and, at present, is always
21716 \begin_inset Flex Code
21719 \begin_layout Plain Layout
21726 The inner tag is optional and, by default, does not appear.
21729 \begin_layout Standard
21730 The specific tags and attributes output for each inset can be controlled
21731 by means of the following layout tags.
21734 \begin_layout Description
21735 \begin_inset Flex Code
21738 \begin_layout Plain Layout
21745 \begin_inset Flex Code
21748 \begin_layout Plain Layout
21754 ] Specifies attribute information to be output with the main tag.
21756 \begin_inset Quotes eld
21760 \begin_inset Flex Code
21763 \begin_layout Plain Layout
21764 class=`myinset' onclick=`\SpecialChar ldots
21771 \begin_inset Quotes erd
21775 By default, \SpecialChar LyX
21777 \begin_inset Quotes eld
21781 \begin_inset Flex Code
21784 \begin_layout Plain Layout
21791 \begin_inset Quotes erd
21795 \begin_inset Flex Code
21798 \begin_layout Plain Layout
21804 is the \SpecialChar LyX
21805 name of the inset, made lowercase and with non-alphanumeric characters
21806 converted to underscores, for example: footnote.
21809 \begin_layout Description
21810 \begin_inset Flex Code
21813 \begin_layout Plain Layout
21820 \begin_inset Flex Code
21823 \begin_layout Plain Layout
21833 ] Whether to output the default CSS information \SpecialChar LyX
21834 generates for this layout,
21835 even if additional information is explicitly provided via
21836 \begin_inset Flex Code
21839 \begin_layout Plain Layout
21847 \begin_inset Flex Code
21850 \begin_layout Plain Layout
21856 allows you to alter or augment the generated CSS, rather than to override
21861 \begin_layout Description
21862 \begin_inset Flex Code
21865 \begin_layout Plain Layout
21872 \begin_inset Flex Code
21875 \begin_layout Plain Layout
21881 ] Attributes for the inner tag.
21883 \begin_inset Quotes eld
21887 \begin_inset Flex Code
21890 \begin_layout Plain Layout
21891 class=`insetname_inner'
21897 \begin_inset Quotes erd
21903 \begin_layout Description
21904 \begin_inset Flex Code
21907 \begin_layout Plain Layout
21914 \begin_inset Flex Code
21917 \begin_layout Plain Layout
21923 ] The inner tag, replacing
21924 \begin_inset Flex Code
21927 \begin_layout Plain Layout
21933 in the examples above.
21934 By default, there is none.
21937 \begin_layout Description
21938 \begin_inset Flex Code
21941 \begin_layout Plain Layout
21948 \begin_inset Flex Code
21951 \begin_layout Plain Layout
21959 ] Whether this inset represents a standalone block of text (such as a footnote)
21960 or instead represents material that is included in the surrounding text
21961 (such as a branch).
21965 \begin_layout Description
21966 \begin_inset Flex Code
21969 \begin_layout Plain Layout
21976 \begin_inset Flex Code
21979 \begin_layout Plain Layout
21985 ] A label for this inset, possibly including a reference to a counter.
21986 For example, for footnote, it might be:
21987 \begin_inset Flex Code
21990 \begin_layout Plain Layout
21999 This is optional, and there is no default.
22002 \begin_layout Description
22003 \begin_inset Flex Code
22006 \begin_layout Plain Layout
22012 Information to be output in the
22013 \begin_inset Flex Code
22016 \begin_layout Plain Layout
22022 section when this style is used.
22023 This might, for example, be used to include a
22024 \begin_inset Flex Code
22027 \begin_layout Plain Layout
22034 \begin_inset Flex Code
22037 \begin_layout Plain Layout
22046 \begin_layout Description
22047 \begin_inset Flex Code
22050 \begin_layout Plain Layout
22056 CSS style information to be included when this style is used.
22057 Note that this will automatically be wrapped in a layout-generated
22058 \begin_inset Flex Code
22061 \begin_layout Plain Layout
22067 block, so only the CSS itself need be included.
22070 \begin_layout Description
22071 \begin_inset Flex Code
22074 \begin_layout Plain Layout
22081 \begin_inset Flex Code
22084 \begin_layout Plain Layout
22090 ] The tag to be used for the main label, replacing
22091 \begin_inset Flex Code
22094 \begin_layout Plain Layout
22100 in the examples above.
22101 The default depends upon the setting of
22102 \begin_inset Flex Code
22105 \begin_layout Plain Layout
22112 \begin_inset Flex Code
22115 \begin_layout Plain Layout
22121 is true, the default is
22122 \begin_inset Flex Code
22125 \begin_layout Plain Layout
22131 ; if it is false, the default is
22132 \begin_inset Flex Code
22135 \begin_layout Plain Layout
22144 \begin_layout Subsection
22148 \begin_layout Standard
22149 The XHTML output for floats too can be controlled by layout information.
22150 The output has the following form:
22153 \begin_layout LyX-Code
22155 \begin_inset Quotes erd
22159 \begin_inset Quotes erd
22165 \begin_layout LyX-Code
22166 Contents of the float.
22169 \begin_layout LyX-Code
22173 \begin_layout Standard
22174 The caption, if there is one, is a separate inset and will be output as
22176 Its appearance can be controlled via the InsetLayout for caption insets.
22180 \begin_layout Description
22181 \begin_inset Flex Code
22184 \begin_layout Plain Layout
22191 \begin_inset Flex Code
22194 \begin_layout Plain Layout
22200 ] Specifies attribute information to be output with the main tag.
22202 \begin_inset Quotes eld
22206 \begin_inset Flex Code
22209 \begin_layout Plain Layout
22210 class=`myfloat' onclick=`\SpecialChar ldots
22217 \begin_inset Quotes erd
22221 By default, \SpecialChar LyX
22223 \begin_inset Quotes eld
22227 \begin_inset Flex Code
22230 \begin_layout Plain Layout
22231 class=`float float-floattype'
22237 \begin_inset Quotes erd
22241 \begin_inset Flex Code
22244 \begin_layout Plain Layout
22250 is \SpecialChar LyX
22251 's name for this type of float, as determined by the float declaration
22253 \begin_inset CommandInset ref
22255 reference "subsec:Floats"
22259 ), though made lowercase and with non-alphanumeric characters converted
22260 to underscores, for example: float-table.
22263 \begin_layout Description
22264 \begin_inset Flex Code
22267 \begin_layout Plain Layout
22273 CSS style information to be included when this float is used.
22274 Note that this will automatically be wrapped in a layout-generated
22275 \begin_inset Flex Code
22278 \begin_layout Plain Layout
22284 block, so only the CSS itself need be included.
22287 \begin_layout Description
22288 \begin_inset Flex Code
22291 \begin_layout Plain Layout
22298 \begin_inset Flex Code
22301 \begin_layout Plain Layout
22307 ] The tag to be used for this float, replacing
22308 \begin_inset Quotes eld
22312 \begin_inset Flex Code
22315 \begin_layout Plain Layout
22322 \begin_inset Quotes erd
22325 in the example above.
22327 \begin_inset Flex Code
22330 \begin_layout Plain Layout
22336 and will rarely need changing.
22339 \begin_layout Subsection
22340 Bibliography formatting
22343 \begin_layout Standard
22344 The bibliography can be formatted using
22345 \begin_inset Flex Code
22348 \begin_layout Plain Layout
22356 \begin_inset CommandInset ref
22358 reference "subsec:Citation-format-description"
22365 \begin_layout Subsection
22370 \begin_layout Standard
22371 We have several times mentioned that \SpecialChar LyX
22372 will generate default CSS style rules
22373 for both insets and paragraph styles, based upon the other layout information
22375 In this section, we shall say a word about which layout information \SpecialChar LyX
22380 \begin_layout Standard
22381 At present, \SpecialChar LyX
22382 auto-generates CSS only for font information, making use of
22384 \begin_inset Flex Code
22387 \begin_layout Plain Layout
22394 \begin_inset Flex Code
22397 \begin_layout Plain Layout
22404 \begin_inset Flex Code
22407 \begin_layout Plain Layout
22414 \begin_inset Flex Code
22417 \begin_layout Plain Layout
22424 \begin_inset Flex Code
22427 \begin_layout Plain Layout
22434 \begin_inset CommandInset ref
22436 reference "subsec:Font-description"
22441 The translation is mostly straightforward and obvious.
22443 \begin_inset Quotes eld
22447 \begin_inset Flex Code
22450 \begin_layout Plain Layout
22457 \begin_inset Quotes erd
22461 \begin_inset Quotes eld
22465 \begin_inset Flex Code
22468 \begin_layout Plain Layout
22469 font-family: sans-serif;
22475 \begin_inset Quotes erd
22479 The correspondence of \SpecialChar LyX
22480 sizes and CSS sizes is a little less obvious but
22481 nonetheless intuitive.
22483 \begin_inset Flex Code
22486 \begin_layout Plain Layout
22493 \begin_inset Flex URL
22496 \begin_layout Plain Layout
22506 \begin_layout Chapter
22507 Including External Material
22508 \begin_inset CommandInset label
22510 name "chap:Including-External-Material"
22517 \begin_layout Standard
22518 \begin_inset Box Shadowbox
22528 height_special "totalheight"
22533 backgroundcolor "none"
22536 \begin_layout Plain Layout
22537 WARNING: This portion of the documentation has not been updated for some
22539 We certainly hope that it is still accurate, but there are no guarantees.
22547 \begin_layout Standard
22548 The use of material from sources external to \SpecialChar LyX
22549 is covered in detail in the
22555 This part of the manual covers what needs to happen behind the scenes for
22556 new sorts of material to be included.
22559 \begin_layout Section
22563 \begin_layout Standard
22564 The external material feature is based on the concept of a
22569 A template is a specification of how \SpecialChar LyX
22570 should interface with a certain kind
22572 As bundled, \SpecialChar LyX
22573 comes with predefined templates for Xfig figures, various
22574 raster format images, chess diagrams, and LilyPond music notation.
22575 You can check the actual list by using the menu
22576 \begin_inset Flex MenuItem
22579 \begin_layout Plain Layout
22580 Insert\SpecialChar menuseparator
22581 File\SpecialChar menuseparator
22588 Furthermore, it is possible to roll your own template to support a specific
22590 Later we'll describe in more detail what is involved, and hopefully you
22591 will submit all the templates you create so we can include them in a later
22596 \begin_layout Standard
22597 Another basic idea of the external material feature is to distinguish between
22598 the original file that serves as a base for final material and the produced
22599 file that is included in your exported or printed document.
22600 For example, consider the case of a figure produced with
22601 \begin_inset Flex Code
22604 \begin_layout Plain Layout
22611 The Xfig application itself works on an original file with the
22612 \begin_inset Flex Code
22615 \begin_layout Plain Layout
22622 Within Xfig, you create and change your figure, and when you are done,
22624 \begin_inset Flex Code
22627 \begin_layout Plain Layout
22634 When you want to include the figure in your document, you invoke
22635 \begin_inset Flex Code
22638 \begin_layout Plain Layout
22644 in order to create a PostScript file that can readily be included in your
22648 \begin_inset Flex Code
22651 \begin_layout Plain Layout
22657 file is the original file, and the PostScript file is the produced file.
22660 \begin_layout Standard
22661 This distinction is important in order to allow updating of the material
22662 while you are in the process of writing the document.
22663 Furthermore, it provides us with the flexibility that is needed to support
22664 multiple export formats.
22665 For instance, in the case of a plain text file, it is not exactly an award-winn
22666 ing idea to include the figure as raw PostScript.
22667 Instead, you would either prefer to just include a reference to the figure
22668 or try to invoke some graphics to ASCII converter to make the final result
22669 look similar to the real graphics.
22670 The external material management allows you to do this, because it is parametri
22671 zed on the different export formats that \SpecialChar LyX
22675 \begin_layout Standard
22676 Besides supporting the production of different products according to the
22677 exported format, it supports tight integration with editing and viewing
22679 In the case of an Xfig figure, you are able to invoke Xfig on the original
22680 file with a single click from within the external material dialog in \SpecialChar LyX
22682 and also preview the produced PostScript file with Ghostview with another
22684 No more fiddling around with the command line and/or file browsers to locate
22685 and manipulate the original or produced files.
22686 In this way, you are finally able to take full advantage of the many different
22687 applications that are relevant to use when you write your documents, and
22688 ultimately be more productive.
22691 \begin_layout Section
22692 The external template configuration file
22695 \begin_layout Standard
22696 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22698 However, be aware that doing this in an careless manner most probably
22702 introduce an easily exploitable security hole.
22703 So before you do this, please read the discussion about security in
22704 \begin_inset CommandInset ref
22706 reference "sec:Security-discussion"
22713 \begin_layout Standard
22714 Having said that, we encourage you to submit any interesting templates that
22719 \begin_layout Standard
22720 The external templates are defined in the
22721 \begin_inset Flex Code
22724 \begin_layout Plain Layout
22725 LyXDir/lib/external_templates
22731 You can place your own version in
22732 \begin_inset Flex Code
22735 \begin_layout Plain Layout
22736 UserDir/external_templates
22744 \begin_layout Standard
22745 A typical template looks like this:
22748 \begin_layout LyX-Code
22752 \begin_layout LyX-Code
22753 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22756 \begin_layout LyX-Code
22760 \begin_layout LyX-Code
22764 \begin_layout LyX-Code
22768 \begin_layout LyX-Code
22772 \begin_layout LyX-Code
22776 \begin_layout LyX-Code
22777 AutomaticProduction true
22780 \begin_layout LyX-Code
22784 \begin_layout LyX-Code
22788 \begin_layout LyX-Code
22789 Format \SpecialChar LaTeX
22793 \begin_layout LyX-Code
22794 TransformCommand Rotate RotationLatexCommand
22797 \begin_layout LyX-Code
22798 TransformCommand Resize ResizeLatexCommand
22801 \begin_layout LyX-Code
22802 Product "$$RotateFront$$ResizeFront
22805 \begin_layout LyX-Code
22810 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22813 \begin_layout LyX-Code
22814 $$ResizeBack$$RotateBack"
22817 \begin_layout LyX-Code
22821 \begin_layout LyX-Code
22822 UpdateResult "$$AbsPath$$Basename.pstex_t"
22825 \begin_layout LyX-Code
22826 Requirement "graphicx"
22829 \begin_layout LyX-Code
22830 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22833 \begin_layout LyX-Code
22834 ReferencedFile latex "$$AbsPath$$Basename.eps"
22837 \begin_layout LyX-Code
22838 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22841 \begin_layout LyX-Code
22845 \begin_layout LyX-Code
22846 Format PDF\SpecialChar LaTeX
22850 \begin_layout LyX-Code
22851 TransformCommand Rotate RotationLatexCommand
22854 \begin_layout LyX-Code
22855 TransformCommand Resize ResizeLatexCommand
22858 \begin_layout LyX-Code
22859 Product "$$RotateFront$$ResizeFront
22862 \begin_layout LyX-Code
22867 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22870 \begin_layout LyX-Code
22871 $$ResizeBack$$RotateBack"
22874 \begin_layout LyX-Code
22875 UpdateFormat pdftex
22878 \begin_layout LyX-Code
22879 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22882 \begin_layout LyX-Code
22883 Requirement "graphicx"
22886 \begin_layout LyX-Code
22887 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22890 \begin_layout LyX-Code
22891 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22894 \begin_layout LyX-Code
22898 \begin_layout LyX-Code
22902 \begin_layout LyX-Code
22903 Product "$$Contents(
22905 "$$AbsPath$$Basename.asc
22910 \begin_layout LyX-Code
22911 UpdateFormat asciixfig
22914 \begin_layout LyX-Code
22915 UpdateResult "$$AbsPath$$Basename.asc"
22918 \begin_layout LyX-Code
22922 \begin_layout LyX-Code
22926 \begin_layout LyX-Code
22927 Product "<graphic fileref=
22929 "$$AbsOrRelPathMaster$$Basename.eps
22934 \begin_layout LyX-Code
22938 \begin_layout LyX-Code
22942 \begin_layout LyX-Code
22943 UpdateResult "$$AbsPath$$Basename.eps"
22946 \begin_layout LyX-Code
22947 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22950 \begin_layout LyX-Code
22951 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22954 \begin_layout LyX-Code
22958 \begin_layout LyX-Code
22959 Product "[XFig: $$FName]"
22962 \begin_layout LyX-Code
22966 \begin_layout LyX-Code
22970 \begin_layout Standard
22971 As you can see, the template is enclosed in
22972 \begin_inset Flex Code
22975 \begin_layout Plain Layout
22983 \begin_inset Flex Code
22986 \begin_layout Plain Layout
22993 It contains a header specifying some general settings and, for each supported
22994 primary document file format, a section
22995 \begin_inset Flex Code
22998 \begin_layout Plain Layout
23006 \begin_inset Flex Code
23009 \begin_layout Plain Layout
23018 \begin_layout Subsection
23019 The template header
23022 \begin_layout Description
23023 \begin_inset Flex Code
23026 \begin_layout Plain Layout
23027 AutomaticProduction
23028 \begin_inset space ~
23036 Whether the file represented by the template must be generated by \SpecialChar LyX
23038 This command must occur exactly once.
23041 \begin_layout Description
23042 \begin_inset Flex Code
23045 \begin_layout Plain Layout
23047 \begin_inset space ~
23055 A glob pattern that is used in the file dialog to filter out the desired
23057 If there is more than one possible file extension (e.
23058 \begin_inset space \thinspace{}
23062 \begin_inset space \space{}
23066 \begin_inset Flex Code
23069 \begin_layout Plain Layout
23076 \begin_inset Flex Code
23079 \begin_layout Plain Layout
23085 ), use something like
23086 \begin_inset Flex Code
23089 \begin_layout Plain Layout
23096 This command must occur exactly once.
23099 \begin_layout Description
23100 \begin_inset Flex Code
23103 \begin_layout Plain Layout
23105 \begin_inset space ~
23113 The text that is displayed on the button.
23114 This command must occur exactly once.
23117 \begin_layout Description
23118 \begin_inset Flex Code
23121 \begin_layout Plain Layout
23123 \begin_inset space ~
23127 \begin_inset space ~
23135 The help text that is used in the External dialog.
23136 Provide enough information to explain to the user just what the template
23137 can provide him with.
23138 This command must occur exactly once.
23141 \begin_layout Description
23142 \begin_inset Flex Code
23145 \begin_layout Plain Layout
23147 \begin_inset space ~
23155 The file format of the original file.
23156 This must be the name of a format that is known to \SpecialChar LyX
23158 \begin_inset CommandInset ref
23160 reference "sec:Formats"
23166 \begin_inset Quotes eld
23170 \begin_inset Flex Code
23173 \begin_layout Plain Layout
23180 \begin_inset Quotes erd
23183 if the template can handle original files of more than one format.
23185 will attempt to interrogate the file itself in order to deduce its format
23187 This command must occur exactly once.
23190 \begin_layout Description
23191 \begin_inset Flex Code
23194 \begin_layout Plain Layout
23196 \begin_inset space ~
23204 A unique name for the template.
23205 It must not contain substitution macros (see below).
23208 \begin_layout Description
23209 \begin_inset Flex Code
23212 \begin_layout Plain Layout
23214 \begin_inset space ~
23217 Rotate|Resize|Clip|Extra
23222 This command specifies which transformations are supported by this template.
23223 It may occur zero or more times.
23224 This command enables the corresponding tabs in the external dialog.
23226 \begin_inset Flex Code
23229 \begin_layout Plain Layout
23235 command must have either a corresponding
23236 \begin_inset Flex Code
23239 \begin_layout Plain Layout
23246 \begin_inset Flex Code
23249 \begin_layout Plain Layout
23256 \begin_inset Flex Code
23259 \begin_layout Plain Layout
23266 Otherwise the transformation will not be supported by that format.
23269 \begin_layout Subsection
23273 \begin_layout Description
23274 \begin_inset Flex Code
23277 \begin_layout Plain Layout
23279 \begin_inset space ~
23282 LaTeX|PDFLaTeX|PlainText|DocBook
23287 The primary document file format that this format definition is for.
23288 Not every template has a sensible representation in all document file formats.
23289 Please define nevertheless a
23290 \begin_inset Flex Code
23293 \begin_layout Plain Layout
23299 section for all templates.
23300 Use a dummy text when no representation is available.
23301 Then you can at least see a reference to the external material in the exported
23305 \begin_layout Description
23306 \begin_inset Flex Code
23309 \begin_layout Plain Layout
23311 \begin_inset space ~
23315 \begin_inset space ~
23323 This command defines an additional macro
23324 \begin_inset Flex Code
23327 \begin_layout Plain Layout
23333 for substitution in
23334 \begin_inset Flex Code
23337 \begin_layout Plain Layout
23345 \begin_inset Flex Code
23348 \begin_layout Plain Layout
23354 itself may contain substitution macros.
23355 The advantage over using
23356 \begin_inset Flex Code
23359 \begin_layout Plain Layout
23366 \begin_inset Flex Code
23369 \begin_layout Plain Layout
23375 is that the substituted value of
23376 \begin_inset Flex Code
23379 \begin_layout Plain Layout
23385 is sanitized so that it is a valid optional argument in the document format.
23386 This command may occur zero or more times.
23389 \begin_layout Description
23390 \begin_inset Flex Code
23393 \begin_layout Plain Layout
23395 \begin_inset space ~
23403 The text that is inserted in the exported document.
23404 This is actually the most important command and can be quite complex.
23405 This command must occur exactly once.
23408 \begin_layout Description
23409 \begin_inset Flex Code
23412 \begin_layout Plain Layout
23414 \begin_inset space ~
23422 This command specifies a preamble snippet that will be included in the
23425 It has to be defined using
23426 \begin_inset Flex Code
23429 \begin_layout Plain Layout
23437 \begin_inset Flex Code
23440 \begin_layout Plain Layout
23447 This command may occur zero or more times.
23450 \begin_layout Description
23451 \begin_inset Flex Code
23454 \begin_layout Plain Layout
23456 \begin_inset space ~
23460 \begin_inset space ~
23468 This command denotes files that are created by the conversion process and
23469 are needed for a particular export format.
23470 If the filename is relative, it is interpreted relative to the master document.
23471 This command may be given zero or more times.
23474 \begin_layout Description
23475 \begin_inset Flex Code
23478 \begin_layout Plain Layout
23480 \begin_inset space ~
23488 The name of a required \SpecialChar LaTeX
23490 The package is included via
23491 \begin_inset Flex Code
23494 \begin_layout Plain Layout
23502 in the \SpecialChar LaTeX
23504 This command may occur zero or more times.
23507 \begin_layout Description
23508 \begin_inset Flex Code
23511 \begin_layout Plain Layout
23513 \begin_inset space ~
23517 \begin_inset space ~
23520 RotationLatexCommand
23525 This command specifies that the built in \SpecialChar LaTeX
23526 command should be used for rotation.
23527 This command may occur once or not at all.
23530 \begin_layout Description
23531 \begin_inset Flex Code
23534 \begin_layout Plain Layout
23536 \begin_inset space ~
23540 \begin_inset space ~
23548 This command specifies that the built in \SpecialChar LaTeX
23549 command should be used for resizing.
23550 This command may occur once or not at all.
23553 \begin_layout Description
23554 \begin_inset Flex Code
23557 \begin_layout Plain Layout
23559 \begin_inset space ~
23563 \begin_inset space ~
23566 RotationLatexOption
23571 This command specifies that rotation is done via an optional argument.
23572 This command may occur once or not at all.
23575 \begin_layout Description
23576 \begin_inset Flex Code
23579 \begin_layout Plain Layout
23581 \begin_inset space ~
23585 \begin_inset space ~
23593 This command specifies that resizing is done via an optional argument.
23594 This command may occur once or not at all.
23597 \begin_layout Description
23598 \begin_inset Flex Code
23601 \begin_layout Plain Layout
23603 \begin_inset space ~
23607 \begin_inset space ~
23615 This command specifies that clipping is done via an optional argument.
23616 This command may occur once or not at all.
23619 \begin_layout Description
23620 \begin_inset Flex Code
23623 \begin_layout Plain Layout
23625 \begin_inset space ~
23629 \begin_inset space ~
23637 This command specifies that an extra optional argument is used.
23638 This command may occur once or not at all.
23641 \begin_layout Description
23642 \begin_inset Flex Code
23645 \begin_layout Plain Layout
23647 \begin_inset space ~
23655 The file format of the converted file.
23656 This must be the name of a format that is known to \SpecialChar LyX
23658 \begin_inset Flex MenuItem
23661 \begin_layout Plain Layout
23662 Tools\SpecialChar menuseparator
23663 Preferences\SpecialChar menuseparator
23664 File Handling\SpecialChar menuseparator
23671 This command must occur exactly once.
23672 If the resulting file format is PDF, you need to specify the format
23673 \begin_inset Flex Code
23676 \begin_layout Plain Layout
23683 This is the PDF format used for including graphics.
23684 The other defined PDF formats are for document export.
23687 \begin_layout Description
23688 \begin_inset Flex Code
23691 \begin_layout Plain Layout
23693 \begin_inset space ~
23701 The file name of the converted file.
23702 The file name must be absolute.
23703 This command must occur exactly once.
23706 \begin_layout Subsection
23707 Preamble definitions
23710 \begin_layout Standard
23711 The external template configuration file may contain additional preamble
23712 definitions enclosed by
23713 \begin_inset Flex Code
23716 \begin_layout Plain Layout
23724 \begin_inset Flex Code
23727 \begin_layout Plain Layout
23734 They can be used by the templates in the
23735 \begin_inset Flex Code
23738 \begin_layout Plain Layout
23747 \begin_layout Section
23748 The substitution mechanism
23751 \begin_layout Standard
23752 When the external material facility invokes an external program, it is done
23753 on the basis of a command defined in the template configuration file.
23754 These commands can contain various macros that are expanded before execution.
23755 Execution always take place in the directory of the containing document.
23758 \begin_layout Standard
23759 Also, whenever external material is to be displayed, the name will be produced
23760 by the substitution mechanism, and most other commands in the template
23761 definition support substitution as well.
23764 \begin_layout Standard
23765 The available macros are the following:
23768 \begin_layout Description
23769 \begin_inset Flex Code
23772 \begin_layout Plain Layout
23773 $$AbsOrRelPathMaster
23778 The file path, absolute or relative to the master \SpecialChar LyX
23782 \begin_layout Description
23783 \begin_inset Flex Code
23786 \begin_layout Plain Layout
23787 $$AbsOrRelPathParent
23792 The file path, absolute or relative to the \SpecialChar LyX
23796 \begin_layout Description
23797 \begin_inset Flex Code
23800 \begin_layout Plain Layout
23806 The absolute file path.
23809 \begin_layout Description
23810 \begin_inset Flex Code
23813 \begin_layout Plain Layout
23819 The filename without path and without the extension.
23822 \begin_layout Description
23823 \begin_inset Flex Code
23826 \begin_layout Plain Layout
23828 \begin_inset Quotes eld
23832 \begin_inset Quotes erd
23840 This macro will expand to the contents of the file with the name
23841 \begin_inset Flex Code
23844 \begin_layout Plain Layout
23853 \begin_layout Description
23854 \begin_inset Flex Code
23857 \begin_layout Plain Layout
23863 The file extension (including the dot).
23866 \begin_layout Description
23867 \begin_inset Flex Code
23870 \begin_layout Plain Layout
23876 This will be the string
23877 \begin_inset Quotes eld
23881 \begin_inset Quotes erd
23884 if the file is in JPEG format, otherwise it will be the string
23885 \begin_inset Quotes eld
23889 \begin_inset Quotes erd
23893 This is useful to avoid uneeded conversions for output formats that support
23894 both PNG and JPEG fomats.
23895 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
23900 \begin_layout Description
23901 \begin_inset Flex Code
23904 \begin_layout Plain Layout
23910 The filename of the file specified in the external material dialog.
23911 This is either an absolute name, or it is relative to the \SpecialChar LyX
23915 \begin_layout Description
23916 \begin_inset Flex Code
23919 \begin_layout Plain Layout
23926 \begin_inset Flex Code
23929 \begin_layout Plain Layout
23935 (absolute name or relative to the \SpecialChar LyX
23939 \begin_layout Description
23940 \begin_inset Flex Code
23943 \begin_layout Plain Layout
23949 The file path, relative to the master \SpecialChar LyX
23953 \begin_layout Description
23954 \begin_inset Flex Code
23957 \begin_layout Plain Layout
23963 The file path, relative to the \SpecialChar LyX
23967 \begin_layout Description
23968 \begin_inset Flex Code
23971 \begin_layout Plain Layout
23977 This macro will expand to the absolute path of the system directory.
23978 This is typically used to point to the various helper scripts that are
23979 bundled with \SpecialChar LyX
23983 \begin_layout Description
23984 \begin_inset Flex Code
23987 \begin_layout Plain Layout
23993 A name and full path to a temporary file which will be automatically deleted
23994 whenever the containing document is closed, or the external material insertion
23998 \begin_layout Standard
23999 All path macros contain a trailing directory separator, so you can construct
24001 \begin_inset space \thinspace{}
24005 \begin_inset space \space{}
24008 the absolute filename with
24009 \begin_inset Flex Code
24012 \begin_layout Plain Layout
24013 $$AbsPath$$Basename$$Extension
24021 \begin_layout Standard
24022 The macros above are substituted in all commands unless otherwise noted.
24024 \begin_inset Flex Code
24027 \begin_layout Plain Layout
24033 supports additionally the following substitutions if they are enabled by
24035 \begin_inset Flex Code
24038 \begin_layout Plain Layout
24045 \begin_inset Flex Code
24048 \begin_layout Plain Layout
24057 \begin_layout Description
24058 \begin_inset Flex Code
24061 \begin_layout Plain Layout
24067 The front part of the resize command.
24070 \begin_layout Description
24071 \begin_inset Flex Code
24074 \begin_layout Plain Layout
24080 The back part of the resize command.
24083 \begin_layout Description
24084 \begin_inset Flex Code
24087 \begin_layout Plain Layout
24093 The front part of the rotation command.
24096 \begin_layout Description
24097 \begin_inset Flex Code
24100 \begin_layout Plain Layout
24106 The back part of the rotation command.
24109 \begin_layout Standard
24110 The value string of the
24111 \begin_inset Flex Code
24114 \begin_layout Plain Layout
24120 command supports additionally the following substitutions if they are enabled
24122 \begin_inset Flex Code
24125 \begin_layout Plain Layout
24132 \begin_inset Flex Code
24135 \begin_layout Plain Layout
24144 \begin_layout Description
24145 \begin_inset Flex Code
24148 \begin_layout Plain Layout
24157 \begin_layout Description
24158 \begin_inset Flex Code
24161 \begin_layout Plain Layout
24170 \begin_layout Description
24171 \begin_inset Flex Code
24174 \begin_layout Plain Layout
24183 \begin_layout Description
24184 \begin_inset Flex Code
24187 \begin_layout Plain Layout
24193 The rotation option.
24196 \begin_layout Standard
24197 You may ask why there are so many path macros.
24198 There are mainly two reasons:
24201 \begin_layout Enumerate
24202 Relative and absolute file names should remain relative or absolute, respectivel
24204 Users may have reasons to prefer either form.
24205 Relative names are useful for portable documents that should work on different
24206 machines, for example.
24207 Absolute names may be required by some programs.
24210 \begin_layout Enumerate
24212 treats relative file names differently than \SpecialChar LyX
24213 and other programs in nested
24215 For \SpecialChar LyX
24216 , a relative file name is always relative to the document that contains
24218 For \SpecialChar LaTeX
24219 , it is always relative to the master document.
24220 These two definitions are identical if you have only one document, but
24221 differ if you have a master document that includes part documents.
24222 That means that relative filenames must be transformed when presented to
24225 Fortunately \SpecialChar LyX
24226 does this automatically for you if you choose the right macros.
24229 \begin_layout Standard
24230 So which path macro should be used in new template definitions? The rule
24234 \begin_layout Itemize
24236 \begin_inset Flex Code
24239 \begin_layout Plain Layout
24245 if an absolute path is required.
24248 \begin_layout Itemize
24250 \begin_inset Flex Code
24253 \begin_layout Plain Layout
24254 $$AbsOrRelPathMaster
24259 if the substituted string is some kind of \SpecialChar LaTeX
24263 \begin_layout Itemize
24265 \begin_inset Flex Code
24268 \begin_layout Plain Layout
24269 $$AbsOrRelPathParent
24274 in order to preserve the user's choice.
24277 \begin_layout Standard
24278 There are special cases where this rule does not work and e.
24279 \begin_inset space \thinspace{}
24283 \begin_inset space \space{}
24286 relative names are needed, but normally it will work just fine.
24287 One example for such a case is the command
24288 \begin_inset Flex Code
24291 \begin_layout Plain Layout
24292 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24297 in the XFig template above: We can't use the absolute name because the
24299 \begin_inset Flex Code
24302 \begin_layout Plain Layout
24308 files needs the relative name in order to rewrite the file content.
24311 \begin_layout Section
24312 Security discussion
24313 \begin_inset CommandInset label
24315 name "sec:Security-discussion"
24322 \begin_layout Standard
24323 The external material feature interfaces with a lot of external programs
24324 and does so automatically, so we have to consider the security implications
24326 In particular, since you have the option of including your own filenames
24327 and/or parameter strings and those are expanded into a command, it seems
24328 that it would be possible to create a malicious document which executes
24329 arbitrary commands when a user views or prints the document.
24330 This is something we definitely want to avoid.
24333 \begin_layout Standard
24334 However, since the external program commands are specified in the template
24335 configuration file only, there are no security issues if \SpecialChar LyX
24336 is properly configure
24337 d with safe templates only.
24338 This is so because the external programs are invoked with the
24339 \begin_inset Flex Code
24342 \begin_layout Plain Layout
24348 -system call rather than the
24349 \begin_inset Flex Code
24352 \begin_layout Plain Layout
24358 system-call, so it's not possible to execute arbitrary commands from the
24359 filename or parameter section via the shell.
24362 \begin_layout Standard
24363 This also implies that you are restricted in what command strings you can
24364 use in the external material templates.
24365 In particular, pipes and redirection are not readily available.
24366 This has to be so if \SpecialChar LyX
24367 should remain safe.
24368 If you want to use some of the shell features, you should write a safe
24369 script to do this in a controlled manner, and then invoke the script from
24370 the command string.
24374 \begin_layout Standard
24375 It is possible to design a template that interacts directly with the shell,
24376 but since this would allow a malicious user to execute arbitrary commands
24377 by writing clever filenames and/or parameters, we generally recommend that
24378 you only use safe scripts that work with the
24379 \begin_inset Flex Code
24382 \begin_layout Plain Layout
24388 system call in a controlled manner.
24389 Of course, for use in a controlled environment, it can be tempting to just
24390 fall back to use ordinary shell scripts.
24391 If you do so, be aware that you
24395 provide an easily exploitable security hole in your system.
24396 Of course it stands to reason that such unsafe templates will never be
24397 included in the standard \SpecialChar LyX
24398 distribution, although we do encourage people
24399 to submit new templates in the open source tradition.
24400 But \SpecialChar LyX
24401 as shipped from the official distribution channels will never have
24405 \begin_layout Standard
24406 Including external material provides a lot of power, and you have to be
24407 careful not to introduce security hazards with this power.
24408 A subtle error in a single line in an innocent looking script can open
24409 the door to huge security problems.
24410 So if you do not fully understand the issues, we recommend that you consult
24411 a knowledgeable security professional or the \SpecialChar LyX
24412 development team if you have
24413 any questions about whether a given template is safe or not.
24414 And do this before you use it in an uncontrolled environment.
24417 \begin_layout Chapter
24419 List of supported \SpecialChar LyX
24420 functions to be used in layouts
24421 \begin_inset CommandInset label
24423 name "chap:List-of-functions"
24430 \begin_layout Standard
24432 \begin_inset Tabular
24433 <lyxtabular version="3" rows="11" columns="8">
24434 <features tabularvalignment="middle">
24435 <column alignment="left" valignment="top">
24436 <column alignment="left" valignment="top">
24437 <column alignment="left" valignment="top">
24438 <column alignment="left" valignment="top">
24439 <column alignment="left" valignment="top">
24440 <column alignment="left" valignment="top">
24441 <column alignment="left" valignment="top">
24442 <column alignment="left" valignment="top">
24444 <cell alignment="left" valignment="top" usebox="none">
24447 \begin_layout Plain Layout
24453 <cell alignment="left" valignment="top" usebox="none">
24456 \begin_layout Plain Layout
24462 <cell alignment="left" valignment="top" usebox="none">
24465 \begin_layout Plain Layout
24471 <cell alignment="left" valignment="top" usebox="none">
24474 \begin_layout Plain Layout
24480 <cell alignment="center" valignment="top" usebox="none">
24483 \begin_layout Plain Layout
24489 <cell alignment="center" valignment="top" usebox="none">
24492 \begin_layout Plain Layout
24498 <cell alignment="center" valignment="top" usebox="none">
24501 \begin_layout Plain Layout
24507 <cell alignment="center" valignment="top" usebox="none">
24510 \begin_layout Plain Layout
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="center" valignment="top" usebox="none">
25187 \begin_layout Plain Layout
25193 <cell alignment="center" valignment="top" usebox="none">
25196 \begin_layout Plain Layout
25202 <cell alignment="center" valignment="top" usebox="none">
25205 \begin_layout Plain Layout
25211 <cell alignment="center" valignment="top" usebox="none">
25214 \begin_layout Plain Layout
25220 <cell alignment="center" valignment="top" usebox="none">
25223 \begin_layout Plain Layout
25229 <cell alignment="center" valignment="top" usebox="none">
25232 \begin_layout Plain Layout
25238 <cell alignment="center" valignment="top" usebox="none">
25241 \begin_layout Plain Layout
25247 <cell alignment="center" valignment="top" usebox="none">
25250 \begin_layout Plain Layout
25264 \begin_layout Chapter
25265 Names of available colors to be used in layouts
25266 \begin_inset CommandInset label
25268 name "chap:Names-of-colors"
25275 \begin_layout Standard
25276 The colors listed here are the standard colors and the those that you can
25277 adjust in the \SpecialChar LyX
25281 \begin_layout Description
25294 No particular color – clear or default
25297 \begin_layout Description
25301 \begin_layout Description
25305 \begin_layout Description
25309 \begin_layout Description
25313 \begin_layout Description
25317 \begin_layout Description
25321 \begin_layout Description
25325 \begin_layout Description
25329 \begin_layout Description
25330 added_space Added space marker color
25333 \begin_layout Description
25334 addedtext Added text color
25337 \begin_layout Description
25338 appendix Appendix marker color
25341 \begin_layout Description
25342 background Background color
25345 \begin_layout Description
25346 bottomarea Bottom area color
25349 \begin_layout Description
25350 branchlabel Label color for branches
25353 \begin_layout Description
25354 buttonbg Color used for bottom background
25357 \begin_layout Description
25358 buttonhoverbg Color used for button background under focus
25361 \begin_layout Description
25362 buttonframe Color for inset button frames
25365 \begin_layout Description
25366 changebar Changebar color
25369 \begin_layout Description
25370 changedtextauthor1 Changed text color author 1
25373 \begin_layout Description
25374 changedtextauthor2 Changed text color author 2
25377 \begin_layout Description
25378 changedtextauthor3 Changed text color author 3
25381 \begin_layout Description
25382 changedtextauthor4 Changed text color author 4
25385 \begin_layout Description
25386 changedtextauthor5 Changed text color author 5
25389 \begin_layout Description
25390 collapsable_inset_frame Collapsable insets framecolor
25393 \begin_layout Description
25394 collapsable_inset_text Collapsable insets text color
25397 \begin_layout Description
25398 command Text color for command insets
25401 \begin_layout Description
25402 commandbg Background color for command insets
25405 \begin_layout Description
25406 commandframe Frame color for command insets
25409 \begin_layout Description
25410 comment color for comments
25413 \begin_layout Description
25414 commentbg Background color of comments
25417 \begin_layout Description
25418 cursor Cursor color
25421 \begin_layout Description
25422 deletedtext Deleted text color
25425 \begin_layout Description
25426 deletedtextmodifier Deleted text modifying color
25429 \begin_layout Description
25430 depthbar Color for the depth bars in the margin
25433 \begin_layout Description
25434 eolmarker End of line marker color
25437 \begin_layout Description
25438 error Color of the \SpecialChar LaTeX
25442 \begin_layout Description
25443 footlabel Label color for footnotes
25446 \begin_layout Description
25447 graphicsbg Graphics inset background color
25450 \begin_layout Description
25451 greyedout Label color for greyedout insets
25454 \begin_layout Description
25455 greyedoutbg Background color of greyedout inset
25458 \begin_layout Description
25459 greyedouttext Color for greyedout inset text
25462 \begin_layout Description
25463 indexlabel Label color for index insets
25466 \begin_layout Description
25467 ignore The color is ignored
25470 \begin_layout Description
25471 inherit The color is inherited
25474 \begin_layout Description
25475 inlinecompletion Inline completion color
25478 \begin_layout Description
25479 insetbg Inset marker background color
25482 \begin_layout Description
25483 insetframe Inset marker frame color
25486 \begin_layout Description
25487 language Color for marking foreign language words
25490 \begin_layout Description
25491 latex Text color in \SpecialChar LaTeX
25495 \begin_layout Description
25496 listingsbg Background color of listings inset
25499 \begin_layout Description
25500 marginlabel Label color for margin notes
25503 \begin_layout Description
25504 math Math inset text color
25507 \begin_layout Description
25508 mathbg Math inset background color
25511 \begin_layout Description
25512 mathcorners Math inset frame color not under focus
25515 \begin_layout Description
25516 mathframe Math inset frame color under focus
25519 \begin_layout Description
25520 mathline Math line color
25523 \begin_layout Description
25524 mathmacrobg Macro math inset background color
25527 \begin_layout Description
25528 mathmacroblend Macro math blended color
25531 \begin_layout Description
25532 mathmacroframe Macro math frame color
25535 \begin_layout Description
25536 mathmacrohoverbg Macro math inset background color hovered
25539 \begin_layout Description
25540 mathmacrolabel Macro math label color
25543 \begin_layout Description
25544 mathmacronewarg Macro template color for new parameters
25547 \begin_layout Description
25548 mathmacrooldarg Macro template color for old parameters
25551 \begin_layout Description
25552 newpage New page color
25555 \begin_layout Description
25556 nonunique_inlinecompletion Inline completion color for the non-unique part
25559 \begin_layout Description
25560 notebg Background color of notes
25563 \begin_layout Description
25564 notelabel Label color for notes
25567 \begin_layout Description
25568 pagebreak Page break/line break color
25571 \begin_layout Description
25572 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25575 \begin_layout Description
25576 phantomtext Text color for phantom insets
25579 \begin_layout Description
25580 preview The color used for previews
25583 \begin_layout Description
25584 previewframe Preview frame color
25587 \begin_layout Description
25588 regexpframe Color for regexp frame
25591 \begin_layout Description
25592 selection Background color of selected text
25595 \begin_layout Description
25596 selectiontext Foreground color of selected text
25599 \begin_layout Description
25600 shadedbg Background color of shaded box
25603 \begin_layout Description
25604 special Special chars text color
25607 \begin_layout Description
25608 tabularline Table line color
25611 \begin_layout Description
25612 tabularonoffline Table line color
25615 \begin_layout Description
25616 urllabel Label color for URL insets
25619 \begin_layout Description
25620 urltext Color for URL inset text