#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
-\lyxformat 348
+\lyxformat 374
\begin_document
\begin_header
\textclass scrbook
\begin_preamble
% DO NOT ALTER THIS PREAMBLE!!!
%
-% This preamble is designed to ensure that the User's Guide prints
+% This preamble is designed to ensure that this document prints
% out as advertised. If you mess with this preamble,
-% parts of the User's Guide may not print out as expected. If you
+% parts of this document may not print out as expected. If you
% have problems LaTeXing this file, please contact
% the documentation team
% email: lyx-docs@lists.lyx.org
\end_local_layout
\language english
\inputencoding auto
+\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
+\use_xetex false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
+\default_output_format default
+\bibtex_command default
+\index_command default
\paperfontsize 12
\spacing single
\use_hyperref true
\use_geometry false
\use_amsmath 0
\use_esint 0
+\use_mhchem 1
\cite_engine basic
\use_bibtopic false
+\use_indices false
\paperorientation portrait
+\suppress_date false
\branch OutDated
\selected 0
+\filename_suffix 0
\color #f5fae7
\end_branch
+\index Index
+\shortcut idx
+\color #008000
+\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
-\defskip medskip
+\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 2
\paperpagestyle headings
-\tracking_changes true
+\tracking_changes false
\output_changes false
-\author "rgheck"
-\author "ab"
-\author "Georg Baum,,,"
-\author ""
+\html_use_mathml true
+\html_be_strict true
\end_header
\begin_body
\begin_inset CommandInset ref
LatexCommand ref
-reference "chap:i18n"
+reference "cha:Internationalizing-LyX"
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:keymap"
+reference "sec:International-Keymap-Stuff"
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
-reference "chap:textclass"
+reference "cha:Installing-New-Document"
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:templates"
+reference "sec:Creating-Templates"
\end_inset
\end_layout
\begin_layout Section
-Using the dialog for the first time
-\end_layout
-
-\begin_layout Standard
-The
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-UserDir/preferences
-\end_layout
-
-\end_inset
-
- file will contain only changes that you have made to the default behavior,
- some of which is hard-coded into LyX and some of which is contained in
- the system file
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-LyXDir/lyxrc.defaults
-\end_layout
-
-\end_inset
-
-.
- Note that in both files lines beginning with a
-\begin_inset Quotes eld
-\end_inset
-
-#
-\begin_inset Quotes erd
-\end_inset
-
- are just comments and are not interpreted.
- However, only system administrators should edit
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-LyXDir/lyxrc.defaults
-\end_layout
-
-\end_inset
-
-.
- Users should use the
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-Tools\SpecialChar \menuseparator
-Preferences
-\end_layout
-
-\end_inset
-
- dialog to create and modify their own
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-UserDir/preferences
-\end_layout
-
-\end_inset
-
- file.
-\end_layout
-
-\begin_layout Standard
-We hope that the
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-Tools\SpecialChar \menuseparator
-Preferences
-\end_layout
-
-\end_inset
-
- dialog will be largely self-explanatory.
- Most things in the dialog have associated `tool tips': hover your mouse
- pointer over something for more information.
- Before we highlight a few of the more important commands below, however,
- a word of warning: Applying some of your changes (e.
-\begin_inset space \thinspace{}
-\end_inset
-
-g.
-\begin_inset space \space{}
-\end_inset
-
-screen fonts) will have an instant effect.
- Others (e.
-\begin_inset space \thinspace{}
-\end_inset
-
-g.
-\begin_inset space \space{}
-\end_inset
-
-changing the bind file) will not.
- If nothing appears to have changed, just
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-Save
-\end_layout
-
-\end_inset
-
- the changes and restart LyX.
-\end_layout
-
-\begin_layout Section
-File Handling
-\end_layout
-
-\begin_layout Standard
-LyX has a powerful mechanism to convert to and from any file format using
- external programs.
-
-\end_layout
-
-\begin_layout Subsection
+Formats
\begin_inset CommandInset label
LatexCommand label
-name "sub:Formats"
+name "sec:Formats"
\end_inset
-Formats
+
\end_layout
\begin_layout Standard
\end_inset
- field contains the named used to identify the format in the GUI.
+ field contains the name used to identify the format in the GUI.
The
\begin_inset Flex CharStyle:MenuItem
status collapsed
\end_inset
- and
+ and an
\begin_inset Flex CharStyle:MenuItem
status collapsed
\end_inset
menu.
- The editor is for example launched when you press the
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-Edit
-\end_layout
-
-\end_inset
-
- button in the
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-Graphics
-\end_layout
-
-\end_inset
-
- or the
+ The editor is for example launched when you right-click on an image and
+ choose
\begin_inset Flex CharStyle:MenuItem
status collapsed
\begin_layout Plain Layout
-External material
+Edit externally
\end_layout
\end_inset
- dialog.
+ in the appearing context menu.
\end_layout
\begin_layout Standard
\end_inset
option tells LyX that a format is suitable for document export.
- If this is is set and if a suitable conversion route exists (see
+ If this is set and if a suitable conversion route exists (see sec.
+\begin_inset space \thinspace{}
+\end_inset
+
+
\begin_inset CommandInset ref
LatexCommand ref
-reference "sub:Converters"
+reference "sec:Converters"
\end_inset
.
\end_layout
-\begin_layout Subsection
+\begin_layout Section
Copiers
\end_layout
\end_inset
-Save that in your local LyX directory—say,
+Save it in your local LyX directory—say,
\begin_inset Flex CharStyle:Code
status collapsed
\end_layout
-\begin_layout Subsection
+\begin_layout Section
+Converters
\begin_inset CommandInset label
LatexCommand label
-name "sub:Converters"
+name "sec:Converters"
\end_inset
-Converters
+
\end_layout
\begin_layout Standard
\end_inset
- The path to the original input file (this is different from $$p when chain
- of converters is called).
+ The path to the original input file (this is different from $$p when a
+ chain of converters is called).
\end_layout
\begin_layout Standard
status collapsed
\begin_layout Plain Layout
-script <infile.out >infile.log
+script < infile.out > infile.log
\end_layout
\end_inset
\end_layout
\begin_layout Standard
-You do not have to define converters between all the formats between which
- you want to convert.
+You do not have to define converters for all formats between which you want
+ to convert.
For example, you will note that there is no `LyX to PostScript' converter,
but LyX will export PostScript.
It does so by first creating a LaTeX file (no converter needs to be defined
formats', as described in section
\begin_inset CommandInset ref
LatexCommand ref
-reference "sub:Formats"
+reference "sec:Formats"
\end_inset
Internationalizing LyX
\begin_inset CommandInset label
LatexCommand label
-name "chap:i18n"
+name "cha:Internationalizing-LyX"
\end_inset
do right away:
\end_layout
-\begin_layout Itemize
-Read
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-DocStyle.lyx
-\end_layout
-
-\end_inset
-
-, the guide to writing LyX documentation.
- Pay special attention to the translator's section.
-\end_layout
-
\begin_layout Itemize
Check out the documentation translation web page at
\begin_inset CommandInset href
\begin_layout Plain Layout
Help\SpecialChar \menuseparator
-
-\bar under
-I
-\bar default
-ntroduction
+Introduction
\end_layout
\end_inset
\end_layout
\begin_layout Section
+International Keymap Stuff
\begin_inset CommandInset label
LatexCommand label
-name "sec:keymap"
+name "sec:International-Keymap-Stuff"
\end_inset
-International Keymap Stuff
+
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Chapter
-Installing New Document Classes, Layouts, and Templates
+Installing New Document Classes, Layouts, and Templates
\begin_inset CommandInset label
LatexCommand label
-name "chap:textclass"
+name "cha:Installing-New-Document"
\end_inset
In this chapter, we describe the procedures for creating and installing
new LyX layout and template files, as well as offer a refresher on correctly
installing new LaTeX document classes.
- Some definitions: a document class is a LaTeX file (usually ending in
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-.cls
-\end_layout
-
-\end_inset
-
- or
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-.sty
+
\end_layout
-\end_inset
-
-) that describes the format of a document such as an article, report, journal
- preprint, etc, and all the commands needed to realize that format.
- A layout file is a LyX file that corresponds to a LaTeX document class
- and that tells LyX how to
+\begin_layout Standard
+First, let us a say a few words about how one ought to think about the relation
+ between LyX and LaTeX.
+ The thing to understand is that, in a certain sense, LyX doesn't know anything
+ about LaTeX.
+ Indeed, from LyX's point of view, LaTeX is just one of several
\begin_inset Quotes eld
\end_inset
-draw
+backend formats
\begin_inset Quotes erd
\end_inset
- things on the screen to make the display look something like the final
- printed page.
- More precisely, a layout file describes a
-\begin_inset Quotes eld
-\end_inset
-
-text class
-\begin_inset Quotes erd
-\end_inset
+ in which it is capable of producing output.
+ Other such formats are DocBook, plaintext, and XHTML.
+ LaTeX is, of course, a particularly important format, but very little of
+ the information LyX has about LaTeX is actually contained in the program
+ itself.
+\begin_inset Foot
+status collapsed
- which is the internal construct LyX uses to render the screen display.
-
+\begin_layout Plain Layout
+Some commands are sufficiently complex that they are
\begin_inset Quotes eld
\end_inset
-Layout
+hardcoded
\begin_inset Quotes erd
\end_inset
- and
-\begin_inset Quotes eld
-\end_inset
+ into LyX.
+ But the developers generally regard this as a Bad Thing.
+\end_layout
-text class
-\begin_inset Quotes erd
\end_inset
- can be used somewhat interchangeably, but it is better to refer to the
- file as the layout, and the thing living in LyX's memory as the text class.
- A template file is simply a LyX document that contains a set of predefined
- entries for a given document class—entries that are generally required
- for that class.
- Templates are especially useful for things like journal manuscripts that
- are to be submitted electronically.
-\end_layout
+ Rather, that information, even for the standard classes like
+\begin_inset Flex CharStyle:Code
+status collapsed
-\begin_layout Section
-Installing a new LaTeX package
+\begin_layout Plain Layout
+article.cls
\end_layout
-\begin_layout Standard
-Some installations may not include a LaTeX package that you would like to
- use within LyX.
- For example, you might need FoilTeX, a package for preparing slides or
- viewgraphs for overhead projectors.
- Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
- a user interface for that.
- For example on MiKTeX you start its program
-\begin_inset Quotes eld
\end_inset
-Browse Packages
-\begin_inset Quotes erd
-\end_inset
+, is contained in layout files.
+ Similarly, LyX itself does not know much about DocBook or XHTML.
+\end_layout
- to get a list of available packages.
- To install one, right click on it or use the installing toolbar button.
- When the package you want to install is not in the list, but you have it
- in form of a
+\begin_layout Standard
+You can think of the layout file for a given document class as a translation
+ manual between LyX constructs---paragraphs with their corresponding styles,
+ certain sorts of insets, etc---and the corresponding LaTeX, or DocBook,
+ or XHTML constructs.
+ Almost everything LyX knows about
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-.cls
+article.cls
\end_layout
\end_inset
- or
+, for example, is contained in the file
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-.sty
+article.layout
\end_layout
\end_inset
--file, then copy these files to a subfolder of your LaTeX distribution,
- for example to the folder
-\family sans
-~
-\backslash
-tex
-\backslash
-latex
-\family default
.
- Then update the file name database of your LaTeX-distribution.
- For example on MiKTeX this is done by pressing the button
-\family sans
-Refresh
-\begin_inset space ~
-\end_inset
+ For this reason, anyone intending to write layout files should plan to
+ study the existing files.
+ A good place to start is with
+\begin_inset Flex CharStyle:Code
+status collapsed
-FNDB
-\family default
- that you find in MiKTeX's
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Plain Layout
+stdsections.inc
+\end_layout
-Settings
-\begin_inset Quotes erd
\end_inset
- program.
- In both cases you need afterwards to reconfigure LyX using the menu
-\begin_inset Flex CharStyle:MenuItem
+, which just gets `included' in
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Tools\SpecialChar \menuseparator
-Reconfigure
+article.layout
\end_layout
\end_inset
- and then to restart LyX.
-\end_layout
-
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+book.layout
+\end_layout
+
+\end_inset
+
+, and many of the other layout files for document classes.
+ This file is where sections and the like are defined:
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+stdsections.inc
+\end_layout
+
+\end_inset
+
+ tells LyX how paragraphs that are marked with the Section, Subsection,
+ etc, styles can be translated into corresponding LaTeX commands.
+ The
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+article.layout
+\end_layout
+
+\end_inset
+
+ file basically just includes several of these
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+std*.inc
+\end_layout
+
+\end_inset
+
+ files.
+\end_layout
+
+\begin_layout Standard
+Defining the LyX--LaTeX correspondence is not, however, the only thing layout
+ files do.
+ Their other job is to define how the LyX constructs themselves will appear
+ on-screen.
+ The fact that layout files have these two jobs is often a source of confusion,
+ because they are completely separate.
+ Telling LyX how to translate a certain paragraph style into LaTeX does
+ not tell LyX how to display it; conversely, telling LyX how to display
+ a certain paragraph style does not tell LyX how to translate it into LaTeX,
+ let alone tell LaTeX how to display it.
+ So, in general, when you define a new LyX construct, you must always do
+ two quite separate things: (i)
+\begin_inset space ~
+\end_inset
+
+tell LyX how to translate it into LaTeX, and (ii)
+\begin_inset space ~
+\end_inset
+
+tell LyX how to display it.
+\end_layout
+
+\begin_layout Standard
+Much the same is true, of course, as regards LyX's other backend formats,
+ though XHTML is in some ways different, because in that case LyX
+\emph on
+is
+\emph default
+ able, to some extent, to use information about how it should display a
+ paragraph on the screen to output information (in the form of CSS) about
+ how the paragrpah should be displayed in a browser.
+ Even in this case, however, the distinction between what LyX does internally
+ and how things are rendered externally remains in force, and the two can
+ be controlled separately.
+ See
+\begin_inset CommandInset ref
+LatexCommand prettyref
+reference "sub:Paragraph-Style-XHTML"
+
+\end_inset
+
+ for the details.
+\end_layout
+
+\begin_layout Standard
+Some definitions: a document class is a LaTeX file (usually ending in
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+.cls
+\end_layout
+
+\end_inset
+
+ or
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+.sty
+\end_layout
+
+\end_inset
+
+) that describes the format of a document such as an article, report, journal
+ preprint, etc, and all the commands needed to realize that format.
+ A layout file is a LyX file that corresponds to a LaTeX document class
+ and that tells LyX how to
+\begin_inset Quotes eld
+\end_inset
+
+draw
+\begin_inset Quotes erd
+\end_inset
+
+ things on the screen to make the display look something like the final
+ printed page.
+ More precisely, a layout file describes a
+\begin_inset Quotes eld
+\end_inset
+
+text class
+\begin_inset Quotes erd
+\end_inset
+
+ which is the internal construct LyX uses to render the screen display.
+
+\begin_inset Quotes eld
+\end_inset
+
+Layout
+\begin_inset Quotes erd
+\end_inset
+
+ and
+\begin_inset Quotes eld
+\end_inset
+
+text class
+\begin_inset Quotes erd
+\end_inset
+
+ can be used somewhat interchangeably, but it is better to refer to the
+ file as the layout, and the thing living in LyX's memory as the text class.
+ A template file is simply a LyX document that contains a set of predefined
+ entries for a given document class—entries that are generally required
+ for that class.
+ Templates are especially useful for things like journal manuscripts that
+ are to be submitted electronically.
+\end_layout
+
+\begin_layout Section
+Installing a new LaTeX package
+\end_layout
+
\begin_layout Standard
-If your LaTeX distribution doesn't provide a user interface, then you can
- follow these steps by using a UNIX/Linux console.
+Some installations may not include a LaTeX package that you would like to
+ use within LyX.
+ For example, you might need FoilTeX, a package for preparing slides for
+ overhead projectors.
+ Modern LaTeX distributions like TeXLive (2008 or newer) or MiKTeX provide
+ a user interface for installing such packages.
+ For example, with MiKTeX, you start the program
+\begin_inset Quotes eld
+\end_inset
+
+Browse Packages
+\begin_inset Quotes erd
+\end_inset
+
+ to get a list of available packages.
+ To install one, right click on it or use the toolbar button to install
+ it.
+
+\end_layout
+
+\begin_layout Standard
+If your LaTeX distribution doesn't provide such a user interface, or if
+ the file is not available through the package browser, then you can follow
+ these steps.
\end_layout
\begin_layout Enumerate
\end_layout
\begin_layout Enumerate
-You can install this package in several different places.
+You can install the package in several different places.
If you want it to be available for all users on your system, then you should
install it in your `local' TeX tree; if you want (or need) it to be available
just for you, then you can install it in your own `user' TeX tree.
Where these should be created, if they do not already exist, depends upon
the details of your system.
- To find out, look in the file
+ To find out where they are, look in the file
\begin_inset Flex CharStyle:Code
status collapsed
\end_inset
- The location of the `local' TeX tree is defined by
+ The location of the `local' TeX tree is defined by the
\begin_inset Flex CharStyle:Code
status collapsed
\end_inset
-; this is usually somewhere like
+ variable; this is usually somewhere like
\begin_inset Flex CharStyle:Code
status collapsed
\end_layout
\begin_layout Enumerate
-Create your local
-\begin_inset Foot
+Your local and user trees must have the same sort of directory structure
+ as your main existing
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-We'll assume henceforth that you're defining `local' TeX tree.
- If you're defining a user tree, just adjust as necessary.
+texmf
\end_layout
\end_inset
- TeX tree.
- You must follow the directory structure of your existing
+ directory, which will be found at
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-texmf
+TEXMFMAIN
\end_layout
\end_inset
- directory, which will be found at
+ (commonly,
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-TEXMFMAIN
+/usr/share/texmf/
\end_layout
\end_inset
-.
- For example, latex packages should go under
+.) For example, latex packages should go under
\begin_inset Flex CharStyle:Code
status collapsed
$TEXMFLOCAL/tex/latex/
\end_layout
+\end_inset
+
+ or
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+$TEXMFHOME/tex/latex/
+\end_layout
+
\end_inset
.
\end_layout
\begin_layout Enumerate
-Install the package.
- For example, you would unpack the FoilTeX tarball and copy it to
+Once your tree is properly set up, you can install the package into an appropria
+te location.
+ For example, you might install the FoilTeX files into
\begin_inset Flex CharStyle:Code
status collapsed
\end_layout
\begin_layout Enumerate
-Run:
+Finally, you must update the database TeX uses to find files.
+ On MiKTeX, this is done by pressing the button
+\family sans
+Refresh
+\begin_inset space ~
+\end_inset
+
+FNDB
+\family default
+ that you find in MiKTeX's
+\begin_inset Quotes eld
+\end_inset
+
+Settings
+\begin_inset Quotes erd
+\end_inset
+
+ program.
+
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-texhash
+$TEXMFLOCAL/tex/latex/
\end_layout
\end_inset
.
- This should create
+ Under TeXLive and the like, you should run
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-$TEXMFLOCAL/ls-R
+texhash
\end_layout
\end_inset
- amongst others.
+ from a terminal, with root permissions if necessary.
+
\end_layout
\begin_layout Standard
Your package is now installed and available to LaTeX.
- To make it available to LyX, you need to create a Layout file, if one is
- not already available.
- (See the next section.) Once you have a layout file, you need only reconfigure
- (
-\begin_inset Flex CharStyle:MenuItem
+ You can verify this from a terminal by typing `
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Tools\SpecialChar \menuseparator
-Reconfigure
+kpsewhich yourfile.ext
\end_layout
\end_inset
-) and then restart LyX.
- You should then see your new package—for example
+'.
+ To make LyX aware of it, however, you will need to reconfigure (
\begin_inset Flex CharStyle:MenuItem
status collapsed
\begin_layout Plain Layout
-slides (FoilTeX)
+Tools\SpecialChar \menuseparator
+Reconfigure
\end_layout
\end_inset
-—under
+) and then restart LyX.
+ If the new package was a document class, such as FoilTeX again, you will
+ now see it—
\begin_inset Flex CharStyle:MenuItem
status collapsed
\begin_layout Plain Layout
-Document\SpecialChar \menuseparator
-Settings
+slides (FoilTeX)
\end_layout
\end_inset
- in the
+—available under
\begin_inset Flex CharStyle:MenuItem
status collapsed
\begin_layout Plain Layout
+Document\SpecialChar \menuseparator
+Settings\SpecialChar \menuseparator
Document Class
\end_layout
\end_inset
- drop box.
+.
\end_layout
+\begin_layout Standard
+Unless, of course, no layout file is available for your new document class.
+ That is the topic of the next section.
+\end_layout
+
\begin_layout Section
Layouts
\end_layout
\end_inset
- text class format as an example.
+ text class as an example.
The
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-.layout
+*.layout
\end_layout
\end_inset
files describe what paragraph and character styles are available for a
- given document class and how LyX should display them.
- We try to provide a thorough description of the process here; however,
- there are so many different types of documents supported by LaTeX classes
- that we can't hope to cover every different possibility or problem you
- might encounter.
- (The LyX users' list is frequented by people with lots of experience with
- layout design who are willing to share what they've learned.)
+ given document class, how LyX should display them, and how they should
+ be translated into LaTeX, DocBook, XHTML, or whatever output format is
+ being used.
+
+\end_layout
+
+\begin_layout Standard
+We shall try to provide a thorough description of the process of writing
+ layout files here.
+ However, there are so many different types of documents supported by even
+ just LaTeX that we can't hope to cover every different possibility or problem
+ you might encounter.
+ The LyX users' list is frequented by people with lots of experience with
+ layout design who are willing to share what they've learned, so please
+ feel free to ask questions there.
\end_layout
\begin_layout Standard
As you prepare to write a new layout, it is extremely helpful to look at
- the example layouts distributed with LyX.
- If you use a nice LaTeX document class that might be of interest for others,
- too, and have a nice corresponding LyX layout, feel free to contribute
- the stuff to us, so we may put it into the distribution.
- There is also a
+ the layouts distributed with LyX.
+ If you use a nice LaTeX document class that might also be of interest for
+ others and so write a corresponding LyX layout, you should consider posting
+ your layout to the
\begin_inset CommandInset href
LatexCommand href
-name "section on the LyX wiki"
+name "layout section on the LyX wiki"
target "http://wiki.lyx.org/Layouts/Layouts"
\end_inset
- for this kind of material.
+ or even to the LyX developers' list, so that it might be included in LyX
+ itself.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+Note that LyX is licensed under the General Public License, so any material
+ that is contribued to LyX must be similarly licensed.
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Standard
-All the tags described in this chapter are case-insensitive; this means
- that
+All the tags described here are case-insensitive; this means that
\begin_inset Flex CharStyle:Code
status collapsed
\end_inset
- are really the same command.
+ are really the same tag.
The possible values are printed in brackets after the feature's name.
The default value if a feature isn't specified inside a text class-description
is typeset
\end_layout
\begin_layout Subsection
+Layout modules
\begin_inset CommandInset label
LatexCommand label
name "sub:Layout-modules"
\end_inset
-Layout modules
+
\end_layout
\begin_layout Standard
-Similar to layout files, and new with LyX 1.6, are layout
+We have spoken to this point about `layout files'.
+ But there are different sorts of files that contain layout information.
+ Layout files, strictly so called, have the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+.layout
+\end_layout
+
+\end_inset
+
+ extension and provide LyX with information about document classes.
+ As of LyX 1.6, however, layout information can also be contained in layout
+
\emph on
modules
\emph default
-.
- Modules are to LaTeX packages much as layouts are to LaTeX classes, and
- some modules—such as the endnotes module—provide support for just such
- a package.
- In a sense, layout modules are similar to included files—files like
+, which have the
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-stdsections.inc
+.module
\end_layout
\end_inset
-—in that modules are not specific to a given document layout but may be
- used with many different layouts.
- The difference is that using a layout module does not require editing the
- layout file.
- Rather, modules are selected in the
-\begin_inset Flex CharStyle:MenuItem
+ extension.
+ Modules are to LaTeX packages much as layouts are to LaTeX classes, and
+ some modules—such as the
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Document\SpecialChar \menuseparator
-Settings
+endnotes
\end_layout
\end_inset
- dialog.
-\end_layout
+ module—specifcally provide support for one such package.
+ In a sense, layout modules are similar to included
+\begin_inset Foot
+status collapsed
-\begin_layout Standard
-Building modules is the easiest way to get started with layout editing,
- since it can be as simple as adding a single new paragraph or flex inset.
- But modules may, in principle, contain anything a layout file can contain.
+\begin_layout Plain Layout
+These can have any extension, but by convention have the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+.inc
\end_layout
-\begin_layout Standard
-A module must begin with a line like the following:
+\end_inset
+
+ extension.
\end_layout
-\begin_layout LyX-Code
-#
-\backslash
-DeclareLyXModule[endnotes.sty]{Endnotes}
+\end_inset
+
+ files—files like
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+stdsections.inc
\end_layout
-\begin_layout Standard
+\end_inset
-\change_inserted 0 1235082501
-The mandatory argument, in curly brackets, is the name of the module, as
- it should appear in
-\begin_inset Flex CharStyle:MenuItem
+—in that modules are not specific to a given document class but may be used
+ with many different classes.
+ The difference is that using an included file with
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
+article.cls
+\end_layout
+
+\end_inset
+
+ requires editing that file.
+ Modules, by contrast, are selected in the
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
-\change_inserted 0 1235082501
+\begin_layout Plain Layout
Document\SpecialChar \menuseparator
Settings
\end_layout
\end_inset
-.
-
-\change_unchanged
-The argument in square brackets is optional: It declares any LaTeX packages
- on which the module depends.
-
-\change_deleted 0 1235082500
+ dialog.
+\end_layout
+
+\begin_layout Standard
+Building modules is the easiest way to get started with layout editing,
+ since it can be as simple as adding a single new paragraph style or flex
+ inset.
+ But modules may, in principle, contain anything a layout file can contain.
+\end_layout
+
+\begin_layout Standard
+A module must begin with a line like the following:
+\end_layout
+
+\begin_layout LyX-Code
+#
+\backslash
+DeclareLyXModule[endnotes.sty]{Endnotes}
+\end_layout
+
+\begin_layout Standard
The mandatory argument, in curly brackets, is the name of the module, as
it should appear in
\begin_inset Flex CharStyle:MenuItem
\end_inset
.
-
-\change_inserted 0 1235082535
-Please note that only packages about which LyX knows should be listed in
+ The argument in square brackets is optional: It declares any LaTeX packages
+ on which the module depends.
+ Please note that only packages about which LyX knows should be listed in
the square brackets.
\begin_inset Foot
-status open
+status collapsed
\begin_layout Plain Layout
-
-\change_inserted 0 1235082591
The list of such packages is documented only in the source code.
-\change_unchanged
-
\end_layout
\end_inset
LyX will not check for arbitrary packages.
-\change_unchanged
+ It is also possible to use the form
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+from->to
+\end_layout
+
+\end_inset
+
+, which declares that the module can only be used when there exists a conversion
+ chain between the formats `
+\begin_inset Flex CharStyle:Code
+status collapsed
+\begin_layout Plain Layout
+from
+\end_layout
+
+\end_inset
+
+' and `
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+to
+\end_layout
+
+\end_inset
+
+'.
\end_layout
\begin_layout Standard
\emph on
filenames
\emph default
- without the .module extension.
+ without the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+.module
+\end_layout
+
+\end_inset
+
+ extension.
So
\begin_inset Flex CharStyle:Code
status collapsed
In fact,
\emph on
it is strongly recommended that you not attempt to edit modules while simultaneo
-usly working on documents
+usly working on actual documents
\emph default
.
Though of course the developers strive to keep LyX stable in such situations,
\end_layout
\begin_layout Subsection
-Supporting new document classes
+A layout for a
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+sty
+\end_layout
+
+\end_inset
+
+ file
\end_layout
\begin_layout Standard
) files.
Supporting a style file is usually fairly easy.
Supporting a new document class is a bit harder.
+ We'll discuss the former in this section and the latter in the next.
+ Similar remarks apply, of course, if you want to support a new DocBook
+ DTD.
\end_layout
-\begin_layout Subsection
-A layout for a
+\begin_layout Standard
+The easier case is the one in which your new document class is provided
+ as a style file that is to be used in conjunction with an already supported
+ document class.
+ For the sake of the example, we'll assume that the style file is called
+
\begin_inset Flex CharStyle:MenuItem
status collapsed
\begin_layout Plain Layout
-sty
+myclass.sty
\end_layout
\end_inset
- file
-\end_layout
-
-\begin_layout Standard
-If your new document class is provided as a style file that is used in conjuncti
-on with an existing, supported document class—for the sake of the example,
- we'll assume that the style file is called
+ and that it is meant to be used with
\begin_inset Flex CharStyle:MenuItem
status collapsed
\begin_layout Plain Layout
-myclass.sty
+report.cls
\end_layout
\end_inset
- and it is meant to be used with
-\begin_inset Flex CharStyle:MenuItem
+, which is a standard class.
+
+\end_layout
+
+\begin_layout Standard
+Start by copying the existing class's layout file into your local directory:
+\begin_inset Foot
status collapsed
\begin_layout Plain Layout
-report.cls
+Of course, which directory is your local directory will vary by platform,
+ and LyX allows you to specify your local directory on startup, too, using
+ the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+-userdir
+\end_layout
+
+\end_inset
+
+ option.
\end_layout
\end_inset
-, which is a standard class—start by copying the existing class's layout
- file into your local directory:
+
\end_layout
\begin_layout LyX-Code
in this example—so you can fiddle around with the settings for the different
sections if you wish.
-\end_layout
-
-\begin_layout Subsection
-Layout for a
-\begin_inset Flex CharStyle:MenuItem
+ The layout information for sections is contained in
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-cls
+stdsections.inc
\end_layout
\end_inset
- file
-\end_layout
-
-\begin_layout Standard
-There are two possibilities here.
- One is that the class file is itself based upon an existing document class.
- For example, many thesis classes are based upon
-\begin_inset Flex CharStyle:MenuItem
+, but you do not need to copy and change this file.
+ Instead, you can simply add your changes to your layout file, after the
+ line
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-book.cls
+Input stdclass.inc
\end_layout
\end_inset
-.
- To see whether yours is, look for a line like
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-LoadClass{book}
-\end_layout
-
-\begin_layout Standard
-in the file.
- If so, then you may proceed largely as in the previous section, though
- the DeclareLaTeXClass line will be different.
- If your new class is thesis, and it is based upon book, then the line should
- read:
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-And it will be easiest if you save the file to
+, which itself includes
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-thesis.layout
+stdsections.inc
\end_layout
\end_inset
-: LyX assumes that the document class has the same name as the layout file.
-
+.
+ For example, you might add these lines:
\end_layout
-\end_inset
-
-
+\begin_layout LyX-Code
+Style Chapter
\end_layout
\begin_layout LyX-Code
-
-\backslash
-DeclareLaTeXClass[thesis,book]{thesis}
+ Font
\end_layout
-\begin_layout Standard
-If, on the other hand, the new class is not based upon an existing class,
- you will probably have to
-\begin_inset Quotes eld
-\end_inset
-
-roll your own
-\begin_inset Quotes erd
-\end_inset
+\begin_layout LyX-Code
+ Family Sans
+\end_layout
- layout.
- We strongly suggest copying an existing layout file which uses a similar
- LaTeX class and then modifying it, if you can do so.
- At least use an existing file as a starting point so you can find out what
- items you need to worry about.
- Again, the specifics are covered below.
+\begin_layout LyX-Code
+ EndFont
\end_layout
-\begin_layout Section
-Declaring a new text class
+\begin_layout LyX-Code
+End
\end_layout
\begin_layout Standard
-When it's finally time to get your hands dirty and create or edit your own
- layout file, the following sections describe what you're up against.
- Our advice is to go slowly, save and test often, listen to soothing music,
- and enjoy one or two of your favorite adult beverages; more if you are
- getting particularly stuck.
- It's really not that hard, except that the multitude of options can become
- overwhelming if you try to do to much in one sitting.
- Go have another adult beverage, just for good measure.
+to change the font for chapter headings to sans-serif.
+ This will override (or, in this case, add to) the existing declaration
+ for the Chapter style.
+
\end_layout
\begin_layout Standard
-Here we go!
+Your new package may also provide commands or environments not present in
+ the base class.
+ In this case, you will want to add these to the layout file.
+ See
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:TextClass"
+
+\end_inset
+
+ for information on how to do so.
\end_layout
\begin_layout Standard
-Lines in a layout file which begin with a
-\begin_inset Flex CharStyle:Code
+If
+\begin_inset Flex CharStyle:MenuItem
status collapsed
\begin_layout Plain Layout
-#
+myclass.sty
\end_layout
\end_inset
- are comments.
- There is one exception to this rule: all layouts should begin with lines
- like:
+ can be used with several different document classes, and even if it cannot,
+ you might find it easiest just to write a module that you can load with
+ the base class.
+ The simplest possible such module would be:
\end_layout
\begin_layout LyX-Code
-
-\size small
-#% Do not delete the line below; configure depends on this
+#
+\backslash
+DeclareLyXModule{My Class}
\end_layout
\begin_layout LyX-Code
+#DescriptionBegin
+\end_layout
-\size small
-#
-\backslash
-DeclareLaTeXClass{article}
+\begin_layout LyX-Code
+#Support for myclass.sty.
\end_layout
-\begin_layout Standard
-The second line is used when you configure LyX.
- The layout file is read by the LaTeX script
-\begin_inset Flex CharStyle:Code
-status collapsed
+\begin_layout LyX-Code
+#DescriptionEnd
+\begin_inset Newline newline
+\end_inset
+
-\begin_layout Plain Layout
-chkconfig.ltx
\end_layout
+\begin_layout LyX-Code
+Format 11
+\begin_inset Newline newline
\end_inset
-, in a special mode where
-\begin_inset Flex CharStyle:Code
-status collapsed
-\begin_layout Plain Layout
-#
\end_layout
+\begin_layout LyX-Code
+Preamble
+\begin_inset Newline newline
\end_inset
- is ignored.
- The first line is just a LaTeX comment, and the second one contains the
- declaration of the text class.
+
+\backslash
+usepackage{myclass}
+\begin_inset Newline newline
+\end_inset
+
+EndPreamble
+\end_layout
+
+\begin_layout Standard
+A more complex module might modify the behavior of some existing constructs
+ or define some new ones.
+ Again, see
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:TextClass"
+
+\end_inset
+
+ for discussion.
+\end_layout
+
+\begin_layout Subsection
+Layout for a
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+cls
+\end_layout
+
+\end_inset
+
+ file
+\end_layout
+
+\begin_layout Standard
+There are two possibilities here.
+ One is that the class file is itself based upon an existing document class.
+ For example, many thesis classes are based upon
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+book.cls
+\end_layout
+
+\end_inset
+
+.
+ To see whether yours is, look for a line like
+\end_layout
+
+\begin_layout LyX-Code
+
+\backslash
+LoadClass{book}
+\end_layout
+
+\begin_layout Standard
+in the file.
+ If so, then you may proceed largely as in the previous section, though
+ the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+DeclareLaTeXClass
+\end_layout
+
+\end_inset
+
+ line will be different.
+ If your new class is
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+thesis
+\end_layout
+
+\end_inset
+
+ and it is based upon
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+book
+\end_layout
+
+\end_inset
+
+, then the line should read:
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+And it will be easiest if you save the file to
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+thesis.layout
+\end_layout
+
+\end_inset
+
+: LyX assumes that the document class has the same name as the layout file.
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\backslash
+DeclareLaTeXClass[thesis,book]{thesis}
+\end_layout
+
+\begin_layout Standard
+If, on the other hand, the new class is not based upon an existing class,
+ you will probably have to
+\begin_inset Quotes eld
+\end_inset
+
+roll your own
+\begin_inset Quotes erd
+\end_inset
+
+ layout.
+ We strongly suggest copying an existing layout file which uses a similar
+ LaTeX class and then modifying it, if you can do so.
+ At least use an existing file as a starting point so you can find out what
+ items you need to worry about.
+ Again, the specifics are covered below.
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:TextClass"
+
+\end_inset
+
+Declaring a new text class
+\end_layout
+
+\begin_layout Standard
+When it's finally time to get your hands dirty and create or edit your own
+ layout file, the following sections describe what you're up against.
+ Our advice is to go slowly, save and test often, listen to soothing music,
+ and enjoy one or two of your favorite adult beverages; more if you are
+ getting particularly stuck.
+ It's really not that hard, except that the multitude of options can become
+ overwhelming if you try to do too much in one sitting.
+ Go have another adult beverage, just for good measure.
+\end_layout
+
+\begin_layout Standard
+Here we go!
+\end_layout
+
+\begin_layout Standard
+Lines in a layout file which begin with
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+#
+\end_layout
+
+\end_inset
+
+ are comments.
+ There is one exception to this rule.
+ All
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+*.layout
+\end_layout
+
+\end_inset
+
+ files should begin with a line like:
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+#% Do not delete the line below; configure depends on this
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+#
+\backslash
+DeclareLaTeXClass{article}
+\end_layout
+
+\begin_layout Standard
+The second line is used when you configure LyX.
+ The layout file is read by the LaTeX script
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+chkconfig.ltx
+\end_layout
+
+\end_inset
+
+, in a special mode where
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+#
+\end_layout
+
+\end_inset
+
+ is ignored.
+ The first line is just a LaTeX comment, and the second one contains the
+ declaration of the text class.
If these lines appear in a file named
\begin_inset Flex CharStyle:Code
status collapsed
\end_layout
\begin_layout Standard
-This indicates that your text class uses the foo.sty package.
+This indicates that your text class uses the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+foo.sty
+\end_layout
+
+\end_inset
+
+ package.
Finally, it is also possible to declare classes for DocBook code.
- Typical declarations will look like
+ Typical declarations will look like:
\end_layout
\begin_layout LyX-Code
\end_inset
-, exit LyX and restart it.
+, exit LyX and restart.
Then your new text class should be available along with the others.
\end_layout
\begin_layout Standard
-In versions of LyX prior to 1.6, you had to restart LyX to see any changes
- you made to your layout files.
- As a result, editing layout files could be very time consuming.
- Beginning with 1.6, however, you can force a reload of the layout currently
- in use by using the LyX function
+Once the layout file is installed, you can edit it and see your changes
+ without having to reconfigure or to restart LyX.
+ In versions of LyX prior to 1.6, this was not true.
+ As a result, editing layout files was very time consuming.
+ Beginning with 1.6, however, you can force a reload of the current layout
+ by using the LyX function
\begin_inset Flex CharStyle:MenuItem
status collapsed
.
There is no default binding for this function—though, of course, you can
bind it to a key yourself.
- If you want to use this function, then, you should simply enter it in the
- mini-buffer.
+ But you will normally use this function simply by entering it in the mini-buffe
+r.
+\end_layout
+
+\begin_layout Standard
+
\emph on
Warning
\emph default
-: This is very much an `advanced feature'.
+:
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+layout-reload
+\end_layout
+
+\end_inset
+
+ is very much an `advanced feature'.
It is
\emph on
strongly
\emph on
strongly
\emph default
- recommended that you not attempt to edit your layout while simultaneously
- working on a document that you care about.
+ recommended that you not attempt to edit layout information while simultaneousl
+y working on a document that you care about.
Use a test document.
Syntax errors and the like in your layout file could cause peculiar behavior.
In particular, such errors could cause LyX to regard the current layout
as invalid and to attempt to switch to some other layout.
The LyX team strives to keep LyX stable in such situations, but safe is
better than sorry.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+While we're giving advice: make regular backups.
+ And be nice to your mother.
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Subsection
\end_layout
\begin_layout Standard
-The first non-comment line must contain the file format number:
+The first non-comment line of any layout file, included file, or module
+
+\emph on
+must
+\emph default
+ contain the file format number:
\end_layout
\begin_layout Description
\end_inset
-] This tag was introduced with LyX 1.4.0 (layout files of LyX 1.3.x and earlier
- don't have an explicit file format).
- The file format that is documented here is format 1
-\change_deleted 2 1234611237
-2
-\change_inserted 2 1234611237
-4
-\change_unchanged
-.
-\change_deleted 1 1234946903
-
+] The format of the layout file.
\end_layout
-\begin_layout Subsection
-General text class parameters
+\begin_layout Standard
+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
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+20
+\end_layout
+
+\end_inset
+
+.
+ But LyX is capable of reading earlier formats, too, just as it is 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
+ 11 or earlier.
+\end_layout
+
+\begin_layout Subsection
+General text class parameters
\end_layout
\begin_layout Standard
\begin_inset Flex CharStyle:Code
status collapsed
+\begin_layout Plain Layout
+AddToHTMLPreamble
+\end_layout
+
+\end_inset
+
+ Adds information that will be output in the
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+<head>
+\end_layout
+
+\end_inset
+
+ block when this document class is output to XHTML.
+ Typically, this would be used to output CSS style information, but it can
+ be used for anything that can appear in
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+<head>
+\end_layout
+
+\end_inset
+
+.
+ Must end with
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+EndPreamble
+\end_layout
+
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
\begin_layout Plain Layout
AddToPreamble
\end_layout
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:classoptions"
+reference "sub:ClassOptions"
\end_inset
\end_inset
-] Whether the class should default to having one or two columns.
+] Whether the class should
+\emph on
+default
+\emph default
+ to having one or two columns.
Can be changed in the
\begin_inset Flex CharStyle:MenuItem
status collapsed
\end_inset
- This sequence defines a new counter.
- See Section
-\begin_inset space ~
-\end_inset
-
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:counter"
+\begin_layout Plain Layout
+string
+\end_layout
\end_inset
- for details.
+] This sequence defines the properties for a counter.
+ If the counter does not yet exist, it is created; if it does exist, it
+ is modified.
Must end with
\begin_inset Quotes eld
\end_inset
\end_inset
.
+\begin_inset Newline newline
+\end_inset
+
+See Section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Counters"
+
+\end_inset
+
+ for details on counters.
\end_layout
\begin_layout Description
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:fonts"
+reference "sub:Font-description"
\end_inset
\end_inset
- Specifies a module to be included by default with this document class,
- which should be specified by filename without the
+ Specifies a module to be included by default with this document class.
+ The module should be specified by filename without the
\begin_inset Flex CharStyle:Code
status collapsed
.
This will default to the first defined style if not given, but you are
- highly encouraged to use this directive.
+ encouraged to use this directive.
\end_layout
\begin_layout Description
\end_inset
-] Indicates that the module in question—which should be specified by filename
- without the
+] This tag indicates that the module in question—which should be specified
+ by filename without the
\begin_inset Flex CharStyle:Code
status collapsed
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:floats"
+reference "sub:Floats"
\end_inset
status collapsed
\begin_layout Plain Layout
-Input
+HTMLPreamble
\end_layout
\end_inset
- As its name implies, this command allows you to include another layout
- definition file within yours to avoid duplicating commands.
- Common examples are the standard layout files, for example,
+ Sets the information that will be output in the
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-stdclass.inc
+<head>
\end_layout
\end_inset
-, which contains most of the basic layouts.
-\end_layout
-
-\begin_layout Description
+ block when this document class is output to XHTML.
+ Note that this will completely override any prior
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-InsetLayout
+HTMLPreamble
\end_layout
\end_inset
- This section (re-)defines the layout of an inset.
- It can be applied to an existing inset of to a new, user-defined inset,
- e.
-\begin_inset space \thinspace{}
-\end_inset
+ or
+\begin_inset Flex CharStyle:Code
+status collapsed
-g.
-\begin_inset space \space{}
-\end_inset
+\begin_layout Plain Layout
+AddToHTMLPreamble
+\end_layout
-a new character style.
- See Section
-\begin_inset space ~
\end_inset
+ declarations.
+ (Use
+\begin_inset Flex CharStyle:Code
+status collapsed
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:charstyle"
+\begin_layout Plain Layout
+AddToHTMLPreamble
+\end_layout
\end_inset
- for more information.
- Must end with
+ if you just want to add material to the preamble.) Must end with
\begin_inset Quotes eld
\end_inset
status collapsed
\begin_layout Plain Layout
-End
+EndPreamble
\end_layout
\end_inset
status collapsed
\begin_layout Plain Layout
-LeftMargin
+IfCounter
\end_layout
\end_inset
- A string that indicates the width of the left margin on the screen, for
- example,
-\begin_inset Quotes eld
-\end_inset
-
-MMMMM
-\begin_inset Quotes erd
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
+ [
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-NoFloat
+string
\end_layout
\end_inset
- This command deletes an existing float.
- This is particularly useful when you want to suppress a float that has
- be defined in an input file.
-\end_layout
+] Modifies the properties of the given counter.
+ If the counter does not exist, the section is ignored.
+ Must end with
+\begin_inset Quotes eld
+\end_inset
+
-\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-NoStyle
+End
\end_layout
\end_inset
- This command deletes an existing style.
- This is particularly useful when you want to suppress a style that has
- be defined in an input file.
-\end_layout
-\begin_layout Description
-\begin_inset Flex CharStyle:Code
-status collapsed
+\begin_inset Quotes erd
+\end_inset
-\begin_layout Plain Layout
-OutputType
-\end_layout
+.
+\begin_inset Newline newline
+\end_inset
+See Section
+\begin_inset space ~
\end_inset
- A string indicating what sort of output documents using this class will
- produce.
- At present, the options are: `docbook', `latex', and `literate'.
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Counters"
+
+\end_inset
+
+ for details on counters.
\end_layout
\begin_layout Description
status collapsed
\begin_layout Plain Layout
-
-\series medium
-PageStyle
+IfStyle
\end_layout
\end_inset
[
-\emph on
-
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\emph on
-plain
+string
\end_layout
\end_inset
-
-\emph default
-,
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-empty
-\end_layout
-
+] Modifies the properties of the given paragraph style.
+ If the style does not exist, the section is ignored.
+ Must end with
+\begin_inset Quotes eld
\end_inset
-,
+
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-headings
+End
\end_layout
\end_inset
-] The class default pagestyle.
- Can be changed in the
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-Document\SpecialChar \menuseparator
-Settings
-\end_layout
+\begin_inset Quotes erd
\end_inset
- dialog.
+.
\end_layout
\begin_layout Description
status collapsed
\begin_layout Plain Layout
-Preamble
+Input
\end_layout
\end_inset
- Sets the preamble for the LaTeX document.
- Note that this will completely override any prior
+ As its name implies, this command allows you to include another layout
+ definition file within yours to avoid duplicating commands.
+ Common examples are the standard layout files, for example,
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Preamble
+stdclass.inc
\end_layout
\end_inset
- or
+, which contains most of the basic layouts.
+\end_layout
+
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-AddToPreamble
+InsetLayout
\end_layout
\end_inset
- declarations.
+ This section (re-)defines the layout of an inset.
+ It can be applied to an existing inset or to a new, user-defined inset,
+ e.g., a new character style.
Must end with
\begin_inset Quotes eld
\end_inset
status collapsed
\begin_layout Plain Layout
-EndPreamble
+End
\end_layout
\end_inset
\end_inset
.
+\begin_inset Newline newline
+\end_inset
+
+See Section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Flex-insets-and"
+
+\end_inset
+
+ for more information.
+
\end_layout
\begin_layout Description
status collapsed
\begin_layout Plain Layout
-Provides
+LeftMargin
\end_layout
\end_inset
\end_inset
-] [
-\begin_inset Flex CharStyle:Code
-status collapsed
+] A string that indicates the width of the left margin on the screen, for
+ example,
+\begin_inset Quotes eld
+\end_inset
-\begin_layout Plain Layout
+MMMMM
+\begin_inset Quotes erd
+\end_inset
-\emph on
+.
+ (Note that this is not a `length', like
+\begin_inset Quotes eld
+\end_inset
+
+2ex
+\begin_inset Quotes erd
+\end_inset
+
+.)
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+NoFloat
+\end_layout
+
+\end_inset
+
+ This command deletes an existing float.
+ This is particularly useful when you want to suppress a float that has
+ been defined in an input file.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+NoStyle
+\end_layout
+
+\end_inset
+
+ This command deletes an existing style.
+ This is particularly useful when you want to suppress a style that has
+ be defined in an input file.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+OutputFormat
+\end_layout
+
+\end_inset
+
+ A string indicating the file format (as defined in the Preferences dialog)
+ produced by this class.
+ It is mainly useful when
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+OutputType
+\end_layout
+
+\end_inset
+
+ is `literate' and one wants to define a new type of literate document.
+ This string is reset to `docbook', `latex', or `literate' when the correspondin
+g
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+OutputType
+\end_layout
+
+\end_inset
+
+ parameter is encountered.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+OutputType
+\end_layout
+
+\end_inset
+
+ A string indicating what sort of output documents using this class will
+ produce.
+ At present, the options are: `docbook', `latex', and `literate'.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+PageStyle
+\end_layout
+
+\end_inset
+
+ [
+\emph on
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+plain
+\end_layout
+
+\end_inset
+
+
+\emph default
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+empty
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+headings
+\end_layout
+
+\end_inset
+
+] The default pagestyle.
+ Can be changed in the
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Document\SpecialChar \menuseparator
+Settings
+\end_layout
+
+\end_inset
+
+ dialog.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Preamble
+\end_layout
+
+\end_inset
+
+ Sets the preamble for the LaTeX document.
+ Note that this will completely override any prior
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Preamble
+\end_layout
+
+\end_inset
+
+ or
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+AddToPreamble
+\end_layout
+
+\end_inset
+
+ declarations.
+ (Use
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+AddToPreamble
+\end_layout
+
+\end_inset
+
+ if you just want to add material to the preamble.) Must end with
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+EndPreamble
+\end_layout
+
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Provides
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
0
\end_layout
\end_inset
tag to indicate that it ought to be used.
- It could be used in a module that provided an alternate implementation
+ It could also be used in a module that provided an alternate implementation
of the same functionality.
\end_layout
.
Multiple features must be separated by commas.
Note that you can only request supported features.
+ (Again, see
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LaTeXFeatures.cpp
+\end_layout
+
+\end_inset
+
+ for a list of these.)
\end_layout
\begin_layout Description
\end_inset
- This sequence defines a new paragraph style.
- If the style already exists, it will redefine some of its parameters instead.
- See Section
-\begin_inset space ~
-\end_inset
-
-
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:style"
-
-\end_inset
-
- for details.
+ This sequence defines a paragraph style.
+ If the style does not yet exist, it is created; if it does exist, its parameter
+s are modified.
Must end with
\begin_inset Quotes eld
\end_inset
\end_inset
.
-\end_layout
+\begin_inset Newline newline
+\end_inset
-\begin_layout Description
-\begin_inset Flex CharStyle:Code
+See Section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Paragraph-Styles"
+
+\end_inset
+
+ for details on paragraph styles.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
\end_inset
section
-\end_layout
-
-\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
-name "sec:classoptions"
+name "sub:ClassOptions"
\end_inset
+
+\end_layout
+
+\begin_layout Standard
The
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Subsection
Paragraph Styles
-\end_layout
-
-\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
-name "sec:style"
+name "sub:Paragraph-Styles"
\end_inset
+
+\end_layout
+
+\begin_layout Standard
A paragraph style description looks like this:
\begin_inset Foot
status collapsed
\begin_inset Flex CharStyle:Code
status collapsed
+\begin_layout Plain Layout
+BabelPreamble
+\end_layout
+
+\end_inset
+
+ Language dependent information to be included in the LaTeX preamble when
+ this style is used.
+ Note that this will completely override any prior
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+BabelPreamble
+\end_layout
+
+\end_inset
+
+ declarations.
+ Must end with
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+EndBabelPreamble
+\end_layout
+
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ The contents of this tag will occur once in the LaTeX preamble for each
+ language used by the document.
+ Each time, the following substitutions are made:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+$$lang
+\end_layout
+
+\end_inset
+
+ is replaced by the language name (as used by the babel package).
+\end_layout
+
+\begin_layout Itemize
+The
+\begin_inset Quotes eld
+\end_inset
+
+Function
+\begin_inset Quotes erd
+\end_inset
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+_()
+\end_layout
+
+\end_inset
+
+ replaces its argument by the translation of the argument to the current
+ language.
+\end_layout
+
+\begin_layout Standard
+This preamble snippet will only be used if the document contains more than
+ one language and the babel package is used.
+\end_layout
+
+\end_deeper
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
\begin_layout Plain Layout
BottomSep
\end_layout
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:fonts"
+reference "sub:Font-description"
\end_inset
status collapsed
\begin_layout Plain Layout
-
-\change_inserted 2 1234613251
-Babel
-\change_deleted 2 1234611266
-I18N
-\change_unchanged
-Preamble
+HTML*
\end_layout
\end_inset
- Language dependent information to be included in the LaTeX preamble when
- this style is used.
- Note that this will completely override any prior
+ These tags are used with XHTML output.
+\end_layout
+
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\change_inserted 2 1234613436
-Babel
-\change_deleted 2 1234611275
-I18N
-\change_unchanged
-Preamble
+InnerTag
\end_layout
\end_inset
- declarations.
- Must end with
-\begin_inset Quotes eld
-\end_inset
-
+ [[FIXME]] (Used only with XML-type formats.)
+\end_layout
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-End
-\change_deleted 2 1234611280
-I18N
-\change_inserted 2 1234613262
-Babel
-\change_unchanged
-Preamble
+InPreamble
\end_layout
\end_inset
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+[1, 0]
+\end_layout
-\begin_inset Quotes erd
\end_inset
-.
- The contents of this tag will occur once in the LaTeX preamble for each
- language used by the document.
- Each time, the following substitutions are made:
+ If 1, marks the layout as to be included in the document preamble rather
+ than in the document body.
+ This is useful for document classes that want such information as the title
+ and author to appear in the preamble.
\end_layout
-\begin_deeper
-\begin_layout Itemize
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-$$lang
+InTitle
\end_layout
\end_inset
- is replaced by the language name (as used by the babel package).
-\end_layout
+
+\begin_inset Flex CharStyle:Code
+status collapsed
-\begin_layout Itemize
-The
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Plain Layout
+[1, 0]
+\end_layout
-Function
-\begin_inset Quotes erd
\end_inset
-
+ If 1, marks the layout as being part of a title block (see also the
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-_()
+TitleLatexType
\end_layout
\end_inset
- replaces its argument by the translation of the argument to the current
- language.
-\change_inserted 2 1234611470
+ and
+\begin_inset Flex CharStyle:Code
+status collapsed
+\begin_layout Plain Layout
+TitleLatexName
\end_layout
-\begin_layout Standard
-
-\change_inserted 2 1234615134
-This preamble snippet will only be used if the document contains more than
- one language and the babel package is used.
-\change_unchanged
+\end_inset
+ global entries).
\end_layout
-\end_deeper
\begin_layout Description
-
-\change_inserted 2 1234614203
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\change_inserted 2 1234614202
-LangPreamble
+ItemSep
\end_layout
\end_inset
- Like
+ [
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\change_inserted 2 1234614202
-BabelPreamble
+float=0
\end_layout
\end_inset
-, but this preamble snippet occurs independently from the babel package,
- and only for the document language.
- Must end with
-\begin_inset Quotes eld
-\end_inset
-
-
+] This provides extra space between paragraphs that have the same layout.
+ If you put other layouts into an environment, each is separated with the
+ environment's
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\change_inserted 2 1234614202
-EndLangPreamble
+Parsep
\end_layout
\end_inset
+.
+ But the whole items of the environment are additionally separated with
+ this
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Itemsep
+\end_layout
-\begin_inset Quotes erd
\end_inset
.
+ Note that this is a
+\emph on
+ multiplier.
\end_layout
-\begin_deeper
-\begin_layout Standard
-If the style defines text that appears in the typeset document, it may use
-
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\change_inserted 2 1234611302
-Lang
-\change_deleted 2 1234611306
-I18N
-\change_unchanged
-Preamble
+ItemTag
\end_layout
\end_inset
+ [[FIXME]] (Used only with XML-type formats.)
+\end_layout
-\change_inserted 2 1234611823
- and
-\change_unchanged
-
-\change_inserted 2 1234611832
-
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\change_inserted 2 1234611838
-BabelPreamble
+KeepEmpty
\end_layout
\end_inset
-\change_unchanged
-to support non-english and even multilanguage documents correctly.
- The following excerpt (from the
+\begin_inset CommandInset label
+LatexCommand label
+name "des:KeepEmpty"
+
+\end_inset
+
+[
+\emph on
+
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-theorems-ams.inc
+
+\emph on
+0
\end_layout
\end_inset
- file) shows how this works:
-\end_layout
-\begin_layout LyX-Code
-Preamble
-\end_layout
-
-\begin_layout LyX-Code
-
-\change_deleted 2 1234612061
-
-\backslash
-providecommand{
-\backslash
-claimname}{Claim}
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-theoremstyle{remark}
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-newtheorem{claim}[thm]{
-\backslash
-protect
-\backslash
-claimname}
-\end_layout
+\emph default
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
-\begin_layout LyX-Code
-EndPreamble
+\begin_layout Plain Layout
+1
\end_layout
-\begin_layout LyX-Code
+\end_inset
-\change_inserted 2 1234612037
-LangPreamble
+] Usually LyX does not allow you to leave a paragraph empty, since it would
+ lead to empty LaTeX output.
+ There are some cases where this could be desirable however: in a letter
+ template, the required fields can be provided as empty fields, so that
+ people do not forget them; in some special classes, a layout can be used
+ as some kind of break, which does not contain actual text.
\end_layout
-\begin_layout LyX-Code
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
-\change_inserted 2 1234612045
-
-\backslash
-providecommand{
-\backslash
-claimname}{_(Claim)}
+\begin_layout Plain Layout
+LabelBottomsep
\end_layout
-\begin_layout LyX-Code
+\end_inset
-\change_inserted 2 1234611897
+ [float=0] The vertical space between the label and the text body.
+ Only used for labels that are above the text body (
+\begin_inset Flex CharStyle:Code
+status collapsed
+\begin_layout Plain Layout
+Top_Environment
\end_layout
-\begin_layout LyX-Code
-
-\change_inserted 2 1234612050
-EndLangPreamble
-\end_layout
+\end_inset
-\begin_layout LyX-Code
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
-\change_inserted 2 1234611892
-Babel
-\change_deleted 2 1234611847
-I18n
-\change_unchanged
-Preamble
+\begin_layout Plain Layout
+Centered_Top_Environment
\end_layout
-\begin_layout LyX-Code
-
-\change_deleted 2 1234612079
-
-\backslash
-AtBeginDocument{
-\backslash
-ifx
-\backslash
-LdfInit
-\backslash
-undefined
-\backslash
-relax
-\backslash
-else%
-\end_layout
+\end_inset
-\begin_layout LyX-Code
-
-\backslash
-addto
-\backslash
-captions$$lang{
-\backslash
-renewcommand{
-\backslash
-claimname}{_(Claim)}}
-\change_deleted 2 1234612086
-%
+).
\end_layout
-\begin_layout LyX-Code
-
-\change_deleted 2 1234612089
-
-\backslash
-fi}
-\change_unchanged
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+\begin_layout Plain Layout
+LabelCounter
\end_layout
-\begin_layout LyX-Code
-End
-\change_inserted 2 1234611859
-Babel
-\change_deleted 2 1234611856
-I18n
-\change_unchanged
-Preamble
-\end_layout
+\end_inset
-\begin_layout Standard
-The key to correct translation of the user visible text is the definition
- of the command
+ [
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\backslash
-claimname
+string=""
\end_layout
\end_inset
- in the
-\change_inserted 2 1234612144
-language
-\change_deleted 2 1234612146
-standard
-\change_unchanged
- preamble.
- This command holds the name of the theorem that will appear in the output.
- The
+]
+\begin_inset Newline newline
+\end_inset
+
+The name of the counter for automatic numbering.
+
+\begin_inset Newline newline
+\end_inset
+
+This
+\emph on
+must
+\emph default
+ be given if
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\change_inserted 2 1234612157
-Babel
-\change_deleted 2 1234612155
-I18N
-\change_unchanged
-Preamble
+LabelType
\end_layout
\end_inset
- then uses the commands offered by the babel package to redefine
+ is
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\backslash
-claimname
+Counter
\end_layout
\end_inset
- for each used language
-\change_inserted 2 1234622073
- in multilanguage documents
-\change_unchanged
.
+ In that case, the counter will be stepped each time the layout appears.
+
+\begin_inset Newline newline
+\end_inset
-\change_deleted 2 1234612171
- The
+This
+\emph on
+may
+\emph default
+ also be given if
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\backslash
-ifx
-\backslash
-LdfInit
+LabelType
\end_layout
\end_inset
- test ensures that no LaTeX error occurs in documents that do not use babel.
- Since LyX loads babel after the style-specific preamble, the whole command
- is deferred to the actual start of the document with
+ is
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\backslash
-AtBeginDocument
+Enumerate
\end_layout
\end_inset
-.
-\change_unchanged
+, though this case is a bit complicated.
+ Suppose you declare
+\begin_inset Quotes eld
+\end_inset
-\end_layout
-\end_deeper
-\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-InnerTag
+LabelCounter myenum
\end_layout
\end_inset
- [[FIXME]] (Used only with XML-type formats.)
-\end_layout
-\begin_layout Description
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Then the actual counters used are
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-InTitle
+myenumi
\end_layout
\end_inset
-
+,
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-[1, 0]
+myenumii
\end_layout
\end_inset
- If 1, marks the layout as being part of a title block (see also the
+,
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-TitleLatexType
+myenumiii
\end_layout
\end_inset
- and
+, and
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-TitleLatexName
+myenumiv
\end_layout
\end_inset
- global entries).
+, much as in LaTeX.
+ These counters must all be declared separately.
+\begin_inset Newline newline
+\end_inset
+
+See Section
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Counters"
+
+\end_inset
+
+ for details on counters.
\end_layout
\begin_layout Description
status collapsed
\begin_layout Plain Layout
-ItemSep
+LabelFont
\end_layout
\end_inset
- [
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-float=0
-\end_layout
-
+ The font used for the label.
+ See section
+\begin_inset space ~
\end_inset
-] This provides extra space between paragraphs that have the same layout.
- If you put other layouts into an environment, each is separated with the
- environment's
-\begin_inset Flex CharStyle:Code
-status collapsed
-\begin_layout Plain Layout
-Parsep
-\end_layout
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Font-description"
\end_inset
.
- But the whole items of the environment are additionally separated with
- this
+\end_layout
+
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Itemsep
+LabelIndent
\end_layout
\end_inset
-.
- Note that this is a
-\emph on
- multiplier.
+ Text that indicates how far a label should be indented.
\end_layout
\begin_layout Description
status collapsed
\begin_layout Plain Layout
-ItemTag
+Labelsep
\end_layout
\end_inset
- [[FIXME]] (Used only with XML-type formats.)
-\end_layout
-
-\begin_layout Description
+ [
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-KeepEmpty
+string=""
\end_layout
\end_inset
-
-\begin_inset CommandInset label
-LatexCommand label
-name "des:KeepEmpty"
-
-\end_inset
-
-[
-\emph on
+] The horizontal space between the label and the text body.
+ Only used for labels that are not above the text body.
+\end_layout
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\emph on
-0
+LabelString
\end_layout
\end_inset
-
-\emph default
-,
+ [
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-1
+string=""
\end_layout
\end_inset
-] Usually LyX does not allow you to leave a paragraph empty, since it would
- lead to empty LaTeX output.
- There are some cases where this could be desirable however: in a letter
- template, the required fields can be provided as empty fields, so that
- people do not forget them; in some special classes, a layout can be used
- as some kind of break, which does not contain actual text.
-\end_layout
-
-\begin_layout Description
+] The string used for a label with a
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelBottomsep
+Static
\end_layout
\end_inset
- [float=0] The vertical space between the label and the text body.
- Only used for labels that are above the text body (
+ labeltype.
+ When
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Top_Environment
+LabelCounter
\end_layout
\end_inset
-,
+ is set, this string can be contain the special formatting commands described
+ in Section
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Counters"
+
+\end_inset
+
+.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+For the sake of backwards compatibility, the string
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Centered_Top_Environment
+@
+\emph on
+style-name
+\emph default
+@
\end_layout
\end_inset
-).
-\end_layout
-
-\begin_layout Description
+ will be replaced by the expanded
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelCounter
+LabelString
\end_layout
\end_inset
- [
+ of style
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-string=""
+
+\emph on
+style-name
\end_layout
\end_inset
-]
-\begin_inset Newline newline
-\end_inset
-
-The name of the counter for automatic numbering (see Section
+.
+ This feature is now obsolete and should be replaced by the mechanisms of
+ Section
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:counter"
+reference "sub:Counters"
\end_inset
- for details).
- This must be given if
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Labeltype
+LabelStringAppendix
\end_layout
\end_inset
- is
+ [
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Counter
+string=""
\end_layout
\end_inset
-.
-\end_layout
-
-\begin_layout Description
+] This is used inside the appendix instead of
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelFont
+LabelString
\end_layout
\end_inset
- The font used for the label.
- See section
-\begin_inset space ~
+.
+ Note that every
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelString
+\end_layout
+
\end_inset
+ statement resets
+\begin_inset Flex CharStyle:Code
+status collapsed
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:fonts"
+\begin_layout Plain Layout
+LabelStringAppendix
+\end_layout
\end_inset
-.
+ too.
\end_layout
\begin_layout Description
status collapsed
\begin_layout Plain Layout
-LabelIndent
+LabelTag
\end_layout
\end_inset
- Text that indicates how far a label should be indented.
+ [FIXME] (Used only with XML-type formats.)
\end_layout
\begin_layout Description
status collapsed
\begin_layout Plain Layout
-Labelsep
+LabelType
\end_layout
\end_inset
status collapsed
\begin_layout Plain Layout
-string=""
+
+\emph on
+No_Label
+\emph default
+, Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
+ Enumerate, Itemize, Bibliography
\end_layout
\end_inset
-] The horizontal space between the label and the text body.
- Only used for labels that are not above the text body.
+]
\end_layout
-\begin_layout Description
+\begin_deeper
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelString
+Manual
\end_layout
\end_inset
- [
-\begin_inset Flex CharStyle:Code
-status collapsed
+ means the label is the very first word (up to the first real blank).
+ Use protected spaces (like
+\begin_inset space ~
+\end_inset
-\begin_layout Plain Layout
-string=""
+that one) if you want more than one word as the label.
+
\end_layout
-\end_inset
-
-] The string used for a label with a
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\end_inset
- labeltype.
- When
+ means the label is simply whatever
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelCounter
+LabelString
\end_layout
\end_inset
- is set, this string can be contain the special formatting commands described
- in Section
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:counter"
-
-\end_inset
-
-.
-\begin_inset Foot
-status collapsed
+ declares it to be.
+ Note that this really is `static'.
+\end_layout
-\begin_layout Plain Layout
-For the sake of backwards compatibility, the string
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-@
-\emph on
-style-name
-\emph default
-@
+Top_Environment
\end_layout
\end_inset
- will be replaced by the expanded
+ and
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelString
+Centered_Top_Environment
\end_layout
\end_inset
- of style
+ are special cases of
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\emph on
-style-name
+Static
\end_layout
\end_inset
.
- This feature is now obsolete and should be replaced by the mechanisms of
- Section
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:counter"
-
-\end_inset
+ The label will be printed above the paragraph, but only at the top of an
+ environment or the top of a chain of paragraphs with this layout.
+ This might be used with the
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
-.
+\begin_layout Plain Layout
+Abstract
\end_layout
\end_inset
-
+ layout, for example.
\end_layout
-\begin_layout Description
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelStringAppendix
+Sensitive
\end_layout
\end_inset
- [
+ is a special case for the caption-labels
+\begin_inset Quotes eld
+\end_inset
+
+Figure
+\begin_inset Quotes erd
+\end_inset
+
+ and
+\begin_inset Quotes eld
+\end_inset
+
+Table
+\begin_inset Quotes erd
+\end_inset
+
+.
+
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-string=""
+Sensitive
\end_layout
\end_inset
-] This is used inside the appendix instead of
+ means the (hardcoded) label string depends on the kind of float: It is
+ hardcoded to be `FloatType N', where N is the value of the counter associated
+ with the float.
+\end_layout
+
+\begin_layout Itemize
+The
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelString
+Counter
\end_layout
\end_inset
-.
- Note that every
+ label type defines automatically numbered labels.
+ The
\begin_inset Flex CharStyle:Code
status collapsed
\end_inset
- statement resets
+ will be expanded to resolve any counter references it contains: For example,
+ it might be
+\begin_inset Quotes eld
+\end_inset
+
+
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelStringAppendix
+Section
+\backslash
+thechapter.
+\backslash
+thesection
\end_layout
\end_inset
- too.
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ See Section
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Counters"
+
+\end_inset
+
+ for more information on counters.
\end_layout
-\begin_layout Description
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelTag
+Enumerate
\end_layout
\end_inset
- [FIXME] (Used only with XML-type formats.)
+ produces the usual sort of enumeration labels.
+ At present, it is hardcoded to use Arabic numerals, lowercase letters,
+ small Roman numerals, and uppercase letters for the four possible depths.
\end_layout
-\begin_layout Description
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Labeltype
+Itemize
\end_layout
\end_inset
- [
+ produces various bullets at the different levels.
+ It is also hardcoded.
+\end_layout
+
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-
-\emph on
-No_Label
-\emph default
-, Manual, Static, Top_Environment,
-\begin_inset Newline newline
-\end_inset
-
-Centered_Top_Environment, Sensitive, Counter
+Bibliography
\end_layout
\end_inset
-]
-\begin_inset Newline newline
-\end_inset
-
-
+ is used internally by LyX and should be used only with
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Manual
+LatexType BibEnvironment
\end_layout
\end_inset
- means the label is the very first word (up to the first real blank).
-\begin_inset Foot
+.
+\end_layout
+
+\end_deeper
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Use protected spaces if you want more than one word as the label.
+LangPreamble
\end_layout
\end_inset
-
+ Like
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Static
+BabelPreamble
\end_layout
\end_inset
- means it is defined in the layout (see
+, but this preamble snippet occurs independently from the babel package,
+ and only for the document language.
+ Must end with
+\begin_inset Quotes eld
+\end_inset
+
+
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-LabelString
+EndLangPreamble
\end_layout
\end_inset
-).
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+If the style defines text that appears in the typeset document, it may use
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Top_Environment
+LangPreamble
\end_layout
\end_inset
status collapsed
\begin_layout Plain Layout
-Centered_Top_Environment
+BabelPreamble
\end_layout
\end_inset
- are special cases of
+ to support non-english and even multilanguage documents correctly.
+ The following excerpt (from the
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Static
+theorems-ams.inc
\end_layout
\end_inset
-.
- The label will be printed above the paragraph, but only at the top of an
- environment or the top of a chain of paragraphs with this layout.
- Usage is for example the
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
+ file) shows how this works:
+\end_layout
-\begin_layout Plain Layout
-Abstract
+\begin_layout LyX-Code
+Preamble
\end_layout
-\end_inset
+\begin_layout LyX-Code
+
+\backslash
+theoremstyle{remark}
+\end_layout
- layout or the
-\begin_inset Flex CharStyle:MenuItem
-status collapsed
+\begin_layout LyX-Code
+
+\backslash
+newtheorem{claim}[thm]{
+\backslash
+protect
+\backslash
+claimname}
+\end_layout
-\begin_layout Plain Layout
-Bibliography
+\begin_layout LyX-Code
+EndPreamble
+\end_layout
+
+\begin_layout LyX-Code
+LangPreamble
+\end_layout
+
+\begin_layout LyX-Code
+
+\backslash
+providecommand{
+\backslash
+claimname}{_(Claim)}
\end_layout
-\end_inset
-
- layout.
- This is also the case for
-\begin_inset Flex CharStyle:Code
-status collapsed
+\begin_layout LyX-Code
-\begin_layout Plain Layout
-Manual
\end_layout
-\end_inset
+\begin_layout LyX-Code
+EndLangPreamble
+\end_layout
- labels with latex type
-\begin_inset Flex CharStyle:Code
-status collapsed
+\begin_layout LyX-Code
+BabelPreamble
+\end_layout
-\begin_layout Plain Layout
-Environment
+\begin_layout LyX-Code
+
+\backslash
+addto
+\backslash
+captions$$lang{
+\backslash
+renewcommand{
+\backslash
+claimname}{_(Claim)}}
\end_layout
-\end_inset
+\begin_layout LyX-Code
+EndBabelPreamble
+\end_layout
-, in order to make layouts for theorems work correctly.
-
+\begin_layout Standard
+The key to correct translation of the user visible text is the definition
+ of the command
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Sensitive
-\end_layout
-
-\end_inset
-
- is a special case for the caption-labels
-\begin_inset Quotes eld
-\end_inset
-
-Figure
-\begin_inset Quotes erd
-\end_inset
- and
-\begin_inset Quotes eld
-\end_inset
+\backslash
+claimname
+\end_layout
-Table
-\begin_inset Quotes erd
\end_inset
-.
-
+ in the language preamble.
+ This command holds the name of the theorem that will appear in the output.
+ The
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Sensitive
+BabelPreamble
\end_layout
\end_inset
- means the (hardcoded) label string depends on the kind of float.
- The
+ then uses the commands offered by the babel package to redefine
\begin_inset Flex CharStyle:Code
status collapsed
\begin_layout Plain Layout
-Counter
-\end_layout
-
-\end_inset
- label type defines automatically numbered labels.
- See Section
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:counter"
+\backslash
+claimname
+\end_layout
\end_inset
-.
+ for each used language in multilanguage documents.
\end_layout
+\end_deeper
\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
status collapsed
\begin_layout Plain Layout
-List_Environment
+List_Environment, Bib_Environment
\end_layout
\end_inset
] How the layout should be translated into LaTeX.
-
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+LatexType
+\end_layout
+
+\end_inset
+
+ is perhaps a bit misleading, since these rules apply to SGML classes, too.
+ Visit the SGML class files for specific examples.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
means nothing special.
+\end_layout
+
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\end_inset
- and
+.
+\end_layout
+
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
.
+\end_layout
+
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
\end_inset
-, except that a
+, except that an
\begin_inset Flex CharStyle:Code
status collapsed
is generated for each paragraph of this environment.
+\end_layout
+
+\begin_layout Itemize
\begin_inset Flex CharStyle:Code
status collapsed
dialog.
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\emph on
-LatexType
-\end_layout
-
-\end_inset
-
- is perhaps a bit misleading, since these rules apply to SGML classes, too.
- Visit the SGML class files for specific examples.
\end_layout
\begin_layout Standard
depending upon the LaTeX type.
\end_layout
+\end_deeper
\begin_layout Description
\begin_inset Flex CharStyle:Code
status collapsed
\end_inset
- implies the generation of specific LaTeX code, using the package
-\family roman
+ implies the generation of specific LaTeX code, using the package
+\family roman
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+setspace.sty
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+TextFont
+\end_layout
+
+\end_inset
+
+ The font used for the text body .
+ See section
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Font-description"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+TocLevel
+\end_layout
+
+\end_inset
+
+
+\series medium
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\series medium
+[int]
+\end_layout
+
+\end_inset
+
+
+\series default
+ The level of the style in the table of contents.
+ This is used for automatic numbering of section headings.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+TopSep
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+float=0
+\end_layout
+
+\end_inset
+
+] The vertical space with which the very first of a chain of paragraphs
+ with this layout is separated from the previous paragraph.
+ If the previous paragraph has another layout, the separations are not simply
+ added, but the maximum is taken.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Paragraph-Style-XHTML"
+
+\end_inset
+
+Paragraph Style XHTML
+\end_layout
+
+\begin_layout Standard
+XHTML output is also controlled by layout information.
+ In general, LyX provides sensible defaults for all of these tags and, as
+ mentioned earlier, it can even construct default CSS information 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 construct CSS describing how Chapters
+ should be displayed in the browser.
+\end_layout
+
+\begin_layout Standard
+The XHTML LyX outputs depends upon whether we are dealing with a normal
+ paragraph, a command, or an environment.
+ For a command or normal paragraph, it 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
-\begin_inset Flex CharStyle:Code
-status collapsed
+>Paragraph Label</labeltag>
+\end_layout
-\begin_layout Plain Layout
-setspace.sty
+\begin_layout LyX-Code
+Here lies the contents of the paragraph.
\end_layout
-\end_inset
+\begin_layout LyX-Code
+</tag>
+\end_layout
-.
+\begin_layout Standard
+The label tags are of course omitted if the paragraph does not have one.
+ For an environment that is not a list, it takes this form:
\end_layout
-\begin_layout Description
-\begin_inset Flex CharStyle:Code
-status collapsed
+\begin_layout LyX-Code
+<tag attr=
+\begin_inset Quotes erd
+\end_inset
-\begin_layout Plain Layout
-TextFont
+value
+\begin_inset Quotes erd
+\end_inset
+
+>
\end_layout
+\begin_layout LyX-Code
+<itemtag attr=
+\begin_inset Quotes erd
\end_inset
- The font used for the text body .
- See section
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:fonts"
-
+value
+\begin_inset Quotes erd
\end_inset
-.
-\end_layout
+><labeltag attr=
+\begin_inset Quotes erd
+\end_inset
-\begin_layout Description
-\begin_inset Flex CharStyle:Code
-status collapsed
+value
+\begin_inset Quotes erd
+\end_inset
-\begin_layout Plain Layout
+>Environment Label</labeltag>Here lies the contents of the first paragraph.</item
+tag>
+\end_layout
-\series medium
-TocLevel [int]
+\begin_layout LyX-Code
+<itemtag>Second paragraph.</itemtag>
\end_layout
-\end_inset
+\begin_layout LyX-Code
+</tag>
+\end_layout
- The level of the style in the table of contents.
- This is used for automatic numbering of section headings.
+\begin_layout Standard
+For a list, we have this form:
\end_layout
\begin_layout Description
status collapsed
\begin_layout Plain Layout
-TopSep
+HTMLAttr
\end_layout
\end_inset
status collapsed
\begin_layout Plain Layout
-float=0
+string
\end_layout
\end_inset
-] The vertical space with which the very first of a chain of paragraphs
- with this layout is separated from the previous paragraph.
- If the previous paragraph has another layout, the separations are not simply
- added, but the maximum is taken.
+] Specifies one or more attribute--value pairs to be output with the main
+ tag.
\end_layout
\begin_layout Subsection
Floats
-\end_layout
-
-\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
-name "sec:floats"
+name "sub:Floats"
\end_inset
+
+\end_layout
+
+\begin_layout Standard
Since version 1.3.0 of LyX, it is has been both possible and necessary to
define the floats (
\begin_inset Flex CharStyle:MenuItem
\end_inset
] The string that will be used in the menus and also for the caption.
+ This is translated to the current language if babel is used.
\end_layout
\begin_layout Description
\end_inset
] The heading used for the list of floats.
+ This is translated to the document language.
\end_layout
\begin_layout Description
\begin_layout Subsection
Flex insets and InsetLayout
-\end_layout
-
-\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
-name "sec:charstyle"
+name "sub:Flex-insets-and"
\end_inset
+
+\end_layout
+
+\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_inset
.
-
\end_layout
\begin_layout Enumerate
\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
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:fonts"
+reference "sub:Font-description"
\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
\end_inset
).
+ Default is false.
\end_layout
\begin_layout Description
\end_inset
).
+ Default is false.
\end_layout
\begin_layout Description
\begin_inset CommandInset ref
LatexCommand ref
-reference "sec:fonts"
+reference "sub:Font-description"
\end_inset
\end_inset
] Whether multiple paragraphs are permitted in this inset.
- This will also set CustomPars to the same value and ForcePlain to the opposite
- value.
+ 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
- MultiPar.
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+MultiPar
+\end_layout
+
+\end_inset
+
+.
+ Default is true.
\end_layout
\begin_layout Description
\emph on
not
\emph default
- whether the command should itself be protected.)
+ whether the command should itself be protected.) Default is false.
\end_layout
\begin_layout Description
] As with paragraph styles (see page
\begin_inset CommandInset ref
-LatexCommand ref
+LatexCommand pageref
reference "des:PathThru"
\end_inset
).
+ Default is false.
\end_layout
\begin_layout Description
\begin_layout Subsection
Counters
-\end_layout
-
-\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
-name "sec:counter"
+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
\end_layout
\begin_layout LyX-Code
-Counter name
+Counter CounterName
\end_layout
\begin_layout Standard
-where of course `name' is replaced by the name of the counter.
+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_layout Subsection
Font description
-\end_layout
-
-\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
-name "sec:fonts"
+name "sub:Font-description"
\end_inset
+
+\end_layout
+
+\begin_layout Standard
A font description looks like this:
\end_layout
\end_inset
-] Valid argument are:
+] Valid arguments are:
\begin_inset Flex CharStyle:Code
status collapsed
.
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
Creating Templates
\begin_inset CommandInset label
LatexCommand label
-name "sec:templates"
+name "sec:Creating-Templates"
\end_inset
This must be the name of a format that is known to LyX (see section
\begin_inset CommandInset ref
LatexCommand ref
-reference "sub:Formats"
+reference "sec:Formats"
\end_inset
\end_layout
\begin_layout Section
+Security discussion
\begin_inset CommandInset label
LatexCommand label
name "sec:Security-discussion"
\end_inset
-Security discussion
-\end_layout
-
-\begin_layout Standard
-\begin_inset Box Shadowbox
-position "t"
-hor_pos "c"
-has_inner_box 1
-inner_pos "t"
-use_parbox 0
-width "100col%"
-special "none"
-height "1in"
-height_special "totalheight"
-status open
-
-\begin_layout Plain Layout
-WARNING: This section is definitely outdated.
-\end_layout
-
-\end_inset
-
\end_layout
If you want to use some of the shell features, you should write a safe
script to do this in a controlled manner, and then invoke the script from
the command string.
- In the
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-lib/scripts
-\end_layout
-
-\end_inset
-
- directory of the LyX installation, you can find a safe wrapper script
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-general_command_wrapper.py
-\end_layout
-
-\end_inset
-
- that supports redirection of input and output.
- That can serve as an example for how to write safe template scripts.
- For a more advanced example that uses
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-fork
-\end_layout
-
-\end_inset
-
- and friends, take a look at the
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-pic2ascii.py
-\end_layout
-
-\end_inset
-
- converter script.
+
\end_layout
\begin_layout Standard