]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Customization.lyx
Correct shortcut
[lyx.git] / lib / doc / Customization.lyx
index f0b6228b0defa93a5eba8d153f72bcf1a064f89b..abca3e188bc170e3a3c8f6a1fe27b6d9ba9954c7 100644 (file)
@@ -1,5 +1,5 @@
 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
-\lyxformat 374
+\lyxformat 381
 \begin_document
 \begin_header
 \textclass scrbook
@@ -45,6 +45,7 @@
 \begin_modules
 logicalmkup
 \end_modules
+\maintain_unincluded_children false
 \begin_local_layout
 Format 7
 InsetLayout CharStyle:MenuItem
@@ -123,7 +124,7 @@ End
 \paperpagestyle headings
 \tracking_changes false
 \output_changes false
-\html_use_mathml true
+\html_math_output 0
 \html_be_strict true
 \end_header
 
@@ -5305,8 +5306,9 @@ article.cls
 
 \end_inset
 
-, is contained in layout files.
+, is contained in `layout files'.
  Similarly, LyX itself does not know much about DocBook or XHTML.
+ What it knows is contained in layout files.
 \end_layout
 
 \begin_layout Standard
@@ -6415,7 +6417,7 @@ DeclareLyXModule{My Package}
 \end_layout
 
 \begin_layout LyX-Code
-Format 20
+Format 21
 \begin_inset Newline newline
 \end_inset
 
@@ -6875,7 +6877,7 @@ default
 \end_layout
 
 \begin_layout Subsection
-The Document Class Declaration
+The document class declaration
 \end_layout
 
 \begin_layout Standard
@@ -7269,7 +7271,7 @@ While we're giving advice: make regular backups.
 \end_layout
 
 \begin_layout Subsection
-The Module Declaration
+The Module declaration
 \end_layout
 
 \begin_layout Standard
@@ -7505,12 +7507,12 @@ int
 This tag was introduced with LyX 1.4.0.
  Layout files from LyX 1.3.x and earlier don't have an explicit file format
  and are considered to be of format 1.
- The format for the present version of LyX is format 20.
+ The format for the present version of LyX is format 21.
  But each version of LyX is capable of reading earlier versions' layout
  files, just as they are capable of reading files produced by earlier versions
  of LyX.
  There is, however, no provision for converting to earlier formats.
- So LyX 1.6.x will not read layout files in format 20 but only files in format
+ So LyX 1.6.x will not read layout files in format 21 but only files in format
  11 or earlier.
 \end_layout
 
@@ -7625,6 +7627,46 @@ EndPreamble
 \end_inset
 
 
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+CiteFormat
+\end_layout
+
+\end_inset
+
+ Defines formats for use in the display of bibliographic information.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Citation-format-description"
+
+\end_inset
+
+ for details.
+ Must end with 
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+End
+\end_layout
+
+\end_inset
+
+
 \begin_inset Quotes erd
 \end_inset
 
@@ -8081,6 +8123,33 @@ EndPreamble
 \begin_inset Flex CharStyle:Code
 status collapsed
 
+\begin_layout Plain Layout
+HTMLTOCSection
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] The layout to use for the table of contents, bibliography, and so forth,
+ when the document is output to HTML.
+ For articles, this should normally be Section; for books, Chapter.
+ If it is not given, then LyX will attempt to figure out which layout to
+ use.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
 \begin_layout Plain Layout
 IfCounter
 \end_layout
@@ -8387,8 +8456,6 @@ PageStyle
 \end_inset
 
  [
-\emph on
-
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -8400,8 +8467,6 @@ plain
 
 \end_inset
 
-
-\emph default
 , 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -8772,8 +8837,6 @@ Sides
 \end_inset
 
  [
-\emph on
-
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -8785,8 +8848,6 @@ status collapsed
 
 \end_inset
 
-
-\emph default
 , 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -9244,7 +9305,7 @@ End
 \end_layout
 
 \begin_layout Subsection
-Paragraph Styles
+Paragraph styles
 \begin_inset CommandInset label
 LatexCommand label
 name "sub:Paragraph-Styles"
@@ -9923,8 +9984,6 @@ name "des:FreeSpacing"
 \end_inset
 
 [
-\emph on
-
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -9936,8 +9995,6 @@ status collapsed
 
 \end_inset
 
-
-\emph default
 , 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -10152,8 +10209,6 @@ name "des:KeepEmpty"
 \end_inset
 
 [
-\emph on
-
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -10165,8 +10220,6 @@ status collapsed
 
 \end_inset
 
-
-\emph default
 , 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -12022,8 +12075,6 @@ name "des:PathThru"
 \end_inset
 
 [
-\emph on
-
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -12035,8 +12086,6 @@ status collapsed
 
 \end_inset
 
-
-\emph default
 , 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -12096,13 +12145,38 @@ EndPreamble
 \begin_inset Flex CharStyle:Code
 status collapsed
 
+\begin_layout Plain Layout
+RefPrefix
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] The prefix to use when creating labels referring to paragraphs of this
+ type.
+ This allows the use of formatted references.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
 \begin_layout Plain Layout
 Requires 
 \end_layout
 
 \end_inset
 
-[
+ [
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -12285,6 +12359,42 @@ setspace.sty
 \begin_inset Flex CharStyle:Code
 status collapsed
 
+\begin_layout Plain Layout
+Spellcheck
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+1
+\end_layout
+
+\end_inset
+
+] Spellcheck paragraphs of this style.
+ Default is true.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
 \begin_layout Plain Layout
 TextFont
 \end_layout
@@ -12487,65 +12597,80 @@ string
 status collapsed
 
 \begin_layout Plain Layout
-LaTeXBuiltin
+HTML*
 \end_layout
 
 \end_inset
 
- [
-\begin_inset Flex CharStyle:Code
-status collapsed
+ These are used for XHTML output.
+ See 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tags-for-XHTML"
 
-\begin_layout Plain Layout
+\end_inset
 
-\emph on
-0
+.
 \end_layout
 
-\end_inset
-
-, 
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-1
+ListCommand
 \end_layout
 
 \end_inset
 
-] Set to 
+ [
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-1
+string
 \end_layout
 
 \end_inset
 
- if the float is already defined by the LaTeX document class.
- If this is set to 
+=
+\begin_inset Quotes erd
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+] The command used to generate a list of floats of this type; the leading
+ `
+\backslash
+' should be omitted.
+ This 
+\emph on
+must
+\emph default
+ be given if 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-0
+NeedsFloatPkg
 \end_layout
 
 \end_inset
 
-, the float will be defined using the LaTeX package 
+ is false, since there is no standard way to generate this command.
+ It is ignored if 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-float
+NeedsFloatPkg
 \end_layout
 
 \end_inset
 
-.
+ is true, since in that case there is a standard way.
 \end_layout
 
 \begin_layout Description
@@ -12576,8 +12701,89 @@ string
 \begin_inset Quotes erd
 \end_inset
 
-] The heading used for the list of floats.
- This is translated to the document language.
+] A title for a list of floats of this kind (list of figures, tables, or
+ whatever).
+ It is used for the screen label within LyX; it is passed to LaTeX for use
+ as the title there; and it is used as the title in XHTML output.
+ It will be translated to the document language.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+NeedsFloatPkg
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status open
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+1
+\end_layout
+
+\end_inset
+
+] Indicates whether the float is already defined in the document class or
+ if we instead need to load 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+float.sty
+\end_layout
+
+\end_inset
+
+ and use what it provides.
+ The default is 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+, which means: use 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+float.sty
+\end_layout
+
+\end_inset
+
+.
+ It should be set to 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+ if the float is already defined by the LaTeX document class.
 \end_layout
 
 \begin_layout Description
@@ -12761,7 +12967,7 @@ tbp
 status collapsed
 
 \begin_layout Plain Layout
-Style
+RefPrefix
 \end_layout
 
 \end_inset
@@ -12776,15 +12982,39 @@ string
 
 \end_inset
 
-=
-\begin_inset Quotes erd
-\end_inset
-
-
-\begin_inset Quotes erd
-\end_inset
+] The prefix to use when creating labels referring to floats of this type.
+ This allows the use of formatted references.
+\end_layout
 
-] The style used when defining the float using 
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Style
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+=
+\begin_inset Quotes erd
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+] The style used when defining the float using 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -13878,7 +14108,7 @@ reference "des:LatexType"
 status collapsed
 
 \begin_layout Plain Layout
-LyxType 
+LyxType
 \end_layout
 
 \end_inset
@@ -13926,6 +14156,62 @@ end
  (indicating a dummy definition ending definitions of charstyles, etc).
  This entry is required in and is only meaningful for Flex insets.
  Among other things, it determines on which menu this inset will appear.
+ Setting 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LyXType
+\end_layout
+
+\end_inset
+
+ to 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+charstyle
+\end_layout
+
+\end_inset
+
+ will set 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+MultiPar
+\end_layout
+
+\end_inset
+
+ to false.
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+MultiPar
+\end_layout
+
+\end_inset
+
+ can be set to true for charstyle insets, if you wish, by setting it 
+\emph on
+after
+\emph default
+ you set the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LyXType
+\end_layout
+
+\end_inset
+
+.
 \end_layout
 
 \begin_layout Description
@@ -14120,7 +14406,31 @@ reference "des:Preamble"
 status collapsed
 
 \begin_layout Plain Layout
-Requires 
+RefPrefix
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] The prefix to use when creating labels referring to insets of this type.
+ This allows the use of formatted references.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Requires
 \end_layout
 
 \end_inset
@@ -14145,6 +14455,42 @@ reference "des:Requires"
 ).
 \end_layout
 
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Spellcheck
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+1
+\end_layout
+
+\end_inset
+
+] Spellcheck the contents of this inset.
+ Default is true.
+\end_layout
+
 \begin_layout Subsection
 Counters
 \begin_inset CommandInset label
@@ -14246,12 +14592,30 @@ End
 status collapsed
 
 \begin_layout Plain Layout
-LabelString [string=""]
+LabelString
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
 \end_layout
 
 \end_inset
 
- when this is defined, this string defines how the counter is displayed.
+=
+\begin_inset Quotes erd
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+] When defined, this string defines how the counter is displayed.
  Setting this value sets 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -14510,12 +14874,30 @@ arabic{counter}
 status collapsed
 
 \begin_layout Plain Layout
-LabelStringAppendix [string=""]
+LabelStringAppendix
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
 \end_layout
 
 \end_inset
 
- Same as 
+=
+\begin_inset Quotes erd
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+] Same as 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -14532,6 +14914,58 @@ LabelString
 \begin_inset Flex CharStyle:Code
 status collapsed
 
+\begin_layout Plain Layout
+PrettyFormat
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+=
+\begin_inset Quotes erd
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+] A format for use with formatted references to this counter.
+ For example, one might want to have references to section numbers appear
+ as 
+\begin_inset Quotes eld
+\end_inset
+
+Section 2.4
+\begin_inset Quotes erd
+\end_inset
+
+.
+ The string should contain 
+\begin_inset Quotes eld
+\end_inset
+
+##
+\begin_inset Quotes erd
+\end_inset
+
+.
+ This will be replaced by the counter number itself.
+ So, for sections, it would be: Section ##.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
 \begin_layout Plain Layout
 Within
 \end_layout
@@ -14734,8 +15168,6 @@ Family
 \end_inset
 
  [
-\emph on
-
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -14747,8 +15179,6 @@ Roman
 
 \end_inset
 
-
-\emph default
 , 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -14906,8 +15336,6 @@ Series
 \end_inset
 
  [
-\emph on
-
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -14919,8 +15347,6 @@ Medium
 
 \end_inset
 
-
-\emph default
 , 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -14945,8 +15371,6 @@ Shape
 \end_inset
 
  [
-\emph on
-
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -14958,8 +15382,6 @@ Up
 
 \end_inset
 
-
-\emph default
 , 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -15088,363 +15510,1032 @@ giant
 ]
 \end_layout
 
-\begin_layout Section
+\begin_layout Subsection
 \begin_inset CommandInset label
 LatexCommand label
-name "sec:Tags-for-XHTML"
+name "sub:Citation-format-description"
 
 \end_inset
 
-Tags for XHTML output
+Citation format description
 \end_layout
 
 \begin_layout Standard
-As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
- by layout information.
- In general, LyX provides sensible defaults and, as mentioned earlier, it
- will even construct default CSS style rules from the other layout tags.
- For example, LyX will attempt to use the information provided in the 
+The 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-Font
+CiteFormat
 \end_layout
 
 \end_inset
 
- declaration for the Chapter style to write CSS that will appropriately
- format chapter headings.
+ blocks are used to describe how bibliographic information should be displayed,
+ both within LyX itself (in the citation dialog and in tooltips, for example)
+ and in XHTML output.
+ Such a block might look like this:
 \end_layout
 
-\begin_layout Standard
-In many cases, then, you may not have to do anything at all to get acceptable
- XHTML output for your own environments, custom insets, and so forth.
- But in some cases you will, and so LyX provides a number of layout tags
- that can be used to customize the XHTML and CSS that are generated.
+\begin_layout LyX-Code
+CiteFormat
 \end_layout
 
-\begin_layout Standard
-Note that there are two tags, 
-\begin_inset Flex CharStyle:Code
-status collapsed
+\begin_layout LyX-Code
+ article ...
+\end_layout
 
-\begin_layout Plain Layout
-HTMLPreamble
+\begin_layout LyX-Code
+ book ...
 \end_layout
 
-\end_inset
+\begin_layout LyX-Code
+End
+\end_layout
 
- and 
+\begin_layout Standard
+The individual lines define how the bibliographic information associated
+ with an article or book, respectively, is to be displayed, and such a definitio
+n can be given for any `entry type' that might be present in a BibTeX file.
+ LyX defines a default format in the source code that will be used if no
+ specific definition has been given.
+ LyX predefines several formats in the file 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-AddToHTMLPreamble
+stdciteformats.inc
 \end_layout
 
 \end_inset
 
- that may appear outside style and inset declarations.
- See 
-\begin_inset CommandInset ref
-LatexCommand prettyref
-reference "sub:General-text-class"
+, which is included in most of LyX's document classes.
+\end_layout
+
+\begin_layout Standard
+The definitions use a simple language that allows BibTeX keys to be replaced
+ with their values.
+ Keys should be enclosed in % signs, e.g.: 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+%author%
+\end_layout
 
 \end_inset
 
- for details on these.
+.
+ So a simple definition might look like this:
 \end_layout
 
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sub:Paragraph-Style-XHTML"
+\begin_layout LyX-Code
+misc %author%, 
+\begin_inset Quotes eld
+\end_inset
 
+%title
+\begin_inset Quotes erd
 \end_inset
 
-Paragraph styles
+.
 \end_layout
 
 \begin_layout Standard
-The sort of XHTML LyX outputs for a paragraph depends upon whether we are
- dealing with a normal paragraph, a command, or an environment, where this
- is itself determined by the contents of the corresponding 
+This would print the author, followed by a comma, followed by the title,
+ in quotes, followed by a period.
+\end_layout
+
+\begin_layout Standard
+Of course, sometimes you may want to print a key only if it exists.
+ This can be done by using a conditional construction, such as: 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-LaTeXType
+{%volume%[[vol.
+\begin_inset space ~
+\end_inset
+
+%volume%]]}
 \end_layout
 
 \end_inset
 
- tag.
-\end_layout
+.
+ This says: If the 
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-\begin_layout Standard
-For a command or normal paragraph, the output XHTML has the following form:
+\begin_layout Plain Layout
+volume
 \end_layout
 
-\begin_layout LyX-Code
-<tag attr=
-\begin_inset Quotes erd
 \end_inset
 
-value
-\begin_inset Quotes erd
+ key exists, then print 
+\begin_inset Quotes eld
 \end_inset
 
->
-\end_layout
-
-\begin_layout LyX-Code
-<labeltag attr=
-\begin_inset Quotes erd
+vol.
+\begin_inset space ~
 \end_inset
 
-value
+
 \begin_inset Quotes erd
 \end_inset
 
->Label</labeltag>
-\end_layout
+ followed by the volume key.
+ It is also possible to have an else clause in the conditional, such as:
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-\begin_layout LyX-Code
-Contents of the paragraph.
+\begin_layout Plain Layout
+{%author%[[%author%]][[%editor%, ed.]]}
 \end_layout
 
-\begin_layout LyX-Code
-</tag>
-\end_layout
+\end_inset
 
-\begin_layout Standard
-The label tags are of course omitted if the paragraph does not have a label.
-\end_layout
+.
+ Here, the 
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-\begin_layout Standard
-For an environment that is not some sort of list, the XHTML takes this form:
+\begin_layout Plain Layout
+author
 \end_layout
 
-\begin_layout LyX-Code
-<tag attr=
-\begin_inset Quotes erd
 \end_inset
 
-value
-\begin_inset Quotes erd
+ key is printed if it exists; otherwise, the editor key is printed, followed
+ by 
+\begin_inset Quotes eld
 \end_inset
 
->
-\end_layout
-
-\begin_layout LyX-Code
-<itemtag attr=
-\begin_inset Quotes erd
+,
+\begin_inset space ~
 \end_inset
 
-value
+ed.
 \begin_inset Quotes erd
 \end_inset
 
-><labeltag attr=
-\begin_inset Quotes erd
+ Note that the key is again enclosed in % signs; the entire conditional
+ is enclosed in braces; and the if and else clauses are enclosed in double
+ brackets, 
+\begin_inset Quotes eld
 \end_inset
 
-value
-\begin_inset Quotes erd
+[[
+\begin_inset Quotes eld
 \end_inset
 
->Environment Label</labeltag>First paragraph.</itemtag>
-\end_layout
+ and 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout LyX-Code
-<itemtag>Second paragraph.</itemtag>
-\end_layout
+]]
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout LyX-Code
-</tag>
+.
+ There must be no space between any of these.
 \end_layout
 
 \begin_layout Standard
-Note that the label is output only for the first paragraph, as it should
- be for a theorem, for example.
-\end_layout
+There is one other piece of syntax available in definitions, which looks
+ like this: 
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-\begin_layout Standard
-For a list, we have one of these forms:
+\begin_layout Plain Layout
+{!<i>!}
 \end_layout
 
-\begin_layout LyX-Code
-<tag attr=
-\begin_inset Quotes erd
 \end_inset
 
-value
+.
+ This defines a piece of formatting information that is to be used when
+ creating 
+\begin_inset Quotes eld
+\end_inset
+
+rich text
 \begin_inset Quotes erd
 \end_inset
 
->
-\end_layout
+.
+ Obviously, we do not want to output HTML tags when writing plain text,
+ so they should be wrapped in 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout LyX-Code
-<itemtag attr=
+{!
 \begin_inset Quotes erd
 \end_inset
 
-value
-\begin_inset Quotes erd
+ and 
+\begin_inset Quotes eld
 \end_inset
 
-><labeltag attr=
+!}
 \begin_inset Quotes erd
 \end_inset
 
-value
-\begin_inset Quotes erd
+.
+\end_layout
+
+\begin_layout Standard
+Two special sorts of definitions are also possible in a 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+CiteFormat
+\end_layout
+
 \end_inset
 
->List Label</labeltag>First item.</itemtag>
+ block.
+ An example of the first would be:
 \end_layout
 
 \begin_layout LyX-Code
-<itemtag attr=
-\begin_inset Quotes erd
+!quotetitle 
+\begin_inset Quotes eld
 \end_inset
 
-value
+%title%
 \begin_inset Quotes erd
 \end_inset
 
-><labeltag attr=
-\begin_inset Quotes erd
+
+\end_layout
+
+\begin_layout Standard
+This is an abbreviation, or macro, and it can be used by treating it as
+ if it were a key: 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+%!quotetitle%
+\end_layout
+
 \end_inset
 
-value
-\begin_inset Quotes erd
+.
+ LyX will treat 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+%!quotetitle%
+\end_layout
+
 \end_inset
 
->List Label</labeltag>Second item.</itemtag>
+ exactly as it would treat its definition.
+ So, let us issue the obvious 
+\emph on
+warning
+\emph default
+.
+ Do not do this:
 \end_layout
 
 \begin_layout LyX-Code
-</tag>
+!funfun %funfun%
 \end_layout
 
-\begin_layout LyX-Code
+\begin_layout Standard
+or anything like it.
+ LyX shouldn't go into an infinite loop, but it may go into a long one before
+ it gives up.
+\end_layout
 
+\begin_layout Standard
+The second sort of special definition might look like this:
 \end_layout
 
 \begin_layout LyX-Code
-<tag attr=
-\begin_inset Quotes erd
+_pptext pp.
+\end_layout
+
+\begin_layout Standard
+This defines a translatable piece of text, which allows relevant parts of
+ the bibliography to be translated.
+ It can be included in a definition by treating it as a key: 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+%_pptext%
+\end_layout
+
 \end_inset
 
-value
-\begin_inset Quotes erd
+.
+ Several of these are predefined in 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+stdciteformats.inc
+\end_layout
+
 \end_inset
 
->
+.
+ Note that these are not macros, in the sense just defined.
+ They will not be expanded.
+\end_layout
+
+\begin_layout Standard
+So here then is an example that use all these features:
 \end_layout
 
 \begin_layout LyX-Code
-<labeltag attr=
-\begin_inset Quotes erd
+!authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
+\end_layout
+
+\begin_layout Standard
+The defines a macro that prints the author, followed by a comma, if the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+author
+\end_layout
+
 \end_inset
 
-value
+ key is defined, or else prints the name of the editor, followed by the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+_edtext
+\end_layout
+
+\end_inset
+
+ or its translation (it is by default 
+\begin_inset Quotes eld
+\end_inset
+
+ed.
 \begin_inset Quotes erd
 \end_inset
 
->List Label</labeltag><itemtag attr=
-\begin_inset Quotes erd
+), if the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+editor
+\end_layout
+
+\end_inset
+
+ key is defined.
+ Note that this is in fact defined in 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+stdciteformats.inc
+\end_layout
+
+\end_inset
+
+, so you can use it in your own definitions, or re-definitions, if you load
+ that file first.
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tags-for-XHTML"
+
+\end_inset
+
+Tags for XHTML output
+\end_layout
+
+\begin_layout Standard
+As with LaTeX or DocBook, the format of LyX's XHTML output is also controlled
+ by layout information.
+ In general, LyX provides sensible defaults and, as mentioned earlier, it
+ will even construct default CSS style rules from the other layout tags.
+ For example, LyX will attempt to use the information provided in the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Font
+\end_layout
+
+\end_inset
+
+ declaration for the Chapter style to write CSS that will appropriately
+ format chapter headings.
+\end_layout
+
+\begin_layout Standard
+In many cases, then, you may not have to do anything at all to get acceptable
+ XHTML output for your own environments, custom insets, and so forth.
+ But in some cases you will, and so LyX provides a number of layout tags
+ that can be used to customize the XHTML and CSS that are generated.
+\end_layout
+
+\begin_layout Standard
+Note that there are two tags, 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLPreamble
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+AddToHTMLPreamble
+\end_layout
+
+\end_inset
+
+ that may appear outside style and inset declarations.
+ See 
+\begin_inset CommandInset ref
+LatexCommand prettyref
+reference "sub:General-text-class"
+
+\end_inset
+
+ for details on these.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Paragraph-Style-XHTML"
+
+\end_inset
+
+Paragraph styles
+\end_layout
+
+\begin_layout Standard
+The sort of XHTML LyX outputs for a paragraph depends upon whether we are
+ dealing with a normal paragraph, a command, or an environment, where this
+ is itself determined by the contents of the corresponding 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LaTeXType
+\end_layout
+
+\end_inset
+
+ tag.
+\end_layout
+
+\begin_layout Standard
+For a command or normal paragraph, the output XHTML has the following form:
+\end_layout
+
+\begin_layout LyX-Code
+<tag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>
+\end_layout
+
+\begin_layout LyX-Code
+<labeltag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>Label</labeltag>
+\end_layout
+
+\begin_layout LyX-Code
+Contents of the paragraph.
+\end_layout
+
+\begin_layout LyX-Code
+</tag>
+\end_layout
+
+\begin_layout Standard
+The label tags are of course omitted if the paragraph does not have a label.
+\end_layout
+
+\begin_layout Standard
+For an environment that is not some sort of list, the XHTML takes this form:
+\end_layout
+
+\begin_layout LyX-Code
+<tag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>
+\end_layout
+
+\begin_layout LyX-Code
+<itemtag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+><labeltag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>Environment Label</labeltag>First paragraph.</itemtag>
+\end_layout
+
+\begin_layout LyX-Code
+<itemtag>Second paragraph.</itemtag>
+\end_layout
+
+\begin_layout LyX-Code
+</tag>
+\end_layout
+
+\begin_layout Standard
+Note that the label is output only for the first paragraph, as it should
+ be for a theorem, for example.
+\end_layout
+
+\begin_layout Standard
+For a list, we have one of these forms:
+\end_layout
+
+\begin_layout LyX-Code
+<tag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>
+\end_layout
+
+\begin_layout LyX-Code
+<itemtag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+><labeltag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>List Label</labeltag>First item.</itemtag>
+\end_layout
+
+\begin_layout LyX-Code
+<itemtag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+><labeltag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>List Label</labeltag>Second item.</itemtag>
+\end_layout
+
+\begin_layout LyX-Code
+</tag>
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+<tag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>
+\end_layout
+
+\begin_layout LyX-Code
+<labeltag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>List Label</labeltag><itemtag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>First item.</itemtag>
+\end_layout
+
+\begin_layout LyX-Code
+<labeltag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>List Label</labeltag><itemtag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>Second item.</itemtag>
+\end_layout
+
+\begin_layout LyX-Code
+</tag>
+\end_layout
+
+\begin_layout Standard
+Note the different orders of 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+labeltag
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+itemtag
+\end_layout
+
+\end_inset
+
+.
+ Which order we get depends upon the setting of 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLLabelFirst
+\end_layout
+
+\end_inset
+
+: If 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLLabelFirst
+\end_layout
+
+\end_inset
+
+ is false (the default), you get the first of these, with the label within
+ the item; if true, you get the second, with the label outside the item.
+\end_layout
+
+\begin_layout Standard
+The specific tags and attributes output for each paragraph type can be controlle
+d by means of the layout tags we are about to describe.
+ As mentioned earlier, however, LyX uses sensible defaults for many of these,
+ so you often may not need to do very much to get good XHTML output.
+ Think of the available tags as there so you can tweak things to your liking.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLAttr
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] Specifies attribute information to be output with the main tag.
+ For example, 
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+class=`mydiv'
+\end_layout
+
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ By default, LyX will output 
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+class=`layoutname'
+\end_layout
+
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+, where 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+layoutname
+\end_layout
+
+\end_inset
+
+ is the LyX name of the layout, made lowercase, for example: chapter.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLForceCSS
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\emph default
+,1
+\end_layout
+
+\end_inset
+
+] Whether to output the default CSS information LyX generates for this layout,
+ even if additional information is explicitly provided via 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLStyle
+\end_layout
+
+\end_inset
+
+.
+ Setting this to 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+ allows you to alter or augment the generated CSS, rather than to override
+ it completely.
+ Default is 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLItem
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] The tag to be used for individual paragraphs of environments, replacing
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+itemtag
+\end_layout
+
+\end_inset
+
+ in the examples above.
+ Defaults to 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+div
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLItemAttr
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
 \end_inset
 
-value
-\begin_inset Quotes erd
+] Attributes for the item tag.
+ Defaults to 
+\begin_inset Quotes eld
 \end_inset
 
->First item.</itemtag>
-\end_layout
 
-\begin_layout LyX-Code
-<labeltag attr=
-\begin_inset Quotes erd
-\end_inset
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-value
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
+class=`layoutname_item'
+\end_layout
 
->List Label</labeltag><itemtag attr=
-\begin_inset Quotes erd
 \end_inset
 
-value
+
 \begin_inset Quotes erd
 \end_inset
 
->Second item.</itemtag>
-\end_layout
-
-\begin_layout LyX-Code
-</tag>
+.
 \end_layout
 
-\begin_layout Standard
-Note the different orders of 
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-labeltag
+HTMLLabel
 \end_layout
 
 \end_inset
 
- and 
+ [
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-itemtag
+string
 \end_layout
 
 \end_inset
 
-.
- Which order we get depends upon the setting of 
+] The tag to be used for paragraph and item labels, replacing 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLLabelFirst
+labeltag
 \end_layout
 
 \end_inset
 
-: If 
+ in the examples above.
+ Defaults to 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLLabelFirst
+span
 \end_layout
 
 \end_inset
 
- is false (the default), you get the first of these, with the label within
- the item; if true, you get the second, with the label outside the item.
-\end_layout
-
-\begin_layout Standard
-The specific tags and attributes output for each paragraph type can be controlle
-d by means of the layout tags we are about to describe.
- As mentioned earlier, however, LyX uses sensible defaults for many of these,
- so you often may not need to do very much to get good XHTML output.
- Think of the available tags as there so you can tweak things to your liking.
+.
 \end_layout
 
 \begin_layout Description
@@ -15452,7 +16543,7 @@ d by means of the layout tags we are about to describe.
 status collapsed
 
 \begin_layout Plain Layout
-HTMLAttr
+HTMLLabelAttr
 \end_layout
 
 \end_inset
@@ -15467,8 +16558,8 @@ string
 
 \end_inset
 
-] Specifies attribute information to be output with the main tag.
- For example, 
+] Attributes for the label tag.
+ Defaults to 
 \begin_inset Quotes eld
 \end_inset
 
@@ -15477,7 +16568,7 @@ string
 status collapsed
 
 \begin_layout Plain Layout
-class=`mydiv'
+class=`layoutname_label'
 \end_layout
 
 \end_inset
@@ -15487,35 +16578,59 @@ class=`mydiv'
 \end_inset
 
 .
- By default, LyX will output 
-\begin_inset Quotes eld
-\end_inset
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLLabelFirst
+\end_layout
 
+\end_inset
 
+ [
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-class=`layoutname'
+
+\emph on
+0
+\emph default
+,1
 \end_layout
 
 \end_inset
 
+] Meaningful only for list-like environments, this tag controls whether
+ the label tag is output before or inside the item tag.
+ This is used, for example, in the description environment, where we want
+ `
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+<dt>\SpecialChar \ldots{}
+</dt><dd>\SpecialChar \ldots{}
+</dd>
+\end_layout
 
-\begin_inset Quotes erd
 \end_inset
 
-, where 
+.
+ Default is 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-layoutname
+0
 \end_layout
 
 \end_inset
 
- is the LyX name of the layout, made lowercase, for example: chapter.
+: The label tag is output inside the item tag.
 \end_layout
 
 \begin_layout Description
@@ -15523,56 +16638,67 @@ layoutname
 status collapsed
 
 \begin_layout Plain Layout
-HTMLForceCSS
+HTMLPreamble
 \end_layout
 
 \end_inset
 
- [
+ Information to be output in the 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-0,1
+<head>
 \end_layout
 
 \end_inset
 
-] Whether to output the default CSS information LyX generates for this layout,
even if additional information is explicitly provided vi
+ section when this style is used.
This might, for example, be used to include 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLStyle
+<script>
 \end_layout
 
 \end_inset
 
-.
- Setting this to 
+ block defining an 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-1
+onclick
 \end_layout
 
 \end_inset
 
- allows you to alter or augment the generated CSS, rather than to override
- it completely.
- Default is 
+ handler.
+\end_layout
+
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-0
+HTMLStyle
 \end_layout
 
 \end_inset
 
-.
+ CSS style information to be included when this style is used.
+ Note that this will automatically be wrapped in a layout-generated 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+<style>
+\end_layout
+
+\end_inset
+
+ block, so only the CSS itself need be included.
 \end_layout
 
 \begin_layout Description
@@ -15580,7 +16706,7 @@ status collapsed
 status collapsed
 
 \begin_layout Plain Layout
-HTMLItem
+HTMLTag
 \end_layout
 
 \end_inset
@@ -15595,13 +16721,12 @@ string
 
 \end_inset
 
-] The tag to be used for individual paragraphs of environments, replacing
+] The tag to be used for the main label, replacing 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-itemtag
+tag
 \end_layout
 
 \end_inset
@@ -15625,7 +16750,7 @@ div
 status collapsed
 
 \begin_layout Plain Layout
-HTMLItemAttr
+HTMLTitle
 \end_layout
 
 \end_inset
@@ -15635,65 +16760,140 @@ HTMLItemAttr
 status collapsed
 
 \begin_layout Plain Layout
-string
+
+\emph on
+0
+\emph default
+,1
 \end_layout
 
 \end_inset
 
-] Attributes for the item tag.
- Defaults to 
-\begin_inset Quotes eld
-\end_inset
+] Marks this style as the one to be used to generate the 
+\begin_inset Flex CharStyle:Code
+status collapsed
 
+\begin_layout Plain Layout
+<title>
+\end_layout
+
+\end_inset
 
+ tag for the XHTML file.
+ By default, it is false.
+ The 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-class=`layoutname_item'
+stdtitle.inc
 \end_layout
 
 \end_inset
 
+ file sets it to true for the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+title
+\end_layout
 
-\begin_inset Quotes erd
 \end_inset
 
-.
+ environment.
 \end_layout
 
-\begin_layout Description
-\begin_inset Flex CharStyle:Code
+\begin_layout Subsection
+InsetLayout XHTML
+\end_layout
+
+\begin_layout Standard
+The XHTML output of insets can also be controlled by information in layout
+ files.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-HTMLLabel
+At present, this is true only for 
+\begin_inset Quotes eld
+\end_inset
+
+text
+\begin_inset Quotes erd
+\end_inset
+
+ insets (insets you can type into) and is not true for 
+\begin_inset Quotes eld
+\end_inset
+
+command
+\begin_inset Quotes erd
+\end_inset
+
+ insets (insets that are associated with dialog boxes).
 \end_layout
 
 \end_inset
 
- [
-\begin_inset Flex CharStyle:Code
-status collapsed
+ Here, too, LyX tries to provide sensible defaults, and it constructs default
+ CSS style rules.
+ But everything can be customized.
+\end_layout
 
-\begin_layout Plain Layout
-string
+\begin_layout Standard
+The XHTML LyX outputs for an inset has the following form:
+\end_layout
+
+\begin_layout LyX-Code
+<tag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>
+\end_layout
+
+\begin_layout LyX-Code
+<labeltag>Label</labeltag>
 \end_layout
 
+\begin_layout LyX-Code
+<innertag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
 \end_inset
 
-] The tag to be used for paragraph and item labels, replacing 
+>Contents of the inset.</innertag>
+\end_layout
+
+\begin_layout LyX-Code
+</tag>
+\end_layout
+
+\begin_layout Standard
+If the inset permits multiple paragraphs---that is, if 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-labeltag
+MultiPar
 \end_layout
 
 \end_inset
 
- in the examples above.
- Defaults to 
+ is true---then the contents of the inset will itself be output as paragraphs
+ formatted according to the styles used for those paragraphs (standard,
+ quote, and the like).
+ The label tag is of course omitted if the paragraph does not have a label
+ and, at present, is always 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -15704,6 +16904,12 @@ span
 \end_inset
 
 .
+ The inner tag is optional and, by default, does not appear.
+\end_layout
+
+\begin_layout Standard
+The specific tags and attributes output for each inset can be controlled
+ by means of the following layout tags.
 \end_layout
 
 \begin_layout Description
@@ -15711,7 +16917,7 @@ span
 status collapsed
 
 \begin_layout Plain Layout
-HTMLLabelAttr
+HTMLAttr
 \end_layout
 
 \end_inset
@@ -15726,8 +16932,8 @@ string
 
 \end_inset
 
-] Attributes for the label tag.
- Defaults to 
+] Specifies attribute information to be output with the main tag.
+ For example, 
 \begin_inset Quotes eld
 \end_inset
 
@@ -15736,7 +16942,8 @@ string
 status collapsed
 
 \begin_layout Plain Layout
-class=`layoutname_label'
+class=`myinset' onclick=`\SpecialChar \ldots{}
+'
 \end_layout
 
 \end_inset
@@ -15746,123 +16953,129 @@ class=`layoutname_label'
 \end_inset
 
 .
-\end_layout
+ By default, LyX will output 
+\begin_inset Quotes eld
+\end_inset
+
 
-\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLLabelFirst
+class=`insetname'
 \end_layout
 
 \end_inset
 
- [
+
+\begin_inset Quotes erd
+\end_inset
+
+, where 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-0,1
+insetname
 \end_layout
 
 \end_inset
 
-] Meaningful only for list-like environments, this tag controls whether
- the label tag is output before or inside the item tag.
- This is used, for example, in the description environment, where we want
- `
+ is the LyX name of the inset, made lowercase and with non-alphanumeric
+ characters converted to underscores, for example: footnote.
+\end_layout
+
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-<dt>\SpecialChar \ldots{}
-</dt><dd>\SpecialChar \ldots{}
-</dd>
+HTMLForceCSS
 \end_layout
 
 \end_inset
 
-.
- Default is 
+ [
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
+
+\emph on
 0
+\emph default
+,1
 \end_layout
 
 \end_inset
 
-: The label tag is output inside the item tag.
-\end_layout
-
-\begin_layout Description
+] Whether to output the default CSS information LyX generates for this layout,
+ even if additional information is explicitly provided via 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLPreamble
+HTMLStyle
 \end_layout
 
 \end_inset
 
- Information to be output in the 
+.
+ Setting this to 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-<head>
+1
 \end_layout
 
 \end_inset
 
- section when this style is used.
- This might, for example, be used to include a 
+ allows you to alter or augment the generated CSS, rather than to override
+ it completely.
+ Default is 0.
+\end_layout
+
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-<script>
+HTMLInnerAttr
 \end_layout
 
 \end_inset
 
- block defining an 
+ [
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-onclick
+string
 \end_layout
 
 \end_inset
 
- handler.
-\end_layout
+] Attributes for the inner tag.
+ Defaults to 
+\begin_inset Quotes eld
+\end_inset
+
 
-\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLStyle
+class=`insetname_inner'
 \end_layout
 
 \end_inset
 
- CSS style information to be included when this style is used.
- Note that this will automatically be wrapped in a layout-generated 
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-<style>
-\end_layout
 
+\begin_inset Quotes erd
 \end_inset
 
- block, so only the CSS itself need be included.
+.
 \end_layout
 
 \begin_layout Description
@@ -15870,7 +17083,7 @@ status collapsed
 status collapsed
 
 \begin_layout Plain Layout
-HTMLTag
+HTMLInnerTag
 \end_layout
 
 \end_inset
@@ -15885,259 +17098,261 @@ string
 
 \end_inset
 
-] The tag to be used for the main label, replacing 
+] The inner tag, replacing 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-tag
+innertag
 \end_layout
 
 \end_inset
 
  in the examples above.
- Defaults to 
+ By default, there is none.
+\end_layout
+
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-div
+HTMLIsBlock
 \end_layout
 
 \end_inset
 
-.
-\end_layout
-
-\begin_layout Subsection
-InsetLayout XHTML
-\end_layout
-
-\begin_layout Standard
-The XHTML output of insets can also be controlled by information in layout
- files.
-\begin_inset Foot
+ [
+\begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-At present, this is true only for 
-\begin_inset Quotes eld
-\end_inset
+0,
+\emph on
+1
+\end_layout
 
-text
-\begin_inset Quotes erd
 \end_inset
 
- insets (insets you can type into) and is not true for 
-\begin_inset Quotes eld
-\end_inset
+] Whether this inset represents a standalone block of text (such as a footnote)
+ or instead represents material that is included in the surrounding text
+ (such as a branch).
+ Defaults to 1.
+\end_layout
 
-command
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
 
- insets (insets that are associated with dialog boxes).
+\begin_layout Plain Layout
+HTMLLabel
 \end_layout
 
 \end_inset
 
- Here, too, LyX tries to provide sensible defaults, and it constructs default
- CSS style rules.
- But everything can be customized.
-\end_layout
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-\begin_layout Standard
-The XHTML LyX outputs for an inset has the following form:
+\begin_layout Plain Layout
+string
 \end_layout
 
-\begin_layout LyX-Code
-<tag attr=
-\begin_inset Quotes erd
 \end_inset
 
-value
-\begin_inset Quotes erd
-\end_inset
+] A label for this inset, possibly including a reference to a counter.
+ For example, for footnote, it might be: 
+\begin_inset Flex CharStyle:Code
+status collapsed
 
->
-\end_layout
+\begin_layout Plain Layout
 
-\begin_layout LyX-Code
-<labeltag>Label</labeltag>
+\backslash
+arabic{footnote}
 \end_layout
 
-\begin_layout LyX-Code
-<innertag attr=
-\begin_inset Quotes erd
-\end_inset
-
-value
-\begin_inset Quotes erd
 \end_inset
 
->Contents of the inset.</innertag>
-\end_layout
-
-\begin_layout LyX-Code
-</tag>
+.
+ This is optional, and there is no default.
 \end_layout
 
-\begin_layout Standard
-If the inset permits multiple paragraphs---that is, if 
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-MultiPar
+HTMLPreamble
 \end_layout
 
 \end_inset
 
- is true---then the contents of the inset will itself be output as paragraphs
- formatted according to the styles used for those paragraphs (standard,
- quote, and the like).
- The label tag is of course omitted if the paragraph does not have a label
- and, at present, is always 
+ Information to be output in the 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-span
+<head>
 \end_layout
 
 \end_inset
 
-.
- The inner tag is optional and, by default, does not appear.
-\end_layout
-
-\begin_layout Standard
-The specific tags and attributes output for each inset can be controlled
- by means of the following layout tags.
-\end_layout
-
-\begin_layout Description
+ section when this style is used.
+ This might, for example, be used to include a 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLAttr
+<script>
 \end_layout
 
 \end_inset
 
- [
+ block defining an 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-string
+onclick
 \end_layout
 
 \end_inset
 
-] Specifies attribute information to be output with the main tag.
- For example, 
-\begin_inset Quotes eld
-\end_inset
-
+ handler.
+\end_layout
 
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-class=`myinset' onclick=`\SpecialChar \ldots{}
-'
+HTMLStyle
 \end_layout
 
 \end_inset
 
+ CSS style information to be included when this style is used.
+ Note that this will automatically be wrapped in a layout-generated 
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
+<style>
+\end_layout
 
-.
- By default, LyX will output 
-\begin_inset Quotes eld
 \end_inset
 
+ block, so only the CSS itself need be included.
+\end_layout
 
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-class=`insetname'
+HTMLTag
 \end_layout
 
 \end_inset
 
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
 
-\begin_inset Quotes erd
 \end_inset
 
-, where 
+] The tag to be used for the main label, replacing 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-insetname
+tag
 \end_layout
 
 \end_inset
 
- is the LyX name of the inset, made lowercase and with non-alphanumeric
- characters converted to underscores, for example: footnote.
-\end_layout
-
-\begin_layout Description
+ in the examples above.
+ The default depends upon the setting of 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLForceCSS
+MultiPar
 \end_layout
 
 \end_inset
 
- [
+: If 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-
-\emph on
-0
-\emph default
-,1
+MultiPar
 \end_layout
 
 \end_inset
 
-] Whether to output the default CSS information LyX generates for this layout,
- even if additional information is explicitly provided via 
+ is true, the default is 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLStyle
+div
 \end_layout
 
 \end_inset
 
-.
- Setting this to 
+; if it is false, the default is 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-1
+span
 \end_layout
 
 \end_inset
 
- allows you to alter or augment the generated CSS, rather than to override
- it completely.
- Default is 0.
+.
+\end_layout
+
+\begin_layout Subsection
+Float XHTML
+\end_layout
+
+\begin_layout Standard
+The XHTML output for floats too can be controlled by layout information.
+ The output has the following form:
+\end_layout
+
+\begin_layout LyX-Code
+<tag attr=
+\begin_inset Quotes erd
+\end_inset
+
+value
+\begin_inset Quotes erd
+\end_inset
+
+>
+\end_layout
+
+\begin_layout LyX-Code
+Contents of the float.
+\end_layout
+
+\begin_layout LyX-Code
+</tag>
+\end_layout
+
+\begin_layout Standard
+The caption, if there is one, is a separate inset and will be output as
+ such.
+ Its appearance can be controlled via the InsetLayout for caption insets.
 \end_layout
 
 \begin_layout Description
@@ -16145,7 +17360,7 @@ status collapsed
 status collapsed
 
 \begin_layout Plain Layout
-HTMLInnerAttr
+HTMLAttr
 \end_layout
 
 \end_inset
@@ -16160,8 +17375,8 @@ string
 
 \end_inset
 
-] Attributes for the inner tag.
- Defaults to 
+] Specifies attribute information to be output with the main tag.
+ For example, 
 \begin_inset Quotes eld
 \end_inset
 
@@ -16170,7 +17385,8 @@ string
 status collapsed
 
 \begin_layout Plain Layout
-class=`insetname_inner'
+class=`myfloat' onclick=`\SpecialChar \ldots{}
+'
 \end_layout
 
 \end_inset
@@ -16180,40 +17396,44 @@ class=`insetname_inner'
 \end_inset
 
 .
-\end_layout
+ By default, LyX will output 
+\begin_inset Quotes eld
+\end_inset
+
 
-\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLInnerTag
+class=`float float-floattype'
 \end_layout
 
 \end_inset
 
- [
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-string
-\end_layout
 
+\begin_inset Quotes erd
 \end_inset
 
-] The inner tag, replacing 
+, where 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-innertag
+floattype
 \end_layout
 
 \end_inset
 
- in the examples above.
- By default, there is none.
+ is LyX's name for this type of float, as determined by the float delcaration
+ (see 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Floats"
+
+\end_inset
+
+), though made lowercase and with non-alphanumeric characters converted
+ to underscores, for example: float-table.
 \end_layout
 
 \begin_layout Description
@@ -16221,27 +17441,23 @@ innertag
 status collapsed
 
 \begin_layout Plain Layout
-HTMLIsBlock
+HTMLStyle
 \end_layout
 
 \end_inset
 
- [
+ CSS style information to be included when this float is used.
+ Note that this will automatically be wrapped in a layout-generated 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-0,
-\emph on
-1
+<style>
 \end_layout
 
 \end_inset
 
-] Whether this inset represents a standalone block of text (such as a footnote)
- or instead represents material that is included in the surrounding text
- (such as a branch).
- Defaults to 1.
+ block, so only the CSS itself need be included.
 \end_layout
 
 \begin_layout Description
@@ -16249,7 +17465,7 @@ status collapsed
 status collapsed
 
 \begin_layout Plain Layout
-HTMLLabel
+HTMLTag
 \end_layout
 
 \end_inset
@@ -16264,184 +17480,199 @@ string
 
 \end_inset
 
-] A label for this inset, possibly including a reference to a counter.
- For example, for footnote, it might be: 
+] The tag to be used for this float, replacing 
+\begin_inset Quotes eld
+\end_inset
+
+
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-arabic{footnote}
+tag
 \end_layout
 
 \end_inset
 
-.
- This is optional, and there is no default.
-\end_layout
 
-\begin_layout Description
+\begin_inset Quotes erd
+\end_inset
+
+ in the example above.
+ The default is 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLPreamble
+div
 \end_layout
 
 \end_inset
 
- Information to be output in the 
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-<head>
+ and will rarely need changing.
 \end_layout
 
-\end_inset
+\begin_layout Subsection
+Bibliography formatting
+\end_layout
 
- section when this style is used.
- This might, for example, be used to include a 
+\begin_layout Standard
+The bibliography can be formatted using 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-<script>
+CiteFormat
 \end_layout
 
 \end_inset
 
- block defining an 
-\begin_inset Flex CharStyle:Code
-status collapsed
+ blocks.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Citation-format-description"
 
-\begin_layout Plain Layout
-onclick
+\end_inset
+
+ for the details.
 \end_layout
 
-\end_inset
+\begin_layout Subsection
+LyX-generated CSS
+\end_layout
 
- handler.
+\begin_layout Standard
+We have several times mentioned that LyX will generate default CSS style
+ rules for both insets and paragraph styles, based upon the other layout
+ information that is provided.
+ In this section, we shall say a word about which layout information LyX
+ uses and how.
 \end_layout
 
-\begin_layout Description
+\begin_layout Standard
+At present, LyX auto-generates CSS only for font information, making use
+ of the 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLStyle
+Family
 \end_layout
 
 \end_inset
 
- CSS style information to be included when this style is used.
- Note that this will automatically be wrapped in a layout-generated 
+, 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-<style>
+Series
 \end_layout
 
 \end_inset
 
- block, so only the CSS itself need be included.
-\end_layout
-
-\begin_layout Description
+, 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-HTMLTag
+Shape
 \end_layout
 
 \end_inset
 
- [
+, and 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-string
+Size
 \end_layout
 
 \end_inset
 
-] The tag to be used for the main label, replacing 
+ specified in the 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-tag
+Font
 \end_layout
 
 \end_inset
 
- in the examples above.
- The default depends upon the setting of 
-\begin_inset Flex CharStyle:Code
-status collapsed
+ declaration.
+ (See 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Font-description"
 
-\begin_layout Plain Layout
-MultiPar
-\end_layout
+\end_inset
 
+.) The translation is mostly straightforward and obvious.
+ For example, 
+\begin_inset Quotes eld
 \end_inset
 
-: If 
+
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-MultiPar
+Family Sans
 \end_layout
 
 \end_inset
 
- is true, the default is 
-\begin_inset Flex CharStyle:Code
-status collapsed
 
-\begin_layout Plain Layout
-div
-\end_layout
+\begin_inset Quotes erd
+\end_inset
 
+ becomes 
+\begin_inset Quotes eld
 \end_inset
 
-; if it is false, the default is 
+
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-span
+font-family: sans-serif;
 \end_layout
 
 \end_inset
 
+
+\begin_inset Quotes erd
+\end_inset
+
 .
+ The correspondence of LyX sizes and CSS sizes is a little less obvious
+ but nonetheless intuitive.
+ See the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+getSizeCSS()
 \end_layout
 
-\begin_layout Description
-\begin_inset Note Note
-status open
+\end_inset
 
-\begin_layout Subsection
-LyX-generated CSS
-\end_layout
+ function in 
+\begin_inset Flex URL
+status collapsed
 
 \begin_layout Plain Layout
-We have several times mentioned that LyX will generate default CSS style
- rules for both insets and paragraph styles, based upon the other layout
- information that is provided.
- In this section, we shall say a word about which layout information LyX
- uses and how.
+
+src/FontInfo.cpp
 \end_layout
 
 \end_inset
 
-
+ for the details.
 \end_layout
 
 \begin_layout Chapter