]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Customization.lyx
A couple minor changes in the User's Guide.
[lyx.git] / lib / doc / Customization.lyx
index 9733ecea57e3d1ebb943040f3b34d754c3490689..35bd469e572c081af77dac1808d75db31a9d1db0 100644 (file)
@@ -1,5 +1,5 @@
 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
-\lyxformat 361
+\lyxformat 372
 \begin_document
 \begin_header
 \textclass scrbook
@@ -62,6 +62,7 @@ End
 \end_local_layout
 \language english
 \inputencoding auto
+\fontencoding global
 \font_roman default
 \font_sans default
 \font_typewriter default
@@ -97,26 +98,31 @@ End
 \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 "Jean-Marc Lasgouttes" 
-\author "" 
 \end_header
 
 \begin_body
@@ -151,11 +157,7 @@ type "mailto:"
 \end_inset
 
  in the subject header, and please cc the current maintainer of this file,
- Richard Heck <
-rgheck
-@
-comcast
-.net>.
+ Richard Heck <rgheck@comcast.net>.
 \end_layout
 
 \end_inset
@@ -204,9 +206,7 @@ Introduction
 This manual covers the customization features present in LyX.
  In it, we discuss issues like keyboard shortcuts, screen previewing options,
  printer options, sending commands to LyX via the LyX Server, internationalizati
-on, installing new 
-LaTeX
- classes and LyX layouts, etc.
+on, installing new LaTeX classes and LyX layouts, etc.
  We can't possibly hope to touch on everything you can change—our developers
  add new features faster than we can document them—but we will explain the
  most common customizations and hopefully point you in the right direction
@@ -219,12 +219,8 @@ status open
 
 \begin_layout Standard
 Information from previous versions of this document that now seems to be
- outdated is contained in the 
-OutDated
- branch of this document.
- By default, this information will not appear in the 
-LaTeX
- output.
+ outdated is contained in the OutDated branch of this document.
+ By default, this information will not appear in the LaTeX output.
 \end_layout
 
 \end_inset
@@ -263,7 +259,6 @@ on files; the user directory is where you can place your modified versions.
 status collapsed
 
 \begin_layout Plain Layout
-
 LyXDir
 \end_layout
 
@@ -274,7 +269,6 @@ LyXDir
 status collapsed
 
 \begin_layout Plain Layout
-
 UserDir
 \end_layout
 
@@ -290,7 +284,6 @@ What's in
 status collapsed
 
 \begin_layout Plain Layout
-
 LyXDir
 \end_layout
 
@@ -304,7 +297,6 @@ LyXDir
 status collapsed
 
 \begin_layout Plain Layout
-
 LyXDir
 \end_layout
 
@@ -332,7 +324,6 @@ Preferences
 status collapsed
 
 \begin_layout Plain Layout
-
 LyXDir
 \end_layout
 
@@ -353,7 +344,6 @@ The files, which are to be found in
 status collapsed
 
 \begin_layout Plain Layout
-
 UserDir
 \end_layout
 
@@ -385,8 +375,7 @@ lyxrc.defaults
 status collapsed
 
 \begin_layout Plain Layout
-packages.
-lst
+packages.lst
 \end_layout
 
 \end_inset
@@ -399,9 +388,7 @@ status collapsed
 
 \begin_layout Plain Layout
 Help\SpecialChar \menuseparator
-
 LaTeX
-
 \begin_inset space ~
 \end_inset
 
@@ -419,10 +406,7 @@ Configuration
 status collapsed
 
 \begin_layout Plain Layout
-
-textclass
-.
-lst
+textclass.lst
 \end_layout
 
 \end_inset
@@ -437,9 +421,8 @@ layout/
 
 \end_inset
 
- directories, along with the associated 
-LaTeX
- document class and their description.
+ directories, along with the associated LaTeX document class and their descripti
+on.
 \end_layout
 
 \begin_layout Labeling
@@ -448,10 +431,7 @@ LaTeX
 status collapsed
 
 \begin_layout Plain Layout
-
-lyxmodules
-.
-lst
+lyxmodules.lst
 \end_layout
 
 \end_inset
@@ -475,15 +455,12 @@ layout/
 status collapsed
 
 \begin_layout Plain Layout
-*files.
-lst
+*files.lst
 \end_layout
 
 \end_inset
 
- lists of various sorts of 
-LaTeX
--related files found on your system
+ lists of various sorts of LaTeX-related files found on your system
 \end_layout
 
 \begin_layout Labeling
@@ -492,9 +469,7 @@ LaTeX
 status collapsed
 
 \begin_layout Plain Layout
-doc/
-LaTeXConfig
-.lyx
+doc/LaTeXConfig.lyx
 \end_layout
 
 \end_inset
@@ -504,17 +479,13 @@ LaTeXConfig
 status collapsed
 
 \begin_layout Plain Layout
-
-LaTeXConfig
-.lyx.in
+LaTeXConfig.lyx.in
 \end_layout
 
 \end_inset
 
 .
- It contains information on your 
-LaTeX
- configuration.
+ It contains information on your LaTeX configuration.
 \end_layout
 
 \begin_layout Subsection
@@ -527,7 +498,6 @@ These directories are duplicated between
 status collapsed
 
 \begin_layout Plain Layout
-
 LyXDir
 \end_layout
 
@@ -538,7 +508,6 @@ LyXDir
 status collapsed
 
 \begin_layout Plain Layout
-
 UserDir
 \end_layout
 
@@ -550,7 +519,6 @@ UserDir
 status collapsed
 
 \begin_layout Plain Layout
-
 UserDir
 \end_layout
 
@@ -580,9 +548,7 @@ status collapsed
 
 \end_inset
 
- that define the 
-keybindings
- used in LyX.
+ that define the keybindings used in LyX.
  If there exists an internationalized version of the bind file named 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -602,9 +568,7 @@ $LANG_xxx.bind
 status collapsed
 
 \begin_layout Plain Layout
-
-clipart
-/
+clipart/
 \end_layout
 
 \end_inset
@@ -630,17 +594,13 @@ doc/
 status collapsed
 
 \begin_layout Plain Layout
-
-LaTeXConfig
-.lyx
+LaTeXConfig.lyx
 \end_layout
 
 \end_inset
 
  deserves special attention, as noted above.
- The internationalized help docs are in 
-subdirectories
+ The internationalized help docs are in subdirectories 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -730,16 +690,12 @@ Document
 status collapsed
 
 \begin_layout Plain Layout
-
-kbd
-/
+kbd/
 \end_layout
 
 \end_inset
 
- contains keyboard 
-keymapping
- files.
+ contains keyboard keymapping files.
  See Chapter
 \begin_inset space ~
 \end_inset
@@ -785,7 +741,6 @@ reference "cha:Installing-New-Document"
 status collapsed
 
 \begin_layout Plain Layout
-
 lyx2lyx
 \end_layout
 
@@ -796,7 +751,6 @@ lyx2lyx
 status collapsed
 
 \begin_layout Plain Layout
-
 lyx2lyx
 \end_layout
 
@@ -867,9 +821,7 @@ reference "sec:Creating-Templates"
 status collapsed
 
 \begin_layout Plain Layout
-
-ui
-/
+ui/
 \end_layout
 
 \end_inset
@@ -879,8 +831,7 @@ ui
 status collapsed
 
 \begin_layout Plain Layout
-.
-ui
+.ui
 \end_layout
 
 \end_inset
@@ -935,17 +886,12 @@ LyX
 status collapsed
 
 \begin_layout Plain Layout
-
-chkconfig
-.
-ltx
+chkconfig.ltx
 \end_layout
 
 \end_inset
 
- this is a 
-LaTeX
- script used during the configuration process.
+ this is a LaTeX script used during the configuration process.
  Do not run directly.
 \end_layout
 
@@ -955,8 +901,7 @@ LaTeX
 status collapsed
 
 \begin_layout Plain Layout
-configure.
-py
+configure.py
 \end_layout
 
 \end_inset
@@ -975,15 +920,13 @@ Other files needing a line or two...
 status collapsed
 
 \begin_layout Plain Layout
-
 encodings
 \end_layout
 
 \end_inset
 
- this contains tables describing how different character 
-encodings
- can be mapped to Unicode
+ this contains tables describing how different character encodings can be
+ mapped to Unicode
 \end_layout
 
 \begin_layout Labeling
@@ -1040,7 +983,6 @@ Even if you are using LyX as an unprivileged user, you might want to change
 status collapsed
 
 \begin_layout Plain Layout
-
 UserDir
 \end_layout
 
@@ -1076,7 +1018,6 @@ LyX
 status collapsed
 
 \begin_layout Plain Layout
-
 LyXDir
 \end_layout
 
@@ -1087,7 +1028,6 @@ LyXDir
 status collapsed
 
 \begin_layout Plain Layout
-
 UserDir
 \end_layout
 
@@ -1098,7 +1038,6 @@ UserDir
 status collapsed
 
 \begin_layout Plain Layout
-
 LyXDir
 \end_layout
 
@@ -1141,7 +1080,6 @@ preferences
 status collapsed
 
 \begin_layout Plain Layout
-
 UserDir
 \end_layout
 
@@ -1167,8 +1105,7 @@ Reconfigure
 status collapsed
 
 \begin_layout Plain Layout
-configure.
-py
+configure.py
 \end_layout
 
 \end_inset
@@ -1181,9 +1118,7 @@ py
 status collapsed
 
 \begin_layout Plain Layout
-
-UserDir
-/layouts
+UserDir/layouts
 \end_layout
 
 \end_inset
@@ -1210,9 +1145,7 @@ If you get some updated documentation from LyX ftp site and cannot install
 status collapsed
 
 \begin_layout Plain Layout
-
-UserDir
-/doc/
+UserDir/doc/
 \end_layout
 
 \end_inset
@@ -1249,8 +1182,7 @@ Invoking LyX with the command line switch
 status collapsed
 
 \begin_layout Plain Layout
--
-userdir
+-userdir
 \end_layout
 
 \end_inset
@@ -1266,8 +1198,7 @@ userdir
 status collapsed
 
 \begin_layout Plain Layout
--
-userdir
+-userdir
 \end_layout
 
 \end_inset
@@ -1283,10 +1214,7 @@ userdir
 status collapsed
 
 \begin_layout Plain Layout
-LYX_
-USERDIR
-_
-VER
+LYX_USERDIR_VER
 \end_layout
 
 \end_inset
@@ -1301,9 +1229,7 @@ Having several configurations also requires more maintenance: if you want
 status collapsed
 
 \begin_layout Plain Layout
-
-NewUserDir
-/layouts
+NewUserDir/layouts
 \end_layout
 
 \end_inset
@@ -1311,15 +1237,10 @@ NewUserDir
  which you want available from all your configurations, you must add it
  to each directory separately.
  You can avoid this with the following trick: after LyX creates the additional
- directory, most of the 
-subdirectories
- (see above) are empty.
+ directory, most of the subdirectories (see above) are empty.
  If you want the new configuration to mirror an existing one, replace the
- empty 
-subdirectory
- with a symbolic link to the matching 
-subdirectory
- in the existing configuration.
+ empty subdirectory with a symbolic link to the matching subdirectory in
+ the existing configuration.
  Take care with the 
 \begin_inset Flex CharStyle:Code
 status collapsed
@@ -1330,10 +1251,8 @@ doc/
 
 \end_inset
 
-subdirectory
-, however, since it contains a file written by the configuration script
- (also accessible through 
+ subdirectory, however, since it contains a file written by the configuration
+ script (also accessible through 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
@@ -1498,7 +1417,6 @@ Editor
 status collapsed
 
 \begin_layout Plain Layout
-
 Ghostview
 \end_layout
 
@@ -1585,7 +1503,6 @@ View
 status collapsed
 
 \begin_layout Plain Layout
-
 png
 \end_layout
 
@@ -1597,7 +1514,6 @@ png
 status collapsed
 
 \begin_layout Plain Layout
-
 pdf
 \end_layout
 
@@ -1624,7 +1540,6 @@ Vector graphics format
 status collapsed
 
 \begin_layout Plain Layout
-
 pdflatex
 \end_layout
 
@@ -1636,7 +1551,6 @@ pdflatex
 status collapsed
 
 \begin_layout Plain Layout
-
 pdf
 \end_layout
 
@@ -1647,7 +1561,6 @@ pdf
 status collapsed
 
 \begin_layout Plain Layout
-
 png
 \end_layout
 
@@ -1658,7 +1571,6 @@ png
 status collapsed
 
 \begin_layout Plain Layout
-
 jpg
 \end_layout
 
@@ -1669,7 +1581,6 @@ jpg
 status collapsed
 
 \begin_layout Plain Layout
-
 pdflatex
 \end_layout
 
@@ -1681,7 +1592,6 @@ pdflatex
 status collapsed
 
 \begin_layout Plain Layout
-
 pdf
 \end_layout
 
@@ -1692,7 +1602,6 @@ pdf
 status collapsed
 
 \begin_layout Plain Layout
-
 png
 \end_layout
 
@@ -1703,7 +1612,6 @@ png
 status collapsed
 
 \begin_layout Plain Layout
-
 jpg
 \end_layout
 
@@ -1714,7 +1622,6 @@ jpg
 status collapsed
 
 \begin_layout Plain Layout
-
 pdf
 \end_layout
 
@@ -1725,7 +1632,6 @@ pdf
 status collapsed
 
 \begin_layout Plain Layout
-
 png
 \end_layout
 
@@ -1832,18 +1738,11 @@ $$l
 
 \end_inset
 
- The `
-LaTeX
-name'
+ The `LaTeX name'
 \end_layout
 
 \begin_layout Standard
-The latter should be the 
-filename
- as it would be used in a 
-LaTeX's
+The latter should be the filename as it would be used in a LaTeX's 
 \series bold
 
 \backslash
@@ -1855,16 +1754,13 @@ include
 
 \begin_layout Standard
 Copiers can be used to do almost anything with output files.
- For example, suppose you want generated 
-pdf
- files to be copied to a special directory, 
+ For example, suppose you want generated pdf files to be copied to a special
+ directory, 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-/home/you/
-pdf
-/
+/home/you/pdf/
 \end_layout
 
 \end_inset
@@ -1905,9 +1801,7 @@ Save it in your local LyX directory—say,
 status collapsed
 
 \begin_layout Plain Layout
-/home/you/.lyx/scripts/
-pdfcopier
-.sh
+/home/you/.lyx/scripts/pdfcopier.sh
 \end_layout
 
 \end_inset
@@ -1940,25 +1834,17 @@ File formats
 status collapsed
 
 \begin_layout Plain Layout
-
-PDF
-(
-pdflatex
-)
+PDF(pdflatex)
 \end_layout
 
 \end_inset
 
- format—or one of the other 
-pdf
- formats—and enter 
+ format—or one of the other pdf formats—and enter 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-
-pdfcopier
-.sh $$i $$o
+pdfcopier.sh $$i $$o
 \end_layout
 
 \end_inset
@@ -2008,9 +1894,8 @@ HTML
  When these formats are exported, the copier sees that not just the main
  HTML file but various associated files (style files, images, etc.) are also
  copied.
- All these files are written to a 
-subdirectory
- of the directory in which the original LyX file was found.
+ All these files are written to a subdirectory of the directory in which
+ the original LyX file was found.
 \begin_inset Foot
 status collapsed
 
@@ -2044,7 +1929,6 @@ This copier can be customized.
 status collapsed
 
 \begin_layout Plain Layout
-
 LyXconv
 \end_layout
 
@@ -2059,9 +1943,7 @@ LyXconv
 status collapsed
 
 \begin_layout Plain Layout
-/path/to/
-filename
-.lyx
+/path/to/filename.lyx
 \end_layout
 
 \end_inset
@@ -2071,12 +1953,7 @@ filename
 status collapsed
 
 \begin_layout Plain Layout
-/path/to/
-filename
-.
-html
-.
-LyXconv
+/path/to/filename.html.LyXconv
 \end_layout
 
 \end_inset
@@ -2216,9 +2093,7 @@ $$b
 
 \end_inset
 
- The base 
-filename
- of the input file (i.
+ The base filename of the input file (i.
 \begin_inset space \thinspace{}
 \end_inset
 
@@ -2283,12 +2158,8 @@ latex
 
 \end_inset
 
- This converter runs some form of 
-LaTeX
-.
- This will make LyX's 
-LaTeX
- error logs available.
+ This converter runs some form of LaTeX.
+ This will make LyX's LaTeX error logs available.
 \end_layout
 
 \begin_layout Labeling
@@ -2297,15 +2168,12 @@ LaTeX
 status collapsed
 
 \begin_layout Plain Layout
-
 needaux
 \end_layout
 
 \end_inset
 
- Needs the 
-LaTeX
+ Needs the LaTeX 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
@@ -2324,7 +2192,6 @@ status collapsed
 status collapsed
 
 \begin_layout Plain Layout
-
 xml
 \end_layout
 
@@ -2362,7 +2229,6 @@ value
 status collapsed
 
 \begin_layout Plain Layout
-
 parselog
 \end_layout
 
@@ -2373,9 +2239,7 @@ parselog
 status collapsed
 
 \begin_layout Plain Layout
-
-infile
-.out
+infile.out
 \end_layout
 
 \end_inset
@@ -2385,11 +2249,7 @@ infile
 status collapsed
 
 \begin_layout Plain Layout
-script < 
-infile
-.out > 
-infile
-.log
+script < infile.out > infile.log
 \end_layout
 
 \end_inset
@@ -2414,7 +2274,6 @@ $$s
 status collapsed
 
 \begin_layout Plain Layout
-
 resultdir
 \end_layout
 
@@ -2439,11 +2298,7 @@ $$b
 \begin_inset Newline newline
 \end_inset
 
-Note that 
-resultdir
- and 
-usetempdir
- make no sense together.
+Note that resultdir and usetempdir make no sense together.
  The latter will be ignored if the former is given.
 \end_layout
 
@@ -2453,7 +2308,6 @@ usetempdir
 status collapsed
 
 \begin_layout Plain Layout
-
 resultfile
 \end_layout
 
@@ -2470,11 +2324,8 @@ $$b
 \end_inset
 
 .
- Sensible only with 
-resultdir
- and optional even then; if not given, it defaults to `
-index'
-.
+ Sensible only with resultdir and optional even then; if not given, it defaults
+ to `index'.
 \end_layout
 
 \begin_layout Standard
@@ -2486,34 +2337,21 @@ None of these last three are presently used in any of the converters that
 \begin_layout Standard
 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 for this) which is then converted
- to DVI using the `
-LaTeX
- to 
-DVI'
- converter, and finally converting the resulting DVI file to PostScript.
- LyX finds such `
-chains'
- of converters automatically, and it will always choose the shortest possible
- chain.
+ 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
+ for this) which is then converted to DVI using the `LaTeX to DVI' converter,
+ and finally converting the resulting DVI file to PostScript.
+ LyX finds such `chains' of converters automatically, and it will always
+ choose the shortest possible chain.
  You can, though, still define multiple conversion methods between file
  formats.
  For example, the standard LyX configuration provides three ways to convert
-LaTeX
- to 
-PDF
-: Directly, using 
+ LaTeX to PDF: Directly, using 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
 \begin_layout Plain Layout
-
 pdflatex
 \end_layout
 
@@ -2524,7 +2362,6 @@ pdflatex
 status collapsed
 
 \begin_layout Plain Layout
-
 ps2pdf
 \end_layout
 
@@ -2535,7 +2372,6 @@ ps2pdf
 status collapsed
 
 \begin_layout Plain Layout
-
 dvipdfm
 \end_layout
 
@@ -2543,9 +2379,7 @@ dvipdfm
 
 .
  To define such alternate chains, you must define multiple target `file
-formats'
-, as described in section 
+ formats', as described in section 
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "sec:Formats"
@@ -2558,7 +2392,6 @@ reference "sec:Formats"
 status collapsed
 
 \begin_layout Plain Layout
-
 pdf
 \end_layout
 
@@ -2569,7 +2402,6 @@ pdf
 status collapsed
 
 \begin_layout Plain Layout
-
 pdf2
 \end_layout
 
@@ -2580,7 +2412,6 @@ pdf2
 status collapsed
 
 \begin_layout Plain Layout
-
 pdf3
 \end_layout
 
@@ -2591,8 +2422,7 @@ pdf3
 status collapsed
 
 \begin_layout Plain Layout
-.
-pdf
+.pdf
 \end_layout
 
 \end_inset
@@ -2672,7 +2502,6 @@ LyX uses the GNU
 status collapsed
 
 \begin_layout Plain Layout
-
 gettext
 \end_layout
 
@@ -2685,7 +2514,6 @@ gettext
 status collapsed
 
 \begin_layout Plain Layout
-
 po
 \end_layout
 
@@ -2719,7 +2547,6 @@ mo
 status collapsed
 
 \begin_layout Plain Layout
-
 gettext
 \end_layout
 
@@ -2729,9 +2556,8 @@ gettext
  It is possible to do this just for yourself, but if you're going to do
  it, you might as well share the results of your labors with the rest of
  the LyX community.
- Send a message to the LyX 
-developers'
- list for more information about how to proceed.
+ Send a message to the LyX developers' list for more information about how
+ to proceed.
 \end_layout
 
 \begin_layout Standard
@@ -2767,8 +2593,7 @@ lyx.pot
 status collapsed
 
 \begin_layout Plain Layout
-**.
-po
+**.po
 \end_layout
 
 \end_inset
@@ -2779,8 +2604,7 @@ po
 status collapsed
 
 \begin_layout Plain Layout
-xx.
-po
+xx.po
 \end_layout
 
 \end_inset
@@ -2806,9 +2630,8 @@ make lyx.pot
 
 \end_inset
 
- in that directory, or you can use an existing 
-po
--file for some other language as a template).
+ in that directory, or you can use an existing po-file for some other language
+ as a template).
 \end_layout
 
 \begin_layout Itemize
@@ -2817,8 +2640,7 @@ Edit
 status collapsed
 
 \begin_layout Plain Layout
-xx.
-po
+xx.po
 \end_layout
 
 \end_inset
@@ -2838,21 +2660,16 @@ Poedit
 \family typewriter
 KBabel
 \family default
- (for 
-KDE
-).
+ (for KDE).
  
 \family typewriter
 Emacs
 \family default
- contains a `
-mode'
- for editing 
+ contains a `mode' for editing 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-
 po
 \end_layout
 
@@ -2873,7 +2690,6 @@ po
 status collapsed
 
 \begin_layout Plain Layout
-
 po
 \end_layout
 
@@ -2904,10 +2720,7 @@ xx.mo
 status collapsed
 
 \begin_layout Plain Layout
-
-msgfmt
- -o xx.mo < xx.
-po
+msgfmt -o xx.mo < xx.po
 \end_layout
 
 \end_inset
@@ -2970,7 +2783,6 @@ As said, however, it would be best if the new
 status collapsed
 
 \begin_layout Plain Layout
-
 po
 \end_layout
 
@@ -2978,9 +2790,8 @@ po
 
 -file could be added to the LyX distribution, so others can use it.
  Adding it involves making additional changes to LyX.
- So send an email to the 
-developers'
- mailing list if you're interested in doing that.
+ So send an email to the developers' mailing list if you're interested in
+ doing that.
 \end_layout
 
 \begin_layout Subsubsection
@@ -3022,7 +2833,6 @@ to
 status collapsed
 
 \begin_layout Plain Layout
-
 gettext
 \end_layout
 
@@ -3045,11 +2855,7 @@ To
 status collapsed
 
 \begin_layout Plain Layout
-To[[as in 
-'From
- format x to format 
-y'
-]]
+To[[as in 'From format x to format y']]
 \end_layout
 
 \end_inset
@@ -3059,11 +2865,7 @@ y'
 status collapsed
 
 \begin_layout Plain Layout
-To[[as in 
-'From
- page x to page 
-y'
-]].
+To[[as in 'From page x to page y']].
 \end_layout
 
 \end_inset
@@ -3083,7 +2885,6 @@ To
 status collapsed
 
 \begin_layout Plain Layout
-
 gettext
 \end_layout
 
@@ -3177,21 +2978,6 @@ DocName
  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
@@ -3231,11 +3017,7 @@ status collapsed
 
 \begin_layout Plain Layout
 Help\SpecialChar \menuseparator
-
-\bar under
-I
-\bar default
-ntroduction
+Introduction
 \end_layout
 
 \end_inset
@@ -5472,166 +5254,291 @@ Installing New Document Classes
 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.
+\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 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 Standard
-If your LaTeX distribution doesn't provide a user interface, then you can
- follow these steps by using a UNIX/Linux console.
+\begin_layout Plain Layout
+book.layout
 \end_layout
 
-\begin_layout Enumerate
-Get the package from 
-\begin_inset CommandInset href
-LatexCommand href
+\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, anyway, 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.
+\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
+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
+Get the package from 
+\begin_inset CommandInset href
+LatexCommand href
 name "CTAN"
 target "http://www.ctan.org/"
 
@@ -5641,13 +5548,13 @@ target "http://www.ctan.org/"
 \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
 
@@ -5687,7 +5594,7 @@ kpsewhich texmf.cnf
 
 \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
 
@@ -5697,7 +5604,7 @@ TEXMFLOCAL
 
 \end_inset
 
-; this is usually somewhere like 
+ variable; this is usually somewhere like 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -5799,40 +5706,38 @@ just work
 \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
 
@@ -5840,14 +5745,25 @@ 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
 
@@ -5872,82 +5788,106 @@ foiltex
 \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
@@ -5964,34 +5904,40 @@ article
 
 \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, 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 LaTeX,
+ DocBook, and so forth, 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"
@@ -5999,12 +5945,23 @@ 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
 
@@ -6093,61 +6050,82 @@ name "sub: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 informtion 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 endnotes module—specifcally provide support for
one such package.
+ In a sense, layout modules are similar to included
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-Document\SpecialChar \menuseparator
-Settings
+These can have any extension, but by convention have the 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+.inc
 \end_layout
 
 \end_inset
 
dialog.
extension.
 \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 or flex inset.
- But modules may, in principle, contain anything a layout file can contain.
-\end_layout
+\end_inset
 
-\begin_layout Standard
-A module must begin with a line like the following:
-\end_layout
+ files—files like 
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-\begin_layout LyX-Code
-#
-\backslash
-DeclareLyXModule[endnotes.sty]{Endnotes} 
+\begin_layout Plain Layout
+stdsections.inc
 \end_layout
 
-\begin_layout Standard
-The mandatory argument, in curly brackets, is the name of the module, as
- it should appear in 
+\end_inset
+
+—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
+
+, say, requires editing that file.
+ Modules, by contrast, are selected in the 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
@@ -6158,14 +6136,41 @@ Settings
 
 \end_inset
 
-.
-\change_inserted 0 1243500588
+ 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 argument in square brackets is optional: It declares any LaTeX packages
+The mandatory argument, in curly brackets, is the name of the module, as
+ it should appear in 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+Document\SpecialChar \menuseparator
+Settings
+\end_layout
+
+\end_inset
+
+.
+ 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.
@@ -6179,24 +6184,38 @@ The list of such packages is documented only in the source code.
 \end_inset
 
  LyX will not check for arbitrary packages.
-
-\change_inserted 0 1243500694
  It is also possible to use the form 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
 \begin_layout Plain Layout
-
-\change_inserted 0 1243500706
 from->to
 \end_layout
 
 \end_inset
 
 , which declares that the module can only be used when there exists a conversion
- chain between formats `from' and `to'.
-\change_unchanged
+ 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
@@ -6286,7 +6305,17 @@ no
 \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
@@ -6342,7 +6371,7 @@ It is strongly recommended that you save your work before doing so
  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,
@@ -6395,9 +6424,11 @@ sty
 \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 
+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.
+ Gor the sake of the example, we'll assume that the style file is called
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
 
@@ -6417,8 +6448,12 @@ report.cls
 
 \end_inset
 
-, which is a standard class—start by copying the existing class's layout
- file into your local directory:
+, which is a standard class.
+\end_layout
+
+\begin_layout Standard
+Start by copying the existing class's layout file into your local directory:
 \end_layout
 
 \begin_layout LyX-Code
@@ -6526,6 +6561,91 @@ report
 
  in this example—so you can fiddle around with the settings for the different
  sections if you wish.
+ 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
+If 
+\begin_inset Flex CharStyle:MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+myclass.sty
+\end_layout
+
+\end_inset
+
+ can be used with several different document classes, and even if it cannot,
+ you might find it easiest just to user a module that you can load with
+ the base class.
+ The simplest possible such module would be:
+\end_layout
+
+\begin_layout LyX-Code
+#
+\backslash
+DeclareLyXModule{My Class} 
+\end_layout
+
+\begin_layout LyX-Code
+#DescriptionBegin 
+\end_layout
+
+\begin_layout LyX-Code
+#Support for myclass.sty.
+\end_layout
+
+\begin_layout LyX-Code
+#DescriptionEnd 
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+Format 11
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+Preamble
+\begin_inset Newline newline
+\end_inset
+
+    
+\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
@@ -6568,9 +6688,38 @@ LoadClass{book}
 \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:
+ 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
 
@@ -6619,6 +6768,12 @@ roll your own
 \end_layout
 
 \begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:TextClass"
+
+\end_inset
+
 Declaring a new text class
 \end_layout
 
@@ -6629,7 +6784,7 @@ When it's finally time to get your hands dirty and create or edit your own
  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.
+ overwhelming if you try to do too much in one sitting.
  Go have another adult beverage, just for good measure.
 \end_layout
 
@@ -6638,7 +6793,7 @@ Here we go!
 \end_layout
 
 \begin_layout Standard
-Lines in a layout file which begin with 
+Lines in a layout file which begin with 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -6649,8 +6804,18 @@ status collapsed
 \end_inset
 
  are comments.
- There is one exception to this rule: all layouts should begin with lines
- like:
+ 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
@@ -6832,9 +6997,19 @@ DeclareLaTeXClass[article,foo.sty]{article (with my own headings)}
 \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
@@ -6908,14 +7083,15 @@ Reconfigure
 
 \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.
+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 layout currently
  in use by using the LyX function 
 \begin_inset Flex CharStyle:MenuItem
@@ -6930,9 +7106,12 @@ layout-reload
 .
  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 use this function simply by entering it in the mini-buffer.
  
+\end_layout
+
+\begin_layout Standard
+
 \emph on
 Warning
 \emph default
@@ -6946,14 +7125,25 @@ 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
+And while we're giving advice, make regular backups.
+ And be nice to your mother.
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Subsection
@@ -6961,7 +7151,12 @@ File format
 \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
@@ -6984,9 +7179,26 @@ int
 
 \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 14.
+] The format of the layout file.
+\end_layout
+
+\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
+19
+\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.
 \end_layout
 
 \begin_layout Subsection
@@ -7105,7 +7317,11 @@ status collapsed
 
 \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
@@ -7130,19 +7346,19 @@ Counter
 
 \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 "sub:Counters"
+\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
@@ -7162,6 +7378,21 @@ End
 \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
@@ -7228,8 +7459,8 @@ string]
 
 \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
 
@@ -7277,7 +7508,7 @@ Standard
 
 .
  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
@@ -7300,8 +7531,8 @@ string
 
 \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
 
@@ -7388,59 +7619,81 @@ End
 status collapsed
 
 \begin_layout Plain Layout
-Input
+IfCounter
 \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, 
+ [
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-stdclass.inc
+string
 \end_layout
 
 \end_inset
 
-, which contains most of the basic layouts.
-\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
-InsetLayout
+End
 \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{}
+
+\begin_inset Quotes erd
 \end_inset
 
-g.
-\begin_inset space \space{}
+.
+\begin_inset Newline newline
 \end_inset
 
-a new character style.
- See Section
+See Section
 \begin_inset space ~
 \end_inset
 
 
 \begin_inset CommandInset ref
 LatexCommand ref
-reference "sub:Flex-insets-and"
+reference "sub:Counters"
 
 \end_inset
 
- for more information.
+ for details on counters.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+IfStyle
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+] 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
@@ -7467,21 +7720,74 @@ End
 status collapsed
 
 \begin_layout Plain Layout
-LeftMargin
+Input
 \end_layout
 
 \end_inset
 
- A string that indicates the width of the left margin on the screen, for
- example, 
+ 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
+stdclass.inc
+\end_layout
+
+\end_inset
+
+, which contains most of the basic layouts.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+InsetLayout
+\end_layout
+
+\end_inset
+
+ 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
 
-MMMMM
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+End
+\end_layout
+
+\end_inset
+
+
 \begin_inset Quotes erd
 \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
@@ -7489,14 +7795,40 @@ MMMMM
 status collapsed
 
 \begin_layout Plain Layout
-NoFloat
+LeftMargin
 \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.
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\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
+
+.
+ (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
@@ -7504,14 +7836,14 @@ NoFloat
 status collapsed
 
 \begin_layout Plain Layout
-NoStyle
+NoFloat
 \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.
+ 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
@@ -7519,27 +7851,21 @@ NoStyle
 status collapsed
 
 \begin_layout Plain Layout
-OutputType
+NoStyle
 \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'.
-\change_inserted 0 1243500198
-
+ 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
-
-\change_inserted 0 1243500505
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-
-\change_inserted 0 1243500208
 OutputFormat
 \end_layout
 
@@ -7552,8 +7878,6 @@ OutputFormat
 status collapsed
 
 \begin_layout Plain Layout
-
-\change_inserted 0 1243500394
 OutputType
 \end_layout
 
 status collapsed
 
 \begin_layout Plain Layout
-
-\change_inserted 0 1243500473
 OutputType
 \end_layout
 
 \end_inset
 
  parameter is encountered.
-\change_unchanged
-
 \end_layout
 
 \begin_layout Description
@@ -7583,8 +7903,21 @@ OutputType
 status collapsed
 
 \begin_layout Plain Layout
+OutputType
+\end_layout
 
-\series medium
+\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 open
+
+\begin_layout Plain Layout
 PageStyle
 \end_layout
 
@@ -7626,7 +7959,7 @@ headings
 
 \end_inset
 
-] The class default pagestyle.
+] The default pagestyle.
  Can be changed in the 
 \begin_inset Flex CharStyle:MenuItem
 status collapsed
@@ -7643,7 +7976,7 @@ Settings
 
 \begin_layout Description
 \begin_inset Flex CharStyle:Code
-status collapsed
+status open
 
 \begin_layout Plain Layout
 Preamble
@@ -7673,7 +8006,17 @@ AddToPreamble
 \end_inset
 
  declarations.
- Must end with 
+ (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
 
@@ -7859,7 +8202,7 @@ DefaultModule
 \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
 
@@ -7896,6 +8239,17 @@ string
 .
  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
@@ -8006,20 +8360,9 @@ Style
 
 \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 "sub:Paragraph-Styles"
-
-\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
@@ -8039,6 +8382,21 @@ End
 \end_inset
 
 .
+\begin_inset Newline newline
+\end_inset
+
+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
@@ -8528,59 +8886,149 @@ block
 status collapsed
 
 \begin_layout Plain Layout
-BottomSep
+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
-float=0
+BabelPreamble
 \end_layout
 
 \end_inset
 
-]
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-Note that a `float' here is a real number, such as: 1.5.
-\end_layout
-
+ declarations.
+ Must end with 
+\begin_inset Quotes eld
 \end_inset
 
- The vertical space with which the last of a chain of paragraphs with this
- layout is separated from the following paragraph.
- If the next paragraph has another layout, the separations are not simply
- added, but the maximum is taken.
-\end_layout
 
-\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-Category
+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
-[string]
+$$lang
 \end_layout
 
 \end_inset
 
- The category for this style.
- This is used to group related styles in the Layout combobox on the toolbar.
+ 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
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+float=0
+\end_layout
+
+\end_inset
+
+]
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+Note that a `float' here is a real number, such as: 1.5.
+\end_layout
+
+\end_inset
+
+ The vertical space with which the last of a chain of paragraphs with this
+ layout is separated from the following paragraph.
+ If the next paragraph has another layout, the separations are not simply
+ added, but the maximum is taken.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+Category
+\end_layout
+
+\end_inset
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+[string]
+\end_layout
+
+\end_inset
+
+ The category for this style.
+ This is used to group related styles in the Layout combobox on the toolbar.
  Any string can be used, but you may want to use existing categories with
  your own styles.
  
@@ -9062,69 +9510,22 @@ FreeSpacing
 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
+InnerTag
 \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:
+ [[FIXME]] (Used only with XML-type formats.)
 \end_layout
 
-\begin_deeper
-\begin_layout Itemize
+\begin_layout Description
 \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).
+InPreamble
 \end_layout
 
-\begin_layout Itemize
-The 
-\begin_inset Quotes eld
-\end_inset
-
-Function
-\begin_inset Quotes erd
 \end_inset
 
  
@@ -9132,213 +9533,116 @@ Function
 status collapsed
 
 \begin_layout Plain Layout
-_()
+[1, 0]
 \end_layout
 
 \end_inset
 
- replaces its argument by the translation of the argument to the current
- language.
+ 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_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
-LangPreamble
+InTitle
 \end_layout
 
 \end_inset
 
- Like 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-BabelPreamble
+[1, 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
-
-
+ 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
-EndLangPreamble
+TitleLatexType
 \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
+ and 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-LangPreamble
+TitleLatexName
 \end_layout
 
 \end_inset
 
- and 
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-BabelPreamble
+ global entries).
 \end_layout
 
-\end_inset
-
- to support non-english and even multilanguage documents correctly.
- The following excerpt (from the 
+\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-theorems-ams.inc
+ItemSep
 \end_layout
 
 \end_inset
 
- file) shows how this works:
-\end_layout
-
-\begin_layout LyX-Code
-Preamble
-\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
-
-\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
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-EndLangPreamble
-\end_layout
-
-\begin_layout LyX-Code
-BabelPreamble
-\end_layout
-
-\begin_layout LyX-Code
-    
-\backslash
-addto
-\backslash
-captions$$lang{
-\backslash
-renewcommand{
-\backslash
-claimname}{_(Claim)}}
-\end_layout
-
-\begin_layout LyX-Code
-EndBabelPreamble
-\end_layout
-
-\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
+float=0
 \end_layout
 
 \end_inset
 
- in the language preamble.
- This command holds the name of the theorem that will appear in the output.
- The 
+] 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
-BabelPreamble
+Parsep
 \end_layout
 
 \end_inset
 
- then uses the commands offered by the babel package to redefine 
+.
+ But the whole items of the environment are additionally separated with
+ this 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-claimname
+Itemsep
 \end_layout
 
 \end_inset
 
- for each used language in multilanguage documents.
+.
+ Note that this is a
+\emph on
+ multiplier.
 \end_layout
 
-\end_deeper
 \begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-InnerTag
+ItemTag
 \end_layout
 
 \end_inset
@@ -9351,42 +9655,50 @@ InnerTag
 status collapsed
 
 \begin_layout Plain Layout
-InTitle
+KeepEmpty
 \end_layout
 
 \end_inset
 
  
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-[1, 0]
-\end_layout
+\begin_inset CommandInset label
+LatexCommand label
+name "des:KeepEmpty"
 
 \end_inset
 
- If 1, marks the layout as being part of a title block (see also the 
+[
+\emph on
+
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-TitleLatexType
+
+\emph on
+0
 \end_layout
 
 \end_inset
 
- and 
+
+\emph default
+, 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-TitleLatexName
+1
 \end_layout
 
 \end_inset
 
- global entries).
+] 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
@@ -9394,49 +9706,33 @@ TitleLatexName
 status collapsed
 
 \begin_layout Plain Layout
-ItemSep
-\end_layout
-
-\end_inset
-
- [
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-float=0
+LabelBottomsep
 \end_layout
 
 \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 
+ [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
-Parsep
+Top_Environment
 \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
+Centered_Top_Environment
 \end_layout
 
 \end_inset
 
-.
- Note that this is a
-\emph on
- multiplier.
+).
 \end_layout
 
 \begin_layout Description
@@ -9444,152 +9740,157 @@ Itemsep
 status collapsed
 
 \begin_layout Plain Layout
-ItemTag
+LabelCounter
 \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"
+]
+\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
-
-\emph on
-0
+LabelType
 \end_layout
 
 \end_inset
 
-
-\emph default
-, 
+ is 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-1
+Counter
 \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
+.
+ In that case, the counter will be stepped each time the layout appears.
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout Description
+This 
+\emph on
+may
+\emph default
+ also be given if 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-LabelBottomsep
+LabelType
 \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 (
+ is 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-Top_Environment
+Enumerate
 \end_layout
 
 \end_inset
 
-, 
-\begin_inset Flex CharStyle:Code
-status collapsed
-
-\begin_layout Plain Layout
-Centered_Top_Environment
-\end_layout
-
+, though this case is a bit complicated.
+ Suppose you declare 
+\begin_inset Quotes eld
 \end_inset
 
-).
-\end_layout
 
-\begin_layout Description
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-LabelCounter
+LabelCounter myenum
 \end_layout
 
 \end_inset
 
- [
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Then the actual counters used are 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-string=""
+myenumi
 \end_layout
 
 \end_inset
 
-]
-\begin_inset Newline newline
-\end_inset
+, 
+\begin_inset Flex CharStyle:Code
+status collapsed
 
-The name of the counter for automatic numbering (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Counters"
+\begin_layout Plain Layout
+myenumii
+\end_layout
 
 \end_inset
 
- for details).
- This must be given if 
+, 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-Labeltype
+myenumiii
 \end_layout
 
 \end_inset
 
- is 
+, and 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
 \begin_layout Plain Layout
-Counter
+myenumiv
 \end_layout
 
 \end_inset
 
-.
+, 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
@@ -10101,6 +10402,192 @@ LatexType BibEnvironment
 \begin_inset Flex CharStyle:Code
 status collapsed
 
+\begin_layout Plain Layout
+LangPreamble
+\end_layout
+
+\end_inset
+
+ Like 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+BabelPreamble
+\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
+
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+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
+LangPreamble
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+BabelPreamble
+\end_layout
+
+\end_inset
+
+ 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
+theorems-ams.inc
+\end_layout
+
+\end_inset
+
+ file) shows how this works:
+\end_layout
+
+\begin_layout LyX-Code
+Preamble
+\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
+
+\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
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+EndLangPreamble
+\end_layout
+
+\begin_layout LyX-Code
+BabelPreamble
+\end_layout
+
+\begin_layout LyX-Code
+    
+\backslash
+addto
+\backslash
+captions$$lang{
+\backslash
+renewcommand{
+\backslash
+claimname}{_(Claim)}}
+\end_layout
+
+\begin_layout LyX-Code
+EndBabelPreamble
+\end_layout
+
+\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
+\end_layout
+
+\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
+BabelPreamble
+\end_layout
+
+\end_inset
+
+ then uses the commands offered by the babel package to redefine 
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\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
+
 \begin_layout Plain Layout
 LatexName
 \end_layout
@@ -11494,6 +11981,7 @@ string
 \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
@@ -11591,6 +12079,7 @@ string
 \end_inset
 
 ] The heading used for the list of floats.
+ This is translated to the document language.
 \end_layout
 
 \begin_layout Description
@@ -12305,7 +12794,6 @@ URL
 \end_inset
 
 .
 \end_layout
 
 \begin_layout Enumerate
@@ -13133,11 +13621,21 @@ to your layout file to get them to work.
 \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
@@ -13711,7 +14209,7 @@ string
 
 \end_inset
 
-] Valid argument are: 
+] Valid arguments are: 
 \begin_inset Flex CharStyle:Code
 status collapsed
 
@@ -13773,6 +14271,45 @@ no_bar
 
 .
  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