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
54 \language_package default
57 \font_roman "default" "default"
58 \font_sans "default" "default"
59 \font_typewriter "default" "default"
60 \font_math "auto" "auto"
61 \font_default_family default
62 \use_non_tex_fonts false
65 \font_sf_scale 100 100
66 \font_tt_scale 100 100
68 \default_output_format default
70 \bibtex_command default
71 \index_command default
75 \pdf_title "LyX Configuration Manual"
76 \pdf_author "LyX Team"
77 \pdf_subject "LyX-documentation Customization"
78 \pdf_keywords "LyX, documentation, customization"
80 \pdf_bookmarksnumbered true
81 \pdf_bookmarksopen true
82 \pdf_bookmarksopenlevel 1
87 \pdf_pdfusetitle false
88 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
91 \use_package amsmath 0
92 \use_package amssymb 0
95 \use_package mathdots 1
96 \use_package mathtools 0
98 \use_package stackrel 0
99 \use_package stmaryrd 0
100 \use_package undertilde 0
102 \cite_engine_type default
106 \paperorientation portrait
121 \paragraph_separation indent
122 \paragraph_indentation default
123 \quotes_language english
126 \paperpagestyle headings
127 \tracking_changes false
128 \output_changes false
137 Customizing \SpecialChar LyX
138 : Features for the Advanced User
142 by the \SpecialChar LyX
147 \begin_layout Plain Layout
149 If you have comments or error corrections, please send them to the \SpecialChar LyX
152 \begin_inset CommandInset href
154 target "lyx-docs@lists.lyx.org"
161 \begin_inset Quotes eld
165 \begin_inset Quotes erd
168 in the subject header, and please cc the current maintainer of this file,
169 Richard Heck <rgheck@comcast.net>.
175 \begin_inset Newline newline
179 \begin_inset Newline newline
185 \begin_layout Standard
186 \begin_inset CommandInset toc
187 LatexCommand tableofcontents
194 \begin_layout Standard
195 \begin_inset Note Note
198 \begin_layout Plain Layout
199 Please use change tracking when modifying this document.
200 This makes it easier for our translators to recognize things that have
201 been changed, and it helps the maintainer keep up-to-date with what's been
210 \begin_layout Chapter
214 \begin_layout Standard
215 This manual covers the customization features present in \SpecialChar LyX
217 In it, we discuss issues like keyboard shortcuts, screen previewing options,
218 printer options, sending commands to \SpecialChar LyX
219 via the \SpecialChar LyX
220 Server, internationalization,
221 installing new \SpecialChar LaTeX
222 classes and \SpecialChar LyX
224 We can't possibly hope to touch on everything you can change—our developers
225 add new features faster than we can document them—but we will explain the
226 most common customizations and hopefully point you in the right direction
227 for some of the more obscure ones.
230 \begin_layout Standard
231 \begin_inset Branch OutDated
234 \begin_layout Standard
235 Information from previous versions of this document that now seems to be
236 outdated is contained in the OutDated branch of this document.
237 By default, this information will not appear in the \SpecialChar LaTeX
246 \begin_layout Chapter
251 \begin_layout Standard
252 This chapter aims to help you to find your way through the \SpecialChar LyX
255 Before continuing to read this chapter, you should find out where your
257 library and user directories are by using
258 \begin_inset Flex Noun
261 \begin_layout Plain Layout
262 Help\SpecialChar menuseparator
273 The library directory is the place where \SpecialChar LyX
274 places its system-wide configuration
275 files; the user directory is where you can place your modified versions.
276 We will call the former
277 \begin_inset Flex Code
280 \begin_layout Plain Layout
287 \begin_inset Flex Noun
290 \begin_layout Plain Layout
296 in the remainder of this document.
300 \begin_layout Section
302 \begin_inset Flex Code
305 \begin_layout Plain Layout
314 \begin_layout Standard
315 \begin_inset Flex Code
318 \begin_layout Plain Layout
324 and its sub-directories contain a number of files and that can be used
325 to customize \SpecialChar LyX
327 You can change many of these files from within \SpecialChar LyX
329 \begin_inset Flex Noun
332 \begin_layout Plain Layout
333 Tools\SpecialChar menuseparator
340 Most customization that you will want to do in \SpecialChar LyX
341 is possible through this
343 However, many other inner aspects of \SpecialChar LyX
344 can be customized by modifying the
346 \begin_inset Flex Code
349 \begin_layout Plain Layout
356 These files fall in different categories, described in the following subsection
360 \begin_layout Subsection
361 Automatically generated files
364 \begin_layout Standard
365 The files, which are to be found in
366 \begin_inset Flex Noun
369 \begin_layout Plain Layout
375 , are generated when you configure \SpecialChar LyX
377 They contain various default values that are guessed by inspection.
378 In general, it is not a good idea to modify them, since they might be overwritt
382 \begin_layout Labeling
383 \labelwidthstring 00.00.0000
384 \begin_inset Flex Code
387 \begin_layout Plain Layout
393 contains defaults for various commands.
396 \begin_layout Labeling
397 \labelwidthstring 00.00.0000
398 \begin_inset Flex Code
401 \begin_layout Plain Layout
407 contains the list of packages that have been recognized by \SpecialChar LyX
409 It is currently unused by the \SpecialChar LyX
410 program itself, but the information extracted,
411 and more, is made available with
412 \begin_inset Flex Noun
415 \begin_layout Plain Layout
416 Help\SpecialChar menuseparator
430 \begin_layout Labeling
431 \labelwidthstring 00.00.0000
432 \begin_inset Flex Code
435 \begin_layout Plain Layout
441 the list of text classes that have been found in your
442 \begin_inset Flex Code
445 \begin_layout Plain Layout
451 directories, along with the associated \SpecialChar LaTeX
452 document class and their description.
455 \begin_layout Labeling
456 \labelwidthstring 00.00.0000
457 \begin_inset Flex Code
460 \begin_layout Plain Layout
466 the list of layout modules found in your
467 \begin_inset Flex Code
470 \begin_layout Plain Layout
479 \begin_layout Labeling
480 \labelwidthstring 00.00.0000
481 \begin_inset Flex Code
484 \begin_layout Plain Layout
490 lists of various sorts of \SpecialChar LaTeX
491 -related files found on your system
494 \begin_layout Labeling
495 \labelwidthstring 00.00.0000
496 \begin_inset Flex Code
499 \begin_layout Plain Layout
500 doc/\SpecialChar LaTeX
506 is automatically generated during configuration from the file
507 \begin_inset Flex Code
510 \begin_layout Plain Layout
518 It contains information on your \SpecialChar LaTeX
522 \begin_layout Subsection
526 \begin_layout Standard
527 These directories are duplicated between
528 \begin_inset Flex Code
531 \begin_layout Plain Layout
538 \begin_inset Flex Code
541 \begin_layout Plain Layout
548 If a particular files exists in both places, the one in
549 \begin_inset Flex Code
552 \begin_layout Plain Layout
561 \begin_layout Labeling
562 \labelwidthstring 00.00.0000
563 \begin_inset Flex Code
566 \begin_layout Plain Layout
572 this directory contains files with the extension
573 \begin_inset Flex Code
576 \begin_layout Plain Layout
582 that define the keybindings used in \SpecialChar LyX
584 If there exists an internationalized version of the bind file named
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
594 , that will be used first.
597 \begin_layout Labeling
598 \labelwidthstring 00.00.0000
599 \begin_inset Flex Code
602 \begin_layout Plain Layout
608 contains graphics files that can be included in documents.
612 \begin_layout Labeling
613 \labelwidthstring 00.00.0000
614 \begin_inset Flex Code
617 \begin_layout Plain Layout
623 contains \SpecialChar LyX
624 documentation files (including the one you are currently reading).
626 \begin_inset Flex Code
629 \begin_layout Plain Layout
636 deserves special attention, as noted above.
637 The internationalized help docs are in subdirectories
638 \begin_inset Flex Code
641 \begin_layout Plain Layout
648 \begin_inset Quotes eld
652 \begin_inset Quotes erd
655 is the ISO language code.
657 \begin_inset CommandInset ref
659 reference "cha:Internationalizing-LyX"
666 \begin_layout Labeling
667 \labelwidthstring 00.00.0000
668 \begin_inset Flex Code
671 \begin_layout Plain Layout
677 contains example files that explain how to use some features.
678 In the file browser, press the
679 \begin_inset Flex Noun
682 \begin_layout Plain Layout
691 \begin_layout Labeling
692 \labelwidthstring 00.00.0000
693 \begin_inset Flex Code
696 \begin_layout Plain Layout
702 contains image files that are used by the
703 \begin_inset Flex Noun
706 \begin_layout Plain Layout
713 In addition, it also contains the individual icons used in the toolbar
714 and the banners that can be shown when \SpecialChar LyX
718 \begin_layout Labeling
719 \labelwidthstring 00.00.0000
720 \begin_inset Flex Code
723 \begin_layout Plain Layout
729 contains keyboard keymapping files.
731 \begin_inset CommandInset ref
733 reference "sec:International-Keymap-Stuff"
740 \begin_layout Labeling
741 \labelwidthstring 00.00.0000
742 \begin_inset Flex Code
745 \begin_layout Plain Layout
751 contains the text class and module files described in
752 \begin_inset CommandInset ref
754 reference "cha:Installing-New-Document"
761 \begin_layout Labeling
762 \labelwidthstring 00.00.0000
763 \begin_inset Flex Code
766 \begin_layout Plain Layout
773 \begin_inset Flex Code
776 \begin_layout Plain Layout
782 Python scripts used to convert between \SpecialChar LyX
784 These can be run from the command line if, say, you want to batch-convert
788 \begin_layout Labeling
789 \labelwidthstring 00.00.0000
790 \begin_inset Flex Code
793 \begin_layout Plain Layout
799 contains some files that demonstrate the capabilities of the
800 \begin_inset Flex Noun
803 \begin_layout Plain Layout
814 Also contains some scripts used by \SpecialChar LyX
818 \begin_layout Labeling
819 \labelwidthstring 00.00.0000
820 \begin_inset Flex Code
823 \begin_layout Plain Layout
829 contains the standard \SpecialChar LyX
830 template files described in
831 \begin_inset CommandInset ref
833 reference "subsec:Creating-Templates"
840 \begin_layout Labeling
841 \labelwidthstring 00.00.0000
842 \begin_inset Flex Code
845 \begin_layout Plain Layout
851 contains files with the extension
852 \begin_inset Flex Code
855 \begin_layout Plain Layout
861 that define the user interface to \SpecialChar LyX
863 That is, the files define which items appear in which menus and the items
864 appearing on the toolbar.
867 \begin_layout Subsection
868 Files you don't want to modify
871 \begin_layout Standard
872 These files are used internally by \SpecialChar LyX
873 and you generally do not need to modify
874 them unless you are a developer.
877 \begin_layout Labeling
878 \labelwidthstring 00.00.0000
879 \begin_inset Flex Code
882 \begin_layout Plain Layout
888 this file contains the list of \SpecialChar LyX
890 The contents are displayed with the menu entry
891 \begin_inset Flex Noun
894 \begin_layout Plain Layout
895 Help\SpecialChar menuseparator
908 \begin_layout Labeling
909 \labelwidthstring 00.00.0000
910 \begin_inset Flex Code
913 \begin_layout Plain Layout
919 this is a \SpecialChar LaTeX
920 script used during the configuration process.
924 \begin_layout Labeling
925 \labelwidthstring 00.00.0000
926 \begin_inset Flex Code
929 \begin_layout Plain Layout
935 this is a Python script that is used to re-configure \SpecialChar LyX
937 It creates configuration files in the directory it was run from.
940 \begin_layout Subsection
941 Other files needing a line or two
944 \begin_layout Labeling
945 \labelwidthstring 00.00.0000
946 \begin_inset Flex Code
949 \begin_layout Plain Layout
955 this contains tables describing how different character encodings can be
959 \begin_layout Labeling
960 \labelwidthstring 00.00.0000
961 \begin_inset Flex Code
964 \begin_layout Plain Layout
970 this file contains the templates available to the new
971 \begin_inset Flex Noun
974 \begin_layout Plain Layout
985 \begin_inset CommandInset ref
987 reference "chap:Including-External-Material"
994 \begin_layout Labeling
995 \labelwidthstring 00.00.0000
996 \begin_inset Flex Code
999 \begin_layout Plain Layout
1005 this file contains a list of all the languages currently supported by \SpecialChar LyX
1009 \begin_layout Labeling
1010 \labelwidthstring 00.00.0000
1011 \begin_inset Flex Code
1014 \begin_layout Plain Layout
1020 contains information about the supported fonts.
1023 \begin_layout Labeling
1024 \labelwidthstring 00.00.0000
1025 \begin_inset Flex Code
1028 \begin_layout Plain Layout
1034 this file contains translations for internationalized paragraph styles
1036 \begin_inset CommandInset ref
1038 reference "subsec:I18n"
1045 \begin_layout Labeling
1046 \labelwidthstring 00.00.0000
1047 \begin_inset Flex Code
1050 \begin_layout Plain Layout
1056 this file contains information about unicode-encoded glyphs and the way
1057 they are supported by \SpecialChar LyX
1058 via \SpecialChar LaTeX
1062 \begin_layout Section
1063 Your local configuration directory
1066 \begin_layout Standard
1067 Even if you are using \SpecialChar LyX
1068 as an unprivileged user, you might want to change
1070 configuration for your own use.
1072 \begin_inset Flex Code
1075 \begin_layout Plain Layout
1081 directory contains all your personal configuration files.
1082 This is the directory described as
1083 \begin_inset Quotes eld
1087 \begin_inset Quotes erd
1091 \begin_inset Flex Noun
1094 \begin_layout Plain Layout
1095 Help\SpecialChar menuseparator
1097 \begin_inset space ~
1106 This directory is used as a mirror of
1107 \begin_inset Flex Code
1110 \begin_layout Plain Layout
1116 , which means that every file in
1117 \begin_inset Flex Code
1120 \begin_layout Plain Layout
1126 is a replacement for the corresponding file in
1127 \begin_inset Flex Code
1130 \begin_layout Plain Layout
1137 Any configuration file described in the above sections can be placed either
1138 in the system-wide directory, in which case it will affect all users, or
1139 in your local directory for your own use.
1142 \begin_layout Standard
1143 To make things clearer, let's provide a few examples:
1146 \begin_layout Itemize
1147 The preferences set in the
1148 \begin_inset Flex Noun
1151 \begin_layout Plain Layout
1152 Tools\SpecialChar menuseparator
1158 dialog are saved to a file
1159 \begin_inset Flex Code
1162 \begin_layout Plain Layout
1169 \begin_inset Flex Code
1172 \begin_layout Plain Layout
1181 \begin_layout Itemize
1182 When you reconfigure using
1183 \begin_inset Flex Noun
1186 \begin_layout Plain Layout
1187 Tools\SpecialChar menuseparator
1195 \begin_inset Flex Code
1198 \begin_layout Plain Layout
1204 script, and the resulting files are written in your local configuration
1206 This means that any additional text class file that you might have added
1208 \begin_inset Flex Code
1211 \begin_layout Plain Layout
1217 will be added to the list of classes in the
1218 \begin_inset Flex Noun
1221 \begin_layout Plain Layout
1222 Document\SpecialChar menuseparator
1231 \begin_layout Itemize
1232 If you get some updated documentation from \SpecialChar LyX
1233 ftp site and cannot install
1234 it because you do not have sysadmin rights on your system, you can just
1236 \begin_inset Flex Code
1239 \begin_layout Plain Layout
1245 and the items in the
1246 \begin_inset Flex Noun
1249 \begin_layout Plain Layout
1255 menu will open them!
1258 \begin_layout Section
1259 Running \SpecialChar LyX
1260 with multiple configurations
1263 \begin_layout Standard
1264 The configuration freedom of the local configuration directory may not suffice
1265 if you want to have more than one configuration at your disposal.
1266 For example, you may want to be use different key bindings or printer settings
1268 You can achieve this by having several such directories.
1269 You then specify which directory to use at run-time.
1272 \begin_layout Standard
1273 Invoking \SpecialChar LyX
1274 with the command line switch
1275 \begin_inset Flex Code
1278 \begin_layout Plain Layout
1288 instructs the program to read the configuration from that directory, and
1289 not from the default directory.
1290 (You can determine the default directory by running \SpecialChar LyX
1292 \begin_inset Flex Code
1295 \begin_layout Plain Layout
1301 switch.) If the specified directory does not exist, \SpecialChar LyX
1303 for you, just like it does for the default directory on the first time
1304 you run the program.
1305 You can modify the configuration options in this additional user directory
1306 exactly as you would for the default directory.
1307 These directories are completely independent (but read on).
1308 Note that setting the environment variable
1309 \begin_inset Flex Code
1312 \begin_layout Plain Layout
1318 to some value has exactly the same effect.
1321 \begin_layout Standard
1322 Having several configurations also requires more maintenance: if you want
1323 to add a new layout to
1324 \begin_inset Flex Code
1327 \begin_layout Plain Layout
1333 which you want available from all your configurations, you must add it
1334 to each directory separately.
1335 You can avoid this with the following trick: after \SpecialChar LyX
1336 creates the additional
1337 directory, most of the subdirectories (see above) are empty.
1338 If you want the new configuration to mirror an existing one, replace the
1339 empty subdirectory with a symbolic link to the matching subdirectory in
1340 the existing configuration.
1342 \begin_inset Flex Code
1345 \begin_layout Plain Layout
1351 subdirectory, however, since it contains a file written by the configuration
1352 script (also accessible through
1353 \begin_inset Flex Noun
1356 \begin_layout Plain Layout
1357 Tools\SpecialChar menuseparator
1363 ) which is configuration-specific.
1366 \begin_layout Chapter
1367 The Preferences dialog
1370 \begin_layout Standard
1371 All options of the preferences dialog are described in the Appendix
1373 The Preferences Dialog
1380 For some options you might find here more details.
1383 \begin_layout Section
1385 \begin_inset CommandInset label
1394 \begin_layout Standard
1395 The first step is to define your file formats if they are not already defined.
1397 \begin_inset Flex Noun
1400 \begin_layout Plain Layout
1401 Tools\SpecialChar menuseparator
1409 \begin_inset Flex Noun
1412 \begin_layout Plain Layout
1413 File Handling\SpecialChar menuseparator
1420 \begin_inset Flex Noun
1423 \begin_layout Plain Layout
1429 button to define your new format.
1431 \begin_inset Flex Noun
1434 \begin_layout Plain Layout
1440 field contains the name used to identify the format in the GUI.
1442 \begin_inset Flex Noun
1445 \begin_layout Plain Layout
1451 is used to identify the format internally.
1452 You will also need to enter a file extension.
1453 These are all required.
1455 \begin_inset Flex Noun
1458 \begin_layout Plain Layout
1464 field is used to provide a keyboard shortcut on the menus.
1465 (For example, pressing
1466 \begin_inset Flex Noun
1469 \begin_layout Plain Layout
1476 \begin_inset Flex Noun
1479 \begin_layout Plain Layout
1480 Document\SpecialChar menuseparator
1481 View (Other Formats)\SpecialChar menuseparator
1490 \begin_layout Standard
1492 \begin_inset Flex Noun
1495 \begin_layout Plain Layout
1502 \begin_inset Flex Noun
1505 \begin_layout Plain Layout
1512 For example, you might want to use
1513 \begin_inset Flex Noun
1516 \begin_layout Plain Layout
1522 to view PostScript files.
1523 You can enter the command needed to start the program in the corresponding
1525 In defining this command, you can use the four variables listed in the
1527 The viewer is launched when you view an image in \SpecialChar LyX
1529 \begin_inset Flex Noun
1532 \begin_layout Plain Layout
1533 Document\SpecialChar menuseparator
1540 The editor is for example launched when you right-click on an image and
1542 \begin_inset Flex Noun
1545 \begin_layout Plain Layout
1551 in the appearing context menu.
1554 \begin_layout Standard
1556 \begin_inset Flex Noun
1559 \begin_layout Plain Layout
1565 type of a format is optional, but if it is specified, it must be unique
1567 It is used to detect files of this format from the file contents.
1568 For some important file formats there is no MIME type officially registered
1570 \begin_inset CommandInset href
1573 target "http://www.iana.org/assignments/media-types/"
1578 Therefore \SpecialChar LyX
1579 uses the extended list of MIME types as specified by
1580 \begin_inset CommandInset href
1582 name "freedesktop.org"
1583 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1590 \begin_layout Standard
1592 \begin_inset Flex Noun
1595 \begin_layout Plain Layout
1601 option tells \SpecialChar LyX
1602 that a format is suitable for document export.
1603 If this is set and if a suitable conversion route exists (see
1604 \begin_inset CommandInset ref
1606 reference "sec:Converters"
1610 ), the format will appear in the
1611 \begin_inset Flex Noun
1614 \begin_layout Plain Layout
1615 File\SpecialChar menuseparator
1622 The format will also appear in the
1623 \begin_inset Flex Noun
1626 \begin_layout Plain Layout
1627 Document\SpecialChar menuseparator
1633 menu if a viewer is specified for the format.
1634 Pure image formats, such as
1635 \begin_inset Flex Code
1638 \begin_layout Plain Layout
1644 , should not use this option.
1645 Formats that can both represent vector graphics and documents like
1646 \begin_inset Flex Code
1649 \begin_layout Plain Layout
1658 \begin_layout Standard
1660 \begin_inset Flex Noun
1663 \begin_layout Plain Layout
1664 Vector graphics format
1669 tells \SpecialChar LyX
1670 that a format can contain vector graphics.
1671 This information is used to determine the target format of included graphics
1673 \begin_inset Flex Noun
1676 \begin_layout Plain Layout
1683 Included graphics may need to be converted to either
1684 \begin_inset Flex Noun
1687 \begin_layout Plain Layout
1694 \begin_inset Flex Noun
1697 \begin_layout Plain Layout
1704 \begin_inset Flex Noun
1707 \begin_layout Plain Layout
1714 \begin_inset Flex Noun
1717 \begin_layout Plain Layout
1723 cannot handle other image formats.
1724 If an included graphic is not already in
1725 \begin_inset Flex Noun
1728 \begin_layout Plain Layout
1735 \begin_inset Flex Noun
1738 \begin_layout Plain Layout
1745 \begin_inset Flex Noun
1748 \begin_layout Plain Layout
1754 format, it is converted to
1755 \begin_inset Flex Noun
1758 \begin_layout Plain Layout
1764 if the vector format option is set, and otherwise to
1765 \begin_inset Flex Noun
1768 \begin_layout Plain Layout
1777 \begin_layout Section
1781 \begin_layout Standard
1782 Since all conversions from one format to another take place in \SpecialChar LyX
1784 directory, it is sometimes necessary to modify a file before copying it
1785 to the temporary directory in order that the conversion may be performed.
1789 \begin_layout Plain Layout
1790 For example, the file may refer to other files—images, for example—using
1791 relative file names, and these may become invalid when the file is copied
1792 to the temporary directory.
1797 This is done by a Copier: It copies a file to (or from) the temporary directory
1798 and may modify it in the process.
1801 \begin_layout Standard
1802 The definitions of the copiers may use four variables:
1805 \begin_layout Labeling
1806 \labelwidthstring 00.00.0000
1807 \begin_inset Flex Code
1810 \begin_layout Plain Layout
1816 The \SpecialChar LyX
1817 system directory (e.
1818 \begin_inset space \thinspace{}
1822 \begin_inset space \space{}
1826 \begin_inset Flex Noun
1829 \begin_layout Plain Layout
1838 \begin_layout Labeling
1839 \labelwidthstring 00.00.0000
1840 \begin_inset Flex Code
1843 \begin_layout Plain Layout
1852 \begin_layout Labeling
1853 \labelwidthstring 00.00.0000
1854 \begin_inset Flex Code
1857 \begin_layout Plain Layout
1866 \begin_layout Labeling
1867 \labelwidthstring 00.00.0000
1868 \begin_inset Flex Code
1871 \begin_layout Plain Layout
1877 The base name (without filename extension) in the \SpecialChar LyX
1881 \begin_layout Labeling
1882 \labelwidthstring 00.00.0000
1883 \begin_inset Flex Code
1886 \begin_layout Plain Layout
1892 The full directory path of the \SpecialChar LyX
1896 \begin_layout Labeling
1897 \labelwidthstring 00.00.0000
1898 \begin_inset Flex Code
1901 \begin_layout Plain Layout
1907 The full pathname to the original \SpecialChar LyX
1908 file being processed
1911 \begin_layout Labeling
1912 \labelwidthstring 00.00.0000
1913 \begin_inset Flex Code
1916 \begin_layout Plain Layout
1922 The filename (without any directory path) of the \SpecialChar LyX
1926 \begin_layout Labeling
1927 \labelwidthstring 00.00.0000
1928 \begin_inset Flex Code
1931 \begin_layout Plain Layout
1937 The `\SpecialChar LaTeX
1941 \begin_layout Standard
1942 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1950 It is relevant only when exporting files suitable for such inclusion.
1953 \begin_layout Standard
1954 Copiers can be used to do almost anything with output files.
1955 For example, suppose you want generated pdf files to be copied to a special
1957 \begin_inset Flex Code
1960 \begin_layout Plain Layout
1967 Then you could write a shell script such as this one:
1970 \begin_layout Standard
1971 \begin_inset listings
1975 \begin_layout Plain Layout
1980 \begin_layout Plain Layout
1985 \begin_layout Plain Layout
1987 TOFILE=`basename $2`
1990 \begin_layout Plain Layout
1992 cp $FROMFILE /home/you/pdf/$TOFILE
1997 Save it in your local \SpecialChar LyX
1999 \begin_inset Flex Code
2002 \begin_layout Plain Layout
2003 /home/you/.lyx/scripts/pdfcopier.sh
2008 —and make it executable, if you need to do so on your platform.
2010 \begin_inset Flex Noun
2013 \begin_layout Plain Layout
2014 Tools\SpecialChar menuseparator
2020 dialog, select under
2021 \begin_inset Flex Noun
2024 \begin_layout Plain Layout
2025 File Handling\SpecialChar menuseparator
2032 \begin_inset Flex Noun
2035 \begin_layout Plain Layout
2041 format—or one of the other pdf formats—and enter
2042 \begin_inset Flex Code
2045 \begin_layout Plain Layout
2046 pdfcopier.sh $$i $$o
2052 \begin_inset Flex Noun
2055 \begin_layout Plain Layout
2065 \begin_layout Standard
2066 Copiers are used by \SpecialChar LyX
2067 in various of its own conversions.
2068 For example, if appropriate programs are found, \SpecialChar LyX
2069 will automatically install
2071 \begin_inset Flex Noun
2074 \begin_layout Plain Layout
2081 \begin_inset Flex Noun
2084 \begin_layout Plain Layout
2086 \begin_inset space ~
2095 When these formats are exported, the copier sees that not just the main
2096 HTML file but various associated files (style files, images, etc.) are also
2098 All these files are written to a subdirectory of the directory in which
2099 the original \SpecialChar LyX
2104 \begin_layout Plain Layout
2105 This copier can be customized.
2107 \begin_inset Quotes eld
2111 \begin_inset Quotes erd
2114 argument takes a comma-separated list of extensions to be copied; if it
2115 is omitted, all files will be copied.
2117 \begin_inset Quotes eld
2121 \begin_inset Quotes erd
2124 argument determines the extension added to the generated directory.
2126 \begin_inset Quotes eld
2130 \begin_inset Flex Noun
2133 \begin_layout Plain Layout
2140 \begin_inset Quotes erd
2143 , so HTML generated from
2144 \begin_inset Flex Noun
2147 \begin_layout Plain Layout
2148 /path/to/filename.lyx
2154 \begin_inset Flex Noun
2157 \begin_layout Plain Layout
2158 /path/to/filename.html.LyXconv
2172 \begin_layout Section
2174 \begin_inset CommandInset label
2176 name "sec:Converters"
2183 \begin_layout Standard
2184 You can define your own Converters to convert files between different formats.
2186 \begin_inset Flex Noun
2189 \begin_layout Plain Layout
2190 Tools\SpecialChar menuseparator
2191 Preferences\SpecialChar menuseparator
2192 File Handling\SpecialChar menuseparator
2201 \begin_layout Standard
2202 To define a new converter, select the
2203 \begin_inset Flex Noun
2206 \begin_layout Plain Layout
2208 \begin_inset space ~
2217 \begin_inset Flex Noun
2220 \begin_layout Plain Layout
2222 \begin_inset space ~
2230 from the drop-down lists, enter the command needed for the conversion,
2232 \begin_inset Flex Noun
2235 \begin_layout Plain Layout
2242 Several variables can be used in the definition of converters:
2245 \begin_layout Labeling
2246 \labelwidthstring 00.00.0000
2247 \begin_inset Flex Code
2250 \begin_layout Plain Layout
2256 The \SpecialChar LyX
2260 \begin_layout Labeling
2261 \labelwidthstring 00.00.0000
2262 \begin_inset Flex Code
2265 \begin_layout Plain Layout
2274 \begin_layout Labeling
2275 \labelwidthstring 00.00.0000
2276 \begin_inset Flex Code
2279 \begin_layout Plain Layout
2288 \begin_layout Labeling
2289 \labelwidthstring 00.00.0000
2290 \begin_inset Flex Code
2293 \begin_layout Plain Layout
2299 The base filename of the input file (i.
2300 \begin_inset space \thinspace{}
2303 g., without the extension)
2306 \begin_layout Labeling
2307 \labelwidthstring 00.00.0000
2308 \begin_inset Flex Code
2311 \begin_layout Plain Layout
2317 The path to the input file
2320 \begin_layout Labeling
2321 \labelwidthstring 00.00.0000
2322 \begin_inset Flex Code
2325 \begin_layout Plain Layout
2331 The path to the original input file (this is different from $$p when a
2332 chain of converters is called)
2335 \begin_layout Labeling
2336 \labelwidthstring 00.00.0000
2337 \begin_inset Flex Code
2340 \begin_layout Plain Layout
2346 The iconv name for the encoding of the document.
2349 \begin_layout Standard
2351 \begin_inset Flex Noun
2354 \begin_layout Plain Layout
2356 \begin_inset space ~
2364 field you can enter the following flags, separated by commas:
2367 \begin_layout Labeling
2368 \labelwidthstring 00.00.0000
2369 \begin_inset Flex Code
2372 \begin_layout Plain Layout
2378 This converter runs some form of \SpecialChar LaTeX
2380 This will make \SpecialChar LyX
2381 's \SpecialChar LaTeX
2382 error logs available.
2385 \begin_layout Labeling
2386 \labelwidthstring 00.00.0000
2387 \begin_inset Flex Code
2390 \begin_layout Plain Layout
2396 Needs the \SpecialChar LaTeX
2398 \begin_inset Flex Noun
2401 \begin_layout Plain Layout
2407 file for the conversion.
2410 \begin_layout Labeling
2411 \labelwidthstring 00.00.0000
2412 \begin_inset Flex Code
2415 \begin_layout Plain Layout
2422 \begin_inset Quotes eld
2426 \begin_inset Quotes erd
2429 file from the backend, which in practice means a \SpecialChar LaTeX
2430 file like the one we
2431 would export, without
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2444 \begin_layout Labeling
2445 \labelwidthstring 00.00.0000
2446 \begin_inset Flex Code
2449 \begin_layout Plain Layout
2458 \begin_layout Standard
2459 The following three flags are not really flags at all because they take
2461 \begin_inset Flex Noun
2464 \begin_layout Plain Layout
2466 \begin_inset space ~
2470 \begin_inset space ~
2481 \begin_layout Labeling
2482 \labelwidthstring 00.00.0000
2483 \begin_inset Flex Code
2486 \begin_layout Plain Layout
2492 If set, the converter's standard error will be redirected to a file
2493 \begin_inset Flex Code
2496 \begin_layout Plain Layout
2502 , and the script given as argument will be run as:
2503 \begin_inset Flex Code
2506 \begin_layout Plain Layout
2507 script < infile.out > infile.log
2513 The argument may contain
2514 \begin_inset Flex Code
2517 \begin_layout Plain Layout
2526 \begin_layout Labeling
2527 \labelwidthstring 00.00.0000
2528 \begin_inset Flex Code
2531 \begin_layout Plain Layout
2537 The name of the directory in which the converter will dump the generated
2540 will not create this directory, and it does not copy anything into it,
2541 though it will copy this directory to the destination.
2542 The argument may contain
2543 \begin_inset Flex Code
2546 \begin_layout Plain Layout
2552 , which will be replaced by the base name of the input and output files,
2553 respectively, when the directory is copied.
2554 \begin_inset Newline newline
2557 Note that resultdir and usetempdir make no sense together.
2558 The latter will be ignored if the former is given.
2561 \begin_layout Labeling
2562 \labelwidthstring 00.00.0000
2563 \begin_inset Flex Code
2566 \begin_layout Plain Layout
2572 Determines the output file name and may, contain
2573 \begin_inset Flex Code
2576 \begin_layout Plain Layout
2583 Sensible only with resultdir and optional even then; if not given, it defaults
2587 \begin_layout Standard
2588 None of these last three are presently used in any of the converters that
2589 are installed with \SpecialChar LyX
2594 \begin_layout Standard
2595 You do not have to define converters for all formats between which you want
2597 For example, you will note that there is no `\SpecialChar LyX
2598 to PostScript' converter,
2599 but \SpecialChar LyX
2600 will export PostScript.
2601 It does so by first creating a \SpecialChar LaTeX
2602 file (no converter needs to be defined
2603 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2605 and finally converting the resulting DVI file to PostScript.
2607 finds such `chains' of converters automatically, and it will always choose
2608 the shortest possible chain.
2609 You can, though, still define multiple conversion methods between file
2611 For example, the standard \SpecialChar LyX
2612 configuration provides five ways to convert
2617 \begin_layout Enumerate
2619 \begin_inset Flex Noun
2622 \begin_layout Plain Layout
2631 \begin_layout Enumerate
2632 via (DVI and) PostScript, using
2633 \begin_inset Flex Noun
2636 \begin_layout Plain Layout
2645 \begin_layout Enumerate
2647 \begin_inset Flex Noun
2650 \begin_layout Plain Layout
2659 \begin_layout Enumerate
2661 \begin_inset Flex Noun
2664 \begin_layout Plain Layout
2674 \begin_layout Enumerate
2676 \begin_inset Flex Noun
2679 \begin_layout Plain Layout
2689 \begin_layout Standard
2690 To define such alternate chains, you must define multiple target `file formats',
2692 \begin_inset CommandInset ref
2694 reference "sec:Formats"
2699 For example, in the standard configuration, the formats named
2700 \begin_inset Flex Noun
2703 \begin_layout Plain Layout
2710 \begin_inset Flex Noun
2713 \begin_layout Plain Layout
2720 \begin_inset Flex Noun
2723 \begin_layout Plain Layout
2730 \begin_inset Flex Noun
2733 \begin_layout Plain Layout
2740 \begin_inset Flex Noun
2743 \begin_layout Plain Layout
2750 \begin_inset Flex Noun
2753 \begin_layout Plain Layout
2760 \begin_inset Flex Noun
2763 \begin_layout Plain Layout
2770 \begin_inset Flex Noun
2773 \begin_layout Plain Layout
2781 \begin_inset Flex Noun
2784 \begin_layout Plain Layout
2791 \begin_inset Flex Noun
2794 \begin_layout Plain Layout
2801 ) are defined, all of which share the extension
2802 \begin_inset Flex Noun
2805 \begin_layout Plain Layout
2811 , and which correspond to the conversion methods just mentioned.
2814 \begin_layout Chapter
2815 Internationalizing \SpecialChar LyX
2817 \begin_inset CommandInset label
2819 name "cha:Internationalizing-LyX"
2826 \begin_layout Standard
2828 supports using a translated interface.
2829 Last time we checked, \SpecialChar LyX
2830 provided text in thirty languages.
2831 The language of choice is called your
2836 (For further reading on locale settings, see also the documentation for
2837 locale that comes with your operating system.
2838 For Linux, the manual page for
2839 \begin_inset Flex Code
2842 \begin_layout Plain Layout
2848 could be a good place to start).
2851 \begin_layout Standard
2852 Notice that these translations will work, but do contain a few flaws.
2853 In particular, all dialogs have been designed with the English text in
2854 mind, which means that some of the translated text will be too large to
2855 fit within the space allocated.
2856 This is only a display problem and will not cause any harm.
2857 Also, you will find that some of the translations do not define shortcut
2858 keys for everything.
2859 Sometimes, there are simply not enough free letters to do it.
2860 Other times, the translator just hasn't got around to doing it yet.
2861 Our localization team, which you may wish to join,
2865 \begin_layout Plain Layout
2866 If you are a fluent speaker of a language other than English, joining these
2867 teams is a great way to give back to the \SpecialChar LyX
2873 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
2877 \begin_layout Section
2878 Translating \SpecialChar LyX
2882 \begin_layout Subsection
2883 Translating the graphical user interface (text messages).
2886 \begin_layout Standard
2889 \begin_inset Flex Code
2892 \begin_layout Plain Layout
2898 library to handle the internationalization of the interface.
2899 To have \SpecialChar LyX
2900 speak your favorite language in all menus and dialogs, you need
2902 \begin_inset Flex Code
2905 \begin_layout Plain Layout
2911 -file for that language.
2912 When this is available, you'll have to generate a
2913 \begin_inset Flex Code
2916 \begin_layout Plain Layout
2922 -file from it and install the
2923 \begin_inset Flex Code
2926 \begin_layout Plain Layout
2933 The process of doing all of this is explained in the documentation for
2935 \begin_inset Flex Code
2938 \begin_layout Plain Layout
2945 It is possible to do this just for yourself, but if you're going to do
2946 it, you might as well share the results of your labors with the rest of
2947 the \SpecialChar LyX
2949 Send a message to the \SpecialChar LyX
2950 developers' list for more information about how
2954 \begin_layout Standard
2955 In short, this is what you should do (xx denotes the language code):
2958 \begin_layout Itemize
2959 Check out the \SpecialChar LyX
2962 \begin_inset CommandInset href
2964 name "information on the web"
2965 target "http://www.lyx.org/HowToUseSVN"
2972 \begin_layout Itemize
2974 \begin_inset Flex Code
2977 \begin_layout Plain Layout
2983 to the folder of the
2984 \begin_inset Flex Code
2987 \begin_layout Plain Layout
2995 \begin_inset Flex Code
2998 \begin_layout Plain Layout
3006 \begin_inset Flex Code
3009 \begin_layout Plain Layout
3015 doesn't exist anywhere, it can be remade with the console command
3016 \begin_inset Flex Code
3019 \begin_layout Plain Layout
3025 in that directory, or you can use an existing po-file for some other language
3029 \begin_layout Itemize
3031 \begin_inset Flex Code
3034 \begin_layout Plain Layout
3044 \begin_layout Plain Layout
3045 This is just a text file, so it can be edited in any text editor.
3046 But there are also specialized programs that support such editing, such
3051 (for all platforms) or
3060 contains a `mode' for editing
3061 \begin_inset Flex Code
3064 \begin_layout Plain Layout
3075 For some menu- and widget-labels, there are also shortcut keys that should
3077 Those keys are marked after a `|', and should be translated according to
3078 the words and phrases of the language.
3079 You should also fill also out the information at the beginning of the new
3081 \begin_inset Flex Code
3084 \begin_layout Plain Layout
3090 -file with your email-address, etc., so people know where to reach you with
3091 suggestions and entertaining flames.
3094 \begin_layout Standard
3095 If you are just doing this on your own, then:
3098 \begin_layout Itemize
3100 \begin_inset Flex Code
3103 \begin_layout Plain Layout
3110 This can be done with
3111 \begin_inset Flex Code
3114 \begin_layout Plain Layout
3115 msgfmt -o xx.mo < xx.po
3123 \begin_layout Itemize
3125 \begin_inset Flex Code
3128 \begin_layout Plain Layout
3134 -file to your locale-tree, at the correct directory for application messages
3139 xx, and under the name
3140 \begin_inset Flex Code
3143 \begin_layout Plain Layout
3150 \begin_inset space \thinspace{}
3154 \begin_inset space \space{}
3158 \begin_inset Flex Code
3161 \begin_layout Plain Layout
3162 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3172 \begin_layout Standard
3173 As said, however, it would be best if the new
3174 \begin_inset Flex Code
3177 \begin_layout Plain Layout
3183 file could be added to the \SpecialChar LyX
3184 distribution, so others can use it.
3185 Adding it involves making additional changes to \SpecialChar LyX
3187 So send an email to the developers' mailing list if you're interested in
3191 \begin_layout Subsubsection
3195 \begin_layout Standard
3196 Sometimes it turns out that one English message needs to be translated into
3197 different messages in the target language.
3198 One example is the message
3199 \begin_inset Flex Code
3202 \begin_layout Plain Layout
3208 which has the German translation
3216 , depending upon exactly what the English
3217 \begin_inset Quotes eld
3221 \begin_inset Quotes erd
3226 \begin_inset Flex Code
3229 \begin_layout Plain Layout
3235 does not handle such ambiguous translations.
3236 Therefore you have to add some context information to the message: Instead
3238 \begin_inset Flex Code
3241 \begin_layout Plain Layout
3248 \begin_inset Flex Code
3251 \begin_layout Plain Layout
3252 To[[as in 'From format x to format y']]
3258 \begin_inset Flex Code
3261 \begin_layout Plain Layout
3262 To[[as in 'From page x to page y']].
3267 Now the two occurrences of
3268 \begin_inset Flex Code
3271 \begin_layout Plain Layout
3278 \begin_inset Flex Code
3281 \begin_layout Plain Layout
3287 and can be translated correctly to
3298 \begin_layout Standard
3299 Of course the context information needs to be stripped off the original
3300 message when no translation is used.
3301 Therefore you have to put it in double square brackets at the end of the
3302 message (see the example above).
3303 The translation mechanism of \SpecialChar LyX
3304 ensures that everything in double square
3305 brackets at the end of messages is removed before displaying the message.
3308 \begin_layout Subsection
3309 Translating the documentation.
3312 \begin_layout Standard
3313 The online documentation (in the
3314 \begin_inset Flex Noun
3317 \begin_layout Plain Layout
3323 -menu) can (and should!) be translated.
3324 If there are translated versions of the documentation available
3328 \begin_layout Plain Layout
3329 As of March 2008, at least some of the documents have been translated into
3330 fourteen languages, with the Tutorial available in a few more.
3335 and the locale is set accordingly, these will be used automagically by
3339 looks for translated versions as
3340 \begin_inset Flex Code
3343 \begin_layout Plain Layout
3344 LyXDir/doc/xx/DocName.lyx
3350 \begin_inset Flex Code
3353 \begin_layout Plain Layout
3359 is the code for the language currently in use.
3360 If there are no translated documents, the default English versions will
3362 Note that the translated versions must have the same filenames (
3363 \begin_inset Flex Code
3366 \begin_layout Plain Layout
3372 above) as the original.
3373 If you feel up to translating the documentation (an excellent way to proof-read
3374 the original documentation by the way!), there are a few things you should
3378 \begin_layout Itemize
3379 Check out the documentation translation web page at
3380 \begin_inset CommandInset href
3382 name "http://www.lyx.org/Translation"
3383 target "http://www.lyx.org/Translation"
3388 That way, you can find out which (if any) documents have already been translate
3389 d into your language.
3390 You can also find out who (if anyone) is organizing the effort to translate
3391 the documentation into your language.
3392 If no one is organizing the effort, please let us know that you're interested.
3395 \begin_layout Standard
3396 Once you get to actually translating, here's a few hints for you that may
3400 \begin_layout Itemize
3401 Join the documentation team! There is information on how to do that in
3402 \begin_inset Flex Code
3405 \begin_layout Plain Layout
3412 \begin_inset Flex Noun
3415 \begin_layout Plain Layout
3416 Help\SpecialChar menuseparator
3422 ), which by the way is the first document you should translate.
3425 \begin_layout Itemize
3426 Learn the typographic conventions for the language you are translating to.
3427 Typography is an ancient art and over the centuries, a great variety of
3428 conventions have developed throughout different parts of the world.
3429 Also study the professional terminology amongst typographers in your country.
3430 Inventing your own terminology will only confuse the users.
3433 (Warning! Typography is addictive!)
3436 \begin_layout Itemize
3437 Make a copy of the document.
3438 This will be your working copy.
3439 You can use this as your personal translated help-file by placing it in
3441 \begin_inset Flex Code
3444 \begin_layout Plain Layout
3453 \begin_layout Itemize
3454 Sometimes the original document (from the \SpecialChar LyX
3455 team) will be updated.
3456 Use the source viewer at
3457 \begin_inset CommandInset href
3459 name "http://www.lyx.org/trac/timeline"
3460 target "http://www.lyx.org/trac/timeline"
3464 to see what has been changed.
3465 That way you can easily see which parts of the translated document need
3469 \begin_layout Standard
3470 If you ever find an error in the original document, fix it and notify the
3471 rest of the documentation team of the changes! (You didn't forget to join
3472 the documentation team, did you?)
3475 \begin_layout Standard
3476 \begin_inset Branch OutDated
3479 \begin_layout Section
3480 International Keyboard Support
3483 \begin_layout Standard
3486 [Editor's Note: The following section is by
3494 It needs to be fixed to conform to the new Documentation Style sheet and
3495 to make use of the new v1.0 features.
3496 The whole thing also needs to be merged with the section following it.-jw
3497 It may also be badly out of date.-rh (2008)]
3500 \begin_layout Subsection
3501 Defining Own Keymaps: Keymap File Format
3504 \begin_layout Standard
3505 Let's look at a keyboard definition file a little closer.
3506 It is a plain text file defining
3509 \begin_layout Itemize
3510 key-to-key or key-to-string translations
3513 \begin_layout Itemize
3517 \begin_layout Itemize
3518 dead keys exceptions
3521 \begin_layout Standard
3522 To define key-to-key or key-to-string translation, use this command:
3525 \begin_layout Quotation
3526 \begin_inset Flex Code
3529 \begin_layout Plain Layout
3538 \begin_inset Flex Code
3541 \begin_layout Plain Layout
3550 \begin_layout Standard
3552 \begin_inset Flex Code
3555 \begin_layout Plain Layout
3561 is the key to be translated and
3562 \begin_inset Flex Code
3565 \begin_layout Plain Layout
3571 is the string to be inserted into the document.
3572 To define dead keys, use:
3575 \begin_layout Quotation
3576 \begin_inset Flex Code
3579 \begin_layout Plain Layout
3588 \begin_inset Flex Code
3591 \begin_layout Plain Layout
3600 \begin_layout Standard
3602 \begin_inset Flex Code
3605 \begin_layout Plain Layout
3611 is a keyboard key and
3612 \begin_inset Flex Code
3615 \begin_layout Plain Layout
3622 The following dead keys are supported (shortcut name is in parentheses):
3625 \begin_layout Quotation
3629 \begin_inset space \hfill{}
3635 \begin_layout Quotation
3637 \begin_inset space \hfill{}
3643 \begin_layout Quotation
3645 \begin_inset space \hfill{}
3651 \begin_layout Quotation
3653 \begin_inset space \hfill{}
3659 \begin_layout Quotation
3661 \begin_inset space \hfill{}
3667 \begin_layout Quotation
3669 \begin_inset space \hfill{}
3676 \begin_layout Plain Layout
3688 \begin_layout Quotation
3690 \begin_inset space \hfill{}
3696 \begin_layout Quotation
3698 \begin_inset space \hfill{}
3705 \begin_layout Plain Layout
3717 \begin_layout Quotation
3719 \begin_inset space \hfill{}
3725 \begin_layout Quotation
3727 \begin_inset space \hfill{}
3733 \begin_layout Quotation
3735 \begin_inset space \hfill{}
3742 \begin_layout Plain Layout
3754 \begin_layout Quotation
3756 \begin_inset space \hfill{}
3763 \begin_layout Plain Layout
3775 \begin_layout Quotation
3777 \begin_inset space \hfill{}
3783 \begin_layout Quotation
3784 hungarian umlaut (hug)
3785 \begin_inset space \hfill{}
3791 \begin_layout Quotation
3793 \begin_inset space \hfill{}
3799 \begin_layout Quotation
3801 \begin_inset space \hfill{}
3808 \begin_layout Plain Layout
3820 \begin_layout Standard
3821 Since in many international keyboards there are exceptions to what some
3822 dead keys should do, you can define them using
3825 \begin_layout Quotation
3826 \begin_inset Flex Code
3829 \begin_layout Plain Layout
3837 deadkey key outstring
3840 \begin_layout Standard
3841 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3845 \begin_layout Quotation
3846 \begin_inset Flex Code
3849 \begin_layout Plain Layout
3862 \begin_layout Standard
3863 to make it work correctly.
3864 Also, you have to define as exceptions dead keys over i and j, to remove
3865 the dot from them before inserting an accent mark.
3866 I will change this when the time comes, but so far I haven't had time.
3869 \begin_layout Standard
3870 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3873 \begin_inset Flex Code
3876 \begin_layout Plain Layout
3882 have different meaning.
3884 \begin_inset Flex Code
3887 \begin_layout Plain Layout
3893 marks comments, quotes start and end \SpecialChar LaTeX
3895 To enter quote, you'll need to use
3896 \begin_inset Flex Code
3899 \begin_layout Plain Layout
3908 \begin_inset Flex Code
3911 \begin_layout Plain Layout
3918 \begin_inset Flex Code
3921 \begin_layout Plain Layout
3932 \begin_layout Standard
3933 If you make a keyboard description file that works for your language, please
3934 mail it to me, so I can include it in the next keymap distribution.
3937 \begin_layout Standard
3938 More keywords will be supported in keymap configuration file in future,
3942 \begin_layout Itemize
3943 \begin_inset Flex Code
3946 \begin_layout Plain Layout
3957 \begin_inset space \hfill{}
3961 \begin_inset Flex Code
3964 \begin_layout Plain Layout
3973 \begin_layout Itemize
3974 \begin_inset Flex Code
3977 \begin_layout Plain Layout
3988 \begin_inset space \hfill{}
3992 \begin_inset Flex Code
3995 \begin_layout Plain Layout
4001 an external keymap translation program
4004 \begin_layout Standard
4005 Also, it should look into
4006 \begin_inset Flex Code
4009 \begin_layout Plain Layout
4015 file for defaults, too (for example, a
4016 \begin_inset Flex Code
4019 \begin_layout Plain Layout
4027 option to include default keyboard).
4035 \begin_layout Section
4036 International Keymap Stuff
4037 \begin_inset CommandInset label
4039 name "sec:International-Keymap-Stuff"
4046 \begin_layout Standard
4047 \begin_inset Note Note
4050 \begin_layout Plain Layout
4051 In doing the revisions on this document in March 2008, I did not look over
4052 this stuff, as I do not understand it.
4053 It would be good if someone else could do so.
4062 \begin_layout Standard
4063 The next two sections describe the
4064 \begin_inset Flex Code
4067 \begin_layout Plain Layout
4076 \begin_inset Flex Code
4079 \begin_layout Plain Layout
4087 file syntax in detail.
4088 These sections should help you design your own key map if the ones provided
4089 do not meet your needs.
4092 \begin_layout Subsection
4096 \begin_layout Standard
4100 \begin_inset Flex Code
4103 \begin_layout Plain Layout
4109 file maps keystrokes to characters or strings.
4110 As the name suggests, it sets a keyboard mapping.
4112 \begin_inset Flex Code
4115 \begin_layout Plain Layout
4126 \begin_inset Flex Code
4129 \begin_layout Plain Layout
4144 \begin_inset Flex Code
4147 \begin_layout Plain Layout
4160 \begin_inset Flex Code
4163 \begin_layout Plain Layout
4172 \begin_inset Flex Code
4175 \begin_layout Plain Layout
4183 are described in this section.
4186 \begin_layout Labeling
4187 \labelwidthstring 00.00.0000
4188 \begin_inset Flex Code
4191 \begin_layout Plain Layout
4199 Map a character to a string
4202 \begin_layout LyX-Code
4217 \begin_layout Standard
4250 the double-quote (")
4267 must be escaped with a preceding backslash (
4278 \begin_layout Standard
4280 \begin_inset Flex Noun
4283 \begin_layout Plain Layout
4291 statement to cause the symbol
4292 \begin_inset Flex Noun
4295 \begin_layout Plain Layout
4303 to be output for the keystroke
4304 \begin_inset Flex Noun
4307 \begin_layout Plain Layout
4318 \begin_layout LyX-Code
4324 \begin_layout Labeling
4325 \labelwidthstring 00.00.0000
4326 \begin_inset Flex Code
4329 \begin_layout Plain Layout
4337 Specify an accent character
4340 \begin_layout LyX-Code
4349 \begin_layout Standard
4350 This will make the cha
4388 This is the dead key
4392 \begin_layout Plain Layout
4399 refers to a key that does not produce a character by itself, but when followed
4400 with another key, produces the desired accent character.
4401 For example, a German characte
4403 r with an umlaut like
4413 can be produced in this manner.
4422 \begin_layout Standard
4435 and then another key not in
4452 followed by the other, not allowed key, as output.
4456 \begin_inset Flex Noun
4459 \begin_layout Plain Layout
4467 cancels a dead key, so if
4478 \begin_inset Flex Noun
4481 \begin_layout Plain Layout
4490 , the cursor will not go one position backwards but will instead cancel
4506 might have had on the next keystroke.
4510 \begin_layout Standard
4511 The following example specifies that the character ' is to be an acute accent,
4512 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4515 \begin_layout LyX-Code
4518 kmod ' acute aeiouAEIOU
4521 \begin_layout Labeling
4522 \labelwidthstring 00.00.0000
4523 \begin_inset Flex Code
4526 \begin_layout Plain Layout
4532 Specify an exception to the accent character
4535 \begin_layout LyX-Code
4544 \begin_layout Standard
4545 This defines an exce
4586 have been assigned a keystroke with a previous
4589 \begin_inset Flex Code
4592 \begin_layout Plain Layout
4616 must not belong in the
4663 If such a declaration does not exist in
4671 \begin_inset Flex Code
4674 \begin_layout Plain Layout
4708 \begin_inset Flex Code
4711 \begin_layout Plain Layout
4725 \begin_layout Standard
4726 The following command produces causes äi to be produced when you enter acute-i
4730 \begin_layout LyX-Code
4744 \begin_layout Labeling
4745 \labelwidthstring 00.00.0000
4746 \begin_inset Flex Code
4749 \begin_layout Plain Layout
4755 Combine two accent characters
4758 \begin_layout LyX-Code
4764 accent1 accent2 allowed
4767 \begin_layout Standard
4768 This one is getting pretty esoteric.
4769 It allows you to combine the effect
4825 \begin_inset Flex Code
4828 \begin_layout Plain Layout
4856 \begin_layout Standard
4857 Consider this example from the
4858 \begin_inset Flex Code
4861 \begin_layout Plain Layout
4872 \begin_layout LyX-Code
4875 kmod ; acute aeioyvhAEIOYVH
4879 kcomb acute umlaut iyIY
4882 \begin_layout Standard
4883 This allows you to press
4884 \begin_inset Flex Noun
4887 \begin_layout Plain Layout
4895 and get the effect of
4896 \begin_inset Flex Code
4899 \begin_layout Plain Layout
4918 in this case cancels the last dead key, so if you press
4919 \begin_inset Flex Noun
4922 \begin_layout Plain Layout
4931 \begin_inset Flex Code
4934 \begin_layout Plain Layout
4947 \begin_layout Subsection
4951 \begin_layout Standard
4953 \begin_inset Flex Code
4956 \begin_layout Plain Layout
4964 mapping is performed, a
4965 \begin_inset Flex Code
4968 \begin_layout Plain Layout
4978 file maps the strings that the symbols generate to characters in the current
4980 The \SpecialChar LyX
4981 distribution currently includes at least the
4982 \begin_inset Flex Code
4985 \begin_layout Plain Layout
4994 \begin_inset Flex Code
4997 \begin_layout Plain Layout
5008 \begin_layout Standard
5010 \begin_inset Flex Code
5013 \begin_layout Plain Layout
5021 file is a sequence of declarations of the form
5024 \begin_layout LyX-Code
5037 \begin_layout Standard
5038 For example, in order to map
5039 \begin_inset Flex Noun
5042 \begin_layout Plain Layout
5052 to the corresponding character in the iso-8859-1 set (233), the following
5056 \begin_layout LyX-Code
5064 \begin_layout Standard
5066 \begin_inset Flex Code
5069 \begin_layout Plain Layout
5078 \begin_inset Flex Code
5081 \begin_layout Plain Layout
5099 the same character can apply to more than one string.
5101 \begin_inset Flex Code
5104 \begin_layout Plain Layout
5115 \begin_layout LyX-Code
5127 \begin_inset Newline newline
5143 \begin_layout Standard
5145 cannot find a mapping for the string produced by the keystroke or a
5146 deadkey sequence, it will check if it looks like an accented char and try
5147 to draw an accent over the character on screen.
5150 \begin_layout Subsection
5154 \begin_layout Standard
5155 There is a second way to add support for international characters through
5156 so-called dead-keys.
5157 A dead-key works in combination with a letter to produce an accented character.
5158 Here, we'll explain how to create a really simple dead-key to illustrate
5162 \begin_layout Standard
5163 Suppose you happen to need the circumflex character,
5164 \begin_inset Quotes eld
5168 \begin_inset Quotes erd
5173 \begin_inset Flex Noun
5176 \begin_layout Plain Layout
5183 \begin_inset space ~
5187 \begin_inset Flex Noun
5190 \begin_layout Plain Layout
5196 ] to the \SpecialChar LyX
5198 \begin_inset Flex Code
5201 \begin_layout Plain Layout
5208 \begin_inset Flex Code
5211 \begin_layout Plain Layout
5218 Now, whenever you type the
5219 \begin_inset Flex Noun
5222 \begin_layout Plain Layout
5228 -key followed by a letter, that letter will have a circumflex accent on
5230 For example, the sequence
5231 \begin_inset Quotes eld
5235 \begin_inset Flex Noun
5238 \begin_layout Plain Layout
5245 \begin_inset Quotes erd
5248 produces the letter:
5249 \begin_inset Quotes eld
5253 \begin_inset Quotes erd
5257 If you tried to type
5258 \begin_inset Quotes eld
5262 \begin_inset Flex Noun
5265 \begin_layout Plain Layout
5272 \begin_inset Quotes erd
5275 , however, \SpecialChar LyX
5276 will complain with a beep, since a
5277 \begin_inset Quotes eld
5281 \begin_inset Flex Noun
5284 \begin_layout Plain Layout
5291 \begin_inset Quotes erd
5294 never takes a circumflex accent.
5296 \begin_inset Flex Noun
5299 \begin_layout Plain Layout
5305 after a dead-key produces the bare-accent.
5306 Please note this last point! If you bind a key to a dead-key, you'll need
5307 to rebind the character on that key to yet another key.
5309 \begin_inset Flex Noun
5312 \begin_layout Plain Layout
5318 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5321 \begin_layout Standard
5322 One common way to bind dead-keys is to use
5323 \begin_inset Flex Noun
5326 \begin_layout Plain Layout
5333 \begin_inset Flex Noun
5336 \begin_layout Plain Layout
5343 \begin_inset Flex Noun
5346 \begin_layout Plain Layout
5352 in combination with an accent, like
5353 \begin_inset Quotes eld
5357 \begin_inset Flex Noun
5360 \begin_layout Plain Layout
5367 \begin_inset Quotes erd
5371 \begin_inset Quotes eld
5375 \begin_inset Flex Noun
5378 \begin_layout Plain Layout
5385 \begin_inset Quotes erd
5389 \begin_inset Quotes eld
5393 \begin_inset Flex Noun
5396 \begin_layout Plain Layout
5403 \begin_inset Quotes erd
5407 Another way involves using
5408 \begin_inset Flex Code
5411 \begin_layout Plain Layout
5418 \begin_inset Flex Code
5421 \begin_layout Plain Layout
5427 to set up the special
5428 \begin_inset Flex Code
5431 \begin_layout Plain Layout
5439 \begin_inset Flex Code
5442 \begin_layout Plain Layout
5448 acts in some ways just like
5449 \begin_inset Flex Noun
5452 \begin_layout Plain Layout
5458 and permits you to bind keys to accented characters.
5459 You can also turn keys into dead-keys by binding them to something like
5461 \begin_inset Flex Code
5464 \begin_layout Plain Layout
5470 and then binding this symbolic key to the corresponding \SpecialChar LyX
5475 \begin_layout Plain Layout
5480 : This is exactly what I do in my
5481 \begin_inset Flex Code
5484 \begin_layout Plain Layout
5491 \begin_inset Flex Code
5494 \begin_layout Plain Layout
5502 \begin_inset Flex Noun
5505 \begin_layout Plain Layout
5507 \begin_inset space ~
5516 \begin_inset Flex Code
5519 \begin_layout Plain Layout
5525 and a bunch of these
5526 \begin_inset Quotes eld
5530 \begin_inset Flex Code
5533 \begin_layout Plain Layout
5540 \begin_inset Quotes erd
5543 symbolic keys bound such things as
5544 \begin_inset Flex Noun
5547 \begin_layout Plain Layout
5549 \begin_inset space ~
5558 \begin_inset Flex Noun
5561 \begin_layout Plain Layout
5563 \begin_inset space ~
5572 This is how I produce my accented characters.
5577 You can make just about anything into the
5578 \begin_inset Flex Code
5581 \begin_layout Plain Layout
5588 \begin_inset Flex Noun
5591 \begin_layout Plain Layout
5597 keys, a spare function key, etc.
5598 As for the \SpecialChar LyX
5599 commands that produce accents, check the entry for
5600 \begin_inset Flex Code
5603 \begin_layout Plain Layout
5614 You'll find the complete list there.
5617 \begin_layout Subsection
5618 Saving your Language Configuration
5621 \begin_layout Standard
5622 You can edit your preferences so that your desired language environment
5623 is automatically configured when \SpecialChar LyX
5625 \begin_inset Flex Noun
5628 \begin_layout Plain Layout
5629 Edit\SpecialChar menuseparator
5638 \begin_layout Chapter
5639 Installing New Document Classes, Layouts, and Templates
5640 \begin_inset CommandInset label
5642 name "cha:Installing-New-Document"
5647 \begin_inset Argument 1
5650 \begin_layout Plain Layout
5651 Installing New Document Classes
5659 \begin_layout Standard
5660 In this chapter, we describe the procedures for creating and installing
5661 new \SpecialChar LyX
5662 layout and template files, as well as offer a refresher on correctly
5663 installing new \SpecialChar LaTeX
5668 \begin_layout Standard
5669 First, let us a say a few words about how one ought to think about the relation
5670 between \SpecialChar LyX
5671 and \SpecialChar LaTeX
5673 The thing to understand is that, in a certain sense, \SpecialChar LyX
5674 doesn't know anything
5675 about \SpecialChar LaTeX
5677 Indeed, from \SpecialChar LyX
5678 's point of view, \SpecialChar LaTeX
5679 is just one of several
5680 \begin_inset Quotes eld
5684 \begin_inset Quotes erd
5687 in which it is capable of producing output.
5688 Other such formats are DocBook, plaintext, and XHTML.
5690 is, of course, a particularly important format, but very little of the
5691 information \SpecialChar LyX
5692 has about \SpecialChar LaTeX
5693 is actually contained in the program itself.
5697 \begin_layout Plain Layout
5698 Some commands are sufficiently complex that they are
5699 \begin_inset Quotes eld
5703 \begin_inset Quotes erd
5706 into \SpecialChar LyX
5708 But the developers generally regard this as a Bad Thing.
5713 Rather, that information, even for the standard classes like
5714 \begin_inset Flex Code
5717 \begin_layout Plain Layout
5723 , is contained in `layout files'.
5724 Similarly, \SpecialChar LyX
5725 itself does not know much about DocBook or XHTML.
5726 What it knows is contained in layout files.
5729 \begin_layout Standard
5730 You can think of the layout file for a given document class as a translation
5731 manual between \SpecialChar LyX
5732 constructs—paragraphs with their corresponding styles,
5733 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5736 Almost everything \SpecialChar LyX
5738 \begin_inset Flex Code
5741 \begin_layout Plain Layout
5747 , for example, is contained in the file
5748 \begin_inset Flex Code
5751 \begin_layout Plain Layout
5757 and in various other files it includes.
5758 For this reason, anyone intending to write layout files should plan to
5759 study the existing files.
5760 A good place to start is with
5761 \begin_inset Flex Code
5764 \begin_layout Plain Layout
5770 , which is included in
5771 \begin_inset Flex Code
5774 \begin_layout Plain Layout
5781 \begin_inset Flex Code
5784 \begin_layout Plain Layout
5790 , and many of the other layout files for document classes.
5791 This file is where sections and the like are defined:
5792 \begin_inset Flex Code
5795 \begin_layout Plain Layout
5801 tells \SpecialChar LyX
5802 how paragraphs that are marked with the Section, Subsection, etc,
5803 styles can be translated into corresponding \SpecialChar LaTeX
5804 , DocBook, and XHTML commands
5807 \begin_inset Flex Code
5810 \begin_layout Plain Layout
5816 file basically just includes several of these
5817 \begin_inset Flex Code
5820 \begin_layout Plain Layout
5829 \begin_layout Standard
5830 Defining the \SpecialChar LyX
5832 correspondence is not the only thing layout files do, though.
5833 Their other job is to define how the \SpecialChar LyX
5834 constructs themselves will appear
5836 The fact that layout files have these two jobs is often a source of confusion,
5837 because they are completely separate.
5838 Telling \SpecialChar LyX
5839 how to translate a certain paragraph style into \SpecialChar LaTeX
5842 how to display it; conversely, telling \SpecialChar LyX
5843 how to display a certain paragraph
5844 style does not tell \SpecialChar LyX
5845 how to translate it into \SpecialChar LaTeX
5846 (let alone tell \SpecialChar LaTeX
5849 So, in general, when you define a new \SpecialChar LyX
5850 construct, you must always do two
5851 quite separate things: (i)
5852 \begin_inset space ~
5855 tell \SpecialChar LyX
5856 how to translate it into \SpecialChar LaTeX
5858 \begin_inset space ~
5861 tell \SpecialChar LyX
5865 \begin_layout Standard
5866 Much the same is true, of course, as regards \SpecialChar LyX
5867 's other backend formats, though
5868 XHTML is in some ways different, because in that case \SpecialChar LyX
5873 able, to some extent, to use information about how it should display a
5874 paragraph on the screen to output information (in the form of CSS) about
5875 how the paragraph should be displayed in a browser.
5876 Even in this case, however, the distinction between what \SpecialChar LyX
5878 and how things are rendered externally remains in force, and the two can
5879 be controlled separately.
5881 \begin_inset CommandInset ref
5883 reference "sec:Tags-for-XHTML"
5890 \begin_layout Section
5891 Installing new \SpecialChar LaTeX
5895 \begin_layout Standard
5896 Some installations may not include a \SpecialChar LaTeX
5897 package or class file that you would
5898 like to use within \SpecialChar LyX
5900 For example, you might need Foil\SpecialChar TeX
5901 , a package for preparing slides for overhead
5903 Modern \SpecialChar LaTeX
5904 distributions like \SpecialChar TeX
5905 Live (2008 or newer) or MiK\SpecialChar TeX
5906 provide a user interface
5907 for installing such packages.
5908 For example, with MiK\SpecialChar TeX
5909 , you start the program
5910 \begin_inset Quotes eld
5914 \begin_inset space ~
5918 \begin_inset Quotes erd
5921 to get a list of available packages.
5922 To install one of them, right click on it or use the corresponding toolbar
5926 \begin_layout Standard
5927 If your \SpecialChar LaTeX
5928 distribution does not provide such a `package manager', or if the
5929 package is not available from your distribution, then follow these steps
5930 to install it manually:
5933 \begin_layout Enumerate
5934 Get the package from
5935 \begin_inset CommandInset href
5938 target "http://www.ctan.org/"
5945 \begin_layout Enumerate
5946 If the package contains a file with the ending
5947 \begin_inset Quotes eld
5951 \begin_inset Flex Code
5954 \begin_layout Plain Layout
5961 \begin_inset Quotes erd
5964 (is the case for Foil\SpecialChar TeX
5965 ) then open a console, change to the folder of this
5966 file and execute the command
5967 \begin_inset Flex Code
5970 \begin_layout Plain Layout
5977 You have now unpacked the package and have all files to install it.
5978 Most \SpecialChar LaTeX
5979 -packages are not packed and you can skip this step.
5982 \begin_layout Enumerate
5983 Now you need to decide if the package should be available for all users
5985 \begin_inset Separator parbreak
5992 \begin_layout Enumerate
5993 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
5994 for all users on your system, then install it in your `local' \SpecialChar TeX
5996 install it in your own `user' \SpecialChar TeX
5998 Where these trees should be created, if they do not already exist, depends
6000 To find this out, look in the file
6001 \begin_inset Flex Code
6004 \begin_layout Plain Layout
6014 \begin_layout Plain Layout
6015 This is usually in the directory
6016 \begin_inset Flex Code
6019 \begin_layout Plain Layout
6025 , though you can execute the command
6026 \begin_inset Flex Code
6029 \begin_layout Plain Layout
6040 The location of the `local' \SpecialChar TeX
6041 tree is defined by the
6042 \begin_inset Flex Code
6045 \begin_layout Plain Layout
6051 variable; this is usually somewhere like
6052 \begin_inset Flex Code
6055 \begin_layout Plain Layout
6056 /usr/local/share/texmf
6062 The location of the `user' \SpecialChar TeX
6064 \begin_inset Flex Code
6067 \begin_layout Plain Layout
6074 \begin_inset Flex Code
6077 \begin_layout Plain Layout
6084 (If these variables are not predefined, you have to define them.) You'll
6085 probably need root permissions to create or modify the `local' tree, but
6086 not for your `user' tree.
6087 \begin_inset Newline newline
6090 In general, it is recommended to install in the user tree because your user
6091 will not be modified or even overwritten when you upgrade your system.
6092 It will typically also be backed up together with everything else when
6093 you backup your home directory (which, of course, you do on a regular basis).
6096 \begin_layout Enumerate
6097 On Windows, if you want the new package to be available for all users on
6098 your system, change to the folder where \SpecialChar LaTeX
6099 is installed and then change to
6101 \begin_inset Flex Code
6104 \begin_layout Plain Layout
6115 (For MiK\SpecialChar TeX
6116 , this would be by default the folder
6117 \begin_inset Flex Code
6120 \begin_layout Plain Layout
6138 \begin_layout Plain Layout
6139 Note that this will be the correct path only on English installations.
6140 On a German one, it would be
6141 \begin_inset Flex Code
6144 \begin_layout Plain Layout
6158 , and similarly for other languages.
6163 Create there a new folder
6164 \begin_inset Flex Code
6167 \begin_layout Plain Layout
6173 and copy all files of the package into it.
6175 \begin_inset Newline newline
6178 If the package should only available for you or you don't have admin permissions
6179 , do the same, but in the local \SpecialChar LaTeX
6182 \begin_inset space \thinspace{}
6185 g., for MiK\SpecialChar TeX
6187 \begin_inset space ~
6190 2.8 under Windows XP, this would be the folder:
6191 \begin_inset Newline newline
6197 \begin_inset Flex Code
6200 \begin_layout Plain Layout
6203 Documents and Settings
6215 \begin_inset Newline newline
6221 \begin_inset Phantom HPhantom
6224 \begin_layout Plain Layout
6235 \begin_inset Flex Code
6238 \begin_layout Plain Layout
6251 \begin_inset Newline newline
6254 On Vista, it would be:
6255 \begin_inset Newline newline
6259 \begin_inset Flex Code
6262 \begin_layout Plain Layout
6288 \begin_layout Enumerate
6289 Now one only need to tell \SpecialChar LaTeX
6290 that there are new files.
6291 This depends on the used \SpecialChar LaTeX
6293 \begin_inset Separator parbreak
6300 \begin_layout Enumerate
6301 For \SpecialChar TeX
6302 Live execute the command
6303 \begin_inset Flex Code
6306 \begin_layout Plain Layout
6313 If you installed the package for all users, then you will probably need
6314 to have root permissions for that.
6317 \begin_layout Enumerate
6318 For MiK\SpecialChar TeX
6319 , if you have installed the package for all users, start the program
6321 \begin_inset Quotes eld
6325 \begin_inset space ~
6329 \begin_inset Quotes erd
6332 and press the button marked
6333 \begin_inset Quotes eld
6337 \begin_inset Quotes erd
6341 Otherwise start the program
6342 \begin_inset Quotes eld
6346 \begin_inset Quotes erd
6353 \begin_layout Enumerate
6354 Finally, you need to tell \SpecialChar LyX
6355 that there are new packages available.
6356 So, in \SpecialChar LyX
6358 \begin_inset Flex Noun
6361 \begin_layout Plain Layout
6364 \SpecialChar menuseparator
6370 and then restart \SpecialChar LyX
6374 \begin_layout Standard
6375 Now the package is installed.
6376 In our example, the document class
6377 \begin_inset Flex Code
6380 \begin_layout Plain Layout
6382 \begin_inset space ~
6390 will now be available under
6391 \begin_inset Flex Noun
6394 \begin_layout Plain Layout
6395 Document\SpecialChar menuseparator
6396 Settings\SpecialChar menuseparator
6406 \begin_layout Standard
6407 If you would like to use a \SpecialChar LaTeX
6408 document class that is not even listed in the
6410 \begin_inset Flex Noun
6413 \begin_layout Plain Layout
6414 Document\SpecialChar menuseparator
6415 Settings\SpecialChar menuseparator
6421 , then you need to create a `layout' file for it.
6422 That is the topic of the next section.
6425 \begin_layout Section
6426 Types of layout files
6429 \begin_layout Standard
6430 This section describes the various sorts of \SpecialChar LyX
6431 files that contain layout informati
6433 These files describe various paragraph and character styles, determining
6434 how \SpecialChar LyX
6435 should display them and how they should be translated into \SpecialChar LaTeX
6437 XHTML, or whatever output format is being used.
6441 \begin_layout Standard
6442 We shall try to provide a thorough description of the process of writing
6444 However, there are so many different types of documents supported even
6445 by just \SpecialChar LaTeX
6446 that we can't hope to cover every different possibility or problem
6447 you might encounter.
6448 The \SpecialChar LyX
6449 users' list is frequented by people with lots of experience with layout
6450 design who are willing to share what they've learned, so please feel free
6451 to ask questions there.
6454 \begin_layout Standard
6455 As you prepare to write a new layout, it is extremely helpful to look at
6456 the layouts distributed with \SpecialChar LyX
6458 If you write a \SpecialChar LyX
6459 layout for a \SpecialChar LaTeX
6460 document class that might also be used by
6461 others, or write a module that might be useful to others, then you should
6462 consider posting your layout to the
6463 \begin_inset CommandInset href
6465 name "layout section on the LyX wiki"
6466 target "http://wiki.lyx.org/Layouts/Layouts"
6470 or even to the \SpecialChar LyX
6471 developers' list, so that it might be included in \SpecialChar LyX
6476 \begin_layout Plain Layout
6477 Note that \SpecialChar LyX
6478 is licensed under the General Public License, so any material
6479 that is contributed to \SpecialChar LyX
6480 must be similarly licensed.
6488 \begin_layout Subsection
6490 \begin_inset CommandInset label
6492 name "subsec:Layout-modules"
6499 \begin_layout Standard
6500 We have spoken to this point about `layout files'.
6501 But there are different sorts of files that contain layout information.
6502 Layout files, strictly so called, have the
6503 \begin_inset Flex Code
6506 \begin_layout Plain Layout
6512 extension and provide \SpecialChar LyX
6513 with information about document classes.
6514 Since \SpecialChar LyX
6515 1.6 layout information can also be contained in layout
6520 \begin_inset Flex Code
6523 \begin_layout Plain Layout
6530 Modules are to \SpecialChar LaTeX
6531 packages much as layouts are to \SpecialChar LaTeX
6532 classes, and some modules—such
6534 \begin_inset Flex Code
6537 \begin_layout Plain Layout
6543 module—specifically provide support for one package.
6544 In a sense, layout modules are similar to included
6548 \begin_layout Plain Layout
6549 These can have any extension, but by convention have the
6550 \begin_inset Flex Code
6553 \begin_layout Plain Layout
6565 \begin_inset Flex Code
6568 \begin_layout Plain Layout
6574 —in that modules are not specific to a given document class but may be used
6575 with many different classes.
6576 The difference is that using an included file with
6577 \begin_inset Flex Code
6580 \begin_layout Plain Layout
6586 requires editing that file.
6587 Modules, by contrast, are selected in the
6588 \begin_inset Flex Noun
6591 \begin_layout Plain Layout
6592 Document\SpecialChar menuseparator
6601 \begin_layout Standard
6602 Building modules is the easiest way to get started with layout editing,
6603 since it can be as simple as adding a single new paragraph style or flex
6605 But modules may, in principle, contain anything a layout file can contain.
6608 \begin_layout Standard
6609 After creating a new module and copying it to the
6610 \begin_inset Flex Code
6613 \begin_layout Plain Layout
6619 folder, you will need to reconfigure and then restart \SpecialChar LyX
6622 However, changes you make to the module will be seen immediately, if you
6624 \begin_inset Flex Noun
6627 \begin_layout Plain Layout
6628 Document\SpecialChar menuseparator
6634 , highlight something, and then hit
6635 \begin_inset Quotes eld
6639 \begin_inset Quotes erd
6645 It is strongly recommended that you save your work before doing this
6650 it is strongly recommended that you not attempt to edit modules while simultaneo
6651 usly working on actual documents
6654 Though of course the developers strive to keep \SpecialChar LyX
6655 stable in such situations,
6656 syntax errors and the like in your module file could cause strange behavior.
6659 \begin_layout Subsubsection
6663 \begin_layout Standard
6664 Modules are to \SpecialChar LyX
6665 as packages are to \SpecialChar LaTeX
6667 Sometimes, however, you find yourself wanting a specific inset or character
6668 style just for one document and writing a module that will also be available
6669 to other documents makes little sense.
6670 What you need is \SpecialChar LyX
6672 \begin_inset Quotes eld
6676 \begin_inset Quotes erd
6682 \begin_layout Standard
6683 You will find it under
6685 Document\SpecialChar menuseparator
6686 Settings\SpecialChar menuseparator
6690 The large text box allows you to enter anything that you might enter in
6691 a layout file or module.
6692 You can think of a document's local layout, in fact, as a module that belongs
6694 So, in particular, you must enter a
6695 \begin_inset Flex Code
6698 \begin_layout Plain Layout
6705 Any format is acceptable, but one would normally use the format current
6707 (In \SpecialChar LyX
6708 2.1, the current layout format is 48.) You should be aware that local
6709 layout is not supported by versions of \SpecialChar LyX
6710 prior to 1.6, so you should not
6711 use it if you want to be able to export your document to \SpecialChar LyX
6713 (without, that is, losing the local layout information).
6714 If you wish to be able to export to 1.6—local layout is supported in 1.6,
6715 though there is no UI for it—then you should use format 11 and, of course,
6716 use only layout constructs that were available in \SpecialChar LyX
6720 \begin_layout Standard
6721 When you have entered something in the
6722 \begin_inset Flex Code
6725 \begin_layout Plain Layout
6731 pane, \SpecialChar LyX
6733 \begin_inset Quotes eld
6737 \begin_inset Quotes erd
6740 button at the bottom.
6741 Clicking this button will cause \SpecialChar LyX
6742 to determine whether what you have entered
6743 is valid layout information for the chosen format.
6745 will report the result but, unfortunately, will not tell you what errors
6746 there might have been.
6747 These will be written to the terminal, however, if \SpecialChar LyX
6748 is started from a terminal.
6749 You will not be permitted to save your local layout until you have entered
6753 \begin_layout Standard
6754 The warnings at the end of the previous section apply here, too.
6755 Do not play with local layout while you are actually working, especially
6756 if you have not saved your document.
6757 That said, using local layout with a test document can be a very convenient
6758 way to try out layout ideas, or even to start developing a module.
6761 \begin_layout Subsection
6763 \begin_inset Flex Noun
6766 \begin_layout Plain Layout
6775 \begin_layout Standard
6776 There are two situations you are likely to encounter when wanting to support
6777 a new \SpecialChar LaTeX
6778 document class, involving style (
6779 \begin_inset Flex Code
6782 \begin_layout Plain Layout
6788 ) files and \SpecialChar LaTeX2e
6790 \begin_inset Flex Code
6793 \begin_layout Plain Layout
6800 Supporting a style file is usually fairly easy.
6801 Supporting a new class file is a bit harder.
6802 We'll discuss the former in this section and the latter in the next.
6803 Similar remarks apply, of course, if you want to support a new DocBook
6807 \begin_layout Standard
6808 The easier case is the one in which your new document class is provided
6809 as a style file that is to be used in conjunction with an already supported
6811 For the sake of the example, we'll assume that the style file is called
6813 \begin_inset Flex Noun
6816 \begin_layout Plain Layout
6822 and that it is meant to be used with
6823 \begin_inset Flex Noun
6826 \begin_layout Plain Layout
6832 , which is a standard class.
6836 \begin_layout Standard
6837 Start by copying the existing class's layout file into your local directory:
6841 \begin_layout Plain Layout
6842 Of course, which directory is your local directory will vary by platform,
6843 and \SpecialChar LyX
6844 allows you to specify your local directory on startup, too, using
6846 \begin_inset Flex Code
6849 \begin_layout Plain Layout
6863 \begin_layout LyX-Code
6864 cp report.layout ~/.lyx/layouts/myclass.layout
6867 \begin_layout Standard
6869 \begin_inset Flex Code
6872 \begin_layout Plain Layout
6878 and change the line:
6881 \begin_layout LyX-Code
6884 Declare\SpecialChar LaTeX
6888 \begin_layout Standard
6892 \begin_layout LyX-Code
6895 Declare\SpecialChar LaTeX
6896 Class[report, myclass.sty]{report (myclass)}
6899 \begin_layout Standard
6903 \begin_layout LyX-Code
6905 \begin_inset Newline newline
6911 \begin_inset Newline newline
6917 \begin_layout Standard
6918 near the top of the file.
6921 \begin_layout Standard
6922 Start \SpecialChar LyX
6924 \begin_inset Flex Noun
6927 \begin_layout Plain Layout
6928 Tools\SpecialChar menuseparator
6935 Then restart \SpecialChar LyX
6936 and try creating a new document.
6938 \begin_inset Flex Noun
6941 \begin_layout Plain Layout
6947 " as a document class option in the
6948 \begin_inset Flex Noun
6951 \begin_layout Plain Layout
6952 Document\SpecialChar menuseparator
6959 It is likely that some of the sectioning commands and such in your new
6960 class will work differently from how they worked in the base class—
6961 \begin_inset Flex Code
6964 \begin_layout Plain Layout
6970 in this example—so you can fiddle around with the settings for the different
6971 sections if you wish.
6972 The layout information for sections is contained in
6973 \begin_inset Flex Code
6976 \begin_layout Plain Layout
6982 , but you do not need to copy and change this file.
6983 Instead, you can simply add your changes to your layout file, after the
6985 \begin_inset Flex Code
6988 \begin_layout Plain Layout
6994 , which itself includes
6995 \begin_inset Flex Code
6998 \begin_layout Plain Layout
7005 For example, you might add these lines:
7008 \begin_layout LyX-Code
7012 \begin_layout LyX-Code
7016 \begin_layout LyX-Code
7020 \begin_layout LyX-Code
7024 \begin_layout LyX-Code
7028 \begin_layout Standard
7029 to change the font for chapter headings to sans-serif.
7030 This will override (or, in this case, add to) the existing declaration
7031 for the Chapter style.
7035 \begin_layout Standard
7036 Your new package may also provide commands or environments not present in
7038 In this case, you will want to add these to the layout file.
7040 \begin_inset CommandInset ref
7042 reference "sec:TextClass"
7046 for information on how to do so.
7049 \begin_layout Standard
7051 \begin_inset Flex Noun
7054 \begin_layout Plain Layout
7060 can be used with several different document classes, and even if it cannot,
7061 you might find it easiest just to write a module that you can load with
7063 The simplest possible such module would be:
7066 \begin_layout LyX-Code
7069 DeclareLyXModule{My Package}
7072 \begin_layout LyX-Code
7076 \begin_layout LyX-Code
7077 #Support for mypkg.sty.
7080 \begin_layout LyX-Code
7082 \begin_inset Newline newline
7088 \begin_layout LyX-Code
7090 \begin_inset Newline newline
7096 \begin_layout LyX-Code
7098 \begin_inset Newline newline
7104 \begin_inset Newline newline
7110 \begin_layout Standard
7111 A more complex module might modify the behavior of some existing constructs
7112 or define some new ones.
7114 \begin_inset CommandInset ref
7116 reference "sec:TextClass"
7123 \begin_layout Subsection
7125 \begin_inset Flex Noun
7128 \begin_layout Plain Layout
7137 \begin_layout Standard
7138 There are two possibilities here.
7139 One is that the class file is itself based upon an existing document class.
7140 For example, many thesis classes are based upon
7141 \begin_inset Flex Noun
7144 \begin_layout Plain Layout
7151 To see whether yours is, look for a line like
7154 \begin_layout LyX-Code
7160 \begin_layout Standard
7162 If so, then you may proceed largely as in the previous section, though
7164 \begin_inset Flex Code
7167 \begin_layout Plain Layout
7168 Declare\SpecialChar LaTeX
7174 line will be different.
7175 If your new class is
7176 \begin_inset Flex Code
7179 \begin_layout Plain Layout
7185 and it is based upon
7186 \begin_inset Flex Code
7189 \begin_layout Plain Layout
7195 , then the line should read:
7199 \begin_layout Plain Layout
7200 And it will be easiest if you save the file to
7201 \begin_inset Flex Code
7204 \begin_layout Plain Layout
7211 assumes that the document class has the same name as the layout file.
7220 \begin_layout LyX-Code
7223 Declare\SpecialChar LaTeX
7224 Class[thesis,book]{thesis}
7227 \begin_layout Standard
7228 If, on the other hand, the new class is not based upon an existing class,
7229 you will probably have to
7230 \begin_inset Quotes eld
7234 \begin_inset Quotes erd
7238 We strongly suggest copying an existing layout file which uses a similar
7240 class and then modifying it, if you can do so.
7241 At least use an existing file as a starting point so you can find out what
7242 items you need to worry about.
7243 Again, the specifics are covered below.
7246 \begin_layout Subsection
7248 \begin_inset CommandInset label
7250 name "subsec:Creating-Templates"
7257 \begin_layout Standard
7258 Once you have written a layout file for a new document class, you might
7259 want to consider writing a
7264 A template acts as a kind of tutorial for your layout, showing how it might
7265 be used, though containing dummy content.
7266 You can of course look at the various templates included with \SpecialChar LyX
7270 \begin_layout Standard
7271 Templates are created just like usual documents: using \SpecialChar LyX
7273 The only difference is that usual documents contain all possible settings,
7274 including the font scheme and the paper size.
7275 Usually a user doesn't want a template to overwrite his preferred settings
7276 for such parameters.
7277 For that reason, the designer of a template should remove the corresponding
7279 \begin_inset Flex Code
7282 \begin_layout Plain Layout
7291 \begin_inset Flex Code
7294 \begin_layout Plain Layout
7302 from the template \SpecialChar LyX
7304 This can be done with any simple text-editor, for example
7305 \begin_inset Flex Code
7308 \begin_layout Plain Layout
7315 \begin_inset Flex Code
7318 \begin_layout Plain Layout
7327 \begin_layout Standard
7328 Put the edited template files you create in
7329 \begin_inset Flex Code
7332 \begin_layout Plain Layout
7338 , copy the ones you use from the global template directory in
7339 \begin_inset Flex Code
7342 \begin_layout Plain Layout
7348 to the same place, and redefine the template path in the
7349 \begin_inset Flex Noun
7352 \begin_layout Plain Layout
7353 Tools\SpecialChar menuseparator
7354 Preferences\SpecialChar menuseparator
7363 \begin_layout Standard
7364 Note, by the way, that there is a template which has a particular meaning:
7366 \begin_inset Flex Code
7369 \begin_layout Plain Layout
7376 This template is loaded every time you create a new document with
7377 \begin_inset Flex Noun
7380 \begin_layout Plain Layout
7381 File\SpecialChar menuseparator
7387 in order to provide useful defaults.
7388 To create this template from inside \SpecialChar LyX
7389 , all you have to do is to open a document
7390 with the correct settings, and use the
7391 \begin_inset Flex Noun
7394 \begin_layout Plain Layout
7395 Save as Document Defaults
7403 \begin_layout Subsection
7404 Upgrading old layout files
7407 \begin_layout Standard
7408 The format of layout files changes with each \SpecialChar LyX
7409 release, so old layout files
7410 need to be converted to the new format.
7412 reads a layout file in an older format, it automatically calls the
7414 \begin_inset Flex Code
7417 \begin_layout Plain Layout
7423 to convert it to a temporary file in current format.
7424 The original file is left untouched.
7425 If you use the layout file often, then, you may want to convert it permanently,
7426 so that \SpecialChar LyX
7427 does not have to do so itself every time.
7428 To do this, you can call the converter manually:
7431 \begin_layout Enumerate
7433 \begin_inset Flex Code
7436 \begin_layout Plain Layout
7443 \begin_inset Flex Code
7446 \begin_layout Plain Layout
7455 \begin_layout Enumerate
7457 \begin_inset Newline newline
7461 \begin_inset Flex Code
7464 \begin_layout Plain Layout
7465 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7471 \begin_inset Newline newline
7475 \begin_inset Flex Code
7478 \begin_layout Plain Layout
7484 is the name of your \SpecialChar LyX
7488 \begin_layout Standard
7489 Note that manual conversion does not affect included files, so these will
7490 have to be converted separately.
7493 \begin_layout Section
7494 \begin_inset CommandInset label
7496 name "sec:TextClass"
7500 The layout file format
7503 \begin_layout Standard
7504 The following sections describe how layout files are structured and written.
7505 Our advice is to go slowly, save and test often.
7506 It is really not that hard, except that the multitude of options can become
7507 overwhelming, especially if you try to check out too many at once.
7508 It becomes easier if you use existing layouts of \SpecialChar LyX
7509 as examples/reference
7510 or if you modify an existing layout to your needs.
7513 \begin_layout Standard
7514 Note that all the tags used in layout files are case-insensitive.
7516 \begin_inset Flex Code
7519 \begin_layout Plain Layout
7526 \begin_inset Flex Code
7529 \begin_layout Plain Layout
7536 \begin_inset Flex Code
7539 \begin_layout Plain Layout
7545 are really the same tag.
7546 The possible arguments are printed in brackets after the tag's name.
7547 The default argument is typeset
7548 \begin_inset Flex Code
7551 \begin_layout Plain Layout
7560 If the argument has a data type like
7561 \begin_inset Quotes eld
7565 \begin_inset Quotes erd
7569 \begin_inset Quotes eld
7573 \begin_inset Quotes erd
7576 , the default is shown like this:
7577 \begin_inset Flex Code
7580 \begin_layout Plain Layout
7591 \begin_layout Subsection
7592 The document class declaration and classification
7595 \begin_layout Standard
7596 Lines in a layout file which begin with
7597 \begin_inset Flex Code
7600 \begin_layout Plain Layout
7607 There is one exception to this rule.
7609 \begin_inset Flex Code
7612 \begin_layout Plain Layout
7618 files should begin with lines like:
7621 \begin_layout LyX-Code
7624 #% Do not delete the line below; configure depends on this
7627 \begin_layout LyX-Code
7632 DeclareLaTeXClass{Article (Standard Class)}
7635 \begin_layout LyX-Code
7640 DeclareCategory{Articles}
7643 \begin_layout Standard
7644 The second and third lines are used when you (re)configure \SpecialChar LyX
7646 The layout file is read by the \SpecialChar LaTeX
7648 \begin_inset Flex Code
7651 \begin_layout Plain Layout
7657 , in a special mode where
7658 \begin_inset Flex Code
7661 \begin_layout Plain Layout
7668 The first line is just a \SpecialChar LaTeX
7669 comment, the second one contains the mandatory
7670 declaration of the text class and the third line contains the optional
7671 classification of the class.
7672 If these lines appear in a file named
7673 \begin_inset Flex Code
7676 \begin_layout Plain Layout
7682 , then they define a text class of name
7683 \begin_inset Flex Code
7686 \begin_layout Plain Layout
7692 (the name of the layout file) which uses the \SpecialChar LaTeX
7694 \begin_inset Flex Code
7697 \begin_layout Plain Layout
7703 (the default is to use the same name as the layout).
7705 \begin_inset Quotes eld
7708 Article (Standard Class)
7709 \begin_inset Quotes erd
7712 that appears above is used as a description of the text class in the
7713 \begin_inset Flex Noun
7716 \begin_layout Plain Layout
7717 Document\SpecialChar menuseparator
7725 \begin_inset Quotes eld
7729 \begin_inset Quotes erd
7732 in the example) is also used in the
7733 \begin_inset Flex Noun
7736 \begin_layout Plain Layout
7737 Document\SpecialChar menuseparator
7743 dialog: the text classes are grouped by these categories (which are usually
7744 genres, so typical categories are
7745 \begin_inset Quotes eld
7749 \begin_inset Quotes erd
7753 \begin_inset Quotes eld
7757 \begin_inset Quotes erd
7761 \begin_inset Quotes eld
7765 \begin_inset Quotes erd
7769 \begin_inset Quotes eld
7773 \begin_inset Quotes erd
7777 \begin_inset Quotes eld
7781 \begin_inset Quotes erd
7785 \begin_inset Quotes eld
7789 \begin_inset Quotes erd
7793 If no category has been declared, the class will be put in the
7794 \begin_inset Quotes eld
7798 \begin_inset Quotes erd
7804 \begin_layout Standard
7805 Let's assume that you wrote your own text class that uses the
7806 \begin_inset Flex Code
7809 \begin_layout Plain Layout
7815 document class, but where you changed the appearance of the section headings.
7816 If you put it in a file
7817 \begin_inset Flex Code
7820 \begin_layout Plain Layout
7826 , the header of this file should be:
7829 \begin_layout LyX-Code
7832 #% Do not delete the line below; configure depends on this
7835 \begin_layout LyX-Code
7840 DeclareLaTeXClass[article]{Article (with My Own Headings)}
7843 \begin_layout LyX-Code
7848 DeclareCategory{Articles}
7851 \begin_layout Standard
7852 This declares a text class
7853 \begin_inset Flex Code
7856 \begin_layout Plain Layout
7862 , associated with the \SpecialChar LaTeX
7864 \begin_inset Flex Code
7867 \begin_layout Plain Layout
7874 \begin_inset Quotes eld
7877 Article (with My Own Headings)
7878 \begin_inset Quotes erd
7882 If your text class depends on several packages, you can declare it as:
7885 \begin_layout LyX-Code
7888 #% Do not delete the line below; configure depends on this
7891 \begin_layout LyX-Code
7896 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
7899 \begin_layout LyX-Code
7904 DeclareCategory{Articles}
7907 \begin_layout Standard
7908 This indicates that your text class uses the
7909 \begin_inset Flex Code
7912 \begin_layout Plain Layout
7919 Finally, it is also possible to declare classes for DocBook code.
7920 Typical declarations will look like:
7923 \begin_layout LyX-Code
7926 #% Do not delete the line below; configure depends on this
7929 \begin_layout LyX-Code
7934 DeclareDocBookClass[article]{SGML (DocBook Article)}
7937 \begin_layout LyX-Code
7942 DeclareCategory{Articles (DocBook)}
7945 \begin_layout Standard
7946 Note that these declarations can also be given an optional parameter declaring
7947 the name of the document class (but not a list).
7950 \begin_layout Standard
7951 So, to be as explicit as possible, the form of the layout declaration is:
7954 \begin_layout LyX-Code
7959 DeclareLaTeXClass[class,package.sty]{layout description}
7962 \begin_layout LyX-Code
7967 DeclareCategory{category}
7970 \begin_layout Standard
7971 The class need only be specified if the name of the \SpecialChar LaTeX
7973 name of the layout file are different or if there are packages to load.
7974 If the name of the class file is not specified, then \SpecialChar LyX
7976 that it is the same as the name of the layout file.
7979 \begin_layout Standard
7980 When the text class has been modified to your taste, all you have to do
7981 is to copy it either to
7982 \begin_inset Flex Code
7985 \begin_layout Plain Layout
7992 \begin_inset Flex Code
7995 \begin_layout Plain Layout
8002 \begin_inset Flex Noun
8005 \begin_layout Plain Layout
8006 Tools\SpecialChar menuseparator
8012 , exit \SpecialChar LyX
8014 Then your new text class should be available along with the others.
8017 \begin_layout Standard
8018 Once the layout file is installed, you can edit it and see your changes
8019 without having to reconfigure or to restart \SpecialChar LyX
8025 \begin_layout Plain Layout
8026 In versions of \SpecialChar LyX
8027 prior to 1.6, this was not true.
8028 As a result, editing layout files was very time consuming, since you had
8029 constantly to restart \SpecialChar LyX
8035 You can force a reload of the current layout by using the \SpecialChar LyX
8037 \begin_inset Flex Noun
8040 \begin_layout Plain Layout
8047 There is no default binding for this function—though, of course, you can
8048 bind it to a key yourself.
8049 But you will normally use this function simply by entering it in the mini-buffe
8054 \begin_layout Standard
8060 \begin_inset Flex Noun
8063 \begin_layout Plain Layout
8069 is very much an `advanced feature'.
8074 recommended that you save your work before using this function.
8079 recommended that you not attempt to edit layout information while simultaneousl
8080 y working on a document that you care about.
8081 Use a test document.
8082 Syntax errors and the like in your layout file could cause peculiar behavior.
8083 In particular, such errors could cause \SpecialChar LyX
8084 to regard the current layout as
8085 invalid and to attempt to switch to some other layout.
8089 \begin_layout Plain Layout
8090 Really bad syntax errors may even caused \SpecialChar LyX
8092 This is because certain sorts of errors may make \SpecialChar LyX
8103 The \SpecialChar LyX
8104 team strives to keep \SpecialChar LyX
8105 stable in such situations, but safe is better
8110 \begin_layout Plain Layout
8111 While we're giving advice: make regular backups.
8112 And be nice to your mother.
8120 \begin_layout Subsection
8121 The Module declaration
8124 \begin_layout Standard
8125 A module must begin with a line like the following:
8128 \begin_layout LyX-Code
8131 DeclareLyXModule[endnotes.sty]{Endnotes}
8134 \begin_layout Standard
8135 The mandatory argument, in curly brackets, is the name of the module, as
8137 \begin_inset Flex Noun
8140 \begin_layout Plain Layout
8141 Document\SpecialChar menuseparator
8142 Settings\SpecialChar menuseparator
8149 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8151 on which the module depends.
8152 It is also possible to use the form
8153 \begin_inset Flex Noun
8156 \begin_layout Plain Layout
8162 as an optional argument, which declares that the module can only be used
8163 when there exists a conversion chain between the formats `
8164 \begin_inset Flex Code
8167 \begin_layout Plain Layout
8174 \begin_inset Flex Code
8177 \begin_layout Plain Layout
8186 \begin_layout Standard
8187 The module declaration should then be followed by lines like the following
8191 \begin_layout Plain Layout
8192 Preferably in English if the module should be published with \SpecialChar LyX
8194 This description will appear in the list of messages to be translated and
8195 will be thus translated with the next interface update.
8203 \begin_layout LyX-Code
8207 \begin_layout LyX-Code
8208 #Adds an endnote command, in addition to footnotes.
8212 \begin_layout LyX-Code
8213 #You will need to add
8215 theendnotes in TeX code where you
8218 \begin_layout LyX-Code
8219 #want the endnotes to appear.
8223 \begin_layout LyX-Code
8227 \begin_layout LyX-Code
8228 #Requires: somemodule | othermodule
8231 \begin_layout LyX-Code
8232 #Excludes: badmodule
8235 \begin_layout Standard
8236 The description is used in
8237 \begin_inset Flex Noun
8240 \begin_layout Plain Layout
8241 Document\SpecialChar menuseparator
8242 Settings\SpecialChar menuseparator
8248 to provide the user with information about what the module does.
8250 \begin_inset Flex Code
8253 \begin_layout Plain Layout
8259 line is used to identify other modules with which this one must be used;
8261 \begin_inset Flex Code
8264 \begin_layout Plain Layout
8270 line is used to identify modules with which this one may not be used.
8271 Both are optional, and, as shown, multiple modules should be separated
8272 with the pipe symbol: |.
8273 Note that the required modules are treated disjunctively:
8277 of the required modules must be used.
8282 excluded module may be used.
8283 Note that modules are identified here by their filenames without the
8284 \begin_inset Flex Code
8287 \begin_layout Plain Layout
8295 \begin_inset Flex Code
8298 \begin_layout Plain Layout
8305 \begin_inset Flex Code
8308 \begin_layout Plain Layout
8317 \begin_layout Subsection
8321 \begin_layout Standard
8322 The first non-comment line of any layout file, included file, or module
8327 contain the file format number:
8330 \begin_layout Description
8331 \begin_inset Flex Code
8334 \begin_layout Plain Layout
8341 \begin_inset Flex Code
8344 \begin_layout Plain Layout
8350 ] The format number of the layout file.
8353 \begin_layout Standard
8354 This tag was introduced with \SpecialChar LyX
8356 \begin_inset space ~
8360 Layout files from older \SpecialChar LyX
8361 versions do not have an explicit file format and
8362 are considered to have
8363 \begin_inset Flex Code
8366 \begin_layout Plain Layout
8368 \begin_inset space ~
8377 The format for the present version of \SpecialChar LyX
8379 But each version of \SpecialChar LyX
8380 is capable of reading earlier versions' layout files,
8381 just as they are capable of reading files produced by earlier versions
8384 There is, however, no provision for converting to earlier formats.
8387 \begin_layout Subsection
8388 \begin_inset CommandInset label
8390 name "subsec:General-text-class"
8394 General text class parameters
8397 \begin_layout Standard
8398 These are general parameters that govern the behavior of an entire document
8404 mean that they must appear in
8405 \begin_inset Flex Code
8408 \begin_layout Plain Layout
8414 files rather than in modules.
8415 A module can contain any layout tag.)
8418 \begin_layout Description
8419 \begin_inset Flex Code
8422 \begin_layout Plain Layout
8428 Adds information that will be output in the
8429 \begin_inset Flex Code
8432 \begin_layout Plain Layout
8438 block when the document is output to XHTML.
8439 Typically, this would be used to output CSS style information, but it can
8440 be used for anything that can appear in
8441 \begin_inset Flex Code
8444 \begin_layout Plain Layout
8452 \begin_inset Quotes eld
8456 \begin_inset Flex Code
8459 \begin_layout Plain Layout
8466 \begin_inset Quotes erd
8472 \begin_layout Description
8473 \begin_inset Flex Code
8476 \begin_layout Plain Layout
8482 Adds information to the document preamble.
8484 \begin_inset Newline newline
8488 \begin_inset Quotes eld
8492 \begin_inset Flex Code
8495 \begin_layout Plain Layout
8502 \begin_inset Quotes erd
8508 \begin_layout Description
8509 \begin_inset Flex Code
8512 \begin_layout Plain Layout
8518 Defines formats for use in the display of bibliographic information.
8520 \begin_inset CommandInset ref
8522 reference "subsec:Citation-format-description"
8528 \begin_inset Quotes eld
8532 \begin_inset Flex Code
8535 \begin_layout Plain Layout
8542 \begin_inset Quotes erd
8548 \begin_layout Description
8549 \begin_inset Flex Code
8552 \begin_layout Plain Layout
8558 Describes various global options supported by the document class.
8560 \begin_inset CommandInset ref
8562 reference "subsec:ClassOptions"
8568 \begin_inset Quotes eld
8572 \begin_inset Flex Code
8575 \begin_layout Plain Layout
8582 \begin_inset Quotes erd
8588 \begin_layout Description
8589 \begin_inset Flex Code
8592 \begin_layout Plain Layout
8599 \begin_inset Flex Code
8602 \begin_layout Plain Layout
8611 \begin_inset space \thinspace{}
8615 \begin_inset Flex Code
8618 \begin_layout Plain Layout
8624 ] Whether the class should
8628 to having one or two columns.
8629 Can be changed in the
8630 \begin_inset Flex Noun
8633 \begin_layout Plain Layout
8634 Document\SpecialChar menuseparator
8643 \begin_layout Description
8644 \begin_inset Flex Code
8647 \begin_layout Plain Layout
8654 \begin_inset Flex Code
8657 \begin_layout Plain Layout
8663 ] This sequence defines the properties for a counter.
8664 If the counter does not yet exist, it is created; if it does exist, it
8667 \begin_inset Quotes eld
8671 \begin_inset Flex Code
8674 \begin_layout Plain Layout
8681 \begin_inset Quotes erd
8685 \begin_inset Newline newline
8689 \begin_inset CommandInset ref
8691 reference "subsec:Counters"
8695 for details on counters.
8698 \begin_layout Description
8699 \begin_inset Flex Code
8702 \begin_layout Plain Layout
8708 Sets the default font used to display the document.
8710 \begin_inset CommandInset ref
8712 reference "subsec:Font-description"
8716 for how to declare fonts.
8718 \begin_inset Quotes eld
8722 \begin_inset Flex Code
8725 \begin_layout Plain Layout
8732 \begin_inset Quotes erd
8738 \begin_layout Description
8739 \begin_inset Flex Code
8742 \begin_layout Plain Layout
8749 \begin_inset Flex Code
8752 \begin_layout Plain Layout
8758 ] Specifies a module to be included by default with this document class.
8759 The module is specified as filename without the
8760 \begin_inset Flex Code
8763 \begin_layout Plain Layout
8770 The user can still remove the module, but it will be active at the outset.
8771 (This applies only when new files are created, or when this class is chosen
8772 for an existing document.)
8775 \begin_layout Description
8776 \begin_inset Flex Code
8779 \begin_layout Plain Layout
8786 \begin_inset Flex Code
8789 \begin_layout Plain Layout
8795 ] This is the style that will be assigned to new paragraphs, usually
8796 \begin_inset Flex Noun
8799 \begin_layout Plain Layout
8806 This will default to the first defined style if not given, but you are
8807 encouraged to use this directive.
8810 \begin_layout Description
8811 \begin_inset Flex Code
8814 \begin_layout Plain Layout
8821 \begin_inset Flex Code
8824 \begin_layout Plain Layout
8830 ] This tag indicates that the module (which is specified by filename without
8832 \begin_inset Flex Code
8835 \begin_layout Plain Layout
8841 extension) cannot be used with this document class.
8842 This might be used in a journal-specific layout file to prevent, say, the
8844 \begin_inset Flex Code
8847 \begin_layout Plain Layout
8853 module that numbers theorems by section.
8858 be used in a module.
8859 Modules have their own way of excluding other modules (see
8860 \begin_inset CommandInset ref
8862 reference "subsec:Layout-modules"
8869 \begin_layout Description
8870 \begin_inset Flex Code
8873 \begin_layout Plain Layout
8879 Defines a new float.
8881 \begin_inset CommandInset ref
8883 reference "subsec:Floats"
8889 \begin_inset Quotes eld
8893 \begin_inset Flex Code
8896 \begin_layout Plain Layout
8903 \begin_inset Quotes erd
8909 \begin_layout Description
8910 \begin_inset Flex Code
8913 \begin_layout Plain Layout
8919 Sets the information that will be output in the
8920 \begin_inset Flex Code
8923 \begin_layout Plain Layout
8929 block when this document class is output to XHTML.
8930 Note that this will completely override any prior
8931 \begin_inset Flex Code
8934 \begin_layout Plain Layout
8941 \begin_inset Flex Code
8944 \begin_layout Plain Layout
8952 \begin_inset Newline newline
8956 \begin_inset Flex Code
8959 \begin_layout Plain Layout
8965 if you just want to add material to the preamble.) Must end with
8966 \begin_inset Quotes eld
8970 \begin_inset Flex Code
8973 \begin_layout Plain Layout
8980 \begin_inset Quotes erd
8986 \begin_layout Description
8987 \begin_inset Flex Code
8990 \begin_layout Plain Layout
8997 \begin_inset Flex Code
9000 \begin_layout Plain Layout
9006 ] The style to use for the table of contents, bibliography, and so forth,
9007 when the document is output to HTML.
9008 For articles, this should normally be
9009 \begin_inset Flex Code
9012 \begin_layout Plain Layout
9019 \begin_inset Flex Code
9022 \begin_layout Plain Layout
9029 If it is not given, then \SpecialChar LyX
9030 will attempt to figure out which layout to use.
9033 \begin_layout Description
9034 \begin_inset Flex Code
9037 \begin_layout Plain Layout
9044 \begin_inset Flex Code
9047 \begin_layout Plain Layout
9053 ] Modifies the properties of the given counter.
9054 If the counter does not exist, the statement is ignored.
9056 \begin_inset Quotes eld
9060 \begin_inset Flex Code
9063 \begin_layout Plain Layout
9070 \begin_inset Quotes erd
9074 \begin_inset Newline newline
9078 \begin_inset CommandInset ref
9080 reference "subsec:Counters"
9084 for details on counters.
9087 \begin_layout Description
9088 \begin_inset Flex Code
9091 \begin_layout Plain Layout
9098 \begin_inset Flex Code
9101 \begin_layout Plain Layout
9107 ] Modifies the properties of the given paragraph style.
9108 If the style does not exist, the statement is ignored.
9110 \begin_inset Quotes eld
9114 \begin_inset Flex Code
9117 \begin_layout Plain Layout
9124 \begin_inset Quotes erd
9130 \begin_layout Description
9131 \begin_inset Flex Code
9134 \begin_layout Plain Layout
9141 \begin_inset Flex Code
9144 \begin_layout Plain Layout
9150 ] This allows you to include another layout definition file within yours
9151 to avoid duplicating commands.
9152 Common examples are the standard layout files, for example,
9153 \begin_inset Flex Code
9156 \begin_layout Plain Layout
9162 , which contains most of the basic layouts.
9165 \begin_layout Description
9166 \begin_inset Flex Code
9169 \begin_layout Plain Layout
9176 \begin_inset Flex Code
9179 \begin_layout Plain Layout
9185 ] This section (re-)defines the layout of an inset.
9186 It can be applied to an existing inset or to a new, user-defined inset,
9187 e.g., a new character style.
9189 \begin_inset Quotes eld
9193 \begin_inset Flex Code
9196 \begin_layout Plain Layout
9203 \begin_inset Quotes erd
9207 \begin_inset Newline newline
9211 \begin_inset CommandInset ref
9213 reference "subsec:Flex-insets-and"
9217 for more information.
9221 \begin_layout Description
9222 \begin_inset Flex Code
9225 \begin_layout Plain Layout
9232 \begin_inset Flex Code
9235 \begin_layout Plain Layout
9241 ] A string that indicates the width of the left margin on the screen, for
9243 \begin_inset Quotes eld
9247 \begin_inset Flex Code
9250 \begin_layout Plain Layout
9257 \begin_inset Quotes erd
9261 (Note that this is not a `length', like
9262 \begin_inset Quotes eld
9266 \begin_inset Quotes erd
9272 \begin_layout Description
9273 \begin_inset Flex Code
9276 \begin_layout Plain Layout
9283 \begin_inset Flex Code
9286 \begin_layout Plain Layout
9292 ] Deletes an existing counter, usually one defined in an included file.
9295 \begin_layout Description
9296 \begin_inset Flex Code
9299 \begin_layout Plain Layout
9306 \begin_inset Flex Code
9309 \begin_layout Plain Layout
9315 ] Deletes an existing float.
9316 This is particularly useful when you want to suppress a float that has
9317 been defined in an input 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 style.
9343 \begin_layout Description
9344 \begin_inset Flex Code
9347 \begin_layout Plain Layout
9354 \begin_inset Flex Code
9357 \begin_layout Plain Layout
9363 ] The file format (as defined in the \SpecialChar LyX
9364 preferences) produced by this document
9366 It is mainly useful when
9367 \begin_inset Flex Code
9370 \begin_layout Plain Layout
9377 \begin_inset Flex Code
9380 \begin_layout Plain Layout
9386 and one wants to define a new type of literate document.
9387 The format is reset to
9388 \begin_inset Quotes eld
9392 \begin_inset Flex Code
9395 \begin_layout Plain Layout
9402 \begin_inset Quotes erd
9406 \begin_inset Quotes eld
9410 \begin_inset Flex Code
9413 \begin_layout Plain Layout
9420 \begin_inset Quotes erd
9423 when the corresponding
9424 \begin_inset Flex Code
9427 \begin_layout Plain Layout
9433 parameter is encountered.
9436 \begin_layout Description
9437 \begin_inset Flex Code
9440 \begin_layout Plain Layout
9447 \begin_inset Flex Code
9450 \begin_layout Plain Layout
9461 \begin_inset Flex Code
9464 \begin_layout Plain Layout
9471 \begin_inset Flex Code
9474 \begin_layout Plain Layout
9480 ] Specifies what sort of output documents using this class will produce.
9483 \begin_layout Description
9484 \begin_inset Flex Code
9487 \begin_layout Plain Layout
9494 \begin_inset Flex Code
9497 \begin_layout Plain Layout
9504 \begin_inset Flex Code
9507 \begin_layout Plain Layout
9513 ] Specifies options, given in the second string, for the package named by
9516 \begin_inset Quotes eld
9520 \begin_inset Flex Code
9523 \begin_layout Plain Layout
9524 PackageOptions natbib square
9530 \begin_inset Quotes erd
9534 \begin_inset Flex Code
9537 \begin_layout Plain Layout
9543 to be loaded with the
9544 \begin_inset Flex Code
9547 \begin_layout Plain Layout
9554 (For \SpecialChar TeX
9555 perts, this causes \SpecialChar LyX
9557 \begin_inset Flex Code
9560 \begin_layout Plain Layout
9563 PassOptionsToPackage{natbib}{square}
9569 \begin_inset Flex Code
9572 \begin_layout Plain Layout
9581 \begin_layout Description
9582 \begin_inset Flex Code
9585 \begin_layout Plain Layout
9592 \begin_inset Flex Code
9595 \begin_layout Plain Layout
9604 \begin_inset Flex Code
9607 \begin_layout Plain Layout
9614 \begin_inset Flex Code
9617 \begin_layout Plain Layout
9623 ] The default pagestyle.
9624 Can be changed in the
9625 \begin_inset Flex Noun
9628 \begin_layout Plain Layout
9629 Document\SpecialChar menuseparator
9638 \begin_layout Description
9639 \begin_inset Flex Code
9642 \begin_layout Plain Layout
9648 Sets the preamble for the \SpecialChar LaTeX
9650 Note that this will completely override any prior
9651 \begin_inset Flex Code
9654 \begin_layout Plain Layout
9661 \begin_inset Flex Code
9664 \begin_layout Plain Layout
9672 \begin_inset Flex Code
9675 \begin_layout Plain Layout
9681 if you just want to add material to the preamble.) Must end with
9682 \begin_inset Quotes eld
9686 \begin_inset Flex Code
9689 \begin_layout Plain Layout
9696 \begin_inset Quotes erd
9702 \begin_layout Description
9703 \begin_inset Flex Code
9706 \begin_layout Plain Layout
9713 \begin_inset Flex Code
9716 \begin_layout Plain Layout
9723 \begin_inset Flex Code
9726 \begin_layout Plain Layout
9735 \begin_inset space \thinspace{}
9739 \begin_inset Flex Code
9742 \begin_layout Plain Layout
9748 ] Whether the class already provides the feature
9749 \begin_inset Flex Code
9752 \begin_layout Plain Layout
9759 A feature is in general the name of a package (e.
9760 \begin_inset space \thinspace{}
9764 \begin_inset space \space{}
9768 \begin_inset Flex Code
9771 \begin_layout Plain Layout
9778 \begin_inset Flex Code
9781 \begin_layout Plain Layout
9788 \begin_inset space \thinspace{}
9792 \begin_inset space \space{}
9796 \begin_inset Flex Code
9799 \begin_layout Plain Layout
9806 \begin_inset Flex Code
9809 \begin_layout Plain Layout
9817 \begin_inset CommandInset ref
9819 reference "chap:List-of-functions"
9823 for the list of features.
9826 \begin_layout Description
9827 \begin_inset Flex Code
9830 \begin_layout Plain Layout
9837 \begin_inset Flex Code
9840 \begin_layout Plain Layout
9846 ] Indicates that this layout provides the functionality of the module mentioned,
9847 which should be specified by the filename without the
9848 \begin_inset Flex Code
9851 \begin_layout Plain Layout
9858 This will typically be used if the layout includes the module directly,
9859 rather than using the
9860 \begin_inset Flex Code
9863 \begin_layout Plain Layout
9869 tag to indicate that it ought to be used.
9870 It could also be used in a module that provided an alternate implementation
9871 of the same functionality.
9874 \begin_layout Description
9875 \begin_inset Flex Code
9878 \begin_layout Plain Layout
9885 \begin_inset Flex Code
9888 \begin_layout Plain Layout
9894 ] Whether the class requires the feature
9895 \begin_inset Flex Code
9898 \begin_layout Plain Layout
9905 Multiple features must be separated by commas.
9906 Note that you can only request supported features.
9908 \begin_inset CommandInset ref
9910 reference "chap:List-of-functions"
9914 for the list of features.).
9915 If you require a package with specific options, you can additionally use
9917 \begin_inset Flex Code
9920 \begin_layout Plain Layout
9929 \begin_layout Description
9930 \begin_inset Flex Code
9933 \begin_layout Plain Layout
9940 \begin_inset Flex Code
9943 \begin_layout Plain Layout
9949 ] A string that indicates the width of the right margin on the screen, for
9951 \begin_inset Quotes eld
9955 \begin_inset Flex Code
9958 \begin_layout Plain Layout
9965 \begin_inset Quotes erd
9971 \begin_layout Description
9972 \begin_inset Flex Code
9975 \begin_layout Plain Layout
9982 \begin_inset Flex Code
9985 \begin_layout Plain Layout
9991 ] Sets which divisions get numbered.
9993 \begin_inset Newline newline
9997 \begin_inset Flex Code
10000 \begin_layout Plain Layout
10006 counter in \SpecialChar LaTeX
10010 \begin_layout Description
10011 \begin_inset Flex Code
10014 \begin_layout Plain Layout
10021 \begin_inset Flex Code
10024 \begin_layout Plain Layout
10033 \begin_inset space \thinspace{}
10037 \begin_inset Flex Code
10040 \begin_layout Plain Layout
10046 ] Whether the class-default should be printing on one or both sides of the
10048 Can be changed in the
10049 \begin_inset Flex Noun
10052 \begin_layout Plain Layout
10053 Document\SpecialChar menuseparator
10062 \begin_layout Description
10063 \begin_inset Flex Code
10066 \begin_layout Plain Layout
10073 \begin_inset Flex Code
10076 \begin_layout Plain Layout
10082 ] This sequence defines a paragraph style.
10083 If the style does not yet exist, it is created; if it does exist, its parameter
10086 \begin_inset Quotes eld
10090 \begin_inset Flex Code
10093 \begin_layout Plain Layout
10100 \begin_inset Quotes erd
10104 \begin_inset Newline newline
10108 \begin_inset CommandInset ref
10110 reference "subsec:Paragraph-Styles"
10114 for details on paragraph styles.
10117 \begin_layout Description
10118 \begin_inset Flex Code
10121 \begin_layout Plain Layout
10128 \begin_inset Flex Code
10131 \begin_layout Plain Layout
10137 ] The name of the command or environment to be used with
10138 \begin_inset Flex Code
10141 \begin_layout Plain Layout
10150 \begin_layout Description
10151 \begin_inset Flex Code
10154 \begin_layout Plain Layout
10161 \begin_inset Flex Code
10164 \begin_layout Plain Layout
10173 \begin_inset Flex Code
10176 \begin_layout Plain Layout
10182 ] Indicates what kind of markup is used to define the title of a document.
10184 \begin_inset Flex Code
10187 \begin_layout Plain Layout
10193 means that the macro with name
10194 \begin_inset Flex Code
10197 \begin_layout Plain Layout
10203 will be inserted after the last layout which has
10204 \begin_inset Quotes eld
10208 \begin_inset Flex Code
10211 \begin_layout Plain Layout
10213 \begin_inset space ~
10222 \begin_inset Quotes erd
10227 \begin_inset Flex Code
10230 \begin_layout Plain Layout
10236 corresponds to the case where all layouts which have
10237 \begin_inset Quotes eld
10241 \begin_inset Flex Code
10244 \begin_layout Plain Layout
10246 \begin_inset space ~
10255 \begin_inset Quotes erd
10258 should be enclosed into the
10259 \begin_inset Flex Code
10262 \begin_layout Plain Layout
10271 \begin_layout Description
10272 \begin_inset Flex Code
10275 \begin_layout Plain Layout
10282 \begin_inset Flex Code
10285 \begin_layout Plain Layout
10291 ] Sets which divisions are included in the table of contents.
10293 \begin_inset Flex Code
10296 \begin_layout Plain Layout
10302 counter in \SpecialChar LaTeX
10306 \begin_layout Subsection
10307 \begin_inset Flex Code
10310 \begin_layout Plain Layout
10317 \begin_inset CommandInset label
10319 name "subsec:ClassOptions"
10326 \begin_layout Standard
10328 \begin_inset Flex Code
10331 \begin_layout Plain Layout
10337 section can contain the following entries:
10340 \begin_layout Description
10341 \begin_inset Flex Code
10344 \begin_layout Plain Layout
10351 \begin_inset Flex Code
10354 \begin_layout Plain Layout
10360 ] The list of available font sizes for the document's main font, separated
10362 \begin_inset Quotes eld
10366 \begin_inset Flex Code
10369 \begin_layout Plain Layout
10376 \begin_inset Quotes erd
10382 \begin_layout Description
10383 \begin_inset Flex Code
10386 \begin_layout Plain Layout
10392 Used to set the DTD line with XML-based output classes.
10394 \begin_inset space \thinspace{}
10398 \begin_inset Quotes eld
10401 -//OASIS//DTD DocBook V4.2//EN
10402 \begin_inset Quotes erd
10408 \begin_layout Description
10409 \begin_inset Flex Code
10412 \begin_layout Plain Layout
10419 \begin_inset Flex Code
10422 \begin_layout Plain Layout
10423 string="empty|plain|headings|fancy"
10428 ] The list of available page sty\SpecialChar softhyphen
10430 \begin_inset Quotes eld
10434 \begin_inset Flex Code
10437 \begin_layout Plain Layout
10444 \begin_inset Quotes erd
10450 \begin_layout Description
10451 \begin_inset Flex Code
10454 \begin_layout Plain Layout
10461 \begin_inset Flex Code
10464 \begin_layout Plain Layout
10470 ] Some document class options, separated by a comma, that will be added
10471 to the optional part of the
10472 \begin_inset Flex Code
10475 \begin_layout Plain Layout
10486 \begin_layout Standard
10488 \begin_inset Flex Code
10491 \begin_layout Plain Layout
10497 section must end with
10498 \begin_inset Quotes eld
10502 \begin_inset Flex Code
10505 \begin_layout Plain Layout
10512 \begin_inset Quotes erd
10518 \begin_layout Subsection
10520 \begin_inset CommandInset label
10522 name "subsec:Paragraph-Styles"
10529 \begin_layout Standard
10530 A paragraph style description looks like this:
10534 \begin_layout Plain Layout
10535 Note that this will either define a new style or modify an existing one.
10543 \begin_layout LyX-Code
10550 \begin_layout LyX-Code
10554 \begin_layout LyX-Code
10558 \begin_layout Standard
10559 where the following commands are allowed:
10562 \begin_layout Description
10563 \begin_inset Flex Code
10566 \begin_layout Plain Layout
10573 \begin_inset Flex Code
10576 \begin_layout Plain Layout
10581 , left, right, center
10586 ] Paragraph alignment.
10589 \begin_layout Description
10590 \begin_inset Flex Code
10593 \begin_layout Plain Layout
10600 \begin_inset Flex Code
10603 \begin_layout Plain Layout
10608 , left, right, center
10613 ] A comma separated list of permitted alignments.
10614 (Some \SpecialChar LaTeX
10615 styles prohibit certain alignments, since those wouldn't make sense.
10616 For example a right-aligned or centered enumeration isn't possible.)
10619 \begin_layout Description
10620 \begin_inset Flex Code
10623 \begin_layout Plain Layout
10630 \begin_inset Flex Code
10633 \begin_layout Plain Layout
10639 ] Defines argument number <int> of a command\SpecialChar breakableslash
10640 environment associated with
10642 This is useful for things like section headings, and only makes sense with
10645 Every (optional or required) argument of a command or environment – except
10646 for the required argument that is associated with the content of the paragraph
10647 itself – has a separate definition, where the number specifies the order
10649 The definition must end with
10650 \begin_inset Flex Code
10653 \begin_layout Plain Layout
10660 So a command with two optional arguments has:
10661 \begin_inset Separator parbreak
10668 \begin_layout Quote
10674 \begin_layout Quote
10680 \begin_layout Quote
10686 \begin_layout Quote
10692 \begin_layout Quote
10698 \begin_layout Quote
10704 \begin_layout Standard
10706 \begin_inset Flex Code
10709 \begin_layout Plain Layout
10715 definition, the following specifications are possible:
10718 \begin_layout Itemize
10719 \begin_inset Flex Code
10722 \begin_layout Plain Layout
10729 \begin_inset Flex Code
10732 \begin_layout Plain Layout
10738 The string that will appear both in the menu (to insert this argument)
10739 and on the argument inset button (unless you also specify a separate
10740 \begin_inset Flex Code
10743 \begin_layout Plain Layout
10750 For the menu, you can define an accelerator by appending the respective
10751 character to the string, divided by
10752 \begin_inset Quotes eld
10756 \begin_inset Quotes erd
10760 \begin_inset space \thinspace{}
10764 \begin_inset space \space{}
10768 \begin_inset Quotes eld
10772 \begin_inset Flex Code
10775 \begin_layout Plain Layout
10782 \begin_inset Quotes erd
10788 \begin_layout Itemize
10789 \begin_inset Flex Code
10792 \begin_layout Plain Layout
10799 \begin_inset Flex Code
10802 \begin_layout Plain Layout
10808 A separate string for the menu.
10809 You can define an accelerator by appending the respective character to
10810 the string, divided by
10811 \begin_inset Quotes eld
10815 \begin_inset Quotes erd
10819 \begin_inset space \thinspace{}
10823 \begin_inset space \space{}
10827 \begin_inset Quotes eld
10831 \begin_inset Flex Code
10834 \begin_layout Plain Layout
10841 \begin_inset Quotes erd
10845 This specification is optional.
10846 If it is not given the
10847 \begin_inset Flex Code
10850 \begin_layout Plain Layout
10856 will be used instead for the menu.
10859 \begin_layout Itemize
10860 \begin_inset Flex Code
10863 \begin_layout Plain Layout
10870 \begin_inset Flex Code
10873 \begin_layout Plain Layout
10879 A longer explanatory text that appears in the tooltip when hovering over
10880 the argument inset.
10883 \begin_layout Itemize
10884 \begin_inset Flex Code
10887 \begin_layout Plain Layout
10894 \begin_inset Flex Code
10897 \begin_layout Plain Layout
10906 \begin_inset space \thinspace{}
10910 \begin_inset Flex Code
10913 \begin_layout Plain Layout
10919 ] Declare if this is a mandatory (1) or an optional (0) argument.
10920 Mandatory arguments will be output empty if not given, while optional arguments
10921 will not be output at all.
10922 By default, mandatory arguments are delimited by
10923 \begin_inset Flex Code
10926 \begin_layout Plain Layout
10932 , while optional arguments are delimited by
10933 \begin_inset Flex Code
10936 \begin_layout Plain Layout
10945 \begin_layout Itemize
10946 \begin_inset Flex Code
10949 \begin_layout Plain Layout
10956 \begin_inset Flex Code
10959 \begin_layout Plain Layout
10965 defines another argument (by its number) which this argument requires to
10966 be output if it is itself output.
10968 \begin_inset space \thinspace{}
10971 g., in \SpecialChar LaTeX
10972 commands, optional arguments often require previous optional arguments
10973 to be output (at least empty), as in
10974 \begin_inset Flex Code
10977 \begin_layout Plain Layout
10980 command[][argument]{text}
10986 This can be achieved by the statement
10987 \begin_inset Flex Code
10990 \begin_layout Plain Layout
10997 \begin_inset Flex Code
11000 \begin_layout Plain Layout
11009 \begin_layout Itemize
11010 \begin_inset Flex Code
11013 \begin_layout Plain Layout
11020 \begin_inset Flex Code
11023 \begin_layout Plain Layout
11029 defines a custom left delimiter (instead of
11030 \begin_inset Flex Code
11033 \begin_layout Plain Layout
11040 \begin_inset Flex Code
11043 \begin_layout Plain Layout
11050 A line break in the output can be indicated by
11051 \begin_inset Flex Code
11054 \begin_layout Plain Layout
11063 \begin_layout Itemize
11064 \begin_inset Flex Code
11067 \begin_layout Plain Layout
11074 \begin_inset Flex Code
11077 \begin_layout Plain Layout
11083 defines a custom right delimiter (instead of
11084 \begin_inset Flex Code
11087 \begin_layout Plain Layout
11094 \begin_inset Flex Code
11097 \begin_layout Plain Layout
11104 A line break in the output can be indicated by
11105 \begin_inset Flex Code
11108 \begin_layout Plain Layout
11117 \begin_layout Itemize
11118 \begin_inset Flex Code
11121 \begin_layout Plain Layout
11128 \begin_inset Flex Code
11131 \begin_layout Plain Layout
11137 defines an argument that is inserted if and only if no user-specified arguments
11139 \begin_inset space \thinspace{}
11143 \begin_inset space \space{}
11146 if no argument inset has been inserted (note that also an empty argument
11147 inset omits the DefaultArg).
11148 Multiple arguments need to be separated by comma.
11151 \begin_layout Itemize
11152 \begin_inset Flex Code
11155 \begin_layout Plain Layout
11162 \begin_inset Flex Code
11165 \begin_layout Plain Layout
11171 defines an argument that is inserted in any case (alone or in addition
11172 to user-specified arguments).
11173 Multiple arguments need to be separated by comma.
11176 \begin_layout Itemize
11177 \begin_inset Flex Code
11180 \begin_layout Plain Layout
11186 The font used for the argument content, see
11187 \begin_inset CommandInset ref
11189 reference "subsec:Font-description"
11196 \begin_layout Itemize
11197 \begin_inset Flex Code
11200 \begin_layout Plain Layout
11206 The font used for the label; see
11207 \begin_inset CommandInset ref
11209 reference "subsec:Font-description"
11216 \begin_layout Itemize
11217 \begin_inset Flex Code
11220 \begin_layout Plain Layout
11227 \begin_inset Flex Code
11230 \begin_layout Plain Layout
11235 , Minimalistic, Conglomerate
11240 ] describes the rendering style used for the inset's frame and buttons.
11243 \begin_layout Itemize
11244 \begin_inset Flex Code
11247 \begin_layout Plain Layout
11254 \begin_inset Flex Code
11257 \begin_layout Plain Layout
11264 \begin_inset Flex Code
11267 \begin_layout Plain Layout
11273 , this argument is automatically inserted when the respective style is selected.
11274 Currently, only one argument per style\SpecialChar breakableslash
11275 layout can be automatically inserted.
11278 \begin_layout Itemize
11279 \begin_inset Flex Code
11282 \begin_layout Plain Layout
11289 \begin_inset Flex Code
11292 \begin_layout Plain Layout
11299 \begin_inset Flex Code
11302 \begin_layout Plain Layout
11308 , this argument will be inserted with a copy of the co-text (either selected
11309 text or the whole paragraph) as content.
11312 \begin_layout Itemize
11313 \begin_inset Flex Code
11316 \begin_layout Plain Layout
11323 \begin_inset Flex Code
11326 \begin_layout Plain Layout
11327 string of characters
11336 Defines individual characters that should be output in raw form, meaning
11337 without special translations that \SpecialChar LaTeX
11339 Note that, contrary to PassThru, this needs to be explicitly defined for
11341 That is, arguments do not inherit PassThruChars from their parent inset
11345 \begin_layout Standard
11346 By default, the text entered in the \SpecialChar LyX
11347 workarea in the respective layout is
11348 the last (mandatory) argument of a command if the
11349 \begin_inset Flex Code
11352 \begin_layout Plain Layout
11359 \begin_inset Flex Code
11362 \begin_layout Plain Layout
11369 However, arguments with the prefix
11370 \begin_inset Flex Code
11373 \begin_layout Plain Layout
11379 are output after this workarea argument.
11380 Note that post-argument numbering restarts at 1, so the first argument
11381 following the workarea argument is
11382 \begin_inset Flex Code
11385 \begin_layout Plain Layout
11392 Post-arguments are ignored in any other
11393 \begin_inset Flex Code
11396 \begin_layout Plain Layout
11403 \begin_inset Flex Code
11406 \begin_layout Plain Layout
11415 \begin_layout Standard
11417 \begin_inset Flex Code
11420 \begin_layout Plain Layout
11429 \begin_inset Flex Code
11432 \begin_layout Plain Layout
11441 \begin_inset Flex Code
11444 \begin_layout Plain Layout
11450 followed by the number (e.
11451 \begin_inset space \thinspace{}
11455 \begin_inset space \space{}
11459 \begin_inset Flex Code
11462 \begin_layout Plain Layout
11472 \begin_layout Description
11473 \begin_inset Flex Code
11476 \begin_layout Plain Layout
11482 Note that this will completely override any prior
11483 \begin_inset Flex Code
11486 \begin_layout Plain Layout
11492 declaration for this style.
11494 \begin_inset Quotes eld
11498 \begin_inset Flex Code
11501 \begin_layout Plain Layout
11508 \begin_inset Quotes erd
11513 \begin_inset CommandInset ref
11515 reference "subsec:I18n"
11519 for details on its use.
11522 \begin_layout Description
11523 \begin_inset Flex Code
11526 \begin_layout Plain Layout
11533 \begin_inset Flex Code
11536 \begin_layout Plain Layout
11546 \begin_layout Plain Layout
11547 Note that a `float' here is a real number, such as: 1.5.
11552 The vertical space with which the last of a chain of paragraphs with this
11553 style is separated from the following paragraph.
11554 If the next paragraph has another style, the separations are not simply
11555 added, but the maximum is taken.
11558 \begin_layout Description
11559 \begin_inset Flex Code
11562 \begin_layout Plain Layout
11569 \begin_inset Flex Code
11572 \begin_layout Plain Layout
11578 ] The category for this style.
11579 This is used to group related styles in the style combobox on the toolbar.
11580 Any string can be used, but you may want to use existing categories with
11585 \begin_layout Description
11586 \begin_inset Flex Code
11589 \begin_layout Plain Layout
11595 Depth of XML command.
11596 Used only with XML-type formats.
11599 \begin_layout Description
11600 \begin_inset Flex Code
11603 \begin_layout Plain Layout
11610 \begin_inset Flex Code
11613 \begin_layout Plain Layout
11619 ] Copies all the features of an existing style into the current one.
11623 \begin_layout Description
11624 \begin_inset Flex Code
11627 \begin_layout Plain Layout
11634 \begin_inset Flex Code
11637 \begin_layout Plain Layout
11643 ] The name of a style whose preamble should be output
11648 This allows to ensure some ordering of the preamble snippets when macros
11649 definitions depend on one another.
11653 \begin_layout Plain Layout
11654 Note that, besides that functionality, there is no way to ensure any ordering
11656 The ordering that you see in a given version of \SpecialChar LyX
11657 may change without warning
11666 \begin_layout Description
11667 \begin_inset Flex Code
11670 \begin_layout Plain Layout
11677 \begin_inset Flex Code
11680 \begin_layout Plain Layout
11685 , Box, Filled_Box, Static
11690 ] The type of label that stands at the end of the paragraph (or sequence
11692 \begin_inset Flex Code
11695 \begin_layout Plain Layout
11702 \begin_inset Newline newline
11706 \begin_inset Flex Code
11709 \begin_layout Plain Layout
11716 \begin_inset Flex Code
11719 \begin_layout Plain Layout
11726 \begin_inset Flex Code
11729 \begin_layout Plain Layout
11737 \begin_inset Flex Code
11740 \begin_layout Plain Layout
11747 \begin_inset Quotes eld
11751 \begin_inset Quotes erd
11755 \begin_inset Flex Code
11758 \begin_layout Plain Layout
11765 \begin_inset space \space{}
11769 \begin_inset Flex Code
11772 \begin_layout Plain Layout
11778 ) is a white (resp.
11779 \begin_inset space ~
11782 black) square suitable for end of proof markers,
11783 \begin_inset Flex Code
11786 \begin_layout Plain Layout
11792 is an explicit text string.
11795 \begin_layout Description
11796 \begin_inset Flex Code
11799 \begin_layout Plain Layout
11806 \begin_inset Flex Code
11809 \begin_layout Plain Layout
11815 ] The string used for a label with a
11816 \begin_inset Flex Code
11819 \begin_layout Plain Layout
11826 \begin_inset Newline newline
11830 \begin_inset Flex Code
11833 \begin_layout Plain Layout
11843 \begin_layout Description
11844 \begin_inset Flex Code
11847 \begin_layout Plain Layout
11853 The font used for both the text body
11859 \begin_inset CommandInset ref
11861 reference "subsec:Font-description"
11866 Note that defining this font automatically defines the
11867 \begin_inset Flex Code
11870 \begin_layout Plain Layout
11877 So you should define this one first if you also want to define
11878 \begin_inset Flex Code
11881 \begin_layout Plain Layout
11890 \begin_layout Description
11891 \begin_inset Flex Code
11894 \begin_layout Plain Layout
11901 \begin_inset Flex Code
11904 \begin_layout Plain Layout
11910 ] Used for backporting new styles to stable \SpecialChar LyX
11912 The first stable version that supports this tag is \SpecialChar LyX
11914 The argument is a number which may either be 0, -1 or any value greater
11917 \begin_inset Flex Code
11920 \begin_layout Plain Layout
11926 flag of a style is greater than zero, it will always be written to the
11928 If a .lyx file is read, the style definitions from the document header are
11929 added to the document class.
11930 Therefore even older \SpecialChar LyX
11931 versions can handle the style.
11933 \begin_inset Flex Code
11936 \begin_layout Plain Layout
11942 is a version number: If the style is read, and the version number is less
11943 than the version number of the already existing style in the document class,
11944 the new style is ignored.
11945 If the version number is greater, the new style replaces the existing style.
11946 A value of -1 means an infinite version number, i.
11947 \begin_inset space \thinspace{}
11951 \begin_inset space \space{}
11954 the style is always used.
11957 \begin_layout Description
11958 \begin_inset Flex Code
11961 \begin_layout Plain Layout
11968 \begin_inset Flex Code
11971 \begin_layout Plain Layout
11980 \begin_inset space \thinspace{}
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11993 ] Usually \SpecialChar LyX
11994 does not allow you to insert more than one space between words,
11995 since a space is considered as the separation between two words, not a
11996 character or symbol of its own.
11997 This is a very fine thing but sometimes annoying, for example, when typing
11998 program code or plain \SpecialChar LaTeX
12001 \begin_inset Flex Code
12004 \begin_layout Plain Layout
12011 Note that \SpecialChar LyX
12012 will create protected blanks for the additional blanks when
12013 in another mode than \SpecialChar LaTeX
12017 \begin_layout Description
12018 \begin_inset Flex Code
12021 \begin_layout Plain Layout
12027 These tags are used with XHTML output.
12029 \begin_inset CommandInset ref
12031 reference "subsec:Paragraph-Style-XHTML"
12038 \begin_layout Description
12039 \begin_inset Flex Code
12042 \begin_layout Plain Layout
12048 [FIXME] (Used only with XML-type formats.)
12051 \begin_layout Description
12052 \begin_inset Flex Code
12055 \begin_layout Plain Layout
12062 \begin_inset Flex Code
12065 \begin_layout Plain Layout
12074 \begin_inset space \thinspace{}
12078 \begin_inset Flex Code
12081 \begin_layout Plain Layout
12088 \begin_inset Flex Code
12091 \begin_layout Plain Layout
12097 , marks the style as to be included in the document preamble and not in
12099 This is useful for document classes that want such information as the title
12100 and author to appear in the preamble.
12101 Note that this works only for styles for which the
12102 \begin_inset Flex Code
12105 \begin_layout Plain Layout
12112 \begin_inset Flex Code
12115 \begin_layout Plain Layout
12122 \begin_inset Flex Code
12125 \begin_layout Plain Layout
12134 \begin_layout Description
12135 \begin_inset Flex Code
12138 \begin_layout Plain Layout
12145 \begin_inset Flex Code
12148 \begin_layout Plain Layout
12157 \begin_inset space \thinspace{}
12161 \begin_inset Flex Code
12164 \begin_layout Plain Layout
12171 \begin_inset Flex Code
12174 \begin_layout Plain Layout
12180 , marks the style as being part of a title block (see also the
12181 \begin_inset Flex Code
12184 \begin_layout Plain Layout
12191 \begin_inset Flex Code
12194 \begin_layout Plain Layout
12203 \begin_layout Description
12204 \begin_inset Flex Code
12207 \begin_layout Plain Layout
12214 \begin_inset Flex Code
12217 \begin_layout Plain Layout
12223 ] The \SpecialChar LaTeX
12224 command sequence declaring an item in a list.
12225 The command is to be defined without the preceding backslash (the default
12227 \begin_inset Quotes eld
12231 \begin_inset Quotes erd
12235 \begin_inset Flex Code
12238 \begin_layout Plain Layout
12246 in the \SpecialChar LaTeX
12250 \begin_layout Description
12251 \begin_inset Flex Code
12254 \begin_layout Plain Layout
12261 \begin_inset Flex Code
12264 \begin_layout Plain Layout
12270 ] This provides extra space between paragraphs that have the same style.
12271 If you put other styles into an environment, each is separated with the
12273 \begin_inset Flex Code
12276 \begin_layout Plain Layout
12283 But the whole items of the environment are additionally separated with
12285 \begin_inset Flex Code
12288 \begin_layout Plain Layout
12295 Note that this is a
12300 \begin_layout Description
12301 \begin_inset Flex Code
12304 \begin_layout Plain Layout
12310 [FIXME] (Used only with XML-type formats.)
12313 \begin_layout Description
12314 \begin_inset Flex Code
12317 \begin_layout Plain Layout
12324 \begin_inset Flex Code
12327 \begin_layout Plain Layout
12336 \begin_inset space \thinspace{}
12340 \begin_inset Flex Code
12343 \begin_layout Plain Layout
12349 ] Usually \SpecialChar LyX
12350 does not allow you to leave a paragraph empty, since it would
12351 lead to empty \SpecialChar LaTeX
12353 There are some cases where this could be desirable however: in a letter
12354 template, the required fields can be provided as empty fields, so that
12355 people do not forget them; in some special classes, a style can be used
12356 as some kind of break, which does not contain actual text.
12359 \begin_layout Description
12360 \begin_inset Flex Code
12363 \begin_layout Plain Layout
12370 \begin_inset Flex Code
12373 \begin_layout Plain Layout
12379 ] The vertical space between the label and the text body.
12380 Only used for labels that are above the text body (
12381 \begin_inset Flex Code
12384 \begin_layout Plain Layout
12391 \begin_inset Newline newline
12395 \begin_inset Flex Code
12398 \begin_layout Plain Layout
12399 Centered_Top_Environment
12407 \begin_layout Description
12408 \begin_inset Flex Code
12411 \begin_layout Plain Layout
12418 \begin_inset Flex Code
12421 \begin_layout Plain Layout
12427 ] The name of the counter for automatic numbering.
12428 In order to have the counter appear with your label, you will need to reference
12430 \begin_inset Flex Code
12433 \begin_layout Plain Layout
12442 This will work with
12443 \begin_inset Flex Code
12446 \begin_layout Plain Layout
12453 \begin_inset Flex Code
12456 \begin_layout Plain Layout
12463 \begin_inset Flex Code
12466 \begin_layout Plain Layout
12473 \begin_inset Flex Code
12476 \begin_layout Plain Layout
12483 \begin_inset Newline newline
12491 \begin_inset Flex Code
12494 \begin_layout Plain Layout
12501 \begin_inset Flex Code
12504 \begin_layout Plain Layout
12510 , though this case is a bit complicated.
12511 Suppose you declare
12512 \begin_inset Quotes eld
12516 \begin_inset Flex Code
12519 \begin_layout Plain Layout
12520 LabelCounter myenum
12526 \begin_inset Quotes erd
12530 Then the actual counters used are
12531 \begin_inset Flex Code
12534 \begin_layout Plain Layout
12541 \begin_inset Flex Code
12544 \begin_layout Plain Layout
12551 \begin_inset Flex Code
12554 \begin_layout Plain Layout
12561 \begin_inset Flex Code
12564 \begin_layout Plain Layout
12570 , much as in \SpecialChar LaTeX
12572 These counters must all be declared separately.
12573 \begin_inset Newline newline
12577 \begin_inset CommandInset ref
12579 reference "subsec:Counters"
12583 for details on counters.
12586 \begin_layout Description
12587 \begin_inset Flex Code
12590 \begin_layout Plain Layout
12596 The font used for the label.
12598 \begin_inset CommandInset ref
12600 reference "subsec:Font-description"
12607 \begin_layout Description
12608 \begin_inset Flex Code
12611 \begin_layout Plain Layout
12618 \begin_inset Flex Code
12621 \begin_layout Plain Layout
12627 ] Text that indicates how far a label should be indented.
12630 \begin_layout Description
12631 \begin_inset Flex Code
12634 \begin_layout Plain Layout
12641 \begin_inset Flex Code
12644 \begin_layout Plain Layout
12650 ] Text that indicates the amount of horizontal space between the label and
12652 Only used for labels that are not above the text body.
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 ] The string used for the label.
12677 \begin_inset Flex Code
12680 \begin_layout Plain Layout
12686 is set, this string can be contain the special formatting commands described
12688 \begin_inset CommandInset ref
12690 reference "subsec:Counters"
12697 \begin_layout Description
12698 \begin_inset Flex Code
12701 \begin_layout Plain Layout
12702 LabelStringAppendix
12708 \begin_inset Flex Code
12711 \begin_layout Plain Layout
12717 ] This is used inside the appendix instead of
12718 \begin_inset Newline newline
12722 \begin_inset Flex Code
12725 \begin_layout Plain Layout
12733 \begin_inset Flex Code
12736 \begin_layout Plain Layout
12743 \begin_inset Newline newline
12747 \begin_inset Flex Code
12750 \begin_layout Plain Layout
12751 LabelStringAppendix
12759 \begin_layout Description
12760 \begin_inset Flex Code
12763 \begin_layout Plain Layout
12769 [FIXME] (Used only with XML-type formats.)
12772 \begin_layout Description
12773 \begin_inset Flex Code
12776 \begin_layout Plain Layout
12783 \begin_inset Flex Code
12786 \begin_layout Plain Layout
12791 , Manual, Static, Above,
12792 \begin_inset Newline newline
12795 Centered, Sensitive, Enumerate,
12796 \begin_inset Newline newline
12799 Itemize, Bibliography
12805 \begin_inset Separator parbreak
12812 \begin_layout Description
12813 \begin_inset Flex Code
12816 \begin_layout Plain Layout
12822 means the label is the very first word (up to the first real blank).
12823 Use protected spaces if you want more than one word as the label.
12827 \begin_layout Description
12828 \begin_inset Flex Code
12831 \begin_layout Plain Layout
12837 means the label is simply what is declared as
12838 \begin_inset Flex Code
12841 \begin_layout Plain Layout
12848 This will be displayed
12849 \begin_inset Quotes eld
12853 \begin_inset Quotes erd
12856 , at the beginning of the paragraph.
12858 \begin_inset Flex Code
12861 \begin_layout Plain Layout
12868 \begin_inset Flex Code
12871 \begin_layout Plain Layout
12877 , then it will be displayed only in the first paragraph of any sequence
12878 of paragraphs with the same
12879 \begin_inset Flex Code
12882 \begin_layout Plain Layout
12891 \begin_layout Description
12892 \begin_inset Flex Code
12895 \begin_layout Plain Layout
12902 \begin_inset space ~
12906 \begin_inset space ~
12910 \begin_inset Flex Code
12913 \begin_layout Plain Layout
12919 are special cases of
12920 \begin_inset Flex Code
12923 \begin_layout Plain Layout
12930 The label will be printed above the paragraph either at the beginning of
12931 the line or centered.
12934 \begin_layout Description
12935 \begin_inset Flex Code
12938 \begin_layout Plain Layout
12944 is a special case for the caption-labels
12945 \begin_inset Quotes eld
12949 \begin_inset Quotes erd
12953 \begin_inset Quotes eld
12957 \begin_inset Quotes erd
12961 \begin_inset Newline newline
12965 \begin_inset Flex Code
12968 \begin_layout Plain Layout
12974 means the (hardcoded) label string depends on the kind of float: It is
12975 hardcoded to be `FloatType N', where N is the value of the counter associated
12977 For the case that a caption is inserted outside of a float the
12978 \begin_inset Flex Code
12981 \begin_layout Plain Layout
12988 \begin_inset Quotes eld
12992 \begin_inset Quotes erd
12998 \begin_layout Description
12999 \begin_inset Flex Code
13002 \begin_layout Plain Layout
13008 produces the usual sort of enumeration labels.
13009 At present, it is hardcoded to use Arabic numerals, lowercase letters,
13010 small Roman numerals, and uppercase letters for the four possible depths.
13013 \begin_layout Description
13014 \begin_inset Flex Code
13017 \begin_layout Plain Layout
13023 produces various bullets at the different levels.
13024 It is also hardcoded.
13027 \begin_layout Description
13028 \begin_inset Flex Code
13031 \begin_layout Plain Layout
13037 should be used only with
13038 \begin_inset Flex Code
13041 \begin_layout Plain Layout
13042 LatexType BibEnvironment
13051 \begin_layout Description
13052 \begin_inset Flex Code
13055 \begin_layout Plain Layout
13061 Note that this will completely override any prior
13062 \begin_inset Flex Code
13065 \begin_layout Plain Layout
13071 declaration for this style.
13073 \begin_inset Quotes eld
13077 \begin_inset Flex Code
13080 \begin_layout Plain Layout
13087 \begin_inset Quotes erd
13092 \begin_inset CommandInset ref
13094 reference "subsec:I18n"
13098 for details on its use.
13101 \begin_layout Description
13102 \begin_inset Flex Code
13105 \begin_layout Plain Layout
13112 \begin_inset Flex Code
13115 \begin_layout Plain Layout
13121 ] The name of the corresponding \SpecialChar LaTeX
13123 Either the environment or command name.
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 ] An optional parameter for the corresponding
13147 \begin_inset Flex Code
13150 \begin_layout Plain Layout
13157 This parameter cannot be changed from within \SpecialChar LyX
13159 \begin_inset Flex Code
13162 \begin_layout Plain Layout
13168 for customizable parameters).
13169 This will be output as is after all \SpecialChar LaTeX
13171 \begin_inset Flex Code
13174 \begin_layout Plain Layout
13183 \begin_layout Description
13184 \begin_inset Flex Code
13187 \begin_layout Plain Layout
13194 \begin_inset Flex Code
13197 \begin_layout Plain Layout
13202 , Command, Environment, Item_Environment,
13203 \begin_inset Newline newline
13206 List_Environment, Bib_Environment
13211 ] How the style should be translated into \SpecialChar LaTeX
13216 \begin_layout Plain Layout
13217 \begin_inset Flex Code
13220 \begin_layout Plain Layout
13226 is perhaps a bit misleading, since these rules apply to SGML classes, too.
13227 Visit the SGML class files for specific examples.
13233 \begin_inset Separator parbreak
13240 \begin_layout Description
13241 \begin_inset Flex Code
13244 \begin_layout Plain Layout
13250 means nothing special.
13253 \begin_layout Description
13254 \begin_inset Flex Code
13257 \begin_layout Plain Layout
13264 \begin_inset Flex Code
13267 \begin_layout Plain Layout
13274 {\SpecialChar ldots
13283 \begin_layout Description
13284 \begin_inset Flex Code
13287 \begin_layout Plain Layout
13294 \begin_inset Flex Code
13297 \begin_layout Plain Layout
13304 }\SpecialChar ldots
13320 \begin_layout Description
13321 \begin_inset Flex Code
13324 \begin_layout Plain Layout
13331 \begin_inset Flex Code
13334 \begin_layout Plain Layout
13341 \begin_inset Flex Code
13344 \begin_layout Plain Layout
13352 is generated for each paragraph of this environment.
13356 \begin_layout Description
13357 \begin_inset Flex Code
13360 \begin_layout Plain Layout
13367 \begin_inset Flex Code
13370 \begin_layout Plain Layout
13377 \begin_inset Newline newline
13381 \begin_inset Flex Code
13384 \begin_layout Plain Layout
13390 is passed as an argument to the environment.
13391 \begin_inset Newline newline
13395 \begin_inset Flex Code
13398 \begin_layout Plain Layout
13404 can be defined in the
13405 \begin_inset Flex Noun
13408 \begin_layout Plain Layout
13409 Edit\SpecialChar menuseparator
13411 \begin_inset space ~
13422 \begin_layout Description
13423 \begin_inset Flex Code
13426 \begin_layout Plain Layout
13433 \begin_inset Flex Code
13436 \begin_layout Plain Layout
13442 but adds additionally the necessary mandatory argument (the longest label)
13443 to the begin statement of the bibliography environment:
13444 \begin_inset Newline newline
13448 \begin_inset Flex Code
13451 \begin_layout Plain Layout
13454 begin{thebibliography}{99}
13459 It is therefore only useful for bibliography environments.
13460 The default longest label
13461 \begin_inset Quotes eld
13465 \begin_inset Quotes erd
13468 can be changed by the user in the paragraph settings of a bibliography
13472 \begin_layout Standard
13473 Putting the last few things together, the \SpecialChar LaTeX
13474 output will be either:
13477 \begin_layout LyX-Code
13480 LatexName[LatexParam]{\SpecialChar ldots
13484 \begin_layout Standard
13488 \begin_layout LyX-Code
13491 begin{LatexName}[LatexParam] \SpecialChar ldots
13497 \begin_layout Standard
13498 depending upon the \SpecialChar LaTeX
13503 \begin_layout Description
13504 \begin_inset Flex Code
13507 \begin_layout Plain Layout
13514 \begin_inset Flex Code
13517 \begin_layout Plain Layout
13523 ] A string that is put at the beginning of the style content.
13524 A line break in the output can be indicated by
13525 \begin_inset Flex Code
13528 \begin_layout Plain Layout
13537 \begin_layout Description
13538 \begin_inset Flex Code
13541 \begin_layout Plain Layout
13548 \begin_inset Flex Code
13551 \begin_layout Plain Layout
13557 ] If you put styles into environments, the different
13558 \begin_inset Flex Code
13561 \begin_layout Plain Layout
13567 are not simply added, but added with a factor
13568 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
13572 Note that this parameter is also used when
13573 \begin_inset Flex Code
13576 \begin_layout Plain Layout
13583 \begin_inset Flex Code
13586 \begin_layout Plain Layout
13593 \begin_inset Flex Code
13596 \begin_layout Plain Layout
13603 Then it is added to the manual or dynamic margin.
13604 \begin_inset Newline newline
13608 \begin_inset Quotes eld
13612 \begin_inset Flex Code
13615 \begin_layout Plain Layout
13622 \begin_inset Quotes erd
13625 means that the paragraph is indented with the width of
13626 \begin_inset Quotes eld
13630 \begin_inset Flex Code
13633 \begin_layout Plain Layout
13640 \begin_inset Quotes erd
13643 in the normal font.
13644 You can get a negative width by prefixing the string with
13645 \begin_inset Quotes eld
13649 \begin_inset Flex Code
13652 \begin_layout Plain Layout
13659 \begin_inset Quotes erd
13663 This way was chosen so that the look is the same with each used screen
13667 \begin_layout Description
13668 \begin_inset Flex Code
13671 \begin_layout Plain Layout
13678 \begin_inset Flex Code
13681 \begin_layout Plain Layout
13686 , Manual, Dynamic, First_Dynamic, Right_Address_Box
13692 \begin_inset Newline newline
13695 The kind of margin that the style has on the left side.
13696 \begin_inset Separator parbreak
13703 \begin_layout Description
13704 \begin_inset Flex Code
13707 \begin_layout Plain Layout
13713 just means a fixed margin.
13716 \begin_layout Description
13717 \begin_inset Flex Code
13720 \begin_layout Plain Layout
13726 means that the left margin depends on the string entered in the
13727 \begin_inset Flex Noun
13730 \begin_layout Plain Layout
13731 Edit\SpecialChar menuseparator
13733 \begin_inset space ~
13742 This is used to typeset nice lists without tabulators.
13745 \begin_layout Description
13746 \begin_inset Flex Code
13749 \begin_layout Plain Layout
13755 means that the margin depends on the size of the label.
13756 This is used for automatic enumerated headlines.
13757 It is obvious that the headline
13758 \begin_inset Quotes eld
13761 5.4.3.2.1 Very long headline
13762 \begin_inset Quotes erd
13765 must have a wider left margin (as wide as
13766 \begin_inset Quotes eld
13770 \begin_inset Quotes erd
13773 plus the space) than
13774 \begin_inset Quotes eld
13777 3.2 Very long headline
13778 \begin_inset Quotes erd
13782 \begin_inset Quotes eld
13786 \begin_inset Quotes erd
13789 are not able to do this.
13792 \begin_layout Description
13793 \begin_inset Flex Code
13796 \begin_layout Plain Layout
13802 is similar, but only the very first row of the paragraph is dynamic, while
13803 the others are static; this is used, for example, for descriptions.
13806 \begin_layout Description
13807 \begin_inset Flex Code
13810 \begin_layout Plain Layout
13816 means the margin is chosen in a way that the longest row of this paragraph
13817 fits to the right margin.
13818 This is used to typeset an address on the right edge of the page.
13822 \begin_layout Description
13823 \begin_inset Flex Code
13826 \begin_layout Plain Layout
13833 \begin_inset Flex Code
13836 \begin_layout Plain Layout
13845 \begin_inset space \thinspace{}
13849 \begin_inset Flex Code
13852 \begin_layout Plain Layout
13858 ] Whether fragile commands in this style should be
13859 \begin_inset Flex Code
13862 \begin_layout Plain Layout
13875 whether this command should itself be protected.)
13878 \begin_layout Description
13879 \begin_inset Flex Code
13882 \begin_layout Plain Layout
13889 \begin_inset Flex Code
13892 \begin_layout Plain Layout
13899 \begin_inset space \thinspace{}
13903 \begin_inset Flex Code
13906 \begin_layout Plain Layout
13914 ] Whether newlines are translated into \SpecialChar LaTeX
13916 \begin_inset Flex Code
13919 \begin_layout Plain Layout
13930 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
13932 inside \SpecialChar LyX
13936 \begin_layout Description
13937 \begin_inset Flex Code
13940 \begin_layout Plain Layout
13947 \begin_inset Flex Code
13950 \begin_layout Plain Layout
13959 \begin_inset space \thinspace{}
13963 \begin_inset Flex Code
13966 \begin_layout Plain Layout
13972 ] If set to true, and if
13973 \begin_inset Flex Code
13976 \begin_layout Plain Layout
13983 \begin_inset Flex Code
13986 \begin_layout Plain Layout
13992 ) paragraphs are being indented, then the indentation of such a paragraph
13993 following one of this type will be suppressed.
13994 (So this will not affect the display of non-default paragraphs.)
13997 \begin_layout Description
13998 \begin_inset Flex Code
14001 \begin_layout Plain Layout
14008 \begin_inset Flex Code
14011 \begin_layout Plain Layout
14017 ] Name of a style that has replaced this style.
14018 This is used to rename a style, while keeping backward compatibility.
14021 \begin_layout Description
14022 \begin_inset Flex Code
14025 \begin_layout Plain Layout
14032 \begin_inset Flex Code
14035 \begin_layout Plain Layout
14042 \begin_inset space \thinspace{}
14046 \begin_inset Flex Code
14049 \begin_layout Plain Layout
14055 ] Determines whether consecutive pragraphs of the same type are treated
14056 as belonging together.
14057 This has the effect that the
14058 \begin_inset Flex Code
14061 \begin_layout Plain Layout
14067 is only printed once before such a group.
14068 By default, this is true for
14069 \begin_inset Flex Code
14072 \begin_layout Plain Layout
14079 \begin_inset Flex Code
14082 \begin_layout Plain Layout
14089 \begin_inset Flex Code
14092 \begin_layout Plain Layout
14098 and false for all other types.
14101 \begin_layout Description
14102 \begin_inset Flex Code
14105 \begin_layout Plain Layout
14112 \begin_inset Flex Code
14115 \begin_layout Plain Layout
14124 \begin_inset space \thinspace{}
14128 \begin_inset Flex Code
14131 \begin_layout Plain Layout
14137 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
14139 but only by a line break; together with
14140 \begin_inset Flex Code
14143 \begin_layout Plain Layout
14149 , this allows to emulate a plain text editor (like the ERT inset).
14152 \begin_layout Description
14153 \begin_inset Flex Code
14156 \begin_layout Plain Layout
14163 \begin_inset Flex Code
14166 \begin_layout Plain Layout
14172 ] The indent of the very first line of a paragraph.
14174 \begin_inset Newline newline
14178 \begin_inset Flex Code
14181 \begin_layout Plain Layout
14187 will be fixed for a certain style.
14188 The exception is the default style, since the indentation for these paragraphs
14189 can be prohibited with
14190 \begin_inset Flex Code
14193 \begin_layout Plain Layout
14201 \begin_inset Flex Code
14204 \begin_layout Plain Layout
14210 style paragraphs inside environments use the
14211 \begin_inset Flex Code
14214 \begin_layout Plain Layout
14220 of the environment, not their native one.
14222 \begin_inset Flex Code
14225 \begin_layout Plain Layout
14231 paragraphs inside an enumeration are not indented.
14234 \begin_layout Description
14235 \begin_inset Flex Code
14238 \begin_layout Plain Layout
14245 \begin_inset Flex Code
14248 \begin_layout Plain Layout
14254 ] The vertical space between two paragraphs of this style.
14257 \begin_layout Description
14258 \begin_inset Flex Code
14261 \begin_layout Plain Layout
14268 \begin_inset Flex Code
14271 \begin_layout Plain Layout
14278 allows the user to choose either
14279 \begin_inset Quotes eld
14283 \begin_inset Quotes erd
14287 \begin_inset Quotes eld
14291 \begin_inset Quotes erd
14294 to separate paragraphs.
14296 \begin_inset Quotes eld
14300 \begin_inset Quotes erd
14304 \begin_inset Flex Code
14307 \begin_layout Plain Layout
14315 \begin_inset Quotes eld
14319 \begin_inset Quotes erd
14323 \begin_inset Flex Code
14326 \begin_layout Plain Layout
14332 is ignored and all paragraphs are separated by the
14333 \begin_inset Flex Code
14336 \begin_layout Plain Layout
14343 The vertical space is calculated with
14344 \begin_inset Flex Code
14347 \begin_layout Plain Layout
14349 \begin_inset space ~
14358 \begin_inset Flex Code
14361 \begin_layout Plain Layout
14367 is the height of a row with the normal font.
14368 This way, the look stays the same with different screen fonts.
14371 \begin_layout Description
14372 \begin_inset Flex Code
14375 \begin_layout Plain Layout
14382 \begin_inset Flex Code
14385 \begin_layout Plain Layout
14394 \begin_inset space \thinspace{}
14398 \begin_inset Flex Code
14401 \begin_layout Plain Layout
14407 ] Whether the contents of this paragraph should be output in raw form, meaning
14408 without special translations that \SpecialChar LaTeX
14412 \begin_layout Description
14413 \begin_inset Flex Code
14416 \begin_layout Plain Layout
14423 \begin_inset Flex Code
14426 \begin_layout Plain Layout
14436 Defines individual characters that should be output in raw form, meaning
14437 without special translations that \SpecialChar LaTeX
14441 \begin_layout Description
14442 \begin_inset Flex Code
14445 \begin_layout Plain Layout
14451 Information to be included in the \SpecialChar LaTeX
14452 preamble when this style is used.
14453 Used to define macros, load packages, etc., required by this particular
14456 \begin_inset Quotes eld
14460 \begin_inset Flex Code
14463 \begin_layout Plain Layout
14470 \begin_inset Quotes erd
14476 \begin_layout Description
14477 \begin_inset Flex Code
14480 \begin_layout Plain Layout
14487 \begin_inset Flex Code
14490 \begin_layout Plain Layout
14496 ] The prefix to use when creating labels referring to paragraphs of this
14498 This allows the use of formatted references.
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 ] Whether the style requires the feature
14522 \begin_inset Flex Code
14525 \begin_layout Plain Layout
14532 \begin_inset CommandInset ref
14534 reference "chap:List-of-functions"
14538 for the list of features).
14539 If you require a package with specific options, you can additionally use
14541 \begin_inset Flex Code
14544 \begin_layout Plain Layout
14550 as a general text class parameter (see
14551 \begin_inset CommandInset ref
14553 reference "subsec:General-text-class"
14560 \begin_layout Description
14561 \begin_inset Flex Code
14564 \begin_layout Plain Layout
14571 \begin_inset Flex Code
14574 \begin_layout Plain Layout
14583 \begin_inset Flex Code
14586 \begin_layout Plain Layout
14592 ] Resets the \SpecialChar LaTeX
14593 arguments of this style (as defined via the
14594 \begin_inset Flex Code
14597 \begin_layout Plain Layout
14604 This is useful if you have copied a style via
14605 \begin_inset Flex Code
14608 \begin_layout Plain Layout
14614 , but you do not want to inherit its (required and optional) arguments.
14617 \begin_layout Description
14618 \begin_inset Flex Code
14621 \begin_layout Plain Layout
14628 \begin_inset Flex Code
14631 \begin_layout Plain Layout
14637 ] A string that is put at the end of the layout content.
14638 A line break in the output can be indicated by
14639 \begin_inset Flex Code
14642 \begin_layout Plain Layout
14651 \begin_layout Description
14652 \begin_inset Flex Code
14655 \begin_layout Plain Layout
14662 \begin_inset Flex Code
14665 \begin_layout Plain Layout
14672 \begin_inset Flex Code
14675 \begin_layout Plain Layout
14684 \begin_layout Description
14685 \begin_inset Flex Code
14688 \begin_layout Plain Layout
14695 \begin_inset Flex Code
14698 \begin_layout Plain Layout
14707 \begin_inset Flex Code
14710 \begin_layout Plain Layout
14717 \begin_inset Flex Code
14720 \begin_layout Plain Layout
14727 \begin_inset Flex Code
14730 \begin_layout Plain Layout
14732 \begin_inset space ~
14740 ] This defines what the default spacing should be in the style.
14742 \begin_inset Flex Code
14745 \begin_layout Plain Layout
14752 \begin_inset Flex Code
14755 \begin_layout Plain Layout
14762 \begin_inset Flex Code
14765 \begin_layout Plain Layout
14771 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
14772 If you specify the argument
14773 \begin_inset Flex Code
14776 \begin_layout Plain Layout
14782 , then you must also provide a value argument which will be the actual multiplie
14784 Note that, contrary to other parameters,
14785 \begin_inset Flex Code
14788 \begin_layout Plain Layout
14794 implies the generation of specific \SpecialChar LaTeX
14795 code, using the \SpecialChar LaTeX
14799 \begin_inset Flex Code
14802 \begin_layout Plain Layout
14811 \begin_layout Description
14812 \begin_inset Flex Code
14815 \begin_layout Plain Layout
14822 \begin_inset Flex Code
14825 \begin_layout Plain Layout
14832 \begin_inset space \thinspace{}
14836 \begin_inset Flex Code
14839 \begin_layout Plain Layout
14847 ] Allow spell-checking paragraphs of this style.
14851 \begin_layout Description
14852 \begin_inset Flex Code
14855 \begin_layout Plain Layout
14861 The font used for the text body .
14863 \begin_inset CommandInset ref
14865 reference "subsec:Font-description"
14872 \begin_layout Description
14873 \begin_inset Flex Code
14876 \begin_layout Plain Layout
14885 \begin_inset Flex Code
14888 \begin_layout Plain Layout
14898 The level of the style in the table of contents.
14899 This is used for automatic numbering of section headings.
14902 \begin_layout Description
14903 \begin_inset Flex Code
14906 \begin_layout Plain Layout
14915 \begin_inset Flex Code
14918 \begin_layout Plain Layout
14929 \begin_inset Flex Code
14932 \begin_layout Plain Layout
14939 \begin_inset Flex Code
14942 \begin_layout Plain Layout
14948 ] This tag determines whether the first line indentation of this paragraph
14949 can be toggled via the Paragraph settings dialog.
14953 \begin_inset Flex Code
14956 \begin_layout Plain Layout
14966 is set, indentation can be toggled if the document settings use
14967 \begin_inset Quotes eld
14971 \begin_inset Quotes erd
14974 paragraph style, with
14975 \begin_inset Flex Code
14978 \begin_layout Plain Layout
14984 , indentation can always be toggled, notwithstanding the document settings,
14986 \begin_inset Flex Code
14989 \begin_layout Plain Layout
14995 , indentation can never be toggled.
14998 \begin_layout Description
14999 \begin_inset Flex Code
15002 \begin_layout Plain Layout
15009 \begin_inset Flex Code
15012 \begin_layout Plain Layout
15018 ] The vertical space with which the very first of a chain of paragraphs
15019 with this style is separated from the previous paragraph.
15020 If the previous paragraph has another style, the separations are not simply
15021 added, but the maximum is taken.
15024 \begin_layout Subsection
15025 \begin_inset CommandInset label
15031 Internationalization of Paragraph Styles
15034 \begin_layout Standard
15036 has long supported internationalization of layout information, but, until
15037 version 2.0, this applied only to the user interface and not to, say, PDF
15039 Thus, French authors were forced to resort to ugly hacks if they wanted
15044 1' instead of `Theorem 1'.
15045 Thanks to Georg Baum, that is no longer the case.
15048 \begin_layout Standard
15050 \begin_inset Flex Code
15053 \begin_layout Plain Layout
15059 defines text that is to appear in the typeset document, it may use
15060 \begin_inset Flex Code
15063 \begin_layout Plain Layout
15070 \begin_inset Flex Code
15073 \begin_layout Plain Layout
15079 to support non-English and even multi-language documents correctly.
15080 The following excerpt (from the
15081 \begin_inset Flex Code
15084 \begin_layout Plain Layout
15090 file) shows how this works:
15093 \begin_layout LyX-Code
15095 \begin_inset Separator parbreak
15102 \begin_layout LyX-Code
15105 theoremstyle{remark}
15108 \begin_layout LyX-Code
15111 newtheorem{claim}[thm]{
15118 \begin_layout LyX-Code
15122 \begin_layout LyX-Code
15126 \begin_layout LyX-Code
15131 claimname}{_(Claim)}
15134 \begin_layout LyX-Code
15138 \begin_layout LyX-Code
15142 \begin_layout LyX-Code
15151 claimname}{_(Claim)}}
15154 \begin_layout LyX-Code
15159 \begin_layout Standard
15160 In principle, any legal \SpecialChar LaTeX
15162 \begin_inset Flex Code
15165 \begin_layout Plain Layout
15172 \begin_inset Flex Code
15175 \begin_layout Plain Layout
15181 tags, but in practice they will typically look as they do here.
15182 The key to correct translation of the typeset text is the definition of
15183 the \SpecialChar LaTeX
15185 \begin_inset Flex Code
15188 \begin_layout Plain Layout
15197 \begin_inset Flex Code
15200 \begin_layout Plain Layout
15212 \begin_layout Standard
15214 \begin_inset Flex Code
15217 \begin_layout Plain Layout
15223 tag provides for internationalization based upon the overall language of
15225 The contents of the tag will be included in the preamble, just as with
15227 \begin_inset Flex Code
15230 \begin_layout Plain Layout
15237 What makes it special is the use of the
15238 \begin_inset Quotes eld
15242 \begin_inset Quotes erd
15246 \begin_inset Flex Code
15249 \begin_layout Plain Layout
15255 , which will be replaced, when \SpecialChar LyX
15256 produces \SpecialChar LaTeX
15257 output, with the translation of
15258 its argument into the document language.
15261 \begin_layout Standard
15263 \begin_inset Flex Code
15266 \begin_layout Plain Layout
15272 tag is more complex, since it is meant to provide support for multi-language
15273 documents and so offers an interface to the
15274 \begin_inset Flex Code
15277 \begin_layout Plain Layout
15284 Its contents will be added to the preamble once for each language that
15285 appears in the document.
15286 In this case, the argument to
15287 \begin_inset Flex Code
15290 \begin_layout Plain Layout
15296 will be replaced with its translation into the language in question; the
15298 \begin_inset Flex Code
15301 \begin_layout Plain Layout
15307 is replaced by the language name (as used by the babel package).
15310 \begin_layout Standard
15311 A German document that also included a French section would thus have the
15312 following in the preamble:
15315 \begin_layout LyX-Code
15324 claimname}{Affirmation}}
15325 \begin_inset Newline newline
15336 claimname}{Behauptung}}
15337 \begin_inset Newline newline
15344 claimname}{Behauptung}
15347 \begin_layout Standard
15350 \begin_inset Flex Code
15353 \begin_layout Plain Layout
15359 will then conspire to produce the correct text in the output.
15362 \begin_layout Standard
15363 One important point to note here is that the translations are provided by
15365 itself, through the file
15366 \begin_inset Flex Code
15369 \begin_layout Plain Layout
15376 This means, in effect, that
15377 \begin_inset Flex Code
15380 \begin_layout Plain Layout
15387 \begin_inset Flex Code
15390 \begin_layout Plain Layout
15396 are really only of use in layout files that are provided with \SpecialChar LyX
15398 entered in user-created layout files will not be seen by \SpecialChar LyX
15399 's internationalizatio
15400 n routines unless the
15401 \begin_inset Flex Code
15404 \begin_layout Plain Layout
15410 file is modified accordingly.
15411 That said, however, any layout created with the intention that it will
15412 be included with \SpecialChar LyX
15413 should use these tags where appropriate.
15414 Please note that the paragraph style translations provided by \SpecialChar LyX
15416 change with a minor update (e.
15417 \begin_inset space \thinspace{}
15421 \begin_inset space \space{}
15424 from version 2.1.x to 2.1.y).
15425 It is however quite likely that a major update (e.
15426 \begin_inset space \thinspace{}
15430 \begin_inset space \space{}
15433 from 2.0.x to 2.1.y) will introduce new translations or corrections.
15436 \begin_layout Subsection
15438 \begin_inset CommandInset label
15440 name "subsec:Floats"
15447 \begin_layout Standard
15448 It is necessary to define the floats (
15449 \begin_inset Flex Noun
15452 \begin_layout Plain Layout
15459 \begin_inset Flex Noun
15462 \begin_layout Plain Layout
15468 , \SpecialChar ldots
15469 ) in the text class itself.
15470 Standard floats are included in the file
15471 \begin_inset Flex Code
15474 \begin_layout Plain Layout
15480 , so you may have to do no more than add
15483 \begin_layout LyX-Code
15484 Input stdfloats.inc
15487 \begin_layout Standard
15488 to your layout file.
15489 If you want to implement a text class that proposes some other float types
15490 (like the AGU class bundled with \SpecialChar LyX
15491 ), the information below will hopefully
15495 \begin_layout Description
15496 \begin_inset Flex Code
15499 \begin_layout Plain Layout
15506 \begin_inset Flex Code
15509 \begin_layout Plain Layout
15515 =!htbpH] Allowed placement options for this float type.
15516 The value is a string of placement characters.
15517 Possible characters include:
15522 \begin_inset Quotes eld
15526 \begin_inset Quotes erd
15534 \begin_inset Quotes eld
15538 \begin_inset Quotes erd
15546 \begin_inset Quotes eld
15550 \begin_inset Quotes erd
15558 \begin_inset Quotes eld
15562 \begin_inset Quotes erd
15570 \begin_inset Quotes eld
15574 \begin_inset Quotes erd
15582 \begin_inset Quotes eld
15586 \begin_inset Quotes erd
15590 The order of the characters in the string does not matter.
15591 If no placement options are allowed, use the string
15598 \begin_layout Description
15599 \begin_inset Flex Code
15602 \begin_layout Plain Layout
15609 \begin_inset Flex Code
15612 \begin_layout Plain Layout
15621 \begin_inset space \thinspace{}
15627 \begin_inset Flex Code
15630 \begin_layout Plain Layout
15640 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
15647 \begin_inset Flex Code
15650 \begin_layout Plain Layout
15656 if the float does not support this feature.
15659 \begin_layout Description
15660 \begin_inset Flex Code
15663 \begin_layout Plain Layout
15670 \begin_inset Flex Code
15673 \begin_layout Plain Layout
15682 \begin_inset space \thinspace{}
15688 \begin_inset Flex Code
15691 \begin_layout Plain Layout
15701 ] Defines whether the float has a starred variant that spans columns in
15702 a two column paragraph.
15704 \begin_inset Flex Code
15707 \begin_layout Plain Layout
15713 if the float does not support this feature.
15716 \begin_layout Description
15717 \begin_inset Flex Code
15720 \begin_layout Plain Layout
15727 \begin_inset Flex Code
15730 \begin_layout Plain Layout
15737 \begin_inset Quotes erd
15741 \begin_inset Quotes erd
15744 ] The file name extension of an auxiliary file for the list of figures (or
15747 writes the captions to this file.
15750 \begin_layout Description
15751 \begin_inset Flex Code
15754 \begin_layout Plain Layout
15761 \begin_inset Flex Code
15764 \begin_layout Plain Layout
15771 \begin_inset Quotes erd
15775 \begin_inset Quotes erd
15778 ] The string that will be used in the menus and also for the caption.
15779 This is translated to the current language if babel is used.
15782 \begin_layout Description
15783 \begin_inset Flex Code
15786 \begin_layout Plain Layout
15792 These tags control the XHTML output.
15794 \begin_inset CommandInset ref
15796 reference "sec:Tags-for-XHTML"
15803 \begin_layout Description
15804 \begin_inset Flex Code
15807 \begin_layout Plain Layout
15816 \begin_inset Flex Code
15819 \begin_layout Plain Layout
15828 \begin_inset space \thinspace{}
15832 \begin_inset Flex Code
15835 \begin_layout Plain Layout
15841 ] Indicates whether the float is already defined in the document class or
15842 if instead the \SpecialChar LaTeX
15844 \begin_inset Flex Code
15847 \begin_layout Plain Layout
15853 needs to be loaded to define it on-the-fly.
15855 \begin_inset Flex Code
15858 \begin_layout Plain Layout
15865 \begin_inset Flex Code
15868 \begin_layout Plain Layout
15875 It should be set to
15876 \begin_inset Flex Code
15879 \begin_layout Plain Layout
15885 if the float is already defined by the \SpecialChar LaTeX
15889 \begin_layout Description
15890 \begin_inset Flex Code
15893 \begin_layout Plain Layout
15900 \begin_inset Flex Code
15903 \begin_layout Plain Layout
15910 \begin_inset Quotes erd
15914 \begin_inset Quotes erd
15917 ] The command used to generate a list of floats of this type; the leading
15926 \begin_inset Flex Code
15929 \begin_layout Plain Layout
15935 is false, since there is no standard way to generate this command.
15937 \begin_inset Flex Code
15940 \begin_layout Plain Layout
15946 is true, since in that case there is a standard way to define the command.
15949 \begin_layout Description
15950 \begin_inset Flex Code
15953 \begin_layout Plain Layout
15960 \begin_inset Flex Code
15963 \begin_layout Plain Layout
15970 \begin_inset Quotes erd
15974 \begin_inset Quotes erd
15977 ] A title for a list of floats of this kind (list of figures, tables, or
15979 It is used for the screen label within \SpecialChar LyX
15980 , it is used by \SpecialChar LaTeX
15982 it is used as the title in the XHTML output.
15983 It will be translated to the document language.
15986 \begin_layout Description
15987 \begin_inset Flex Code
15990 \begin_layout Plain Layout
15997 \begin_inset Flex Code
16000 \begin_layout Plain Layout
16007 \begin_inset Quotes erd
16011 \begin_inset Quotes erd
16014 ] This (optional) argument determines whether floats of this class will
16015 be numbered within some sectional unit of the document.
16017 \begin_inset Flex Code
16020 \begin_layout Plain Layout
16027 \begin_inset Quotes eld
16031 \begin_inset Flex Code
16034 \begin_layout Plain Layout
16041 \begin_inset Quotes erd
16044 , the floats will be numbered within chapters.
16048 \begin_layout Description
16049 \begin_inset Flex Code
16052 \begin_layout Plain Layout
16059 \begin_inset Flex Code
16062 \begin_layout Plain Layout
16069 \begin_inset Quotes erd
16073 \begin_inset Quotes erd
16076 ] The default placement for the given class of floats.
16077 The string should be as in standard \SpecialChar LaTeX
16079 \begin_inset Flex Code
16082 \begin_layout Plain Layout
16089 \begin_inset Flex Code
16092 \begin_layout Plain Layout
16099 \begin_inset Flex Code
16102 \begin_layout Plain Layout
16109 \begin_inset Flex Code
16112 \begin_layout Plain Layout
16118 for top, bottom, page, and here, respectively.
16122 \begin_layout Plain Layout
16123 Note that the order of these letters in the string is irrelevant, like in
16130 On top of that there is a new type,
16131 \begin_inset Flex Code
16134 \begin_layout Plain Layout
16140 , which does not really correspond to a float, since it means: put it
16141 \begin_inset Quotes eld
16145 \begin_inset Quotes erd
16149 Note however that the
16150 \begin_inset Flex Code
16153 \begin_layout Plain Layout
16159 specifier is special and, because of implementation details, cannot be
16160 used in non-built in float types.
16161 If you do not understand what this means, just use
16162 \begin_inset Quotes eld
16166 \begin_inset Flex Code
16169 \begin_layout Plain Layout
16176 \begin_inset Quotes erd
16182 \begin_layout Description
16183 \begin_inset Flex Code
16186 \begin_layout Plain Layout
16193 \begin_inset Flex Code
16196 \begin_layout Plain Layout
16202 ] The prefix to use when creating labels referring to floats of this type.
16203 This allows the use of formatted references.
16204 Note that you can remove any
16205 \begin_inset Flex Code
16208 \begin_layout Plain Layout
16214 set by a copied style by using the special value
16215 \begin_inset Quotes eld
16219 \begin_inset Quotes erd
16222 , which must be all caps.
16225 \begin_layout Description
16226 \begin_inset Flex Code
16229 \begin_layout Plain Layout
16236 \begin_inset Flex Code
16239 \begin_layout Plain Layout
16246 \begin_inset Quotes erd
16250 \begin_inset Quotes erd
16253 ] The style used when defining the float using
16254 \begin_inset Flex Code
16257 \begin_layout Plain Layout
16268 \begin_layout Description
16269 \begin_inset Flex Code
16272 \begin_layout Plain Layout
16279 \begin_inset Flex Code
16282 \begin_layout Plain Layout
16289 \begin_inset Quotes erd
16293 \begin_inset Quotes erd
16297 \begin_inset Quotes eld
16301 \begin_inset Quotes erd
16304 of the new class of floats, like program or algorithm.
16305 After the appropriate
16306 \begin_inset Flex Code
16309 \begin_layout Plain Layout
16318 \begin_inset Flex Code
16321 \begin_layout Plain Layout
16330 \begin_inset Flex Code
16333 \begin_layout Plain Layout
16344 \begin_layout Description
16345 \begin_inset Flex Code
16348 \begin_layout Plain Layout
16355 \begin_inset Flex Code
16358 \begin_layout Plain Layout
16365 \begin_inset space \thinspace{}
16369 \begin_inset Flex Code
16372 \begin_layout Plain Layout
16380 ] Specifies whether this float is defined using the \SpecialChar LaTeX
16382 \begin_inset Flex Code
16385 \begin_layout Plain Layout
16391 , either by the class file, another package or on-the-fly by \SpecialChar LyX
16395 \begin_layout Standard
16396 Note that defining a float with type
16397 \begin_inset Flex Code
16400 \begin_layout Plain Layout
16408 automatically defines the corresponding counter with name
16409 \begin_inset Flex Code
16412 \begin_layout Plain Layout
16423 \begin_layout Subsection
16424 Flex insets and InsetLayout
16425 \begin_inset CommandInset label
16427 name "subsec:Flex-insets-and"
16434 \begin_layout Standard
16435 Flex insets come in three different kinds:
16438 \begin_layout Itemize
16440 \begin_inset Flex Code
16443 \begin_layout Plain Layout
16449 ): These define semantic markup corresponding to such \SpecialChar LaTeX
16451 \begin_inset Flex Code
16454 \begin_layout Plain Layout
16463 \begin_inset Flex Code
16466 \begin_layout Plain Layout
16477 \begin_layout Itemize
16479 \begin_inset Flex Code
16482 \begin_layout Plain Layout
16488 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
16490 footnote, and the like.
16491 An obvious example is an endnote inset, which is defined in the
16492 \begin_inset Flex Code
16495 \begin_layout Plain Layout
16504 \begin_layout Itemize
16506 \begin_inset Flex Code
16509 \begin_layout Plain Layout
16515 ): For use with DocBook classes.
16518 \begin_layout Standard
16519 Flex insets are defined using the
16520 \begin_inset Flex Code
16523 \begin_layout Plain Layout
16529 tag, which shall be explained in a moment.
16532 \begin_layout Standard
16534 \begin_inset Flex Code
16537 \begin_layout Plain Layout
16543 tag also serves another function: It can be used to customize the general
16544 layout of many different types of insets.
16546 \begin_inset Flex Code
16549 \begin_layout Plain Layout
16555 can be used to customize the layout parameters for footnotes, marginal
16556 notes, note insets, \SpecialChar TeX
16557 code (ERT) insets, branches, listings, indexes, boxes,
16558 tables, algorithms, URLs, and captions, as well as to define Flex insets.
16561 \begin_layout Standard
16563 \begin_inset Flex Code
16566 \begin_layout Plain Layout
16572 definition must begin with a line of the form:
16575 \begin_layout LyX-Code
16579 \begin_layout Standard
16581 \begin_inset Flex Code
16584 \begin_layout Plain Layout
16590 indicates the inset whose layout is being defined, and here there are four
16594 \begin_layout Enumerate
16595 The layout for a pre-existing inset is being modified.
16596 In this case, can be
16597 \begin_inset Flex Code
16600 \begin_layout Plain Layout
16606 any one of the following:
16607 \begin_inset Flex Code
16610 \begin_layout Plain Layout
16617 \begin_inset Flex Code
16620 \begin_layout Plain Layout
16627 \begin_inset Flex Code
16630 \begin_layout Plain Layout
16637 \begin_inset Flex Code
16640 \begin_layout Plain Layout
16647 \begin_inset Flex Code
16650 \begin_layout Plain Layout
16657 \begin_inset Flex Code
16660 \begin_layout Plain Layout
16667 \begin_inset Flex Code
16670 \begin_layout Plain Layout
16677 \begin_inset Flex Code
16680 \begin_layout Plain Layout
16687 \begin_inset Flex Code
16690 \begin_layout Plain Layout
16697 \begin_inset Flex Code
16700 \begin_layout Plain Layout
16707 \begin_inset Flex Code
16710 \begin_layout Plain Layout
16717 \begin_inset Flex Code
16720 \begin_layout Plain Layout
16727 \begin_inset Flex Code
16730 \begin_layout Plain Layout
16737 \begin_inset Flex Code
16740 \begin_layout Plain Layout
16747 \begin_inset Flex Code
16750 \begin_layout Plain Layout
16757 \begin_inset Flex Code
16760 \begin_layout Plain Layout
16767 \begin_inset Flex Code
16770 \begin_layout Plain Layout
16777 \begin_inset Flex Code
16780 \begin_layout Plain Layout
16787 \begin_inset Flex Code
16790 \begin_layout Plain Layout
16797 \begin_inset Flex Code
16800 \begin_layout Plain Layout
16809 \begin_layout Enumerate
16810 The layout for a Flex inset is being defined.
16812 \begin_inset Flex Code
16815 \begin_layout Plain Layout
16821 must be of the form
16822 \begin_inset Quotes eld
16826 \begin_inset Flex Code
16829 \begin_layout Plain Layout
16836 \begin_inset Quotes erd
16840 \begin_inset Flex Code
16843 \begin_layout Plain Layout
16849 may be be any valid identifier not used by a pre-existing Flex inset.
16850 The identifier may include spaces, but in that case the whole thing must
16851 be wrapped in quotes.
16852 Note that the definition of a flex inset
16857 \begin_inset Flex Code
16860 \begin_layout Plain Layout
16866 entry, declaring which type of inset it defines.
16869 \begin_layout Enumerate
16870 The layout for user specific branch is being defined.
16872 \begin_inset Flex Code
16875 \begin_layout Plain Layout
16881 must be of the form
16882 \begin_inset Quotes eld
16886 \begin_inset Flex Code
16889 \begin_layout Plain Layout
16896 \begin_inset Quotes erd
16900 \begin_inset Flex Code
16903 \begin_layout Plain Layout
16909 may be be any valid identifier of branch defined in user's document.
16910 The identifier may include spaces, but in that case the whole thing must
16911 be wrapped in quotes.
16912 The main purpose of this feature is to allow \SpecialChar LaTeX
16913 wrapping around specific
16914 branches as user needs.
16917 \begin_layout Enumerate
16918 The layout of a user (or class) specific caption is being defined.
16920 \begin_inset Flex Code
16923 \begin_layout Plain Layout
16929 must be of the form
16930 \begin_inset Quotes eld
16934 \begin_inset Flex Code
16937 \begin_layout Plain Layout
16944 \begin_inset Quotes erd
16948 \begin_inset Flex Code
16951 \begin_layout Plain Layout
16957 specifies the name of the caption as it appears in the menu.
16958 Have a look at the standard caption (
16959 \begin_inset Flex Code
16962 \begin_layout Plain Layout
16968 ), the specific captions of the KOMA-Script classes (
16969 \begin_inset Flex Code
16972 \begin_layout Plain Layout
16979 \begin_inset Flex Code
16982 \begin_layout Plain Layout
16991 \begin_inset space ~
16997 \begin_inset Flex Code
17000 \begin_layout Plain Layout
17006 ) for applications.
17009 \begin_layout Standard
17011 \begin_inset Flex Code
17014 \begin_layout Plain Layout
17020 definition can contain the following entries:
17023 \begin_layout Description
17024 \begin_inset Flex Code
17027 \begin_layout Plain Layout
17034 \begin_inset Flex Code
17037 \begin_layout Plain Layout
17043 ] Defines argument number of a command\SpecialChar breakableslash
17044 environment associated with the current
17046 The definition must end with
17047 \begin_inset Flex Code
17050 \begin_layout Plain Layout
17058 \begin_inset CommandInset ref
17060 reference "subsec:Paragraph-Styles"
17067 \begin_layout Description
17068 \begin_inset Flex Code
17071 \begin_layout Plain Layout
17077 Preamble for changing language commands; see
17078 \begin_inset CommandInset ref
17080 reference "subsec:I18n"
17087 \begin_layout Description
17088 \begin_inset Flex Code
17091 \begin_layout Plain Layout
17098 \begin_inset Flex Code
17101 \begin_layout Plain Layout
17107 ] The color for the inset's background.
17109 \begin_inset CommandInset ref
17111 reference "chap:Names-of-colors"
17115 for a list of the available color names.
17118 \begin_layout Description
17119 \begin_inset Flex Code
17122 \begin_layout Plain Layout
17129 \begin_inset Flex Code
17132 \begin_layout Plain Layout
17141 \begin_inset space \thinspace{}
17145 \begin_inset Flex Code
17148 \begin_layout Plain Layout
17154 ] Whether to use the content of the inset as the label, when the inset is
17159 \begin_layout Description
17160 \begin_inset Flex Code
17163 \begin_layout Plain Layout
17170 \begin_inset Flex Code
17173 \begin_layout Plain Layout
17179 ] As with paragraph styles, see
17180 \begin_inset CommandInset ref
17182 reference "subsec:Paragraph-Styles"
17187 Note that you need to specify the complete type, e.
17188 \begin_inset space \thinspace{}
17192 \begin_inset space ~
17196 \begin_inset Flex Code
17199 \begin_layout Plain Layout
17200 CopyStyle Flex:<name>
17208 \begin_layout Description
17209 \begin_inset Flex Code
17212 \begin_layout Plain Layout
17219 \begin_inset Flex Code
17222 \begin_layout Plain Layout
17231 \begin_inset space \thinspace{}
17235 \begin_inset Flex Code
17238 \begin_layout Plain Layout
17244 ] Indicates whether the user may employ the Paragraph Settings dialog to
17245 customize the paragraph.
17248 \begin_layout Description
17249 \begin_inset Flex Code
17252 \begin_layout Plain Layout
17259 \begin_inset Flex Code
17262 \begin_layout Plain Layout
17269 \begin_inset Flex Code
17272 \begin_layout Plain Layout
17279 \begin_inset Flex Code
17282 \begin_layout Plain Layout
17288 , describing the rendering style used for the inset's frame and buttons.
17289 Footnotes generally use
17290 \begin_inset Flex Code
17293 \begin_layout Plain Layout
17299 , ERT insets generally
17300 \begin_inset Flex Code
17303 \begin_layout Plain Layout
17309 , and character styles
17310 \begin_inset Flex Code
17313 \begin_layout Plain Layout
17322 \begin_layout Description
17323 \begin_inset Flex Code
17326 \begin_layout Plain Layout
17333 \begin_inset Flex Code
17336 \begin_layout Plain Layout
17345 \begin_inset space \thinspace{}
17351 \begin_inset Flex Code
17354 \begin_layout Plain Layout
17363 \begin_inset Flex Code
17366 \begin_layout Plain Layout
17373 \begin_inset Flex Code
17376 \begin_layout Plain Layout
17383 Indicates whether the environment will stand on its own in the output or
17384 will appear inline with the surrounding text.
17385 If set to false, it is supposed that the \SpecialChar LaTeX
17386 environment ignores white space
17387 (including one newline character) after the
17388 \begin_inset Flex Code
17391 \begin_layout Plain Layout
17404 \begin_inset Flex Code
17407 \begin_layout Plain Layout
17423 \begin_layout Description
17424 \begin_inset Flex Code
17427 \begin_layout Plain Layout
17433 Required at the end of the
17434 \begin_inset Flex Code
17437 \begin_layout Plain Layout
17446 \begin_layout Description
17447 \begin_inset Flex Code
17450 \begin_layout Plain Layout
17456 The font used for both the text body
17462 \begin_inset CommandInset ref
17464 reference "subsec:Font-description"
17469 Note that defining this font automatically defines the
17470 \begin_inset Flex Code
17473 \begin_layout Plain Layout
17479 to the same value, so define this first and define
17480 \begin_inset Flex Code
17483 \begin_layout Plain Layout
17489 later if you want them to be different.
17492 \begin_layout Description
17493 \begin_inset Flex Code
17496 \begin_layout Plain Layout
17497 FixedWidthPreambleEncoding
17503 \begin_inset Flex Code
17506 \begin_layout Plain Layout
17515 \begin_inset space \thinspace{}
17519 \begin_inset Flex Code
17522 \begin_layout Plain Layout
17528 ] Force a fixed width encoding for the translated contents of
17529 \begin_inset Flex Code
17532 \begin_layout Plain Layout
17539 \begin_inset Flex Code
17542 \begin_layout Plain Layout
17548 code generated by this layout.
17549 This is needed for special \SpecialChar LaTeX
17554 that do not work with variable width encodings such as
17559 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
17560 backends such as Xe\SpecialChar TeX
17562 Lua\SpecialChar TeX
17566 \begin_layout Description
17567 \begin_inset Flex Code
17570 \begin_layout Plain Layout
17571 ForceLocalFontSwitch
17577 \begin_inset Flex Code
17580 \begin_layout Plain Layout
17589 \begin_inset space \thinspace{}
17593 \begin_inset Flex Code
17596 \begin_layout Plain Layout
17602 ] When using babel, always use a local font switch (
17603 \begin_inset Flex Code
17606 \begin_layout Plain Layout
17614 ), never a global one (such as
17615 \begin_inset Flex Code
17618 \begin_layout Plain Layout
17629 \begin_layout Description
17630 \begin_inset Flex Code
17633 \begin_layout Plain Layout
17640 \begin_inset Flex Code
17643 \begin_layout Plain Layout
17652 \begin_inset space \thinspace{}
17656 \begin_inset Flex Code
17659 \begin_layout Plain Layout
17666 \begin_inset Quotes eld
17670 \begin_inset Quotes erd
17673 language, leading to Left-to-Right (Latin) output, e.
17674 \begin_inset space \thinspace{}
17678 \begin_inset space \space{}
17681 in \SpecialChar TeX
17686 \begin_layout Description
17687 \begin_inset Flex Code
17690 \begin_layout Plain Layout
17697 \begin_inset Flex Code
17700 \begin_layout Plain Layout
17709 \begin_inset space \thinspace{}
17713 \begin_inset Flex Code
17716 \begin_layout Plain Layout
17722 ] Force a a line break in the \SpecialChar LaTeX
17723 output before the inset starts and after
17725 This assures the inset itself is output on its own lines, for parsing purposes.
17728 \begin_layout Description
17729 \begin_inset Flex Code
17732 \begin_layout Plain Layout
17739 \begin_inset Flex Code
17742 \begin_layout Plain Layout
17751 \begin_inset space \thinspace{}
17755 \begin_inset Flex Code
17758 \begin_layout Plain Layout
17764 ] Indicates whether the
17765 \begin_inset Flex Code
17768 \begin_layout Plain Layout
17774 should be used or, instead, the user can change the paragraph style used
17779 \begin_layout Description
17780 \begin_inset Flex Code
17783 \begin_layout Plain Layout
17790 \begin_inset Flex Code
17793 \begin_layout Plain Layout
17802 \begin_inset space \thinspace{}
17806 \begin_inset Flex Code
17809 \begin_layout Plain Layout
17815 ] As with paragraph styles, see
17816 \begin_inset CommandInset ref
17818 reference "subsec:Paragraph-Styles"
17825 \begin_layout Description
17826 \begin_inset Flex Code
17829 \begin_layout Plain Layout
17835 These tags control the XHTML output.
17837 \begin_inset CommandInset ref
17839 reference "sec:Tags-for-XHTML"
17846 \begin_layout Description
17847 \begin_inset Flex Code
17850 \begin_layout Plain Layout
17857 \begin_inset Flex Code
17860 \begin_layout Plain Layout
17869 \begin_inset space \thinspace{}
17873 \begin_inset Flex Code
17876 \begin_layout Plain Layout
17882 ] Whether to include the contents of this inset in the strings generated
17883 for the `Outline' pane.
17884 One would not, for example, want the content of a footnote in a section
17885 header to be included in the TOC displayed in the outline, but one would
17886 normally want the content of a character style displayed.
17887 Default is false: not to include.
17890 \begin_layout Description
17891 \begin_inset Flex Code
17894 \begin_layout Plain Layout
17903 \begin_inset Flex Code
17906 \begin_layout Plain Layout
17915 \begin_inset space \thinspace{}
17919 \begin_inset Flex Code
17922 \begin_layout Plain Layout
17928 ] As with paragraph styles, see
17929 \begin_inset CommandInset ref
17931 reference "subsec:Paragraph-Styles"
17938 \begin_layout Description
17939 \begin_inset Flex Code
17942 \begin_layout Plain Layout
17948 The font used for the label.
17950 \begin_inset CommandInset ref
17952 reference "subsec:Font-description"
17957 Note that this definition can never appear before
17958 \begin_inset Flex Code
17961 \begin_layout Plain Layout
17967 , lest it be ineffective.
17970 \begin_layout Description
17971 \begin_inset Flex Code
17974 \begin_layout Plain Layout
17981 \begin_inset Flex Code
17984 \begin_layout Plain Layout
17991 \begin_inset Quotes erd
17995 \begin_inset Quotes erd
17998 ] What will be displayed on the button or elsewhere as the inset label.
18000 \begin_inset Flex Code
18003 \begin_layout Plain Layout
18011 \begin_inset Flex Code
18014 \begin_layout Plain Layout
18020 ) modify this label on the fly.
18023 \begin_layout Description
18024 \begin_inset Flex Code
18027 \begin_layout Plain Layout
18033 Language dependent preamble; see
18034 \begin_inset CommandInset ref
18036 reference "subsec:I18n"
18043 \begin_layout Description
18044 \begin_inset Flex Code
18047 \begin_layout Plain Layout
18054 \begin_inset Flex Code
18057 \begin_layout Plain Layout
18063 ] The name of the corresponding \SpecialChar LaTeX
18065 Either the environment or command name.
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 optional parameter for the corresponding
18089 \begin_inset Flex Code
18092 \begin_layout Plain Layout
18098 stuff, including possible bracket pairs like
18099 \begin_inset Flex Code
18102 \begin_layout Plain Layout
18109 This parameter cannot be changed from within \SpecialChar LyX
18111 \begin_inset Flex Code
18114 \begin_layout Plain Layout
18120 for customizable parameters).
18121 It will be output as is after all \SpecialChar LaTeX
18123 \begin_inset Flex Code
18126 \begin_layout Plain Layout
18135 \begin_layout Description
18136 \begin_inset Flex Code
18139 \begin_layout Plain Layout
18146 \begin_inset Flex Code
18149 \begin_layout Plain Layout
18150 Command, Environment, None
18155 ] How the style should be translated into \SpecialChar LaTeX
18160 \begin_layout Plain Layout
18161 \begin_inset Flex Code
18164 \begin_layout Plain Layout
18170 is perhaps a bit misleading, since these rules apply to SGML classes too.
18171 Visit the SGML class files for specific examples.
18177 \begin_inset Separator parbreak
18184 \begin_layout Description
18185 \begin_inset Flex Code
18188 \begin_layout Plain Layout
18194 means nothing special
18197 \begin_layout Description
18198 \begin_inset Flex Code
18201 \begin_layout Plain Layout
18208 \begin_inset Flex Code
18211 \begin_layout Plain Layout
18218 {\SpecialChar ldots
18227 \begin_layout Description
18228 \begin_inset Flex Code
18231 \begin_layout Plain Layout
18238 \begin_inset Flex Code
18241 \begin_layout Plain Layout
18248 }\SpecialChar ldots
18263 \begin_layout Standard
18264 Putting the last few things together, the \SpecialChar LaTeX
18265 output will be either:
18268 \begin_layout LyX-Code
18271 LatexName[LatexParam]{\SpecialChar ldots
18275 \begin_layout Standard
18279 \begin_layout LyX-Code
18282 begin{LatexName}[LatexParam] \SpecialChar ldots
18288 \begin_layout Standard
18289 depending upon the \SpecialChar LaTeX
18294 \begin_layout Description
18295 \begin_inset Flex Code
18298 \begin_layout Plain Layout
18305 \begin_inset Flex Code
18308 \begin_layout Plain Layout
18314 ] A string that is put at the beginning of the layout content.
18315 A line break in the output can be indicated by
18316 \begin_inset Flex Code
18319 \begin_layout Plain Layout
18328 \begin_layout Description
18329 \begin_inset Flex Code
18332 \begin_layout Plain Layout
18339 \begin_inset Flex Code
18342 \begin_layout Plain Layout
18349 \begin_inset Flex Code
18352 \begin_layout Plain Layout
18359 \begin_inset Flex Code
18362 \begin_layout Plain Layout
18369 \begin_inset Flex Code
18372 \begin_layout Plain Layout
18378 (indicating a dummy definition ending definitions of charstyles, etc).
18379 This entry is required in and is only meaningful for Flex insets.
18380 Among other things, it determines on which menu this inset will appear.
18382 \begin_inset Flex Code
18385 \begin_layout Plain Layout
18392 \begin_inset Flex Code
18395 \begin_layout Plain Layout
18401 will automatically set
18402 \begin_inset Flex Code
18405 \begin_layout Plain Layout
18413 \begin_inset Flex Code
18416 \begin_layout Plain Layout
18422 can be set to true for
18423 \begin_inset Flex Code
18426 \begin_layout Plain Layout
18432 insets by setting it
18437 \begin_inset Flex Code
18440 \begin_layout Plain Layout
18449 \begin_layout Description
18450 \begin_inset Flex Code
18453 \begin_layout Plain Layout
18460 \begin_inset Flex Code
18463 \begin_layout Plain Layout
18472 \begin_inset space \thinspace{}
18476 \begin_inset Flex Code
18479 \begin_layout Plain Layout
18485 ] Whether multiple paragraphs are permitted in this inset.
18487 \begin_inset Flex Code
18490 \begin_layout Plain Layout
18496 to the same value and
18497 \begin_inset Flex Code
18500 \begin_layout Plain Layout
18506 to the opposite value.
18507 These can be reset to other values, if they are used
18512 \begin_inset Flex Code
18515 \begin_layout Plain Layout
18525 \begin_layout Description
18526 \begin_inset Flex Code
18529 \begin_layout Plain Layout
18536 \begin_inset Flex Code
18539 \begin_layout Plain Layout
18548 \begin_inset space \thinspace{}
18552 \begin_inset Flex Code
18555 \begin_layout Plain Layout
18561 ] Whether fragile commands in this inset should be
18562 \begin_inset Flex Code
18565 \begin_layout Plain Layout
18578 whether the command should itself be protected.) Default is false.
18581 \begin_layout Description
18582 \begin_inset Flex Code
18585 \begin_layout Plain Layout
18592 \begin_inset Flex Code
18595 \begin_layout Plain Layout
18601 ] Deletes an existing
18602 \begin_inset Flex Code
18605 \begin_layout Plain Layout
18614 \begin_layout Description
18615 \begin_inset Flex Code
18618 \begin_layout Plain Layout
18625 \begin_inset Flex Code
18628 \begin_layout Plain Layout
18635 \begin_inset Flex Code
18638 \begin_layout Plain Layout
18644 that has replaced this
18645 \begin_inset Flex Code
18648 \begin_layout Plain Layout
18655 This is used to rename an
18656 \begin_inset Flex Code
18659 \begin_layout Plain Layout
18665 , while keeping backward compatibility.
18668 \begin_layout Description
18669 \begin_inset Flex Code
18672 \begin_layout Plain Layout
18679 \begin_inset Flex Code
18682 \begin_layout Plain Layout
18691 \begin_inset space \thinspace{}
18695 \begin_inset Flex Code
18698 \begin_layout Plain Layout
18704 ] As with paragraph styles, see
18705 \begin_inset CommandInset ref
18707 reference "subsec:Paragraph-Styles"
18715 \begin_layout Description
18716 \begin_inset Flex Code
18719 \begin_layout Plain Layout
18726 \begin_inset Flex Code
18729 \begin_layout Plain Layout
18738 \begin_inset space \thinspace{}
18742 \begin_inset Flex Code
18745 \begin_layout Plain Layout
18751 ] As with paragraph styles, see
18752 \begin_inset CommandInset ref
18754 reference "subsec:Paragraph-Styles"
18762 \begin_layout Description
18763 \begin_inset Flex Code
18766 \begin_layout Plain Layout
18772 As with paragraph styles, see
18773 \begin_inset CommandInset ref
18775 reference "subsec:Paragraph-Styles"
18782 \begin_layout Description
18783 \begin_inset Flex Code
18786 \begin_layout Plain Layout
18793 \begin_inset Flex Code
18796 \begin_layout Plain Layout
18802 ] The prefix to use when creating labels referring to insets of this type.
18803 This allows the use of formatted references.
18806 \begin_layout Description
18807 \begin_inset Flex Code
18810 \begin_layout Plain Layout
18817 \begin_inset Flex Code
18820 \begin_layout Plain Layout
18826 ] As with paragraph styles, see
18827 \begin_inset CommandInset ref
18829 reference "subsec:Paragraph-Styles"
18836 \begin_layout Description
18837 \begin_inset Flex Code
18840 \begin_layout Plain Layout
18847 \begin_inset Flex Code
18850 \begin_layout Plain Layout
18859 \begin_inset space \thinspace{}
18863 \begin_inset Flex Code
18866 \begin_layout Plain Layout
18872 ] Resets the \SpecialChar LaTeX
18873 arguments of this layout (as defined via the
18874 \begin_inset Flex Code
18877 \begin_layout Plain Layout
18884 This is useful if you have copied a style via
18885 \begin_inset Flex Code
18888 \begin_layout Plain Layout
18894 , but you do not want to inherit its (required and optional) arguments.
18897 \begin_layout Description
18898 \begin_inset Flex Code
18901 \begin_layout Plain Layout
18908 \begin_inset Flex Code
18911 \begin_layout Plain Layout
18918 \begin_inset space \thinspace{}
18922 \begin_inset Flex Code
18925 \begin_layout Plain Layout
18933 ] Whether this inset should use the font of its surrounding environment
18935 Default is false: use the font of the surrounding environment.
18938 \begin_layout Description
18939 \begin_inset Flex Code
18942 \begin_layout Plain Layout
18949 \begin_inset Flex Code
18952 \begin_layout Plain Layout
18958 ] A string that is put at the end of the layout content.
18959 A line break in the output can be indicated by
18960 \begin_inset Flex Code
18963 \begin_layout Plain Layout
18972 \begin_layout Description
18973 \begin_inset Flex Code
18976 \begin_layout Plain Layout
18983 \begin_inset Flex Code
18986 \begin_layout Plain Layout
18993 \begin_inset space \thinspace{}
18997 \begin_inset Flex Code
19000 \begin_layout Plain Layout
19008 ] Allow spell-checking the contents of this inset.
19012 \begin_layout Subsection
19014 \begin_inset CommandInset label
19016 name "subsec:Counters"
19023 \begin_layout Standard
19024 It is necessary to define the counters (
19025 \begin_inset Flex Noun
19028 \begin_layout Plain Layout
19035 \begin_inset Flex Noun
19038 \begin_layout Plain Layout
19044 , \SpecialChar ldots
19045 ) in the text class itself.
19046 The standard counters are defined in the file
19047 \begin_inset Flex Code
19050 \begin_layout Plain Layout
19056 , so you may have to do no more than add
19059 \begin_layout LyX-Code
19060 Input stdcounters.inc
19063 \begin_layout Standard
19064 to your layout file to get them to work.
19065 But if you want to define custom counters, then you can do so.
19066 The counter declaration must begin with:
19069 \begin_layout LyX-Code
19070 Counter CounterName
19073 \begin_layout Standard
19075 \begin_inset Flex Code
19078 \begin_layout Plain Layout
19084 ' is replaced by the name of the counter.
19085 And it must end with
19086 \begin_inset Quotes eld
19090 \begin_inset Flex Code
19093 \begin_layout Plain Layout
19100 \begin_inset Quotes erd
19104 The following parameters can also be used:
19107 \begin_layout Description
19108 \begin_inset Flex Code
19111 \begin_layout Plain Layout
19118 \begin_inset Flex Code
19121 \begin_layout Plain Layout
19127 ] Sets the initial value for the counter, to which it will be reset whenever
19129 Normally, one will want the default, 1.
19132 \begin_layout Description
19133 \begin_inset Flex Code
19136 \begin_layout Plain Layout
19143 \begin_inset Flex Code
19146 \begin_layout Plain Layout
19153 \begin_inset Quotes erd
19157 \begin_inset Quotes erd
19160 ] When defined, this string defines how the counter is displayed.
19161 Setting this value sets
19162 \begin_inset Flex Code
19165 \begin_layout Plain Layout
19166 LabelStringAppendix
19172 The following special constructs can be used in the string:
19173 \begin_inset Separator parbreak
19180 \begin_layout Itemize
19181 \begin_inset Flex Code
19184 \begin_layout Plain Layout
19192 will be replaced by the expansion of the
19193 \begin_inset Flex Code
19196 \begin_layout Plain Layout
19203 \begin_inset Flex Code
19206 \begin_layout Plain Layout
19207 LabelStringAppendix
19213 \begin_inset Flex Code
19216 \begin_layout Plain Layout
19226 \begin_layout Itemize
19227 counter values can be expressed using \SpecialChar LaTeX
19229 \begin_inset Newline newline
19233 \begin_inset Flex Code
19236 \begin_layout Plain Layout
19253 \begin_inset Flex Code
19256 \begin_layout Plain Layout
19268 \begin_layout Plain Layout
19278 Actually, the situation is a bit more complicated: any
19297 other than those described below will produce arabic numerals.
19298 It would not be surprising to see this change in the future.
19304 \begin_inset Flex Code
19307 \begin_layout Plain Layout
19313 : 1, 2, 3,\SpecialChar ldots
19315 \begin_inset Flex Code
19318 \begin_layout Plain Layout
19324 for lower-case letters: a, b, c, \SpecialChar ldots
19326 \begin_inset Flex Code
19329 \begin_layout Plain Layout
19335 for upper-case letters: A, B, C, \SpecialChar ldots
19337 \begin_inset Flex Code
19340 \begin_layout Plain Layout
19346 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
19348 \begin_inset Flex Code
19351 \begin_layout Plain Layout
19357 for upper-case roman numerals: I, II, III\SpecialChar ldots
19359 \begin_inset Flex Code
19362 \begin_layout Plain Layout
19368 for hebrew numerals.
19372 \begin_layout Standard
19373 If LabelString is not defined, a default value is constructed as follows:
19374 if the counter has a master counter
19375 \begin_inset Flex Code
19378 \begin_layout Plain Layout
19385 \begin_inset Flex Code
19388 \begin_layout Plain Layout
19395 \begin_inset Newline newline
19399 \begin_inset Flex Code
19402 \begin_layout Plain Layout
19412 is used; otherwise the string
19413 \begin_inset Flex Code
19416 \begin_layout Plain Layout
19427 \begin_layout Description
19428 \begin_inset Flex Code
19431 \begin_layout Plain Layout
19432 LabelStringAppendix
19438 \begin_inset Flex Code
19441 \begin_layout Plain Layout
19448 \begin_inset Quotes erd
19452 \begin_inset Quotes erd
19456 \begin_inset Flex Code
19459 \begin_layout Plain Layout
19465 , but for use in the Appendix.
19468 \begin_layout Description
19469 \begin_inset Flex Code
19472 \begin_layout Plain Layout
19479 \begin_inset Flex Code
19482 \begin_layout Plain Layout
19489 \begin_inset Quotes erd
19493 \begin_inset Quotes erd
19496 ] A format for use with formatted references to this counter.
19497 For example, one might want to have references to section numbers appear
19499 \begin_inset Quotes eld
19503 \begin_inset Quotes erd
19507 The string should contain
19508 \begin_inset Quotes eld
19512 \begin_inset Quotes erd
19516 This will be replaced by the counter number itself.
19517 So, for sections, it would be: Section ##.
19520 \begin_layout Description
19521 \begin_inset Flex Code
19524 \begin_layout Plain Layout
19531 \begin_inset Flex Code
19534 \begin_layout Plain Layout
19541 \begin_inset Quotes erd
19545 \begin_inset Quotes erd
19548 ] If this is set to the name of another counter, the present counter will
19549 be reset every time the other one is increased.
19551 \begin_inset Flex Code
19554 \begin_layout Plain Layout
19561 \begin_inset Flex Code
19564 \begin_layout Plain Layout
19573 \begin_layout Subsection
19575 \begin_inset CommandInset label
19577 name "subsec:Font-description"
19584 \begin_layout Standard
19585 A font description looks like this:
19588 \begin_layout LyX-Code
19602 \begin_layout LyX-Code
19606 \begin_layout LyX-Code
19610 \begin_layout Standard
19611 The following commands are available:
19614 \begin_layout Description
19615 \begin_inset Flex Code
19618 \begin_layout Plain Layout
19625 \begin_inset Flex Code
19628 \begin_layout Plain Layout
19637 \begin_inset Flex Code
19640 \begin_layout Plain Layout
19647 \begin_inset Flex Code
19650 \begin_layout Plain Layout
19657 \begin_inset Flex Code
19660 \begin_layout Plain Layout
19667 \begin_inset Flex Code
19670 \begin_layout Plain Layout
19677 \begin_inset Flex Code
19680 \begin_layout Plain Layout
19687 \begin_inset Flex Code
19690 \begin_layout Plain Layout
19697 \begin_inset Flex Code
19700 \begin_layout Plain Layout
19707 \begin_inset Flex Code
19710 \begin_layout Plain Layout
19719 \begin_layout Description
19720 \begin_inset Flex Code
19723 \begin_layout Plain Layout
19730 \begin_inset Flex Code
19733 \begin_layout Plain Layout
19742 \begin_inset Flex Code
19745 \begin_layout Plain Layout
19752 \begin_inset Flex Code
19755 \begin_layout Plain Layout
19764 \begin_layout Description
19765 \begin_inset Flex Code
19768 \begin_layout Plain Layout
19775 \begin_inset Flex Code
19778 \begin_layout Plain Layout
19784 ] Valid arguments are:
19785 \begin_inset Flex Code
19788 \begin_layout Plain Layout
19795 \begin_inset Flex Code
19798 \begin_layout Plain Layout
19805 \begin_inset Flex Code
19808 \begin_layout Plain Layout
19815 \begin_inset Flex Code
19818 \begin_layout Plain Layout
19825 \begin_inset Flex Code
19828 \begin_layout Plain Layout
19835 \begin_inset Flex Code
19838 \begin_layout Plain Layout
19845 \begin_inset Flex Code
19848 \begin_layout Plain Layout
19855 \begin_inset Flex Code
19858 \begin_layout Plain Layout
19865 \begin_inset Flex Code
19868 \begin_layout Plain Layout
19875 \begin_inset Flex Code
19878 \begin_layout Plain Layout
19885 \begin_inset Flex Code
19888 \begin_layout Plain Layout
19895 \begin_inset Flex Code
19898 \begin_layout Plain Layout
19905 Each of these turns on or off the corresponding attribute.
19907 \begin_inset Flex Code
19910 \begin_layout Plain Layout
19916 turns on emphasis, and
19917 \begin_inset Flex Code
19920 \begin_layout Plain Layout
19928 \begin_inset Newline newline
19931 If the latter seems puzzling, remember that the font settings for the present
19932 context are generally inherited from the surrounding context.
19934 \begin_inset Flex Code
19937 \begin_layout Plain Layout
19943 would turn off the emphasis that was anyway in effect, say, in a theorem
19947 \begin_layout Description
19948 \begin_inset Flex Code
19951 \begin_layout Plain Layout
19958 \begin_inset Flex Code
19961 \begin_layout Plain Layout
19970 \begin_inset Flex Code
19973 \begin_layout Plain Layout
19982 \begin_layout Description
19983 \begin_inset Flex Code
19986 \begin_layout Plain Layout
19993 \begin_inset Flex Code
19996 \begin_layout Plain Layout
20005 \begin_inset Flex Code
20008 \begin_layout Plain Layout
20015 \begin_inset Flex Code
20018 \begin_layout Plain Layout
20025 \begin_inset Flex Code
20028 \begin_layout Plain Layout
20037 \begin_layout Description
20038 \begin_inset Flex Code
20041 \begin_layout Plain Layout
20048 \begin_inset Flex Code
20051 \begin_layout Plain Layout
20058 \begin_inset Flex Code
20061 \begin_layout Plain Layout
20068 \begin_inset Flex Code
20071 \begin_layout Plain Layout
20080 \begin_inset Flex Code
20083 \begin_layout Plain Layout
20090 \begin_inset Flex Code
20093 \begin_layout Plain Layout
20100 \begin_inset Flex Code
20103 \begin_layout Plain Layout
20110 \begin_inset Flex Code
20113 \begin_layout Plain Layout
20120 \begin_inset Flex Code
20123 \begin_layout Plain Layout
20132 \begin_layout Subsection
20133 \begin_inset CommandInset label
20135 name "subsec:Citation-format-description"
20139 Citation format description
20142 \begin_layout Standard
20144 \begin_inset Flex Code
20147 \begin_layout Plain Layout
20153 blocks are used to describe how bibliographic information should be displayed,
20154 both within \SpecialChar LyX
20155 itself (in the citation dialog and in tooltips, for example)
20156 and in XHTML output.
20157 Such a block might look like this:
20160 \begin_layout LyX-Code
20164 \begin_layout LyX-Code
20168 \begin_layout LyX-Code
20172 \begin_layout LyX-Code
20176 \begin_layout Standard
20177 The individual lines define how the bibliographic information associated
20178 with an article or book, respectively, is to be displayed, and such a definitio
20179 n can be given for any `entry type' that might be present in a Bib\SpecialChar TeX
20182 defines a default format in the source code that will be used if no specific
20183 definition has been given.
20185 predefines several formats in the file
20186 \begin_inset Flex Code
20189 \begin_layout Plain Layout
20195 , which is included in most of \SpecialChar LyX
20196 's document classes.
20199 \begin_layout Standard
20200 The definitions use a simple language that allows Bib\SpecialChar TeX
20201 keys to be replaced
20203 Keys should be enclosed in
20204 \begin_inset Flex Code
20207 \begin_layout Plain Layout
20214 \begin_inset Flex Code
20217 \begin_layout Plain Layout
20224 So a simple definition might look like this:
20227 \begin_layout LyX-Code
20229 \begin_inset Quotes eld
20233 \begin_inset Quotes erd
20239 \begin_layout Standard
20240 This would print the author, followed by a comma, followed by the title,
20241 in quotes, followed by a period.
20244 \begin_layout Standard
20245 Of course, sometimes you may want to print a key only if it exists.
20246 This can be done by using a conditional construction, such as:
20247 \begin_inset Flex Code
20250 \begin_layout Plain Layout
20252 \begin_inset space ~
20262 \begin_inset Flex Code
20265 \begin_layout Plain Layout
20271 key exists, then print
20272 \begin_inset Quotes eld
20276 \begin_inset space ~
20280 \begin_inset Quotes erd
20283 followed by the volume key.
20284 It is also possible to have an else clause in the conditional, such as:
20285 \begin_inset Newline newline
20289 \begin_inset Flex Code
20292 \begin_layout Plain Layout
20293 {%author%[[%author%]][[%editor%, ed.]]}
20299 \begin_inset Newline newline
20303 \begin_inset Flex Code
20306 \begin_layout Plain Layout
20312 key is printed if it exists; otherwise, the editor key is printed, followed
20314 \begin_inset Quotes eld
20318 \begin_inset space ~
20322 \begin_inset Quotes erd
20325 Note that the key is again enclosed in
20326 \begin_inset Flex Code
20329 \begin_layout Plain Layout
20335 signs; the entire conditional is enclosed in braces; and the if and else
20336 clauses are enclosed in double brackets,
20337 \begin_inset Quotes eld
20341 \begin_inset Flex Code
20344 \begin_layout Plain Layout
20351 \begin_inset Quotes eld
20355 \begin_inset Quotes eld
20359 \begin_inset Flex Code
20362 \begin_layout Plain Layout
20369 \begin_inset Quotes erd
20373 There must be no space between any of these.
20376 \begin_layout Standard
20377 There is one other piece of syntax available in definitions, which looks
20379 \begin_inset Flex Code
20382 \begin_layout Plain Layout
20389 This defines a piece of formatting information that is to be used when
20391 \begin_inset Quotes eld
20395 \begin_inset Quotes erd
20399 Obviously, we do not want to output HTML tags when writing plain text,
20400 so they should be wrapped in
20401 \begin_inset Quotes eld
20405 \begin_inset Quotes erd
20409 \begin_inset Quotes eld
20413 \begin_inset Quotes erd
20419 \begin_layout Standard
20420 Two special sorts of definitions are also possible in a
20421 \begin_inset Flex Code
20424 \begin_layout Plain Layout
20431 An example of the first would be:
20434 \begin_layout LyX-Code
20436 \begin_inset Quotes eld
20440 \begin_inset Quotes erd
20446 \begin_layout Standard
20447 This is an abbreviation, or macro, and it can be used by treating it as
20449 \begin_inset Flex Code
20452 \begin_layout Plain Layout
20461 \begin_inset Flex Code
20464 \begin_layout Plain Layout
20470 exactly as it would treat its definition.
20471 So, let us issue the obvious
20479 \begin_layout LyX-Code
20483 \begin_layout Standard
20484 or anything like it.
20486 shouldn't go into an infinite loop, but it may go into a long one before
20490 \begin_layout Standard
20491 The second sort of special definition might look like this:
20494 \begin_layout LyX-Code
20498 \begin_layout Standard
20499 This defines a translatable piece of text, which allows relevant parts of
20500 the bibliography to be translated.
20501 It can be included in a definition by treating it as a key:
20502 \begin_inset Flex Code
20505 \begin_layout Plain Layout
20512 Several of these are predefined in
20513 \begin_inset Flex Code
20516 \begin_layout Plain Layout
20523 Note that these are not macros, in the sense just defined.
20524 They will not be expanded.
20527 \begin_layout Standard
20528 So here then is an example that use all these features:
20529 \begin_inset VSpace defskip
20535 \begin_layout Standard
20539 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
20542 \begin_layout Standard
20543 \begin_inset VSpace defskip
20546 This defines a macro that prints the author, followed by a comma, if the
20548 \begin_inset Flex Code
20551 \begin_layout Plain Layout
20557 key is defined, or else prints the name of the editor, followed by the
20559 \begin_inset Flex Code
20562 \begin_layout Plain Layout
20568 or its translation (it is by default
20569 \begin_inset Quotes eld
20573 \begin_inset Quotes erd
20577 \begin_inset Flex Code
20580 \begin_layout Plain Layout
20587 Note that this is in fact defined in
20588 \begin_inset Flex Code
20591 \begin_layout Plain Layout
20597 , so you can use it in your own definitions, or re-definitions, if you load
20601 \begin_layout Section
20602 \begin_inset CommandInset label
20604 name "sec:Tags-for-XHTML"
20608 Tags for XHTML output
20611 \begin_layout Standard
20612 As with \SpecialChar LaTeX
20613 or DocBook, the format of \SpecialChar LyX
20614 's XHTML output is also controlled by
20615 layout information.
20616 In general, \SpecialChar LyX
20617 provides sensible defaults and, as mentioned earlier, it will
20618 even construct default CSS style rules from the other layout tags.
20619 For example, \SpecialChar LyX
20620 will attempt to use the information provided in the
20621 \begin_inset Flex Code
20624 \begin_layout Plain Layout
20630 declaration for the Chapter style to write CSS that will appropriately
20631 format chapter headings.
20634 \begin_layout Standard
20635 In many cases, then, you may not have to do anything at all to get acceptable
20636 XHTML output for your own environments, custom insets, and so forth.
20637 But in some cases you will, and so \SpecialChar LyX
20638 provides a number of layout tags that
20639 can be used to customize the XHTML and CSS that are generated.
20642 \begin_layout Standard
20643 Note that there are two tags,
20644 \begin_inset Flex Code
20647 \begin_layout Plain Layout
20654 \begin_inset Flex Code
20657 \begin_layout Plain Layout
20663 that may appear outside style and inset declarations.
20665 \begin_inset CommandInset ref
20667 reference "subsec:General-text-class"
20671 for details on these.
20674 \begin_layout Subsection
20675 \begin_inset CommandInset label
20677 name "subsec:Paragraph-Style-XHTML"
20684 \begin_layout Standard
20685 The sort of XHTML \SpecialChar LyX
20686 outputs for a paragraph depends upon whether we are dealing
20687 with a normal paragraph, a command, or an environment, where this is itself
20688 determined by the contents of the corresponding
20689 \begin_inset Flex Code
20692 \begin_layout Plain Layout
20703 \begin_layout Standard
20704 For a command or normal paragraph, the output XHTML has the following form:
20707 \begin_layout LyX-Code
20709 \begin_inset Quotes erd
20713 \begin_inset Quotes erd
20719 \begin_layout LyX-Code
20721 \begin_inset Quotes erd
20725 \begin_inset Quotes erd
20731 \begin_layout LyX-Code
20732 Contents of the paragraph.
20735 \begin_layout LyX-Code
20739 \begin_layout Standard
20740 The label tags are of course omitted if the paragraph does not have a label.
20743 \begin_layout Standard
20744 For an environment that is not some sort of list, the XHTML takes this form:
20747 \begin_layout LyX-Code
20749 \begin_inset Quotes erd
20753 \begin_inset Quotes erd
20759 \begin_layout LyX-Code
20761 \begin_inset Quotes erd
20765 \begin_inset Quotes erd
20769 \begin_inset Quotes erd
20773 \begin_inset Quotes erd
20776 >Environment Label</labeltag>First paragraph.</itemtag>
20779 \begin_layout LyX-Code
20780 <itemtag>Second paragraph.</itemtag>
20783 \begin_layout LyX-Code
20787 \begin_layout Standard
20788 Note that the label is output only for the first paragraph, as it should
20789 be for a theorem, for example.
20793 \begin_layout Standard
20794 For a list, we have one of these forms:
20797 \begin_layout LyX-Code
20799 \begin_inset Quotes erd
20803 \begin_inset Quotes erd
20809 \begin_layout LyX-Code
20811 \begin_inset Quotes erd
20815 \begin_inset Quotes erd
20819 \begin_inset Quotes erd
20823 \begin_inset Quotes erd
20826 >List Label</labeltag>First item.</itemtag>
20829 \begin_layout LyX-Code
20831 \begin_inset Quotes erd
20835 \begin_inset Quotes erd
20839 \begin_inset Quotes erd
20843 \begin_inset Quotes erd
20846 >List Label</labeltag>Second item.</itemtag>
20849 \begin_layout LyX-Code
20853 \begin_layout LyX-Code
20857 \begin_layout LyX-Code
20859 \begin_inset Quotes erd
20863 \begin_inset Quotes erd
20869 \begin_layout LyX-Code
20871 \begin_inset Quotes erd
20875 \begin_inset Quotes erd
20878 >List Label</labeltag><itemtag attr=
20879 \begin_inset Quotes erd
20883 \begin_inset Quotes erd
20886 >First item.</itemtag>
20889 \begin_layout LyX-Code
20891 \begin_inset Quotes erd
20895 \begin_inset Quotes erd
20898 >List Label</labeltag><itemtag attr=
20899 \begin_inset Quotes erd
20903 \begin_inset Quotes erd
20906 >Second item.</itemtag>
20909 \begin_layout LyX-Code
20913 \begin_layout Standard
20914 Note the different orders of
20915 \begin_inset Flex Code
20918 \begin_layout Plain Layout
20925 \begin_inset Flex Code
20928 \begin_layout Plain Layout
20935 Which order we get depends upon the setting of
20936 \begin_inset Flex Code
20939 \begin_layout Plain Layout
20946 \begin_inset Flex Code
20949 \begin_layout Plain Layout
20955 is false (the default), you get the first of these, with the label within
20956 the item; if true, you get the second, with the label outside the item.
20959 \begin_layout Standard
20960 The specific tags and attributes output for each paragraph type can be controlle
20961 d by means of the layout tags we are about to describe.
20962 As mentioned earlier, however, \SpecialChar LyX
20963 uses sensible defaults for many of these,
20964 so you often may not need to do very much to get good XHTML output.
20965 Think of the available tags as there so you can tweak things to your liking.
20968 \begin_layout Description
20969 \begin_inset Flex Code
20972 \begin_layout Plain Layout
20979 \begin_inset Flex Code
20982 \begin_layout Plain Layout
20988 ] Specifies attribute information to be output with the main tag.
20990 \begin_inset Quotes eld
20994 \begin_inset Flex Code
20997 \begin_layout Plain Layout
21004 \begin_inset Quotes erd
21008 By default, \SpecialChar LyX
21010 \begin_inset Quotes eld
21014 \begin_inset Flex Code
21017 \begin_layout Plain Layout
21024 \begin_inset Quotes erd
21028 \begin_inset Flex Code
21031 \begin_layout Plain Layout
21037 is the \SpecialChar LyX
21038 name of the layout, made lowercase, for example: chapter.
21043 contain any style information.
21045 \begin_inset Flex Code
21048 \begin_layout Plain Layout
21057 \begin_layout Description
21058 \begin_inset Flex Code
21061 \begin_layout Plain Layout
21068 \begin_inset Flex Code
21071 \begin_layout Plain Layout
21081 ] Whether to output the default CSS information \SpecialChar LyX
21082 generates for this layout,
21083 even if additional information is explicitly provided via
21084 \begin_inset Flex Code
21087 \begin_layout Plain Layout
21095 \begin_inset Flex Code
21098 \begin_layout Plain Layout
21104 allows you to alter or augment the generated CSS, rather than to override
21107 \begin_inset Flex Code
21110 \begin_layout Plain Layout
21119 \begin_layout Description
21120 \begin_inset Flex Code
21123 \begin_layout Plain Layout
21130 \begin_inset Flex Code
21133 \begin_layout Plain Layout
21139 ] The tag to be used for individual paragraphs of environments, replacing
21141 \begin_inset Flex Code
21144 \begin_layout Plain Layout
21150 in the examples above.
21152 \begin_inset Flex Code
21155 \begin_layout Plain Layout
21164 \begin_layout Description
21165 \begin_inset Flex Code
21168 \begin_layout Plain Layout
21175 \begin_inset Flex Code
21178 \begin_layout Plain Layout
21184 ] Attributes for the item tag.
21186 \begin_inset Quotes eld
21190 \begin_inset Flex Code
21193 \begin_layout Plain Layout
21194 class=`layoutname_item'
21200 \begin_inset Quotes erd
21208 contain any style information.
21210 \begin_inset Flex Code
21213 \begin_layout Plain Layout
21222 \begin_layout Description
21223 \begin_inset Flex Code
21226 \begin_layout Plain Layout
21233 \begin_inset Flex Code
21236 \begin_layout Plain Layout
21242 ] The tag to be used for paragraph and item labels, replacing
21243 \begin_inset Flex Code
21246 \begin_layout Plain Layout
21252 in the examples above.
21254 \begin_inset Flex Code
21257 \begin_layout Plain Layout
21264 \begin_inset Flex Code
21267 \begin_layout Plain Layout
21274 \begin_inset Flex Code
21277 \begin_layout Plain Layout
21284 \begin_inset Flex Code
21287 \begin_layout Plain Layout
21288 Centered_Top_Environment
21293 , in which case it defaults to
21294 \begin_inset Flex Code
21297 \begin_layout Plain Layout
21306 \begin_layout Description
21307 \begin_inset Flex Code
21310 \begin_layout Plain Layout
21317 \begin_inset Flex Code
21320 \begin_layout Plain Layout
21326 ] Attributes for the label tag.
21328 \begin_inset Quotes eld
21332 \begin_inset Flex Code
21335 \begin_layout Plain Layout
21336 class=`layoutname_label'
21342 \begin_inset Quotes erd
21350 contain any style information.
21352 \begin_inset Flex Code
21355 \begin_layout Plain Layout
21364 \begin_layout Description
21365 \begin_inset Flex Code
21368 \begin_layout Plain Layout
21375 \begin_inset Flex Code
21378 \begin_layout Plain Layout
21388 ] Meaningful only for list-like environments, this tag controls whether
21389 the label tag is output before or inside the item tag.
21390 This is used, for example, in the description environment, where we want
21392 \begin_inset Flex Code
21395 \begin_layout Plain Layout
21396 <dt>\SpecialChar ldots
21397 </dt><dd>\SpecialChar ldots
21405 \begin_inset Flex Code
21408 \begin_layout Plain Layout
21414 : The label tag is output inside the item tag.
21417 \begin_layout Description
21418 \begin_inset Flex Code
21421 \begin_layout Plain Layout
21427 Information to be output in the
21428 \begin_inset Flex Code
21431 \begin_layout Plain Layout
21437 section when this style is used.
21438 This might, for example, be used to include a
21439 \begin_inset Flex Code
21442 \begin_layout Plain Layout
21449 \begin_inset Flex Code
21452 \begin_layout Plain Layout
21461 \begin_layout Description
21462 \begin_inset Flex Code
21465 \begin_layout Plain Layout
21471 CSS style information to be included when this style is used.
21472 Note that this will automatically be wrapped in a layout-generated
21473 \begin_inset Flex Code
21476 \begin_layout Plain Layout
21482 block, so only the CSS itself need be included.
21484 \begin_inset Flex Code
21487 \begin_layout Plain Layout
21496 \begin_layout Description
21497 \begin_inset Flex Code
21500 \begin_layout Plain Layout
21507 \begin_inset Flex Code
21510 \begin_layout Plain Layout
21516 ] The tag to be used for the main label, replacing
21517 \begin_inset Flex Code
21520 \begin_layout Plain Layout
21526 in the examples above.
21528 \begin_inset Flex Code
21531 \begin_layout Plain Layout
21540 \begin_layout Description
21541 \begin_inset Flex Code
21544 \begin_layout Plain Layout
21551 \begin_inset Flex Code
21554 \begin_layout Plain Layout
21564 ] Marks this style as the one to be used to generate the
21565 \begin_inset Flex Code
21568 \begin_layout Plain Layout
21574 tag for the XHTML file.
21575 By default, it is false.
21577 \begin_inset Flex Code
21580 \begin_layout Plain Layout
21586 file sets it to true for the
21587 \begin_inset Flex Code
21590 \begin_layout Plain Layout
21600 \begin_layout Subsection
21604 \begin_layout Standard
21605 The XHTML output of insets can also be controlled by information in layout
21610 \begin_layout Plain Layout
21611 At present, this is true only for
21612 \begin_inset Quotes eld
21616 \begin_inset Quotes erd
21619 insets (insets you can type into) and is not true for
21620 \begin_inset Quotes eld
21624 \begin_inset Quotes erd
21627 insets (insets that are associated with dialog boxes).
21632 Here, too, \SpecialChar LyX
21633 tries to provide sensible defaults, and it constructs default
21635 But everything can be customized.
21638 \begin_layout Standard
21639 The XHTML \SpecialChar LyX
21640 outputs for an inset has the following form:
21643 \begin_layout LyX-Code
21645 \begin_inset Quotes erd
21649 \begin_inset Quotes erd
21655 \begin_layout LyX-Code
21656 <labeltag>Label</labeltag>
21659 \begin_layout LyX-Code
21661 \begin_inset Quotes erd
21665 \begin_inset Quotes erd
21668 >Contents of the inset.</innertag>
21671 \begin_layout LyX-Code
21675 \begin_layout Standard
21676 If the inset permits multiple paragraphs—that is, if
21677 \begin_inset Flex Code
21680 \begin_layout Plain Layout
21686 is true—then the contents of the inset will itself be output as paragraphs
21687 formatted according to the styles used for those paragraphs (standard,
21688 quote, and the like).
21689 The label tag is of course omitted if the paragraph does not have a label
21690 and, at present, is always
21691 \begin_inset Flex Code
21694 \begin_layout Plain Layout
21701 The inner tag is optional and, by default, does not appear.
21704 \begin_layout Standard
21705 The specific tags and attributes output for each inset can be controlled
21706 by means of the following layout tags.
21709 \begin_layout Description
21710 \begin_inset Flex Code
21713 \begin_layout Plain Layout
21720 \begin_inset Flex Code
21723 \begin_layout Plain Layout
21729 ] Specifies attribute information to be output with the main tag.
21731 \begin_inset Quotes eld
21735 \begin_inset Flex Code
21738 \begin_layout Plain Layout
21739 class=`myinset' onclick=`\SpecialChar ldots
21746 \begin_inset Quotes erd
21750 By default, \SpecialChar LyX
21752 \begin_inset Quotes eld
21756 \begin_inset Flex Code
21759 \begin_layout Plain Layout
21766 \begin_inset Quotes erd
21770 \begin_inset Flex Code
21773 \begin_layout Plain Layout
21779 is the \SpecialChar LyX
21780 name of the inset, made lowercase and with non-alphanumeric characters
21781 converted to underscores, for example: footnote.
21784 \begin_layout Description
21785 \begin_inset Flex Code
21788 \begin_layout Plain Layout
21795 \begin_inset Flex Code
21798 \begin_layout Plain Layout
21808 ] Whether to output the default CSS information \SpecialChar LyX
21809 generates for this layout,
21810 even if additional information is explicitly provided via
21811 \begin_inset Flex Code
21814 \begin_layout Plain Layout
21822 \begin_inset Flex Code
21825 \begin_layout Plain Layout
21831 allows you to alter or augment the generated CSS, rather than to override
21836 \begin_layout Description
21837 \begin_inset Flex Code
21840 \begin_layout Plain Layout
21847 \begin_inset Flex Code
21850 \begin_layout Plain Layout
21856 ] Attributes for the inner tag.
21858 \begin_inset Quotes eld
21862 \begin_inset Flex Code
21865 \begin_layout Plain Layout
21866 class=`insetname_inner'
21872 \begin_inset Quotes erd
21878 \begin_layout Description
21879 \begin_inset Flex Code
21882 \begin_layout Plain Layout
21889 \begin_inset Flex Code
21892 \begin_layout Plain Layout
21898 ] The inner tag, replacing
21899 \begin_inset Flex Code
21902 \begin_layout Plain Layout
21908 in the examples above.
21909 By default, there is none.
21912 \begin_layout Description
21913 \begin_inset Flex Code
21916 \begin_layout Plain Layout
21923 \begin_inset Flex Code
21926 \begin_layout Plain Layout
21934 ] Whether this inset represents a standalone block of text (such as a footnote)
21935 or instead represents material that is included in the surrounding text
21936 (such as a branch).
21940 \begin_layout Description
21941 \begin_inset Flex Code
21944 \begin_layout Plain Layout
21951 \begin_inset Flex Code
21954 \begin_layout Plain Layout
21960 ] A label for this inset, possibly including a reference to a counter.
21961 For example, for footnote, it might be:
21962 \begin_inset Flex Code
21965 \begin_layout Plain Layout
21974 This is optional, and there is no default.
21977 \begin_layout Description
21978 \begin_inset Flex Code
21981 \begin_layout Plain Layout
21987 Information to be output in the
21988 \begin_inset Flex Code
21991 \begin_layout Plain Layout
21997 section when this style is used.
21998 This might, for example, be used to include a
21999 \begin_inset Flex Code
22002 \begin_layout Plain Layout
22009 \begin_inset Flex Code
22012 \begin_layout Plain Layout
22021 \begin_layout Description
22022 \begin_inset Flex Code
22025 \begin_layout Plain Layout
22031 CSS style information to be included when this style is used.
22032 Note that this will automatically be wrapped in a layout-generated
22033 \begin_inset Flex Code
22036 \begin_layout Plain Layout
22042 block, so only the CSS itself need be included.
22045 \begin_layout Description
22046 \begin_inset Flex Code
22049 \begin_layout Plain Layout
22056 \begin_inset Flex Code
22059 \begin_layout Plain Layout
22065 ] The tag to be used for the main label, replacing
22066 \begin_inset Flex Code
22069 \begin_layout Plain Layout
22075 in the examples above.
22076 The default depends upon the setting of
22077 \begin_inset Flex Code
22080 \begin_layout Plain Layout
22087 \begin_inset Flex Code
22090 \begin_layout Plain Layout
22096 is true, the default is
22097 \begin_inset Flex Code
22100 \begin_layout Plain Layout
22106 ; if it is false, the default is
22107 \begin_inset Flex Code
22110 \begin_layout Plain Layout
22119 \begin_layout Subsection
22123 \begin_layout Standard
22124 The XHTML output for floats too can be controlled by layout information.
22125 The output has the following form:
22128 \begin_layout LyX-Code
22130 \begin_inset Quotes erd
22134 \begin_inset Quotes erd
22140 \begin_layout LyX-Code
22141 Contents of the float.
22144 \begin_layout LyX-Code
22148 \begin_layout Standard
22149 The caption, if there is one, is a separate inset and will be output as
22151 Its appearance can be controlled via the InsetLayout for caption insets.
22155 \begin_layout Description
22156 \begin_inset Flex Code
22159 \begin_layout Plain Layout
22166 \begin_inset Flex Code
22169 \begin_layout Plain Layout
22175 ] Specifies attribute information to be output with the main tag.
22177 \begin_inset Quotes eld
22181 \begin_inset Flex Code
22184 \begin_layout Plain Layout
22185 class=`myfloat' onclick=`\SpecialChar ldots
22192 \begin_inset Quotes erd
22196 By default, \SpecialChar LyX
22198 \begin_inset Quotes eld
22202 \begin_inset Flex Code
22205 \begin_layout Plain Layout
22206 class=`float float-floattype'
22212 \begin_inset Quotes erd
22216 \begin_inset Flex Code
22219 \begin_layout Plain Layout
22225 is \SpecialChar LyX
22226 's name for this type of float, as determined by the float declaration
22228 \begin_inset CommandInset ref
22230 reference "subsec:Floats"
22234 ), though made lowercase and with non-alphanumeric characters converted
22235 to underscores, for example: float-table.
22238 \begin_layout Description
22239 \begin_inset Flex Code
22242 \begin_layout Plain Layout
22248 CSS style information to be included when this float is used.
22249 Note that this will automatically be wrapped in a layout-generated
22250 \begin_inset Flex Code
22253 \begin_layout Plain Layout
22259 block, so only the CSS itself need be included.
22262 \begin_layout Description
22263 \begin_inset Flex Code
22266 \begin_layout Plain Layout
22273 \begin_inset Flex Code
22276 \begin_layout Plain Layout
22282 ] The tag to be used for this float, replacing
22283 \begin_inset Quotes eld
22287 \begin_inset Flex Code
22290 \begin_layout Plain Layout
22297 \begin_inset Quotes erd
22300 in the example above.
22302 \begin_inset Flex Code
22305 \begin_layout Plain Layout
22311 and will rarely need changing.
22314 \begin_layout Subsection
22315 Bibliography formatting
22318 \begin_layout Standard
22319 The bibliography can be formatted using
22320 \begin_inset Flex Code
22323 \begin_layout Plain Layout
22331 \begin_inset CommandInset ref
22333 reference "subsec:Citation-format-description"
22340 \begin_layout Subsection
22345 \begin_layout Standard
22346 We have several times mentioned that \SpecialChar LyX
22347 will generate default CSS style rules
22348 for both insets and paragraph styles, based upon the other layout information
22350 In this section, we shall say a word about which layout information \SpecialChar LyX
22355 \begin_layout Standard
22356 At present, \SpecialChar LyX
22357 auto-generates CSS only for font information, making use of
22359 \begin_inset Flex Code
22362 \begin_layout Plain Layout
22369 \begin_inset Flex Code
22372 \begin_layout Plain Layout
22379 \begin_inset Flex Code
22382 \begin_layout Plain Layout
22389 \begin_inset Flex Code
22392 \begin_layout Plain Layout
22399 \begin_inset Flex Code
22402 \begin_layout Plain Layout
22409 \begin_inset CommandInset ref
22411 reference "subsec:Font-description"
22416 The translation is mostly straightforward and obvious.
22418 \begin_inset Quotes eld
22422 \begin_inset Flex Code
22425 \begin_layout Plain Layout
22432 \begin_inset Quotes erd
22436 \begin_inset Quotes eld
22440 \begin_inset Flex Code
22443 \begin_layout Plain Layout
22444 font-family: sans-serif;
22450 \begin_inset Quotes erd
22454 The correspondence of \SpecialChar LyX
22455 sizes and CSS sizes is a little less obvious but
22456 nonetheless intuitive.
22458 \begin_inset Flex Code
22461 \begin_layout Plain Layout
22468 \begin_inset Flex URL
22471 \begin_layout Plain Layout
22481 \begin_layout Chapter
22482 Including External Material
22483 \begin_inset CommandInset label
22485 name "chap:Including-External-Material"
22492 \begin_layout Standard
22493 \begin_inset Box Shadowbox
22503 height_special "totalheight"
22508 backgroundcolor "none"
22511 \begin_layout Plain Layout
22512 WARNING: This portion of the documentation has not been updated for some
22514 We certainly hope that it is still accurate, but there are no guarantees.
22522 \begin_layout Standard
22523 The use of material from sources external to \SpecialChar LyX
22524 is covered in detail in the
22530 This part of the manual covers what needs to happen behind the scenes for
22531 new sorts of material to be included.
22534 \begin_layout Section
22538 \begin_layout Standard
22539 The external material feature is based on the concept of a
22544 A template is a specification of how \SpecialChar LyX
22545 should interface with a certain kind
22547 As bundled, \SpecialChar LyX
22548 comes with predefined templates for Xfig figures, various
22549 raster format images, chess diagrams, and LilyPond music notation.
22550 You can check the actual list by using the menu
22551 \begin_inset Flex Noun
22554 \begin_layout Plain Layout
22555 Insert\SpecialChar menuseparator
22556 File\SpecialChar menuseparator
22563 Furthermore, it is possible to roll your own template to support a specific
22565 Later we'll describe in more detail what is involved, and hopefully you
22566 will submit all the templates you create so we can include them in a later
22571 \begin_layout Standard
22572 Another basic idea of the external material feature is to distinguish between
22573 the original file that serves as a base for final material and the produced
22574 file that is included in your exported or printed document.
22575 For example, consider the case of a figure produced with
22576 \begin_inset Flex Code
22579 \begin_layout Plain Layout
22586 The Xfig application itself works on an original file with the
22587 \begin_inset Flex Code
22590 \begin_layout Plain Layout
22597 Within Xfig, you create and change your figure, and when you are done,
22599 \begin_inset Flex Code
22602 \begin_layout Plain Layout
22609 When you want to include the figure in your document, you invoke
22610 \begin_inset Flex Code
22613 \begin_layout Plain Layout
22619 in order to create a PostScript file that can readily be included in your
22623 \begin_inset Flex Code
22626 \begin_layout Plain Layout
22632 file is the original file, and the PostScript file is the produced file.
22635 \begin_layout Standard
22636 This distinction is important in order to allow updating of the material
22637 while you are in the process of writing the document.
22638 Furthermore, it provides us with the flexibility that is needed to support
22639 multiple export formats.
22640 For instance, in the case of a plain text file, it is not exactly an award-winn
22641 ing idea to include the figure as raw PostScript.
22642 Instead, you would either prefer to just include a reference to the figure
22643 or try to invoke some graphics to ASCII converter to make the final result
22644 look similar to the real graphics.
22645 The external material management allows you to do this, because it is parametri
22646 zed on the different export formats that \SpecialChar LyX
22650 \begin_layout Standard
22651 Besides supporting the production of different products according to the
22652 exported format, it supports tight integration with editing and viewing
22654 In the case of an Xfig figure, you are able to invoke Xfig on the original
22655 file with a single click from within the external material dialog in \SpecialChar LyX
22657 and also preview the produced PostScript file with Ghostview with another
22659 No more fiddling around with the command line and/or file browsers to locate
22660 and manipulate the original or produced files.
22661 In this way, you are finally able to take full advantage of the many different
22662 applications that are relevant to use when you write your documents, and
22663 ultimately be more productive.
22666 \begin_layout Section
22667 The external template configuration file
22670 \begin_layout Standard
22671 It is relatively easy to add custom external template definitions to \SpecialChar LyX
22673 However, be aware that doing this in an careless manner most probably
22677 introduce an easily exploitable security hole.
22678 So before you do this, please read the discussion about security in
22679 \begin_inset CommandInset ref
22681 reference "sec:Security-discussion"
22688 \begin_layout Standard
22689 Having said that, we encourage you to submit any interesting templates that
22694 \begin_layout Standard
22695 The external templates are defined in the
22696 \begin_inset Flex Code
22699 \begin_layout Plain Layout
22700 LyXDir/lib/external_templates
22706 You can place your own version in
22707 \begin_inset Flex Code
22710 \begin_layout Plain Layout
22711 UserDir/external_templates
22719 \begin_layout Standard
22720 A typical template looks like this:
22723 \begin_layout LyX-Code
22727 \begin_layout LyX-Code
22728 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
22731 \begin_layout LyX-Code
22735 \begin_layout LyX-Code
22739 \begin_layout LyX-Code
22743 \begin_layout LyX-Code
22747 \begin_layout LyX-Code
22751 \begin_layout LyX-Code
22752 AutomaticProduction true
22755 \begin_layout LyX-Code
22759 \begin_layout LyX-Code
22763 \begin_layout LyX-Code
22764 Format \SpecialChar LaTeX
22768 \begin_layout LyX-Code
22769 TransformCommand Rotate RotationLatexCommand
22772 \begin_layout LyX-Code
22773 TransformCommand Resize ResizeLatexCommand
22776 \begin_layout LyX-Code
22777 Product "$$RotateFront$$ResizeFront
22780 \begin_layout LyX-Code
22785 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
22788 \begin_layout LyX-Code
22789 $$ResizeBack$$RotateBack"
22792 \begin_layout LyX-Code
22796 \begin_layout LyX-Code
22797 UpdateResult "$$AbsPath$$Basename.pstex_t"
22800 \begin_layout LyX-Code
22801 Requirement "graphicx"
22804 \begin_layout LyX-Code
22805 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
22808 \begin_layout LyX-Code
22809 ReferencedFile latex "$$AbsPath$$Basename.eps"
22812 \begin_layout LyX-Code
22813 ReferencedFile dvi "$$AbsPath$$Basename.eps"
22816 \begin_layout LyX-Code
22820 \begin_layout LyX-Code
22821 Format PDF\SpecialChar LaTeX
22825 \begin_layout LyX-Code
22826 TransformCommand Rotate RotationLatexCommand
22829 \begin_layout LyX-Code
22830 TransformCommand Resize ResizeLatexCommand
22833 \begin_layout LyX-Code
22834 Product "$$RotateFront$$ResizeFront
22837 \begin_layout LyX-Code
22842 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
22845 \begin_layout LyX-Code
22846 $$ResizeBack$$RotateBack"
22849 \begin_layout LyX-Code
22850 UpdateFormat pdftex
22853 \begin_layout LyX-Code
22854 UpdateResult "$$AbsPath$$Basename.pdftex_t"
22857 \begin_layout LyX-Code
22858 Requirement "graphicx"
22861 \begin_layout LyX-Code
22862 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
22865 \begin_layout LyX-Code
22866 ReferencedFile latex "$$AbsPath$$Basename.pdf"
22869 \begin_layout LyX-Code
22873 \begin_layout LyX-Code
22877 \begin_layout LyX-Code
22878 Product "$$Contents(
22880 "$$AbsPath$$Basename.asc
22885 \begin_layout LyX-Code
22886 UpdateFormat asciixfig
22889 \begin_layout LyX-Code
22890 UpdateResult "$$AbsPath$$Basename.asc"
22893 \begin_layout LyX-Code
22897 \begin_layout LyX-Code
22901 \begin_layout LyX-Code
22902 Product "<graphic fileref=
22904 "$$AbsOrRelPathMaster$$Basename.eps
22909 \begin_layout LyX-Code
22913 \begin_layout LyX-Code
22917 \begin_layout LyX-Code
22918 UpdateResult "$$AbsPath$$Basename.eps"
22921 \begin_layout LyX-Code
22922 ReferencedFile docbook "$$AbsPath$$Basename.eps"
22925 \begin_layout LyX-Code
22926 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
22929 \begin_layout LyX-Code
22933 \begin_layout LyX-Code
22934 Product "[XFig: $$FName]"
22937 \begin_layout LyX-Code
22941 \begin_layout LyX-Code
22945 \begin_layout Standard
22946 As you can see, the template is enclosed in
22947 \begin_inset Flex Code
22950 \begin_layout Plain Layout
22958 \begin_inset Flex Code
22961 \begin_layout Plain Layout
22968 It contains a header specifying some general settings and, for each supported
22969 primary document file format, a section
22970 \begin_inset Flex Code
22973 \begin_layout Plain Layout
22981 \begin_inset Flex Code
22984 \begin_layout Plain Layout
22993 \begin_layout Subsection
22994 The template header
22997 \begin_layout Description
22998 \begin_inset Flex Code
23001 \begin_layout Plain Layout
23002 AutomaticProduction
23003 \begin_inset space ~
23011 Whether the file represented by the template must be generated by \SpecialChar LyX
23013 This command must occur exactly once.
23016 \begin_layout Description
23017 \begin_inset Flex Code
23020 \begin_layout Plain Layout
23022 \begin_inset space ~
23030 A glob pattern that is used in the file dialog to filter out the desired
23032 If there is more than one possible file extension (e.
23033 \begin_inset space \thinspace{}
23037 \begin_inset space \space{}
23041 \begin_inset Flex Code
23044 \begin_layout Plain Layout
23051 \begin_inset Flex Code
23054 \begin_layout Plain Layout
23060 ), use something like
23061 \begin_inset Flex Code
23064 \begin_layout Plain Layout
23071 This command must occur exactly once.
23074 \begin_layout Description
23075 \begin_inset Flex Code
23078 \begin_layout Plain Layout
23080 \begin_inset space ~
23088 The text that is displayed on the button.
23089 This command must occur exactly once.
23092 \begin_layout Description
23093 \begin_inset Flex Code
23096 \begin_layout Plain Layout
23098 \begin_inset space ~
23102 \begin_inset space ~
23110 The help text that is used in the External dialog.
23111 Provide enough information to explain to the user just what the template
23112 can provide him with.
23113 This command must occur exactly once.
23116 \begin_layout Description
23117 \begin_inset Flex Code
23120 \begin_layout Plain Layout
23122 \begin_inset space ~
23130 The file format of the original file.
23131 This must be the name of a format that is known to \SpecialChar LyX
23133 \begin_inset CommandInset ref
23135 reference "sec:Formats"
23141 \begin_inset Quotes eld
23145 \begin_inset Flex Code
23148 \begin_layout Plain Layout
23155 \begin_inset Quotes erd
23158 if the template can handle original files of more than one format.
23160 will attempt to interrogate the file itself in order to deduce its format
23162 This command must occur exactly once.
23165 \begin_layout Description
23166 \begin_inset Flex Code
23169 \begin_layout Plain Layout
23171 \begin_inset space ~
23179 A unique name for the template.
23180 It must not contain substitution macros (see below).
23183 \begin_layout Description
23184 \begin_inset Flex Code
23187 \begin_layout Plain Layout
23189 \begin_inset space ~
23192 Rotate|Resize|Clip|Extra
23197 This command specifies which transformations are supported by this template.
23198 It may occur zero or more times.
23199 This command enables the corresponding tabs in the external dialog.
23201 \begin_inset Flex Code
23204 \begin_layout Plain Layout
23210 command must have either a corresponding
23211 \begin_inset Flex Code
23214 \begin_layout Plain Layout
23221 \begin_inset Flex Code
23224 \begin_layout Plain Layout
23231 \begin_inset Flex Code
23234 \begin_layout Plain Layout
23241 Otherwise the transformation will not be supported by that format.
23244 \begin_layout Subsection
23248 \begin_layout Description
23249 \begin_inset Flex Code
23252 \begin_layout Plain Layout
23254 \begin_inset space ~
23257 LaTeX|PDFLaTeX|PlainText|DocBook
23262 The primary document file format that this format definition is for.
23263 Not every template has a sensible representation in all document file formats.
23264 Please define nevertheless a
23265 \begin_inset Flex Code
23268 \begin_layout Plain Layout
23274 section for all templates.
23275 Use a dummy text when no representation is available.
23276 Then you can at least see a reference to the external material in the exported
23280 \begin_layout Description
23281 \begin_inset Flex Code
23284 \begin_layout Plain Layout
23286 \begin_inset space ~
23290 \begin_inset space ~
23298 This command defines an additional macro
23299 \begin_inset Flex Code
23302 \begin_layout Plain Layout
23308 for substitution in
23309 \begin_inset Flex Code
23312 \begin_layout Plain Layout
23320 \begin_inset Flex Code
23323 \begin_layout Plain Layout
23329 itself may contain substitution macros.
23330 The advantage over using
23331 \begin_inset Flex Code
23334 \begin_layout Plain Layout
23341 \begin_inset Flex Code
23344 \begin_layout Plain Layout
23350 is that the substituted value of
23351 \begin_inset Flex Code
23354 \begin_layout Plain Layout
23360 is sanitized so that it is a valid optional argument in the document format.
23361 This command may occur zero or more times.
23364 \begin_layout Description
23365 \begin_inset Flex Code
23368 \begin_layout Plain Layout
23370 \begin_inset space ~
23378 The text that is inserted in the exported document.
23379 This is actually the most important command and can be quite complex.
23380 This command must occur exactly once.
23383 \begin_layout Description
23384 \begin_inset Flex Code
23387 \begin_layout Plain Layout
23389 \begin_inset space ~
23397 This command specifies a preamble snippet that will be included in the
23400 It has to be defined using
23401 \begin_inset Flex Code
23404 \begin_layout Plain Layout
23412 \begin_inset Flex Code
23415 \begin_layout Plain Layout
23422 This command may occur zero or more times.
23425 \begin_layout Description
23426 \begin_inset Flex Code
23429 \begin_layout Plain Layout
23431 \begin_inset space ~
23435 \begin_inset space ~
23443 This command denotes files that are created by the conversion process and
23444 are needed for a particular export format.
23445 If the filename is relative, it is interpreted relative to the master document.
23446 This command may be given zero or more times.
23449 \begin_layout Description
23450 \begin_inset Flex Code
23453 \begin_layout Plain Layout
23455 \begin_inset space ~
23463 The name of a required \SpecialChar LaTeX
23465 The package is included via
23466 \begin_inset Flex Code
23469 \begin_layout Plain Layout
23477 in the \SpecialChar LaTeX
23479 This command may occur zero or more times.
23482 \begin_layout Description
23483 \begin_inset Flex Code
23486 \begin_layout Plain Layout
23488 \begin_inset space ~
23492 \begin_inset space ~
23495 RotationLatexCommand
23500 This command specifies that the built in \SpecialChar LaTeX
23501 command should be used for rotation.
23502 This command may occur once or not at all.
23505 \begin_layout Description
23506 \begin_inset Flex Code
23509 \begin_layout Plain Layout
23511 \begin_inset space ~
23515 \begin_inset space ~
23523 This command specifies that the built in \SpecialChar LaTeX
23524 command should be used for resizing.
23525 This command may occur once or not at all.
23528 \begin_layout Description
23529 \begin_inset Flex Code
23532 \begin_layout Plain Layout
23534 \begin_inset space ~
23538 \begin_inset space ~
23541 RotationLatexOption
23546 This command specifies that rotation is done via an optional argument.
23547 This command may occur once or not at all.
23550 \begin_layout Description
23551 \begin_inset Flex Code
23554 \begin_layout Plain Layout
23556 \begin_inset space ~
23560 \begin_inset space ~
23568 This command specifies that resizing is done via an optional argument.
23569 This command may occur once or not at all.
23572 \begin_layout Description
23573 \begin_inset Flex Code
23576 \begin_layout Plain Layout
23578 \begin_inset space ~
23582 \begin_inset space ~
23590 This command specifies that clipping is done via an optional argument.
23591 This command may occur once or not at all.
23594 \begin_layout Description
23595 \begin_inset Flex Code
23598 \begin_layout Plain Layout
23600 \begin_inset space ~
23604 \begin_inset space ~
23612 This command specifies that an extra optional argument is used.
23613 This command may occur once or not at all.
23616 \begin_layout Description
23617 \begin_inset Flex Code
23620 \begin_layout Plain Layout
23622 \begin_inset space ~
23630 The file format of the converted file.
23631 This must be the name of a format that is known to \SpecialChar LyX
23633 \begin_inset Flex Noun
23636 \begin_layout Plain Layout
23637 Tools\SpecialChar menuseparator
23638 Preferences\SpecialChar menuseparator
23639 File Handling\SpecialChar menuseparator
23646 This command must occur exactly once.
23647 If the resulting file format is PDF, you need to specify the format
23648 \begin_inset Flex Code
23651 \begin_layout Plain Layout
23658 This is the PDF format used for including graphics.
23659 The other defined PDF formats are for document export.
23662 \begin_layout Description
23663 \begin_inset Flex Code
23666 \begin_layout Plain Layout
23668 \begin_inset space ~
23676 The file name of the converted file.
23677 The file name must be absolute.
23678 This command must occur exactly once.
23681 \begin_layout Subsection
23682 Preamble definitions
23685 \begin_layout Standard
23686 The external template configuration file may contain additional preamble
23687 definitions enclosed by
23688 \begin_inset Flex Code
23691 \begin_layout Plain Layout
23699 \begin_inset Flex Code
23702 \begin_layout Plain Layout
23709 They can be used by the templates in the
23710 \begin_inset Flex Code
23713 \begin_layout Plain Layout
23722 \begin_layout Section
23723 The substitution mechanism
23726 \begin_layout Standard
23727 When the external material facility invokes an external program, it is done
23728 on the basis of a command defined in the template configuration file.
23729 These commands can contain various macros that are expanded before execution.
23730 Execution always take place in the directory of the containing document.
23733 \begin_layout Standard
23734 Also, whenever external material is to be displayed, the name will be produced
23735 by the substitution mechanism, and most other commands in the template
23736 definition support substitution as well.
23739 \begin_layout Standard
23740 The available macros are the following:
23743 \begin_layout Description
23744 \begin_inset Flex Code
23747 \begin_layout Plain Layout
23748 $$AbsOrRelPathMaster
23753 The file path, absolute or relative to the master \SpecialChar LyX
23757 \begin_layout Description
23758 \begin_inset Flex Code
23761 \begin_layout Plain Layout
23762 $$AbsOrRelPathParent
23767 The file path, absolute or relative to the \SpecialChar LyX
23771 \begin_layout Description
23772 \begin_inset Flex Code
23775 \begin_layout Plain Layout
23781 The absolute file path.
23784 \begin_layout Description
23785 \begin_inset Flex Code
23788 \begin_layout Plain Layout
23794 The filename without path and without the extension.
23797 \begin_layout Description
23798 \begin_inset Flex Code
23801 \begin_layout Plain Layout
23803 \begin_inset Quotes eld
23807 \begin_inset Quotes erd
23815 This macro will expand to the contents of the file with the name
23816 \begin_inset Flex Code
23819 \begin_layout Plain Layout
23828 \begin_layout Description
23829 \begin_inset Flex Code
23832 \begin_layout Plain Layout
23838 The file extension (including the dot).
23841 \begin_layout Description
23842 \begin_inset Flex Code
23845 \begin_layout Plain Layout
23851 This will be the string
23852 \begin_inset Quotes eld
23856 \begin_inset Quotes erd
23859 if the file is in JPEG format, otherwise it will be the string
23860 \begin_inset Quotes eld
23864 \begin_inset Quotes erd
23868 This is useful to avoid uneeded conversions for output formats that support
23869 both PNG and JPEG fomats.
23870 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
23875 \begin_layout Description
23876 \begin_inset Flex Code
23879 \begin_layout Plain Layout
23885 The filename of the file specified in the external material dialog.
23886 This is either an absolute name, or it is relative to the \SpecialChar LyX
23890 \begin_layout Description
23891 \begin_inset Flex Code
23894 \begin_layout Plain Layout
23901 \begin_inset Flex Code
23904 \begin_layout Plain Layout
23910 (absolute name or relative to the \SpecialChar LyX
23914 \begin_layout Description
23915 \begin_inset Flex Code
23918 \begin_layout Plain Layout
23924 The file path, relative to the master \SpecialChar LyX
23928 \begin_layout Description
23929 \begin_inset Flex Code
23932 \begin_layout Plain Layout
23938 The file path, relative to the \SpecialChar LyX
23942 \begin_layout Description
23943 \begin_inset Flex Code
23946 \begin_layout Plain Layout
23952 This macro will expand to the absolute path of the system directory.
23953 This is typically used to point to the various helper scripts that are
23954 bundled with \SpecialChar LyX
23958 \begin_layout Description
23959 \begin_inset Flex Code
23962 \begin_layout Plain Layout
23968 A name and full path to a temporary file which will be automatically deleted
23969 whenever the containing document is closed, or the external material insertion
23973 \begin_layout Standard
23974 All path macros contain a trailing directory separator, so you can construct
23976 \begin_inset space \thinspace{}
23980 \begin_inset space \space{}
23983 the absolute filename with
23984 \begin_inset Flex Code
23987 \begin_layout Plain Layout
23988 $$AbsPath$$Basename$$Extension
23996 \begin_layout Standard
23997 The macros above are substituted in all commands unless otherwise noted.
23999 \begin_inset Flex Code
24002 \begin_layout Plain Layout
24008 supports additionally the following substitutions if they are enabled by
24010 \begin_inset Flex Code
24013 \begin_layout Plain Layout
24020 \begin_inset Flex Code
24023 \begin_layout Plain Layout
24032 \begin_layout Description
24033 \begin_inset Flex Code
24036 \begin_layout Plain Layout
24042 The front part of the resize command.
24045 \begin_layout Description
24046 \begin_inset Flex Code
24049 \begin_layout Plain Layout
24055 The back part of the resize command.
24058 \begin_layout Description
24059 \begin_inset Flex Code
24062 \begin_layout Plain Layout
24068 The front part of the rotation command.
24071 \begin_layout Description
24072 \begin_inset Flex Code
24075 \begin_layout Plain Layout
24081 The back part of the rotation command.
24084 \begin_layout Standard
24085 The value string of the
24086 \begin_inset Flex Code
24089 \begin_layout Plain Layout
24095 command supports additionally the following substitutions if they are enabled
24097 \begin_inset Flex Code
24100 \begin_layout Plain Layout
24107 \begin_inset Flex Code
24110 \begin_layout Plain Layout
24119 \begin_layout Description
24120 \begin_inset Flex Code
24123 \begin_layout Plain Layout
24132 \begin_layout Description
24133 \begin_inset Flex Code
24136 \begin_layout Plain Layout
24145 \begin_layout Description
24146 \begin_inset Flex Code
24149 \begin_layout Plain Layout
24158 \begin_layout Description
24159 \begin_inset Flex Code
24162 \begin_layout Plain Layout
24168 The rotation option.
24171 \begin_layout Standard
24172 You may ask why there are so many path macros.
24173 There are mainly two reasons:
24176 \begin_layout Enumerate
24177 Relative and absolute file names should remain relative or absolute, respectivel
24179 Users may have reasons to prefer either form.
24180 Relative names are useful for portable documents that should work on different
24181 machines, for example.
24182 Absolute names may be required by some programs.
24185 \begin_layout Enumerate
24187 treats relative file names differently than \SpecialChar LyX
24188 and other programs in nested
24190 For \SpecialChar LyX
24191 , a relative file name is always relative to the document that contains
24193 For \SpecialChar LaTeX
24194 , it is always relative to the master document.
24195 These two definitions are identical if you have only one document, but
24196 differ if you have a master document that includes part documents.
24197 That means that relative filenames must be transformed when presented to
24200 Fortunately \SpecialChar LyX
24201 does this automatically for you if you choose the right macros.
24204 \begin_layout Standard
24205 So which path macro should be used in new template definitions? The rule
24209 \begin_layout Itemize
24211 \begin_inset Flex Code
24214 \begin_layout Plain Layout
24220 if an absolute path is required.
24223 \begin_layout Itemize
24225 \begin_inset Flex Code
24228 \begin_layout Plain Layout
24229 $$AbsOrRelPathMaster
24234 if the substituted string is some kind of \SpecialChar LaTeX
24238 \begin_layout Itemize
24240 \begin_inset Flex Code
24243 \begin_layout Plain Layout
24244 $$AbsOrRelPathParent
24249 in order to preserve the user's choice.
24252 \begin_layout Standard
24253 There are special cases where this rule does not work and e.
24254 \begin_inset space \thinspace{}
24258 \begin_inset space \space{}
24261 relative names are needed, but normally it will work just fine.
24262 One example for such a case is the command
24263 \begin_inset Flex Code
24266 \begin_layout Plain Layout
24267 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
24272 in the XFig template above: We can't use the absolute name because the
24274 \begin_inset Flex Code
24277 \begin_layout Plain Layout
24283 files needs the relative name in order to rewrite the file content.
24286 \begin_layout Section
24287 Security discussion
24288 \begin_inset CommandInset label
24290 name "sec:Security-discussion"
24297 \begin_layout Standard
24298 The external material feature interfaces with a lot of external programs
24299 and does so automatically, so we have to consider the security implications
24301 In particular, since you have the option of including your own filenames
24302 and/or parameter strings and those are expanded into a command, it seems
24303 that it would be possible to create a malicious document which executes
24304 arbitrary commands when a user views or prints the document.
24305 This is something we definitely want to avoid.
24308 \begin_layout Standard
24309 However, since the external program commands are specified in the template
24310 configuration file only, there are no security issues if \SpecialChar LyX
24311 is properly configure
24312 d with safe templates only.
24313 This is so because the external programs are invoked with the
24314 \begin_inset Flex Code
24317 \begin_layout Plain Layout
24323 -system call rather than the
24324 \begin_inset Flex Code
24327 \begin_layout Plain Layout
24333 system-call, so it's not possible to execute arbitrary commands from the
24334 filename or parameter section via the shell.
24337 \begin_layout Standard
24338 This also implies that you are restricted in what command strings you can
24339 use in the external material templates.
24340 In particular, pipes and redirection are not readily available.
24341 This has to be so if \SpecialChar LyX
24342 should remain safe.
24343 If you want to use some of the shell features, you should write a safe
24344 script to do this in a controlled manner, and then invoke the script from
24345 the command string.
24349 \begin_layout Standard
24350 It is possible to design a template that interacts directly with the shell,
24351 but since this would allow a malicious user to execute arbitrary commands
24352 by writing clever filenames and/or parameters, we generally recommend that
24353 you only use safe scripts that work with the
24354 \begin_inset Flex Code
24357 \begin_layout Plain Layout
24363 system call in a controlled manner.
24364 Of course, for use in a controlled environment, it can be tempting to just
24365 fall back to use ordinary shell scripts.
24366 If you do so, be aware that you
24370 provide an easily exploitable security hole in your system.
24371 Of course it stands to reason that such unsafe templates will never be
24372 included in the standard \SpecialChar LyX
24373 distribution, although we do encourage people
24374 to submit new templates in the open source tradition.
24375 But \SpecialChar LyX
24376 as shipped from the official distribution channels will never have
24380 \begin_layout Standard
24381 Including external material provides a lot of power, and you have to be
24382 careful not to introduce security hazards with this power.
24383 A subtle error in a single line in an innocent looking script can open
24384 the door to huge security problems.
24385 So if you do not fully understand the issues, we recommend that you consult
24386 a knowledgeable security professional or the \SpecialChar LyX
24387 development team if you have
24388 any questions about whether a given template is safe or not.
24389 And do this before you use it in an uncontrolled environment.
24392 \begin_layout Chapter
24394 List of supported \SpecialChar LyX
24395 functions to be used in layouts
24396 \begin_inset CommandInset label
24398 name "chap:List-of-functions"
24405 \begin_layout Standard
24407 \begin_inset Tabular
24408 <lyxtabular version="3" rows="11" columns="8">
24409 <features tabularvalignment="middle">
24410 <column alignment="left" valignment="top">
24411 <column alignment="left" valignment="top">
24412 <column alignment="left" valignment="top">
24413 <column alignment="left" valignment="top">
24414 <column alignment="left" valignment="top">
24415 <column alignment="left" valignment="top">
24416 <column alignment="left" valignment="top">
24417 <column alignment="left" valignment="top">
24419 <cell alignment="left" valignment="top" usebox="none">
24422 \begin_layout Plain Layout
24428 <cell alignment="left" valignment="top" usebox="none">
24431 \begin_layout Plain Layout
24437 <cell alignment="left" valignment="top" usebox="none">
24440 \begin_layout Plain Layout
24446 <cell alignment="left" valignment="top" usebox="none">
24449 \begin_layout Plain Layout
24455 <cell alignment="center" valignment="top" usebox="none">
24458 \begin_layout Plain Layout
24464 <cell alignment="center" valignment="top" usebox="none">
24467 \begin_layout Plain Layout
24473 <cell alignment="center" valignment="top" usebox="none">
24476 \begin_layout Plain Layout
24482 <cell alignment="center" valignment="top" usebox="none">
24485 \begin_layout Plain Layout
24493 <cell alignment="left" valignment="top" usebox="none">
24496 \begin_layout Plain Layout
24502 <cell alignment="left" valignment="top" usebox="none">
24505 \begin_layout Plain Layout
24511 <cell alignment="left" valignment="top" usebox="none">
24514 \begin_layout Plain Layout
24520 <cell alignment="left" valignment="top" usebox="none">
24523 \begin_layout Plain Layout
24529 <cell alignment="center" valignment="top" usebox="none">
24532 \begin_layout Plain Layout
24538 <cell alignment="center" valignment="top" usebox="none">
24541 \begin_layout Plain Layout
24547 <cell alignment="center" valignment="top" usebox="none">
24550 \begin_layout Plain Layout
24556 <cell alignment="center" valignment="top" usebox="none">
24559 \begin_layout Plain Layout
24567 <cell alignment="left" valignment="top" usebox="none">
24570 \begin_layout Plain Layout
24576 <cell alignment="left" valignment="top" usebox="none">
24579 \begin_layout Plain Layout
24585 <cell alignment="left" valignment="top" usebox="none">
24588 \begin_layout Plain Layout
24594 <cell alignment="left" valignment="top" usebox="none">
24597 \begin_layout Plain Layout
24603 <cell alignment="center" valignment="top" usebox="none">
24606 \begin_layout Plain Layout
24612 <cell alignment="center" valignment="top" usebox="none">
24615 \begin_layout Plain Layout
24621 <cell alignment="center" valignment="top" usebox="none">
24624 \begin_layout Plain Layout
24630 <cell alignment="center" valignment="top" usebox="none">
24633 \begin_layout Plain Layout
24641 <cell alignment="left" valignment="top" usebox="none">
24644 \begin_layout Plain Layout
24650 <cell alignment="left" valignment="top" usebox="none">
24653 \begin_layout Plain Layout
24659 <cell alignment="left" valignment="top" usebox="none">
24662 \begin_layout Plain Layout
24668 <cell alignment="left" valignment="top" usebox="none">
24671 \begin_layout Plain Layout
24677 <cell alignment="center" valignment="top" usebox="none">
24680 \begin_layout Plain Layout
24686 <cell alignment="center" valignment="top" usebox="none">
24689 \begin_layout Plain Layout
24695 <cell alignment="center" valignment="top" usebox="none">
24698 \begin_layout Plain Layout
24704 <cell alignment="center" valignment="top" usebox="none">
24707 \begin_layout Plain Layout
24715 <cell alignment="left" valignment="top" usebox="none">
24718 \begin_layout Plain Layout
24724 <cell alignment="left" valignment="top" usebox="none">
24727 \begin_layout Plain Layout
24733 <cell alignment="left" valignment="top" usebox="none">
24736 \begin_layout Plain Layout
24742 <cell alignment="left" valignment="top" usebox="none">
24745 \begin_layout Plain Layout
24751 <cell alignment="center" valignment="top" usebox="none">
24754 \begin_layout Plain Layout
24760 <cell alignment="center" valignment="top" usebox="none">
24763 \begin_layout Plain Layout
24769 <cell alignment="center" valignment="top" usebox="none">
24772 \begin_layout Plain Layout
24778 <cell alignment="center" valignment="top" usebox="none">
24781 \begin_layout Plain Layout
24789 <cell alignment="left" valignment="top" usebox="none">
24792 \begin_layout Plain Layout
24798 <cell alignment="left" valignment="top" usebox="none">
24801 \begin_layout Plain Layout
24807 <cell alignment="left" valignment="top" usebox="none">
24810 \begin_layout Plain Layout
24816 <cell alignment="left" valignment="top" usebox="none">
24819 \begin_layout Plain Layout
24825 <cell alignment="center" valignment="top" usebox="none">
24828 \begin_layout Plain Layout
24834 <cell alignment="center" valignment="top" usebox="none">
24837 \begin_layout Plain Layout
24843 <cell alignment="center" valignment="top" usebox="none">
24846 \begin_layout Plain Layout
24852 <cell alignment="center" valignment="top" usebox="none">
24855 \begin_layout Plain Layout
24863 <cell alignment="left" valignment="top" usebox="none">
24866 \begin_layout Plain Layout
24872 <cell alignment="left" valignment="top" usebox="none">
24875 \begin_layout Plain Layout
24881 <cell alignment="left" valignment="top" usebox="none">
24884 \begin_layout Plain Layout
24890 <cell alignment="left" valignment="top" usebox="none">
24893 \begin_layout Plain Layout
24899 <cell alignment="center" valignment="top" usebox="none">
24902 \begin_layout Plain Layout
24908 <cell alignment="center" valignment="top" usebox="none">
24911 \begin_layout Plain Layout
24917 <cell alignment="center" valignment="top" usebox="none">
24920 \begin_layout Plain Layout
24926 <cell alignment="center" valignment="top" usebox="none">
24929 \begin_layout Plain Layout
24937 <cell alignment="left" valignment="top" usebox="none">
24940 \begin_layout Plain Layout
24946 <cell alignment="left" valignment="top" usebox="none">
24949 \begin_layout Plain Layout
24955 <cell alignment="left" valignment="top" usebox="none">
24958 \begin_layout Plain Layout
24964 <cell alignment="left" valignment="top" usebox="none">
24967 \begin_layout Plain Layout
24973 <cell alignment="center" valignment="top" usebox="none">
24976 \begin_layout Plain Layout
24982 <cell alignment="center" valignment="top" usebox="none">
24985 \begin_layout Plain Layout
24991 <cell alignment="center" valignment="top" usebox="none">
24994 \begin_layout Plain Layout
25000 <cell alignment="center" valignment="top" usebox="none">
25003 \begin_layout Plain Layout
25011 <cell alignment="left" valignment="top" usebox="none">
25014 \begin_layout Plain Layout
25020 <cell alignment="left" valignment="top" usebox="none">
25023 \begin_layout Plain Layout
25029 <cell alignment="left" valignment="top" usebox="none">
25032 \begin_layout Plain Layout
25038 <cell alignment="left" valignment="top" usebox="none">
25041 \begin_layout Plain Layout
25047 <cell alignment="center" valignment="top" usebox="none">
25050 \begin_layout Plain Layout
25056 <cell alignment="center" valignment="top" usebox="none">
25059 \begin_layout Plain Layout
25065 <cell alignment="center" valignment="top" usebox="none">
25068 \begin_layout Plain Layout
25074 <cell alignment="center" valignment="top" usebox="none">
25077 \begin_layout Plain Layout
25085 <cell alignment="left" valignment="top" usebox="none">
25088 \begin_layout Plain Layout
25094 <cell alignment="left" valignment="top" usebox="none">
25097 \begin_layout Plain Layout
25103 <cell alignment="left" valignment="top" usebox="none">
25106 \begin_layout Plain Layout
25112 <cell alignment="left" valignment="top" usebox="none">
25115 \begin_layout Plain Layout
25121 <cell alignment="center" valignment="top" usebox="none">
25124 \begin_layout Plain Layout
25130 <cell alignment="center" valignment="top" usebox="none">
25133 \begin_layout Plain Layout
25139 <cell alignment="center" valignment="top" usebox="none">
25142 \begin_layout Plain Layout
25148 <cell alignment="center" valignment="top" usebox="none">
25151 \begin_layout Plain Layout
25159 <cell alignment="center" valignment="top" usebox="none">
25162 \begin_layout Plain Layout
25168 <cell alignment="center" valignment="top" usebox="none">
25171 \begin_layout Plain Layout
25177 <cell alignment="center" valignment="top" usebox="none">
25180 \begin_layout Plain Layout
25186 <cell alignment="center" valignment="top" usebox="none">
25189 \begin_layout Plain Layout
25195 <cell alignment="center" valignment="top" usebox="none">
25198 \begin_layout Plain Layout
25204 <cell alignment="center" valignment="top" usebox="none">
25207 \begin_layout Plain Layout
25213 <cell alignment="center" valignment="top" usebox="none">
25216 \begin_layout Plain Layout
25222 <cell alignment="center" valignment="top" usebox="none">
25225 \begin_layout Plain Layout
25239 \begin_layout Chapter
25240 Names of available colors to be used in layouts
25241 \begin_inset CommandInset label
25243 name "chap:Names-of-colors"
25250 \begin_layout Standard
25251 The colors listed here are the standard colors and the those that you can
25252 adjust in the \SpecialChar LyX
25256 \begin_layout Description
25269 No particular color – clear or default
25272 \begin_layout Description
25276 \begin_layout Description
25280 \begin_layout Description
25284 \begin_layout Description
25288 \begin_layout Description
25292 \begin_layout Description
25296 \begin_layout Description
25300 \begin_layout Description
25304 \begin_layout Description
25305 added_space Added space marker color
25308 \begin_layout Description
25309 addedtext Added text color
25312 \begin_layout Description
25313 appendix Appendix marker color
25316 \begin_layout Description
25317 background Background color
25320 \begin_layout Description
25321 bottomarea Bottom area color
25324 \begin_layout Description
25325 branchlabel Label color for branches
25328 \begin_layout Description
25329 buttonbg Color used for bottom background
25332 \begin_layout Description
25333 buttonhoverbg Color used for button background under focus
25336 \begin_layout Description
25337 buttonframe Color for inset button frames
25340 \begin_layout Description
25341 changebar Changebar color
25344 \begin_layout Description
25345 changedtextauthor1 Changed text color author 1
25348 \begin_layout Description
25349 changedtextauthor2 Changed text color author 2
25352 \begin_layout Description
25353 changedtextauthor3 Changed text color author 3
25356 \begin_layout Description
25357 changedtextauthor4 Changed text color author 4
25360 \begin_layout Description
25361 changedtextauthor5 Changed text color author 5
25364 \begin_layout Description
25365 collapsable_inset_frame Collapsable insets framecolor
25368 \begin_layout Description
25369 collapsable_inset_text Collapsable insets text color
25372 \begin_layout Description
25373 command Text color for command insets
25376 \begin_layout Description
25377 commandbg Background color for command insets
25380 \begin_layout Description
25381 commandframe Frame color for command insets
25384 \begin_layout Description
25385 comment color for comments
25388 \begin_layout Description
25389 commentbg Background color of comments
25392 \begin_layout Description
25393 cursor Cursor color
25396 \begin_layout Description
25397 deletedtext Deleted text color
25400 \begin_layout Description
25401 deletedtextmodifier Deleted text modifying color
25404 \begin_layout Description
25405 depthbar Color for the depth bars in the margin
25408 \begin_layout Description
25409 eolmarker End of line marker color
25412 \begin_layout Description
25413 error Color of the \SpecialChar LaTeX
25417 \begin_layout Description
25418 footlabel Label color for footnotes
25421 \begin_layout Description
25422 graphicsbg Graphics inset background color
25425 \begin_layout Description
25426 greyedout Label color for greyedout insets
25429 \begin_layout Description
25430 greyedoutbg Background color of greyedout inset
25433 \begin_layout Description
25434 greyedouttext Color for greyedout inset text
25437 \begin_layout Description
25438 indexlabel Label color for index insets
25441 \begin_layout Description
25442 ignore The color is ignored
25445 \begin_layout Description
25446 inherit The color is inherited
25449 \begin_layout Description
25450 inlinecompletion Inline completion color
25453 \begin_layout Description
25454 insetbg Inset marker background color
25457 \begin_layout Description
25458 insetframe Inset marker frame color
25461 \begin_layout Description
25462 language Color for marking foreign language words
25465 \begin_layout Description
25466 latex Text color in \SpecialChar LaTeX
25470 \begin_layout Description
25471 listingsbg Background color of listings inset
25474 \begin_layout Description
25475 marginlabel Label color for margin notes
25478 \begin_layout Description
25479 math Math inset text color
25482 \begin_layout Description
25483 mathbg Math inset background color
25486 \begin_layout Description
25487 mathcorners Math inset frame color not under focus
25490 \begin_layout Description
25491 mathframe Math inset frame color under focus
25494 \begin_layout Description
25495 mathline Math line color
25498 \begin_layout Description
25499 mathmacrobg Macro math inset background color
25502 \begin_layout Description
25503 mathmacroblend Macro math blended color
25506 \begin_layout Description
25507 mathmacroframe Macro math frame color
25510 \begin_layout Description
25511 mathmacrohoverbg Macro math inset background color hovered
25514 \begin_layout Description
25515 mathmacrolabel Macro math label color
25518 \begin_layout Description
25519 mathmacronewarg Macro template color for new parameters
25522 \begin_layout Description
25523 mathmacrooldarg Macro template color for old parameters
25526 \begin_layout Description
25527 newpage New page color
25530 \begin_layout Description
25531 nonunique_inlinecompletion Inline completion color for the non-unique part
25534 \begin_layout Description
25535 notebg Background color of notes
25538 \begin_layout Description
25539 notelabel Label color for notes
25542 \begin_layout Description
25543 pagebreak Page break/line break color
25546 \begin_layout Description
25547 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
25550 \begin_layout Description
25551 phantomtext Text color for phantom insets
25554 \begin_layout Description
25555 preview The color used for previews
25558 \begin_layout Description
25559 previewframe Preview frame color
25562 \begin_layout Description
25563 regexpframe Color for regexp frame
25566 \begin_layout Description
25567 selection Background color of selected text
25570 \begin_layout Description
25571 selectiontext Foreground color of selected text
25574 \begin_layout Description
25575 shadedbg Background color of shaded box
25578 \begin_layout Description
25579 special Special chars text color
25582 \begin_layout Description
25583 tabularline Table line color
25586 \begin_layout Description
25587 tabularonoffline Table line color
25590 \begin_layout Description
25591 urllabel Label color for URL insets
25594 \begin_layout Description
25595 urltext Color for URL inset text