+\begin_layout Standard
+LyX has supported character styles since version 1.4.0; as of version 1.6.0,
+ these are called Flex insets.
+
+\end_layout
+
+\begin_layout Standard
+Flex insets come in three different kinds:
+\end_layout
+
+\begin_layout Itemize
+character style (
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+CharStyle
+\end_layout
+
+\end_inset
+
+): These define semantic markup corresponding to such LaTeX commands as
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+noun
+\end_layout
+
+\end_inset
+
+ and
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+code
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Itemize
+user custom (
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Custom
+\end_layout
+
+\end_inset
+
+): These can be used to define custom collapsible insets, similar to TeX
+ code, footnote, and the like.
+ An obvious example is an endnote inset, which is defined in the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+endnote
+\end_layout
+
+\end_inset
+
+ module.
+\end_layout
+
+\begin_layout Itemize
+XML elements (
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Element
+\end_layout
+
+\end_inset
+
+): For use with DocBook classes.
+\end_layout
+
+\begin_layout Standard
+Flex insets are defined using the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+InsetLayout
+\end_layout
+
+\end_inset
+
+ tag, which shall be explained in a moment.
+\end_layout
+
+\begin_layout Standard
+The
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+InsetLayout
+\end_layout
+
+\end_inset
+
+ tag also serves another function: It can be used to customize the general
+ layout of many different types of insets.
+ Currently,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+InsetLayout
+\end_layout
+
+\end_inset
+
+ can be used to customize the layout parameters for footnotes, marginal
+ notes, note insets, TeX code (ERT) insets, branches, listings, indexes,
+ boxes, tables, algorithms, URLs, and optional arguments, as well as to
+ define Flex insets.
+\end_layout
+
+\begin_layout Standard
+The
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+InsetLayout
+\end_layout
+
+\end_inset
+
+ definition must begin with a line of the form:
+\end_layout
+
+\begin_layout LyX-Code
+InsetLayout <Type>
+\end_layout
+
+\begin_layout Standard
+Here
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+<Type>
+\end_layout
+
+\end_inset
+
+ indicates the inset whose layout is being defined, and here there are two
+ cases.
+\end_layout
+
+\begin_layout Enumerate
+The layout for a pre-existing inset is being modified.
+ In this case, can be
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+<Type>
+\end_layout
+
+\end_inset
+
+ any one of the following:
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Algorithm
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Branch
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Box
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Box:shaded
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+ERT
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Figure
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Foot
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Index
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Info
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Info:menu
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Info:shortcut
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Info:shortcuts
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Listings
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Marginal
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Note:Comment
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Note:Note
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Note:GreyedOut
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+OptArg
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Table
+\end_layout
+
+\end_inset
+
+, or
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+URL
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Enumerate
+The layout for a Flex inset is being defined.
+ In this case,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+<Type>
+\end_layout
+
+\end_inset
+
+ can be any valid identifier not used by a pre-existing inset.
+ Note that the definition of a flex inset
+\emph on
+must
+\emph default
+also include a
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LyXType
+\end_layout
+
+\end_inset
+
+ entry, declaring which type of inset this is.
+\end_layout
+
+\begin_layout Standard
+The
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+InsetLayout
+\end_layout
+
+\end_inset
+
+ definition can contain the following entries:
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+BgColor
+\end_layout
+
+\end_inset
+
+ The color for the inset's background.
+ The valid colors are defined in
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+src/ColorCode.h
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+ContentAsLabel
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Whether to use the content of the inset as the label, when the inset is
+ closed.
+ Default is false.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+CopyStyle
+\end_layout
+
+\end_inset
+
+ As with paragraph styles (see page
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "des:CopyStyle"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+CustomPars
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Indicates whether the user may employ the Paragraph Settings dialog to
+ customize the paragraph.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Decoration
+\end_layout
+
+\end_inset
+
+ can be
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Classic
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Minimalistic
+\end_layout
+
+\end_inset
+
+, or
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Conglomerate
+\end_layout
+
+\end_inset
+
+, describing the rendering style used for the inset's frame and buttons.
+ Footnotes generally use
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Classic
+\end_layout
+
+\end_inset
+
+, ERT insets generally
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Minimalistic
+\end_layout
+
+\end_inset
+
+, and character styles
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Conglomerate
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+End
+\end_layout
+
+\end_inset
+
+ Required at the end of the InsetLayout declarations.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Font
+\end_layout
+
+\end_inset
+
+ The font used for both the text body
+\emph on
+and
+\emph default
+ the label.
+ See section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Font-description"
+
+\end_inset
+
+.
+ Note that defining this font automatically defines the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelFont
+\end_layout
+
+\end_inset
+
+ to the same value, so define this first and define
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelFont
+\end_layout
+
+\end_inset
+
+ later if you want them to be different.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+ForceLTR
+\end_layout
+
+\end_inset
+
+ Force the
+\begin_inset Quotes eld
+\end_inset
+
+latex
+\begin_inset Quotes erd
+\end_inset
+
+ language, leading to Left-to-Right (latin) output, e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
+\begin_inset space \space{}
+\end_inset
+
+in TeX code or URL.
+ A kludge.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+ForcePlain
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Indicates whether the PlainLayout should be used or, instead, the user
+ can change the paragraph style used in the inset.
+ Default is false.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+FreeSpacing
+\end_layout
+
+\end_inset
+
+ As with paragraph styles (see page
+\begin_inset CommandInset ref
+LatexCommand pageref
+reference "des:FreeSpacing"
+
+\end_inset
+
+).
+ Default is false.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+HTML*
+\end_layout
+
+\end_inset
+
+ These tags control XHTML output.
+ See
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+InToc
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Whether to include the contents of this inset in the strings generated
+ for the `Outline' pane.
+ One would not, for example, want the content of a footnote in a section
+ header to be included in the TOC displayed in the outline, but one would
+ normally want the content of a character style displayed.
+ Default is false: not to include.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+KeepEmpty
+\end_layout
+
+\end_inset
+
+ As with paragraph styles (see page
+\begin_inset CommandInset ref
+LatexCommand pageref
+reference "des:KeepEmpty"
+
+\end_inset
+
+).
+ Default is false.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelFont
+\end_layout
+
+\end_inset
+
+ The font used for the label.
+ See section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Font-description"
+
+\end_inset
+
+.
+ Note that this definition can never appear before
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Font
+\end_layout
+
+\end_inset
+
+, lest it be ineffective.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelString
+\end_layout
+
+\end_inset
+
+ What will be displayed on the button or elsewhere as the inset label.
+ Some inset types (TeX code and Branch) modify this label on the fly.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LatexName
+\end_layout
+
+\end_inset
+
+ The name of the corresponding LaTeX stuff.
+ Either the environment or command name.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LatexParam
+\end_layout
+
+\end_inset
+
+ The optional parameter for the corresponding
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LatexName
+\end_layout
+
+\end_inset
+
+ stuff, including possible bracket pairs like
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+[]
+\end_layout
+
+\end_inset
+
+.
+ This parameter cannot be changed from within LyX.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LatexType
+\end_layout
+
+\end_inset
+
+ As with paragraph styles (see page
+\begin_inset CommandInset ref
+LatexCommand pageref
+reference "des:LatexType"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LyxType
+\end_layout
+
+\end_inset
+
+ Can be
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+charstyle
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+custom
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+element
+\end_layout
+
+\end_inset
+
+, or
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+end
+\end_layout
+
+\end_inset
+
+ (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.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+MultiPar
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Whether multiple paragraphs are permitted in this inset.
+ This will also set
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+CustomPars
+\end_layout
+
+\end_inset
+
+ to the same value and
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+ForcePlain
+\end_layout
+
+\end_inset
+
+ to the opposite value.
+ These can be reset to other values, if they are used
+\emph on
+after
+\emph default
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+MultiPar
+\end_layout
+
+\end_inset
+
+.
+ Default is true.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+NeedProtect
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Whether fragile commands in this layout should be
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+protect
+\end_layout
+
+\end_inset
+
+'ed.
+ (Note: This is
+\emph on
+not
+\emph default
+ whether the command should itself be protected.) Default is false.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+PassThru
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] As with paragraph styles (see page
+\begin_inset CommandInset ref
+LatexCommand pageref
+reference "des:PathThru"
+
+\end_inset
+
+).
+ Default is false.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Preamble
+\end_layout
+
+\end_inset
+
+ As with paragraph styles (see page
+\begin_inset CommandInset ref
+LatexCommand pageref
+reference "des:Preamble"
+
+\end_inset
+
+).
+\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
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] As with paragraph styles (see page
+\begin_inset CommandInset ref
+LatexCommand pageref
+reference "des:Requires"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Subsection
+Counters
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Counters"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Since version 1.3.0 of LyX, it is both possible and necessary to define the
+ counters (
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+chapter
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+figure
+\end_layout
+
+\end_inset
+
+, \SpecialChar \ldots{}
+) in the text class itself.
+ The standard counters are defined in the file
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+stdcounters.inc
+\end_layout
+
+\end_inset
+
+, so you may have to do no more than add
+\end_layout
+
+\begin_layout LyX-Code
+Input stdcounters.inc
+\end_layout
+
+\begin_layout Standard
+to your layout file to get them to work.
+ But if you want to define custom counters, then you can do so.
+ The counter declaration must begin with:
+\end_layout
+
+\begin_layout LyX-Code
+Counter CounterName
+\end_layout
+
+\begin_layout Standard
+where of course `
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+CounterName
+\end_layout
+
+\end_inset
+
+' is replaced by the name of the counter.
+ And it 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
+
+.
+ The following parameters can also be used:
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelString [string=""]
+\end_layout
+
+\end_inset
+
+ when this is defined, this string defines how the counter is displayed.
+ Setting this value sets
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelStringAppendix
+\end_layout
+
+\end_inset
+
+ to the same value.
+ The following special constructs can be used in the string:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+thecounter
+\end_layout
+
+\end_inset
+
+ will be replaced by the expansion of the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelString
+\end_layout
+
+\end_inset
+
+ (or
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelStringAppendix
+\end_layout
+
+\end_inset
+
+) of the counter
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+counter
+\end_layout
+
+\end_inset
+
+.
+
+\end_layout
+
+\begin_layout Itemize
+counter values can be expressed using LaTeX-like macros
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\emph on
+numbertype
+\emph default
+{
+\emph on
+counter
+\emph default
+}
+\end_layout
+
+\end_inset
+
+, where
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+numbertype
+\end_layout
+
+\end_inset
+
+ can be:
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Actually, the situation is a bit more complicated: any
+\family default
+\series default
+\shape default
+\emph default
+\bar default
+
+\size default
+\emph on
+\noun default
+\color inherit
+numbertype
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+ other than those described below will produce arabic numerals.
+ It would not be surprising to see this change in the future.
+\end_layout
+
+\end_inset
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+arabic
+\end_layout
+
+\end_inset
+
+: 1, 2, 3,\SpecialChar \ldots{}
+;
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+alph
+\end_layout
+
+\end_inset
+
+ for lower-case letters: a, b, c, \SpecialChar \ldots{}
+;
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Alph
+\end_layout
+
+\end_inset
+
+ for upper-case letters: A, B, C, \SpecialChar \ldots{}
+;
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+roman
+\end_layout
+
+\end_inset
+
+ for lower-case roman numerals: i, ii, iii, \SpecialChar \ldots{}
+;
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Roman
+\end_layout
+
+\end_inset
+
+ for upper-case roman numerals: I, II, III\SpecialChar \ldots{}
+;
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+hebrew
+\end_layout
+
+\end_inset
+
+ for hebrew numerals.
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+If LabelString is not defined, a default value is constructed as follows:
+ if the counter has a master counter
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+master
+\end_layout
+
+\end_inset
+
+ (defined via
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Within
+\end_layout
+
+\end_inset
+
+), the string
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+themaster.
+\backslash
+arabic{counter}
+\end_layout
+
+\end_inset
+
+ is used; otherwise the string
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+arabic{counter}
+\end_layout
+
+\end_inset
+
+ is used.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelStringAppendix [string=""]
+\end_layout
+
+\end_inset
+
+ Same as
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelString
+\end_layout
+
+\end_inset
+
+, but for use in the Appendix.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Within
+\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
+
+] If this is set to the name of another counter, the present counter will
+ be reset every time the other one is increased.
+ For example,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+subsection
+\end_layout
+
+\end_inset
+
+ is numbered inside
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+section
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection
+Font description
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Font-description"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A font description looks like this:
+\end_layout
+
+\begin_layout LyX-Code
+Font
+\family roman
+\emph on
+or
+\family default
+\emph default
+ LabelFont
+\end_layout
+
+\begin_layout LyX-Code
+ ...
+\end_layout
+
+\begin_layout LyX-Code
+EndFont
+\end_layout
+
+\begin_layout Standard
+The following commands are available:
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Color
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+none
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+black
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+white
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+red
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+green
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+blue
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+cyan
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+magenta
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+yellow
+\end_layout
+
+\end_inset
+
+]
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Family
+\end_layout
+
+\end_inset
+
+ [
+\emph on
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+Roman
+\end_layout
+
+\end_inset
+
+
+\emph default
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Sans
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Typewriter
+\end_layout
+
+\end_inset
+
+]
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Misc
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] Valid arguments are:
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+emph
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+noun
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+underbar
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+no_emph
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+no_noun
+\end_layout
+
+\end_inset
+
+ and
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+no_bar
+\end_layout
+
+\end_inset
+
+.
+ Each of these turns on or off the corresponding attribute.
+ For example,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+emph
+\end_layout
+
+\end_inset
+
+ turns on emphasis, and
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+no_emph
+\end_layout
+
+\end_inset
+
+ turns it off.
+
+\begin_inset Newline newline
+\end_inset
+
+If the latter seems puzzling, remember that the font settings for the present
+ context are generally inherited from the surrounding context.
+ So
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+no_emph
+\end_layout
+
+\end_inset
+
+ would turn off the emphasis that was anyway in effect, say, in a theorem
+ environment.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Series
+\end_layout
+
+\end_inset
+
+ [
+\emph on
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+Medium
+\end_layout
+
+\end_inset
+
+
+\emph default
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Bold
+\end_layout
+
+\end_inset
+
+]
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Shape
+\end_layout
+
+\end_inset
+
+ [
+\emph on
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+Up
+\end_layout
+
+\end_inset
+
+
+\emph default
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Italic
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+SmallCaps
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Slanted
+\end_layout
+
+\end_inset
+
+]
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Size
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+tiny
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+small
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+normal
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+large
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+larger
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+largest
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+huge
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+giant
+\end_layout
+
+\end_inset
+
+]
+\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