1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
9 % DO NOT ALTER THIS PREAMBLE!!!
11 % This preamble is designed to ensure that this document prints
12 % out as advertised. If you mess with this preamble,
13 % parts of this document may not print out as expected. If you
14 % have problems LaTeXing this file, please contact
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
18 % the pages of the TOC is numbered roman
19 % and a pdf-bookmark for the TOC is added
20 \let\myTOC\tableofcontents
21 \renewcommand\tableofcontents{%
23 \pdfbookmark[1]{\contentsname}{}
27 % increase link area for cross-references and autoname them,
28 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
29 \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
30 \@ifpackageloaded{babel}{
31 \addto\extrasenglish{%
32 \renewcommand*{\equationautorefname}[1]{}%
33 \renewcommand{\sectionautorefname}{sec.\negthinspace}%
34 \renewcommand{\subsectionautorefname}{sec.\negthinspace}%
35 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
39 \options bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
44 \maintain_unincluded_children false
46 \language_package default
49 \font_roman "lmodern" "default"
50 \font_sans "lmss" "default"
51 \font_typewriter "lmtt" "default"
52 \font_math "auto" "auto"
53 \font_default_family default
54 \use_non_tex_fonts false
57 \font_sf_scale 100 100
58 \font_tt_scale 100 100
60 \use_dash_ligatures true
62 \default_output_format pdf2
64 \bibtex_command default
65 \index_command default
69 \pdf_title "LyX Configuration Manual"
70 \pdf_author "LyX Team"
71 \pdf_subject "LyX-documentation Customization"
72 \pdf_keywords "LyX, documentation, customization"
74 \pdf_bookmarksnumbered true
75 \pdf_bookmarksopen true
76 \pdf_bookmarksopenlevel 1
81 \pdf_pdfusetitle false
82 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
85 \use_package amsmath 1
86 \use_package amssymb 1
89 \use_package mathdots 1
90 \use_package mathtools 1
92 \use_package stackrel 1
93 \use_package stmaryrd 1
94 \use_package undertilde 1
96 \cite_engine_type default
100 \paperorientation portrait
107 \notefontcolor #0000ff
119 \paragraph_separation indent
120 \paragraph_indentation default
122 \math_indentation default
123 \math_numbering_side default
124 \quotes_style english
128 \paperpagestyle headings
130 \tracking_changes true
131 \output_changes false
135 \author -712698321 "Jürgen Spitzmüller"
136 \author -495245474 "Jean-Marc Lasgouttes"
137 \author 731793113 "Richard Kimberly Heck" rikiheck@lyx.org
143 Customizing \SpecialChar LyX
144 : Features for the Advanced User
148 by the \SpecialChar LyX
153 \begin_layout Plain Layout
155 If you have comments or error corrections, please send them to the \SpecialChar LyX
158 \begin_inset CommandInset href
160 target "lyx-docs@lists.lyx.org"
168 \begin_inset Quotes eld
172 \begin_inset Quotes erd
175 in the subject header, and please cc the current maintainer of this file,
176 Richard Heck <rgheck@comcast.net>.
182 \begin_inset Newline newline
186 \begin_inset Newline newline
192 \begin_layout Standard
193 \begin_inset CommandInset toc
194 LatexCommand tableofcontents
201 \begin_layout Standard
202 \begin_inset Note Note
205 \begin_layout Plain Layout
206 Please use change tracking when modifying this document.
207 This makes it easier for our translators to recognize things that have
208 been changed, and it helps the maintainer keep up-to-date with what's been
217 \begin_layout Chapter
221 \begin_layout Standard
222 This manual covers the customization features present in \SpecialChar LyX
224 In it, we discuss issues like keyboard shortcuts, screen previewing options,
225 printer options, sending commands to \SpecialChar LyX
226 via the \SpecialChar LyX
227 Server, internationalization,
228 installing new \SpecialChar LaTeX
229 classes and \SpecialChar LyX
231 We can't possibly hope to touch on everything you can change—our developers
232 add new features faster than we can document them—but we will explain the
233 most common customizations and hopefully point you in the right direction
234 for some of the more obscure ones.
237 \begin_layout Standard
238 \begin_inset Branch OutDated
242 \begin_layout Standard
243 Information from previous versions of this document that now seems to be
244 outdated is contained in the OutDated branch of this document.
245 By default, this information will not appear in the \SpecialChar LaTeX
254 \begin_layout Chapter
259 \begin_layout Standard
260 This chapter aims to help you to find your way through the \SpecialChar LyX
263 Before continuing to read this chapter, you should find out where your
265 library and user directories are by using
266 \begin_inset Flex Noun
269 \begin_layout Plain Layout
270 Help\SpecialChar menuseparator
281 The library directory is the place where \SpecialChar LyX
282 places its system-wide configuration
283 files; the user directory is where you can place your modified versions.
284 We will call the former
285 \begin_inset Flex Code
288 \begin_layout Plain Layout
295 \begin_inset Flex Noun
298 \begin_layout Plain Layout
304 in the remainder of this document.
308 \begin_layout Section
310 \begin_inset Flex Code
313 \begin_layout Plain Layout
322 \begin_layout Standard
323 \begin_inset Flex Code
326 \begin_layout Plain Layout
332 and its sub-directories contain a number of files and that can be used
333 to customize \SpecialChar LyX
335 You can change many of these files from within \SpecialChar LyX
337 \begin_inset Flex Noun
340 \begin_layout Plain Layout
341 Tools\SpecialChar menuseparator
348 Most customization that you will want to do in \SpecialChar LyX
349 is possible through this
351 However, many other inner aspects of \SpecialChar LyX
352 can be customized by modifying the
354 \begin_inset Flex Code
357 \begin_layout Plain Layout
364 These files fall in different categories, described in the following subsection
368 \begin_layout Subsection
369 Automatically generated files
372 \begin_layout Standard
373 The files, which are to be found in
374 \begin_inset Flex Noun
377 \begin_layout Plain Layout
383 , are generated when you configure \SpecialChar LyX
385 They contain various default values that are guessed by inspection.
386 In general, it is not a good idea to modify them, since they might be overwritt
390 \begin_layout Labeling
391 \labelwidthstring 00.00.0000
392 \begin_inset Flex Code
395 \begin_layout Plain Layout
401 contains defaults for various commands.
404 \begin_layout Labeling
405 \labelwidthstring 00.00.0000
406 \begin_inset Flex Code
409 \begin_layout Plain Layout
415 contains the list of packages that have been recognized by \SpecialChar LyX
417 It is currently unused by the \SpecialChar LyX
418 program itself, but the information extracted,
419 and more, is made available with
420 \begin_inset Flex Noun
423 \begin_layout Plain Layout
424 Help\SpecialChar menuseparator
438 \begin_layout Labeling
439 \labelwidthstring 00.00.0000
440 \begin_inset Flex Code
443 \begin_layout Plain Layout
449 the list of text classes that have been found in your
450 \begin_inset Flex Code
453 \begin_layout Plain Layout
459 directories, along with the associated \SpecialChar LaTeX
460 document class and their description.
463 \begin_layout Labeling
464 \labelwidthstring 00.00.0000
465 \begin_inset Flex Code
468 \begin_layout Plain Layout
474 the list of layout modules found in your
475 \begin_inset Flex Code
478 \begin_layout Plain Layout
487 \begin_layout Labeling
488 \labelwidthstring 00.00.0000
489 \begin_inset Flex Code
492 \begin_layout Plain Layout
498 lists of various sorts of \SpecialChar LaTeX
499 -related files found on your system
502 \begin_layout Labeling
503 \labelwidthstring 00.00.0000
504 \begin_inset Flex Code
507 \begin_layout Plain Layout
508 doc/\SpecialChar LaTeX
514 is automatically generated during configuration from the file
515 \begin_inset Flex Code
518 \begin_layout Plain Layout
526 It contains information on your \SpecialChar LaTeX
530 \begin_layout Subsection
534 \begin_layout Standard
535 These directories are duplicated between
536 \begin_inset Flex Code
539 \begin_layout Plain Layout
546 \begin_inset Flex Code
549 \begin_layout Plain Layout
556 If a particular files exists in both places, the one in
557 \begin_inset Flex Code
560 \begin_layout Plain Layout
569 \begin_layout Labeling
570 \labelwidthstring 00.00.0000
571 \begin_inset Flex Code
574 \begin_layout Plain Layout
580 this directory contains files with the extension
581 \begin_inset Flex Code
584 \begin_layout Plain Layout
590 that define the keybindings used in \SpecialChar LyX
592 If there exists an internationalized version of the bind file named
593 \begin_inset Flex Code
596 \begin_layout Plain Layout
602 , that will be used first.
605 \begin_layout Labeling
606 \labelwidthstring 00.00.0000
607 \begin_inset Flex Code
610 \begin_layout Plain Layout
616 contains files with the extension
617 \begin_inset Flex Code
620 \begin_layout Plain Layout
626 which define the diverse citation possibilities (natbib, biblatex etc.).
628 \begin_inset CommandInset ref
630 reference "subsec:Cite-Engine-Files"
640 \begin_layout Labeling
641 \labelwidthstring 00.00.0000
642 \begin_inset Flex Code
645 \begin_layout Plain Layout
651 contains graphics files that can be included in documents.
655 \begin_layout Labeling
656 \labelwidthstring 00.00.0000
657 \begin_inset Flex Code
660 \begin_layout Plain Layout
666 contains \SpecialChar LyX
667 documentation files (including the one you are currently reading).
669 \begin_inset Flex Code
672 \begin_layout Plain Layout
679 deserves special attention, as noted above.
680 The internationalized help docs are in subdirectories
681 \begin_inset Flex Code
684 \begin_layout Plain Layout
691 \begin_inset Quotes eld
695 \begin_inset Quotes erd
698 is the ISO language code.
700 \begin_inset CommandInset ref
702 reference "cha:Internationalizing-LyX"
709 \begin_layout Labeling
710 \labelwidthstring 00.00.0000
711 \begin_inset Flex Code
714 \begin_layout Plain Layout
720 contains example files that explain how to use some features.
721 In the file browser, press the
722 \begin_inset Flex Noun
725 \begin_layout Plain Layout
734 \begin_layout Labeling
735 \labelwidthstring 00.00.0000
736 \begin_inset Flex Code
739 \begin_layout Plain Layout
745 contains image files that are used by the
746 \begin_inset Flex Noun
749 \begin_layout Plain Layout
756 In addition, it also contains the individual icons used in the toolbar
757 and the banners that can be shown when \SpecialChar LyX
761 \begin_layout Labeling
762 \labelwidthstring 00.00.0000
763 \begin_inset Flex Code
766 \begin_layout Plain Layout
772 contains keyboard keymapping files.
774 \begin_inset CommandInset ref
776 reference "sec:International-Keymap-Stuff"
783 \begin_layout Labeling
784 \labelwidthstring 00.00.0000
785 \begin_inset Flex Code
788 \begin_layout Plain Layout
794 contains the text class and module files described in
795 \begin_inset CommandInset ref
797 reference "cha:Installing-New-Document"
804 \begin_layout Labeling
805 \labelwidthstring 00.00.0000
806 \begin_inset Flex Code
809 \begin_layout Plain Layout
816 \begin_inset Flex Code
819 \begin_layout Plain Layout
825 Python scripts used to convert between \SpecialChar LyX
827 These can be run from the command line if, say, you want to batch-convert
831 \begin_layout Labeling
832 \labelwidthstring 00.00.0000
833 \begin_inset Flex Code
836 \begin_layout Plain Layout
842 contains some files that demonstrate the capabilities of the
843 \begin_inset Flex Noun
846 \begin_layout Plain Layout
857 Also contains some scripts used by \SpecialChar LyX
861 \begin_layout Labeling
862 \labelwidthstring 00.00.0000
863 \begin_inset Flex Code
866 \begin_layout Plain Layout
872 contains the standard \SpecialChar LyX
873 template files described in
874 \begin_inset CommandInset ref
876 reference "subsec:Creating-Templates"
883 \begin_layout Labeling
884 \labelwidthstring 00.00.0000
885 \begin_inset Flex Code
888 \begin_layout Plain Layout
894 contains files with the extension
895 \begin_inset Flex Code
898 \begin_layout Plain Layout
904 that define the user interface to \SpecialChar LyX
906 That is, the files define which items appear in which menus and the items
907 appearing on the toolbar.
910 \begin_layout Labeling
911 \labelwidthstring 00.00.0000
912 \begin_inset Flex Code
915 \begin_layout Plain Layout
921 contains files with the extension
922 \begin_inset Flex Code
925 \begin_layout Plain Layout
931 which define the templates for the insertion of external material to a
934 \begin_inset CommandInset ref
936 reference "chap:Including-External-Material"
943 \begin_layout Subsection
944 Files you don't want to modify
947 \begin_layout Standard
948 These files are used internally by \SpecialChar LyX
949 and you generally do not need to modify
950 them unless you are a developer.
953 \begin_layout Labeling
954 \labelwidthstring 00.00.0000
955 \begin_inset Flex Code
958 \begin_layout Plain Layout
964 this file contains the list of \SpecialChar LyX
966 The contents are displayed with the menu entry
967 \begin_inset Flex Noun
970 \begin_layout Plain Layout
971 Help\SpecialChar menuseparator
984 \begin_layout Labeling
985 \labelwidthstring 00.00.0000
986 \begin_inset Flex Code
989 \begin_layout Plain Layout
995 this is a \SpecialChar LaTeX
996 script used during the configuration process.
1000 \begin_layout Labeling
1001 \labelwidthstring 00.00.0000
1002 \begin_inset Flex Code
1005 \begin_layout Plain Layout
1011 this is a Python script that is used to re-configure \SpecialChar LyX
1013 It creates configuration files in the directory it was run from.
1016 \begin_layout Subsection
1017 Other files needing a line or two
1020 \begin_layout Labeling
1021 \labelwidthstring 00.00.0000
1022 \begin_inset Flex Code
1025 \begin_layout Plain Layout
1031 this contains tables describing how different character encodings can be
1035 \begin_layout Labeling
1036 \labelwidthstring 00.00.0000
1037 \begin_inset Flex Code
1040 \begin_layout Plain Layout
1046 this file contains a list of all the languages currently supported by \SpecialChar LyX
1050 \begin_layout Labeling
1051 \labelwidthstring 00.00.0000
1052 \begin_inset Flex Code
1055 \begin_layout Plain Layout
1061 contains information about the supported fonts.
1064 \begin_layout Labeling
1065 \labelwidthstring 00.00.0000
1066 \begin_inset Flex Code
1069 \begin_layout Plain Layout
1075 this file contains translations for internationalized paragraph styles
1077 \begin_inset CommandInset ref
1079 reference "subsec:I18n"
1086 \begin_layout Labeling
1087 \labelwidthstring 00.00.0000
1088 \begin_inset Flex Code
1091 \begin_layout Plain Layout
1097 this file contains information about Unicode-encoded glyphs and the way
1098 they are supported by \SpecialChar LyX
1099 via \SpecialChar LaTeX
1103 \begin_layout Section
1104 Your local configuration directory
1107 \begin_layout Standard
1108 Even if you are using \SpecialChar LyX
1109 as an unprivileged user, you might want to change
1111 configuration for your own use.
1113 \begin_inset Flex Code
1116 \begin_layout Plain Layout
1122 directory contains all your personal configuration files.
1123 This is the directory described as
1124 \begin_inset Quotes eld
1128 \begin_inset Quotes erd
1132 \begin_inset Flex Noun
1135 \begin_layout Plain Layout
1136 Help\SpecialChar menuseparator
1138 \begin_inset space ~
1147 This directory is used as a mirror of
1148 \begin_inset Flex Code
1151 \begin_layout Plain Layout
1157 , which means that every file in
1158 \begin_inset Flex Code
1161 \begin_layout Plain Layout
1167 is a replacement for the corresponding file in
1168 \begin_inset Flex Code
1171 \begin_layout Plain Layout
1178 Any configuration file described in the above sections can be placed either
1179 in the system-wide directory, in which case it will affect all users, or
1180 in your local directory for your own use.
1183 \begin_layout Standard
1184 To make things clearer, let's provide a few examples:
1187 \begin_layout Itemize
1188 The preferences set in the
1189 \begin_inset Flex Noun
1192 \begin_layout Plain Layout
1193 Tools\SpecialChar menuseparator
1199 dialog are saved to a file
1200 \begin_inset Flex Code
1203 \begin_layout Plain Layout
1210 \begin_inset Flex Code
1213 \begin_layout Plain Layout
1222 \begin_layout Itemize
1223 When you reconfigure using
1224 \begin_inset Flex Noun
1227 \begin_layout Plain Layout
1228 Tools\SpecialChar menuseparator
1236 \begin_inset Flex Code
1239 \begin_layout Plain Layout
1245 script, and the resulting files are written in your local configuration
1247 This means that any additional text class file that you might have added
1249 \begin_inset Flex Code
1252 \begin_layout Plain Layout
1258 will be added to the list of classes in the
1259 \begin_inset Flex Noun
1262 \begin_layout Plain Layout
1263 Document\SpecialChar menuseparator
1272 \begin_layout Itemize
1273 If you get some updated documentation from \SpecialChar LyX
1274 ftp site and cannot install
1275 it because you do not have sysadmin rights on your system, you can just
1277 \begin_inset Flex Code
1280 \begin_layout Plain Layout
1286 and the items in the
1287 \begin_inset Flex Noun
1290 \begin_layout Plain Layout
1296 menu will open them!
1299 \begin_layout Section
1300 Running \SpecialChar LyX
1301 with multiple configurations
1304 \begin_layout Standard
1305 The configuration freedom of the local configuration directory may not suffice
1306 if you want to have more than one configuration at your disposal.
1307 For example, you may want to be use different key bindings or printer settings
1309 You can achieve this by having several such directories.
1310 You then specify which directory to use at run-time.
1313 \begin_layout Standard
1314 Invoking \SpecialChar LyX
1315 with the command line switch
1316 \begin_inset Flex Code
1319 \begin_layout Plain Layout
1329 instructs the program to read the configuration from that directory, and
1330 not from the default directory.
1331 (You can determine the default directory by running \SpecialChar LyX
1333 \begin_inset Flex Code
1336 \begin_layout Plain Layout
1342 switch.) If the specified directory does not exist, \SpecialChar LyX
1344 for you, just like it does for the default directory on the first time
1345 you run the program.
1346 You can modify the configuration options in this additional user directory
1347 exactly as you would for the default directory.
1348 These directories are completely independent (but read on).
1349 Note that setting the environment variable
1350 \begin_inset Flex Code
1353 \begin_layout Plain Layout
1359 to some value has exactly the same effect.
1362 \begin_layout Standard
1363 Having several configurations also requires more maintenance: if you want
1364 to add a new layout to
1365 \begin_inset Flex Code
1368 \begin_layout Plain Layout
1374 which you want available from all your configurations, you must add it
1375 to each directory separately.
1376 You can avoid this with the following trick: after \SpecialChar LyX
1377 creates the additional
1378 directory, most of the subdirectories (see above) are empty.
1379 If you want the new configuration to mirror an existing one, replace the
1380 empty subdirectory with a symbolic link to the matching subdirectory in
1381 the existing configuration.
1383 \begin_inset Flex Code
1386 \begin_layout Plain Layout
1392 subdirectory, however, since it contains a file written by the configuration
1393 script (also accessible through
1394 \begin_inset Flex Noun
1397 \begin_layout Plain Layout
1398 Tools\SpecialChar menuseparator
1404 ) which is configuration-specific.
1407 \begin_layout Chapter
1408 The Preferences dialog
1411 \begin_layout Standard
1412 All options of the preferences dialog are described in the Appendix
1414 The Preferences Dialog
1421 For some options you might find here more details.
1424 \begin_layout Section
1426 \begin_inset CommandInset label
1435 \begin_layout Standard
1436 The first step is to define your file formats if they are not already defined.
1438 \begin_inset Flex Noun
1441 \begin_layout Plain Layout
1442 Tools\SpecialChar menuseparator
1450 \begin_inset Flex Noun
1453 \begin_layout Plain Layout
1454 File Handling\SpecialChar menuseparator
1461 \begin_inset Flex Noun
1464 \begin_layout Plain Layout
1470 button to define your new format.
1472 \begin_inset Flex Noun
1475 \begin_layout Plain Layout
1481 field contains the name used to identify the format in the GUI.
1483 \begin_inset Flex Noun
1486 \begin_layout Plain Layout
1492 is used to identify the format internally.
1493 You will also need to enter a file extension.
1494 These are all required.
1496 \begin_inset Flex Noun
1499 \begin_layout Plain Layout
1505 field is used to provide a keyboard shortcut on the menus.
1506 (For example, pressing
1507 \begin_inset Flex Noun
1510 \begin_layout Plain Layout
1517 \begin_inset Flex Noun
1520 \begin_layout Plain Layout
1521 Document\SpecialChar menuseparator
1522 View (Other Formats)\SpecialChar menuseparator
1531 \begin_layout Standard
1533 \begin_inset Flex Noun
1536 \begin_layout Plain Layout
1543 \begin_inset Flex Noun
1546 \begin_layout Plain Layout
1553 For example, you might want to use
1554 \begin_inset Flex Noun
1557 \begin_layout Plain Layout
1563 to view PostScript files.
1564 You can enter the command needed to start the program in the corresponding
1566 In defining this command, you can use the four variables listed in the
1568 The viewer is launched when you view an image in \SpecialChar LyX
1570 \begin_inset Flex Noun
1573 \begin_layout Plain Layout
1574 Document\SpecialChar menuseparator
1581 The editor is for example launched when you right-click on an image and
1583 \begin_inset Flex Noun
1586 \begin_layout Plain Layout
1592 in the appearing context menu.
1595 \begin_layout Standard
1597 \begin_inset Flex Noun
1600 \begin_layout Plain Layout
1606 type of a format is optional, but if it is specified, it must be unique
1608 It is used to detect files of this format from the file contents.
1609 For some important file formats there is no MIME type officially registered
1611 \begin_inset CommandInset href
1614 target "http://www.iana.org/assignments/media-types/"
1620 Therefore \SpecialChar LyX
1621 uses the extended list of MIME types as specified by
1622 \begin_inset CommandInset href
1624 name "freedesktop.org"
1625 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1633 \begin_layout Standard
1635 \begin_inset Flex Noun
1638 \begin_layout Plain Layout
1644 option tells \SpecialChar LyX
1645 that a format is suitable for document export.
1646 If this is set and if a suitable conversion route exists (see
1647 \begin_inset CommandInset ref
1649 reference "sec:Converters"
1653 ), the format will appear in the
1654 \begin_inset Flex Noun
1657 \begin_layout Plain Layout
1658 File\SpecialChar menuseparator
1665 The format will also appear in the
1666 \begin_inset Flex Noun
1669 \begin_layout Plain Layout
1670 Document\SpecialChar menuseparator
1676 menu if a viewer is specified for the format.
1677 Pure image formats, such as
1678 \begin_inset Flex Code
1681 \begin_layout Plain Layout
1687 , should not use this option.
1688 Formats that can both represent vector graphics and documents like
1689 \begin_inset Flex Code
1692 \begin_layout Plain Layout
1701 \begin_layout Standard
1703 \begin_inset Flex Noun
1706 \begin_layout Plain Layout
1707 Vector graphics format
1712 tells \SpecialChar LyX
1713 that a format can contain vector graphics.
1714 This information is used to determine the target format of included graphics
1716 \begin_inset Flex Noun
1719 \begin_layout Plain Layout
1726 Included graphics may need to be converted to either
1727 \begin_inset Flex Noun
1730 \begin_layout Plain Layout
1737 \begin_inset Flex Noun
1740 \begin_layout Plain Layout
1747 \begin_inset Flex Noun
1750 \begin_layout Plain Layout
1757 \begin_inset Flex Noun
1760 \begin_layout Plain Layout
1766 cannot handle other image formats.
1767 If an included graphic is not already in
1768 \begin_inset Flex Noun
1771 \begin_layout Plain Layout
1778 \begin_inset Flex Noun
1781 \begin_layout Plain Layout
1788 \begin_inset Flex Noun
1791 \begin_layout Plain Layout
1797 format, it is converted to
1798 \begin_inset Flex Noun
1801 \begin_layout Plain Layout
1807 if the vector format option is set, and otherwise to
1808 \begin_inset Flex Noun
1811 \begin_layout Plain Layout
1820 \begin_layout Section
1824 \begin_layout Standard
1825 Since all conversions from one format to another take place in \SpecialChar LyX
1827 directory, it is sometimes necessary to modify a file before copying it
1828 to the temporary directory in order that the conversion may be performed.
1832 \begin_layout Plain Layout
1833 For example, the file may refer to other files—images, for example—using
1834 relative file names, and these may become invalid when the file is copied
1835 to the temporary directory.
1840 This is done by a Copier: It copies a file to (or from) the temporary directory
1841 and may modify it in the process.
1844 \begin_layout Standard
1845 The definitions of the copiers may use eight variables:
1848 \begin_layout Labeling
1849 \labelwidthstring 00.00.0000
1850 \begin_inset Flex Code
1853 \begin_layout Plain Layout
1859 The \SpecialChar LyX
1860 system directory (e.
1861 \begin_inset space \thinspace{}
1865 \begin_inset space \space{}
1869 \begin_inset Flex Noun
1872 \begin_layout Plain Layout
1881 \begin_layout Labeling
1882 \labelwidthstring 00.00.0000
1883 \begin_inset Flex Code
1886 \begin_layout Plain Layout
1895 \begin_layout Labeling
1896 \labelwidthstring 00.00.0000
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1909 \begin_layout Labeling
1910 \labelwidthstring 00.00.0000
1911 \begin_inset Flex Code
1914 \begin_layout Plain Layout
1920 The base name (without filename extension) in the \SpecialChar LyX
1924 \begin_layout Labeling
1925 \labelwidthstring 00.00.0000
1926 \begin_inset Flex Code
1929 \begin_layout Plain Layout
1935 The full directory path of the \SpecialChar LyX
1939 \begin_layout Labeling
1940 \labelwidthstring 00.00.0000
1941 \begin_inset Flex Code
1944 \begin_layout Plain Layout
1950 The full pathname to the original \SpecialChar LyX
1951 file being processed
1954 \begin_layout Labeling
1955 \labelwidthstring 00.00.0000
1956 \begin_inset Flex Code
1959 \begin_layout Plain Layout
1965 The filename (without any directory path) of the \SpecialChar LyX
1969 \begin_layout Labeling
1970 \labelwidthstring 00.00.0000
1971 \begin_inset Flex Code
1974 \begin_layout Plain Layout
1980 The `\SpecialChar LaTeX
1984 \begin_layout Standard
1985 The latter should be the filename as it would be used in a \SpecialChar LaTeX
1993 It is relevant only when exporting files suitable for such inclusion.
1996 \begin_layout Standard
1997 Copiers can be used to do almost anything with output files.
1998 For example, suppose you want generated pdf files to be copied to a special
2000 \begin_inset Flex Code
2003 \begin_layout Plain Layout
2010 Then you could write a shell script such as this one:
2013 \begin_layout Standard
2014 \begin_inset listings
2018 \begin_layout Plain Layout
2023 \begin_layout Plain Layout
2028 \begin_layout Plain Layout
2030 TOFILE=`basename $2`
2033 \begin_layout Plain Layout
2035 cp $FROMFILE /home/you/pdf/$TOFILE
2040 Save it in your local \SpecialChar LyX
2042 \begin_inset Flex Code
2045 \begin_layout Plain Layout
2046 /home/you/.lyx/scripts/pdfcopier.sh
2051 —and make it executable, if you need to do so on your platform.
2053 \begin_inset Flex Noun
2056 \begin_layout Plain Layout
2057 Tools\SpecialChar menuseparator
2063 dialog, select under
2064 \begin_inset Flex Noun
2067 \begin_layout Plain Layout
2068 File Handling\SpecialChar menuseparator
2075 \begin_inset Flex Noun
2078 \begin_layout Plain Layout
2084 format—or one of the other pdf formats—and enter
2085 \begin_inset Flex Code
2088 \begin_layout Plain Layout
2089 pdfcopier.sh $$i $$o
2095 \begin_inset Flex Noun
2098 \begin_layout Plain Layout
2108 \begin_layout Standard
2109 Copiers are used by \SpecialChar LyX
2110 in various of its own conversions.
2111 For example, if appropriate programs are found, \SpecialChar LyX
2112 will automatically install
2114 \begin_inset Flex Noun
2117 \begin_layout Plain Layout
2124 \begin_inset Flex Noun
2127 \begin_layout Plain Layout
2129 \begin_inset space ~
2138 When these formats are exported, the copier sees that not just the main
2139 HTML file but various associated files (style files, images, etc.) are also
2141 All these files are written to a subdirectory of the directory in which
2142 the original \SpecialChar LyX
2147 \begin_layout Plain Layout
2148 This copier can be customized.
2150 \begin_inset Quotes eld
2154 \begin_inset Quotes erd
2157 argument takes a comma-separated list of extensions to be copied; if it
2158 is omitted, all files will be copied.
2160 \begin_inset Quotes eld
2164 \begin_inset Quotes erd
2167 argument determines the extension added to the generated directory.
2169 \begin_inset Quotes eld
2173 \begin_inset Flex Noun
2176 \begin_layout Plain Layout
2183 \begin_inset Quotes erd
2186 , so HTML generated from
2187 \begin_inset Flex Noun
2190 \begin_layout Plain Layout
2191 /path/to/filename.lyx
2197 \begin_inset Flex Noun
2200 \begin_layout Plain Layout
2201 /path/to/filename.html.LyXconv
2215 \begin_layout Section
2217 \begin_inset CommandInset label
2219 name "sec:Converters"
2226 \begin_layout Standard
2227 You can define your own Converters to convert files between different formats.
2229 \begin_inset Flex Noun
2232 \begin_layout Plain Layout
2233 Tools\SpecialChar menuseparator
2234 Preferences\SpecialChar menuseparator
2235 File Handling\SpecialChar menuseparator
2244 \begin_layout Standard
2245 To define a new converter, select the
2246 \begin_inset Flex Noun
2249 \begin_layout Plain Layout
2251 \begin_inset space ~
2260 \begin_inset Flex Noun
2263 \begin_layout Plain Layout
2265 \begin_inset space ~
2273 from the drop-down lists, enter the command needed for the conversion,
2275 \begin_inset Flex Noun
2278 \begin_layout Plain Layout
2285 Several variables can be used in the definition of converters:
2288 \begin_layout Labeling
2289 \labelwidthstring 00.00.0000
2290 \begin_inset Flex Code
2293 \begin_layout Plain Layout
2299 The \SpecialChar LyX
2303 \begin_layout Labeling
2304 \labelwidthstring 00.00.0000
2305 \begin_inset Flex Code
2308 \begin_layout Plain Layout
2317 \begin_layout Labeling
2318 \labelwidthstring 00.00.0000
2319 \begin_inset Flex Code
2322 \begin_layout Plain Layout
2331 \begin_layout Labeling
2332 \labelwidthstring 00.00.0000
2333 \begin_inset Flex Code
2336 \begin_layout Plain Layout
2342 The base filename of the input file (i.
2343 \begin_inset space \thinspace{}
2346 g., without the extension)
2349 \begin_layout Labeling
2350 \labelwidthstring 00.00.0000
2351 \begin_inset Flex Code
2354 \begin_layout Plain Layout
2360 The path to the input file
2363 \begin_layout Labeling
2364 \labelwidthstring 00.00.0000
2365 \begin_inset Flex Code
2368 \begin_layout Plain Layout
2374 The path to the original input file (this is different from $$p when a
2375 chain of converters is called)
2378 \begin_layout Labeling
2379 \labelwidthstring 00.00.0000
2380 \begin_inset Flex Code
2383 \begin_layout Plain Layout
2389 The iconv name for the encoding of the document.
2392 \begin_layout Standard
2394 \begin_inset Flex Noun
2397 \begin_layout Plain Layout
2399 \begin_inset space ~
2407 field you can enter the following flags, separated by commas:
2410 \begin_layout Labeling
2411 \labelwidthstring 00.00.0000
2412 \begin_inset Flex Code
2415 \begin_layout Plain Layout
2417 \change_inserted -712698321 1524656940
2425 This converter runs some form of \SpecialChar LaTeX
2427 This will make \SpecialChar LyX
2428 's \SpecialChar LaTeX
2429 error logs available.
2431 \change_inserted -712698321 1524657018
2433 \begin_inset Flex Code
2436 \begin_layout Plain Layout
2438 \change_inserted -712698321 1524657012
2446 value specifies the form of \SpecialChar LaTeX
2448 \begin_inset Flex Code
2451 \begin_layout Plain Layout
2453 \change_inserted -712698321 1524657005
2454 latex, pdflatex, platex, xetex, luatex
2462 If no value is specified,
2463 \begin_inset Flex Code
2466 \begin_layout Plain Layout
2468 \change_inserted -712698321 1524657018
2481 \begin_layout Labeling
2482 \labelwidthstring 00.00.0000
2483 \begin_inset Flex Code
2486 \begin_layout Plain Layout
2488 \change_inserted -712698321 1524656935
2496 Needs the \SpecialChar LaTeX
2498 \begin_inset Flex Noun
2501 \begin_layout Plain Layout
2507 file for the conversion.
2509 \change_inserted -712698321 1524657047
2511 \begin_inset Flex Code
2514 \begin_layout Plain Layout
2516 \change_inserted -712698321 1524657030
2522 value specifies the form of \SpecialChar LaTeX
2523 that is run in order to generate the
2524 \begin_inset Flex Noun
2527 \begin_layout Plain Layout
2529 \change_inserted -712698321 1524657047
2536 \begin_inset Flex Code
2539 \begin_layout Plain Layout
2541 \change_inserted -712698321 1524657030
2542 latex, pdflatex, platex, xetex, luatex
2548 If no value is specified,
2549 \begin_inset Flex Code
2552 \begin_layout Plain Layout
2554 \change_inserted -712698321 1524657030
2565 \begin_layout Labeling
2566 \labelwidthstring 00.00.0000
2567 \begin_inset Flex Code
2570 \begin_layout Plain Layout
2577 \begin_inset Quotes eld
2581 \begin_inset Quotes erd
2584 file from the backend, which in practice means a \SpecialChar LaTeX
2585 file like the one we
2586 would export, without
2587 \begin_inset Flex Code
2590 \begin_layout Plain Layout
2599 \begin_layout Labeling
2600 \labelwidthstring 00.00.0000
2601 \begin_inset Flex Code
2604 \begin_layout Plain Layout
2613 \begin_layout Standard
2614 The following three flags are not really flags at all because they take
2616 \begin_inset Flex Noun
2619 \begin_layout Plain Layout
2621 \begin_inset space ~
2625 \begin_inset space ~
2636 \begin_layout Labeling
2637 \labelwidthstring 00.00.0000
2639 \change_inserted -712698321 1523206314
2640 \begin_inset Flex Code
2643 \begin_layout Plain Layout
2645 \change_inserted -712698321 1523206193
2651 The name of the driver that needs to be loaded with the
2655 package for this converter.
2656 The loading of the correct driver is necessary to get some PDF-specific
2665 \begin_layout Labeling
2666 \labelwidthstring 00.00.0000
2667 \begin_inset Flex Code
2670 \begin_layout Plain Layout
2676 If set, the converter's standard error will be redirected to a file
2677 \begin_inset Flex Code
2680 \begin_layout Plain Layout
2686 , and the script given as argument will be run as:
2687 \begin_inset Flex Code
2690 \begin_layout Plain Layout
2691 script < infile.out > infile.log
2697 The argument may contain
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2710 \begin_layout Labeling
2711 \labelwidthstring 00.00.0000
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2721 The name of the directory in which the converter will dump the generated
2724 will not create this directory, and it does not copy anything into it,
2725 though it will copy this directory to the destination.
2726 The argument may contain
2727 \begin_inset Flex Code
2730 \begin_layout Plain Layout
2736 , which will be replaced by the base name of the input and output files,
2737 respectively, when the directory is copied.
2738 \begin_inset Newline newline
2741 Note that resultdir and usetempdir make no sense together.
2742 The latter will be ignored if the former is given.
2745 \begin_layout Labeling
2746 \labelwidthstring 00.00.0000
2747 \begin_inset Flex Code
2750 \begin_layout Plain Layout
2756 Determines the output file name and may, contain
2757 \begin_inset Flex Code
2760 \begin_layout Plain Layout
2767 Sensible only with resultdir and optional even then; if not given, it defaults
2771 \begin_layout Standard
2773 \change_inserted -712698321 1523206384
2774 A suitable hyperref-driver is set for some converters that are installed
2775 with \SpecialChar LyX
2778 \change_deleted -712698321 1523206388
2780 \change_inserted -712698321 1523206389
2784 \change_inserted -712698321 1523206400
2788 \change_inserted -712698321 1523206407
2792 \change_inserted -712698321 1523206437
2796 \change_deleted -712698321 1523206442
2797 that are installed with \SpecialChar LyX
2804 \begin_layout Standard
2805 You do not have to define converters for all formats between which you want
2807 For example, you will note that there is no `\SpecialChar LyX
2808 to PostScript' converter,
2809 but \SpecialChar LyX
2810 will export PostScript.
2811 It does so by first creating a \SpecialChar LaTeX
2812 file (no converter needs to be defined
2813 for this) which is then converted to DVI using the `\SpecialChar LaTeX
2815 and finally converting the resulting DVI file to PostScript.
2817 finds such `chains' of converters automatically, and it will always choose
2818 the shortest possible chain.
2819 You can, though, still define multiple conversion methods between file
2821 For example, the standard \SpecialChar LyX
2822 configuration provides five ways to convert
2827 \begin_layout Enumerate
2829 \begin_inset Flex Noun
2832 \begin_layout Plain Layout
2841 \begin_layout Enumerate
2842 via (DVI and) PostScript, using
2843 \begin_inset Flex Noun
2846 \begin_layout Plain Layout
2855 \begin_layout Enumerate
2857 \begin_inset Flex Noun
2860 \begin_layout Plain Layout
2869 \begin_layout Enumerate
2871 \begin_inset Flex Noun
2874 \begin_layout Plain Layout
2884 \begin_layout Enumerate
2886 \begin_inset Flex Noun
2889 \begin_layout Plain Layout
2899 \begin_layout Standard
2900 To define such alternate chains, you must define multiple target `file formats',
2902 \begin_inset CommandInset ref
2904 reference "sec:Formats"
2909 For example, in the standard configuration, the formats named
2910 \begin_inset Flex Noun
2913 \begin_layout Plain Layout
2920 \begin_inset Flex Noun
2923 \begin_layout Plain Layout
2930 \begin_inset Flex Noun
2933 \begin_layout Plain Layout
2940 \begin_inset Flex Noun
2943 \begin_layout Plain Layout
2950 \begin_inset Flex Noun
2953 \begin_layout Plain Layout
2960 \begin_inset Flex Noun
2963 \begin_layout Plain Layout
2970 \begin_inset Flex Noun
2973 \begin_layout Plain Layout
2980 \begin_inset Flex Noun
2983 \begin_layout Plain Layout
2991 \begin_inset Flex Noun
2994 \begin_layout Plain Layout
3001 \begin_inset Flex Noun
3004 \begin_layout Plain Layout
3011 ) are defined, all of which share the extension
3012 \begin_inset Flex Noun
3015 \begin_layout Plain Layout
3021 , and which correspond to the conversion methods just mentioned.
3024 \begin_layout Chapter
3025 Internationalizing \SpecialChar LyX
3027 \begin_inset CommandInset label
3029 name "cha:Internationalizing-LyX"
3036 \begin_layout Standard
3038 supports using a translated interface.
3039 Last time we checked, \SpecialChar LyX
3040 provided text in thirty languages.
3041 The language of choice is called your
3046 (For further reading on locale settings, see also the documentation for
3047 locale that comes with your operating system.
3048 For Linux, the manual page for
3049 \begin_inset Flex Code
3052 \begin_layout Plain Layout
3058 could be a good place to start).
3061 \begin_layout Standard
3062 Notice that these translations will work, but do contain a few flaws.
3063 In particular, all dialogs have been designed with the English text in
3064 mind, which means that some of the translated text will be too large to
3065 fit within the space allocated.
3066 This is only a display problem and will not cause any harm.
3067 Also, you will find that some of the translations do not define shortcut
3068 keys for everything.
3069 Sometimes, there are simply not enough free letters to do it.
3070 Other times, the translator just hasn't got around to doing it yet.
3071 Our localization team, which you may wish to join,
3075 \begin_layout Plain Layout
3076 If you are a fluent speaker of a language other than English, joining these
3077 teams is a great way to give back to the \SpecialChar LyX
3083 will of course try to fix these shortcomings in future versions of \SpecialChar LyX
3087 \begin_layout Section
3088 Translating \SpecialChar LyX
3092 \begin_layout Subsection
3093 Translating the graphical user interface (text messages).
3096 \begin_layout Standard
3099 \begin_inset Flex Code
3102 \begin_layout Plain Layout
3108 library to handle the internationalization of the interface.
3109 To have \SpecialChar LyX
3110 speak your favorite language in all menus and dialogs, you need
3112 \begin_inset Flex Code
3115 \begin_layout Plain Layout
3121 -file for that language.
3122 When this is available, you'll have to generate a
3123 \begin_inset Flex Code
3126 \begin_layout Plain Layout
3132 -file from it and install the
3133 \begin_inset Flex Code
3136 \begin_layout Plain Layout
3143 The process of doing all of this is explained in the documentation for
3145 \begin_inset Flex Code
3148 \begin_layout Plain Layout
3155 It is possible to do this just for yourself, but if you're going to do
3156 it, you might as well share the results of your labors with the rest of
3157 the \SpecialChar LyX
3159 Send a message to the \SpecialChar LyX
3160 developers' list for more information about how
3164 \begin_layout Standard
3165 In short, this is what you should do (xx denotes the language code):
3168 \begin_layout Itemize
3169 Check out the \SpecialChar LyX
3172 \begin_inset CommandInset href
3174 name "information on the web"
3175 target "https://www.lyx.org/HowToUseGIT"
3183 \begin_layout Itemize
3185 \begin_inset Flex Code
3188 \begin_layout Plain Layout
3194 to the folder of the
3195 \begin_inset Flex Code
3198 \begin_layout Plain Layout
3206 \begin_inset Flex Code
3209 \begin_layout Plain Layout
3217 \begin_inset Flex Code
3220 \begin_layout Plain Layout
3226 doesn't exist anywhere, it can be remade with the console command
3227 \begin_inset Flex Code
3230 \begin_layout Plain Layout
3236 in that directory, or you can use an existing po-file for some other language
3240 \begin_layout Itemize
3242 \begin_inset Flex Code
3245 \begin_layout Plain Layout
3255 \begin_layout Plain Layout
3256 This is just a text file, so it can be edited in any text editor.
3257 But there are also specialized programs that support such editing, such
3262 (for all platforms) or
3271 contains a `mode' for editing
3272 \begin_inset Flex Code
3275 \begin_layout Plain Layout
3282 \begin_inset Flex URL
3285 \begin_layout Plain Layout
3287 https://www.gnu.org/software/gettext/manual/html_node/PO-Mode.html#PO-Mode
3297 For some menu- and widget-labels, there are also shortcut keys that should
3299 Those keys are marked after a `|', and should be translated according to
3300 the words and phrases of the language.
3301 You should also fill also out the information at the beginning of the new
3303 \begin_inset Flex Code
3306 \begin_layout Plain Layout
3312 -file with your email-address, etc., so people know where to reach you with
3313 suggestions and entertaining flames.
3316 \begin_layout Standard
3317 If you are just doing this on your own, then:
3320 \begin_layout Itemize
3322 \begin_inset Flex Code
3325 \begin_layout Plain Layout
3332 This can be done with
3333 \begin_inset Flex Code
3336 \begin_layout Plain Layout
3337 msgfmt -o xx.mo < xx.po
3345 \begin_layout Itemize
3347 \begin_inset Flex Code
3350 \begin_layout Plain Layout
3356 -file to your locale-tree, at the correct directory for application messages
3361 xx, and under the name
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3372 \begin_inset space \thinspace{}
3376 \begin_inset space \space{}
3380 \begin_inset Flex Code
3383 \begin_layout Plain Layout
3384 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
3394 \begin_layout Standard
3395 As said, however, it would be best if the new
3396 \begin_inset Flex Code
3399 \begin_layout Plain Layout
3405 file could be added to the \SpecialChar LyX
3406 distribution, so others can use it.
3407 Adding it involves making additional changes to \SpecialChar LyX
3409 So send an email to the developers' mailing list if you're interested in
3413 \begin_layout Subsubsection
3417 \begin_layout Standard
3418 Sometimes it turns out that one English message needs to be translated into
3419 different messages in the target language.
3420 One example is the message
3421 \begin_inset Flex Code
3424 \begin_layout Plain Layout
3430 which has the German translation
3438 , depending upon exactly what the English
3439 \begin_inset Quotes eld
3443 \begin_inset Quotes erd
3448 \begin_inset Flex Code
3451 \begin_layout Plain Layout
3457 does not handle such ambiguous translations.
3458 Therefore you have to add some context information to the message: Instead
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3470 \begin_inset Flex Code
3473 \begin_layout Plain Layout
3474 To[[as in 'From format x to format y']]
3480 \begin_inset Flex Code
3483 \begin_layout Plain Layout
3484 To[[as in 'From page x to page y']].
3489 Now the two occurrences of
3490 \begin_inset Flex Code
3493 \begin_layout Plain Layout
3500 \begin_inset Flex Code
3503 \begin_layout Plain Layout
3509 and can be translated correctly to
3520 \begin_layout Standard
3521 Of course the context information needs to be stripped off the original
3522 message when no translation is used.
3523 Therefore you have to put it in double square brackets at the end of the
3524 message (see the example above).
3525 The translation mechanism of \SpecialChar LyX
3526 ensures that everything in double square
3527 brackets at the end of messages is removed before displaying the message.
3530 \begin_layout Subsection
3531 Translating the documentation.
3534 \begin_layout Standard
3535 The online documentation (in the
3536 \begin_inset Flex Noun
3539 \begin_layout Plain Layout
3545 -menu) can (and should!) be translated.
3546 If there are translated versions of the documentation available
3550 \begin_layout Plain Layout
3551 As of March 2008, at least some of the documents have been translated into
3552 fourteen languages, with the Tutorial available in a few more.
3557 and the locale is set accordingly, these will be used automagically by
3561 looks for translated versions as
3562 \begin_inset Flex Code
3565 \begin_layout Plain Layout
3566 LyXDir/doc/xx/DocName.lyx
3572 \begin_inset Flex Code
3575 \begin_layout Plain Layout
3581 is the code for the language currently in use.
3582 If there are no translated documents, the default English versions will
3584 Note that the translated versions must have the same filenames (
3585 \begin_inset Flex Code
3588 \begin_layout Plain Layout
3594 above) as the original.
3595 If you feel up to translating the documentation (an excellent way to proof-read
3596 the original documentation by the way!), there are a few things you should
3600 \begin_layout Itemize
3601 Check out the documentation translation web page at
3602 \begin_inset CommandInset href
3604 name "https://www.lyx.org/Translation"
3605 target "https://www.lyx.org/Translation"
3611 That way, you can find out which (if any) documents have already been translate
3612 d into your language.
3613 You can also find out who (if anyone) is organizing the effort to translate
3614 the documentation into your language.
3615 If no one is organizing the effort, please let us know that you're interested.
3618 \begin_layout Standard
3619 Once you get to actually translating, here's a few hints for you that may
3623 \begin_layout Itemize
3624 Join the documentation team! There is information on how to do that in
3625 \begin_inset Flex Code
3628 \begin_layout Plain Layout
3635 \begin_inset Flex Noun
3638 \begin_layout Plain Layout
3639 Help\SpecialChar menuseparator
3645 ), which by the way is the first document you should translate.
3648 \begin_layout Itemize
3649 Learn the typographic conventions for the language you are translating to.
3650 Typography is an ancient art and over the centuries, a great variety of
3651 conventions have developed throughout different parts of the world.
3652 Also study the professional terminology amongst typographers in your country.
3653 Inventing your own terminology will only confuse the users.
3656 (Warning! Typography is addictive!)
3659 \begin_layout Itemize
3660 Make a copy of the document.
3661 This will be your working copy.
3662 You can use this as your personal translated help-file by placing it in
3664 \begin_inset Flex Code
3667 \begin_layout Plain Layout
3674 \begin_inset Note Greyedout
3677 \begin_layout Plain Layout
3682 For a complex document with external material (images, etc.), if you make
3684 \begin_inset space \thinspace{}
3688 \begin_inset space \space{}
3691 in a temp dir, beware that the links to external material may be broken
3692 when the document is moved to a different place.
3693 The best way is to retrieve the \SpecialChar LyX
3695 \begin_inset Flex URL
3698 \begin_layout Plain Layout
3700 https://www.lyx.org/HowToUseGIT
3705 ) and to edit the doc file in place.
3713 \begin_layout Itemize
3714 Sometimes the original document (from the \SpecialChar LyX
3715 team) will be updated.
3716 Use the source viewer at
3717 \begin_inset CommandInset href
3719 name "https://www.lyx.org/trac/timeline"
3720 target "https://www.lyx.org/trac/timeline"
3725 to see what has been changed.
3726 That way you can easily see which parts of the translated document need
3730 \begin_layout Standard
3731 If you ever find an error in the original document, fix it and notify the
3732 rest of the documentation team of the changes! (You didn't forget to join
3733 the documentation team, did you?)
3736 \begin_layout Standard
3737 \begin_inset Branch OutDated
3741 \begin_layout Section
3742 International Keyboard Support
3745 \begin_layout Standard
3748 [Editor's Note: The following section is by
3756 It needs to be fixed to conform to the new Documentation Style sheet and
3757 to make use of the new v1.0 features.
3758 The whole thing also needs to be merged with the section following it.-jw
3759 It may also be badly out of date.-rh (2008)]
3762 \begin_layout Subsection
3763 Defining Own Keymaps: Keymap File Format
3766 \begin_layout Standard
3767 Let's look at a keyboard definition file a little closer.
3768 It is a plain text file defining
3771 \begin_layout Itemize
3772 key-to-key or key-to-string translations
3775 \begin_layout Itemize
3779 \begin_layout Itemize
3780 dead keys exceptions
3783 \begin_layout Standard
3784 To define key-to-key or key-to-string translation, use this command:
3787 \begin_layout Quotation
3788 \begin_inset Flex Code
3791 \begin_layout Plain Layout
3800 \begin_inset Flex Code
3803 \begin_layout Plain Layout
3812 \begin_layout Standard
3814 \begin_inset Flex Code
3817 \begin_layout Plain Layout
3823 is the key to be translated and
3824 \begin_inset Flex Code
3827 \begin_layout Plain Layout
3833 is the string to be inserted into the document.
3834 To define dead keys, use:
3837 \begin_layout Quotation
3838 \begin_inset Flex Code
3841 \begin_layout Plain Layout
3850 \begin_inset Flex Code
3853 \begin_layout Plain Layout
3862 \begin_layout Standard
3864 \begin_inset Flex Code
3867 \begin_layout Plain Layout
3873 is a keyboard key and
3874 \begin_inset Flex Code
3877 \begin_layout Plain Layout
3884 The following dead keys are supported (shortcut name is in parentheses):
3887 \begin_layout Quotation
3891 \begin_inset space \hfill{}
3897 \begin_layout Quotation
3899 \begin_inset space \hfill{}
3905 \begin_layout Quotation
3907 \begin_inset space \hfill{}
3913 \begin_layout Quotation
3915 \begin_inset space \hfill{}
3921 \begin_layout Quotation
3923 \begin_inset space \hfill{}
3929 \begin_layout Quotation
3931 \begin_inset space \hfill{}
3938 \begin_layout Plain Layout
3950 \begin_layout Quotation
3952 \begin_inset space \hfill{}
3958 \begin_layout Quotation
3960 \begin_inset space \hfill{}
3967 \begin_layout Plain Layout
3979 \begin_layout Quotation
3981 \begin_inset space \hfill{}
3987 \begin_layout Quotation
3989 \begin_inset space \hfill{}
3995 \begin_layout Quotation
3997 \begin_inset space \hfill{}
4004 \begin_layout Plain Layout
4016 \begin_layout Quotation
4018 \begin_inset space \hfill{}
4025 \begin_layout Plain Layout
4037 \begin_layout Quotation
4039 \begin_inset space \hfill{}
4045 \begin_layout Quotation
4046 hungarian umlaut (hug)
4047 \begin_inset space \hfill{}
4053 \begin_layout Quotation
4055 \begin_inset space \hfill{}
4061 \begin_layout Quotation
4063 \begin_inset space \hfill{}
4070 \begin_layout Plain Layout
4082 \begin_layout Standard
4083 Since in many international keyboards there are exceptions to what some
4084 dead keys should do, you can define them using
4087 \begin_layout Quotation
4088 \begin_inset Flex Code
4091 \begin_layout Plain Layout
4099 deadkey key outstring
4102 \begin_layout Standard
4103 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
4107 \begin_layout Quotation
4108 \begin_inset Flex Code
4111 \begin_layout Plain Layout
4124 \begin_layout Standard
4125 to make it work correctly.
4126 Also, you have to define as exceptions dead keys over i and j, to remove
4127 the dot from them before inserting an accent mark.
4128 I will change this when the time comes, but so far I haven't had time.
4131 \begin_layout Standard
4132 Oh, and about characters: backslash is escaped, so to enter it, you'll need
4135 \begin_inset Flex Code
4138 \begin_layout Plain Layout
4144 have different meaning.
4146 \begin_inset Flex Code
4149 \begin_layout Plain Layout
4155 marks comments, quotes start and end \SpecialChar LaTeX
4157 To enter quote, you'll need to use
4158 \begin_inset Flex Code
4161 \begin_layout Plain Layout
4170 \begin_inset Flex Code
4173 \begin_layout Plain Layout
4180 \begin_inset Flex Code
4183 \begin_layout Plain Layout
4194 \begin_layout Standard
4195 If you make a keyboard description file that works for your language, please
4196 mail it to me, so I can include it in the next keymap distribution.
4199 \begin_layout Standard
4200 More keywords will be supported in keymap configuration file in future,
4204 \begin_layout Itemize
4205 \begin_inset Flex Code
4208 \begin_layout Plain Layout
4219 \begin_inset space \hfill{}
4223 \begin_inset Flex Code
4226 \begin_layout Plain Layout
4235 \begin_layout Itemize
4236 \begin_inset Flex Code
4239 \begin_layout Plain Layout
4250 \begin_inset space \hfill{}
4254 \begin_inset Flex Code
4257 \begin_layout Plain Layout
4263 an external keymap translation program
4266 \begin_layout Standard
4267 Also, it should look into
4268 \begin_inset Flex Code
4271 \begin_layout Plain Layout
4277 file for defaults, too (for example, a
4278 \begin_inset Flex Code
4281 \begin_layout Plain Layout
4289 option to include default keyboard).
4297 \begin_layout Section
4298 International Keymap Stuff
4299 \begin_inset CommandInset label
4301 name "sec:International-Keymap-Stuff"
4308 \begin_layout Standard
4309 \begin_inset Note Note
4312 \begin_layout Plain Layout
4313 In doing the revisions on this document in March 2008, I did not look over
4314 this stuff, as I do not understand it.
4315 It would be good if someone else could do so.
4324 \begin_layout Standard
4325 The next two sections describe the
4326 \begin_inset Flex Code
4329 \begin_layout Plain Layout
4338 \begin_inset Flex Code
4341 \begin_layout Plain Layout
4349 file syntax in detail.
4350 These sections should help you design your own key map if the ones provided
4351 do not meet your needs.
4354 \begin_layout Subsection
4358 \begin_layout Standard
4362 \begin_inset Flex Code
4365 \begin_layout Plain Layout
4371 file maps keystrokes to characters or strings.
4372 As the name suggests, it sets a keyboard mapping.
4374 \begin_inset Flex Code
4377 \begin_layout Plain Layout
4388 \begin_inset Flex Code
4391 \begin_layout Plain Layout
4406 \begin_inset Flex Code
4409 \begin_layout Plain Layout
4422 \begin_inset Flex Code
4425 \begin_layout Plain Layout
4434 \begin_inset Flex Code
4437 \begin_layout Plain Layout
4445 are described in this section.
4448 \begin_layout Labeling
4449 \labelwidthstring 00.00.0000
4450 \begin_inset Flex Code
4453 \begin_layout Plain Layout
4461 Map a character to a string
4464 \begin_layout LyX-Code
4479 \begin_layout Standard
4512 the double-quote (")
4529 must be escaped with a preceding backslash (
4540 \begin_layout Standard
4542 \begin_inset Flex Noun
4545 \begin_layout Plain Layout
4553 statement to cause the symbol
4554 \begin_inset Flex Noun
4557 \begin_layout Plain Layout
4565 to be output for the keystroke
4566 \begin_inset Flex Noun
4569 \begin_layout Plain Layout
4580 \begin_layout LyX-Code
4586 \begin_layout Labeling
4587 \labelwidthstring 00.00.0000
4588 \begin_inset Flex Code
4591 \begin_layout Plain Layout
4599 Specify an accent character
4602 \begin_layout LyX-Code
4611 \begin_layout Standard
4612 This will make the cha
4650 This is the dead key
4654 \begin_layout Plain Layout
4661 refers to a key that does not produce a character by itself, but when followed
4662 with another key, produces the desired accent character.
4663 For example, a German characte
4665 r with an umlaut like
4675 can be produced in this manner.
4684 \begin_layout Standard
4697 and then another key not in
4714 followed by the other, not allowed key, as output.
4718 \begin_inset Flex Noun
4721 \begin_layout Plain Layout
4729 cancels a dead key, so if
4740 \begin_inset Flex Noun
4743 \begin_layout Plain Layout
4752 , the cursor will not go one position backwards but will instead cancel
4768 might have had on the next keystroke.
4772 \begin_layout Standard
4773 The following example specifies that the character ' is to be an acute accent,
4774 allowed on the characters a, e, i, o, u, A, E, I, O, and U:
4777 \begin_layout LyX-Code
4780 kmod ' acute aeiouAEIOU
4783 \begin_layout Labeling
4784 \labelwidthstring 00.00.0000
4785 \begin_inset Flex Code
4788 \begin_layout Plain Layout
4794 Specify an exception to the accent character
4797 \begin_layout LyX-Code
4806 \begin_layout Standard
4807 This defines an exce
4848 have been assigned a keystroke with a previous
4851 \begin_inset Flex Code
4854 \begin_layout Plain Layout
4878 must not belong in the
4925 If such a declaration does not exist in
4933 \begin_inset Flex Code
4936 \begin_layout Plain Layout
4970 \begin_inset Flex Code
4973 \begin_layout Plain Layout
4987 \begin_layout Standard
4988 The following command produces causes äi to be produced when you enter acute-i
4992 \begin_layout LyX-Code
5006 \begin_layout Labeling
5007 \labelwidthstring 00.00.0000
5008 \begin_inset Flex Code
5011 \begin_layout Plain Layout
5017 Combine two accent characters
5020 \begin_layout LyX-Code
5026 accent1 accent2 allowed
5029 \begin_layout Standard
5030 This one is getting pretty esoteric.
5031 It allows you to combine the effect
5087 \begin_inset Flex Code
5090 \begin_layout Plain Layout
5118 \begin_layout Standard
5119 Consider this example from the
5120 \begin_inset Flex Code
5123 \begin_layout Plain Layout
5134 \begin_layout LyX-Code
5137 kmod ; acute aeioyvhAEIOYVH
5141 kcomb acute umlaut iyIY
5144 \begin_layout Standard
5145 This allows you to press
5146 \begin_inset Flex Noun
5149 \begin_layout Plain Layout
5157 and get the effect of
5158 \begin_inset Flex Code
5161 \begin_layout Plain Layout
5180 in this case cancels the last dead key, so if you press
5181 \begin_inset Flex Noun
5184 \begin_layout Plain Layout
5193 \begin_inset Flex Code
5196 \begin_layout Plain Layout
5209 \begin_layout Subsection
5213 \begin_layout Standard
5215 \begin_inset Flex Code
5218 \begin_layout Plain Layout
5226 mapping is performed, a
5227 \begin_inset Flex Code
5230 \begin_layout Plain Layout
5240 file maps the strings that the symbols generate to characters in the current
5242 The \SpecialChar LyX
5243 distribution currently includes at least the
5244 \begin_inset Flex Code
5247 \begin_layout Plain Layout
5256 \begin_inset Flex Code
5259 \begin_layout Plain Layout
5270 \begin_layout Standard
5272 \begin_inset Flex Code
5275 \begin_layout Plain Layout
5283 file is a sequence of declarations of the form
5286 \begin_layout LyX-Code
5299 \begin_layout Standard
5300 For example, in order to map
5301 \begin_inset Flex Noun
5304 \begin_layout Plain Layout
5314 to the corresponding character in the iso-8859-1 set (233), the following
5318 \begin_layout LyX-Code
5326 \begin_layout Standard
5328 \begin_inset Flex Code
5331 \begin_layout Plain Layout
5340 \begin_inset Flex Code
5343 \begin_layout Plain Layout
5361 the same character can apply to more than one string.
5363 \begin_inset Flex Code
5366 \begin_layout Plain Layout
5377 \begin_layout LyX-Code
5389 \begin_inset Newline newline
5405 \begin_layout Standard
5407 cannot find a mapping for the string produced by the keystroke or a
5408 deadkey sequence, it will check if it looks like an accented char and try
5409 to draw an accent over the character on screen.
5412 \begin_layout Subsection
5416 \begin_layout Standard
5417 There is a second way to add support for international characters through
5418 so-called dead-keys.
5419 A dead-key works in combination with a letter to produce an accented character.
5420 Here, we'll explain how to create a really simple dead-key to illustrate
5424 \begin_layout Standard
5425 Suppose you happen to need the circumflex character,
5426 \begin_inset Quotes eld
5430 \begin_inset Quotes erd
5435 \begin_inset Flex Noun
5438 \begin_layout Plain Layout
5445 \begin_inset space ~
5449 \begin_inset Flex Noun
5452 \begin_layout Plain Layout
5458 ] to the \SpecialChar LyX
5460 \begin_inset Flex Code
5463 \begin_layout Plain Layout
5470 \begin_inset Flex Code
5473 \begin_layout Plain Layout
5480 Now, whenever you type the
5481 \begin_inset Flex Noun
5484 \begin_layout Plain Layout
5490 -key followed by a letter, that letter will have a circumflex accent on
5492 For example, the sequence
5493 \begin_inset Quotes eld
5497 \begin_inset Flex Noun
5500 \begin_layout Plain Layout
5507 \begin_inset Quotes erd
5510 produces the letter:
5511 \begin_inset Quotes eld
5515 \begin_inset Quotes erd
5519 If you tried to type
5520 \begin_inset Quotes eld
5524 \begin_inset Flex Noun
5527 \begin_layout Plain Layout
5534 \begin_inset Quotes erd
5537 , however, \SpecialChar LyX
5538 will complain with a beep, since a
5539 \begin_inset Quotes eld
5543 \begin_inset Flex Noun
5546 \begin_layout Plain Layout
5553 \begin_inset Quotes erd
5556 never takes a circumflex accent.
5558 \begin_inset Flex Noun
5561 \begin_layout Plain Layout
5567 after a dead-key produces the bare-accent.
5568 Please note this last point! If you bind a key to a dead-key, you'll need
5569 to rebind the character on that key to yet another key.
5571 \begin_inset Flex Noun
5574 \begin_layout Plain Layout
5580 to a cedilla is a bad idea, since you'll only get cedillas instead of commas.
5583 \begin_layout Standard
5584 One common way to bind dead-keys is to use
5585 \begin_inset Flex Noun
5588 \begin_layout Plain Layout
5595 \begin_inset Flex Noun
5598 \begin_layout Plain Layout
5605 \begin_inset Flex Noun
5608 \begin_layout Plain Layout
5614 in combination with an accent, like
5615 \begin_inset Quotes eld
5619 \begin_inset Flex Noun
5622 \begin_layout Plain Layout
5629 \begin_inset Quotes erd
5633 \begin_inset Quotes eld
5637 \begin_inset Flex Noun
5640 \begin_layout Plain Layout
5647 \begin_inset Quotes erd
5651 \begin_inset Quotes eld
5655 \begin_inset Flex Noun
5658 \begin_layout Plain Layout
5665 \begin_inset Quotes erd
5669 Another way involves using
5670 \begin_inset Flex Code
5673 \begin_layout Plain Layout
5680 \begin_inset Flex Code
5683 \begin_layout Plain Layout
5689 to set up the special
5690 \begin_inset Flex Code
5693 \begin_layout Plain Layout
5701 \begin_inset Flex Code
5704 \begin_layout Plain Layout
5710 acts in some ways just like
5711 \begin_inset Flex Noun
5714 \begin_layout Plain Layout
5720 and permits you to bind keys to accented characters.
5721 You can also turn keys into dead-keys by binding them to something like
5723 \begin_inset Flex Code
5726 \begin_layout Plain Layout
5732 and then binding this symbolic key to the corresponding \SpecialChar LyX
5737 \begin_layout Plain Layout
5742 : This is exactly what I do in my
5743 \begin_inset Flex Code
5746 \begin_layout Plain Layout
5753 \begin_inset Flex Code
5756 \begin_layout Plain Layout
5764 \begin_inset Flex Noun
5767 \begin_layout Plain Layout
5769 \begin_inset space ~
5778 \begin_inset Flex Code
5781 \begin_layout Plain Layout
5787 and a bunch of these
5788 \begin_inset Quotes eld
5792 \begin_inset Flex Code
5795 \begin_layout Plain Layout
5802 \begin_inset Quotes erd
5805 symbolic keys bound such things as
5806 \begin_inset Flex Noun
5809 \begin_layout Plain Layout
5811 \begin_inset space ~
5820 \begin_inset Flex Noun
5823 \begin_layout Plain Layout
5825 \begin_inset space ~
5834 This is how I produce my accented characters.
5839 You can make just about anything into the
5840 \begin_inset Flex Code
5843 \begin_layout Plain Layout
5850 \begin_inset Flex Noun
5853 \begin_layout Plain Layout
5859 keys, a spare function key, etc.
5860 As for the \SpecialChar LyX
5861 commands that produce accents, check the entry for
5862 \begin_inset Flex Code
5865 \begin_layout Plain Layout
5876 You'll find the complete list there.
5879 \begin_layout Subsection
5880 Saving your Language Configuration
5883 \begin_layout Standard
5884 You can edit your preferences so that your desired language environment
5885 is automatically configured when \SpecialChar LyX
5887 \begin_inset Flex Noun
5890 \begin_layout Plain Layout
5891 Edit\SpecialChar menuseparator
5900 \begin_layout Chapter
5901 Installing New Document Classes, Layouts, and Templates
5902 \begin_inset CommandInset label
5904 name "cha:Installing-New-Document"
5909 \begin_inset Argument 1
5912 \begin_layout Plain Layout
5913 Installing New Document Classes
5921 \begin_layout Standard
5922 In this chapter, we describe the procedures for creating and installing
5923 new \SpecialChar LyX
5924 layout and template files, as well as offer a refresher on correctly
5925 installing new \SpecialChar LaTeX
5930 \begin_layout Standard
5931 First, let us a say a few words about how one ought to think about the relation
5932 between \SpecialChar LyX
5933 and \SpecialChar LaTeX
5935 The thing to understand is that, in a certain sense, \SpecialChar LyX
5936 doesn't know anything
5937 about \SpecialChar LaTeX
5939 Indeed, from \SpecialChar LyX
5940 's point of view, \SpecialChar LaTeX
5941 is just one of several
5942 \begin_inset Quotes eld
5946 \begin_inset Quotes erd
5949 in which it is capable of producing output.
5950 Other such formats are DocBook, plaintext, and XHTML.
5952 is, of course, a particularly important format, but very little of the
5953 information \SpecialChar LyX
5954 has about \SpecialChar LaTeX
5955 is actually contained in the program itself.
5959 \begin_layout Plain Layout
5960 Some commands are sufficiently complex that they are
5961 \begin_inset Quotes eld
5965 \begin_inset Quotes erd
5968 into \SpecialChar LyX
5970 But the developers generally regard this as a Bad Thing.
5975 Rather, that information, even for the standard classes like
5976 \begin_inset Flex Code
5979 \begin_layout Plain Layout
5985 , is contained in `layout files'.
5986 Similarly, \SpecialChar LyX
5987 itself does not know much about DocBook or XHTML.
5988 What it knows is contained in layout files.
5991 \begin_layout Standard
5992 You can think of the layout file for a given document class as a translation
5993 manual between \SpecialChar LyX
5994 constructs—paragraphs with their corresponding styles,
5995 certain sorts of insets, etc—and the corresponding \SpecialChar LaTeX
5998 Almost everything \SpecialChar LyX
6000 \begin_inset Flex Code
6003 \begin_layout Plain Layout
6009 , for example, is contained in the file
6010 \begin_inset Flex Code
6013 \begin_layout Plain Layout
6019 and in various other files it includes.
6020 For this reason, anyone intending to write layout files should plan to
6021 study the existing files.
6022 A good place to start is with
6023 \begin_inset Flex Code
6026 \begin_layout Plain Layout
6032 , which is included in
6033 \begin_inset Flex Code
6036 \begin_layout Plain Layout
6043 \begin_inset Flex Code
6046 \begin_layout Plain Layout
6052 , and many of the other layout files for document classes.
6053 This file is where sections and the like are defined:
6054 \begin_inset Flex Code
6057 \begin_layout Plain Layout
6063 tells \SpecialChar LyX
6064 how paragraphs that are marked with the Section, Subsection, etc,
6065 styles can be translated into corresponding \SpecialChar LaTeX
6066 , DocBook, and XHTML commands
6069 \begin_inset Flex Code
6072 \begin_layout Plain Layout
6078 file basically just includes several of these
6079 \begin_inset Flex Code
6082 \begin_layout Plain Layout
6091 \begin_layout Standard
6092 Defining the \SpecialChar LyX
6094 correspondence is not the only thing layout files do, though.
6095 Their other job is to define how the \SpecialChar LyX
6096 constructs themselves will appear
6098 The fact that layout files have these two jobs is often a source of confusion,
6099 because they are completely separate.
6100 Telling \SpecialChar LyX
6101 how to translate a certain paragraph style into \SpecialChar LaTeX
6104 how to display it; conversely, telling \SpecialChar LyX
6105 how to display a certain paragraph
6106 style does not tell \SpecialChar LyX
6107 how to translate it into \SpecialChar LaTeX
6108 (let alone tell \SpecialChar LaTeX
6111 So, in general, when you define a new \SpecialChar LyX
6112 construct, you must always do two
6113 quite separate things: (i)
6114 \begin_inset space ~
6117 tell \SpecialChar LyX
6118 how to translate it into \SpecialChar LaTeX
6120 \begin_inset space ~
6123 tell \SpecialChar LyX
6127 \begin_layout Standard
6128 Much the same is true, of course, as regards \SpecialChar LyX
6129 's other backend formats, though
6130 XHTML is in some ways different, because in that case \SpecialChar LyX
6135 able, to some extent, to use information about how it should display a
6136 paragraph on the screen to output information (in the form of CSS) about
6137 how the paragraph should be displayed in a browser.
6138 Even in this case, however, the distinction between what \SpecialChar LyX
6140 and how things are rendered externally remains in force, and the two can
6141 be controlled separately.
6143 \begin_inset CommandInset ref
6145 reference "sec:Tags-for-XHTML"
6152 \begin_layout Section
6153 Installing new \SpecialChar LaTeX
6157 \begin_layout Standard
6158 Some installations may not include a \SpecialChar LaTeX
6159 package or class file that you would
6160 like to use within \SpecialChar LyX
6162 For example, you might need Foil\SpecialChar TeX
6163 , a package for preparing slides for overhead
6165 Modern \SpecialChar LaTeX
6166 distributions like \SpecialChar TeX
6167 Live (2008 or newer) or MiK\SpecialChar TeX
6168 provide a user interface
6169 for installing such packages.
6170 For example, with MiK\SpecialChar TeX
6171 , you start the program
6172 \begin_inset Quotes eld
6176 \begin_inset space ~
6180 \begin_inset Quotes erd
6183 to get a list of available packages.
6184 To install one of them, right click on it or use the corresponding toolbar
6188 \begin_layout Standard
6189 If your \SpecialChar LaTeX
6190 distribution does not provide such a `package manager', or if the
6191 package is not available from your distribution, then follow these steps
6192 to install it manually:
6195 \begin_layout Enumerate
6196 Get the package from
6197 \begin_inset CommandInset href
6200 target "http://www.ctan.org/"
6208 \begin_layout Enumerate
6209 If the package contains a file with the ending
6210 \begin_inset Quotes eld
6214 \begin_inset Flex Code
6217 \begin_layout Plain Layout
6224 \begin_inset Quotes erd
6227 (is the case for Foil\SpecialChar TeX
6228 ) then open a console, change to the folder of this
6229 file and execute the command
6230 \begin_inset Flex Code
6233 \begin_layout Plain Layout
6240 You have now unpacked the package and have all files to install it.
6241 Most \SpecialChar LaTeX
6242 -packages are not packed and you can skip this step.
6245 \begin_layout Enumerate
6246 Now you need to decide if the package should be available for all users
6251 \begin_layout Enumerate
6252 On *nix systems (Linux, OSX, etc.), if you want the new package to be available
6253 for all users on your system, then install it in your `local' \SpecialChar TeX
6255 install it in your own `user' \SpecialChar TeX
6257 Where these trees should be created, if they do not already exist, depends
6259 To find this out, look in the file
6260 \begin_inset Flex Code
6263 \begin_layout Plain Layout
6273 \begin_layout Plain Layout
6274 This is usually in the directory
6275 \begin_inset Flex Code
6278 \begin_layout Plain Layout
6284 , though you can execute the command
6285 \begin_inset Flex Code
6288 \begin_layout Plain Layout
6299 The location of the `local' \SpecialChar TeX
6300 tree is defined by the
6301 \begin_inset Flex Code
6304 \begin_layout Plain Layout
6310 variable; this is usually somewhere like
6311 \begin_inset Flex Code
6314 \begin_layout Plain Layout
6315 /usr/local/share/texmf
6320 or /usr/local/texlive/XXXX where XXXX is the year of the installed \SpecialChar TeX
6323 The location of the `user' \SpecialChar TeX
6325 \begin_inset Flex Code
6328 \begin_layout Plain Layout
6335 \begin_inset Flex Code
6338 \begin_layout Plain Layout
6345 \begin_inset Flex Code
6348 \begin_layout Plain Layout
6357 (If these variables are not predefined, you have to define them.) You'll
6358 probably need root permissions to create or modify the `local' tree, but
6359 not for your `user' tree.
6360 \begin_inset Newline newline
6363 In general, it is recommended to install in the user tree because your user
6364 will not be modified or even overwritten when you upgrade your system.
6365 It will typically also be backed up together with everything else when
6366 you backup your home directory (which, of course, you do on a regular basis).
6369 \begin_layout Enumerate
6370 On Windows, if you want the new package to be available for all users on
6371 your system, change to the folder where \SpecialChar LaTeX
6372 is installed and then change to
6374 \begin_inset Flex Code
6377 \begin_layout Plain Layout
6388 (For MiK\SpecialChar TeX
6389 , this would be by default the folder
6390 \begin_inset Flex Code
6393 \begin_layout Plain Layout
6411 \begin_layout Plain Layout
6412 Note that this will be the correct path only on English installations.
6413 On a German one, it would be
6414 \begin_inset Flex Code
6417 \begin_layout Plain Layout
6431 , and similarly for other languages.
6436 Create there a new folder
6437 \begin_inset Flex Code
6440 \begin_layout Plain Layout
6446 and copy all files of the package into it.
6448 \begin_inset Newline newline
6451 If the package should only available for you or you don't have admin permissions
6452 , do the same, but in the local \SpecialChar LaTeX
6455 \begin_inset space \thinspace{}
6458 g., for MiK\SpecialChar TeX
6460 \begin_inset space ~
6463 2.8 under Windows XP, this would be the folder:
6464 \begin_inset Newline newline
6470 \begin_inset Flex Code
6473 \begin_layout Plain Layout
6476 Documents and Settings
6488 \begin_inset Newline newline
6494 \begin_inset Phantom HPhantom
6497 \begin_layout Plain Layout
6508 \begin_inset Flex Code
6511 \begin_layout Plain Layout
6524 \begin_inset Newline newline
6527 On Vista, it would be:
6528 \begin_inset Newline newline
6532 \begin_inset Flex Code
6535 \begin_layout Plain Layout
6561 \begin_layout Enumerate
6562 Now one only need to tell \SpecialChar LaTeX
6563 that there are new files.
6564 This depends on the used \SpecialChar LaTeX
6569 \begin_layout Enumerate
6570 For \SpecialChar TeX
6571 Live execute the command
6572 \begin_inset Flex Code
6575 \begin_layout Plain Layout
6582 If you installed the package for all users, then you will probably need
6583 to have root permissions for that.
6586 \begin_layout Enumerate
6587 For MiK\SpecialChar TeX
6588 , if you have installed the package for all users, start the program
6590 \begin_inset Quotes eld
6594 \begin_inset space ~
6598 \begin_inset Quotes erd
6601 and press the button marked
6602 \begin_inset Quotes eld
6606 \begin_inset Quotes erd
6610 Otherwise start the program
6611 \begin_inset Quotes eld
6615 \begin_inset Quotes erd
6622 \begin_layout Enumerate
6623 Finally, you need to tell \SpecialChar LyX
6624 that there are new packages available.
6625 So, in \SpecialChar LyX
6627 \begin_inset Flex Noun
6630 \begin_layout Plain Layout
6633 \SpecialChar menuseparator
6639 and then restart \SpecialChar LyX
6643 \begin_layout Standard
6644 Now the package is installed.
6645 In our example, the document class
6646 \begin_inset Flex Code
6649 \begin_layout Plain Layout
6655 will now be available under
6656 \begin_inset Flex Noun
6659 \begin_layout Plain Layout
6660 Document\SpecialChar menuseparator
6661 Settings\SpecialChar menuseparator
6668 \begin_inset Quotes eld
6672 \begin_inset Quotes erd
6679 \begin_layout Standard
6680 If you would like to use a \SpecialChar LaTeX
6681 document class that is not even listed in the
6683 \begin_inset Flex Noun
6686 \begin_layout Plain Layout
6687 Document\SpecialChar menuseparator
6688 Settings\SpecialChar menuseparator
6694 , then you need to create a `layout' file for it.
6695 That is the topic of the next section.
6698 \begin_layout Section
6699 Types of layout files
6702 \begin_layout Standard
6703 This section describes the various sorts of \SpecialChar LyX
6704 files that contain layout informati
6706 These files describe various paragraph and character styles, determining
6707 how \SpecialChar LyX
6708 should display them and how they should be translated into \SpecialChar LaTeX
6710 XHTML, or whatever output format is being used.
6714 \begin_layout Standard
6715 We shall try to provide a thorough description of the process of writing
6717 However, there are so many different types of documents supported even
6718 by just \SpecialChar LaTeX
6719 that we can't hope to cover every different possibility or problem
6720 you might encounter.
6721 The \SpecialChar LyX
6722 users' list is frequented by people with lots of experience with layout
6723 design who are willing to share what they've learned, so please feel free
6724 to ask questions there.
6727 \begin_layout Standard
6728 As you prepare to write a new layout, it is extremely helpful to look at
6729 the layouts distributed with \SpecialChar LyX
6731 If you write a \SpecialChar LyX
6732 layout for a \SpecialChar LaTeX
6733 document class that might also be used by
6734 others, or write a module that might be useful to others, then you should
6735 consider posting your layout to the
6736 \begin_inset CommandInset href
6738 name "layout section on the LyX wiki"
6739 target "https://wiki.lyx.org/Layouts/Layouts"
6744 or even to the \SpecialChar LyX
6745 developers' list, so that it might be included in \SpecialChar LyX
6750 \begin_layout Plain Layout
6751 Note that \SpecialChar LyX
6752 is licensed under the General Public License, so any material
6753 that is contributed to \SpecialChar LyX
6754 must be similarly licensed.
6762 \begin_layout Subsection
6764 \begin_inset CommandInset label
6766 name "subsec:Layout-modules"
6773 \begin_layout Standard
6774 We have spoken to this point about `layout files'.
6775 But there are different sorts of files that contain layout information.
6776 Layout files, strictly so called, have the
6777 \begin_inset Flex Code
6780 \begin_layout Plain Layout
6786 extension and provide \SpecialChar LyX
6787 with information about document classes.
6788 Since \SpecialChar LyX
6789 1.6 layout information can also be contained in layout
6794 \begin_inset Flex Code
6797 \begin_layout Plain Layout
6804 Modules are to \SpecialChar LaTeX
6805 packages much as layouts are to \SpecialChar LaTeX
6806 classes, and some modules—such
6808 \begin_inset Flex Code
6811 \begin_layout Plain Layout
6817 module—specifically provide support for one package.
6818 In a sense, layout modules are similar to included
6822 \begin_layout Plain Layout
6823 These can have any extension, but by convention have the
6824 \begin_inset Flex Code
6827 \begin_layout Plain Layout
6839 \begin_inset Flex Code
6842 \begin_layout Plain Layout
6848 —in that modules are not specific to a given document class but may be used
6849 with many different classes.
6850 The difference is that using an included file with
6851 \begin_inset Flex Code
6854 \begin_layout Plain Layout
6860 requires editing that file.
6861 Modules, by contrast, are selected in the
6862 \begin_inset Flex Noun
6865 \begin_layout Plain Layout
6866 Document\SpecialChar menuseparator
6875 \begin_layout Standard
6876 Building modules is the easiest way to get started with layout editing,
6877 since it can be as simple as adding a single new paragraph style or flex
6879 But modules may, in principle, contain anything a layout file can contain.
6882 \begin_layout Standard
6883 After creating a new module and copying it to the
6884 \begin_inset Flex Code
6887 \begin_layout Plain Layout
6893 folder, you will need to reconfigure and then restart \SpecialChar LyX
6896 However, changes you make to the module will be seen immediately, if you
6898 \begin_inset Flex Noun
6901 \begin_layout Plain Layout
6902 Document\SpecialChar menuseparator
6908 , highlight something, and then hit
6909 \begin_inset Quotes eld
6913 \begin_inset Quotes erd
6919 It is strongly recommended that you save your work before doing this
6924 it is strongly recommended that you not attempt to edit modules while simultaneo
6925 usly working on actual documents
6928 Though of course the developers strive to keep \SpecialChar LyX
6929 stable in such situations,
6930 syntax errors and the like in your module file could cause strange behavior.
6933 \begin_layout Subsubsection
6937 \begin_layout Standard
6938 Modules are to \SpecialChar LyX
6939 as packages are to \SpecialChar LaTeX
6941 Sometimes, however, you find yourself wanting a specific inset or character
6942 style just for one document and writing a module that will also be available
6943 to other documents makes little sense.
6944 What you need is \SpecialChar LyX
6946 \begin_inset Quotes eld
6950 \begin_inset Quotes erd
6956 \begin_layout Standard
6957 You will find it under
6959 Document\SpecialChar menuseparator
6960 Settings\SpecialChar menuseparator
6964 The large text box allows you to enter anything that you might enter in
6965 a layout file or module.
6966 You can think of a document's local layout, in fact, as a module that belongs
6968 So, in particular, you must enter a
6969 \begin_inset Flex Code
6972 \begin_layout Plain Layout
6979 Any format is acceptable, but one would normally use the format current
6981 (In \SpecialChar LyX
6988 , the current layout format is
6997 \begin_layout Standard
6998 When you have entered something in the
6999 \begin_inset Flex Code
7002 \begin_layout Plain Layout
7008 pane, \SpecialChar LyX
7010 \begin_inset Quotes eld
7014 \begin_inset Quotes erd
7017 button at the bottom.
7018 Clicking this button will cause \SpecialChar LyX
7019 to determine whether what you have entered
7020 is valid layout information for the chosen format.
7022 will report the result but, unfortunately, will not tell you what errors
7023 there might have been.
7024 These will be written to the terminal, however, if \SpecialChar LyX
7025 is started from a terminal.
7026 You will not be permitted to save your local layout until you have entered
7030 \begin_layout Standard
7031 The warnings at the end of the previous section apply here, too.
7032 Do not play with local layout while you are actually working, especially
7033 if you have not saved your document.
7034 That said, using local layout with a test document can be a very convenient
7035 way to try out layout ideas, or even to start developing a module.
7038 \begin_layout Subsection
7040 \begin_inset Flex Noun
7043 \begin_layout Plain Layout
7052 \begin_layout Standard
7053 There are two situations you are likely to encounter when wanting to support
7054 a new \SpecialChar LaTeX
7055 document class, involving style (
7056 \begin_inset Flex Code
7059 \begin_layout Plain Layout
7065 ) files and \SpecialChar LaTeX2e
7067 \begin_inset Flex Code
7070 \begin_layout Plain Layout
7077 Supporting a style file is usually fairly easy.
7078 Supporting a new class file is a bit harder.
7079 We'll discuss the former in this section and the latter in the next.
7080 Similar remarks apply, of course, if you want to support a new DocBook
7084 \begin_layout Standard
7085 The easier case is the one in which your new document class is provided
7086 as a style file that is to be used in conjunction with an already supported
7088 For the sake of the example, we'll assume that the style file is called
7090 \begin_inset Flex Noun
7093 \begin_layout Plain Layout
7099 and that it is meant to be used with
7100 \begin_inset Flex Noun
7103 \begin_layout Plain Layout
7109 , which is a standard class.
7113 \begin_layout Standard
7114 Start by copying the existing class's layout file into your local directory:
7118 \begin_layout Plain Layout
7119 Of course, which directory is your local directory will vary by platform,
7120 and \SpecialChar LyX
7121 allows you to specify your local directory on startup, too, using
7123 \begin_inset Flex Code
7126 \begin_layout Plain Layout
7140 \begin_layout LyX-Code
7141 cp report.layout ~/.lyx/layouts/myclass.layout
7144 \begin_layout Standard
7146 \begin_inset Flex Code
7149 \begin_layout Plain Layout
7155 and change the line:
7158 \begin_layout LyX-Code
7161 DeclareLaTeXClass{Report (Standard Class)}
7164 \begin_layout Standard
7168 \begin_layout LyX-Code
7171 DeclareLaTeXClass[report, myclass.sty]{Report (My Class)}
7174 \begin_layout Standard
7178 \begin_layout LyX-Code
7180 \begin_inset Newline newline
7186 \begin_inset Newline newline
7192 \begin_layout Standard
7193 near the top of the file.
7196 \begin_layout Standard
7197 Start \SpecialChar LyX
7199 \begin_inset Flex Noun
7202 \begin_layout Plain Layout
7203 Tools\SpecialChar menuseparator
7210 Then restart \SpecialChar LyX
7211 and try creating a new document.
7213 \begin_inset Flex Noun
7216 \begin_layout Plain Layout
7222 " as a document class option in the
7223 \begin_inset Flex Noun
7226 \begin_layout Plain Layout
7227 Document\SpecialChar menuseparator
7234 It is likely that some of the sectioning commands and such in your new
7235 class will work differently from how they worked in the base class—
7236 \begin_inset Flex Code
7239 \begin_layout Plain Layout
7245 in this example—so you can fiddle around with the settings for the different
7246 sections if you wish.
7247 The layout information for sections is contained in
7248 \begin_inset Flex Code
7251 \begin_layout Plain Layout
7257 , but you do not need to copy and change this file.
7258 Instead, you can simply add your changes to your layout file, after the
7260 \begin_inset Flex Code
7263 \begin_layout Plain Layout
7269 , which itself includes
7270 \begin_inset Flex Code
7273 \begin_layout Plain Layout
7280 For example, you might add these lines:
7283 \begin_layout LyX-Code
7287 \begin_layout LyX-Code
7291 \begin_layout LyX-Code
7295 \begin_layout LyX-Code
7299 \begin_layout LyX-Code
7303 \begin_layout Standard
7304 to change the font for chapter headings to sans-serif.
7305 This will override (or, in this case, add to) the existing declaration
7306 for the Chapter style.
7310 \begin_layout Standard
7311 Your new package may also provide commands or environments not present in
7313 In this case, you will want to add these to the layout file.
7315 \begin_inset CommandInset ref
7317 reference "sec:TextClass"
7321 for information on how to do so.
7324 \begin_layout Standard
7326 \begin_inset Flex Noun
7329 \begin_layout Plain Layout
7335 can be used with several different document classes, and even if it cannot,
7336 you might find it easiest just to write a module that you can load with
7338 The simplest possible such module would be:
7341 \begin_layout LyX-Code
7344 DeclareLyXModule{My Class}
7347 \begin_layout LyX-Code
7351 \begin_layout LyX-Code
7352 #Support for myclass.sty.
7355 \begin_layout LyX-Code
7357 \begin_inset Newline newline
7363 \begin_layout LyX-Code
7371 \begin_inset Newline newline
7377 \begin_layout LyX-Code
7379 \begin_inset Newline newline
7385 \begin_inset Newline newline
7391 \begin_layout Standard
7392 A more complex module might modify the behavior of some existing constructs
7393 or define some new ones.
7395 \begin_inset CommandInset ref
7397 reference "sec:TextClass"
7404 \begin_layout Subsection
7406 \begin_inset Flex Noun
7409 \begin_layout Plain Layout
7418 \begin_layout Standard
7419 There are two possibilities here.
7420 One is that the class file is itself based upon an existing document class.
7421 For example, many thesis classes are based upon
7422 \begin_inset Flex Noun
7425 \begin_layout Plain Layout
7432 To see whether yours is, look for a line like
7435 \begin_layout LyX-Code
7441 \begin_layout Standard
7443 If so, then you may proceed largely as in the previous section, though
7445 \begin_inset Flex Code
7448 \begin_layout Plain Layout
7449 Declare\SpecialChar LaTeX
7455 line will be different.
7456 If your new class is
7457 \begin_inset Flex Code
7460 \begin_layout Plain Layout
7466 and it is based upon
7467 \begin_inset Flex Code
7470 \begin_layout Plain Layout
7476 , then the line should read:
7480 \begin_layout Plain Layout
7481 And it will be easiest if you save the file to
7482 \begin_inset Flex Code
7485 \begin_layout Plain Layout
7492 assumes that the document class has the same name as the layout file.
7501 \begin_layout LyX-Code
7504 DeclareLaTeXClass[thesis,book]{thesis}
7507 \begin_layout Standard
7508 If, on the other hand, the new class is not based upon an existing class,
7509 you will probably have to
7510 \begin_inset Quotes eld
7514 \begin_inset Quotes erd
7518 We strongly suggest copying an existing layout file which uses a similar
7520 class and then modifying it, if you can do so.
7521 At least use an existing file as a starting point so you can find out what
7522 items you need to worry about.
7523 Again, the specifics are covered below.
7526 \begin_layout Subsection
7528 \begin_inset CommandInset label
7530 name "subsec:Creating-Templates"
7537 \begin_layout Standard
7538 Once you have written a layout file for a new document class, you might
7539 want to consider writing a
7544 A template acts as a kind of tutorial for your layout, showing how it might
7545 be used, though containing dummy content.
7546 You can of course look at the various templates included with \SpecialChar LyX
7550 \begin_layout Standard
7551 Templates are created just like usual documents: using \SpecialChar LyX
7553 The only difference is that usual documents contain all possible settings,
7554 including the font scheme and the paper size.
7555 Usually a user doesn't want a template to overwrite his preferred settings
7556 for such parameters.
7557 For that reason, the designer of a template should remove the corresponding
7559 \begin_inset Flex Code
7562 \begin_layout Plain Layout
7571 \begin_inset Flex Code
7574 \begin_layout Plain Layout
7582 from the template \SpecialChar LyX
7584 This can be done with any simple text-editor, for example
7585 \begin_inset Flex Code
7588 \begin_layout Plain Layout
7595 \begin_inset Flex Code
7598 \begin_layout Plain Layout
7607 \begin_layout Standard
7608 Put the edited template files you create in
7609 \begin_inset Flex Code
7612 \begin_layout Plain Layout
7618 , copy the ones you use from the global template directory in
7619 \begin_inset Flex Code
7622 \begin_layout Plain Layout
7628 to the same place, and redefine the template path in the
7629 \begin_inset Flex Noun
7632 \begin_layout Plain Layout
7633 Tools\SpecialChar menuseparator
7634 Preferences\SpecialChar menuseparator
7643 \begin_layout Standard
7644 Note, by the way, that there is a template which has a particular meaning:
7645 \begin_inset Newline linebreak
7649 \begin_inset Flex Code
7652 \begin_layout Plain Layout
7659 This template is loaded every time you create a new document with
7660 \begin_inset Flex Noun
7663 \begin_layout Plain Layout
7664 File\SpecialChar menuseparator
7670 in order to provide useful defaults.
7671 To create this template from inside \SpecialChar LyX
7672 , all you have to do is to open a document
7673 with the correct settings, and use the
7674 \begin_inset Flex Noun
7677 \begin_layout Plain Layout
7678 Save as Document Defaults
7686 \begin_layout Subsection
7687 Upgrading old layout files
7690 \begin_layout Standard
7691 The format of layout files changes with each \SpecialChar LyX
7692 release, so old layout files
7693 need to be converted to the new format.
7695 reads a layout file in an older format, it automatically calls the
7697 \begin_inset Flex Code
7700 \begin_layout Plain Layout
7706 to convert it to a temporary file in current format.
7707 The original file is left untouched.
7708 If you use the layout file often, then, you may want to convert it permanently,
7709 so that \SpecialChar LyX
7710 does not have to do so itself every time.
7711 To do this, you can call the converter manually:
7714 \begin_layout Enumerate
7716 \begin_inset Flex Code
7719 \begin_layout Plain Layout
7726 \begin_inset Flex Code
7729 \begin_layout Plain Layout
7738 \begin_layout Enumerate
7740 \begin_inset Newline newline
7744 \begin_inset Flex Code
7747 \begin_layout Plain Layout
7748 python LyXDir/scripts/layout2layout.py myclass.old myclass.layout
7754 \begin_inset Newline newline
7758 \begin_inset Flex Code
7761 \begin_layout Plain Layout
7767 is the name of your \SpecialChar LyX
7771 \begin_layout Standard
7772 Note that manual conversion does not affect included files, so these will
7773 have to be converted separately.
7776 \begin_layout Subsection
7777 \begin_inset CommandInset label
7779 name "subsec:Cite-Engine-Files"
7786 \begin_layout Standard
7787 A specific form of layout files are the so-called
7788 \begin_inset Flex Code
7791 \begin_layout Plain Layout
7797 files that are located in the
7798 \begin_inset Flex Code
7801 \begin_layout Plain Layout
7808 Their purpose is to define the specifics of \SpecialChar LaTeX
7809 packages aimed at bibliography
7822 , but also the way how normal Bib\SpecialChar TeX
7823 citations (without additional packages)
7824 are handled in \SpecialChar LyX
7825 is defined in such a file.
7829 \begin_layout Standard
7830 More specifically, it is defined which packages \SpecialChar LyX
7831 needs to load, which citation
7832 commands are available, how these are to be displayed in \SpecialChar LyX
7834 the dialogs, the context menus) as well as in the XHTML and plain text
7836 Furthermore, the files specify available style variants (author-year, numerical
7837 , etc.) and their specifics.
7838 The cite engine files are also used to generate the options that are available
7841 Document\SpecialChar menuseparator
7842 Settings\SpecialChar menuseparator
7843 Bibliography\SpecialChar menuseparator
7849 \begin_layout Standard
7850 Even though a cite engine file is essentially a normal layout file that
7851 could theoretically include any layout information, it usually primarily
7852 includes some specific parameters such as
7853 \begin_inset Flex Code
7856 \begin_layout Plain Layout
7863 \begin_inset Flex Code
7866 \begin_layout Plain Layout
7873 \begin_inset Flex Code
7876 \begin_layout Plain Layout
7883 \begin_inset Flex Code
7886 \begin_layout Plain Layout
7893 The syntax of the latter two is described in
7894 \begin_inset CommandInset ref
7896 reference "subsec:Citation-engine-description"
7904 \begin_inset CommandInset ref
7906 reference "subsec:Citation-format-description"
7910 , as well as in the files themselves.
7913 \begin_layout Section
7914 \begin_inset CommandInset label
7916 name "sec:TextClass"
7920 The layout file format
7923 \begin_layout Standard
7924 The following sections describe how layout files are structured and written.
7925 Our advice is to go slowly, save and test often.
7926 It is really not that hard, except that the multitude of options can become
7927 overwhelming, especially if you try to check out too many at once.
7928 It becomes easier if you use existing layouts of \SpecialChar LyX
7929 as examples/reference
7930 or if you modify an existing layout to your needs.
7933 \begin_layout Standard
7934 Note that all the tags used in layout files are case-insensitive.
7936 \begin_inset Flex Code
7939 \begin_layout Plain Layout
7946 \begin_inset Flex Code
7949 \begin_layout Plain Layout
7956 \begin_inset Flex Code
7959 \begin_layout Plain Layout
7965 are really the same tag.
7966 The possible arguments are printed in brackets after the tag's name.
7967 The default argument is typeset
7968 \begin_inset Flex Code
7971 \begin_layout Plain Layout
7980 If the argument has a data type like
7981 \begin_inset Quotes eld
7985 \begin_inset Quotes erd
7989 \begin_inset Quotes eld
7993 \begin_inset Quotes erd
7996 , the default is shown like this:
7997 \begin_inset Flex Code
8000 \begin_layout Plain Layout
8011 \begin_layout Subsection
8012 The document class declaration and classification
8015 \begin_layout Standard
8016 Lines in a layout file which begin with
8017 \begin_inset Flex Code
8020 \begin_layout Plain Layout
8027 There is one exception to this rule.
8029 \begin_inset Flex Code
8032 \begin_layout Plain Layout
8038 files should begin with lines like:
8041 \begin_layout LyX-Code
8044 #% Do not delete the line below; configure depends on this
8047 \begin_layout LyX-Code
8052 DeclareLaTeXClass{Article (Standard Class)}
8055 \begin_layout LyX-Code
8060 DeclareCategory{Articles}
8063 \begin_layout Standard
8064 The second and third lines are used when you (re)configure \SpecialChar LyX
8066 The layout file is read by the \SpecialChar LaTeX
8068 \begin_inset Flex Code
8071 \begin_layout Plain Layout
8077 , in a special mode where
8078 \begin_inset Flex Code
8081 \begin_layout Plain Layout
8088 The first line is just a \SpecialChar LaTeX
8089 comment, the second one contains the mandatory
8090 declaration of the text class and the third line contains the optional
8091 classification of the class.
8092 If these lines appear in a file named
8093 \begin_inset Flex Code
8096 \begin_layout Plain Layout
8102 , then they define a text class of name
8103 \begin_inset Flex Code
8106 \begin_layout Plain Layout
8112 (the name of the layout file) which uses the \SpecialChar LaTeX
8114 \begin_inset Flex Code
8117 \begin_layout Plain Layout
8123 (the default is to use the same name as the layout).
8125 \begin_inset Quotes eld
8128 Article (Standard Class)
8129 \begin_inset Quotes erd
8132 that appears above is used as a description of the text class in the
8133 \begin_inset Flex Noun
8136 \begin_layout Plain Layout
8137 Document\SpecialChar menuseparator
8145 \begin_inset Quotes eld
8149 \begin_inset Quotes erd
8152 in the example) is also used in the
8153 \begin_inset Flex Noun
8156 \begin_layout Plain Layout
8157 Document\SpecialChar menuseparator
8163 dialog: the text classes are grouped by these categories (which are usually
8164 genres, so typical categories are
8165 \begin_inset Quotes eld
8169 \begin_inset Quotes erd
8173 \begin_inset Quotes eld
8177 \begin_inset Quotes erd
8181 \begin_inset Quotes eld
8185 \begin_inset Quotes erd
8189 \begin_inset Quotes eld
8193 \begin_inset Quotes erd
8197 \begin_inset Quotes eld
8201 \begin_inset Quotes erd
8205 \begin_inset Quotes eld
8209 \begin_inset Quotes erd
8213 If no category has been declared, the class will be put in the
8214 \begin_inset Quotes eld
8218 \begin_inset Quotes erd
8224 \begin_layout Standard
8225 Let's assume that you wrote your own text class that uses the
8226 \begin_inset Flex Code
8229 \begin_layout Plain Layout
8235 document class, but where you changed the appearance of the section headings.
8236 If you put it in a file
8237 \begin_inset Flex Code
8240 \begin_layout Plain Layout
8246 , the header of this file should be:
8249 \begin_layout LyX-Code
8252 #% Do not delete the line below; configure depends on this
8255 \begin_layout LyX-Code
8260 DeclareLaTeXClass[article]{Article (with My Own Headings)}
8263 \begin_layout LyX-Code
8268 DeclareCategory{Articles}
8271 \begin_layout Standard
8272 This declares a text class
8273 \begin_inset Flex Code
8276 \begin_layout Plain Layout
8282 , associated with the \SpecialChar LaTeX
8284 \begin_inset Flex Code
8287 \begin_layout Plain Layout
8294 \begin_inset Quotes eld
8297 Article (with My Own Headings)
8298 \begin_inset Quotes erd
8302 If your text class depends on several packages, you can declare it as:
8305 \begin_layout LyX-Code
8308 #% Do not delete the line below; configure depends on this
8311 \begin_layout LyX-Code
8316 DeclareLaTeXClass[article,foo.sty]{Article (with My Own Headings)}
8319 \begin_layout LyX-Code
8324 DeclareCategory{Articles}
8327 \begin_layout Standard
8328 This indicates that your text class uses the
8329 \begin_inset Flex Code
8332 \begin_layout Plain Layout
8339 Finally, it is also possible to declare classes for DocBook code.
8340 Typical declarations will look like:
8343 \begin_layout LyX-Code
8346 #% Do not delete the line below; configure depends on this
8349 \begin_layout LyX-Code
8354 DeclareDocBookClass[article]{SGML (DocBook Article)}
8357 \begin_layout LyX-Code
8362 DeclareCategory{Articles (DocBook)}
8365 \begin_layout Standard
8366 Note that these declarations can also be given an optional parameter declaring
8367 the name of the document class (but not a list).
8370 \begin_layout Standard
8371 So, to be as explicit as possible, the form of the layout declaration is:
8374 \begin_layout LyX-Code
8379 DeclareLaTeXClass[class,package.sty]{layout description}
8382 \begin_layout LyX-Code
8387 DeclareCategory{category}
8390 \begin_layout Standard
8391 The class need only be specified if the name of the \SpecialChar LaTeX
8393 name of the layout file are different or if there are packages to load.
8394 If the name of the class file is not specified, then \SpecialChar LyX
8396 that it is the same as the name of the layout file.
8399 \begin_layout Standard
8400 When the text class has been modified to your taste, all you have to do
8401 is to copy it either to
8402 \begin_inset Flex Code
8405 \begin_layout Plain Layout
8412 \begin_inset Flex Code
8415 \begin_layout Plain Layout
8422 \begin_inset Flex Noun
8425 \begin_layout Plain Layout
8426 Tools\SpecialChar menuseparator
8432 , exit \SpecialChar LyX
8434 Then your new text class should be available along with the others.
8437 \begin_layout Standard
8438 Once the layout file is installed, you can edit it and see your changes
8439 without having to reconfigure or to restart \SpecialChar LyX
8444 \begin_layout Plain Layout
8445 In versions of \SpecialChar LyX
8446 prior to 1.6, this was not true.
8447 As a result, editing layout files was very time consuming, since you had
8448 constantly to restart \SpecialChar LyX
8454 You can force a reload of the current layout by using the \SpecialChar LyX
8456 \begin_inset Flex Noun
8459 \begin_layout Plain Layout
8466 There is no default binding for this function—though, of course, you can
8467 bind it to a key yourself.
8468 But you will normally use this function simply by entering it in the mini-buffe
8473 \begin_layout Standard
8479 \begin_inset Flex Noun
8482 \begin_layout Plain Layout
8488 is very much an `advanced feature'.
8493 recommended that you save your work before using this function.
8498 recommended that you not attempt to edit layout information while simultaneousl
8499 y working on a document that you care about.
8500 Use a test document.
8501 Syntax errors and the like in your layout file could cause peculiar behavior.
8502 In particular, such errors could cause \SpecialChar LyX
8503 to regard the current layout as
8504 invalid and to attempt to switch to some other layout.
8508 \begin_layout Plain Layout
8509 Really bad syntax errors may even caused \SpecialChar LyX
8511 This is because certain sorts of errors may make \SpecialChar LyX
8522 The \SpecialChar LyX
8523 team strives to keep \SpecialChar LyX
8524 stable in such situations, but safe is better
8529 \begin_layout Plain Layout
8530 While we're giving advice: make regular backups.
8531 And be nice to your mother.
8539 \begin_layout Subsection
8540 The Module declaration
8543 \begin_layout Standard
8544 A module must begin with a line like the following:
8547 \begin_layout LyX-Code
8550 DeclareLyXModule[endnotes.sty]{Endnotes}
8551 \change_inserted -712698321 1554395911
8555 \begin_layout LyX-Code
8557 \change_inserted -712698321 1554395924
8562 DeclareCategory{Foot- and Endnotes}
8563 \change_deleted -712698321 1554395911
8571 \begin_layout Standard
8572 The mandatory argument
8573 \change_inserted -712698321 1554395956
8582 , in curly brackets, is the name of the module, as it should appear in
8583 \begin_inset Flex Noun
8586 \begin_layout Plain Layout
8587 Document\SpecialChar menuseparator
8588 Settings\SpecialChar menuseparator
8595 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8597 on which the module depends.
8598 It is also possible to use the form
8599 \begin_inset Flex Noun
8602 \begin_layout Plain Layout
8608 as an optional argument, which declares that the module can only be used
8609 when there exists a conversion chain between the formats `
8610 \begin_inset Flex Code
8613 \begin_layout Plain Layout
8620 \begin_inset Flex Code
8623 \begin_layout Plain Layout
8631 \change_inserted -712698321 1554396133
8638 declaration is not strictly mandatory, but you should add it, since it
8639 is helpful to find the module.
8640 Please have a look at the existing module categories and if appropriate,
8646 \begin_layout Standard
8648 \change_inserted -712698321 1554395988
8651 declaration should then be followed by lines like the following:
8655 \begin_layout Plain Layout
8656 Preferably in English if the module should be published with \SpecialChar LyX
8658 This description will appear in the list of messages to be translated and
8659 will be thus translated with the next interface update.
8667 \begin_layout LyX-Code
8671 \begin_layout LyX-Code
8672 #Adds an endnote command, in addition to footnotes.
8676 \begin_layout LyX-Code
8677 #You will need to add
8679 theendnotes in TeX code where you
8682 \begin_layout LyX-Code
8683 #want the endnotes to appear.
8687 \begin_layout LyX-Code
8691 \begin_layout LyX-Code
8692 #Requires: somemodule | othermodule
8695 \begin_layout LyX-Code
8696 #Excludes: badmodule
8699 \begin_layout Standard
8700 The description is used in
8701 \begin_inset Flex Noun
8704 \begin_layout Plain Layout
8705 Document\SpecialChar menuseparator
8706 Settings\SpecialChar menuseparator
8712 to provide the user with information about what the module does.
8714 \begin_inset Flex Code
8717 \begin_layout Plain Layout
8723 line is used to identify other modules with which this one must be used;
8725 \begin_inset Flex Code
8728 \begin_layout Plain Layout
8734 line is used to identify modules with which this one may not be used.
8735 Both are optional, and, as shown, multiple modules should be separated
8736 with the pipe symbol: |.
8737 Note that the required modules are treated disjunctively:
8741 of the required modules must be used.
8746 excluded module may be used.
8747 Note that modules are identified here by their filenames without the
8748 \begin_inset Flex Code
8751 \begin_layout Plain Layout
8759 \begin_inset Flex Code
8762 \begin_layout Plain Layout
8769 \begin_inset Flex Code
8772 \begin_layout Plain Layout
8781 \begin_layout Subsection
8782 The CiteEngine file declaration
8785 \begin_layout Standard
8786 A cite engine file must begin with a line like the following:
8789 \begin_layout LyX-Code
8792 DeclareLyXCiteEngineModule[biblatex.sty]{Biblatex}
8795 \begin_layout Standard
8796 The mandatory argument, in curly brackets, is the name of the cite style,
8797 as it should appear in
8798 \begin_inset Flex Noun
8801 \begin_layout Plain Layout
8802 Document\SpecialChar menuseparator
8803 Settings\SpecialChar menuseparator
8810 The argument in square brackets is optional: It declares any \SpecialChar LaTeX
8812 on which the cite engine depends.
8815 \begin_layout Standard
8816 The cite engine declaration should then be followed by lines like the following:
8820 \begin_layout Plain Layout
8821 Preferably in English if the module should be published with \SpecialChar LyX
8823 This description will appear in the list of messages to be translated and
8824 will be thus translated with the next interface update.
8832 \begin_layout LyX-Code
8836 \begin_layout LyX-Code
8837 # Biblatex supports many author-year and numerical styles.
8840 \begin_layout LyX-Code
8841 # It is mainly aimed at the Humanities.
8845 \begin_layout LyX-Code
8846 # customizable, fully localized and provides many features
8849 \begin_layout LyX-Code
8850 # that are not possible with BibTeX.
8851 The use of 'biber' as
8854 \begin_layout LyX-Code
8855 # bibliography processor is advised.
8858 \begin_layout LyX-Code
8862 \begin_layout Standard
8863 The description is used in
8864 \begin_inset Flex Noun
8867 \begin_layout Plain Layout
8868 Document\SpecialChar menuseparator
8869 Settings\SpecialChar menuseparator
8875 to provide the user with information about the cite engine.
8878 \begin_layout Subsection
8882 \begin_layout Standard
8883 The first non-comment line of any layout file, included file, or module
8888 contain the file format number:
8891 \begin_layout Description
8892 \begin_inset Flex Code
8895 \begin_layout Plain Layout
8902 \begin_inset Flex Code
8905 \begin_layout Plain Layout
8911 ] The format number of the layout file.
8914 \begin_layout Standard
8915 This tag was introduced with \SpecialChar LyX
8917 \begin_inset space ~
8921 Layout files from older \SpecialChar LyX
8922 versions do not have an explicit file format and
8923 are considered to have
8924 \begin_inset Flex Code
8927 \begin_layout Plain Layout
8929 \begin_inset space ~
8938 The format for the present version of \SpecialChar LyX
8940 But each version of \SpecialChar LyX
8941 is capable of reading earlier versions' layout files,
8942 just as they are capable of reading files produced by earlier versions
8945 There is, however, no provision for converting to earlier formats.
8948 \begin_layout Subsection
8949 \begin_inset CommandInset label
8951 name "subsec:General-text-class"
8955 General text class parameters
8958 \begin_layout Standard
8959 These are general parameters that govern the behavior of an entire document
8965 mean that they must appear in
8966 \begin_inset Flex Code
8969 \begin_layout Plain Layout
8975 files rather than in modules.
8976 A module can contain any layout tag.)
8979 \begin_layout Description
8981 \change_inserted -712698321 1526899478
8982 \begin_inset Flex Code
8985 \begin_layout Plain Layout
8987 \change_inserted -712698321 1526898610
8988 AddToCiteEngine <engine>
8993 Extends the possibilities for displaying citation references.
8995 \begin_inset CommandInset ref
8997 reference "subsec:Citation-engine-description"
9006 \begin_inset Flex Code
9009 \begin_layout Plain Layout
9011 \change_inserted -712698321 1526898823
9022 \begin_layout Description
9023 \begin_inset Flex Code
9026 \begin_layout Plain Layout
9032 Adds information that will be output in the
9033 \begin_inset Flex Code
9036 \begin_layout Plain Layout
9042 block when the document is output to XHTML.
9043 Typically, this would be used to output CSS style information, but it can
9044 be used for anything that can appear in
9045 \begin_inset Flex Code
9048 \begin_layout Plain Layout
9056 \begin_inset Quotes eld
9060 \begin_inset Flex Code
9063 \begin_layout Plain Layout
9070 \begin_inset Quotes erd
9076 \begin_layout Description
9077 \begin_inset Flex Code
9080 \begin_layout Plain Layout
9086 Adds information to the document preamble.
9088 \begin_inset Newline newline
9092 \begin_inset Quotes eld
9096 \begin_inset Flex Code
9099 \begin_layout Plain Layout
9106 \begin_inset Quotes erd
9112 \begin_layout Description
9113 \begin_inset Flex Code
9116 \begin_layout Plain Layout
9122 Defines the possibilities for displaying citation references.
9124 \begin_inset CommandInset ref
9126 reference "subsec:Citation-engine-description"
9135 \begin_inset Quotes eld
9139 \begin_inset Flex Code
9142 \begin_layout Plain Layout
9149 \begin_inset Quotes erd
9153 Primarily used in cite engine files (see
9154 \begin_inset CommandInset ref
9156 reference "subsec:Cite-Engine-Files"
9165 \change_inserted -712698321 1526898530
9166 Note that if you specify this in a layout file or module, any cite engine
9167 definition will be overridden.
9169 \begin_inset Flex Code
9172 \begin_layout Plain Layout
9174 \change_inserted -712698321 1526898530
9187 \begin_layout Description
9188 \begin_inset Flex Code
9191 \begin_layout Plain Layout
9197 Defines formats for use in the display of bibliographic information.
9199 \begin_inset CommandInset ref
9201 reference "subsec:Citation-format-description"
9207 \begin_inset Quotes eld
9211 \begin_inset Flex Code
9214 \begin_layout Plain Layout
9221 \begin_inset Quotes erd
9225 Primarily used in cite engine files (see
9226 \begin_inset CommandInset ref
9228 reference "subsec:Cite-Engine-Files"
9237 \change_inserted -712698321 1526898585
9238 A cite format defined in a layout or module will override the cite engine
9244 \begin_layout Description
9245 \begin_inset Flex Code
9248 \begin_layout Plain Layout
9255 \begin_inset Flex Code
9258 \begin_layout Plain Layout
9267 \begin_inset Flex Code
9270 \begin_layout Plain Layout
9276 ] Determines whether
9280 or Bib\SpecialChar TeX
9281 is used to generate a Bibliography.
9282 Primarily used in cite engine files (see
9283 \begin_inset CommandInset ref
9285 reference "subsec:Cite-Engine-Files"
9295 \begin_layout Description
9296 \begin_inset Flex Code
9299 \begin_layout Plain Layout
9305 Describes various global options supported by the document class.
9307 \begin_inset CommandInset ref
9309 reference "subsec:ClassOptions"
9315 \begin_inset Quotes eld
9319 \begin_inset Flex Code
9322 \begin_layout Plain Layout
9329 \begin_inset Quotes erd
9335 \begin_layout Description
9336 \begin_inset Flex Code
9339 \begin_layout Plain Layout
9346 \begin_inset Flex Code
9349 \begin_layout Plain Layout
9358 \begin_inset space \thinspace{}
9362 \begin_inset Flex Code
9365 \begin_layout Plain Layout
9371 ] Whether the class should
9375 to having one or two columns.
9376 Can be changed in the
9377 \begin_inset Flex Noun
9380 \begin_layout Plain Layout
9381 Document\SpecialChar menuseparator
9390 \begin_layout Description
9391 \begin_inset Flex Code
9394 \begin_layout Plain Layout
9401 \begin_inset Flex Code
9404 \begin_layout Plain Layout
9410 ] This sequence defines the properties for a counter.
9411 If the counter does not yet exist, it is created; if it does exist, it
9414 \begin_inset Quotes eld
9418 \begin_inset Flex Code
9421 \begin_layout Plain Layout
9428 \begin_inset Quotes erd
9432 \begin_inset Newline newline
9436 \begin_inset CommandInset ref
9438 reference "subsec:Counters"
9442 for details on counters.
9445 \begin_layout Description
9446 \begin_inset Flex Code
9449 \begin_layout Plain Layout
9455 Sets the default font used to display the document.
9457 \begin_inset CommandInset ref
9459 reference "subsec:Font-description"
9463 for how to declare fonts.
9465 \begin_inset Quotes eld
9469 \begin_inset Flex Code
9472 \begin_layout Plain Layout
9479 \begin_inset Quotes erd
9485 \begin_layout Description
9486 \begin_inset Flex Code
9489 \begin_layout Plain Layout
9496 \begin_inset Flex Code
9499 \begin_layout Plain Layout
9505 ] Specifies a module to be included by default with this document class.
9506 The module is specified as filename without the
9507 \begin_inset Flex Code
9510 \begin_layout Plain Layout
9517 The user can still remove the module, but it will be active at the outset.
9518 (This applies only when new files are created, or when this class is chosen
9519 for an existing document.)
9522 \begin_layout Description
9523 \begin_inset Flex Code
9526 \begin_layout Plain Layout
9533 \begin_inset Flex Code
9536 \begin_layout Plain Layout
9542 ] This is the style that will be assigned to new paragraphs, usually
9543 \begin_inset Flex Noun
9546 \begin_layout Plain Layout
9553 This will default to the first defined style if not given, but you are
9554 encouraged to use this directive.
9557 \begin_layout Description
9558 \begin_inset Flex Code
9561 \begin_layout Plain Layout
9568 \begin_inset Flex Code
9571 \begin_layout Plain Layout
9577 ] This tag indicates that the module (which is specified by filename without
9579 \begin_inset Flex Code
9582 \begin_layout Plain Layout
9588 extension) cannot be used with this document class.
9589 This might be used in a journal-specific layout file to prevent, say, the
9591 \begin_inset Flex Code
9594 \begin_layout Plain Layout
9600 module that numbers theorems by section.
9605 be used in a module.
9606 Modules have their own way of excluding other modules (see
9607 \begin_inset CommandInset ref
9609 reference "subsec:Layout-modules"
9616 \begin_layout Description
9617 \begin_inset Flex Code
9620 \begin_layout Plain Layout
9626 Defines a new float.
9628 \begin_inset CommandInset ref
9630 reference "subsec:Floats"
9636 \begin_inset Quotes eld
9640 \begin_inset Flex Code
9643 \begin_layout Plain Layout
9650 \begin_inset Quotes erd
9656 \begin_layout Description
9657 \begin_inset Flex Code
9660 \begin_layout Plain Layout
9666 Sets the information that will be output in the
9667 \begin_inset Flex Code
9670 \begin_layout Plain Layout
9676 block when this document class is output to XHTML.
9677 Note that this will completely override any prior
9678 \begin_inset Flex Code
9681 \begin_layout Plain Layout
9688 \begin_inset Flex Code
9691 \begin_layout Plain Layout
9699 \begin_inset Newline newline
9703 \begin_inset Flex Code
9706 \begin_layout Plain Layout
9712 if you just want to add material to the preamble.) Must end with
9713 \begin_inset Quotes eld
9717 \begin_inset Flex Code
9720 \begin_layout Plain Layout
9727 \begin_inset Quotes erd
9733 \begin_layout Description
9734 \begin_inset Flex Code
9737 \begin_layout Plain Layout
9744 \begin_inset Flex Code
9747 \begin_layout Plain Layout
9753 ] The style to use for the table of contents, bibliography, and so forth,
9754 when the document is output to HTML.
9755 For articles, this should normally be
9756 \begin_inset Flex Code
9759 \begin_layout Plain Layout
9766 \begin_inset Flex Code
9769 \begin_layout Plain Layout
9776 If it is not given, then \SpecialChar LyX
9777 will attempt to figure out which layout to use.
9780 \begin_layout Description
9781 \begin_inset Flex Code
9784 \begin_layout Plain Layout
9791 \begin_inset Flex Code
9794 \begin_layout Plain Layout
9800 ] Modifies the properties of the given counter.
9801 If the counter does not exist, the statement is ignored.
9803 \begin_inset Quotes eld
9807 \begin_inset Flex Code
9810 \begin_layout Plain Layout
9817 \begin_inset Quotes erd
9821 \begin_inset Newline newline
9825 \begin_inset CommandInset ref
9827 reference "subsec:Counters"
9831 for details on counters.
9834 \begin_layout Description
9835 \begin_inset Flex Code
9838 \begin_layout Plain Layout
9845 \begin_inset Flex Code
9848 \begin_layout Plain Layout
9854 ] This allows you to include another layout definition file within yours
9855 to avoid duplicating commands.
9856 Common examples are the standard layout files, for example,
9857 \begin_inset Flex Code
9860 \begin_layout Plain Layout
9866 , which contains most of the basic layouts.
9869 \begin_layout Description
9870 \begin_inset Flex Code
9873 \begin_layout Plain Layout
9880 \begin_inset Flex Code
9883 \begin_layout Plain Layout
9889 ] This section (re-)defines the layout of an inset.
9890 It can be applied to an existing inset or to a new, user-defined inset,
9891 e.g., a new character style.
9893 \begin_inset Quotes eld
9897 \begin_inset Flex Code
9900 \begin_layout Plain Layout
9907 \begin_inset Quotes erd
9911 \begin_inset Newline newline
9915 \begin_inset CommandInset ref
9917 reference "subsec:Flex-insets-and"
9921 for more information.
9925 \begin_layout Description
9926 \begin_inset Flex Code
9929 \begin_layout Plain Layout
9936 \begin_inset Flex Code
9939 \begin_layout Plain Layout
9945 ] A string that indicates the width of the left margin on the screen, for
9947 \begin_inset Quotes eld
9951 \begin_inset Flex Code
9954 \begin_layout Plain Layout
9961 \begin_inset Quotes erd
9965 (Note that this is not a `length', like
9966 \begin_inset Quotes eld
9970 \begin_inset Quotes erd
9976 \begin_layout Description
9977 \begin_inset Flex Code
9980 \begin_layout Plain Layout
9987 \begin_inset Flex Code
9990 \begin_layout Plain Layout
9996 ] An integer that determines the maximal number of names displayed in an
9997 author-year citation before the citation switches to
9998 \begin_inset Quotes eld
10002 \begin_inset Quotes erd
10006 Primarily used in cite engine files (see
10007 \begin_inset CommandInset ref
10009 reference "subsec:Cite-Engine-Files"
10019 \begin_layout Description
10020 \begin_inset Flex Code
10023 \begin_layout Plain Layout
10030 \begin_inset Flex Code
10033 \begin_layout Plain Layout
10039 ] Modifies the properties of the given paragraph style.
10040 If the style does not exist, this section is ignored.
10042 \begin_inset Quotes eld
10046 \begin_inset Flex Code
10049 \begin_layout Plain Layout
10056 \begin_inset Quotes erd
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 ] Deletes an existing counter, usually one defined in an included file.
10085 \begin_layout Description
10086 \begin_inset Flex Code
10089 \begin_layout Plain Layout
10096 \begin_inset Flex Code
10099 \begin_layout Plain Layout
10105 ] Deletes an existing float.
10106 This is particularly useful when you want to suppress a float that has
10107 been defined in an input file.
10110 \begin_layout Description
10111 \begin_inset Flex Code
10114 \begin_layout Plain Layout
10121 \begin_inset Flex Code
10124 \begin_layout Plain Layout
10130 ] Deletes an existing style.
10133 \begin_layout Description
10134 \begin_inset Flex Code
10137 \begin_layout Plain Layout
10144 \begin_inset Flex Code
10147 \begin_layout Plain Layout
10154 \begin_inset Flex Code
10157 \begin_layout Plain Layout
10163 ] Define a new table of contents with type
10164 \begin_inset Flex Code
10167 \begin_layout Plain Layout
10174 \begin_inset Flex Code
10177 \begin_layout Plain Layout
10184 See also the AddToToc commands.
10187 \begin_layout Description
10188 \begin_inset Flex Code
10191 \begin_layout Plain Layout
10198 \begin_inset Flex Code
10201 \begin_layout Plain Layout
10207 ] The file format (as defined in the \SpecialChar LyX
10208 preferences) produced by this document
10210 It is mainly useful when
10211 \begin_inset Flex Code
10214 \begin_layout Plain Layout
10221 \begin_inset Flex Code
10224 \begin_layout Plain Layout
10230 and one wants to define a new type of literate document.
10231 The format is reset to
10232 \begin_inset Quotes eld
10236 \begin_inset Flex Code
10239 \begin_layout Plain Layout
10246 \begin_inset Quotes erd
10250 \begin_inset Quotes eld
10254 \begin_inset Flex Code
10257 \begin_layout Plain Layout
10264 \begin_inset Quotes erd
10267 when the corresponding
10268 \begin_inset Flex Code
10271 \begin_layout Plain Layout
10277 parameter is encountered.
10280 \begin_layout Description
10281 \begin_inset Flex Code
10284 \begin_layout Plain Layout
10291 \begin_inset Flex Code
10294 \begin_layout Plain Layout
10305 \begin_inset Flex Code
10308 \begin_layout Plain Layout
10315 \begin_inset Flex Code
10318 \begin_layout Plain Layout
10324 ] Specifies what sort of output documents using this class will produce.
10327 \begin_layout Description
10328 \begin_inset Flex Code
10331 \begin_layout Plain Layout
10338 \begin_inset Flex Code
10341 \begin_layout Plain Layout
10348 \begin_inset Flex Code
10351 \begin_layout Plain Layout
10357 ] Specifies options, given in the second string, for the package named by
10360 \begin_inset Quotes eld
10364 \begin_inset Flex Code
10367 \begin_layout Plain Layout
10368 PackageOptions natbib square
10374 \begin_inset Quotes erd
10378 \begin_inset Flex Code
10381 \begin_layout Plain Layout
10387 to be loaded with the
10388 \begin_inset Flex Code
10391 \begin_layout Plain Layout
10398 (For \SpecialChar TeX
10399 perts, this causes \SpecialChar LyX
10401 \begin_inset Flex Code
10404 \begin_layout Plain Layout
10407 PassOptionsToPackage{natbib}{square}
10413 \begin_inset Flex Code
10416 \begin_layout Plain Layout
10425 \begin_layout Description
10426 \begin_inset Flex Code
10429 \begin_layout Plain Layout
10436 \begin_inset Flex Code
10439 \begin_layout Plain Layout
10448 \begin_inset Flex Code
10451 \begin_layout Plain Layout
10458 \begin_inset Flex Code
10461 \begin_layout Plain Layout
10467 ] The default pagestyle.
10468 Can be changed in the
10469 \begin_inset Flex Noun
10472 \begin_layout Plain Layout
10473 Document\SpecialChar menuseparator
10482 \begin_layout Description
10483 \begin_inset Flex Code
10486 \begin_layout Plain Layout
10492 Sets the preamble for the \SpecialChar LaTeX
10494 Note that this will completely override any prior
10495 \begin_inset Flex Code
10498 \begin_layout Plain Layout
10505 \begin_inset Flex Code
10508 \begin_layout Plain Layout
10516 \begin_inset Flex Code
10519 \begin_layout Plain Layout
10525 if you just want to add material to the preamble.) Must end with
10526 \begin_inset Quotes eld
10530 \begin_inset Flex Code
10533 \begin_layout Plain Layout
10540 \begin_inset Quotes erd
10546 \begin_layout Description
10547 \begin_inset Flex Code
10550 \begin_layout Plain Layout
10557 \begin_inset Flex Code
10560 \begin_layout Plain Layout
10567 \begin_inset Flex Code
10570 \begin_layout Plain Layout
10579 \begin_inset space \thinspace{}
10583 \begin_inset Flex Code
10586 \begin_layout Plain Layout
10592 ] Whether the class already provides the feature
10593 \begin_inset Flex Code
10596 \begin_layout Plain Layout
10603 A feature is in general the name of a package (e.
10604 \begin_inset space \thinspace{}
10608 \begin_inset space \space{}
10612 \begin_inset Flex Code
10615 \begin_layout Plain Layout
10622 \begin_inset Flex Code
10625 \begin_layout Plain Layout
10632 \begin_inset space \thinspace{}
10636 \begin_inset space \space{}
10640 \begin_inset Flex Code
10643 \begin_layout Plain Layout
10650 \begin_inset Flex Code
10653 \begin_layout Plain Layout
10661 \begin_inset CommandInset ref
10663 reference "chap:List-of-functions"
10667 for the list of features.
10670 \begin_layout Description
10671 \begin_inset Flex Code
10674 \begin_layout Plain Layout
10681 \begin_inset Flex Code
10684 \begin_layout Plain Layout
10690 ] Indicates that this layout provides the functionality of the module mentioned,
10691 which should be specified by the filename without the
10692 \begin_inset Flex Code
10695 \begin_layout Plain Layout
10702 This will typically be used if the layout includes the module directly,
10703 rather than using the
10704 \begin_inset Flex Code
10707 \begin_layout Plain Layout
10713 tag to indicate that it ought to be used.
10714 It could also be used in a module that provided an alternate implementation
10715 of the same functionality.
10718 \begin_layout Description
10719 \begin_inset Flex Code
10722 \begin_layout Plain Layout
10729 \begin_inset Flex Code
10732 \begin_layout Plain Layout
10738 ] Creates a new paragraph style if it does not already exist.
10739 If the style does exist, this section is ignored.
10741 \begin_inset Quotes eld
10745 \begin_inset Flex Code
10748 \begin_layout Plain Layout
10755 \begin_inset Quotes erd
10761 \begin_layout Description
10762 \begin_inset Flex Code
10765 \begin_layout Plain Layout
10772 \begin_inset Flex Code
10775 \begin_layout Plain Layout
10781 ] Whether the class requires the feature
10782 \begin_inset Flex Code
10785 \begin_layout Plain Layout
10792 Multiple features must be separated by commas.
10793 Note that you can only request supported features.
10795 \begin_inset CommandInset ref
10797 reference "chap:List-of-functions"
10801 for the list of features.).
10802 If you require a package with specific options, you can additionally use
10804 \begin_inset Flex Code
10807 \begin_layout Plain Layout
10816 \begin_layout Description
10817 \begin_inset Flex Code
10820 \begin_layout Plain Layout
10827 \begin_inset Flex Code
10830 \begin_layout Plain Layout
10836 ] A string that indicates the width of the right margin on the screen, for
10838 \begin_inset Quotes eld
10842 \begin_inset Flex Code
10845 \begin_layout Plain Layout
10852 \begin_inset Quotes erd
10858 \begin_layout Description
10859 \begin_inset Flex Code
10862 \begin_layout Plain Layout
10869 \begin_inset Flex Code
10872 \begin_layout Plain Layout
10878 ] Sets which divisions get numbered.
10880 \begin_inset Newline newline
10884 \begin_inset Flex Code
10887 \begin_layout Plain Layout
10893 counter in \SpecialChar LaTeX
10897 \begin_layout Description
10898 \begin_inset Flex Code
10901 \begin_layout Plain Layout
10908 \begin_inset Flex Code
10911 \begin_layout Plain Layout
10920 \begin_inset space \thinspace{}
10924 \begin_inset Flex Code
10927 \begin_layout Plain Layout
10933 ] Whether the class-default should be printing on one or both sides of the
10935 Can be changed in the
10936 \begin_inset Flex Noun
10939 \begin_layout Plain Layout
10940 Document\SpecialChar menuseparator
10949 \begin_layout Description
10950 \begin_inset Flex Code
10953 \begin_layout Plain Layout
10960 \begin_inset Flex Code
10963 \begin_layout Plain Layout
10969 ] This sequence defines a paragraph style.
10970 If the style does not yet exist, it is created; if it does exist, its parameter
10973 \begin_inset Quotes eld
10977 \begin_inset Flex Code
10980 \begin_layout Plain Layout
10987 \begin_inset Quotes erd
10991 \begin_inset Newline newline
10995 \begin_inset CommandInset ref
10997 reference "subsec:Paragraph-Styles"
11001 for details on paragraph styles.
11002 \change_inserted -712698321 1553617804
11006 \begin_layout Description
11008 \change_inserted -712698321 1553617862
11009 \begin_inset Flex Code
11012 \begin_layout Plain Layout
11014 \change_inserted -712698321 1553617809
11021 \begin_inset Flex Code
11024 \begin_layout Plain Layout
11026 \change_inserted -712698321 1553617805
11032 ] defines the default table style that is used when inserting a table.
11033 The following styles are available:
11037 \begin_layout Itemize
11039 \change_inserted -712698321 1554308039
11040 \begin_inset Flex Code
11043 \begin_layout Plain Layout
11045 \change_inserted -712698321 1554307928
11046 Formal_with_Footline
11054 \begin_inset Quotes eld
11058 \begin_inset Quotes erd
11061 ) style with horizontal lines only, using a bold top and bottom line, the
11062 first and last row are additionally separated from the table body with
11063 a thin middle line.
11066 \begin_layout Itemize
11068 \change_inserted -712698321 1554308087
11069 \begin_inset Flex Code
11072 \begin_layout Plain Layout
11074 \change_inserted -712698321 1554308042
11075 Formal_without_Footline
11080 : same as the above, but the last row is not separated with a middle line
11084 \begin_layout Itemize
11086 \change_inserted -712698321 1553618031
11087 \begin_inset Flex Code
11090 \begin_layout Plain Layout
11092 \change_inserted -712698321 1553618006
11098 : Simple table lines.
11101 \begin_layout Itemize
11103 \change_inserted -712698321 1553618309
11104 \begin_inset Flex Code
11107 \begin_layout Plain Layout
11109 \change_inserted -712698321 1553618031
11116 \begin_inset Flex Code
11119 \begin_layout Plain Layout
11121 \change_inserted -712698321 1553618043
11127 , but with the header column offset with a second horizontal line.
11128 This is also the default style of \SpecialChar LyX
11132 \begin_layout Itemize
11134 \change_inserted -712698321 1553618280
11135 \begin_inset Flex Code
11138 \begin_layout Plain Layout
11140 \change_inserted -712698321 1553618261
11146 : Table without lines.
11152 \begin_layout Description
11153 \begin_inset Flex Code
11156 \begin_layout Plain Layout
11163 \begin_inset Flex Code
11166 \begin_layout Plain Layout
11172 ] The name of the command or environment to be used with
11173 \begin_inset Flex Code
11176 \begin_layout Plain Layout
11185 \begin_layout Description
11186 \begin_inset Flex Code
11189 \begin_layout Plain Layout
11196 \begin_inset Flex Code
11199 \begin_layout Plain Layout
11208 \begin_inset Flex Code
11211 \begin_layout Plain Layout
11217 ] Indicates what kind of markup is used to define the title of a document.
11219 \begin_inset Flex Code
11222 \begin_layout Plain Layout
11228 means that the macro with name
11229 \begin_inset Flex Code
11232 \begin_layout Plain Layout
11238 will be inserted after the last layout which has
11239 \begin_inset Quotes eld
11243 \begin_inset Flex Code
11246 \begin_layout Plain Layout
11248 \begin_inset space ~
11257 \begin_inset Quotes erd
11262 \begin_inset Flex Code
11265 \begin_layout Plain Layout
11271 corresponds to the case where all layouts which have
11272 \begin_inset Quotes eld
11276 \begin_inset Flex Code
11279 \begin_layout Plain Layout
11281 \begin_inset space ~
11290 \begin_inset Quotes erd
11293 should be enclosed into the
11294 \begin_inset Flex Code
11297 \begin_layout Plain Layout
11306 \begin_layout Description
11307 \begin_inset Flex Code
11310 \begin_layout Plain Layout
11317 \begin_inset Flex Code
11320 \begin_layout Plain Layout
11326 ] Sets which divisions are included in the table of contents.
11328 \begin_inset Flex Code
11331 \begin_layout Plain Layout
11337 counter in \SpecialChar LaTeX
11341 \begin_layout Subsection
11342 \begin_inset Flex Code
11345 \begin_layout Plain Layout
11352 \begin_inset CommandInset label
11354 name "subsec:ClassOptions"
11361 \begin_layout Standard
11363 \begin_inset Flex Code
11366 \begin_layout Plain Layout
11372 section can contain the following entries:
11375 \begin_layout Description
11376 \begin_inset Flex Code
11379 \begin_layout Plain Layout
11386 \begin_inset Flex Code
11389 \begin_layout Plain Layout
11395 ] The list of available font sizes for the document's main font, separated
11397 \begin_inset Quotes eld
11401 \begin_inset Flex Code
11404 \begin_layout Plain Layout
11411 \begin_inset Quotes erd
11417 \begin_layout Description
11418 \begin_inset Flex Code
11421 \begin_layout Plain Layout
11427 Used to set the DTD line with XML-based output classes.
11429 \begin_inset space \thinspace{}
11433 \begin_inset Quotes eld
11436 -//OASIS//DTD DocBook V4.2//EN
11437 \begin_inset Quotes erd
11443 \begin_layout Description
11444 \begin_inset Flex Code
11447 \begin_layout Plain Layout
11454 \begin_inset Flex Code
11457 \begin_layout Plain Layout
11458 string="empty|plain|headings|fancy"
11463 ] The list of available page sty\SpecialChar softhyphen
11465 \begin_inset Quotes eld
11469 \begin_inset Flex Code
11472 \begin_layout Plain Layout
11479 \begin_inset Quotes erd
11485 \begin_layout Description
11486 \begin_inset Flex Code
11489 \begin_layout Plain Layout
11496 \begin_inset Flex Code
11499 \begin_layout Plain Layout
11505 ] Some document class options, separated by a comma, that will be added
11506 to the optional part of the
11507 \begin_inset Flex Code
11510 \begin_layout Plain Layout
11521 \begin_layout Standard
11523 \begin_inset Flex Code
11526 \begin_layout Plain Layout
11532 section must end with
11533 \begin_inset Quotes eld
11537 \begin_inset Flex Code
11540 \begin_layout Plain Layout
11547 \begin_inset Quotes erd
11553 \begin_layout Subsection
11555 \begin_inset CommandInset label
11557 name "subsec:Paragraph-Styles"
11564 \begin_layout Standard
11565 A paragraph style description looks like this:
11569 \begin_layout Plain Layout
11570 Note that this will either define a new style or modify an existing one.
11578 \begin_layout LyX-Code
11585 \begin_layout LyX-Code
11589 \begin_layout LyX-Code
11593 \begin_layout Standard
11594 where the following commands are allowed:
11597 \begin_layout Description
11598 \begin_inset Flex Code
11601 \begin_layout Plain Layout
11608 \begin_inset Flex Code
11611 \begin_layout Plain Layout
11617 =""] This paragraph will appear in the table of contents of the given type.
11618 An empty string disables.
11619 See also the OutlinerName and the IsTocCaption commands.
11623 \begin_layout Description
11624 \begin_inset Flex Code
11627 \begin_layout Plain Layout
11634 \begin_inset Flex Code
11637 \begin_layout Plain Layout
11642 , left, right, center
11647 ] Paragraph alignment.
11650 \begin_layout Description
11651 \begin_inset Flex Code
11654 \begin_layout Plain Layout
11661 \begin_inset Flex Code
11664 \begin_layout Plain Layout
11669 , left, right, center
11674 ] A comma separated list of permitted alignments.
11675 (Some \SpecialChar LaTeX
11676 styles prohibit certain alignments, since those wouldn't make sense.
11677 For example a right-aligned or centered enumeration isn't possible.)
11680 \begin_layout Description
11681 \begin_inset Flex Code
11684 \begin_layout Plain Layout
11691 \begin_inset Flex Code
11694 \begin_layout Plain Layout
11700 ] Defines argument number <int> of a command\SpecialChar breakableslash
11701 environment associated with
11703 This is useful for things like section headings, and only makes sense with
11706 Every (optional or required) argument of a command or environment – except
11707 for the required argument that is associated with the content of the paragraph
11708 itself – has a separate definition, where the number specifies the order
11710 The definition must end with
11711 \begin_inset Flex Code
11714 \begin_layout Plain Layout
11721 So a command with two optional arguments has:
11725 \begin_layout Quote
11731 \begin_layout Quote
11737 \begin_layout Quote
11743 \begin_layout Quote
11749 \begin_layout Quote
11755 \begin_layout Quote
11761 \begin_layout Standard
11763 \begin_inset Flex Code
11766 \begin_layout Plain Layout
11772 definition, the following specifications are possible:
11775 \begin_layout Itemize
11776 \begin_inset Flex Code
11779 \begin_layout Plain Layout
11786 \begin_inset Flex Code
11789 \begin_layout Plain Layout
11795 The string that will appear both in the menu (to insert this argument)
11796 and on the argument inset button (unless you also specify a separate
11797 \begin_inset Flex Code
11800 \begin_layout Plain Layout
11807 For the menu, you can define an accelerator by appending the respective
11808 character to the string, divided by
11809 \begin_inset Quotes eld
11813 \begin_inset Quotes erd
11817 \begin_inset space \thinspace{}
11821 \begin_inset space \space{}
11825 \begin_inset Quotes eld
11829 \begin_inset Flex Code
11832 \begin_layout Plain Layout
11839 \begin_inset Quotes erd
11845 \begin_layout Itemize
11846 \begin_inset Flex Code
11849 \begin_layout Plain Layout
11856 \begin_inset Flex Code
11859 \begin_layout Plain Layout
11865 A separate string for the menu.
11866 You can define an accelerator by appending the respective character to
11867 the string, divided by
11868 \begin_inset Quotes eld
11872 \begin_inset Quotes erd
11876 \begin_inset space \thinspace{}
11880 \begin_inset space \space{}
11884 \begin_inset Quotes eld
11888 \begin_inset Flex Code
11891 \begin_layout Plain Layout
11898 \begin_inset Quotes erd
11902 This specification is optional.
11903 If it is not given the
11904 \begin_inset Flex Code
11907 \begin_layout Plain Layout
11913 will be used instead for the menu.
11916 \begin_layout Itemize
11917 \begin_inset Flex Code
11920 \begin_layout Plain Layout
11927 \begin_inset Flex Code
11930 \begin_layout Plain Layout
11936 A longer explanatory text that appears in the tooltip when hovering over
11937 the argument inset.
11940 \begin_layout Itemize
11941 \begin_inset Flex Code
11944 \begin_layout Plain Layout
11951 \begin_inset Flex Code
11954 \begin_layout Plain Layout
11963 \begin_inset space \thinspace{}
11967 \begin_inset Flex Code
11970 \begin_layout Plain Layout
11976 ] Declare if this is a mandatory (1) or an optional (0) argument.
11977 Mandatory arguments will be output empty if not given, while optional arguments
11978 will not be output at all.
11979 By default, mandatory arguments are delimited by
11980 \begin_inset Flex Code
11983 \begin_layout Plain Layout
11989 , while optional arguments are delimited by
11990 \begin_inset Flex Code
11993 \begin_layout Plain Layout
12000 \change_inserted -712698321 1555579782
12004 \begin_layout Itemize
12006 \change_inserted -712698321 1555579780
12007 \begin_inset Flex Code
12010 \begin_layout Plain Layout
12012 \change_inserted -712698321 1555579780
12019 \begin_inset Flex Code
12022 \begin_layout Plain Layout
12024 \change_inserted -712698321 1555579780
12030 Option to define a different command (from the default
12031 \begin_inset Flex Code
12034 \begin_layout Plain Layout
12036 \change_inserted -712698321 1555579780
12046 ) to be used for line breaks.
12047 The initial backslash must not be specified.
12052 \begin_layout Itemize
12053 \begin_inset Flex Code
12056 \begin_layout Plain Layout
12063 \begin_inset Flex Code
12066 \begin_layout Plain Layout
12072 defines another argument (by its number) which this argument requires to
12073 be output if it is itself output.
12075 \begin_inset space \thinspace{}
12078 g., in \SpecialChar LaTeX
12079 commands, optional arguments often require previous optional arguments
12080 to be output (at least empty), as in
12081 \begin_inset Flex Code
12084 \begin_layout Plain Layout
12087 command[][argument]{text}
12093 This can be achieved by the statement
12094 \begin_inset Flex Code
12097 \begin_layout Plain Layout
12104 \begin_inset Flex Code
12107 \begin_layout Plain Layout
12116 \begin_layout Itemize
12117 \begin_inset Flex Code
12120 \begin_layout Plain Layout
12127 \begin_inset Flex Code
12130 \begin_layout Plain Layout
12136 defines a custom left delimiter (instead of
12137 \begin_inset Flex Code
12140 \begin_layout Plain Layout
12147 \begin_inset Flex Code
12150 \begin_layout Plain Layout
12157 A line break in the output can be indicated by
12158 \begin_inset Flex Code
12161 \begin_layout Plain Layout
12170 \begin_layout Itemize
12171 \begin_inset Flex Code
12174 \begin_layout Plain Layout
12181 \begin_inset Flex Code
12184 \begin_layout Plain Layout
12190 defines a custom right delimiter (instead of
12191 \begin_inset Flex Code
12194 \begin_layout Plain Layout
12201 \begin_inset Flex Code
12204 \begin_layout Plain Layout
12211 A line break in the output can be indicated by
12212 \begin_inset Flex Code
12215 \begin_layout Plain Layout
12224 \begin_layout Itemize
12225 \begin_inset Flex Code
12228 \begin_layout Plain Layout
12235 \begin_inset Flex Code
12238 \begin_layout Plain Layout
12244 defines an argument that is inserted if and only if no user-specified arguments
12246 \begin_inset space \thinspace{}
12250 \begin_inset space \space{}
12253 if no argument inset has been inserted (note that also an empty argument
12254 inset omits the DefaultArg).
12255 Multiple arguments need to be separated by comma.
12258 \begin_layout Itemize
12259 \begin_inset Flex Code
12262 \begin_layout Plain Layout
12269 \begin_inset Flex Code
12272 \begin_layout Plain Layout
12278 defines an argument that is inserted in any case (alone or in addition
12279 to user-specified arguments).
12280 Multiple arguments need to be separated by comma.
12283 \begin_layout Itemize
12284 \begin_inset Flex Code
12287 \begin_layout Plain Layout
12293 The font used for the argument content, see
12294 \begin_inset CommandInset ref
12296 reference "subsec:Font-description"
12301 \change_inserted -712698321 1559484228
12305 \begin_layout Itemize
12307 \change_inserted -712698321 1559484228
12308 \begin_inset Flex Code
12311 \begin_layout Plain Layout
12313 \change_inserted -712698321 1559484228
12320 \begin_inset Flex Code
12323 \begin_layout Plain Layout
12325 \change_inserted -712698321 1559484228
12334 \begin_inset space \thinspace{}
12338 \begin_inset Flex Code
12341 \begin_layout Plain Layout
12343 \change_inserted -712698321 1559484228
12349 ] As with paragraph styles, see
12350 \begin_inset CommandInset ref
12352 reference "subsec:Paragraph-Styles"
12361 \begin_layout Itemize
12362 \begin_inset Flex Code
12365 \begin_layout Plain Layout
12371 The font used for the label; see
12372 \begin_inset CommandInset ref
12374 reference "subsec:Font-description"
12381 \begin_layout Itemize
12382 \begin_inset Flex Code
12385 \begin_layout Plain Layout
12392 \begin_inset Flex Code
12395 \begin_layout Plain Layout
12400 , Minimalistic, Conglomerate
12405 ] describes the rendering style used for the inset's frame and buttons.
12408 \begin_layout Itemize
12409 \begin_inset Flex Code
12412 \begin_layout Plain Layout
12419 \begin_inset Flex Code
12422 \begin_layout Plain Layout
12429 \begin_inset Flex Code
12432 \begin_layout Plain Layout
12438 , this argument is automatically inserted when the respective style is selected.
12440 \change_deleted -712698321 1559484200
12441 Currently, only one argument per style\SpecialChar breakableslash
12442 layout can be automatically inserted.
12447 \begin_layout Itemize
12448 \begin_inset Flex Code
12451 \begin_layout Plain Layout
12458 \begin_inset Flex Code
12461 \begin_layout Plain Layout
12468 \begin_inset Flex Code
12471 \begin_layout Plain Layout
12477 , this argument will be inserted with a copy of the co-text (either selected
12478 text or the whole paragraph) as content.
12481 \begin_layout Itemize
12482 \begin_inset Flex Code
12485 \begin_layout Plain Layout
12492 \begin_inset Flex Code
12495 \begin_layout Plain Layout
12505 ] Whether the contents of this argument should be output in raw form, meaning
12506 without special translations that \SpecialChar LaTeX
12509 \begin_inset Flex Code
12512 \begin_layout Plain Layout
12518 status is inherited by the inset or paragraph layout the argument belongs
12519 to, true and false change the status for the given argument only.
12522 \begin_layout Itemize
12523 \begin_inset Flex Code
12526 \begin_layout Plain Layout
12533 \begin_inset Flex Code
12536 \begin_layout Plain Layout
12537 string of characters
12546 Defines individual characters
12547 \begin_inset Newline linebreak
12550 that should be output in raw form, meaning without special translations
12551 that \SpecialChar LaTeX
12553 Note that, contrary to PassThru, this needs to be explicitly defined for
12555 That is, arguments do not inherit PassThruChars from their parent inset
12559 \begin_layout Itemize
12560 \begin_inset Flex Code
12563 \begin_layout Plain Layout
12570 \begin_inset Flex Code
12573 \begin_layout Plain Layout
12582 \begin_inset space \thinspace{}
12586 \begin_inset Flex Code
12589 \begin_layout Plain Layout
12595 ] If this is set to 1, the argument will output its content in the corresponding
12596 item in the table of contents.
12600 \begin_layout Standard
12601 By default, the text entered in the \SpecialChar LyX
12602 workarea in the respective layout is
12603 the last (mandatory) argument of a command if the
12604 \begin_inset Flex Code
12607 \begin_layout Plain Layout
12614 \begin_inset Flex Code
12617 \begin_layout Plain Layout
12624 However, arguments with the prefix
12625 \begin_inset Flex Code
12628 \begin_layout Plain Layout
12634 are output after this workarea argument.
12635 Note that post-argument numbering restarts at 1, so the first argument
12636 following the workarea argument is
12637 \begin_inset Flex Code
12640 \begin_layout Plain Layout
12647 Post-arguments are ignored in any other
12648 \begin_inset Flex Code
12651 \begin_layout Plain Layout
12658 \begin_inset Flex Code
12661 \begin_layout Plain Layout
12670 \begin_layout Standard
12672 \begin_inset Flex Code
12675 \begin_layout Plain Layout
12684 \begin_inset Flex Code
12687 \begin_layout Plain Layout
12696 \begin_inset Flex Code
12699 \begin_layout Plain Layout
12705 followed by the number (e.
12706 \begin_inset space \thinspace{}
12710 \begin_inset space \space{}
12714 \begin_inset Flex Code
12717 \begin_layout Plain Layout
12724 \change_inserted -712698321 1534487781
12728 \begin_layout Standard
12730 \change_inserted -712698321 1534488561
12731 Finally, there is a special argument type with the prefix
12732 \begin_inset Flex Code
12735 \begin_layout Plain Layout
12737 \change_inserted -712698321 1534487844
12746 It is not really an argument, but uses the argument interface (thus, the
12747 prefix is also followed by a number, e.
12748 \begin_inset space \thinspace{}
12753 \begin_inset Flex Code
12756 \begin_layout Plain Layout
12758 \change_inserted -712698321 1534488412
12759 Argument listpreamble:1
12765 As the name implies, it is targeted at lists such as
12782 Its content will be output at the list start, before the first
12783 \begin_inset Flex Code
12786 \begin_layout Plain Layout
12788 \change_inserted -712698321 1534488058
12798 , on an own line (a place that is otherwise not accessible in \SpecialChar LyX
12800 This way, users can insert redefinitions (of lengths etc.) to individual
12802 By default, these arguments do not have a delimiter.
12808 \begin_layout Description
12809 \begin_inset Flex Code
12812 \begin_layout Plain Layout
12818 Includes a comma-separated list of layouts that should be nested in and
12819 after the current layout.
12820 Only makes sense for nestable layouts (such as environments).
12822 \begin_inset Quotes eld
12826 \begin_inset Flex Code
12829 \begin_layout Plain Layout
12836 \begin_inset Quotes erd
12841 \begin_inset Flex Code
12844 \begin_layout Plain Layout
12853 \begin_layout Description
12854 \begin_inset Flex Code
12857 \begin_layout Plain Layout
12863 Note that this will completely override any prior
12864 \begin_inset Flex Code
12867 \begin_layout Plain Layout
12873 declaration for this style.
12875 \begin_inset Quotes eld
12879 \begin_inset Flex Code
12882 \begin_layout Plain Layout
12889 \begin_inset Quotes erd
12894 \begin_inset CommandInset ref
12896 reference "subsec:I18n"
12900 for details on its use.
12903 \begin_layout Description
12904 \begin_inset Flex Code
12907 \begin_layout Plain Layout
12914 \begin_inset Flex Code
12917 \begin_layout Plain Layout
12927 \begin_layout Plain Layout
12928 Note that a `float' here is a real number, such as: 1.5.
12933 The vertical space with which the last of a chain of paragraphs with this
12934 style is separated from the following paragraph.
12935 If the next paragraph has another style, the separations are not simply
12936 added, but the maximum is taken.
12939 \begin_layout Description
12940 \begin_inset Flex Code
12943 \begin_layout Plain Layout
12950 \begin_inset Flex Code
12953 \begin_layout Plain Layout
12959 ] The category for this style.
12960 This is used to group related styles in the style combobox on the toolbar.
12961 Any string can be used, but you may want to use existing categories with
12966 \begin_layout Description
12967 \begin_inset Flex Code
12970 \begin_layout Plain Layout
12976 Depth of XML command.
12977 Used only with XML-type formats.
12980 \begin_layout Description
12981 \begin_inset Flex Code
12984 \begin_layout Plain Layout
12991 \begin_inset Flex Code
12994 \begin_layout Plain Layout
13000 ] Copies all the features of an existing style into the current one.
13004 \begin_layout Description
13005 \begin_inset Flex Code
13008 \begin_layout Plain Layout
13015 \begin_inset Flex Code
13018 \begin_layout Plain Layout
13024 ] The name of a style whose preamble should be output
13029 This allows to ensure some ordering of the preamble snippets when macros
13030 definitions depend on one another.
13034 \begin_layout Plain Layout
13035 Note that, besides that functionality, there is no way to ensure any ordering
13037 The ordering that you see in a given version of \SpecialChar LyX
13038 may change without warning
13047 \begin_layout Description
13048 \begin_inset Flex Code
13051 \begin_layout Plain Layout
13058 \begin_inset Flex Code
13061 \begin_layout Plain Layout
13066 , Box, Filled_Box, Static
13071 ] The type of label that stands at the end of the paragraph (or sequence
13073 \begin_inset Flex Code
13076 \begin_layout Plain Layout
13083 \begin_inset Newline newline
13087 \begin_inset Flex Code
13090 \begin_layout Plain Layout
13097 \begin_inset Flex Code
13100 \begin_layout Plain Layout
13107 \begin_inset Flex Code
13110 \begin_layout Plain Layout
13118 \begin_inset Flex Code
13121 \begin_layout Plain Layout
13128 \begin_inset Quotes eld
13132 \begin_inset Quotes erd
13136 \begin_inset Flex Code
13139 \begin_layout Plain Layout
13146 \begin_inset space \space{}
13150 \begin_inset Flex Code
13153 \begin_layout Plain Layout
13159 ) is a white (resp.
13160 \begin_inset space ~
13163 black) square suitable for end of proof markers,
13164 \begin_inset Flex Code
13167 \begin_layout Plain Layout
13173 is an explicit text string.
13176 \begin_layout Description
13177 \begin_inset Flex Code
13180 \begin_layout Plain Layout
13187 \begin_inset Flex Code
13190 \begin_layout Plain Layout
13196 ] The string used for a label with a
13197 \begin_inset Flex Code
13200 \begin_layout Plain Layout
13207 \begin_inset Newline newline
13211 \begin_inset Flex Code
13214 \begin_layout Plain Layout
13224 \begin_layout Description
13225 \begin_inset Flex Code
13228 \begin_layout Plain Layout
13234 The font used for both the text body
13240 \begin_inset CommandInset ref
13242 reference "subsec:Font-description"
13247 Note that defining this font automatically defines the
13248 \begin_inset Flex Code
13251 \begin_layout Plain Layout
13258 So you should define this one first if you also want to define
13259 \begin_inset Flex Code
13262 \begin_layout Plain Layout
13271 \begin_layout Description
13272 \begin_inset Flex Code
13275 \begin_layout Plain Layout
13282 \begin_inset Flex Code
13285 \begin_layout Plain Layout
13291 ] Used for backporting new styles to stable \SpecialChar LyX
13293 The first stable version that supports this tag is \SpecialChar LyX
13295 The argument is a number which may either be 0, -1 or any value greater
13298 \begin_inset Flex Code
13301 \begin_layout Plain Layout
13307 flag of a style is greater than zero, it will always be written to the
13309 If a .lyx file is read, the style definitions from the document header are
13310 added to the document class.
13311 Therefore even older \SpecialChar LyX
13312 versions can handle the style.
13314 \begin_inset Flex Code
13317 \begin_layout Plain Layout
13323 is a version number: if the style is read, and the version number is less
13324 than the version number of the already existing style in the document class,
13325 the new style is ignored.
13326 If the version number is greater, the new style replaces the existing style.
13327 A value of -1 means an infinite version number, i.
13328 \begin_inset space \thinspace{}
13332 \begin_inset space \space{}
13335 the style is always used.
13338 \begin_layout Description
13339 \begin_inset Flex Code
13342 \begin_layout Plain Layout
13349 \begin_inset Flex Code
13352 \begin_layout Plain Layout
13361 \begin_inset space \thinspace{}
13365 \begin_inset Flex Code
13368 \begin_layout Plain Layout
13374 ] Usually \SpecialChar LyX
13375 does not allow you to insert more than one space between words,
13376 since a space is considered as the separation between two words, not a
13377 character or symbol of its own.
13378 This is a very fine thing but sometimes annoying, for example, when typing
13379 program code or plain \SpecialChar LaTeX
13382 \begin_inset Flex Code
13385 \begin_layout Plain Layout
13393 \change_deleted -495245474 1550490105
13397 will create protected blanks for the additional blanks when in
13398 \change_inserted -495245474 1550490096
13400 \begin_inset Flex Code
13403 \begin_layout Plain Layout
13405 \change_inserted -495245474 1550490089
13412 \change_deleted -495245474 1550490116
13413 another mode than \SpecialChar LaTeX
13416 \change_inserted -495245474 1550247760
13418 \begin_inset Flex Code
13421 \begin_layout Plain Layout
13423 \change_inserted -495245474 1550247736
13430 \begin_inset Flex Code
13433 \begin_layout Plain Layout
13435 \change_inserted -495245474 1550247755
13446 \begin_layout Description
13447 \begin_inset Flex Code
13450 \begin_layout Plain Layout
13456 These tags are used with XHTML output.
13458 \begin_inset CommandInset ref
13460 reference "subsec:Paragraph-Style-XHTML"
13467 \begin_layout Description
13468 \begin_inset Flex Code
13471 \begin_layout Plain Layout
13477 [FIXME] (Used only with XML-type formats.)
13480 \begin_layout Description
13481 \begin_inset Flex Code
13484 \begin_layout Plain Layout
13491 \begin_inset Flex Code
13494 \begin_layout Plain Layout
13503 \begin_inset space \thinspace{}
13507 \begin_inset Flex Code
13510 \begin_layout Plain Layout
13517 \begin_inset Flex Code
13520 \begin_layout Plain Layout
13526 , marks the style as to be included in the document preamble and not in
13528 This is useful for document classes that want such information as the title
13529 and author to appear in the preamble.
13530 Note that this works only for styles for which the
13531 \begin_inset Flex Code
13534 \begin_layout Plain Layout
13541 \begin_inset Flex Code
13544 \begin_layout Plain Layout
13551 \begin_inset Flex Code
13554 \begin_layout Plain Layout
13563 \begin_layout Description
13564 \begin_inset Flex Code
13567 \begin_layout Plain Layout
13574 \begin_inset Flex Code
13577 \begin_layout Plain Layout
13586 \begin_inset space \thinspace{}
13590 \begin_inset Flex Code
13593 \begin_layout Plain Layout
13600 \begin_inset Flex Code
13603 \begin_layout Plain Layout
13609 , marks the style as being part of a title block (see also the
13610 \begin_inset Flex Code
13613 \begin_layout Plain Layout
13620 \begin_inset Flex Code
13623 \begin_layout Plain Layout
13632 \begin_layout Description
13633 \begin_inset Flex Code
13636 \begin_layout Plain Layout
13642 Includes a comma-separated list of layouts after which this one should
13644 Only makes sense with regard to nestable layouts (such as environments).
13646 \begin_inset Quotes eld
13650 \begin_inset Flex Code
13653 \begin_layout Plain Layout
13660 \begin_inset Quotes erd
13665 \begin_inset Flex Code
13668 \begin_layout Plain Layout
13677 \begin_layout Description
13678 \begin_inset Flex Code
13681 \begin_layout Plain Layout
13688 \begin_inset Flex Code
13691 \begin_layout Plain Layout
13700 \begin_inset space \thinspace{}
13704 \begin_inset Flex Code
13707 \begin_layout Plain Layout
13713 ] If this is set to 1 and AddToToc is enabled, the paragraph adds a summary
13714 of its contents in its item in the table of contents.
13715 Otherwise, only the label, if it exists, appears.
13718 \begin_layout Description
13719 \begin_inset Flex Code
13722 \begin_layout Plain Layout
13729 \begin_inset Flex Code
13732 \begin_layout Plain Layout
13738 ] The \SpecialChar LaTeX
13739 command sequence declaring an item in a list.
13740 The command is to be defined without the preceding backslash (the default
13742 \begin_inset Quotes eld
13746 \begin_inset Quotes erd
13750 \begin_inset Flex Code
13753 \begin_layout Plain Layout
13761 in the \SpecialChar LaTeX
13765 \begin_layout Description
13766 \begin_inset Flex Code
13769 \begin_layout Plain Layout
13776 \begin_inset Flex Code
13779 \begin_layout Plain Layout
13785 ] This provides extra space between paragraphs that have the same style.
13786 If you put other styles into an environment, each is separated with the
13788 \begin_inset Flex Code
13791 \begin_layout Plain Layout
13798 But the whole items of the environment are additionally separated with
13800 \begin_inset Flex Code
13803 \begin_layout Plain Layout
13810 Note that this is a
13815 \begin_layout Description
13816 \begin_inset Flex Code
13819 \begin_layout Plain Layout
13825 [FIXME] (Used only with XML-type formats.)
13828 \begin_layout Description
13829 \begin_inset Flex Code
13832 \begin_layout Plain Layout
13839 \begin_inset Flex Code
13842 \begin_layout Plain Layout
13851 \begin_inset space \thinspace{}
13855 \begin_inset Flex Code
13858 \begin_layout Plain Layout
13864 ] Usually \SpecialChar LyX
13865 does not allow you to leave a paragraph empty, since it would
13866 lead to empty \SpecialChar LaTeX
13868 There are some cases where this could be desirable however: in a letter
13869 template, the required fields can be provided as empty fields, so that
13870 people do not forget them; in some special classes, a style can be used
13871 as some kind of break, which does not contain actual text.
13874 \begin_layout Description
13875 \begin_inset Flex Code
13878 \begin_layout Plain Layout
13885 \begin_inset Flex Code
13888 \begin_layout Plain Layout
13894 ] The vertical space between the label and the text body.
13895 Only used for labels that are above the text body (
13896 \begin_inset Flex Code
13899 \begin_layout Plain Layout
13906 \begin_inset Newline newline
13910 \begin_inset Flex Code
13913 \begin_layout Plain Layout
13914 Centered_Top_Environment
13922 \begin_layout Description
13923 \begin_inset Flex Code
13926 \begin_layout Plain Layout
13933 \begin_inset Flex Code
13936 \begin_layout Plain Layout
13942 ] The name of the counter for automatic numbering.
13943 In order to have the counter appear with your label, you will need to reference
13945 \begin_inset Flex Code
13948 \begin_layout Plain Layout
13957 This will work with
13958 \begin_inset Flex Code
13961 \begin_layout Plain Layout
13968 \begin_inset Flex Code
13971 \begin_layout Plain Layout
13978 \begin_inset Flex Code
13981 \begin_layout Plain Layout
13988 \begin_inset Flex Code
13991 \begin_layout Plain Layout
13998 \begin_inset Newline newline
14006 \begin_inset Flex Code
14009 \begin_layout Plain Layout
14016 \begin_inset Flex Code
14019 \begin_layout Plain Layout
14025 , though this case is a bit complicated.
14026 Suppose you declare
14027 \begin_inset Quotes eld
14031 \begin_inset Flex Code
14034 \begin_layout Plain Layout
14035 LabelCounter myenum
14041 \begin_inset Quotes erd
14045 Then the actual counters used are
14046 \begin_inset Flex Code
14049 \begin_layout Plain Layout
14056 \begin_inset Flex Code
14059 \begin_layout Plain Layout
14066 \begin_inset Flex Code
14069 \begin_layout Plain Layout
14076 \begin_inset Flex Code
14079 \begin_layout Plain Layout
14085 , much as in \SpecialChar LaTeX
14087 These counters must all be declared separately.
14088 \begin_inset Newline newline
14092 \begin_inset CommandInset ref
14094 reference "subsec:Counters"
14098 for details on counters.
14101 \begin_layout Description
14102 \begin_inset Flex Code
14105 \begin_layout Plain Layout
14111 The font used for the label.
14113 \begin_inset CommandInset ref
14115 reference "subsec:Font-description"
14122 \begin_layout Description
14123 \begin_inset Flex Code
14126 \begin_layout Plain Layout
14133 \begin_inset Flex Code
14136 \begin_layout Plain Layout
14142 ] Text that indicates how far a label should be indented.
14145 \begin_layout Description
14146 \begin_inset Flex Code
14149 \begin_layout Plain Layout
14156 \begin_inset Flex Code
14159 \begin_layout Plain Layout
14165 ] Text that indicates the amount of horizontal space between the label and
14167 Only used for labels that are not above the text body.
14170 \begin_layout Description
14171 \begin_inset Flex Code
14174 \begin_layout Plain Layout
14181 \begin_inset Flex Code
14184 \begin_layout Plain Layout
14190 ] The string used for the label.
14192 \begin_inset Flex Code
14195 \begin_layout Plain Layout
14201 is set, this string can be contain the special formatting commands described
14203 \begin_inset CommandInset ref
14205 reference "subsec:Counters"
14212 \begin_layout Description
14213 \begin_inset Flex Code
14216 \begin_layout Plain Layout
14217 LabelStringAppendix
14223 \begin_inset Flex Code
14226 \begin_layout Plain Layout
14232 ] This is used inside the appendix instead of
14233 \begin_inset Newline newline
14237 \begin_inset Flex Code
14240 \begin_layout Plain Layout
14248 \begin_inset Flex Code
14251 \begin_layout Plain Layout
14258 \begin_inset Newline newline
14262 \begin_inset Flex Code
14265 \begin_layout Plain Layout
14266 LabelStringAppendix
14274 \begin_layout Description
14275 \begin_inset Flex Code
14278 \begin_layout Plain Layout
14284 [FIXME] (Used only with XML-type formats.)
14287 \begin_layout Description
14288 \begin_inset Flex Code
14291 \begin_layout Plain Layout
14298 \begin_inset Flex Code
14301 \begin_layout Plain Layout
14306 , Manual, Static, Above,
14307 \begin_inset Newline newline
14310 Centered, Sensitive, Enumerate,
14311 \begin_inset Newline newline
14314 Itemize, Bibliography
14323 \begin_layout Description
14324 \begin_inset Flex Code
14327 \begin_layout Plain Layout
14333 means the label is the very first word (up to the first real blank).
14334 Use protected spaces if you want more than one word as the label.
14338 \begin_layout Description
14339 \begin_inset Flex Code
14342 \begin_layout Plain Layout
14348 means the label is simply what is declared as
14349 \begin_inset Flex Code
14352 \begin_layout Plain Layout
14359 This will be displayed
14360 \begin_inset Quotes eld
14364 \begin_inset Quotes erd
14367 , at the beginning of the paragraph.
14369 \begin_inset Flex Code
14372 \begin_layout Plain Layout
14379 \begin_inset Flex Code
14382 \begin_layout Plain Layout
14388 , then it will be displayed only in the first paragraph of any sequence
14389 of paragraphs with the same
14390 \begin_inset Flex Code
14393 \begin_layout Plain Layout
14402 \begin_layout Description
14403 \begin_inset Flex Code
14406 \begin_layout Plain Layout
14413 \begin_inset space ~
14417 \begin_inset space ~
14421 \begin_inset Flex Code
14424 \begin_layout Plain Layout
14430 are special cases of
14431 \begin_inset Flex Code
14434 \begin_layout Plain Layout
14441 The label will be printed above the paragraph either at the beginning of
14442 the line or centered.
14445 \begin_layout Description
14446 \begin_inset Flex Code
14449 \begin_layout Plain Layout
14455 is a special case for the caption-labels
14456 \begin_inset Quotes eld
14460 \begin_inset Quotes erd
14464 \begin_inset Quotes eld
14468 \begin_inset Quotes erd
14472 \begin_inset Newline newline
14476 \begin_inset Flex Code
14479 \begin_layout Plain Layout
14485 means the (hardcoded) label string depends on the kind of float: It is
14486 hardcoded to be `FloatType N', where N is the value of the counter associated
14488 For the case that a caption is inserted outside of a float the
14489 \begin_inset Flex Code
14492 \begin_layout Plain Layout
14499 \begin_inset Quotes eld
14503 \begin_inset Quotes erd
14509 \begin_layout Description
14510 \begin_inset Flex Code
14513 \begin_layout Plain Layout
14519 produces the usual sort of enumeration labels.
14520 The number type needs to be set in the
14525 \begin_inset CommandInset ref
14527 reference "subsec:Counters"
14534 \begin_layout Description
14535 \begin_inset Flex Code
14538 \begin_layout Plain Layout
14544 produces various bullets at the different levels.
14545 The bullet types displayed can be set via
14546 \begin_inset Flex Noun
14549 \begin_layout Plain Layout
14550 Document\SpecialChar menuseparator
14551 Settings\SpecialChar menuseparator
14560 \begin_layout Description
14561 \begin_inset Flex Code
14564 \begin_layout Plain Layout
14570 should be used only with
14571 \begin_inset Flex Code
14574 \begin_layout Plain Layout
14575 LatexType BibEnvironment
14584 \begin_layout Description
14585 \begin_inset Flex Code
14588 \begin_layout Plain Layout
14594 Note that this will completely override any prior
14595 \begin_inset Flex Code
14598 \begin_layout Plain Layout
14604 declaration for this style.
14606 \begin_inset Quotes eld
14610 \begin_inset Flex Code
14613 \begin_layout Plain Layout
14620 \begin_inset Quotes erd
14625 \begin_inset CommandInset ref
14627 reference "subsec:I18n"
14631 for details on its use.
14634 \begin_layout Description
14635 \begin_inset Flex Code
14638 \begin_layout Plain Layout
14645 \begin_inset Flex Code
14648 \begin_layout Plain Layout
14654 ] The name of the corresponding \SpecialChar LaTeX
14656 Either the environment or command name.
14659 \begin_layout Description
14660 \begin_inset Flex Code
14663 \begin_layout Plain Layout
14670 \begin_inset Flex Code
14673 \begin_layout Plain Layout
14679 ] An optional parameter for the corresponding
14680 \begin_inset Flex Code
14683 \begin_layout Plain Layout
14690 This parameter cannot be changed from within \SpecialChar LyX
14692 \begin_inset Flex Code
14695 \begin_layout Plain Layout
14701 for customizable parameters).
14702 This will be output as is after all \SpecialChar LaTeX
14704 \begin_inset Flex Code
14707 \begin_layout Plain Layout
14716 \begin_layout Description
14717 \begin_inset Flex Code
14720 \begin_layout Plain Layout
14727 \begin_inset Flex Code
14730 \begin_layout Plain Layout
14735 , Command, Environment, Item_Environment,
14736 \begin_inset Newline newline
14739 List_Environment, Bib_Environment
14744 ] How the style should be translated into \SpecialChar LaTeX
14749 \begin_layout Plain Layout
14750 \begin_inset Flex Code
14753 \begin_layout Plain Layout
14759 is perhaps a bit misleading, since these rules apply to SGML classes, too.
14760 Visit the SGML class files for specific examples.
14769 \begin_layout Description
14770 \begin_inset Flex Code
14773 \begin_layout Plain Layout
14779 means nothing special.
14782 \begin_layout Description
14783 \begin_inset Flex Code
14786 \begin_layout Plain Layout
14793 \begin_inset Flex Code
14796 \begin_layout Plain Layout
14803 {\SpecialChar ldots
14812 \begin_layout Description
14813 \begin_inset Flex Code
14816 \begin_layout Plain Layout
14823 \begin_inset Flex Code
14826 \begin_layout Plain Layout
14833 }\SpecialChar ldots
14849 \begin_layout Description
14850 \begin_inset Flex Code
14853 \begin_layout Plain Layout
14860 \begin_inset Flex Code
14863 \begin_layout Plain Layout
14870 \begin_inset Flex Code
14873 \begin_layout Plain Layout
14881 is generated for each paragraph of this environment.
14885 \begin_layout Description
14886 \begin_inset Flex Code
14889 \begin_layout Plain Layout
14896 \begin_inset Flex Code
14899 \begin_layout Plain Layout
14906 \begin_inset Newline newline
14910 \begin_inset Flex Code
14913 \begin_layout Plain Layout
14919 is passed as an argument to the environment.
14920 \begin_inset Newline newline
14924 \begin_inset Flex Code
14927 \begin_layout Plain Layout
14933 can be defined in the
14934 \begin_inset Flex Noun
14937 \begin_layout Plain Layout
14938 Edit\SpecialChar menuseparator
14940 \begin_inset space ~
14951 \begin_layout Description
14952 \begin_inset Flex Code
14955 \begin_layout Plain Layout
14962 \begin_inset Flex Code
14965 \begin_layout Plain Layout
14971 but adds the necessary mandatory argument (the longest label) to the begin
14972 statement of the bibliography environment:
14973 \begin_inset Newline newline
14977 \begin_inset Flex Code
14980 \begin_layout Plain Layout
14983 begin{thebibliography}{99}
14989 It is therefore only useful for bibliography environments.
14990 The default longest label
14991 \begin_inset Quotes eld
14995 \begin_inset Quotes erd
14998 can be changed by the user in the paragraph settings of a bibliography
15002 \begin_layout Standard
15003 Putting the last few things together, the \SpecialChar LaTeX
15004 output will be either:
15007 \begin_layout LyX-Code
15010 LatexName[LatexParam]{\SpecialChar ldots
15014 \begin_layout Standard
15018 \begin_layout LyX-Code
15021 begin{LatexName}[LatexParam] \SpecialChar ldots
15027 \begin_layout Standard
15028 depending upon the \SpecialChar LaTeX
15033 \begin_layout Description
15034 \begin_inset Flex Code
15037 \begin_layout Plain Layout
15044 \begin_inset Flex Code
15047 \begin_layout Plain Layout
15053 ] A string that is put at the beginning of the style content.
15054 A line break in the output can be indicated by
15055 \begin_inset Flex Code
15058 \begin_layout Plain Layout
15067 \begin_layout Description
15068 \begin_inset Flex Code
15071 \begin_layout Plain Layout
15078 \begin_inset Flex Code
15081 \begin_layout Plain Layout
15087 ] If you put styles into environments, the different
15088 \begin_inset Flex Code
15091 \begin_layout Plain Layout
15097 are not simply added, but added with a factor
15098 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
15102 Note that this parameter is also used when
15103 \begin_inset Flex Code
15106 \begin_layout Plain Layout
15113 \begin_inset Flex Code
15116 \begin_layout Plain Layout
15123 \begin_inset Flex Code
15126 \begin_layout Plain Layout
15133 Then it is added to the manual or dynamic margin.
15134 \begin_inset Newline newline
15138 \begin_inset Quotes eld
15142 \begin_inset Flex Code
15145 \begin_layout Plain Layout
15152 \begin_inset Quotes erd
15155 means that the paragraph is indented with the width of
15156 \begin_inset Quotes eld
15160 \begin_inset Flex Code
15163 \begin_layout Plain Layout
15170 \begin_inset Quotes erd
15173 in the normal font.
15174 You can get a negative width by prefixing the string with
15175 \begin_inset Quotes eld
15179 \begin_inset Flex Code
15182 \begin_layout Plain Layout
15189 \begin_inset Quotes erd
15193 This way was chosen so that the look is the same with each used screen
15197 \begin_layout Description
15198 \begin_inset Flex Code
15201 \begin_layout Plain Layout
15208 \begin_inset Flex Code
15211 \begin_layout Plain Layout
15216 , Manual, Dynamic, First_Dynamic, Right_Address_Box
15222 \begin_inset Newline newline
15225 The kind of margin that the style has on the left side.
15229 \begin_layout Description
15230 \begin_inset Flex Code
15233 \begin_layout Plain Layout
15239 just means a fixed margin.
15242 \begin_layout Description
15243 \begin_inset Flex Code
15246 \begin_layout Plain Layout
15252 means that the left margin depends on the string entered in the
15253 \begin_inset Flex Noun
15256 \begin_layout Plain Layout
15257 Edit\SpecialChar menuseparator
15259 \begin_inset space ~
15268 This is used to typeset nice lists without tabulators.
15271 \begin_layout Description
15272 \begin_inset Flex Code
15275 \begin_layout Plain Layout
15281 means that the margin depends on the size of the label.
15282 This is used for automatic enumerated headlines.
15283 It is obvious that the headline
15284 \begin_inset Quotes eld
15287 5.4.3.2.1 Very long headline
15288 \begin_inset Quotes erd
15291 must have a wider left margin (as wide as
15292 \begin_inset Quotes eld
15296 \begin_inset Quotes erd
15299 plus the space) than
15300 \begin_inset Quotes eld
15303 3.2 Very long headline
15304 \begin_inset Quotes erd
15308 \begin_inset Quotes eld
15312 \begin_inset Quotes erd
15315 are not able to do this.
15318 \begin_layout Description
15319 \begin_inset Flex Code
15322 \begin_layout Plain Layout
15328 is similar, but only the very first row of the paragraph is dynamic, while
15329 the others are static; this is used, for example, for descriptions.
15332 \begin_layout Description
15333 \begin_inset Flex Code
15336 \begin_layout Plain Layout
15342 means the margin is chosen in a way that the longest row of this paragraph
15343 fits to the right margin.
15344 This is used to typeset an address on the right edge of the page.
15348 \begin_layout Description
15349 \begin_inset Flex Code
15352 \begin_layout Plain Layout
15359 \begin_inset Flex Code
15362 \begin_layout Plain Layout
15371 \begin_inset space \thinspace{}
15375 \begin_inset Flex Code
15378 \begin_layout Plain Layout
15384 ] Whether fragile commands in this style should be
15385 \begin_inset Flex Code
15388 \begin_layout Plain Layout
15401 whether this command should itself be protected.)
15402 \change_inserted -712698321 1523696949
15406 \begin_layout Description
15408 \change_inserted -712698321 1552395557
15409 \begin_inset Flex Code
15412 \begin_layout Plain Layout
15414 \change_inserted -712698321 1523696950
15421 \begin_inset Flex Code
15424 \begin_layout Plain Layout
15426 \change_inserted -712698321 1523696950
15435 \begin_inset space \thinspace{}
15439 \begin_inset Flex Code
15442 \begin_layout Plain Layout
15444 \change_inserted -712698321 1523696950
15450 ] This causes macros that contain this layout to be protected with
15451 \begin_inset Flex Code
15454 \begin_layout Plain Layout
15456 \change_inserted -712698321 1523696950
15469 ) if necessary and thus allows (some) verbatim stuff in macros.
15472 \begin_layout Description
15474 \change_inserted -712698321 1552395844
15475 \begin_inset Flex Code
15478 \begin_layout Plain Layout
15480 \change_inserted -712698321 1552395561
15487 \begin_inset Flex Code
15490 \begin_layout Plain Layout
15492 \change_inserted -712698321 1552395557
15501 \begin_inset space \thinspace{}
15505 \begin_inset Flex Code
15508 \begin_layout Plain Layout
15510 \change_inserted -712698321 1552395557
15516 ] Whether specific commands in this style (such as
15517 \begin_inset Flex Code
15520 \begin_layout Plain Layout
15522 \change_inserted -712698321 1552395655
15533 \begin_inset Flex Code
15536 \begin_layout Plain Layout
15538 \change_inserted -712698321 1552395661
15548 ) should be protected in an
15549 \begin_inset Flex Code
15552 \begin_layout Plain Layout
15554 \change_inserted -712698321 1552395631
15565 This is particularly needed for styles that draw on
15573 commands which parse their content in complex ways.
15578 \begin_layout Description
15579 \begin_inset Flex Code
15582 \begin_layout Plain Layout
15589 \begin_inset Flex Code
15592 \begin_layout Plain Layout
15599 \begin_inset space \thinspace{}
15603 \begin_inset Flex Code
15606 \begin_layout Plain Layout
15614 ] Whether newlines are translated into \SpecialChar LaTeX
15616 \begin_inset Flex Code
15619 \begin_layout Plain Layout
15630 The translation can be switched off to allow more comfortable \SpecialChar LaTeX
15632 inside \SpecialChar LyX
15636 \begin_layout Description
15637 \begin_inset Flex Code
15640 \begin_layout Plain Layout
15647 \begin_inset Flex Code
15650 \begin_layout Plain Layout
15659 \begin_inset space \thinspace{}
15663 \begin_inset Flex Code
15666 \begin_layout Plain Layout
15672 ] If set to true, and if
15673 \begin_inset Flex Code
15676 \begin_layout Plain Layout
15683 \begin_inset Flex Code
15686 \begin_layout Plain Layout
15692 ) paragraphs are being indented, then the indentation of such a paragraph
15693 following one of this type will be suppressed.
15694 (So this will not affect the display of non-default paragraphs.)
15697 \begin_layout Description
15698 \begin_inset Flex Code
15701 \begin_layout Plain Layout
15708 \begin_inset Flex Code
15711 \begin_layout Plain Layout
15717 ] Name of a style that has replaced this style.
15718 This is used to rename a style, while keeping backward compatibility.
15721 \begin_layout Description
15722 \begin_inset Flex Code
15725 \begin_layout Plain Layout
15732 \begin_inset Flex Code
15735 \begin_layout Plain Layout
15742 \begin_inset space \thinspace{}
15746 \begin_inset Flex Code
15749 \begin_layout Plain Layout
15755 ] Determines whether consecutive paragraphs of the same type are treated
15756 as belonging together.
15757 This has the effect that the
15758 \begin_inset Flex Code
15761 \begin_layout Plain Layout
15767 is only printed once before such a group.
15768 By default, this is true for
15769 \begin_inset Flex Code
15772 \begin_layout Plain Layout
15779 \begin_inset Flex Code
15782 \begin_layout Plain Layout
15789 \begin_inset Flex Code
15792 \begin_layout Plain Layout
15798 and false for all other types.
15801 \begin_layout Description
15802 \begin_inset Flex Code
15805 \begin_layout Plain Layout
15812 \begin_inset Flex Code
15815 \begin_layout Plain Layout
15824 \begin_inset space \thinspace{}
15828 \begin_inset Flex Code
15831 \begin_layout Plain Layout
15837 ] Indicates that paragraphs will not be separated by an empty line in \SpecialChar LaTeX
15839 but only by a line break; together with
15840 \begin_inset Flex Code
15843 \begin_layout Plain Layout
15849 , this allows to emulate a plain text editor (like the ERT inset).
15852 \begin_layout Description
15853 \begin_inset Flex Code
15856 \begin_layout Plain Layout
15863 \begin_inset Flex Code
15866 \begin_layout Plain Layout
15872 ] The indent of the very first line of a paragraph.
15874 \begin_inset Newline newline
15878 \begin_inset Flex Code
15881 \begin_layout Plain Layout
15887 will be fixed for a certain style.
15888 The exception is the default style, since the indentation for these paragraphs
15889 can be prohibited with
15890 \begin_inset Flex Code
15893 \begin_layout Plain Layout
15901 \begin_inset Flex Code
15904 \begin_layout Plain Layout
15910 style paragraphs inside environments use the
15911 \begin_inset Flex Code
15914 \begin_layout Plain Layout
15920 of the environment, not their native one.
15922 \begin_inset Flex Code
15925 \begin_layout Plain Layout
15931 paragraphs inside an enumeration are not indented.
15934 \begin_layout Description
15935 \begin_inset Flex Code
15938 \begin_layout Plain Layout
15945 \begin_inset Flex Code
15948 \begin_layout Plain Layout
15954 ] The vertical space between two paragraphs of this style.
15957 \begin_layout Description
15958 \begin_inset Flex Code
15961 \begin_layout Plain Layout
15968 \begin_inset Flex Code
15971 \begin_layout Plain Layout
15978 allows the user to choose either
15979 \begin_inset Quotes eld
15983 \begin_inset Quotes erd
15987 \begin_inset Quotes eld
15991 \begin_inset Quotes erd
15994 to separate paragraphs.
15996 \begin_inset Quotes eld
16000 \begin_inset Quotes erd
16004 \begin_inset Flex Code
16007 \begin_layout Plain Layout
16015 \begin_inset Quotes eld
16019 \begin_inset Quotes erd
16023 \begin_inset Flex Code
16026 \begin_layout Plain Layout
16032 is ignored and all paragraphs are separated by the
16033 \begin_inset Flex Code
16036 \begin_layout Plain Layout
16043 The vertical space is calculated with
16044 \begin_inset Flex Code
16047 \begin_layout Plain Layout
16049 \begin_inset space ~
16058 \begin_inset Flex Code
16061 \begin_layout Plain Layout
16067 is the height of a row with the normal font.
16068 This way, the look stays the same with different screen fonts.
16071 \begin_layout Description
16072 \begin_inset Flex Code
16075 \begin_layout Plain Layout
16082 \begin_inset Flex Code
16085 \begin_layout Plain Layout
16094 \begin_inset space \thinspace{}
16098 \begin_inset Flex Code
16101 \begin_layout Plain Layout
16107 ] Whether the contents of this paragraph should be output in raw form, meaning
16108 without special translations that \SpecialChar LaTeX
16112 \begin_layout Description
16113 \begin_inset Flex Code
16116 \begin_layout Plain Layout
16123 \begin_inset Flex Code
16126 \begin_layout Plain Layout
16136 Defines individual characters that should be output in raw form, meaning
16137 without special translations that \SpecialChar LaTeX
16141 \begin_layout Description
16142 \begin_inset Flex Code
16145 \begin_layout Plain Layout
16151 Information to be included in the \SpecialChar LaTeX
16152 preamble when this style is used.
16153 Used to define macros, load packages, etc., required by this particular
16156 \begin_inset Quotes eld
16160 \begin_inset Flex Code
16163 \begin_layout Plain Layout
16170 \begin_inset Quotes erd
16176 \begin_layout Description
16177 \begin_inset Flex Code
16180 \begin_layout Plain Layout
16187 \begin_inset Flex Code
16190 \begin_layout Plain Layout
16196 ] The prefix to use when creating labels referring to paragraphs of this
16198 This allows the use of formatted references.
16201 \begin_layout Description
16202 \begin_inset Flex Code
16205 \begin_layout Plain Layout
16212 \begin_inset Flex Code
16215 \begin_layout Plain Layout
16221 ] Whether the style requires the feature
16222 \begin_inset Flex Code
16225 \begin_layout Plain Layout
16232 \begin_inset CommandInset ref
16234 reference "chap:List-of-functions"
16238 for the list of features).
16239 If you require a package with specific options, you can additionally use
16241 \begin_inset Flex Code
16244 \begin_layout Plain Layout
16250 as a general text class parameter (see
16251 \begin_inset CommandInset ref
16253 reference "subsec:General-text-class"
16260 \begin_layout Description
16261 \begin_inset Flex Code
16264 \begin_layout Plain Layout
16271 \begin_inset Flex Code
16274 \begin_layout Plain Layout
16283 \begin_inset Flex Code
16286 \begin_layout Plain Layout
16292 ] Resets the \SpecialChar LaTeX
16293 arguments of this style (as defined via the
16294 \begin_inset Flex Code
16297 \begin_layout Plain Layout
16304 This is useful if you have copied a style via
16305 \begin_inset Flex Code
16308 \begin_layout Plain Layout
16314 , but you do not want to inherit its (required and optional) arguments.
16317 \begin_layout Description
16318 \begin_inset Flex Code
16321 \begin_layout Plain Layout
16328 \begin_inset Flex Code
16331 \begin_layout Plain Layout
16340 \begin_inset Flex Code
16343 \begin_layout Plain Layout
16349 ] Resumes a counter that is usually reset at each new sequence of layouts.
16350 This is currently only useful when
16351 \begin_inset Flex Code
16354 \begin_layout Plain Layout
16361 \begin_inset Flex Code
16364 \begin_layout Plain Layout
16373 \begin_layout Description
16374 \begin_inset Flex Code
16377 \begin_layout Plain Layout
16384 \begin_inset Flex Code
16387 \begin_layout Plain Layout
16393 ] A string that is put at the end of the layout content.
16394 A line break in the output can be indicated by
16395 \begin_inset Flex Code
16398 \begin_layout Plain Layout
16407 \begin_layout Description
16408 \begin_inset Flex Code
16411 \begin_layout Plain Layout
16418 \begin_inset Flex Code
16421 \begin_layout Plain Layout
16428 \begin_inset Flex Code
16431 \begin_layout Plain Layout
16440 \begin_layout Description
16441 \begin_inset Flex Code
16444 \begin_layout Plain Layout
16451 \begin_inset Flex Code
16454 \begin_layout Plain Layout
16463 \begin_inset Flex Code
16466 \begin_layout Plain Layout
16473 \begin_inset Flex Code
16476 \begin_layout Plain Layout
16483 \begin_inset Flex Code
16486 \begin_layout Plain Layout
16488 \begin_inset space ~
16496 ] This defines what the default spacing should be in the style.
16498 \begin_inset Flex Code
16501 \begin_layout Plain Layout
16508 \begin_inset Flex Code
16511 \begin_layout Plain Layout
16518 \begin_inset Flex Code
16521 \begin_layout Plain Layout
16527 correspond respectively to a multiplier value of 1, 1.25 and 1.667.
16528 If you specify the argument
16529 \begin_inset Flex Code
16532 \begin_layout Plain Layout
16538 , then you must also provide a value argument which will be the actual multiplie
16540 Note that, contrary to other parameters,
16541 \begin_inset Flex Code
16544 \begin_layout Plain Layout
16550 implies the generation of specific \SpecialChar LaTeX
16551 code, using the \SpecialChar LaTeX
16555 \begin_inset Flex Code
16558 \begin_layout Plain Layout
16567 \begin_layout Description
16568 \begin_inset Flex Code
16571 \begin_layout Plain Layout
16578 \begin_inset Flex Code
16581 \begin_layout Plain Layout
16588 \begin_inset space \thinspace{}
16592 \begin_inset Flex Code
16595 \begin_layout Plain Layout
16603 ] Allow spell-checking paragraphs of this style.
16607 \begin_layout Description
16608 \begin_inset Flex Code
16611 \begin_layout Plain Layout
16618 \begin_inset Flex Code
16621 \begin_layout Plain Layout
16630 \begin_inset Flex Code
16633 \begin_layout Plain Layout
16639 ] Steps the master counter of a given counter at the beginning of a new
16640 sequence of layouts.
16641 This is currently only useful when
16642 \begin_inset Flex Code
16645 \begin_layout Plain Layout
16652 \begin_inset Flex Code
16655 \begin_layout Plain Layout
16664 \begin_layout Description
16665 \begin_inset Flex Code
16668 \begin_layout Plain Layout
16674 The font used for the text body .
16676 \begin_inset CommandInset ref
16678 reference "subsec:Font-description"
16685 \begin_layout Description
16686 \begin_inset Flex Code
16689 \begin_layout Plain Layout
16698 \begin_inset Flex Code
16701 \begin_layout Plain Layout
16711 The level of the style in the table of contents.
16712 This is used for automatic numbering of section headings.
16715 \begin_layout Description
16716 \begin_inset Flex Code
16719 \begin_layout Plain Layout
16728 \begin_inset Flex Code
16731 \begin_layout Plain Layout
16742 \begin_inset Flex Code
16745 \begin_layout Plain Layout
16752 \begin_inset Flex Code
16755 \begin_layout Plain Layout
16761 ] This tag determines whether the first line indentation of this paragraph
16762 can be toggled via the Paragraph settings dialog.
16766 \begin_inset Flex Code
16769 \begin_layout Plain Layout
16779 is set, indentation can be toggled if the document settings use
16780 \begin_inset Quotes eld
16784 \begin_inset Quotes erd
16787 paragraph style, with
16788 \begin_inset Flex Code
16791 \begin_layout Plain Layout
16797 , indentation can always be toggled, notwithstanding the document settings,
16799 \begin_inset Flex Code
16802 \begin_layout Plain Layout
16808 , indentation can never be toggled.
16811 \begin_layout Description
16812 \begin_inset Flex Code
16815 \begin_layout Plain Layout
16822 \begin_inset Flex Code
16825 \begin_layout Plain Layout
16831 ] The vertical space with which the very first of a chain of paragraphs
16832 with this style is separated from the previous paragraph.
16833 If the previous paragraph has another style, the separations are not simply
16834 added, but the maximum is taken.
16837 \begin_layout Subsection
16838 \begin_inset CommandInset label
16844 Internationalization of Paragraph Styles
16847 \begin_layout Standard
16849 has long supported internationalization of layout information, but, until
16850 version 2.0, this applied only to the user interface and not to, say, PDF
16852 Thus, French authors were forced to resort to ugly hacks if they wanted
16857 1' instead of `Theorem 1'.
16858 Thanks to Georg Baum, that is no longer the case.
16861 \begin_layout Standard
16863 \begin_inset Flex Code
16866 \begin_layout Plain Layout
16872 defines text that is to appear in the typeset document, it may use
16873 \begin_inset Flex Code
16876 \begin_layout Plain Layout
16883 \begin_inset Flex Code
16886 \begin_layout Plain Layout
16892 to support non-English and even multi-language documents correctly.
16893 The following excerpt (from the
16894 \begin_inset Flex Code
16897 \begin_layout Plain Layout
16903 file) shows how this works:
16906 \begin_layout LyX-Code
16911 \begin_layout LyX-Code
16914 theoremstyle{remark}
16917 \begin_layout LyX-Code
16920 newtheorem{claim}[thm]{
16927 \begin_layout LyX-Code
16931 \begin_layout LyX-Code
16935 \begin_layout LyX-Code
16940 claimname}{_(Claim)}
16943 \begin_layout LyX-Code
16947 \begin_layout LyX-Code
16951 \begin_layout LyX-Code
16960 claimname}{_(Claim)}}
16963 \begin_layout LyX-Code
16968 \begin_layout Standard
16969 In principle, any legal \SpecialChar LaTeX
16971 \begin_inset Flex Code
16974 \begin_layout Plain Layout
16981 \begin_inset Flex Code
16984 \begin_layout Plain Layout
16990 tags, but in practice they will typically look as they do here.
16991 The key to correct translation of the typeset text is the definition of
16992 the \SpecialChar LaTeX
16994 \begin_inset Flex Code
16997 \begin_layout Plain Layout
17006 \begin_inset Flex Code
17009 \begin_layout Plain Layout
17021 \begin_layout Standard
17023 \begin_inset Flex Code
17026 \begin_layout Plain Layout
17032 tag provides for internationalization based upon the overall language of
17034 The contents of the tag will be included in the preamble, just as with
17036 \begin_inset Flex Code
17039 \begin_layout Plain Layout
17046 What makes it special is the use of the
17047 \begin_inset Quotes eld
17051 \begin_inset Quotes erd
17055 \begin_inset Flex Code
17058 \begin_layout Plain Layout
17064 , which will be replaced, when \SpecialChar LyX
17065 produces \SpecialChar LaTeX
17066 output, with the translation of
17067 its argument into the document language.
17070 \begin_layout Standard
17072 \begin_inset Flex Code
17075 \begin_layout Plain Layout
17081 tag is more complex, since it is meant to provide support for multi-language
17082 documents and so offers an interface to the
17083 \begin_inset Flex Code
17086 \begin_layout Plain Layout
17093 Its contents will be added to the preamble once for each language that
17094 appears in the document.
17095 In this case, the argument to
17096 \begin_inset Flex Code
17099 \begin_layout Plain Layout
17105 will be replaced with its translation into the language in question; the
17107 \begin_inset Flex Code
17110 \begin_layout Plain Layout
17116 is replaced by the language name (as used by the babel package).
17119 \begin_layout Standard
17120 A German document that also included a French section would thus have the
17121 following in the preamble:
17124 \begin_layout LyX-Code
17133 claimname}{Affirmation}}
17134 \begin_inset Newline newline
17145 claimname}{Behauptung}}
17146 \begin_inset Newline newline
17153 claimname}{Behauptung}
17156 \begin_layout Standard
17159 \begin_inset Flex Code
17162 \begin_layout Plain Layout
17168 will then conspire to produce the correct text in the output.
17171 \begin_layout Standard
17172 One important point to note here is that the translations are provided by
17174 itself, through the file
17175 \begin_inset Flex Code
17178 \begin_layout Plain Layout
17185 This means, in effect, that
17186 \begin_inset Flex Code
17189 \begin_layout Plain Layout
17196 \begin_inset Flex Code
17199 \begin_layout Plain Layout
17205 are really only of use in layout files that are provided with \SpecialChar LyX
17207 entered in user-created layout files will not be seen by \SpecialChar LyX
17208 's internationalizatio
17209 n routines unless the
17210 \begin_inset Flex Code
17213 \begin_layout Plain Layout
17219 file is modified accordingly.
17220 That said, however, any layout created with the intention that it will
17221 be included with \SpecialChar LyX
17222 should use these tags where appropriate.
17223 Please note that the paragraph style translations provided by \SpecialChar LyX
17225 change with a minor update (e.
17226 \begin_inset space \thinspace{}
17230 \begin_inset space \space{}
17233 from version 2.1.x to 2.1.y).
17234 It is however quite likely that a major update (e.
17235 \begin_inset space \thinspace{}
17239 \begin_inset space \space{}
17242 from 2.0.x to 2.1.0) will introduce new translations or corrections.
17245 \begin_layout Subsection
17247 \begin_inset CommandInset label
17249 name "subsec:Floats"
17256 \begin_layout Standard
17257 It is necessary to define the floats (
17258 \begin_inset Flex Noun
17261 \begin_layout Plain Layout
17268 \begin_inset Flex Noun
17271 \begin_layout Plain Layout
17277 , \SpecialChar ldots
17278 ) in the text class itself.
17279 Standard floats are included in the file
17280 \begin_inset Flex Code
17283 \begin_layout Plain Layout
17289 , so you may have to do no more than add
17292 \begin_layout LyX-Code
17293 Input stdfloats.inc
17296 \begin_layout Standard
17297 to your layout file.
17298 If you want to implement a text class that proposes some other float types
17299 (like the AGU class bundled with \SpecialChar LyX
17300 ), the information below will hopefully
17304 \begin_layout Description
17305 \begin_inset Flex Code
17308 \begin_layout Plain Layout
17315 \begin_inset Flex Code
17318 \begin_layout Plain Layout
17324 =!htbpH] Allowed placement options for this float type.
17325 The value is a string of placement characters.
17326 Possible characters include:
17331 \begin_inset Quotes eld
17335 \begin_inset Quotes erd
17343 \begin_inset Quotes eld
17347 \begin_inset Quotes erd
17355 \begin_inset Quotes eld
17359 \begin_inset Quotes erd
17367 \begin_inset Quotes eld
17371 \begin_inset Quotes erd
17379 \begin_inset Quotes eld
17383 \begin_inset Quotes erd
17391 \begin_inset Quotes eld
17395 \begin_inset Quotes erd
17399 The order of the characters in the string does not matter.
17400 If no placement options are allowed, use the string
17407 \begin_layout Description
17408 \begin_inset Flex Code
17411 \begin_layout Plain Layout
17418 \begin_inset Flex Code
17421 \begin_layout Plain Layout
17430 \begin_inset space \thinspace{}
17436 \begin_inset Flex Code
17439 \begin_layout Plain Layout
17449 ] Defines whether the float allows to be rotated via the \SpecialChar LaTeX
17456 \begin_inset Flex Code
17459 \begin_layout Plain Layout
17465 if the float does not support this feature.
17468 \begin_layout Description
17469 \begin_inset Flex Code
17472 \begin_layout Plain Layout
17479 \begin_inset Flex Code
17482 \begin_layout Plain Layout
17491 \begin_inset space \thinspace{}
17497 \begin_inset Flex Code
17500 \begin_layout Plain Layout
17510 ] Defines whether the float has a starred variant that spans columns in
17511 a two column paragraph.
17513 \begin_inset Flex Code
17516 \begin_layout Plain Layout
17522 if the float does not support this feature.
17525 \begin_layout Description
17526 \begin_inset Flex Code
17529 \begin_layout Plain Layout
17536 \begin_inset Flex Code
17539 \begin_layout Plain Layout
17546 \begin_inset Quotes erd
17550 \begin_inset Quotes erd
17553 ] The file name extension of an auxiliary file for the list of figures (or
17556 writes the captions to this file.
17559 \begin_layout Description
17560 \begin_inset Flex Code
17563 \begin_layout Plain Layout
17570 \begin_inset Flex Code
17573 \begin_layout Plain Layout
17580 \begin_inset Quotes erd
17584 \begin_inset Quotes erd
17587 ] The string that will be used in the menus and also for the caption.
17588 This is translated to the current language if babel is used.
17591 \begin_layout Description
17592 \begin_inset Flex Code
17595 \begin_layout Plain Layout
17601 These tags control the XHTML output.
17603 \begin_inset CommandInset ref
17605 reference "sec:Tags-for-XHTML"
17612 \begin_layout Description
17613 \begin_inset Flex Code
17616 \begin_layout Plain Layout
17625 \begin_inset Flex Code
17628 \begin_layout Plain Layout
17637 \begin_inset space \thinspace{}
17641 \begin_inset Flex Code
17644 \begin_layout Plain Layout
17650 ] Indicates whether the float is already defined in the document class or
17651 if instead the \SpecialChar LaTeX
17653 \begin_inset Flex Code
17656 \begin_layout Plain Layout
17662 needs to be loaded to define it on-the-fly.
17664 \begin_inset Flex Code
17667 \begin_layout Plain Layout
17674 \begin_inset Flex Code
17677 \begin_layout Plain Layout
17684 It should be set to
17685 \begin_inset Flex Code
17688 \begin_layout Plain Layout
17694 if the float is already defined by the \SpecialChar LaTeX
17698 \begin_layout Description
17699 \begin_inset Flex Code
17702 \begin_layout Plain Layout
17709 \begin_inset Flex Code
17712 \begin_layout Plain Layout
17719 \begin_inset Quotes erd
17723 \begin_inset Quotes erd
17726 ] The command used to generate a list of floats of this type; the leading
17735 \begin_inset Flex Code
17738 \begin_layout Plain Layout
17744 is false, since there is no standard way to generate this command.
17746 \begin_inset Flex Code
17749 \begin_layout Plain Layout
17755 is true, since in that case there is a standard way to define the command.
17758 \begin_layout Description
17759 \begin_inset Flex Code
17762 \begin_layout Plain Layout
17769 \begin_inset Flex Code
17772 \begin_layout Plain Layout
17779 \begin_inset Quotes erd
17783 \begin_inset Quotes erd
17786 ] A title for a list of floats of this kind (list of figures, tables, or
17788 It is used for the screen label within \SpecialChar LyX
17789 , it is used by \SpecialChar LaTeX
17791 it is used as the title in the XHTML output.
17792 It will be translated to the document language.
17795 \begin_layout Description
17796 \begin_inset Flex Code
17799 \begin_layout Plain Layout
17806 \begin_inset Flex Code
17809 \begin_layout Plain Layout
17816 \begin_inset Quotes erd
17820 \begin_inset Quotes erd
17823 ] This (optional) argument determines whether floats of this class will
17824 be numbered within some sectional unit of the document.
17826 \begin_inset Flex Code
17829 \begin_layout Plain Layout
17836 \begin_inset Quotes eld
17840 \begin_inset Flex Code
17843 \begin_layout Plain Layout
17850 \begin_inset Quotes erd
17853 , the floats will be numbered within chapters.
17857 \begin_layout Description
17858 \begin_inset Flex Code
17861 \begin_layout Plain Layout
17868 \begin_inset Flex Code
17871 \begin_layout Plain Layout
17878 \begin_inset Quotes erd
17882 \begin_inset Quotes erd
17885 ] The default placement for the given class of floats.
17886 The string should be as in standard \SpecialChar LaTeX
17888 \begin_inset Flex Code
17891 \begin_layout Plain Layout
17898 \begin_inset Flex Code
17901 \begin_layout Plain Layout
17908 \begin_inset Flex Code
17911 \begin_layout Plain Layout
17918 \begin_inset Flex Code
17921 \begin_layout Plain Layout
17927 for top, bottom, page, and here, respectively.
17931 \begin_layout Plain Layout
17932 Note that the order of these letters in the string is irrelevant, like in
17939 On top of that there is a new type,
17940 \begin_inset Flex Code
17943 \begin_layout Plain Layout
17949 , which does not really correspond to a float, since it means: put it
17950 \begin_inset Quotes eld
17954 \begin_inset Quotes erd
17958 Note however that the
17959 \begin_inset Flex Code
17962 \begin_layout Plain Layout
17968 specifier is special and, because of implementation details, cannot be
17969 used in non-built in float types.
17970 If you do not understand what this means, just use
17971 \begin_inset Quotes eld
17975 \begin_inset Flex Code
17978 \begin_layout Plain Layout
17985 \begin_inset Quotes erd
17991 \begin_layout Description
17992 \begin_inset Flex Code
17995 \begin_layout Plain Layout
18002 \begin_inset Flex Code
18005 \begin_layout Plain Layout
18011 ] The prefix to use when creating labels referring to floats of this type.
18012 This allows the use of formatted references.
18013 Note that you can remove any
18014 \begin_inset Flex Code
18017 \begin_layout Plain Layout
18023 set by a copied style by using the special value
18024 \begin_inset Quotes eld
18028 \begin_inset Quotes erd
18031 , which must be all caps.
18034 \begin_layout Description
18035 \begin_inset Flex Code
18038 \begin_layout Plain Layout
18045 \begin_inset Flex Code
18048 \begin_layout Plain Layout
18055 \begin_inset Quotes erd
18059 \begin_inset Quotes erd
18062 ] The style used when defining the float using
18063 \begin_inset Flex Code
18066 \begin_layout Plain Layout
18077 \begin_layout Description
18078 \begin_inset Flex Code
18081 \begin_layout Plain Layout
18088 \begin_inset Flex Code
18091 \begin_layout Plain Layout
18098 \begin_inset Quotes erd
18102 \begin_inset Quotes erd
18106 \begin_inset Quotes eld
18110 \begin_inset Quotes erd
18113 of the new class of floats, like program or algorithm.
18114 After the appropriate
18115 \begin_inset Flex Code
18118 \begin_layout Plain Layout
18127 \begin_inset Flex Code
18130 \begin_layout Plain Layout
18139 \begin_inset Flex Code
18142 \begin_layout Plain Layout
18153 \begin_layout Description
18154 \begin_inset Flex Code
18157 \begin_layout Plain Layout
18164 \begin_inset Flex Code
18167 \begin_layout Plain Layout
18174 \begin_inset space \thinspace{}
18178 \begin_inset Flex Code
18181 \begin_layout Plain Layout
18189 ] Specifies whether this float is defined using the \SpecialChar LaTeX
18191 \begin_inset Flex Code
18194 \begin_layout Plain Layout
18200 , either by the class file, another package or on-the-fly by \SpecialChar LyX
18204 \begin_layout Standard
18205 Note that defining a float with type
18206 \begin_inset Flex Code
18209 \begin_layout Plain Layout
18217 automatically defines the corresponding counter with name
18218 \begin_inset Flex Code
18221 \begin_layout Plain Layout
18232 \begin_layout Subsection
18233 Flex insets and InsetLayout
18234 \begin_inset CommandInset label
18236 name "subsec:Flex-insets-and"
18243 \begin_layout Standard
18244 Flex insets come in three different kinds:
18247 \begin_layout Itemize
18249 \begin_inset Flex Code
18252 \begin_layout Plain Layout
18258 ): These define semantic markup corresponding to such \SpecialChar LaTeX
18260 \begin_inset Flex Code
18263 \begin_layout Plain Layout
18272 \begin_inset Flex Code
18275 \begin_layout Plain Layout
18286 \begin_layout Itemize
18288 \begin_inset Flex Code
18291 \begin_layout Plain Layout
18297 ): These can be used to define custom collapsible insets, similar to \SpecialChar TeX
18299 footnote, and the like.
18300 An obvious example is an endnote inset, which is defined in the
18301 \begin_inset Flex Code
18304 \begin_layout Plain Layout
18313 \begin_layout Itemize
18315 \begin_inset Flex Code
18318 \begin_layout Plain Layout
18324 ): For use with DocBook classes.
18327 \begin_layout Standard
18328 Flex insets are defined using the
18329 \begin_inset Flex Code
18332 \begin_layout Plain Layout
18338 tag, which shall be explained in a moment.
18341 \begin_layout Standard
18343 \begin_inset Flex Code
18346 \begin_layout Plain Layout
18352 tag also serves another function: It can be used to customize the general
18353 layout of many different types of insets.
18355 \begin_inset Flex Code
18358 \begin_layout Plain Layout
18364 can be used to customize the layout parameters for footnotes, marginal
18365 notes, note insets, \SpecialChar TeX
18366 code (ERT) insets, branches, listings, indexes, boxes,
18367 tables, algorithms, URLs, and captions, as well as to define Flex insets.
18370 \begin_layout Standard
18372 \begin_inset Flex Code
18375 \begin_layout Plain Layout
18381 definition must begin with a line of the form:
18384 \begin_layout LyX-Code
18388 \begin_layout Standard
18390 \begin_inset Flex Code
18393 \begin_layout Plain Layout
18399 indicates the inset whose layout is being defined, and here there are four
18403 \begin_layout Enumerate
18404 The layout for a pre-existing inset is being modified.
18405 In this case, can be
18406 \begin_inset Flex Code
18409 \begin_layout Plain Layout
18415 any one of the following:
18416 \begin_inset Flex Code
18419 \begin_layout Plain Layout
18426 \begin_inset Flex Code
18429 \begin_layout Plain Layout
18436 \begin_inset Flex Code
18439 \begin_layout Plain Layout
18446 \begin_inset Flex Code
18449 \begin_layout Plain Layout
18456 \begin_inset Flex Code
18459 \begin_layout Plain Layout
18466 \begin_inset Flex Code
18469 \begin_layout Plain Layout
18476 \begin_inset Flex Code
18479 \begin_layout Plain Layout
18486 \begin_inset Flex Code
18489 \begin_layout Plain Layout
18496 \begin_inset Flex Code
18499 \begin_layout Plain Layout
18506 \begin_inset Flex Code
18509 \begin_layout Plain Layout
18516 \begin_inset Flex Code
18519 \begin_layout Plain Layout
18526 \begin_inset Flex Code
18529 \begin_layout Plain Layout
18536 \begin_inset Flex Code
18539 \begin_layout Plain Layout
18546 \begin_inset Flex Code
18549 \begin_layout Plain Layout
18556 \begin_inset Flex Code
18559 \begin_layout Plain Layout
18566 \begin_inset Flex Code
18569 \begin_layout Plain Layout
18576 \begin_inset Flex Code
18579 \begin_layout Plain Layout
18586 \begin_inset Flex Code
18589 \begin_layout Plain Layout
18596 \begin_inset Flex Code
18599 \begin_layout Plain Layout
18606 \begin_inset Flex Code
18609 \begin_layout Plain Layout
18618 \begin_layout Enumerate
18619 The layout for a Flex inset is being defined.
18621 \begin_inset Flex Code
18624 \begin_layout Plain Layout
18630 must be of the form
18631 \begin_inset Quotes eld
18635 \begin_inset Flex Code
18638 \begin_layout Plain Layout
18645 \begin_inset Quotes erd
18649 \begin_inset Flex Code
18652 \begin_layout Plain Layout
18658 may be be any valid identifier not used by a pre-existing Flex inset.
18659 The identifier may include spaces, but in that case the whole thing must
18660 be wrapped in quotes.
18661 Note that the definition of a flex inset
18666 \begin_inset Flex Code
18669 \begin_layout Plain Layout
18675 entry, declaring which type of inset it defines.
18678 \begin_layout Enumerate
18679 The layout for user specific branch is being defined.
18681 \begin_inset Flex Code
18684 \begin_layout Plain Layout
18690 must be of the form
18691 \begin_inset Quotes eld
18695 \begin_inset Flex Code
18698 \begin_layout Plain Layout
18705 \begin_inset Quotes erd
18709 \begin_inset Flex Code
18712 \begin_layout Plain Layout
18718 may be be any valid identifier of branch defined in user's document.
18719 The identifier may include spaces, but in that case the whole thing must
18720 be wrapped in quotes.
18721 The main purpose of this feature is to allow \SpecialChar LaTeX
18722 wrapping around specific
18723 branches as user needs.
18726 \begin_layout Enumerate
18727 The layout of a user (or class) specific caption is being defined.
18729 \begin_inset Flex Code
18732 \begin_layout Plain Layout
18738 must be of the form
18739 \begin_inset Quotes eld
18743 \begin_inset Flex Code
18746 \begin_layout Plain Layout
18753 \begin_inset Quotes erd
18757 \begin_inset Flex Code
18760 \begin_layout Plain Layout
18766 specifies the name of the caption as it appears in the menu.
18767 Have a look at the standard caption (
18768 \begin_inset Flex Code
18771 \begin_layout Plain Layout
18777 ), the specific captions of the KOMA-Script classes (
18778 \begin_inset Flex Code
18781 \begin_layout Plain Layout
18788 \begin_inset Flex Code
18791 \begin_layout Plain Layout
18800 \begin_inset space ~
18804 \begin_inset Newline linebreak
18810 \begin_inset Flex Code
18813 \begin_layout Plain Layout
18819 ) for applications.
18822 \begin_layout Standard
18824 \begin_inset Flex Code
18827 \begin_layout Plain Layout
18833 definition can contain the following entries:
18836 \begin_layout Description
18837 \begin_inset Flex Code
18840 \begin_layout Plain Layout
18847 \begin_inset Flex Code
18850 \begin_layout Plain Layout
18856 =""] This inset will appear in the table of contents of the given type.
18857 An empty string disables.
18858 See also the OutlinerName and the IsTocCaption commands.
18859 This is only implemented for Flex insets.
18863 \begin_layout Description
18864 \begin_inset Flex Code
18867 \begin_layout Plain Layout
18874 \begin_inset Flex Code
18877 \begin_layout Plain Layout
18883 ] Defines argument number of a command\SpecialChar breakableslash
18884 environment associated with the current
18886 The definition must end with
18887 \begin_inset Flex Code
18890 \begin_layout Plain Layout
18898 \begin_inset CommandInset ref
18900 reference "subsec:Paragraph-Styles"
18907 \begin_layout Description
18908 \begin_inset Flex Code
18911 \begin_layout Plain Layout
18917 Preamble for changing language commands; see
18918 \begin_inset CommandInset ref
18920 reference "subsec:I18n"
18927 \begin_layout Description
18928 \begin_inset Flex Code
18931 \begin_layout Plain Layout
18938 \begin_inset Flex Code
18941 \begin_layout Plain Layout
18947 ] The color for the inset's background.
18949 \begin_inset CommandInset ref
18951 reference "chap:Names-of-colors"
18955 for a list of the available color names.
18958 \begin_layout Description
18959 \begin_inset Flex Code
18962 \begin_layout Plain Layout
18969 \begin_inset Flex Code
18972 \begin_layout Plain Layout
18981 \begin_inset space \thinspace{}
18985 \begin_inset Flex Code
18988 \begin_layout Plain Layout
18994 ] Whether to use the content of the inset as the label, when the inset is
18999 \begin_layout Description
19000 \begin_inset Flex Code
19003 \begin_layout Plain Layout
19010 \begin_inset Flex Code
19013 \begin_layout Plain Layout
19019 ] As with paragraph styles, see
19020 \begin_inset CommandInset ref
19022 reference "subsec:Paragraph-Styles"
19027 Note that you need to specify the complete type, e.
19028 \begin_inset space \thinspace{}
19032 \begin_inset space ~
19036 \begin_inset Flex Code
19039 \begin_layout Plain Layout
19040 CopyStyle Flex:<name>
19048 \begin_layout Description
19049 \begin_inset Flex Code
19052 \begin_layout Plain Layout
19059 \begin_inset Flex Code
19062 \begin_layout Plain Layout
19071 \begin_inset space \thinspace{}
19075 \begin_inset Flex Code
19078 \begin_layout Plain Layout
19084 ] Indicates whether the user may employ the Paragraph Settings dialog to
19085 customize the paragraph.
19088 \begin_layout Description
19089 \begin_inset Flex Code
19092 \begin_layout Plain Layout
19099 \begin_inset Flex Code
19102 \begin_layout Plain Layout
19109 \begin_inset Flex Code
19112 \begin_layout Plain Layout
19119 \begin_inset Flex Code
19122 \begin_layout Plain Layout
19128 , describing the rendering style used for the inset's frame and buttons.
19129 Footnotes generally use
19130 \begin_inset Flex Code
19133 \begin_layout Plain Layout
19139 , ERT insets generally
19140 \begin_inset Flex Code
19143 \begin_layout Plain Layout
19149 , and character styles
19150 \begin_inset Flex Code
19153 \begin_layout Plain Layout
19162 \begin_layout Description
19163 \begin_inset Flex Code
19166 \begin_layout Plain Layout
19173 \begin_inset Flex Code
19176 \begin_layout Plain Layout
19185 \begin_inset space \thinspace{}
19191 \begin_inset Flex Code
19194 \begin_layout Plain Layout
19203 \begin_inset Flex Code
19206 \begin_layout Plain Layout
19213 \begin_inset Flex Code
19216 \begin_layout Plain Layout
19223 Indicates whether the environment will stand on its own in the output or
19224 will appear inline with the surrounding text.
19225 If set to false, it is supposed that the \SpecialChar LaTeX
19226 environment ignores white space
19227 (including one newline character) after the
19228 \begin_inset Flex Code
19231 \begin_layout Plain Layout
19244 \begin_inset Flex Code
19247 \begin_layout Plain Layout
19261 \change_inserted 731793113 1538674858
19265 \begin_layout Description
19267 \change_inserted 731793113 1538674891
19268 \begin_inset Flex Code
19271 \begin_layout Plain Layout
19273 \change_inserted 731793113 1538674863
19285 ,1] Allow the contents of the inset to be edited externally (using whatever
19286 editor is defined for the document's output format).
19291 \begin_layout Description
19292 \begin_inset Flex Code
19295 \begin_layout Plain Layout
19301 Required at the end of the
19302 \begin_inset Flex Code
19305 \begin_layout Plain Layout
19314 \begin_layout Description
19315 \begin_inset Flex Code
19318 \begin_layout Plain Layout
19324 The font used for both the text body
19330 \begin_inset CommandInset ref
19332 reference "subsec:Font-description"
19337 Note that defining this font automatically defines the
19338 \begin_inset Flex Code
19341 \begin_layout Plain Layout
19347 to the same value, so define this first and define
19348 \begin_inset Flex Code
19351 \begin_layout Plain Layout
19357 later if you want them to be different.
19360 \begin_layout Description
19361 \begin_inset Flex Code
19364 \begin_layout Plain Layout
19365 FixedWidthPreambleEncoding
19371 \begin_inset Flex Code
19374 \begin_layout Plain Layout
19383 \begin_inset space \thinspace{}
19387 \begin_inset Flex Code
19390 \begin_layout Plain Layout
19396 ] Force a fixed width encoding for the translated contents of
19397 \begin_inset Flex Code
19400 \begin_layout Plain Layout
19407 \begin_inset Flex Code
19410 \begin_layout Plain Layout
19416 code generated by this layout.
19417 This is needed for special \SpecialChar LaTeX
19422 that do not work with variable width encodings such as
19427 This setting is ignored if fully Unicode aware \SpecialChar LaTeX
19428 backends such as Xe\SpecialChar TeX
19430 Lua\SpecialChar TeX
19434 \begin_layout Description
19435 \begin_inset Flex Code
19438 \begin_layout Plain Layout
19439 ForceLocalFontSwitch
19445 \begin_inset Flex Code
19448 \begin_layout Plain Layout
19457 \begin_inset space \thinspace{}
19461 \begin_inset Flex Code
19464 \begin_layout Plain Layout
19470 ] When using babel, always use a local font switch (
19471 \begin_inset Flex Code
19474 \begin_layout Plain Layout
19482 ), never a global one (such as
19483 \begin_inset Flex Code
19486 \begin_layout Plain Layout
19497 \begin_layout Description
19498 \begin_inset Flex Code
19501 \begin_layout Plain Layout
19508 \begin_inset Flex Code
19511 \begin_layout Plain Layout
19520 \begin_inset space \thinspace{}
19524 \begin_inset Flex Code
19527 \begin_layout Plain Layout
19534 \begin_inset Quotes eld
19538 \begin_inset Quotes erd
19541 language, leading to Left-to-Right (Latin) output, e.
19542 \begin_inset space \thinspace{}
19546 \begin_inset space \space{}
19549 in \SpecialChar TeX
19554 \begin_layout Description
19555 \begin_inset Flex Code
19558 \begin_layout Plain Layout
19565 \begin_inset Flex Code
19568 \begin_layout Plain Layout
19577 \begin_inset space \thinspace{}
19581 \begin_inset Flex Code
19584 \begin_layout Plain Layout
19590 ] Force a a line break in the \SpecialChar LaTeX
19591 output before the inset starts and after
19593 This assures the inset itself is output on its own lines, for parsing purposes.
19596 \begin_layout Description
19597 \begin_inset Flex Code
19600 \begin_layout Plain Layout
19607 \begin_inset Flex Code
19610 \begin_layout Plain Layout
19619 \begin_inset space \thinspace{}
19623 \begin_inset Flex Code
19626 \begin_layout Plain Layout
19632 ] Indicates whether the
19633 \begin_inset Flex Code
19636 \begin_layout Plain Layout
19642 should be used or, instead, the user can change the paragraph style used
19647 \begin_layout Description
19648 \begin_inset Flex Code
19651 \begin_layout Plain Layout
19658 \begin_inset Flex Code
19661 \begin_layout Plain Layout
19670 \begin_inset space \thinspace{}
19674 \begin_inset Flex Code
19677 \begin_layout Plain Layout
19683 ] As with paragraph styles, see
19684 \begin_inset CommandInset ref
19686 reference "subsec:Paragraph-Styles"
19693 \begin_layout Description
19694 \begin_inset Flex Code
19697 \begin_layout Plain Layout
19703 These tags control the XHTML output.
19705 \begin_inset CommandInset ref
19707 reference "sec:Tags-for-XHTML"
19714 \begin_layout Description
19715 \begin_inset Flex Code
19718 \begin_layout Plain Layout
19725 \begin_inset Flex Code
19728 \begin_layout Plain Layout
19737 \begin_inset space \thinspace{}
19741 \begin_inset Flex Code
19744 \begin_layout Plain Layout
19750 ] Whether to include the contents of this inset in the strings generated
19751 for the `Outline' pane for all table of contents, regardless of the AddToToc
19753 One would not, for example, want the content of a footnote in a section
19754 header to be included in the TOC displayed in the outline, but one would
19755 normally want the content of a character style displayed.
19756 Default is false: not to include.
19759 \begin_layout Description
19760 \begin_inset Flex Code
19763 \begin_layout Plain Layout
19770 \begin_inset Flex Code
19773 \begin_layout Plain Layout
19782 \begin_inset space \thinspace{}
19786 \begin_inset Flex Code
19789 \begin_layout Plain Layout
19795 ] If this is set to 1 and AddToToc is enabled, the inset adds a summary
19796 of its contents in its item in the table of contents.
19797 Otherwise, only the label appears.
19800 \begin_layout Description
19801 \begin_inset Flex Code
19804 \begin_layout Plain Layout
19813 \begin_inset Flex Code
19816 \begin_layout Plain Layout
19825 \begin_inset space \thinspace{}
19829 \begin_inset Flex Code
19832 \begin_layout Plain Layout
19838 ] As with paragraph styles, see
19839 \begin_inset CommandInset ref
19841 reference "subsec:Paragraph-Styles"
19848 \begin_layout Description
19849 \begin_inset Flex Code
19852 \begin_layout Plain Layout
19858 The font used for the label.
19860 \begin_inset CommandInset ref
19862 reference "subsec:Font-description"
19867 Note that this definition can never appear before
19868 \begin_inset Flex Code
19871 \begin_layout Plain Layout
19877 , lest it be ineffective.
19880 \begin_layout Description
19881 \begin_inset Flex Code
19884 \begin_layout Plain Layout
19891 \begin_inset Flex Code
19894 \begin_layout Plain Layout
19901 \begin_inset Quotes erd
19905 \begin_inset Quotes erd
19908 ] What will be displayed on the button or elsewhere as the inset label.
19910 \begin_inset Flex Code
19913 \begin_layout Plain Layout
19921 \begin_inset Flex Code
19924 \begin_layout Plain Layout
19930 ) modify this label on the fly.
19933 \begin_layout Description
19934 \begin_inset Flex Code
19937 \begin_layout Plain Layout
19943 Language dependent preamble; see
19944 \begin_inset CommandInset ref
19946 reference "subsec:I18n"
19953 \begin_layout Description
19954 \begin_inset Flex Code
19957 \begin_layout Plain Layout
19964 \begin_inset Flex Code
19967 \begin_layout Plain Layout
19973 ] The name of the corresponding \SpecialChar LaTeX
19975 Either the environment or command name.
19978 \begin_layout Description
19979 \begin_inset Flex Code
19982 \begin_layout Plain Layout
19989 \begin_inset Flex Code
19992 \begin_layout Plain Layout
19998 ] The optional parameter for the corresponding
19999 \begin_inset Flex Code
20002 \begin_layout Plain Layout
20008 stuff, including possible bracket pairs like
20009 \begin_inset Flex Code
20012 \begin_layout Plain Layout
20019 This parameter cannot be changed from within \SpecialChar LyX
20021 \begin_inset Flex Code
20024 \begin_layout Plain Layout
20030 for customizable parameters).
20031 It will be output as is after all \SpecialChar LaTeX
20033 \begin_inset Flex Code
20036 \begin_layout Plain Layout
20045 \begin_layout Description
20046 \begin_inset Flex Code
20049 \begin_layout Plain Layout
20056 \begin_inset Flex Code
20059 \begin_layout Plain Layout
20060 Command, Environment, None
20065 ] How the style should be translated into \SpecialChar LaTeX
20070 \begin_layout Plain Layout
20071 \begin_inset Flex Code
20074 \begin_layout Plain Layout
20080 is perhaps a bit misleading, since these rules apply to SGML classes too.
20081 Visit the SGML class files for specific examples.
20090 \begin_layout Description
20091 \begin_inset Flex Code
20094 \begin_layout Plain Layout
20100 means nothing special
20103 \begin_layout Description
20104 \begin_inset Flex Code
20107 \begin_layout Plain Layout
20114 \begin_inset Flex Code
20117 \begin_layout Plain Layout
20124 {\SpecialChar ldots
20133 \begin_layout Description
20134 \begin_inset Flex Code
20137 \begin_layout Plain Layout
20144 \begin_inset Flex Code
20147 \begin_layout Plain Layout
20154 }\SpecialChar ldots
20169 \begin_layout Standard
20170 Putting the last few things together, the \SpecialChar LaTeX
20171 output will be either:
20174 \begin_layout LyX-Code
20177 LatexName[LatexParam]{\SpecialChar ldots
20181 \begin_layout Standard
20185 \begin_layout LyX-Code
20188 begin{LatexName}[LatexParam] \SpecialChar ldots
20194 \begin_layout Standard
20195 depending upon the \SpecialChar LaTeX
20200 \begin_layout Description
20201 \begin_inset Flex Code
20204 \begin_layout Plain Layout
20211 \begin_inset Flex Code
20214 \begin_layout Plain Layout
20220 ] A string that is put at the beginning of the layout content.
20221 A line break in the output can be indicated by
20222 \begin_inset Flex Code
20225 \begin_layout Plain Layout
20234 \begin_layout Description
20235 \begin_inset Flex Code
20238 \begin_layout Plain Layout
20245 \begin_inset Flex Code
20248 \begin_layout Plain Layout
20255 \begin_inset Flex Code
20258 \begin_layout Plain Layout
20265 \begin_inset Flex Code
20268 \begin_layout Plain Layout
20275 \begin_inset Flex Code
20278 \begin_layout Plain Layout
20284 (indicating a dummy definition ending definitions of charstyles, etc).
20285 This entry is required in and is only meaningful for Flex insets.
20286 Among other things, it determines on which menu this inset will appear.
20288 \begin_inset Flex Code
20291 \begin_layout Plain Layout
20298 \begin_inset Flex Code
20301 \begin_layout Plain Layout
20307 will automatically set
20308 \begin_inset Flex Code
20311 \begin_layout Plain Layout
20318 \begin_inset Flex Code
20321 \begin_layout Plain Layout
20329 \begin_inset Flex Code
20332 \begin_layout Plain Layout
20338 can be set to true, or
20339 \begin_inset Flex Code
20342 \begin_layout Plain Layout
20349 \begin_inset Flex Code
20352 \begin_layout Plain Layout
20358 insets by setting it
20363 \begin_inset Flex Code
20366 \begin_layout Plain Layout
20373 \change_inserted -712698321 1555575738
20377 \begin_layout Description
20379 \change_inserted -712698321 1555575844
20380 \begin_inset Flex Code
20383 \begin_layout Plain Layout
20385 \change_inserted -712698321 1555575740
20392 \begin_inset Flex Code
20395 \begin_layout Plain Layout
20397 \change_inserted -712698321 1555575740
20403 A dedicated string for the menu.
20404 You can define an accelerator by appending the respective character to
20405 the string, divided by
20406 \begin_inset Quotes eld
20410 \begin_inset Quotes erd
20414 \begin_inset space \thinspace{}
20418 \begin_inset space \space{}
20422 \begin_inset Quotes eld
20426 \begin_inset Flex Code
20429 \begin_layout Plain Layout
20431 \change_inserted -712698321 1555575781
20438 \begin_inset Quotes erd
20442 This specification is optional.
20443 If it is not given the inset name as specified in the type declaration
20444 will be used instead for the menu.
20449 \begin_layout Description
20450 \begin_inset Flex Code
20453 \begin_layout Plain Layout
20460 \begin_inset Flex Code
20463 \begin_layout Plain Layout
20472 \begin_inset space \thinspace{}
20476 \begin_inset Flex Code
20479 \begin_layout Plain Layout
20485 ] Whether multiple paragraphs are permitted in this inset.
20487 \begin_inset Flex Code
20490 \begin_layout Plain Layout
20496 to the same value and
20497 \begin_inset Flex Code
20500 \begin_layout Plain Layout
20506 to the opposite value.
20507 These can be reset to other values, if they are used
20512 \begin_inset Flex Code
20515 \begin_layout Plain Layout
20525 \begin_layout Description
20526 \begin_inset Flex Code
20529 \begin_layout Plain Layout
20536 \begin_inset Flex Code
20539 \begin_layout Plain Layout
20548 \begin_inset space \thinspace{}
20552 \begin_inset Flex Code
20555 \begin_layout Plain Layout
20561 ] Whether fragile commands in this inset should be
20562 \begin_inset Flex Code
20565 \begin_layout Plain Layout
20578 whether the command should itself be protected.) Default is false.
20579 \change_inserted -712698321 1523633958
20583 \begin_layout Description
20585 \change_inserted -712698321 1552395786
20586 \begin_inset Flex Code
20589 \begin_layout Plain Layout
20591 \change_inserted -712698321 1523633961
20598 \begin_inset Flex Code
20601 \begin_layout Plain Layout
20603 \change_inserted -712698321 1523633958
20612 \begin_inset space \thinspace{}
20616 \begin_inset Flex Code
20619 \begin_layout Plain Layout
20621 \change_inserted -712698321 1523633958
20627 ] This causes macros that contain this inset to be protected with
20628 \begin_inset Flex Code
20631 \begin_layout Plain Layout
20633 \change_inserted -712698321 1523634038
20648 ) if necessary and thus allows (some) verbatim stuff in macros.
20652 \begin_layout Description
20654 \change_inserted -712698321 1555579651
20655 \begin_inset Flex Code
20658 \begin_layout Plain Layout
20660 \change_inserted -712698321 1552395787
20667 \begin_inset Flex Code
20670 \begin_layout Plain Layout
20672 \change_inserted -712698321 1552395787
20681 \begin_inset space \thinspace{}
20685 \begin_inset Flex Code
20688 \begin_layout Plain Layout
20690 \change_inserted -712698321 1552395787
20696 ] Whether specific commands in this inset (such as
20697 \begin_inset Flex Code
20700 \begin_layout Plain Layout
20702 \change_inserted -712698321 1552395787
20711 \begin_inset Flex Code
20714 \begin_layout Plain Layout
20716 \change_inserted -712698321 1552395787
20724 ) should be protected in an
20725 \begin_inset Flex Code
20728 \begin_layout Plain Layout
20730 \change_inserted -712698321 1552395787
20739 This is particularly needed for insets that draw on
20747 commands which parse their content in complex ways.
20751 \begin_layout Description
20753 \change_inserted -712698321 1555579742
20754 \begin_inset Flex Code
20757 \begin_layout Plain Layout
20759 \change_inserted -712698321 1555579658
20766 \begin_inset Flex Code
20769 \begin_layout Plain Layout
20771 \change_inserted -712698321 1555579651
20777 Option to define a different command (from the default
20778 \begin_inset Flex Code
20781 \begin_layout Plain Layout
20783 \change_inserted -712698321 1555579742
20795 ) to be used for line breaks.
20796 The initial backslash must not be specified.
20801 \begin_layout Description
20802 \begin_inset Flex Code
20805 \begin_layout Plain Layout
20812 \begin_inset Flex Code
20815 \begin_layout Plain Layout
20821 ] Deletes an existing
20822 \begin_inset Flex Code
20825 \begin_layout Plain Layout
20834 \begin_layout Description
20835 \begin_inset Flex Code
20838 \begin_layout Plain Layout
20845 \begin_inset Flex Code
20848 \begin_layout Plain Layout
20855 \begin_inset Flex Code
20858 \begin_layout Plain Layout
20864 that has replaced this
20865 \begin_inset Flex Code
20868 \begin_layout Plain Layout
20875 This is used to rename an
20876 \begin_inset Flex Code
20879 \begin_layout Plain Layout
20885 , while keeping backward compatibility.
20888 \begin_layout Description
20889 \begin_inset Flex Code
20892 \begin_layout Plain Layout
20899 \begin_inset Flex Code
20902 \begin_layout Plain Layout
20911 \begin_inset space \thinspace{}
20915 \begin_inset Flex Code
20918 \begin_layout Plain Layout
20924 ] As with paragraph styles, see
20925 \begin_inset CommandInset ref
20927 reference "subsec:Paragraph-Styles"
20935 \begin_layout Description
20936 \begin_inset Flex Code
20939 \begin_layout Plain Layout
20946 \begin_inset Flex Code
20949 \begin_layout Plain Layout
20958 \begin_inset space \thinspace{}
20962 \begin_inset Flex Code
20965 \begin_layout Plain Layout
20971 ] As with paragraph styles, see
20972 \begin_inset CommandInset ref
20974 reference "subsec:Paragraph-Styles"
20982 \begin_layout Description
20983 \begin_inset Flex Code
20986 \begin_layout Plain Layout
20992 As with paragraph styles, see
20993 \begin_inset CommandInset ref
20995 reference "subsec:Paragraph-Styles"
21002 \begin_layout Description
21003 \begin_inset Flex Code
21006 \begin_layout Plain Layout
21013 \begin_inset Flex Code
21016 \begin_layout Plain Layout
21022 ] The prefix to use when creating labels referring to insets of this type.
21023 This allows the use of formatted references.
21026 \begin_layout Description
21027 \begin_inset Flex Code
21030 \begin_layout Plain Layout
21037 \begin_inset Flex Code
21040 \begin_layout Plain Layout
21046 ] As with paragraph styles, see
21047 \begin_inset CommandInset ref
21049 reference "subsec:Paragraph-Styles"
21056 \begin_layout Description
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21067 \begin_inset Flex Code
21070 \begin_layout Plain Layout
21079 \begin_inset space \thinspace{}
21083 \begin_inset Flex Code
21086 \begin_layout Plain Layout
21092 ] Resets the \SpecialChar LaTeX
21093 arguments of this layout (as defined via the
21094 \begin_inset Flex Code
21097 \begin_layout Plain Layout
21104 This is useful if you have copied a style via
21105 \begin_inset Flex Code
21108 \begin_layout Plain Layout
21114 , but you do not want to inherit its (required and optional) arguments.
21117 \begin_layout Description
21118 \begin_inset Flex Code
21121 \begin_layout Plain Layout
21128 \begin_inset Flex Code
21131 \begin_layout Plain Layout
21138 \begin_inset space \thinspace{}
21142 \begin_inset Flex Code
21145 \begin_layout Plain Layout
21153 ] Whether this inset should use the font of its surrounding environment
21155 Default is false: use the font of the surrounding environment.
21158 \begin_layout Description
21159 \begin_inset Flex Code
21162 \begin_layout Plain Layout
21169 \begin_inset Flex Code
21172 \begin_layout Plain Layout
21178 ] A string that is put at the end of the layout content.
21179 A line break in the output can be indicated by
21180 \begin_inset Flex Code
21183 \begin_layout Plain Layout
21192 \begin_layout Description
21193 \begin_inset Flex Code
21196 \begin_layout Plain Layout
21203 \begin_inset Flex Code
21206 \begin_layout Plain Layout
21213 \begin_inset space \thinspace{}
21217 \begin_inset Flex Code
21220 \begin_layout Plain Layout
21228 ] Allow spell-checking the contents of this inset.
21232 \begin_layout Subsection
21234 \begin_inset CommandInset label
21236 name "subsec:Counters"
21243 \begin_layout Standard
21244 It is necessary to define the counters (
21245 \begin_inset Flex Noun
21248 \begin_layout Plain Layout
21255 \begin_inset Flex Noun
21258 \begin_layout Plain Layout
21264 , \SpecialChar ldots
21265 ) in the text class itself.
21266 The standard counters are defined in the file
21267 \begin_inset Flex Code
21270 \begin_layout Plain Layout
21276 , so you may have to do no more than add
21279 \begin_layout LyX-Code
21280 Input stdcounters.inc
21283 \begin_layout Standard
21284 to your layout file to get them to work.
21285 But if you want to define custom counters, then you can do so.
21286 The counter declaration must begin with:
21289 \begin_layout LyX-Code
21290 Counter CounterName
21293 \begin_layout Standard
21295 \begin_inset Flex Code
21298 \begin_layout Plain Layout
21304 ' is replaced by the name of the counter.
21305 And it must end with
21306 \begin_inset Quotes eld
21310 \begin_inset Flex Code
21313 \begin_layout Plain Layout
21320 \begin_inset Quotes erd
21324 The following parameters can also be used:
21327 \begin_layout Description
21328 \begin_inset Flex Code
21331 \begin_layout Plain Layout
21338 \begin_inset Flex Code
21341 \begin_layout Plain Layout
21347 ] Sets the initial value for the counter, to which it will be reset whenever
21349 Normally, one will want the default, 1.
21352 \begin_layout Description
21353 \begin_inset Flex Code
21356 \begin_layout Plain Layout
21363 \begin_inset Flex Code
21366 \begin_layout Plain Layout
21373 \begin_inset Quotes erd
21377 \begin_inset Quotes erd
21380 ] When defined, this string defines how the counter is displayed.
21381 Setting this value sets
21382 \begin_inset Flex Code
21385 \begin_layout Plain Layout
21386 LabelStringAppendix
21392 The following special constructs can be used in the string:
21396 \begin_layout Itemize
21397 \begin_inset Flex Code
21400 \begin_layout Plain Layout
21408 will be replaced by the expansion of the
21409 \begin_inset Flex Code
21412 \begin_layout Plain Layout
21419 \begin_inset Flex Code
21422 \begin_layout Plain Layout
21423 LabelStringAppendix
21429 \begin_inset Flex Code
21432 \begin_layout Plain Layout
21442 \begin_layout Itemize
21443 counter values can be expressed using \SpecialChar LaTeX
21445 \begin_inset Newline newline
21449 \begin_inset Flex Code
21452 \begin_layout Plain Layout
21469 \begin_inset Flex Code
21472 \begin_layout Plain Layout
21484 \begin_layout Plain Layout
21494 Actually, the situation is a bit more complicated: any
21513 other than those described below will produce arabic numerals.
21514 It would not be surprising to see this change in the future.
21520 \begin_inset Flex Code
21523 \begin_layout Plain Layout
21529 : 1, 2, 3,\SpecialChar ldots
21531 \begin_inset Flex Code
21534 \begin_layout Plain Layout
21540 for lower-case letters: a, b, c, \SpecialChar ldots
21542 \begin_inset Flex Code
21545 \begin_layout Plain Layout
21551 for upper-case letters: A, B, C, \SpecialChar ldots
21553 \begin_inset Flex Code
21556 \begin_layout Plain Layout
21562 for lower-case roman numerals: i, ii, iii, \SpecialChar ldots
21564 \begin_inset Flex Code
21567 \begin_layout Plain Layout
21573 for upper-case roman numerals: I, II, III\SpecialChar ldots
21575 \begin_inset Flex Code
21578 \begin_layout Plain Layout
21584 for hebrew numerals.
21588 \begin_layout Standard
21589 If LabelString is not defined, a default value is constructed as follows:
21590 if the counter has a master counter
21591 \begin_inset Flex Code
21594 \begin_layout Plain Layout
21601 \begin_inset Flex Code
21604 \begin_layout Plain Layout
21611 \begin_inset Newline newline
21615 \begin_inset Flex Code
21618 \begin_layout Plain Layout
21628 is used; otherwise the string
21629 \begin_inset Flex Code
21632 \begin_layout Plain Layout
21643 \begin_layout Description
21644 \begin_inset Flex Code
21647 \begin_layout Plain Layout
21648 LabelStringAppendix
21654 \begin_inset Flex Code
21657 \begin_layout Plain Layout
21664 \begin_inset Quotes erd
21668 \begin_inset Quotes erd
21672 \begin_inset Flex Code
21675 \begin_layout Plain Layout
21681 , but for use in the Appendix.
21684 \begin_layout Description
21685 \begin_inset Flex Code
21688 \begin_layout Plain Layout
21695 \begin_inset Flex Code
21698 \begin_layout Plain Layout
21705 \begin_inset Quotes erd
21709 \begin_inset Quotes erd
21712 ] A format for use with formatted references to this counter.
21713 For example, one might want to have references to section numbers appear
21715 \begin_inset Quotes eld
21719 \begin_inset Quotes erd
21723 The string should contain
21724 \begin_inset Quotes eld
21728 \begin_inset Quotes erd
21732 This will be replaced by the counter number itself.
21733 So, for sections, it would be: Section ##.
21736 \begin_layout Description
21737 \begin_inset Flex Code
21740 \begin_layout Plain Layout
21747 \begin_inset Flex Code
21750 \begin_layout Plain Layout
21757 \begin_inset Quotes erd
21761 \begin_inset Quotes erd
21764 ] If this is set to the name of another counter, the present counter will
21765 be reset every time the other one is increased.
21767 \begin_inset Flex Code
21770 \begin_layout Plain Layout
21777 \begin_inset Flex Code
21780 \begin_layout Plain Layout
21789 \begin_layout Subsection
21791 \begin_inset CommandInset label
21793 name "subsec:Font-description"
21800 \begin_layout Standard
21801 A font description looks like this:
21804 \begin_layout LyX-Code
21821 \begin_layout LyX-Code
21825 \begin_layout LyX-Code
21829 \begin_layout Standard
21830 The following commands are available:
21833 \begin_layout Description
21834 \begin_inset Flex Code
21837 \begin_layout Plain Layout
21844 \begin_inset Flex Code
21847 \begin_layout Plain Layout
21856 \begin_inset Flex Code
21859 \begin_layout Plain Layout
21866 \begin_inset Flex Code
21869 \begin_layout Plain Layout
21876 \begin_inset Flex Code
21879 \begin_layout Plain Layout
21886 \begin_inset Flex Code
21889 \begin_layout Plain Layout
21896 \begin_inset Flex Code
21899 \begin_layout Plain Layout
21906 \begin_inset Flex Code
21909 \begin_layout Plain Layout
21916 \begin_inset Flex Code
21919 \begin_layout Plain Layout
21926 \begin_inset Flex Code
21929 \begin_layout Plain Layout
21936 \begin_inset Flex Code
21939 \begin_layout Plain Layout
21946 \begin_inset Flex Code
21949 \begin_layout Plain Layout
21956 \begin_inset Flex Code
21959 \begin_layout Plain Layout
21966 \begin_inset Flex Code
21969 \begin_layout Plain Layout
21976 \begin_inset Flex Code
21979 \begin_layout Plain Layout
21986 \begin_inset Flex Code
21989 \begin_layout Plain Layout
21996 \begin_inset Flex Code
21999 \begin_layout Plain Layout
22006 \begin_inset Flex Code
22009 \begin_layout Plain Layout
22016 \begin_inset Flex Code
22019 \begin_layout Plain Layout
22026 \begin_inset Flex Code
22029 \begin_layout Plain Layout
22036 \begin_inset Flex Code
22039 \begin_layout Plain Layout
22048 \begin_layout Description
22049 \begin_inset Flex Code
22052 \begin_layout Plain Layout
22059 \begin_inset Flex Code
22062 \begin_layout Plain Layout
22071 \begin_inset Flex Code
22074 \begin_layout Plain Layout
22081 \begin_inset Flex Code
22084 \begin_layout Plain Layout
22093 \begin_layout Description
22094 \begin_inset Flex Code
22097 \begin_layout Plain Layout
22104 \begin_inset Flex Code
22107 \begin_layout Plain Layout
22113 ] Valid arguments are:
22114 \begin_inset Flex Code
22117 \begin_layout Plain Layout
22124 \begin_inset Flex Code
22127 \begin_layout Plain Layout
22134 \begin_inset Flex Code
22137 \begin_layout Plain Layout
22144 \begin_inset Flex Code
22147 \begin_layout Plain Layout
22154 \begin_inset Flex Code
22157 \begin_layout Plain Layout
22164 \begin_inset Flex Code
22167 \begin_layout Plain Layout
22174 \begin_inset Flex Code
22177 \begin_layout Plain Layout
22184 \begin_inset Flex Code
22187 \begin_layout Plain Layout
22194 \begin_inset Flex Code
22197 \begin_layout Plain Layout
22204 \begin_inset Flex Code
22207 \begin_layout Plain Layout
22214 \begin_inset Flex Code
22217 \begin_layout Plain Layout
22224 \begin_inset Flex Code
22227 \begin_layout Plain Layout
22234 Each of these turns on or off the corresponding attribute.
22236 \begin_inset Flex Code
22239 \begin_layout Plain Layout
22245 turns on emphasis, and
22246 \begin_inset Flex Code
22249 \begin_layout Plain Layout
22257 \begin_inset Newline newline
22260 If the latter seems puzzling, remember that the font settings for the present
22261 context are generally inherited from the surrounding context.
22263 \begin_inset Flex Code
22266 \begin_layout Plain Layout
22272 would turn off the emphasis that was anyway in effect, say, in a theorem
22276 \begin_layout Description
22277 \begin_inset Flex Code
22280 \begin_layout Plain Layout
22287 \begin_inset Flex Code
22290 \begin_layout Plain Layout
22299 \begin_inset Flex Code
22302 \begin_layout Plain Layout
22311 \begin_layout Description
22312 \begin_inset Flex Code
22315 \begin_layout Plain Layout
22322 \begin_inset Flex Code
22325 \begin_layout Plain Layout
22334 \begin_inset Flex Code
22337 \begin_layout Plain Layout
22344 \begin_inset Flex Code
22347 \begin_layout Plain Layout
22354 \begin_inset Flex Code
22357 \begin_layout Plain Layout
22366 \begin_layout Description
22367 \begin_inset Flex Code
22370 \begin_layout Plain Layout
22377 \begin_inset Flex Code
22380 \begin_layout Plain Layout
22387 \begin_inset Flex Code
22390 \begin_layout Plain Layout
22397 \begin_inset Flex Code
22400 \begin_layout Plain Layout
22409 \begin_inset Flex Code
22412 \begin_layout Plain Layout
22419 \begin_inset Flex Code
22422 \begin_layout Plain Layout
22429 \begin_inset Flex Code
22432 \begin_layout Plain Layout
22439 \begin_inset Flex Code
22442 \begin_layout Plain Layout
22449 \begin_inset Flex Code
22452 \begin_layout Plain Layout
22461 \begin_layout Subsection
22462 \begin_inset CommandInset label
22464 name "subsec:Citation-engine-description"
22468 Cite engine description
22471 \begin_layout Standard
22473 \begin_inset Flex Code
22476 \begin_layout Plain Layout
22482 blocks, as used mainly in cite engine files (see
22483 \begin_inset CommandInset ref
22485 reference "subsec:Cite-Engine-Files"
22492 ), define the citation commands provided by a specific
22493 \begin_inset Quotes eld
22497 \begin_inset Quotes erd
22501 A cite engine, in \SpecialChar LyX
22502 terms, is way specific way to format citations, using
22503 numbers, author names and/or years.
22504 Currently, \SpecialChar LyX
22505 supports three such engine types, namely:
22508 \begin_layout Enumerate
22509 \begin_inset Flex Code
22512 \begin_layout Plain Layout
22518 : the default Bib\SpecialChar TeX
22519 way to format citations, a simple numeric style (e.
22520 \begin_inset space \thinspace{}
22524 \begin_inset Quotes eld
22528 \begin_inset Quotes erd
22534 \begin_layout Enumerate
22535 \begin_inset Flex Code
22538 \begin_layout Plain Layout
22544 : Harvard-styled citations using author names and publication year (e.
22545 \begin_inset space \thinspace{}
22549 \begin_inset Quotes eld
22552 Smith and Miller (2017b)
22553 \begin_inset Quotes erd
22559 \begin_layout Enumerate
22560 \begin_inset Flex Code
22563 \begin_layout Plain Layout
22569 : extended numerical citations that also allow for author or title next
22571 \begin_inset space \thinspace{}
22575 \begin_inset Quotes eld
22578 Smith and Miller [1]
22579 \begin_inset Quotes erd
22585 \begin_layout Standard
22586 \begin_inset Flex Code
22589 \begin_layout Plain Layout
22595 blocks look like this:
22598 \begin_layout LyX-Code
22602 \begin_layout LyX-Code
22606 \begin_layout LyX-Code
22610 \begin_layout LyX-Code
22611 citeyearpar[][]=parencite*
22614 \begin_layout LyX-Code
22618 \begin_layout LyX-Code
22622 \begin_layout Standard
22624 \begin_inset Flex Code
22627 \begin_layout Plain Layout
22633 denotes the engine.
22634 The individual lines respectively define a cite command or cite command
22635 paradigm supported by this engine.
22636 The line can be as simple as a cite command that is used both to name the
22637 respective \SpecialChar LyX
22638 command and the \SpecialChar LaTeX
22639 output or more complex in order to differentiate
22641 The full syntax is:
22644 \begin_layout LyX-Code
22645 LyXName|alias$*<!_stardesc!_stardesctooltip>[][]=latexcmd
22648 \begin_layout Itemize
22649 \begin_inset Flex Code
22652 \begin_layout Plain Layout
22658 : The name as used in the
22659 \begin_inset Flex Code
22662 \begin_layout Plain Layout
22672 \begin_layout Standard
22673 For portability reasons, we try to use the same name for same-formatted
22674 commands in different cite packages (thus many names stem from natbib,
22675 and thus we need to differentiate a
22676 \begin_inset Flex Code
22679 \begin_layout Plain Layout
22685 sometimes, if the \SpecialChar LaTeX
22686 command names differ).
22690 \begin_layout Itemize
22691 \begin_inset Flex Code
22694 \begin_layout Plain Layout
22700 : a (comma-separated) list of commands that fall back to the given
22701 \begin_inset Flex Code
22704 \begin_layout Plain Layout
22710 in the current engine.
22711 This eases the switch of citation packages and engines.
22713 \begin_inset Flex Code
22716 \begin_layout Plain Layout
22723 \begin_inset Flex Code
22726 \begin_layout Plain Layout
22732 in layout definitions.
22735 \begin_layout Itemize
22736 \begin_inset Flex Code
22739 \begin_layout Plain Layout
22745 : The actual \SpecialChar LaTeX
22746 command that is output.
22750 \begin_layout Standard
22751 \begin_inset Flex Code
22754 \begin_layout Plain Layout
22761 \begin_inset Flex Code
22764 \begin_layout Plain Layout
22772 \begin_inset Flex Code
22775 \begin_layout Plain Layout
22782 \begin_inset Flex Code
22785 \begin_layout Plain Layout
22791 will be output to \SpecialChar LaTeX
22795 \begin_layout Standard
22799 \begin_layout Itemize
22800 Capitalization indicates that the command also has a capitalized form (
22801 \begin_inset Flex Code
22804 \begin_layout Plain Layout
22814 \begin_inset Flex Code
22817 \begin_layout Plain Layout
22826 These usually enforce up-casing of name prefixes (
22831 \begin_inset Formula $\Rightarrow$
22841 \begin_layout Itemize
22843 \begin_inset Flex Code
22846 \begin_layout Plain Layout
22852 indicate the number of optional arguments (there can be 0–2).
22855 \begin_layout Itemize
22857 \begin_inset Flex Code
22860 \begin_layout Plain Layout
22866 indicates there is a starred version of the command (
22867 \begin_inset Flex Code
22870 \begin_layout Plain Layout
22880 \begin_inset Flex Code
22883 \begin_layout Plain Layout
22896 \begin_layout Standard
22897 By default, the starred version means: Output all authors even if it should
22899 \begin_inset Quotes eld
22903 \begin_inset Quotes erd
22907 \begin_inset Flex Code
22910 \begin_layout Plain Layout
22919 \begin_layout Standard
22920 If the star has a different meaning for a given command, it can be specified
22922 \begin_inset Flex Code
22925 \begin_layout Plain Layout
22926 <!_stardesc!_stardesctooltip>
22932 Maximal two translatable macro keywords, marked by the prefix
22933 \begin_inset Flex Code
22936 \begin_layout Plain Layout
22943 The first points to the string that replaces the
22944 \begin_inset Quotes eld
22948 \begin_inset Quotes erd
22951 checkbox label in the citation dialog, the second one to an optional tool
22952 tip for this checkbox.
22956 \begin_layout Standard
22957 Note that these two macros have to be defined in a
22958 \begin_inset Flex Code
22961 \begin_layout Plain Layout
22967 (see next section), dropping the
22968 \begin_inset Flex Code
22971 \begin_layout Plain Layout
22977 from the prefix, like this:
22980 \begin_layout LyX-Code
22981 _stardesc Sta&rred command label
22984 \begin_layout LyX-Code
22985 _stardesctooltip Tooltip for the starred command checkbox.
22989 \begin_layout Itemize
22991 \begin_inset Flex Code
22994 \begin_layout Plain Layout
23000 indicates that this command features
23001 \begin_inset Quotes eld
23004 qualified citation lists
23005 \begin_inset Quotes erd
23013 -specific feature for multi-reference citations where an individual pre-
23014 and postnote can be given to each reference in the list.
23015 Please refer to the
23019 manual for details.
23020 \change_inserted -712698321 1526898670
23024 \begin_layout Standard
23026 \change_inserted -712698321 1526899524
23027 If you want to add a cite command to a cite engine (e.
23028 \begin_inset space \thinspace{}
23031 g., add a specific command provided by a class), you can use
23032 \begin_inset Flex Code
23035 \begin_layout Plain Layout
23037 \change_inserted -712698321 1526898768
23038 AddToCiteEngine <engine type> \SpecialChar ldots
23047 Note that only cite commands that do not exist yet are added.
23052 \begin_layout Subsection
23053 \begin_inset CommandInset label
23055 name "subsec:Citation-format-description"
23059 Cite format description
23062 \begin_layout Standard
23064 \begin_inset Flex Code
23067 \begin_layout Plain Layout
23073 blocks are used to describe how bibliographic information should be displayed,
23074 both within \SpecialChar LyX
23075 itself (in the citation dialog and in tooltips, for example)
23076 and in XHTML output.
23077 Such a block might look like this:
23080 \begin_layout LyX-Code
23084 \begin_layout LyX-Code
23088 \begin_layout LyX-Code
23092 \begin_layout LyX-Code
23096 \begin_layout Standard
23100 \begin_layout LyX-Code
23104 \begin_layout LyX-Code
23108 \begin_layout LyX-Code
23112 \begin_layout LyX-Code
23116 \begin_layout Standard
23117 In the first case, the individual lines define how the bibliographic information
23118 associated with an article or book, respectively, is to be displayed, and
23119 such a definition can be given for any
23120 \begin_inset Quotes els
23124 \begin_inset Quotes ers
23127 that might be present in a Bib\SpecialChar TeX
23130 defines a default format in the source code that will be used if no specific
23131 definition has been given.
23133 predefines several formats in the file
23134 \begin_inset Flex Code
23137 \begin_layout Plain Layout
23143 , which is included in most of \SpecialChar LyX
23144 's document classes.
23147 \begin_layout Standard
23148 In the second case, the lines define how a specific citation command (in
23150 \begin_inset Flex Code
23153 \begin_layout Plain Layout
23162 \begin_inset Flex Code
23165 \begin_layout Plain Layout
23173 ) is to be displayed on the citation inset label, in the citation dialog,
23174 menu or XHTML output.
23176 defines such formats for the citation style variants it supports via
23178 Document\SpecialChar menuseparator
23179 Setting\SpecialChar menuseparator
23180 Bibliography\SpecialChar ldots
23184 \begin_inset Flex Code
23187 \begin_layout Plain Layout
23193 files that are shipped with \SpecialChar LyX
23195 \begin_inset CommandInset ref
23197 reference "subsec:Cite-Engine-Files"
23207 \begin_layout Standard
23208 The definitions use a simple language that allows Bib\SpecialChar TeX
23209 keys to be replaced
23211 Keys should be enclosed in
23212 \begin_inset Flex Code
23215 \begin_layout Plain Layout
23222 \begin_inset Flex Code
23225 \begin_layout Plain Layout
23232 So a simple definition might look like this:
23235 \begin_layout LyX-Code
23237 \begin_inset Quotes eld
23241 \begin_inset Quotes erd
23247 \begin_layout Standard
23248 This would print the author, followed by a comma, followed by the title,
23249 in quotes, followed by a period.
23252 \begin_layout Standard
23253 Of course, sometimes you may want to print a key only if it exists.
23254 This can be done by using a conditional construction, such as:
23255 \begin_inset Flex Code
23258 \begin_layout Plain Layout
23260 \begin_inset space ~
23270 \begin_inset Flex Code
23273 \begin_layout Plain Layout
23279 key exists, then print
23280 \begin_inset Quotes eld
23284 \begin_inset space ~
23288 \begin_inset Quotes erd
23291 followed by the volume key.
23292 It is also possible to have an else clause in the conditional, such as:
23293 \begin_inset Newline newline
23297 \begin_inset Flex Code
23300 \begin_layout Plain Layout
23301 {%author%[[%author%]][[%editor%, ed.]]}
23307 \begin_inset Newline newline
23311 \begin_inset Flex Code
23314 \begin_layout Plain Layout
23320 key is printed if it exists; otherwise, the editor key is printed, followed
23322 \begin_inset Quotes eld
23326 \begin_inset space ~
23330 \begin_inset Quotes erd
23333 Note that the key is again enclosed in
23334 \begin_inset Flex Code
23337 \begin_layout Plain Layout
23343 signs; the entire conditional is enclosed in braces; and the if and else
23344 clauses are enclosed in double brackets,
23345 \begin_inset Quotes eld
23349 \begin_inset Flex Code
23352 \begin_layout Plain Layout
23359 \begin_inset Quotes eld
23363 \begin_inset Quotes eld
23367 \begin_inset Flex Code
23370 \begin_layout Plain Layout
23377 \begin_inset Quotes erd
23381 There must be no space between any of these.
23384 \begin_layout Standard
23385 Next to the entry keys, there are some special keys that can be used for
23386 these conditionals:
23389 \begin_layout Itemize
23390 \begin_inset Flex Code
23393 \begin_layout Plain Layout
23394 {%dialog%[[true]][[false]]}
23400 \begin_inset Quotes eld
23404 \begin_inset Quotes erd
23407 part for dialogs and menus, the
23408 \begin_inset Quotes eld
23412 \begin_inset Quotes erd
23415 part for other contexts (workarea, export)
23418 \begin_layout Itemize
23419 \begin_inset Flex Code
23422 \begin_layout Plain Layout
23423 {%export%[[true]][[false]]}
23429 \begin_inset Quotes eld
23433 \begin_inset Quotes erd
23436 part for export and menus, the
23437 \begin_inset Quotes eld
23441 \begin_inset Quotes erd
23444 part for other contexts (workarea, dialog)
23447 \begin_layout Itemize
23448 \begin_inset Flex Code
23451 \begin_layout Plain Layout
23458 \begin_inset Quotes eld
23462 \begin_inset Quotes erd
23465 part if another item follows (e.
23466 \begin_inset space \thinspace{}
23469 g., in a citation with multiple keys)
23472 \begin_layout Itemize
23473 \begin_inset Flex Code
23476 \begin_layout Plain Layout
23477 {%second%[[true]][[false]]}
23483 \begin_inset Quotes eld
23487 \begin_inset Quotes erd
23490 if this is the second of multiple items, else the
23491 \begin_inset Quotes eld
23495 \begin_inset Quotes erd
23501 \begin_layout Itemize
23502 \begin_inset Flex Code
23505 \begin_layout Plain Layout
23506 {%ifstar%[[true]][[false]]}
23512 \begin_inset Quotes eld
23516 \begin_inset Quotes erd
23519 part for starred citation commands (such as
23520 \begin_inset Flex Code
23523 \begin_layout Plain Layout
23531 ), the false part for unstarred
23534 \begin_layout Itemize
23535 \begin_inset Flex Code
23538 \begin_layout Plain Layout
23539 {%ifentrytype:<type>%[[true]][[false]]}
23545 \begin_inset Quotes eld
23549 \begin_inset Quotes erd
23552 if the current entry type matches
23553 \begin_inset Flex Code
23556 \begin_layout Plain Layout
23562 , else the false part (e.g., in a citation definition:
23563 \begin_inset Flex Code
23566 \begin_layout Plain Layout
23567 {%ifentrytype:book%[[this is a book]][[this is no book]]}
23575 \begin_layout Itemize
23576 \begin_inset Flex Code
23579 \begin_layout Plain Layout
23580 {%ifmultiple:<authortype>%[[true]][[false]]}
23586 \begin_inset Quotes eld
23590 \begin_inset Quotes erd
23593 if the current author type (author, editor etc.) has multiple authors, else
23594 the false part (e.g., in a bibliography definition:
23595 \begin_inset Flex Code
23598 \begin_layout Plain Layout
23599 {%ifmultiple:editor%[[eds.]][[ed.]]}
23607 \begin_layout Itemize
23608 \begin_inset Flex Code
23611 \begin_layout Plain Layout
23612 {%ifqualified%[[true]][[false]]}
23618 \begin_inset Quotes eld
23622 \begin_inset Quotes erd
23625 part if the current citation is a qualified citation list (a specific
23629 format for multi-reference citations), the false part if this is not the
23633 \begin_layout Standard
23635 \begin_inset Flex Code
23638 \begin_layout Plain Layout
23644 prints the author key as it is recorded in the bibliography file.
23645 This might not be what you want, since it will result in a string such
23647 \begin_inset Quotes eld
23650 Miller, Peter and Smith, Mary and White, Jane
23651 \begin_inset Quotes erd
23655 \begin_inset Quotes eld
23659 \begin_inset Quotes erd
23662 is used by Bib\SpecialChar TeX
23663 to delimit authors).
23665 therefore provides some methods to get properly formatted name lists (which
23666 will also get translated).
23667 The following keys are provided:
23670 \begin_layout Enumerate
23671 For name lists with pre- and surname, suitable for the main authors/editors
23672 of a bibliography item.
23674 \begin_inset Flex Code
23677 \begin_layout Plain Layout
23683 part denotes the kind of list that is requested (e.g.
23685 \begin_inset Flex Code
23688 \begin_layout Plain Layout
23698 \begin_layout Itemize
23699 \begin_inset Flex Code
23702 \begin_layout Plain Layout
23703 %abbrvnames:<nametype>%
23708 : Provides a name list which is abbreviated (with
23709 \begin_inset Quotes eld
23713 \begin_inset Quotes erd
23717 \begin_inset Flex Code
23720 \begin_layout Plain Layout
23729 \begin_layout Itemize
23730 \begin_inset Flex Code
23733 \begin_layout Plain Layout
23734 %fullnames:<nametype>%
23739 : Provides a full name list (never abbreviated with
23740 \begin_inset Quotes eld
23744 \begin_inset Quotes erd
23750 \begin_layout Itemize
23751 \begin_inset Flex Code
23754 \begin_layout Plain Layout
23755 %forceabbrvnames:<nametype>%
23760 : Provides a name list which is always abbreviated (with
23761 \begin_inset Quotes eld
23765 \begin_inset Quotes erd
23769 \begin_inset Flex Code
23772 \begin_layout Plain Layout
23782 \begin_layout Enumerate
23783 Alternative name lists with pre- and surname, if the order of pre- and surname
23784 inside the bibliography item differs (as in:
23785 \begin_inset Quotes eld
23788 Miller, John: Some text, in: Mary Smith, ed.: A volume
23789 \begin_inset Quotes erd
23796 \begin_layout Itemize
23797 \begin_inset Flex Code
23800 \begin_layout Plain Layout
23801 %abbrvbynames:<nametype>%
23806 : Provides a name list which is abbreviated (with
23807 \begin_inset Quotes eld
23811 \begin_inset Quotes erd
23815 \begin_inset Flex Code
23818 \begin_layout Plain Layout
23827 \begin_layout Itemize
23828 \begin_inset Flex Code
23831 \begin_layout Plain Layout
23832 %fullbynames:<nametype>%
23837 : Provides a full name list (never abbreviated with
23838 \begin_inset Quotes eld
23842 \begin_inset Quotes erd
23848 \begin_layout Itemize
23849 \begin_inset Flex Code
23852 \begin_layout Plain Layout
23853 %forceabbrvbynames:<nametype>%
23858 : Provides a name list which is always abbreviated (with
23859 \begin_inset Quotes eld
23863 \begin_inset Quotes erd
23867 \begin_inset Flex Code
23870 \begin_layout Plain Layout
23880 \begin_layout Enumerate
23881 And finally name lists which consist of family names only, as used in author-yea
23883 These do not take a
23884 \begin_inset Flex Code
23887 \begin_layout Plain Layout
23893 part, but always return either an author list or, if this does not exist,
23894 an editor list (as common in author-year labels):
23898 \begin_layout Itemize
23899 \begin_inset Flex Code
23902 \begin_layout Plain Layout
23908 : Provides a name list which is abbreviated (with
23909 \begin_inset Quotes eld
23913 \begin_inset Quotes erd
23917 \begin_inset Flex Code
23920 \begin_layout Plain Layout
23929 \begin_layout Itemize
23930 \begin_inset Flex Code
23933 \begin_layout Plain Layout
23939 : Provides a full name list (never abbreviated with
23940 \begin_inset Quotes eld
23944 \begin_inset Quotes erd
23950 \begin_layout Itemize
23951 \begin_inset Flex Code
23954 \begin_layout Plain Layout
23955 %forceabbrvciteauthor%
23960 : Provides a name list which is always abbreviated (with
23961 \begin_inset Quotes eld
23965 \begin_inset Quotes erd
23969 \begin_inset Flex Code
23972 \begin_layout Plain Layout
23982 \begin_layout Standard
23983 The order of pre- and surname in the former two lists can be adjusted by
23987 \begin_layout Itemize
23988 \begin_inset Flex Code
23991 \begin_layout Plain Layout
23992 !firstnameform %surname%, %prename%
23997 (first author in lists of type 1)
24000 \begin_layout Itemize
24001 \begin_inset Flex Code
24004 \begin_layout Plain Layout
24005 !othernameform %surname%, %prename%
24010 (other authors in lists of type 1)
24013 \begin_layout Itemize
24014 \begin_inset Flex Code
24017 \begin_layout Plain Layout
24018 !firstbynameform %prename% %surname%
24023 (first author in lists of type 2)
24026 \begin_layout Itemize
24027 \begin_inset Flex Code
24030 \begin_layout Plain Layout
24031 !otherbynameform %prename% %surname%
24036 (other authors in lists of type 2)
24039 \begin_layout Standard
24040 This allows you to configure namings like
24041 \begin_inset Quotes eld
24044 Miller, Peter and Mary Smith: \SpecialChar ldots
24045 , in: John Doe and Pat Green, eds.:\SpecialChar ldots
24047 \begin_inset Quotes erd
24053 \begin_layout Standard
24054 There is one other piece of syntax available in definitions, which looks
24056 \begin_inset Flex Code
24059 \begin_layout Plain Layout
24066 This defines a piece of formatting information that is to be used when
24068 \begin_inset Quotes eld
24072 \begin_inset Quotes erd
24076 Obviously, we do not want to output HTML tags when writing plain text,
24077 so they should be wrapped in
24078 \begin_inset Quotes eld
24082 \begin_inset Quotes erd
24086 \begin_inset Quotes eld
24090 \begin_inset Quotes erd
24096 \begin_layout Standard
24097 Two special sorts of definitions are also possible in a
24098 \begin_inset Flex Code
24101 \begin_layout Plain Layout
24108 An example of the first would be:
24111 \begin_layout LyX-Code
24113 \begin_inset Quotes eld
24117 \begin_inset Quotes erd
24123 \begin_layout Standard
24124 This is an abbreviation, or macro, and it can be used by treating it as
24126 \begin_inset Flex Code
24129 \begin_layout Plain Layout
24138 \begin_inset Flex Code
24141 \begin_layout Plain Layout
24147 exactly as it would treat its definition.
24148 So, let us issue the obvious
24156 \begin_layout LyX-Code
24160 \begin_layout Standard
24161 or anything like it.
24163 shouldn't go into an infinite loop, but it may go into a long one before
24167 \begin_layout Standard
24168 The second sort of special definition might look like this:
24171 \begin_layout LyX-Code
24175 \begin_layout Standard
24176 This defines a translatable piece of text, which allows relevant parts of
24177 the bibliography or citation to be translated.
24178 It can be included in a definition by treating it as a key:
24179 \begin_inset Flex Code
24182 \begin_layout Plain Layout
24189 Note that there are two different translation paths: All definitions starting
24191 \begin_inset Flex Code
24194 \begin_layout Plain Layout
24200 , such as in the example above, will be translated to the currently active
24201 buffer language (so the translation will match the generated document).
24202 All definitions starting with underscore only will be translated to the
24204 This is the proper translation for strings that only occur in the dialogs
24205 or on buttons, such as this one:
24208 \begin_layout LyX-Code
24209 _addtobib Add to bibliography only.
24212 \begin_layout Standard
24213 Several of these translatable strings are predefined in
24214 \begin_inset Flex Code
24217 \begin_layout Plain Layout
24224 \begin_inset Flex Code
24227 \begin_layout Plain Layout
24234 Note that these are not macros, in the sense just defined.
24235 They will not be expanded.
24238 \begin_layout Standard
24239 So here then is an example that uses several of these features:
24240 \begin_inset VSpace defskip
24246 \begin_layout Standard
24250 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %B_edtext%, ]]}]]}
24253 \begin_layout Standard
24254 \begin_inset VSpace defskip
24257 This defines a macro that prints the author, followed by a comma, if the
24259 \begin_inset Flex Code
24262 \begin_layout Plain Layout
24268 key is defined, or else prints the name of the editor, followed by the
24270 \begin_inset Flex Code
24273 \begin_layout Plain Layout
24279 or its translation (it is by default
24280 \begin_inset Quotes eld
24284 \begin_inset Quotes erd
24288 \begin_inset Flex Code
24291 \begin_layout Plain Layout
24298 Note that this is in fact defined in
24299 \begin_inset Flex Code
24302 \begin_layout Plain Layout
24308 , so you can use it in your own definitions, or re-definitions, if you load
24312 \begin_layout Section
24313 \begin_inset CommandInset label
24315 name "sec:Tags-for-XHTML"
24319 Tags for XHTML output
24322 \begin_layout Standard
24323 As with \SpecialChar LaTeX
24324 or DocBook, the format of \SpecialChar LyX
24325 's XHTML output is also controlled by
24326 layout information.
24327 In general, \SpecialChar LyX
24328 provides sensible defaults and, as mentioned earlier, it will
24329 even construct default CSS style rules from the other layout tags.
24330 For example, \SpecialChar LyX
24331 will attempt to use the information provided in the
24332 \begin_inset Flex Code
24335 \begin_layout Plain Layout
24341 declaration for the Chapter style to write CSS that will appropriately
24342 format chapter headings.
24345 \begin_layout Standard
24346 In many cases, then, you may not have to do anything at all to get acceptable
24347 XHTML output for your own environments, custom insets, and so forth.
24348 But in some cases you will, and so \SpecialChar LyX
24349 provides a number of layout tags that
24350 can be used to customize the XHTML and CSS that are generated.
24353 \begin_layout Standard
24354 Note that there are two tags,
24355 \begin_inset Flex Code
24358 \begin_layout Plain Layout
24365 \begin_inset Flex Code
24368 \begin_layout Plain Layout
24374 that may appear outside style and inset declarations.
24376 \begin_inset CommandInset ref
24378 reference "subsec:General-text-class"
24382 for details on these.
24385 \begin_layout Subsection
24386 \begin_inset CommandInset label
24388 name "subsec:Paragraph-Style-XHTML"
24395 \begin_layout Standard
24396 The sort of XHTML \SpecialChar LyX
24397 outputs for a paragraph depends upon whether we are dealing
24398 with a normal paragraph, a command, or an environment, where this is itself
24399 determined by the contents of the corresponding
24400 \begin_inset Flex Code
24403 \begin_layout Plain Layout
24414 \begin_layout Standard
24415 For a command or normal paragraph, the output XHTML has the following form:
24418 \begin_layout LyX-Code
24422 \begin_inset Quotes erd
24426 \begin_inset Quotes erd
24432 \begin_layout LyX-Code
24436 \begin_inset Quotes erd
24440 \begin_inset Quotes erd
24446 \begin_layout LyX-Code
24449 Contents of the paragraph.
24452 \begin_layout LyX-Code
24458 \begin_layout Standard
24459 The label tags are of course omitted if the paragraph does not have a label.
24462 \begin_layout Standard
24463 For an environment that is not some sort of list, the XHTML takes this form:
24466 \begin_layout LyX-Code
24470 \begin_inset Quotes erd
24474 \begin_inset Quotes erd
24480 \begin_layout LyX-Code
24484 \begin_inset Quotes erd
24488 \begin_inset Quotes erd
24492 \begin_inset Quotes erd
24496 \begin_inset Quotes erd
24499 >Environment Label</labeltag>First paragraph.</itemtag>
24502 \begin_layout LyX-Code
24505 <itemtag>Second paragraph.</itemtag>
24508 \begin_layout LyX-Code
24514 \begin_layout Standard
24515 Note that the label is output only for the first paragraph, as it should
24516 be for a theorem, for example.
24520 \begin_layout Standard
24521 For a list, we have one of these forms:
24524 \begin_layout LyX-Code
24528 \begin_inset Quotes erd
24532 \begin_inset Quotes erd
24538 \begin_layout LyX-Code
24542 \begin_inset Quotes erd
24546 \begin_inset Quotes erd
24550 \begin_inset Quotes erd
24554 \begin_inset Quotes erd
24557 >List Label</labeltag>First item.</itemtag>
24560 \begin_layout LyX-Code
24564 \begin_inset Quotes erd
24568 \begin_inset Quotes erd
24572 \begin_inset Quotes erd
24576 \begin_inset Quotes erd
24579 >List Label</labeltag>Second item.</itemtag>
24582 \begin_layout LyX-Code
24588 \begin_layout LyX-Code
24592 \begin_layout LyX-Code
24596 \begin_inset Quotes erd
24600 \begin_inset Quotes erd
24606 \begin_layout LyX-Code
24610 \begin_inset Quotes erd
24614 \begin_inset Quotes erd
24617 >List Label</labeltag><itemtag attr=
24618 \begin_inset Quotes erd
24622 \begin_inset Quotes erd
24625 >First item.</itemtag>
24628 \begin_layout LyX-Code
24632 \begin_inset Quotes erd
24636 \begin_inset Quotes erd
24639 >List Label</labeltag><itemtag attr=
24640 \begin_inset Quotes erd
24644 \begin_inset Quotes erd
24647 >Second item.</itemtag>
24650 \begin_layout LyX-Code
24656 \begin_layout Standard
24657 Note the different orders of
24658 \begin_inset Flex Code
24661 \begin_layout Plain Layout
24668 \begin_inset Flex Code
24671 \begin_layout Plain Layout
24678 Which order we get depends upon the setting of
24679 \begin_inset Flex Code
24682 \begin_layout Plain Layout
24689 \begin_inset Flex Code
24692 \begin_layout Plain Layout
24698 is false (the default), you get the first of these, with the label within
24699 the item; if true, you get the second, with the label outside the item.
24702 \begin_layout Standard
24703 The specific tags and attributes output for each paragraph type can be controlle
24704 d by means of the layout tags we are about to describe.
24705 As mentioned earlier, however, \SpecialChar LyX
24706 uses sensible defaults for many of these,
24707 so you often may not need to do very much to get good XHTML output.
24708 Think of the available tags as there so you can tweak things to your liking.
24711 \begin_layout Description
24712 \begin_inset Flex Code
24715 \begin_layout Plain Layout
24722 \begin_inset Flex Code
24725 \begin_layout Plain Layout
24731 ] Specifies attribute information to be output with the main tag.
24733 \begin_inset Quotes eld
24737 \begin_inset Flex Code
24740 \begin_layout Plain Layout
24747 \begin_inset Quotes erd
24751 By default, \SpecialChar LyX
24753 \begin_inset Quotes eld
24757 \begin_inset Flex Code
24760 \begin_layout Plain Layout
24767 \begin_inset Quotes erd
24771 \begin_inset Flex Code
24774 \begin_layout Plain Layout
24780 is the \SpecialChar LyX
24781 name of the layout, made lowercase, for example: chapter.
24786 contain any style information.
24788 \begin_inset Flex Code
24791 \begin_layout Plain Layout
24800 \begin_layout Description
24801 \begin_inset Flex Code
24804 \begin_layout Plain Layout
24811 \begin_inset Flex Code
24814 \begin_layout Plain Layout
24824 ] Whether to output the default CSS information \SpecialChar LyX
24825 generates for this layout,
24826 even if additional information is explicitly provided via
24827 \begin_inset Flex Code
24830 \begin_layout Plain Layout
24838 \begin_inset Flex Code
24841 \begin_layout Plain Layout
24847 allows you to alter or augment the generated CSS, rather than to override
24850 \begin_inset Flex Code
24853 \begin_layout Plain Layout
24862 \begin_layout Description
24863 \begin_inset Flex Code
24866 \begin_layout Plain Layout
24873 \begin_inset Flex Code
24876 \begin_layout Plain Layout
24882 ] The tag to be used for individual paragraphs of environments, replacing
24884 \begin_inset Flex Code
24887 \begin_layout Plain Layout
24893 in the examples above.
24895 \begin_inset Flex Code
24898 \begin_layout Plain Layout
24907 \begin_layout Description
24908 \begin_inset Flex Code
24911 \begin_layout Plain Layout
24918 \begin_inset Flex Code
24921 \begin_layout Plain Layout
24927 ] Attributes for the item tag.
24929 \begin_inset Newline newline
24933 \begin_inset Quotes eld
24937 \begin_inset Flex Code
24940 \begin_layout Plain Layout
24941 class=`layoutname_item'
24947 \begin_inset Quotes erd
24955 contain any style information.
24957 \begin_inset Flex Code
24960 \begin_layout Plain Layout
24969 \begin_layout Description
24970 \begin_inset Flex Code
24973 \begin_layout Plain Layout
24980 \begin_inset Flex Code
24983 \begin_layout Plain Layout
24989 ] The tag to be used for paragraph and item labels, replacing
24990 \begin_inset Flex Code
24993 \begin_layout Plain Layout
24999 in the examples above.
25001 \begin_inset Flex Code
25004 \begin_layout Plain Layout
25011 \begin_inset Flex Code
25014 \begin_layout Plain Layout
25021 \begin_inset Flex Code
25024 \begin_layout Plain Layout
25031 \begin_inset Flex Code
25034 \begin_layout Plain Layout
25035 Centered_Top_Environment
25040 , in which case it defaults to
25041 \begin_inset Flex Code
25044 \begin_layout Plain Layout
25053 \begin_layout Description
25054 \begin_inset Flex Code
25057 \begin_layout Plain Layout
25064 \begin_inset Flex Code
25067 \begin_layout Plain Layout
25073 ] Attributes for the label tag.
25075 \begin_inset Newline newline
25079 \begin_inset Quotes eld
25083 \begin_inset Flex Code
25086 \begin_layout Plain Layout
25087 class=`layoutname_label'
25093 \begin_inset Quotes erd
25101 contain any style information.
25103 \begin_inset Flex Code
25106 \begin_layout Plain Layout
25115 \begin_layout Description
25116 \begin_inset Flex Code
25119 \begin_layout Plain Layout
25126 \begin_inset Flex Code
25129 \begin_layout Plain Layout
25139 ] Meaningful only for list-like environments, this tag controls whether
25140 the label tag is output before or inside the item tag.
25141 This is used, for example, in the description environment, where we want
25143 \begin_inset Flex Code
25146 \begin_layout Plain Layout
25147 <dt>\SpecialChar ldots
25148 </dt><dd>\SpecialChar ldots
25156 \begin_inset Flex Code
25159 \begin_layout Plain Layout
25165 : The label tag is output inside the item tag.
25168 \begin_layout Description
25169 \begin_inset Flex Code
25172 \begin_layout Plain Layout
25178 Information to be output in the
25179 \begin_inset Flex Code
25182 \begin_layout Plain Layout
25188 section when this style is used.
25189 This might, for example, be used to include a
25190 \begin_inset Flex Code
25193 \begin_layout Plain Layout
25200 \begin_inset Flex Code
25203 \begin_layout Plain Layout
25212 \begin_layout Description
25213 \begin_inset Flex Code
25216 \begin_layout Plain Layout
25222 CSS style information to be included when this style is used.
25223 Note that this will automatically be wrapped in a layout-generated
25224 \begin_inset Flex Code
25227 \begin_layout Plain Layout
25233 block, so only the CSS itself need be included.
25235 \begin_inset Flex Code
25238 \begin_layout Plain Layout
25247 \begin_layout Description
25248 \begin_inset Flex Code
25251 \begin_layout Plain Layout
25258 \begin_inset Flex Code
25261 \begin_layout Plain Layout
25267 ] The tag to be used for the main label, replacing
25268 \begin_inset Flex Code
25271 \begin_layout Plain Layout
25277 in the examples above.
25279 \begin_inset Flex Code
25282 \begin_layout Plain Layout
25291 \begin_layout Description
25292 \begin_inset Flex Code
25295 \begin_layout Plain Layout
25302 \begin_inset Flex Code
25305 \begin_layout Plain Layout
25315 ] Marks this style as the one to be used to generate the
25316 \begin_inset Flex Code
25319 \begin_layout Plain Layout
25325 tag for the XHTML file.
25326 By default, it is false.
25328 \begin_inset Flex Code
25331 \begin_layout Plain Layout
25337 file sets it to true for the
25338 \begin_inset Flex Code
25341 \begin_layout Plain Layout
25351 \begin_layout Subsection
25355 \begin_layout Standard
25356 The XHTML output of insets can also be controlled by information in layout
25361 \begin_layout Plain Layout
25362 At present, this is true only for
25363 \begin_inset Quotes eld
25367 \begin_inset Quotes erd
25370 insets (insets you can type into) and is not true for
25371 \begin_inset Quotes eld
25375 \begin_inset Quotes erd
25378 insets (insets that are associated with dialog boxes).
25383 Here, too, \SpecialChar LyX
25384 tries to provide sensible defaults, and it constructs default
25386 But everything can be customized.
25389 \begin_layout Standard
25390 The XHTML \SpecialChar LyX
25391 outputs for an inset has the following form:
25394 \begin_layout LyX-Code
25396 \begin_inset Quotes erd
25400 \begin_inset Quotes erd
25406 \begin_layout LyX-Code
25407 <labeltag>Label</labeltag>
25410 \begin_layout LyX-Code
25412 \begin_inset Quotes erd
25416 \begin_inset Quotes erd
25419 >Contents of the inset.</innertag>
25422 \begin_layout LyX-Code
25426 \begin_layout Standard
25427 If the inset permits multiple paragraphs—that is, if
25428 \begin_inset Flex Code
25431 \begin_layout Plain Layout
25437 is true—then the contents of the inset will itself be output as paragraphs
25438 formatted according to the styles used for those paragraphs (standard,
25439 quote, and the like).
25440 The label tag is of course omitted if the paragraph does not have a label
25441 and, at present, is always
25442 \begin_inset Flex Code
25445 \begin_layout Plain Layout
25452 The inner tag is optional and, by default, does not appear.
25455 \begin_layout Standard
25456 The specific tags and attributes output for each inset can be controlled
25457 by means of the following layout tags.
25460 \begin_layout Description
25461 \begin_inset Flex Code
25464 \begin_layout Plain Layout
25471 \begin_inset Flex Code
25474 \begin_layout Plain Layout
25480 ] Specifies attribute information to be output with the main tag.
25482 \begin_inset Quotes eld
25486 \begin_inset Flex Code
25489 \begin_layout Plain Layout
25490 class=`myinset' onclick=`\SpecialChar ldots
25497 \begin_inset Quotes erd
25501 By default, \SpecialChar LyX
25503 \begin_inset Quotes eld
25507 \begin_inset Flex Code
25510 \begin_layout Plain Layout
25517 \begin_inset Quotes erd
25521 \begin_inset Flex Code
25524 \begin_layout Plain Layout
25530 is the \SpecialChar LyX
25531 name of the inset, made lowercase and with non-alphanumeric characters
25532 converted to underscores, for example: footnote.
25535 \begin_layout Description
25536 \begin_inset Flex Code
25539 \begin_layout Plain Layout
25546 \begin_inset Flex Code
25549 \begin_layout Plain Layout
25559 ] Whether to output the default CSS information \SpecialChar LyX
25560 generates for this layout,
25561 even if additional information is explicitly provided via
25562 \begin_inset Flex Code
25565 \begin_layout Plain Layout
25573 \begin_inset Flex Code
25576 \begin_layout Plain Layout
25582 allows you to alter or augment the generated CSS, rather than to override
25587 \begin_layout Description
25588 \begin_inset Flex Code
25591 \begin_layout Plain Layout
25598 \begin_inset Flex Code
25601 \begin_layout Plain Layout
25607 ] Attributes for the inner tag.
25609 \begin_inset Newline newline
25613 \begin_inset Quotes eld
25617 \begin_inset Flex Code
25620 \begin_layout Plain Layout
25621 class=`insetname_inner'
25627 \begin_inset Quotes erd
25633 \begin_layout Description
25634 \begin_inset Flex Code
25637 \begin_layout Plain Layout
25644 \begin_inset Flex Code
25647 \begin_layout Plain Layout
25653 ] The inner tag, replacing
25654 \begin_inset Flex Code
25657 \begin_layout Plain Layout
25663 in the examples above.
25664 By default, there is none.
25667 \begin_layout Description
25668 \begin_inset Flex Code
25671 \begin_layout Plain Layout
25678 \begin_inset Flex Code
25681 \begin_layout Plain Layout
25689 ] Whether this inset represents a standalone block of text (such as a footnote)
25690 or instead represents material that is included in the surrounding text
25691 (such as a branch).
25695 \begin_layout Description
25696 \begin_inset Flex Code
25699 \begin_layout Plain Layout
25706 \begin_inset Flex Code
25709 \begin_layout Plain Layout
25715 ] A label for this inset, possibly including a reference to a counter.
25716 For example, for footnote, it might be:
25717 \begin_inset Flex Code
25720 \begin_layout Plain Layout
25729 This is optional, and there is no default.
25732 \begin_layout Description
25733 \begin_inset Flex Code
25736 \begin_layout Plain Layout
25742 Information to be output in the
25743 \begin_inset Flex Code
25746 \begin_layout Plain Layout
25752 section when this style is used.
25753 This might, for example, be used to include a
25754 \begin_inset Flex Code
25757 \begin_layout Plain Layout
25764 \begin_inset Flex Code
25767 \begin_layout Plain Layout
25776 \begin_layout Description
25777 \begin_inset Flex Code
25780 \begin_layout Plain Layout
25786 CSS style information to be included when this style is used.
25787 Note that this will automatically be wrapped in a layout-generated
25788 \begin_inset Flex Code
25791 \begin_layout Plain Layout
25797 block, so only the CSS itself need be included.
25800 \begin_layout Description
25801 \begin_inset Flex Code
25804 \begin_layout Plain Layout
25811 \begin_inset Flex Code
25814 \begin_layout Plain Layout
25820 ] The tag to be used for the main label, replacing
25821 \begin_inset Flex Code
25824 \begin_layout Plain Layout
25830 in the examples above.
25831 The default depends upon the setting of
25832 \begin_inset Flex Code
25835 \begin_layout Plain Layout
25842 \begin_inset Flex Code
25845 \begin_layout Plain Layout
25851 is true, the default is
25852 \begin_inset Flex Code
25855 \begin_layout Plain Layout
25861 ; if it is false, the default is
25862 \begin_inset Flex Code
25865 \begin_layout Plain Layout
25874 \begin_layout Subsection
25878 \begin_layout Standard
25879 The XHTML output for floats too can be controlled by layout information.
25880 The output has the following form:
25883 \begin_layout LyX-Code
25885 \begin_inset Quotes erd
25889 \begin_inset Quotes erd
25895 \begin_layout LyX-Code
25896 Contents of the float.
25899 \begin_layout LyX-Code
25903 \begin_layout Standard
25904 The caption, if there is one, is a separate inset and will be output as
25906 Its appearance can be controlled via the InsetLayout for caption insets.
25910 \begin_layout Description
25911 \begin_inset Flex Code
25914 \begin_layout Plain Layout
25921 \begin_inset Flex Code
25924 \begin_layout Plain Layout
25930 ] Specifies attribute information to be output with the main tag.
25932 \begin_inset Quotes eld
25936 \begin_inset Flex Code
25939 \begin_layout Plain Layout
25940 class=`myfloat' onclick=`\SpecialChar ldots
25947 \begin_inset Quotes erd
25951 By default, \SpecialChar LyX
25953 \begin_inset Quotes eld
25957 \begin_inset Flex Code
25960 \begin_layout Plain Layout
25961 class=`float float-floattype'
25967 \begin_inset Quotes erd
25971 \begin_inset Flex Code
25974 \begin_layout Plain Layout
25980 is \SpecialChar LyX
25981 's name for this type of float, as determined by the float declaration
25983 \begin_inset CommandInset ref
25985 reference "subsec:Floats"
25989 ), though made lowercase and with non-alphanumeric characters converted
25990 to underscores, for example: float-table.
25993 \begin_layout Description
25994 \begin_inset Flex Code
25997 \begin_layout Plain Layout
26003 CSS style information to be included when this float is used.
26004 Note that this will automatically be wrapped in a layout-generated
26005 \begin_inset Flex Code
26008 \begin_layout Plain Layout
26014 block, so only the CSS itself need be included.
26017 \begin_layout Description
26018 \begin_inset Flex Code
26021 \begin_layout Plain Layout
26028 \begin_inset Flex Code
26031 \begin_layout Plain Layout
26037 ] The tag to be used for this float, replacing
26038 \begin_inset Quotes eld
26042 \begin_inset Flex Code
26045 \begin_layout Plain Layout
26052 \begin_inset Quotes erd
26055 in the example above.
26057 \begin_inset Flex Code
26060 \begin_layout Plain Layout
26066 and will rarely need changing.
26069 \begin_layout Subsection
26070 Bibliography formatting
26073 \begin_layout Standard
26074 The bibliography can be formatted using
26075 \begin_inset Flex Code
26078 \begin_layout Plain Layout
26086 \begin_inset CommandInset ref
26088 reference "subsec:Citation-format-description"
26095 \begin_layout Subsection
26100 \begin_layout Standard
26101 We have several times mentioned that \SpecialChar LyX
26102 will generate default CSS style rules
26103 for both insets and paragraph styles, based upon the other layout information
26105 In this section, we shall say a word about which layout information \SpecialChar LyX
26110 \begin_layout Standard
26111 At present, \SpecialChar LyX
26112 auto-generates CSS only for font information, making use of
26114 \begin_inset Flex Code
26117 \begin_layout Plain Layout
26124 \begin_inset Flex Code
26127 \begin_layout Plain Layout
26134 \begin_inset Flex Code
26137 \begin_layout Plain Layout
26144 \begin_inset Flex Code
26147 \begin_layout Plain Layout
26154 \begin_inset Flex Code
26157 \begin_layout Plain Layout
26164 \begin_inset CommandInset ref
26166 reference "subsec:Font-description"
26171 The translation is mostly straightforward and obvious.
26173 \begin_inset Quotes eld
26177 \begin_inset Flex Code
26180 \begin_layout Plain Layout
26187 \begin_inset Quotes erd
26191 \begin_inset Quotes eld
26195 \begin_inset Flex Code
26198 \begin_layout Plain Layout
26199 font-family: sans-serif;
26205 \begin_inset Quotes erd
26209 The correspondence of \SpecialChar LyX
26210 sizes and CSS sizes is a little less obvious but
26211 nonetheless intuitive.
26213 \begin_inset Flex Code
26216 \begin_layout Plain Layout
26223 \begin_inset Flex URL
26226 \begin_layout Plain Layout
26236 \begin_layout Chapter
26237 Including External Material
26238 \begin_inset CommandInset label
26240 name "chap:Including-External-Material"
26247 \begin_layout Standard
26248 \begin_inset Box Shadowbox
26258 height_special "totalheight"
26263 backgroundcolor "none"
26266 \begin_layout Plain Layout
26267 WARNING: This portion of the documentation has not been updated for some
26269 We certainly hope that it is still accurate, but there are no guarantees.
26277 \begin_layout Standard
26278 The use of material from sources external to \SpecialChar LyX
26279 is covered in detail in the
26285 This part of the manual covers what needs to happen behind the scenes for
26286 new sorts of material to be included.
26289 \begin_layout Section
26293 \begin_layout Standard
26294 The external material feature is based on the concept of a
26299 A template is a specification of how \SpecialChar LyX
26300 should interface with a certain kind
26302 As bundled, \SpecialChar LyX
26303 comes with predefined templates for Xfig figures, various
26304 raster format images, chess diagrams, and LilyPond music notation.
26305 You can check the actual list by using the menu
26306 \begin_inset Flex Noun
26309 \begin_layout Plain Layout
26310 Insert\SpecialChar menuseparator
26311 File\SpecialChar menuseparator
26318 Furthermore, it is possible to roll your own template to support a specific
26320 Later we'll describe in more detail what is involved, and hopefully you
26321 will submit all the templates you create so we can include them in a later
26326 \begin_layout Standard
26327 Another basic idea of the external material feature is to distinguish between
26328 the original file that serves as a base for final material and the produced
26329 file that is included in your exported or printed document.
26330 For example, consider the case of a figure produced with
26331 \begin_inset Flex Code
26334 \begin_layout Plain Layout
26341 The Xfig application itself works on an original file with the
26342 \begin_inset Flex Code
26345 \begin_layout Plain Layout
26352 Within Xfig, you create and change your figure, and when you are done,
26354 \begin_inset Flex Code
26357 \begin_layout Plain Layout
26364 When you want to include the figure in your document, you invoke
26365 \begin_inset Flex Code
26368 \begin_layout Plain Layout
26374 in order to create a PostScript file that can readily be included in your
26378 \begin_inset Flex Code
26381 \begin_layout Plain Layout
26387 file is the original file, and the PostScript file is the produced file.
26390 \begin_layout Standard
26391 This distinction is important in order to allow updating of the material
26392 while you are in the process of writing the document.
26393 Furthermore, it provides us with the flexibility that is needed to support
26394 multiple export formats.
26395 For instance, in the case of a plain text file, it is not exactly an award-winn
26396 ing idea to include the figure as raw PostScript.
26397 Instead, you would either prefer to just include a reference to the figure
26398 or try to invoke some graphics to ASCII converter to make the final result
26399 look similar to the real graphics.
26400 The external material management allows you to do this, because it is parametri
26401 zed on the different export formats that \SpecialChar LyX
26405 \begin_layout Standard
26406 Besides supporting the production of different products according to the
26407 exported format, it supports tight integration with editing and viewing
26409 In the case of an Xfig figure, you are able to invoke Xfig on the original
26410 file with a single click from within the external material dialog in \SpecialChar LyX
26412 and also preview the produced PostScript file with Ghostview with another
26414 No more fiddling around with the command line and/or file browsers to locate
26415 and manipulate the original or produced files.
26416 In this way, you are finally able to take full advantage of the many different
26417 applications that are relevant to use when you write your documents, and
26418 ultimately be more productive.
26421 \begin_layout Section
26422 The external template configuration files
26425 \begin_layout Standard
26426 It is relatively easy to add custom external template definitions to \SpecialChar LyX
26428 However, be aware that doing this in an careless manner most probably
26432 introduce an easily exploitable security hole.
26433 So before you do this, please read the discussion about security in
26434 \begin_inset CommandInset ref
26436 reference "sec:Security-discussion"
26443 \begin_layout Standard
26444 Having said that, we encourage you to submit any interesting templates that
26449 \begin_layout Standard
26450 The external templates are defined in the
26451 \begin_inset Flex Code
26454 \begin_layout Plain Layout
26460 files that are stored in the
26461 \begin_inset Flex Code
26464 \begin_layout Plain Layout
26465 LyXDir/lib/xtemplates/
26471 Each template is defined in a file of its own.
26472 You can place your own templates in
26473 \begin_inset Flex Code
26476 \begin_layout Plain Layout
26477 UserDir/xtemplates/
26482 or copy existing templates to that directory in order to modify them.
26485 \begin_layout Standard
26486 A typical template looks like this:
26489 \begin_layout LyX-Code
26493 \begin_layout LyX-Code
26494 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
26497 \begin_layout LyX-Code
26501 \begin_layout LyX-Code
26505 \begin_layout LyX-Code
26509 \begin_layout LyX-Code
26513 \begin_layout LyX-Code
26517 \begin_layout LyX-Code
26518 AutomaticProduction true
26521 \begin_layout LyX-Code
26525 \begin_layout LyX-Code
26529 \begin_layout LyX-Code
26533 \begin_layout LyX-Code
26534 TransformCommand Rotate RotationLatexCommand
26537 \begin_layout LyX-Code
26538 TransformCommand Resize ResizeLatexCommand
26541 \begin_layout LyX-Code
26542 Product "$$RotateFront$$ResizeFront
26545 \begin_layout LyX-Code
26550 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
26553 \begin_layout LyX-Code
26554 $$ResizeBack$$RotateBack"
26557 \begin_layout LyX-Code
26561 \begin_layout LyX-Code
26562 UpdateResult "$$AbsPath$$Basename.pstex_t"
26565 \begin_layout LyX-Code
26566 Requirement "graphicx"
26569 \begin_layout LyX-Code
26570 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
26573 \begin_layout LyX-Code
26574 ReferencedFile latex "$$AbsPath$$Basename.eps"
26577 \begin_layout LyX-Code
26578 ReferencedFile dvi "$$AbsPath$$Basename.eps"
26581 \begin_layout LyX-Code
26585 \begin_layout LyX-Code
26589 \begin_layout LyX-Code
26590 TransformCommand Rotate RotationLatexCommand
26593 \begin_layout LyX-Code
26594 TransformCommand Resize ResizeLatexCommand
26597 \begin_layout LyX-Code
26598 Product "$$RotateFront$$ResizeFront
26601 \begin_layout LyX-Code
26606 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
26609 \begin_layout LyX-Code
26610 $$ResizeBack$$RotateBack"
26613 \begin_layout LyX-Code
26614 UpdateFormat pdftex
26617 \begin_layout LyX-Code
26618 UpdateResult "$$AbsPath$$Basename.pdftex_t"
26621 \begin_layout LyX-Code
26622 Requirement "graphicx"
26625 \begin_layout LyX-Code
26626 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
26629 \begin_layout LyX-Code
26630 ReferencedFile latex "$$AbsPath$$Basename.pdf"
26633 \begin_layout LyX-Code
26637 \begin_layout LyX-Code
26641 \begin_layout LyX-Code
26642 Product "[XFig: $$FName]"
26645 \begin_layout LyX-Code
26649 \begin_layout LyX-Code
26653 \begin_layout LyX-Code
26654 Product "<graphic fileref=
26656 "$$AbsOrRelPathMaster$$Basename.eps
26661 \begin_layout LyX-Code
26665 \begin_layout LyX-Code
26669 \begin_layout LyX-Code
26670 UpdateResult "$$AbsPath$$Basename.eps"
26673 \begin_layout LyX-Code
26674 ReferencedFile docbook "$$AbsPath$$Basename.eps"
26677 \begin_layout LyX-Code
26678 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
26681 \begin_layout LyX-Code
26685 \begin_layout LyX-Code
26689 \begin_layout Standard
26690 As you can see, the template is enclosed in
26691 \begin_inset Flex Code
26694 \begin_layout Plain Layout
26702 \begin_inset Flex Code
26705 \begin_layout Plain Layout
26712 It contains a header specifying some general settings and, for each supported
26713 primary document file format, a section
26714 \begin_inset Flex Code
26717 \begin_layout Plain Layout
26725 \begin_inset Flex Code
26728 \begin_layout Plain Layout
26737 \begin_layout Subsection
26738 The template header
26741 \begin_layout Description
26742 \begin_inset Flex Code
26745 \begin_layout Plain Layout
26746 AutomaticProduction
26747 \begin_inset space ~
26755 Whether the file represented by the template must be generated by \SpecialChar LyX
26757 This command must occur exactly once.
26760 \begin_layout Description
26761 \begin_inset Flex Code
26764 \begin_layout Plain Layout
26766 \begin_inset space ~
26774 A glob pattern that is used in the file dialog to filter out the desired
26776 If there is more than one possible file extension (e.
26777 \begin_inset space \thinspace{}
26781 \begin_inset space \space{}
26785 \begin_inset Flex Code
26788 \begin_layout Plain Layout
26795 \begin_inset Flex Code
26798 \begin_layout Plain Layout
26804 ), use something like
26805 \begin_inset Flex Code
26808 \begin_layout Plain Layout
26815 This command must occur exactly once.
26818 \begin_layout Description
26819 \begin_inset Flex Code
26822 \begin_layout Plain Layout
26824 \begin_inset space ~
26832 The text that is displayed on the button.
26833 This command must occur exactly once.
26836 \begin_layout Description
26837 \begin_inset Flex Code
26840 \begin_layout Plain Layout
26842 \begin_inset space ~
26846 \begin_inset space ~
26854 The help text that is used in the External dialog.
26855 Provide enough information to explain to the user just what the template
26856 can provide him with.
26857 This command must occur exactly once.
26860 \begin_layout Description
26861 \begin_inset Flex Code
26864 \begin_layout Plain Layout
26866 \begin_inset space ~
26874 The file format of the original file.
26875 This must be the name of a format that is known to \SpecialChar LyX
26877 \begin_inset CommandInset ref
26879 reference "sec:Formats"
26885 \begin_inset Quotes eld
26889 \begin_inset Flex Code
26892 \begin_layout Plain Layout
26899 \begin_inset Quotes erd
26902 if the template can handle original files of more than one format.
26904 will attempt to interrogate the file itself in order to deduce its format
26906 This command must occur exactly once.
26909 \begin_layout Description
26910 \begin_inset Flex Code
26913 \begin_layout Plain Layout
26915 \begin_inset space ~
26923 A unique name for the template.
26924 It must not contain substitution macros (see below).
26927 \begin_layout Description
26928 \begin_inset Flex Code
26931 \begin_layout Plain Layout
26933 \begin_inset space ~
26936 Rotate|Resize|Clip|Extra
26941 This command specifies which transformations are supported by this template.
26942 It may occur zero or more times.
26943 This command enables the corresponding tabs in the external dialog.
26945 \begin_inset Flex Code
26948 \begin_layout Plain Layout
26954 command must have either a corresponding
26955 \begin_inset Flex Code
26958 \begin_layout Plain Layout
26965 \begin_inset Flex Code
26968 \begin_layout Plain Layout
26975 \begin_inset Flex Code
26978 \begin_layout Plain Layout
26985 Otherwise the transformation will not be supported by that format.
26988 \begin_layout Subsection
26992 \begin_layout Description
26993 \begin_inset Flex Code
26996 \begin_layout Plain Layout
26998 \begin_inset space ~
27001 LaTeX|PDFLaTeX|PlainText|DocBook|XHTML
27006 The primary document file format that this format definition is for.
27007 Not every template has a sensible representation in all document file formats.
27008 Please define nevertheless a
27009 \begin_inset Flex Code
27012 \begin_layout Plain Layout
27018 section for all templates.
27019 Use a dummy text when no representation is available.
27020 Then you can at least see a reference to the external material in the exported
27024 \begin_layout Description
27025 \begin_inset Flex Code
27028 \begin_layout Plain Layout
27030 \begin_inset space ~
27034 \begin_inset space ~
27042 This command defines an additional macro
27043 \begin_inset Flex Code
27046 \begin_layout Plain Layout
27052 for substitution in
27053 \begin_inset Flex Code
27056 \begin_layout Plain Layout
27064 \begin_inset Flex Code
27067 \begin_layout Plain Layout
27073 itself may contain substitution macros.
27074 The advantage over using
27075 \begin_inset Flex Code
27078 \begin_layout Plain Layout
27085 \begin_inset Flex Code
27088 \begin_layout Plain Layout
27094 is that the substituted value of
27095 \begin_inset Flex Code
27098 \begin_layout Plain Layout
27104 is sanitized so that it is a valid optional argument in the document format.
27105 This command may occur zero or more times.
27108 \begin_layout Description
27109 \begin_inset Flex Code
27112 \begin_layout Plain Layout
27114 \begin_inset space ~
27122 The text that is inserted in the exported document.
27123 This is actually the most important command and can be quite complex.
27124 This command must occur exactly once.
27127 \begin_layout Description
27128 \begin_inset Flex Code
27131 \begin_layout Plain Layout
27133 \begin_inset space ~
27141 This command specifies a preamble snippet that will be included in the
27144 It has to be defined using
27145 \begin_inset Flex Code
27148 \begin_layout Plain Layout
27156 \begin_inset Flex Code
27159 \begin_layout Plain Layout
27166 This command may occur zero or more times.
27169 \begin_layout Description
27170 \begin_inset Flex Code
27173 \begin_layout Plain Layout
27175 \begin_inset space ~
27179 \begin_inset space ~
27187 This command denotes files that are created by the conversion process and
27188 are needed for a particular export format.
27189 If the filename is relative, it is interpreted relative to the master document.
27190 This command may be given zero or more times.
27193 \begin_layout Description
27194 \begin_inset Flex Code
27197 \begin_layout Plain Layout
27199 \begin_inset space ~
27207 The name of a required \SpecialChar LaTeX
27209 The package is included via
27210 \begin_inset Flex Code
27213 \begin_layout Plain Layout
27221 in the \SpecialChar LaTeX
27223 This command may occur zero or more times.
27226 \begin_layout Description
27227 \begin_inset Flex Code
27230 \begin_layout Plain Layout
27232 \begin_inset space ~
27236 \begin_inset space ~
27239 RotationLatexCommand
27244 This command specifies that the built in \SpecialChar LaTeX
27245 command should be used for rotation.
27246 This command may occur once or not at all.
27249 \begin_layout Description
27250 \begin_inset Flex Code
27253 \begin_layout Plain Layout
27255 \begin_inset space ~
27259 \begin_inset space ~
27267 This command specifies that the built in \SpecialChar LaTeX
27268 command should be used for resizing.
27269 This command may occur once or not at all.
27272 \begin_layout Description
27273 \begin_inset Flex Code
27276 \begin_layout Plain Layout
27278 \begin_inset space ~
27282 \begin_inset space ~
27285 RotationLatexOption
27290 This command specifies that rotation is done via an optional argument.
27291 This command may occur once or not at all.
27294 \begin_layout Description
27295 \begin_inset Flex Code
27298 \begin_layout Plain Layout
27300 \begin_inset space ~
27304 \begin_inset space ~
27312 This command specifies that resizing is done via an optional argument.
27313 This command may occur once or not at all.
27316 \begin_layout Description
27317 \begin_inset Flex Code
27320 \begin_layout Plain Layout
27322 \begin_inset space ~
27326 \begin_inset space ~
27334 This command specifies that clipping is done via an optional argument.
27335 This command may occur once or not at all.
27338 \begin_layout Description
27339 \begin_inset Flex Code
27342 \begin_layout Plain Layout
27344 \begin_inset space ~
27348 \begin_inset space ~
27356 This command specifies that an extra optional argument is used.
27357 This command may occur once or not at all.
27360 \begin_layout Description
27361 \begin_inset Flex Code
27364 \begin_layout Plain Layout
27366 \begin_inset space ~
27374 The file format of the converted file.
27375 This must be the name of a format that is known to \SpecialChar LyX
27377 \begin_inset Flex Noun
27380 \begin_layout Plain Layout
27381 Tools\SpecialChar menuseparator
27382 Preferences\SpecialChar menuseparator
27383 File Handling\SpecialChar menuseparator
27390 This command must occur exactly once.
27391 If the resulting file format is PDF, you need to specify the format
27392 \begin_inset Flex Code
27395 \begin_layout Plain Layout
27402 This is the PDF format used for including graphics.
27403 The other defined PDF formats are for document export.
27406 \begin_layout Description
27407 \begin_inset Flex Code
27410 \begin_layout Plain Layout
27412 \begin_inset space ~
27420 The file name of the converted file.
27421 The file name must be absolute.
27422 This command must occur exactly once.
27425 \begin_layout Subsection
27426 Preamble definitions
27429 \begin_layout Standard
27430 The external template configuration file may contain additional preamble
27431 definitions enclosed by
27432 \begin_inset Flex Code
27435 \begin_layout Plain Layout
27443 \begin_inset Flex Code
27446 \begin_layout Plain Layout
27453 They can be used by the templates in the
27454 \begin_inset Flex Code
27457 \begin_layout Plain Layout
27466 \begin_layout Section
27467 The substitution mechanism
27470 \begin_layout Standard
27471 When the external material facility invokes an external program, it is done
27472 on the basis of a command defined in the template configuration file.
27473 These commands can contain various macros that are expanded before execution.
27474 Execution always take place in the directory of the containing document.
27477 \begin_layout Standard
27478 Also, whenever external material is to be displayed, the name will be produced
27479 by the substitution mechanism, and most other commands in the template
27480 definition support substitution as well.
27483 \begin_layout Standard
27484 The available macros are the following:
27487 \begin_layout Description
27488 \begin_inset Flex Code
27491 \begin_layout Plain Layout
27492 $$AbsOrRelPathMaster
27497 The file path, absolute or relative to the master \SpecialChar LyX
27501 \begin_layout Description
27502 \begin_inset Flex Code
27505 \begin_layout Plain Layout
27506 $$AbsOrRelPathParent
27511 The file path, absolute or relative to the \SpecialChar LyX
27515 \begin_layout Description
27516 \begin_inset Flex Code
27519 \begin_layout Plain Layout
27525 The absolute file path.
27528 \begin_layout Description
27529 \begin_inset Flex Code
27532 \begin_layout Plain Layout
27538 The filename without path and without the extension.
27541 \begin_layout Description
27542 \begin_inset Flex Code
27545 \begin_layout Plain Layout
27547 \begin_inset Quotes eld
27551 \begin_inset Quotes erd
27559 This macro will expand to the contents of the file with the name
27560 \begin_inset Flex Code
27563 \begin_layout Plain Layout
27572 \begin_layout Description
27573 \begin_inset Flex Code
27576 \begin_layout Plain Layout
27582 The file extension (including the dot).
27585 \begin_layout Description
27586 \begin_inset Flex Code
27589 \begin_layout Plain Layout
27595 This will be the string
27596 \begin_inset Quotes eld
27600 \begin_inset Quotes erd
27603 if the file is in JPEG format, otherwise it will be the string
27604 \begin_inset Quotes eld
27608 \begin_inset Quotes erd
27612 This is useful to avoid uneeded conversions for output formats that support
27613 both PNG and JPEG fomats.
27614 The predefined RasterImage template uses this macro for the pdf\SpecialChar TeX
27619 \begin_layout Description
27620 \begin_inset Flex Code
27623 \begin_layout Plain Layout
27629 The filename of the file specified in the external material dialog.
27630 This is either an absolute name, or it is relative to the \SpecialChar LyX
27634 \begin_layout Description
27635 \begin_inset Flex Code
27638 \begin_layout Plain Layout
27645 \begin_inset Flex Code
27648 \begin_layout Plain Layout
27654 (absolute name or relative to the \SpecialChar LyX
27658 \begin_layout Description
27659 \begin_inset Flex Code
27662 \begin_layout Plain Layout
27668 The file path, relative to the master \SpecialChar LyX
27672 \begin_layout Description
27673 \begin_inset Flex Code
27676 \begin_layout Plain Layout
27682 The file path, relative to the \SpecialChar LyX
27686 \begin_layout Description
27687 \begin_inset Flex Code
27690 \begin_layout Plain Layout
27696 This macro will expand to the absolute path of the system directory.
27697 This is typically used to point to the various helper scripts that are
27698 bundled with \SpecialChar LyX
27702 \begin_layout Description
27703 \begin_inset Flex Code
27706 \begin_layout Plain Layout
27712 A name and full path to a temporary file which will be automatically deleted
27713 whenever the containing document is closed, or the external material insertion
27717 \begin_layout Standard
27718 All path macros contain a trailing directory separator, so you can construct
27720 \begin_inset space \thinspace{}
27724 \begin_inset space \space{}
27727 the absolute filename with
27728 \begin_inset Flex Code
27731 \begin_layout Plain Layout
27732 $$AbsPath$$Basename$$Extension
27740 \begin_layout Standard
27741 The macros above are substituted in all commands unless otherwise noted.
27743 \begin_inset Flex Code
27746 \begin_layout Plain Layout
27752 supports additionally the following substitutions if they are enabled by
27754 \begin_inset Flex Code
27757 \begin_layout Plain Layout
27764 \begin_inset Flex Code
27767 \begin_layout Plain Layout
27776 \begin_layout Description
27777 \begin_inset Flex Code
27780 \begin_layout Plain Layout
27786 The front part of the resize command.
27789 \begin_layout Description
27790 \begin_inset Flex Code
27793 \begin_layout Plain Layout
27799 The back part of the resize command.
27802 \begin_layout Description
27803 \begin_inset Flex Code
27806 \begin_layout Plain Layout
27812 The front part of the rotation command.
27815 \begin_layout Description
27816 \begin_inset Flex Code
27819 \begin_layout Plain Layout
27825 The back part of the rotation command.
27828 \begin_layout Standard
27829 The value string of the
27830 \begin_inset Flex Code
27833 \begin_layout Plain Layout
27839 command supports additionally the following substitutions if they are enabled
27841 \begin_inset Flex Code
27844 \begin_layout Plain Layout
27851 \begin_inset Flex Code
27854 \begin_layout Plain Layout
27863 \begin_layout Description
27864 \begin_inset Flex Code
27867 \begin_layout Plain Layout
27876 \begin_layout Description
27877 \begin_inset Flex Code
27880 \begin_layout Plain Layout
27889 \begin_layout Description
27890 \begin_inset Flex Code
27893 \begin_layout Plain Layout
27902 \begin_layout Description
27903 \begin_inset Flex Code
27906 \begin_layout Plain Layout
27912 The rotation option.
27915 \begin_layout Standard
27916 You may ask why there are so many path macros.
27917 There are mainly two reasons:
27920 \begin_layout Enumerate
27921 Relative and absolute file names should remain relative or absolute, respectivel
27923 Users may have reasons to prefer either form.
27924 Relative names are useful for portable documents that should work on different
27925 machines, for example.
27926 Absolute names may be required by some programs.
27929 \begin_layout Enumerate
27931 treats relative file names differently than \SpecialChar LyX
27932 and other programs in nested
27934 For \SpecialChar LyX
27935 , a relative file name is always relative to the document that contains
27937 For \SpecialChar LaTeX
27938 , it is always relative to the master document.
27939 These two definitions are identical if you have only one document, but
27940 differ if you have a master document that includes part documents.
27941 That means that relative filenames must be transformed when presented to
27944 Fortunately \SpecialChar LyX
27945 does this automatically for you if you choose the right macros.
27948 \begin_layout Standard
27949 So which path macro should be used in new template definitions? The rule
27953 \begin_layout Itemize
27955 \begin_inset Flex Code
27958 \begin_layout Plain Layout
27964 if an absolute path is required.
27967 \begin_layout Itemize
27969 \begin_inset Flex Code
27972 \begin_layout Plain Layout
27973 $$AbsOrRelPathMaster
27978 if the substituted string is some kind of \SpecialChar LaTeX
27982 \begin_layout Itemize
27984 \begin_inset Flex Code
27987 \begin_layout Plain Layout
27988 $$AbsOrRelPathParent
27993 in order to preserve the user's choice.
27996 \begin_layout Standard
27997 There are special cases where this rule does not work and e.
27998 \begin_inset space \thinspace{}
28002 \begin_inset space \space{}
28005 relative names are needed, but normally it will work just fine.
28006 One example for such a case is the command
28007 \begin_inset Flex Code
28010 \begin_layout Plain Layout
28011 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
28016 in the XFig template above: We can't use the absolute name because the
28018 \begin_inset Flex Code
28021 \begin_layout Plain Layout
28027 files needs the relative name in order to rewrite the file content.
28030 \begin_layout Section
28031 Security discussion
28032 \begin_inset CommandInset label
28034 name "sec:Security-discussion"
28041 \begin_layout Standard
28042 The external material feature interfaces with a lot of external programs
28043 and does so automatically, so we have to consider the security implications
28045 In particular, since you have the option of including your own filenames
28046 and/or parameter strings and those are expanded into a command, it seems
28047 that it would be possible to create a malicious document which executes
28048 arbitrary commands when a user views or prints the document.
28049 This is something we definitely want to avoid.
28052 \begin_layout Standard
28053 However, since the external program commands are specified in the template
28054 configuration file only, there are no security issues if \SpecialChar LyX
28055 is properly configure
28056 d with safe templates only.
28057 This is so because the external programs are invoked with the
28058 \begin_inset Flex Code
28061 \begin_layout Plain Layout
28067 -system call rather than the
28068 \begin_inset Flex Code
28071 \begin_layout Plain Layout
28077 system-call, so it's not possible to execute arbitrary commands from the
28078 filename or parameter section via the shell.
28081 \begin_layout Standard
28082 This also implies that you are restricted in what command strings you can
28083 use in the external material templates.
28084 In particular, pipes and redirection are not readily available.
28085 This has to be so if \SpecialChar LyX
28086 should remain safe.
28087 If you want to use some of the shell features, you should write a safe
28088 script to do this in a controlled manner, and then invoke the script from
28089 the command string.
28093 \begin_layout Standard
28094 It is possible to design a template that interacts directly with the shell,
28095 but since this would allow a malicious user to execute arbitrary commands
28096 by writing clever filenames and/or parameters, we generally recommend that
28097 you only use safe scripts that work with the
28098 \begin_inset Flex Code
28101 \begin_layout Plain Layout
28107 system call in a controlled manner.
28108 Of course, for use in a controlled environment, it can be tempting to just
28109 fall back to use ordinary shell scripts.
28110 If you do so, be aware that you
28114 provide an easily exploitable security hole in your system.
28115 Of course it stands to reason that such unsafe templates will never be
28116 included in the standard \SpecialChar LyX
28117 distribution, although we do encourage people
28118 to submit new templates in the open source tradition.
28119 But \SpecialChar LyX
28120 as shipped from the official distribution channels will never have
28124 \begin_layout Standard
28125 Including external material provides a lot of power, and you have to be
28126 careful not to introduce security hazards with this power.
28127 A subtle error in a single line in an innocent looking script can open
28128 the door to huge security problems.
28129 So if you do not fully understand the issues, we recommend that you consult
28130 a knowledgeable security professional or the \SpecialChar LyX
28131 development team if you have
28132 any questions about whether a given template is safe or not.
28133 And do this before you use it in an uncontrolled environment.
28136 \begin_layout Chapter
28138 List of supported \SpecialChar LyX
28139 functions to be used in layouts
28140 \begin_inset CommandInset label
28142 name "chap:List-of-functions"
28149 \begin_layout Standard
28151 \begin_inset Tabular
28152 <lyxtabular version="3" rows="11" columns="8">
28153 <features tabularvalignment="middle">
28154 <column alignment="left" valignment="top">
28155 <column alignment="left" valignment="top">
28156 <column alignment="left" valignment="top">
28157 <column alignment="left" valignment="top">
28158 <column alignment="left" valignment="top">
28159 <column alignment="left" valignment="top">
28160 <column alignment="left" valignment="top">
28161 <column alignment="left" valignment="top">
28163 <cell alignment="left" valignment="top" usebox="none">
28166 \begin_layout Plain Layout
28172 <cell alignment="left" valignment="top" usebox="none">
28175 \begin_layout Plain Layout
28181 <cell alignment="left" valignment="top" usebox="none">
28184 \begin_layout Plain Layout
28190 <cell alignment="left" valignment="top" usebox="none">
28193 \begin_layout Plain Layout
28199 <cell alignment="center" valignment="top" usebox="none">
28202 \begin_layout Plain Layout
28208 <cell alignment="center" valignment="top" usebox="none">
28211 \begin_layout Plain Layout
28217 <cell alignment="center" valignment="top" usebox="none">
28220 \begin_layout Plain Layout
28226 <cell alignment="center" valignment="top" usebox="none">
28229 \begin_layout Plain Layout
28237 <cell alignment="left" valignment="top" usebox="none">
28240 \begin_layout Plain Layout
28246 <cell alignment="left" valignment="top" usebox="none">
28249 \begin_layout Plain Layout
28255 <cell alignment="left" valignment="top" usebox="none">
28258 \begin_layout Plain Layout
28264 <cell alignment="left" valignment="top" usebox="none">
28267 \begin_layout Plain Layout
28273 <cell alignment="center" valignment="top" usebox="none">
28276 \begin_layout Plain Layout
28282 <cell alignment="center" valignment="top" usebox="none">
28285 \begin_layout Plain Layout
28291 <cell alignment="center" valignment="top" usebox="none">
28294 \begin_layout Plain Layout
28300 <cell alignment="center" valignment="top" usebox="none">
28303 \begin_layout Plain Layout
28311 <cell alignment="left" valignment="top" usebox="none">
28314 \begin_layout Plain Layout
28320 <cell alignment="left" valignment="top" usebox="none">
28323 \begin_layout Plain Layout
28329 <cell alignment="left" valignment="top" usebox="none">
28332 \begin_layout Plain Layout
28338 <cell alignment="left" valignment="top" usebox="none">
28341 \begin_layout Plain Layout
28347 <cell alignment="center" valignment="top" usebox="none">
28350 \begin_layout Plain Layout
28356 <cell alignment="center" valignment="top" usebox="none">
28359 \begin_layout Plain Layout
28365 <cell alignment="center" valignment="top" usebox="none">
28368 \begin_layout Plain Layout
28374 <cell alignment="center" valignment="top" usebox="none">
28377 \begin_layout Plain Layout
28385 <cell alignment="left" valignment="top" usebox="none">
28388 \begin_layout Plain Layout
28394 <cell alignment="left" valignment="top" usebox="none">
28397 \begin_layout Plain Layout
28403 <cell alignment="left" valignment="top" usebox="none">
28406 \begin_layout Plain Layout
28412 <cell alignment="left" valignment="top" usebox="none">
28415 \begin_layout Plain Layout
28421 <cell alignment="center" valignment="top" usebox="none">
28424 \begin_layout Plain Layout
28430 <cell alignment="center" valignment="top" usebox="none">
28433 \begin_layout Plain Layout
28439 <cell alignment="center" valignment="top" usebox="none">
28442 \begin_layout Plain Layout
28448 <cell alignment="center" valignment="top" usebox="none">
28451 \begin_layout Plain Layout
28459 <cell alignment="left" valignment="top" usebox="none">
28462 \begin_layout Plain Layout
28468 <cell alignment="left" valignment="top" usebox="none">
28471 \begin_layout Plain Layout
28477 <cell alignment="left" valignment="top" usebox="none">
28480 \begin_layout Plain Layout
28486 <cell alignment="left" valignment="top" usebox="none">
28489 \begin_layout Plain Layout
28495 <cell alignment="center" valignment="top" usebox="none">
28498 \begin_layout Plain Layout
28504 <cell alignment="center" valignment="top" usebox="none">
28507 \begin_layout Plain Layout
28513 <cell alignment="center" valignment="top" usebox="none">
28516 \begin_layout Plain Layout
28522 <cell alignment="center" valignment="top" usebox="none">
28525 \begin_layout Plain Layout
28533 <cell alignment="left" valignment="top" usebox="none">
28536 \begin_layout Plain Layout
28542 <cell alignment="left" valignment="top" usebox="none">
28545 \begin_layout Plain Layout
28551 <cell alignment="left" valignment="top" usebox="none">
28554 \begin_layout Plain Layout
28560 <cell alignment="left" valignment="top" usebox="none">
28563 \begin_layout Plain Layout
28569 <cell alignment="center" valignment="top" usebox="none">
28572 \begin_layout Plain Layout
28578 <cell alignment="center" valignment="top" usebox="none">
28581 \begin_layout Plain Layout
28587 <cell alignment="center" valignment="top" usebox="none">
28590 \begin_layout Plain Layout
28596 <cell alignment="center" valignment="top" usebox="none">
28599 \begin_layout Plain Layout
28607 <cell alignment="left" valignment="top" usebox="none">
28610 \begin_layout Plain Layout
28616 <cell alignment="left" valignment="top" usebox="none">
28619 \begin_layout Plain Layout
28625 <cell alignment="left" valignment="top" usebox="none">
28628 \begin_layout Plain Layout
28634 <cell alignment="left" valignment="top" usebox="none">
28637 \begin_layout Plain Layout
28643 <cell alignment="center" valignment="top" usebox="none">
28646 \begin_layout Plain Layout
28652 <cell alignment="center" valignment="top" usebox="none">
28655 \begin_layout Plain Layout
28661 <cell alignment="center" valignment="top" usebox="none">
28664 \begin_layout Plain Layout
28670 <cell alignment="center" valignment="top" usebox="none">
28673 \begin_layout Plain Layout
28681 <cell alignment="left" valignment="top" usebox="none">
28684 \begin_layout Plain Layout
28690 <cell alignment="left" valignment="top" usebox="none">
28693 \begin_layout Plain Layout
28699 <cell alignment="left" valignment="top" usebox="none">
28702 \begin_layout Plain Layout
28708 <cell alignment="left" valignment="top" usebox="none">
28711 \begin_layout Plain Layout
28717 <cell alignment="center" valignment="top" usebox="none">
28720 \begin_layout Plain Layout
28726 <cell alignment="center" valignment="top" usebox="none">
28729 \begin_layout Plain Layout
28735 <cell alignment="center" valignment="top" usebox="none">
28738 \begin_layout Plain Layout
28744 <cell alignment="center" valignment="top" usebox="none">
28747 \begin_layout Plain Layout
28755 <cell alignment="left" valignment="top" usebox="none">
28758 \begin_layout Plain Layout
28764 <cell alignment="left" valignment="top" usebox="none">
28767 \begin_layout Plain Layout
28773 <cell alignment="left" valignment="top" usebox="none">
28776 \begin_layout Plain Layout
28782 <cell alignment="left" valignment="top" usebox="none">
28785 \begin_layout Plain Layout
28791 <cell alignment="center" valignment="top" usebox="none">
28794 \begin_layout Plain Layout
28800 <cell alignment="center" valignment="top" usebox="none">
28803 \begin_layout Plain Layout
28809 <cell alignment="center" valignment="top" usebox="none">
28812 \begin_layout Plain Layout
28818 <cell alignment="center" valignment="top" usebox="none">
28821 \begin_layout Plain Layout
28829 <cell alignment="left" valignment="top" usebox="none">
28832 \begin_layout Plain Layout
28838 <cell alignment="left" valignment="top" usebox="none">
28841 \begin_layout Plain Layout
28847 <cell alignment="left" valignment="top" usebox="none">
28850 \begin_layout Plain Layout
28856 <cell alignment="left" valignment="top" usebox="none">
28859 \begin_layout Plain Layout
28865 <cell alignment="center" valignment="top" usebox="none">
28868 \begin_layout Plain Layout
28874 <cell alignment="center" valignment="top" usebox="none">
28877 \begin_layout Plain Layout
28883 <cell alignment="center" valignment="top" usebox="none">
28886 \begin_layout Plain Layout
28892 <cell alignment="center" valignment="top" usebox="none">
28895 \begin_layout Plain Layout
28903 <cell alignment="center" valignment="top" usebox="none">
28906 \begin_layout Plain Layout
28912 <cell alignment="center" valignment="top" usebox="none">
28915 \begin_layout Plain Layout
28921 <cell alignment="center" valignment="top" usebox="none">
28924 \begin_layout Plain Layout
28930 <cell alignment="center" valignment="top" usebox="none">
28933 \begin_layout Plain Layout
28939 <cell alignment="center" valignment="top" usebox="none">
28942 \begin_layout Plain Layout
28948 <cell alignment="center" valignment="top" usebox="none">
28951 \begin_layout Plain Layout
28957 <cell alignment="center" valignment="top" usebox="none">
28960 \begin_layout Plain Layout
28966 <cell alignment="center" valignment="top" usebox="none">
28969 \begin_layout Plain Layout
28983 \begin_layout Chapter
28984 Names of available colors to be used in layouts
28985 \begin_inset CommandInset label
28987 name "chap:Names-of-colors"
28994 \begin_layout Standard
28995 The colors listed below are the standard colors and those that you can adjust
28996 in the \SpecialChar LyX
29000 \begin_layout Section
29004 \begin_layout Standard
29005 The following are no real colors, but rather act on color definitions:
29008 \begin_layout Description
29009 ignore The color is ignored
29012 \begin_layout Description
29013 inherit The color is inherited
29016 \begin_layout Description
29029 No particular color – clear or default
29032 \begin_layout Section
29036 \begin_layout Standard
29037 These are fixed colors that cannot me customized:
29040 \begin_layout Description
29044 \begin_layout Description
29048 \begin_layout Description
29052 \begin_layout Description
29056 \begin_layout Description
29060 \begin_layout Description
29064 \begin_layout Description
29068 \begin_layout Description
29072 \begin_layout Description
29076 \begin_layout Description
29080 \begin_layout Description
29084 \begin_layout Description
29088 \begin_layout Description
29092 \begin_layout Description
29096 \begin_layout Description
29100 \begin_layout Description
29104 \begin_layout Description
29108 \begin_layout Description
29112 \begin_layout Description
29116 \begin_layout Section
29120 \begin_layout Standard
29121 These are the colors allocated to specific elements in
29124 arg "dialog-show prefs"
29130 \begin_layout Description
29131 added_space Added space color
29134 \begin_layout Description
29135 addedtext Added text color
29138 \begin_layout Description
29139 appendix Appendix marker color
29142 \begin_layout Description
29143 background Background color
29146 \begin_layout Description
29147 bottomarea Bottom area color
29150 \begin_layout Description
29151 branchlabel Label color for branches
29154 \begin_layout Description
29155 buttonbg Color used for button background
29158 \begin_layout Description
29159 buttonframe Color for inset button frames
29162 \begin_layout Description
29163 buttonhoverbg Color used for button background under focus
29166 \begin_layout Description
29167 changebar Changebar color
29170 \begin_layout Description
29171 changedtextauthor1 Changed text color author 1
29174 \begin_layout Description
29175 changedtextauthor2 Changed text color author 2
29178 \begin_layout Description
29179 changedtextauthor3 Changed text color author 3
29182 \begin_layout Description
29183 changedtextauthor4 Changed text color author 4
29186 \begin_layout Description
29187 changedtextauthor5 Changed text color author 5
29190 \begin_layout Description
29191 collapsible Collapsible insets text color
29194 \begin_layout Description
29195 collapsibleframe Collapsible insets framecolor
29198 \begin_layout Description
29199 command Text color for command insets
29202 \begin_layout Description
29203 commandbg Background color for command insets
29206 \begin_layout Description
29207 commandframe Frame color for command insets
29210 \begin_layout Description
29211 comment Label color for comments
29214 \begin_layout Description
29215 commentbg Background color of comments
29218 \begin_layout Description
29219 cursor Cursor color
29222 \begin_layout Description
29223 deletedtext Deleted text color
29226 \begin_layout Description
29227 deletedtextmodifier Deleted text modifying color
29230 \begin_layout Description
29231 depthbar Color for the depth bars in the margin
29234 \begin_layout Description
29235 eolmarker End of line marker color
29238 \begin_layout Description
29239 error Color of the \SpecialChar LaTeX
29243 \begin_layout Description
29244 footlabel Label color for footnotes
29247 \begin_layout Description
29248 foreground Foreground color
29251 \begin_layout Description
29252 graphicsbg Graphics inset background color
29255 \begin_layout Description
29256 greyedoutbg Background color of greyedout inset
29259 \begin_layout Description
29260 greyedoutlabel Label color for greyedout insets
29263 \begin_layout Description
29264 greyedouttext Color for greyedout inset text
29267 \begin_layout Description
29268 indexlabel Label color for index insets
29271 \begin_layout Description
29272 inlinecompletion Inline completion color
29275 \begin_layout Description
29276 insetbg Inset marker background color
29279 \begin_layout Description
29280 insetframe Inset marker frame color
29283 \begin_layout Description
29284 language Color for marking foreign language words
29287 \begin_layout Description
29288 latex Text color in \SpecialChar LaTeX
29292 \begin_layout Description
29293 listingsbg Background color of listings inset
29296 \begin_layout Description
29297 marginlabel Label color for margin notes
29300 \begin_layout Description
29301 math Math inset text color
29304 \begin_layout Description
29305 mathbg Math inset background color
29308 \begin_layout Description
29309 mathcorners Math inset frame color not under focus
29312 \begin_layout Description
29313 mathframe Math inset frame color under focus
29316 \begin_layout Description
29317 mathline Math line color
29320 \begin_layout Description
29321 mathmacrobg Macro math inset background color
29324 \begin_layout Description
29325 mathmacroblend Macro math blended color
29328 \begin_layout Description
29329 mathmacroframe Macro math frame color
29332 \begin_layout Description
29333 mathmacrohoverbg Macro math inset background color hovered
29336 \begin_layout Description
29337 mathmacrolabel Macro math label color
29340 \begin_layout Description
29341 mathmacronewarg Macro template color for new parameters
29344 \begin_layout Description
29345 mathmacrooldarg Macro template color for old parameters
29348 \begin_layout Description
29349 newpage New page color
29352 \begin_layout Description
29353 nonunique_inlinecompletion Inline completion color for the non-unique part
29356 \begin_layout Description
29357 note Label color for notes
29360 \begin_layout Description
29361 notebg Background color of notes
29364 \begin_layout Description
29365 pagebreak Page break/line break color
29368 \begin_layout Description
29369 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
29372 \begin_layout Description
29373 phantomtext Text color for phantom insets
29376 \begin_layout Description
29377 preview The color used for previews
29380 \begin_layout Description
29381 previewframe Preview frame color
29384 \begin_layout Description
29385 regexpframe Color for regexp frame
29388 \begin_layout Description
29389 scroll Color that indicates when a row can be scrolled
29392 \begin_layout Description
29393 selection Background color of selected text
29396 \begin_layout Description
29397 selectiontext Foreground color of selected text
29400 \begin_layout Description
29401 shadedbg Background color of shaded box
29404 \begin_layout Description
29405 special Special chars text color
29408 \begin_layout Description
29409 tabularline Table line color
29412 \begin_layout Description
29413 tabularonoffline Table line color
29416 \begin_layout Description
29417 urllabel Label color for URL insets
29420 \begin_layout Description
29421 urltext Color for URL inset text