]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Additional.lyx
fr Addtional: Use quote insets instead of UTF-8
[lyx.git] / lib / doc / Additional.lyx
index bcc05d1a9f72534b98f9c22a70d51b8ffc7723d1..d35f01c2debc14d871ac73750f1d78723f4bc896 100644 (file)
@@ -2322,201 +2322,255 @@ perhaps
 \end_layout
 
 \begin_layout Chapter
-Supplemental Tools
+
+\change_inserted 564990737 1670439508
+Document classes
 \end_layout
 
 \begin_layout Section
-Customizing Bibliographies with Bib\SpecialChar TeX
- or Biblatex
-\end_layout
 
-\begin_layout Standard
-The most basic information about how to use Bib\SpecialChar TeX
- or 
-\family sans
-Biblatex
-\family default
- with \SpecialChar LyX
- is contained in the section 
-\emph on
-Bibliography databases
-\emph default
- of the 
-\emph on
-User's Guide
-\emph default
-.
- The following subsections explain special bibliography features supported
- by \SpecialChar LyX
-.
+\change_inserted 564990737 1670439533
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Collections"
+
+\end_inset
+
+Collections
 \end_layout
 
 \begin_layout Subsection
-Alternative Citation Styles
+AMS \SpecialChar LaTeX
+
 \end_layout
 
 \begin_layout Standard
-Standard Bib\SpecialChar TeX
- uses numbers (e.
-\begin_inset space \thinspace{}
-\end_inset
+by 
+\noun on
+David Johnson
+\noun default
+; updated by 
+\noun on
+Richard Kimberly Heck
+\end_layout
 
-g.
-\begin_inset space \space{}
+\begin_layout Standard
+\begin_inset VSpace bigskip
 \end_inset
 
 
-\begin_inset Quotes eld
-\end_inset
+\end_layout
 
-[12]
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Standard
+\noindent
+The AMS \SpecialChar LaTeX
+ layouts are set up to conform to suggested styles for mathematical
+ papers to be submitted to American Mathematical Society publications.
+ The layouts are not tailored to a specific journal, but easily can be.
+ You should refer to the AMS documentation for specific instructions for
+ each journal (usually it will entail only changing a single line in the
+ \SpecialChar TeX
+ output).
+ That documentation is available on the Web at 
+\begin_inset Flex URL
+status open
 
-) to refer to a cited work.
- However, in many scientific disciplines, other citation styles are in use.
- The most common one is the author-year style (e.
-\begin_inset space \thinspace{}
-\end_inset
+\begin_layout Plain Layout
+
+http://www.ams.org
+\end_layout
 
-g.
-\begin_inset space \space{}
 \end_inset
 
+ or by ftp at 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
 
-\begin_inset Quotes eld
-\end_inset
+ftp://ftp.ams.org/pub/tex/amslatex/
+\end_layout
 
-Knuth 1984a
-\begin_inset Quotes erd
 \end_inset
 
-).
- \SpecialChar LyX
- supports three packages that provide this style, 
+.
+ These layouts are appropriate, and useful, for any mathematical writing.
+\end_layout
+
+\begin_layout Standard
+There are two basic AMS \SpecialChar LaTeX
+ layouts: 
+\end_layout
+
+\begin_layout Itemize
+amsart: The standard AMS article format.
+\end_layout
+
+\begin_layout Itemize
+amsbook: the standard AMS book (really, monograph) format.
+\end_layout
+
+\begin_layout Standard
+The layouts themselves contain only the minimum necessary to use the AMS
+ classes.
+ They do not, in particular, contain any of the `theorem' environments used
+ for setting theorems, lemmas, and the like.
+ These are contained, instead, in the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-biblatex
+Theorems (AMS)
 \end_layout
 
 \end_inset
 
-, 
+ module, which is loaded by default when you select one of the AMS classes.
+ (It can also be used with other classes and can be removed, if you would
+ rather use something else.) Less commonly used environments are in the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-natbib
+Theorems (AMS-Extended)
 \end_layout
 
 \end_inset
 
-, and 
+ module, which must be loaded manually.
+\end_layout
+
+\begin_layout Standard
+By default, theorems and the like are numbered consecutively throughout
+ the document, but this may be modified by loading the module 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-jurabib
+Theorems (Order by Section)
 \end_layout
 
 \end_inset
 
-.
- Each of these packages has their pros and cons, which cannot be listed
- in detail.
- If you only want to have simple author-year (or author-numerical) style,
- or if you want to use one of the countless style files for 
+ or, if you are using 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-natbib
+book (AMS)
 \end_layout
 
 \end_inset
 
-, then the established 
+, the module 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-natbib
+Theorems (Order by Chapter)
 \end_layout
 
 \end_inset
 
- package is probably your choice.
- If you look for specific citation styles common in law studies, you might
- consider the 
+.
+ These will number the results as 
+\begin_inset Formula $n.m$
+\end_inset
+
+, where the first number refers to the section (or chapter) and the second
+ refers to the total number of results so far in that section (or chapter).
+ Many environments are also available unnumbered.
+ These are indicated by an asterisk at the end.
+ If you happen to want 
+\emph on
+only
+\emph default
+ unnumbered results, the module 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-jurabib
+Theorems (Starred)
 \end_layout
 
 \end_inset
 
- package.
- If you want to have full control over the formatting or look for advanced
- features such as ibidem, footnote citations, full title citations, advanced
- date formats (such as 400 BC) or full localization to other languages than
- English, you should definitely consider 
+ provides that option.
+\end_layout
+
+\begin_layout Standard
+Note that these modules do not 
+\emph on
+have
+\emph default
+ to be used with the AMS classes.
+ It is perfectly possible to use the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-biblatex
+Theorems (AMS)
 \end_layout
 
 \end_inset
 
-, which exceeds all other packages in terms of features, but is also quite
- heavy and more resource-hungry.
-\end_layout
-
-\begin_layout Standard
-The handling of these packages in \SpecialChar LyX
- is basically the same.
- Go to 
-\begin_inset Flex Noun
+ module, and the others mentioned, with other classes, such as 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Document\SpecialChar menuseparator
-Settings
+article
 \end_layout
 
 \end_inset
 
- and select under 
-\begin_inset Flex Noun
+, 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Bibliography
+report
 \end_layout
 
 \end_inset
 
- the 
-\begin_inset Flex Noun
+, 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Style Format
+book (KOMA-script)
 \end_layout
 
 \end_inset
 
+, and so forth.
+\end_layout
+
+\begin_layout Subsubsection
+What these layouts provide
+\end_layout
+
+\begin_layout Standard
+There is a long list of included environments provided by these layouts.
+ In AMS-\SpecialChar LaTeX
+, there is, in fact, an opportunity to define an unlimited variety
+ of `theorem' environments.
+ However, the AMS recommends the environments that are available in \SpecialChar LyX
+.
+\end_layout
+
+\begin_layout Standard
+The following environments—as well as the standard environments, such as
  
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-Basic (BibTeX)
+section
 \end_layout
 
 \end_inset
@@ -2526,7 +2580,7 @@ Basic (BibTeX)
 status collapsed
 
 \begin_layout Plain Layout
-Biblatex
+bibliography
 \end_layout
 
 \end_inset
@@ -2536,7 +2590,7 @@ Biblatex
 status collapsed
 
 \begin_layout Plain Layout
-Biblatex (Natbib mode)
+title
 \end_layout
 
 \end_inset
@@ -2546,184 +2600,99 @@ Biblatex (Natbib mode)
 status collapsed
 
 \begin_layout Plain Layout
-Natbib (BibTeX)
+author
 \end_layout
 
 \end_inset
 
- or 
+, and 
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-Jurabib (BibTeX)
+date
 \end_layout
 
 \end_inset
 
- (see sec.
-\begin_inset space ~
-\end_inset
+—are provided by 
+\begin_inset Flex Code
+status collapsed
 
-6.5.3 in the User's Guide for more information on these choices).
- With all these packages, you will get some extra features in the citation
- dialog and you can select the style of the reference (
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Plain Layout
+article (AMS)
+\end_layout
 
-Knuth 1984
-\begin_inset Quotes erd
 \end_inset
 
-, 
-\begin_inset Quotes eld
-\end_inset
-
-Knuth (1984)
-\begin_inset Quotes erd
-\end_inset
-
-, 
-\begin_inset Quotes eld
-\end_inset
-
-Knuth, 1984
-\begin_inset Quotes erd
-\end_inset
-
-, 
-\begin_inset Quotes eld
-\end_inset
-
-1984
-\begin_inset Quotes erd
-\end_inset
-
- etc.).
- Note that either package needs specifically designed style files.
- They all ship their own, but there are lots of additional style files,
- and there is even an interactive style file builder
-\begin_inset Foot
+ and 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-See 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
+book (AMS)
 \end_layout
 
 \end_inset
 
-
+:
 \end_layout
 
-\end_inset
-
- for 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-natbib
+\begin_layout Description
+Address This should be the author's permanent address.
 \end_layout
 
+\begin_layout Description
+Current
+\begin_inset space ~
 \end_inset
 
-.
+Address This should be the author's temporary address at the time of submission,
+ if different from the Address.
 \end_layout
 
-\begin_layout Subsection
-Subdivided Bibliographies
+\begin_layout Description
+Email Author's e-mail address
 \end_layout
 
-\begin_layout Standard
-Sometimes you might need to divide your bibliography into several sections.
- If you are for instance a historian, the possibility to separate sources
- and scientific works is most likely a 
-\begin_inset Quotes eld
-\end_inset
-
-must have
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Description
+URL Author's Web address, if desired.
+\end_layout
 
-.
- Unfortunately, Bib\SpecialChar TeX
- itself does not allow you to do this.
- But with the help of some \SpecialChar LaTeX
- packages, Bib\SpecialChar TeX
- can be extended to fit your needs.
+\begin_layout Description
+Keywords Key words or phrases used to identify specific topics discussed
+ in the paper.
 \end_layout
 
-\begin_layout Standard
-\SpecialChar LyX
- provides native support for one of these packages, 
-\family typewriter
-bibtopic
-\family default
+\begin_layout Description
+Subjectclass These refer to the AMS Subject Classifications, published and
+ described in 
+\emph on
+Mathematical Reviews
+\emph default
 .
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-Available from 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
+ These are also available online at the AMS cites listed above.
 \end_layout
 
-\end_inset
-
-
+\begin_layout Description
+Thanks
 \end_layout
 
-\end_inset
-
- The advantage of this package (compared to other packages such as 
-\family typewriter
-multibib
-\family default
-) is that you don't need to define new citation commands.
- Instead, you need to prepare different bibliographic databases which include
- the entries for the different sections of the bibliography.
- For example: If you want to divide your bibliography into the sections
-\begin_inset Quotes eld
-\end_inset
-
-Sources
-\begin_inset Quotes erd
-\end_inset
-
- and 
-\begin_inset Quotes eld
-\end_inset
-
-Scientific works
-\begin_inset Quotes erd
-\end_inset
-
-, you first need to create two bibliographic databases, e.
-\begin_inset space \thinspace{}
-\end_inset
-
-g.
-\begin_inset space \space{}
-\end_inset
+\begin_layout Description
+Dedicatory
+\end_layout
 
+\begin_layout Description
+Translator
+\end_layout
 
+\begin_layout Standard
+The following environments are provided by both the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-sources.bib
+Theorems
 \end_layout
 
 \end_inset
@@ -2733,3289 +2702,3467 @@ sources.bib
 status collapsed
 
 \begin_layout Plain Layout
-scientific.bib
+Theorems (AMS)
 \end_layout
 
 \end_inset
 
-.
+ modules, in the latter case in both starred (unnumbered) and unstarred
+ (numbered) versions.
+ These same environments are provided only in the starred versions by the
  
-\end_layout
-
-\begin_layout Standard
-Go to 
-\begin_inset Flex Noun
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Document\SpecialChar menuseparator
-Settings
+Theorems (Starred)
 \end_layout
 
 \end_inset
 
- and check under 
-\begin_inset Flex Noun
-status collapsed
+ module:
+\end_layout
 
-\begin_layout Plain Layout
-Bibliography
+\begin_layout Theorem
+This is typically used for the statements of major results.
 \end_layout
 
-\end_inset
+\begin_layout Corollary*
+This is used for statements which follow fairly directly from previous statement
+s.
+ Again, these can be major results.
+\end_layout
 
- the option 
-\begin_inset Flex Noun
-status collapsed
+\begin_layout Lemma
+These are smaller results needed to prove other statements.
+\end_layout
 
-\begin_layout Plain Layout
-Subdivided bibliography
+\begin_layout Proposition
+These are less major results which (hopefully) add to the general theory
+ being discussed.
 \end_layout
 
-\end_inset
+\begin_layout Conjecture
+These are statements provided without justification, which the author does
+ not know how to prove, but which seem to be true (to the author, at least).
+\end_layout
 
-.
- Now you can insert multiple Bib\SpecialChar TeX
- bibliographies, one for each section of
- your bibliography.
- Returning to our example: Insert the Bib\SpecialChar TeX
- bibliography 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Definition*
+Guess what this is for.
+ The font is different for this environment than for the previous ones.
+\end_layout
 
-\begin_layout Plain Layout
-sources.bib
+\begin_layout Example*
+Used for examples illustrating proven results.
 \end_layout
 
-\end_inset
+\begin_layout Problem
+It's not really known what this is for.
+ You should figure it out.
+\end_layout
 
- and a second one for the database 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Exercise*
+Write a description for this one.
+\end_layout
 
-\begin_layout Plain Layout
-scientific.bib
+\begin_layout Remark
+This environment is also a type of theorem, usually a lesser sort of observation.
 \end_layout
 
-\end_inset
+\begin_layout Claim*
+Often used in the course of giving a proof of a larger result.
+\end_layout
 
-.
- You are free to use the same or different styles for each section.
- Additionally, you can choose if the bibliography section should contain
+\begin_layout Case
+Generally, these are used to break up long arguments, using specific instances
+ of some condition.
  
-\begin_inset Quotes eld
-\end_inset
+\end_layout
 
-all cited references
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Case
+The numbering scheme for cases is on its own, not together with other numbered
+ statements.
+\end_layout
 
- of the specified database(s) (which is the default), 
-\begin_inset Quotes eld
-\end_inset
-
-all uncited references
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Proof
+At the end of this environment, a QED symbol (usually a square, but it can
+ vary with different styles) is placed.
+ If you want to have other environments within this one—for example, Case
+ environments—and have the QED symbol appear only after them, then the other
+ environments need to be nested within the proof environment.
+ See the section 
+\emph on
+Nesting Environments
+\emph default
+ of the 
+\emph on
+User's Guide
+\emph default
+ for information on nesting.
+\end_layout
 
- or even 
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Standard
+And these environments are provided by 
+\begin_inset Flex Code
+status collapsed
 
-all references
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
+Theorems (AMS-Extended)
+\end_layout
 
-.
- This might be useful if you would like to separate your bibliography into
- three sections: 
-\begin_inset Quotes eld
 \end_inset
 
-Cited sources
-\begin_inset Quotes erd
-\end_inset
+:
+\end_layout
 
-, 
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Criterion*
+A required condition.
+\end_layout
 
-Uncited sources
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Algorithm*
+A general procedure to be used.
+\end_layout
 
-, and 
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Axiom*
+This is a property or statement taken as true within the system being discussed.
+\end_layout
 
-Scientific works
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Condition*
+Sometimes used to state a condition assumed within the present context of
+ discussion.
+\end_layout
 
-.
- The titles for the sections can be added as ordinary sections or subsections.
- Since 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Note*
+Similar to a Remark.
+\end_layout
 
-\begin_layout Plain Layout
-bibtopic
+\begin_layout Notation*
+Used for the explanation of, yes, notation.
 \end_layout
 
-\end_inset
+\begin_layout Summary
+Do we really need to tell you? 
+\end_layout
 
- removes the bibliography title, you have to manually re-add that, too (as
- a chapter* or section*, for instance).
+\begin_layout Acknowledgement*
+Acknowledgement.
 \end_layout
 
-\begin_layout Standard
-With 
-\family sans
-Biblatex
-\family default
-, the procedure is a bit different.
- Since 
-\family typewriter
-bibtopic
-\family default
- does not work with 
-\family sans
-Biblatex
-\family default
-, the aforementioned 
-\begin_inset Flex Noun
-status collapsed
+\begin_layout Conclusion*
+Sometimes used at the end of a long train of argument.
+\end_layout
 
-\begin_layout Plain Layout
-Subdivided bibliography
+\begin_layout Fact
+Used in a way similar to Proposition, though perhaps lower on the scale.
 \end_layout
 
-\end_inset
+\begin_layout Standard
+In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
+ and AMS fonts
+ packages.
+ They need to be available on your system in order to use these environments.
+\end_layout
 
- option is disabled if you use 
-\family sans
-Biblatex
-\family default
-.
- However, 
-\family sans
-Biblatex
-\family default
- provides its own means to generate subdivided bibliographies.
- You can either add keywords to bibliography entries via the 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Section
 
-\begin_layout Plain Layout
-keywords
+\change_inserted 564990737 1670439534
+Articles
 \end_layout
 
+\begin_layout Standard
+
+\change_inserted 564990737 1670439557
+See also the document classes in the Collections (section
+\begin_inset space ~
 \end_inset
 
- entry option and then filter bibliography sections by keyword (by adding
-\begin_inset Flex Code
-status collapsed
 
-\begin_layout Plain Layout
-keyword=mykeyword
-\end_layout
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Collections"
 
 \end_inset
 
- to the 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-Options
+).
 \end_layout
 
-\end_inset
-
- field of the dialog that opens if you left-click on the 
-\begin_inset Flex Noun
-status collapsed
+\begin_layout Section
 
-\begin_layout Plain Layout
-Biblatex Generated Bibliography
+\change_inserted 564990737 1670439560
+Books
 \end_layout
 
-\end_inset
+\begin_layout Standard
 
- button), or you can filter by entry types (such as 
-\emph on
-book
-\emph default
- or 
-\emph on
-article
-\emph default
-) by entering e.
-\begin_inset space \thinspace{}
+\change_inserted 564990737 1670439581
+See also the document classes in the Collections (section
+\begin_inset space ~
 \end_inset
 
-g.
-\begin_inset Flex Code
-status collapsed
 
-\begin_layout Plain Layout
-type=book
-\end_layout
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Collections"
 
 \end_inset
 
- or 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-nottype=collection
+).
 \end_layout
 
-\end_inset
+\begin_layout Section
 
- to the mentioned 
-\begin_inset Flex Noun
-status collapsed
+\change_inserted 564990737 1670439605
+Curricula vitarum
+\end_layout
 
-\begin_layout Plain Layout
-Options
+\begin_layout Section
+
+\change_inserted 564990737 1670439627
+Letters
 \end_layout
 
-\end_inset
+\begin_layout Section
 
- field, or you can create so-called 
-\begin_inset Quotes eld
-\end_inset
+\change_inserted 564990737 1670439660
+Presentations
+\end_layout
 
-Bibliography Categories
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Section
 
- to which you can assign individual entries.
- Please refer to the Biblatex manual, section 
-\emph on
-Subdivided Bibliographies
-\emph default
-, for details.
+\change_inserted 564990737 1670439661
+Reports
 \end_layout
 
 \begin_layout Subsection
-Multiple Bibliographies
-\begin_inset CommandInset label
-LatexCommand label
-name "subsec:Multiple-Bibliographies"
 
-\end_inset
+\change_inserted 564990737 1670439661
+report
+\end_layout
 
+\begin_layout Standard
 
+\change_inserted 564990737 1670439661
+The document class 
+\family sans
+report
+\family default
+ provides the 
+\family sans
+report.cls
+\family default
+ document class for preparing reports.
+ Like the 
+\family sans
+book
+\family default
+ document class, this provides parts, chapters and sections but does not
+ provide the paragraph styles needed for a book; like the 
+\family sans
+article
+\family default
+ document class, it provides the abstract paragraph style.
+ In two-sided mode, it does not start a new chapter on the right hand page.
 \end_layout
 
 \begin_layout Standard
-Multiple bibliographies, e.
-\begin_inset space \thinspace{}
-\end_inset
 
-g.
-\begin_inset space \space{}
+\change_inserted 564990737 1670439674
+The remaining 
+\family sans
+report
+\family default
+ document classes are described in the Collections (section
+\begin_inset space ~
 \end_inset
 
-a bibliography for each part, chapter, section, subsection or child (sub-documen
-t) of the document, are also supported by \SpecialChar LyX
-.
- In order to enable it, go to 
-\begin_inset Flex Noun
-status collapsed
 
-\begin_layout Plain Layout
-Document\SpecialChar menuseparator
-Settings\SpecialChar menuseparator
-Bibliography
-\end_layout
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Collections"
 
 \end_inset
 
- and select the relevant unit (e.
+).
+\end_layout
+
+\begin_layout Section
+
+\change_inserted 564990737 1670439674
+Scripts (drama)
+\end_layout
+
+\begin_layout Chapter
+Supplemental Tools
+\end_layout
+
+\begin_layout Section
+Customizing Bibliographies with Bib\SpecialChar TeX
+ or Biblatex
+\end_layout
+
+\begin_layout Standard
+The most basic information about how to use Bib\SpecialChar TeX
+ or 
+\family sans
+Biblatex
+\family default
+ with \SpecialChar LyX
+ is contained in the section 
+\emph on
+Bibliography databases
+\emph default
+ of the 
+\emph on
+User's Guide
+\emph default
+.
+ The following subsections explain special bibliography features supported
+ by \SpecialChar LyX
+.
+\end_layout
+
+\begin_layout Subsection
+Alternative Citation Styles
+\end_layout
+
+\begin_layout Standard
+Standard Bib\SpecialChar TeX
+ uses numbers (e.
 \begin_inset space \thinspace{}
 \end_inset
 
-g., 
+g.
+\begin_inset space \space{}
+\end_inset
+
+
 \begin_inset Quotes eld
 \end_inset
 
-per section
+[12]
 \begin_inset Quotes erd
 \end_inset
 
-) in the 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-Multiple Bibliographies
-\end_layout
+) to refer to a cited work.
+ However, in many scientific disciplines, other citation styles are in use.
+ The most common one is the author-year style (e.
+\begin_inset space \thinspace{}
+\end_inset
 
+g.
+\begin_inset space \space{}
 \end_inset
 
- combo box.
- Then add a Bib(la)\SpecialChar TeX
- bibliography to each unit (e.
-\begin_inset space \thinspace{}
+
+\begin_inset Quotes eld
 \end_inset
 
-g., section) of your document.
- In the output, a separate bibliography, containing only the references
- done in the current unit is generated.
-\end_layout
+Knuth 1984a
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout Standard
-If you use Bib\SpecialChar TeX
-, either the 
+).
+ \SpecialChar LyX
+ supports three packages that provide this style, 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-chapterbib
+biblatex
 \end_layout
 
 \end_inset
 
- or the 
+, 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-bibtopic
+natbib
 \end_layout
 
 \end_inset
 
- package is used to create multiple bibliographies.
- The former package is used if you select 
-\begin_inset Quotes eld
-\end_inset
+, and 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+jurabib
+\end_layout
 
-per child document
-\begin_inset Quotes erd
 \end_inset
 
- and do 
-\emph on
-not
-\emph default
- check 
-\begin_inset Flex Noun
+.
+ Each of these packages has their pros and cons, which cannot be listed
+ in detail.
+ If you only want to have simple author-year (or author-numerical) style,
+ or if you want to use one of the countless style files for 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Sectioned Bibliography
+natbib
 \end_layout
 
 \end_inset
 
-.
- In all other cases, 
+, then the established 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-bibtopic
+natbib
 \end_layout
 
 \end_inset
 
- is used.
-\begin_inset Foot
+ package is probably your choice.
+ If you look for specific citation styles common in law studies, you might
+ consider the 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-An alternative approach, if you are willing to use some 
-\begin_inset Flex Noun
+jurabib
+\end_layout
+
+\end_inset
+
+ package.
+ If you want to have full control over the formatting or look for advanced
+ features such as ibidem, footnote citations, full title citations, advanced
+ date formats (such as 400 BC) or full localization to other languages than
+ English, you should definitely consider 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-\SpecialChar TeX
- Code
+biblatex
 \end_layout
 
 \end_inset
 
- (see section
-\begin_inset space ~
-\end_inset
+, which exceeds all other packages in terms of features, but is also quite
+ heavy and more resource-hungry.
+\end_layout
 
+\begin_layout Standard
+The handling of these packages in \SpecialChar LyX
+ is basically the same.
+ Go to 
+\begin_inset Flex Noun
+status collapsed
 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Inserting-TeX-Code"
+\begin_layout Plain Layout
+Document\SpecialChar menuseparator
+Settings
+\end_layout
 
 \end_inset
 
-), is to use the 
-\begin_inset Flex Code
+ and select under 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-bibunits
+Bibliography
 \end_layout
 
 \end_inset
 
- package.
+ the 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+Style Format
 \end_layout
 
 \end_inset
 
- If 
-\begin_inset Flex Code
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-bibtopic
+Basic (BibTeX)
 \end_layout
 
 \end_inset
 
- is used, \SpecialChar LyX
- encloses the specified units in 
-\begin_inset Flex Code
+, 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-bibtopic
+Biblatex
 \end_layout
 
 \end_inset
 
-'s 
-\begin_inset Flex Code
+, 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-begin{btUnit}
+Biblatex (Natbib mode)
 \end_layout
 
 \end_inset
 
- and 
-\begin_inset Flex Code
+, 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-end{btUnit}
+Natbib (BibTeX)
 \end_layout
 
 \end_inset
 
- in order to create the units.
- Note that this approach has some limitations.
- First, every citation reference has to be inside some 
-\begin_inset Flex Code
+ or 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-btUnit
+Jurabib (BibTeX)
 \end_layout
 
 \end_inset
 
-.
- So citations outside a defined unit (e.
-\begin_inset space \thinspace{}
+ (see sec.
+\begin_inset space ~
 \end_inset
 
-g., before the first section if you use 
+6.5.3 in the User's Guide for more information on these choices).
+ With all these packages, you will get some extra features in the citation
+ dialog and you can select the style of the reference (
 \begin_inset Quotes eld
 \end_inset
 
-by section
+Knuth 1984
 \begin_inset Quotes erd
 \end_inset
 
-) will appear as 
+, 
 \begin_inset Quotes eld
 \end_inset
 
-???
+Knuth (1984)
 \begin_inset Quotes erd
 \end_inset
 
-.
- You can also create your own units by entering 
-\begin_inset Flex Code
-status collapsed
+, 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Plain Layout
+Knuth, 1984
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-begin{btUnit}
-\end_layout
+, 
+\begin_inset Quotes eld
+\end_inset
 
+1984
+\begin_inset Quotes erd
 \end_inset
 
- and 
-\begin_inset Flex Code
+ etc.).
+ Note that either package needs specifically designed style files.
+ They all ship their own, but there are lots of additional style files,
+ and there is even an interactive style file builder
+\begin_inset Foot
 status collapsed
 
+\begin_layout Plain Layout
+See 
+\begin_inset Flex URL
+status open
+
 \begin_layout Plain Layout
 
-\backslash
-end{btUnit}
+ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
 \end_layout
 
 \end_inset
 
- as \SpecialChar TeX
- code (for instance to work around the mentioned limitation).
- Note, though, that 
-\begin_inset Flex Code
-status collapsed
 
-\begin_layout Plain Layout
-btUnit
 \end_layout
 
 \end_inset
 
-s cannot be nested.
- A second limitation is that 
+ for 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-bibtopic
+natbib
 \end_layout
 
 \end_inset
 
- always processes all references of a bibliography database, even if they
- are not cited.
- This can result in odd labels (e.
-\begin_inset space \thinspace{}
-\end_inset
+.
+\end_layout
 
-g.
+\begin_layout Subsection
+Subdivided Bibliographies
+\end_layout
+
+\begin_layout Standard
+Sometimes you might need to divide your bibliography into several sections.
+ If you are for instance a historian, the possibility to separate sources
+ and scientific works is most likely a 
 \begin_inset Quotes eld
 \end_inset
 
-Miller 2014b
+must have
 \begin_inset Quotes erd
 \end_inset
 
- if two works of this author from 2014 are in the database, even if only
- one is cited).
+.
+ Unfortunately, Bib\SpecialChar TeX
+ itself does not allow you to do this.
+ But with the help of some \SpecialChar LaTeX
+ packages, Bib\SpecialChar TeX
+ can be extended to fit your needs.
 \end_layout
 
 \begin_layout Standard
-If you use 
-\family sans
-Biblatex
+\SpecialChar LyX
+ provides native support for one of these packages, 
+\family typewriter
+bibtopic
 \family default
-, the 
-\begin_inset Flex Code
+.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-refsection
-\end_layout
-
-\end_inset
-
- option is used instead.
- If you need specific units, you can start them with the \SpecialChar TeX
- code 
-\begin_inset Flex Code
-status collapsed
+Available from 
+\begin_inset Flex URL
+status open
 
 \begin_layout Plain Layout
 
-\backslash
-newrefsection
+ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
 \end_layout
 
 \end_inset
 
- or 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
 
-\backslash
-newrefsegment
 \end_layout
 
 \end_inset
 
-, respectively.
- If you also want to control the end of the unit, use the environment 
-\begin_inset Flex Code
-status collapsed
+ The advantage of this package (compared to other packages such as 
+\family typewriter
+multibib
+\family default
+) is that you don't need to define new citation commands.
+ Instead, you need to prepare different bibliographic databases which include
+ the entries for the different sections of the bibliography.
+ For example: If you want to divide your bibliography into the sections
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Plain Layout
+Sources
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-begin{refsection}
-\end_layout
+ and 
+\begin_inset Quotes eld
+\end_inset
+
+Scientific works
+\begin_inset Quotes erd
+\end_inset
 
+, you first need to create two bibliographic databases, e.
+\begin_inset space \thinspace{}
 \end_inset
 
- \SpecialChar ldots
+g.
+\begin_inset space \space{}
+\end_inset
+
+
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-end{refsection}
+sources.bib
 \end_layout
 
 \end_inset
 
- instead.
- Note, though, that 
+ and 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-refsection
+scientific.bib
 \end_layout
 
 \end_inset
 
-s cannot be nested.
- In addition to the individual bibliography of the current unit, 
-\family sans
-Biblatex
-\family default
- also provides an easy way to output all bibliographies, subsequently, at
- one place (e.
-\begin_inset space \thinspace{}
-\end_inset
-
-g., at the end of the document).
- Select 
-\begin_inset Quotes eld
-\end_inset
-
-all reference units
-\begin_inset Quotes erd
-\end_inset
-
- from the Content combo box of the Bib(la)TeX inset dialog in order to achieve
- this.
- Please refer to the 
-\family sans
-Biblatex
-\family default
- manual for more information on this topic.
+.
 \end_layout
 
-\begin_layout Section
-Multipart Documents
-\end_layout
+\begin_layout Standard
+Go to 
+\begin_inset Flex Noun
+status collapsed
 
-\begin_layout Subsection
-General Operation
+\begin_layout Plain Layout
+Document\SpecialChar menuseparator
+Settings
 \end_layout
 
-\begin_layout Standard
-When you are working on a large file with many sections, it is often convenient
- to break up the document into several files, or perhaps you have something
- where a table may change from time to time, but the preceding text does
- not.
- In these cases, you should seriously consider using multipart documents.
- For example, scientific papers often have five major sections: the introduction
-, observations, results, discussion, and conclusion.
- Each of these could be its own separate \SpecialChar LyX
- file, with one 
-\begin_inset Quotes eld
 \end_inset
 
-master
-\begin_inset Quotes erd
-\end_inset
+ and check under 
+\begin_inset Flex Noun
+status collapsed
 
- file which contains the title, authors, abstract, references, etc., plus
- the five included files.
- It is important to note that each of these files is a full \SpecialChar LyX
- file which
- can be formatted and printed on its own, as well as included in a master
- file.
- Each of these files must have the same document class, however—don't attempt
- to mix book classes with article classes.
- You may also include \SpecialChar LaTeX
- files; however, these files must not have their own
- preamble (i.
-\begin_inset space \thinspace{}
-\end_inset
+\begin_layout Plain Layout
+Bibliography
+\end_layout
 
-e.
-\begin_inset space \space{}
 \end_inset
 
-everything up to and including the 
-\begin_inset Flex Code
+ the option 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-begin{document}
+Subdivided bibliography
 \end_layout
 
 \end_inset
 
- line as well as the 
+.
+ Now you can insert multiple Bib\SpecialChar TeX
+ bibliographies, one for each section of
+ your bibliography.
+ Returning to our example: Insert the Bib\SpecialChar TeX
+ bibliography 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-end{document}
+sources.bib
 \end_layout
 
 \end_inset
 
- line must be deleted) or else errors will be generated when you try to
- make a DVI file.
-\end_layout
-
-\begin_layout Standard
-\SpecialChar LyX
- allows you to include files quite easily with 
-\begin_inset Flex Noun
+ and a second one for the database 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Insert\SpecialChar menuseparator
-Child
-\begin_inset space ~
-\end_inset
-
-Document
+scientific.bib
 \end_layout
 
 \end_inset
 
 .
- When you click on this selection a small box is inserted into the file
- at the current cursor location.
- Clicking on the box raises a dialog which allows you to select the file
- to be included, and the method of its inclusion.
+ You are free to use the same or different styles for each section.
+ Additionally, you can choose if the bibliography section should contain
  
-\end_layout
-
-\begin_layout Standard
-The file selection box should by now be obvious.
- The three inclusion methods are 
 \begin_inset Quotes eld
 \end_inset
 
-include
+all cited references
 \begin_inset Quotes erd
 \end_inset
 
-, 
+ of the specified database(s) (which is the default)
 \begin_inset Quotes eld
 \end_inset
 
-input
+all uncited references
 \begin_inset Quotes erd
 \end_inset
 
-, and 
+ or even 
 \begin_inset Quotes eld
 \end_inset
 
-verbatim
+all references
 \begin_inset Quotes erd
 \end_inset
 
 .
- The methods 
+ This might be useful if you would like to separate your bibliography into
+ three sections: 
 \begin_inset Quotes eld
 \end_inset
 
-include
+Cited sources
 \begin_inset Quotes erd
 \end_inset
 
- and 
+, 
 \begin_inset Quotes eld
 \end_inset
 
-input
+Uncited sources
 \begin_inset Quotes erd
 \end_inset
 
- are similar in many ways, but there are also some notable differences:
-\end_layout
-
-\begin_layout Enumerate
-Files that are 
+, and 
 \begin_inset Quotes eld
 \end_inset
 
-included
+Scientific works
 \begin_inset Quotes erd
 \end_inset
 
- are typeset beginning on a new page, while files that are 
-\begin_inset Quotes eld
-\end_inset
+.
+ The titles for the sections can be added as ordinary sections or subsections.
+ Since 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+bibtopic
+\end_layout
 
-inputted
-\begin_inset Quotes erd
 \end_inset
 
- are typeset starting on the current page.
+ removes the bibliography title, you have to manually re-add that, too (as
+ a chapter* or section*, for instance).
 \end_layout
 
-\begin_layout Enumerate
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Standard
+With 
+\family sans
+Biblatex
+\family default
+, the procedure is a bit different.
+ Since 
+\family typewriter
+bibtopic
+\family default
+ does not work with 
+\family sans
+Biblatex
+\family default
+, the aforementioned 
+\begin_inset Flex Noun
+status collapsed
 
-Included
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
+Subdivided bibliography
+\end_layout
 
- files cannot themselves 
-\begin_inset Quotes eld
 \end_inset
 
-include
-\begin_inset Quotes erd
-\end_inset
+ option is disabled if you use 
+\family sans
+Biblatex
+\family default
+.
+ However, 
+\family sans
+Biblatex
+\family default
+ provides its own means to generate subdivided bibliographies.
+ You can either add keywords to bibliography entries via the 
+\begin_inset Flex Code
+status collapsed
 
- further files (
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Plain Layout
+keywords
+\end_layout
 
-grandchilds
-\begin_inset Quotes erd
 \end_inset
 
-).
- With 
-\begin_inset Quotes eld
-\end_inset
+ entry option and then filter bibliography sections by keyword (by adding
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+keyword=mykeyword
+\end_layout
 
-input
-\begin_inset Quotes erd
 \end_inset
 
-, on the other hand, infinite sub-inputting is possible.
+ to the 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+Options
 \end_layout
 
-\begin_layout Enumerate
-\begin_inset Quotes eld
 \end_inset
 
-Include
-\begin_inset Quotes erd
-\end_inset
+ field of the dialog that opens if you left-click on the 
+\begin_inset Flex Noun
+status collapsed
 
- allow for the output of only selected 
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Plain Layout
+Biblatex Generated Bibliography
+\end_layout
 
-included
-\begin_inset Quotes erd
 \end_inset
 
- files, while maintaining the actual counters (pagination etc.) and references
- (please refer to the section 
+ button), or you can filter by entry types (such as 
 \emph on
-Child
-\begin_inset space ~
-\end_inset
-
-Documents
+book
 \emph default
- of the 
+ or 
 \emph on
-Embedded
-\begin_inset space ~
+article
+\emph default
+) by entering e.
+\begin_inset space \thinspace{}
 \end_inset
 
-Objects
-\emph default
- manual for details).
+g.
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+type=book
 \end_layout
 
-\begin_layout Standard
-Hence, 
-\begin_inset Quotes eld
 \end_inset
 
-include
-\begin_inset Quotes erd
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+nottype=collection
+\end_layout
+
 \end_inset
 
- is the preferred method for chapters that are outsourced to child documents,
- while 
+ to the mentioned 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+Options
+\end_layout
+
+\end_inset
+
+ field, or you can create so-called 
 \begin_inset Quotes eld
 \end_inset
 
-input
+Bibliography Categories
 \begin_inset Quotes erd
 \end_inset
 
- is more suitable for arbitrary file inheritance.
+ to which you can assign individual entries.
+ Please refer to the Biblatex manual, section 
+\emph on
+Subdivided Bibliographies
+\emph default
+, for details.
 \end_layout
 
-\begin_layout Standard
-A 
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Subsection
+Multiple Bibliographies
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:Multiple-Bibliographies"
 
-verbatim
-\begin_inset Quotes erd
 \end_inset
 
- included file allows you to include a file typeset exactly as it appears
- in the file, i.
+
+\end_layout
+
+\begin_layout Standard
+Multiple bibliographies, e.
 \begin_inset space \thinspace{}
 \end_inset
 
-e.
+g.
 \begin_inset space \space{}
 \end_inset
 
-in 
-\begin_inset Flex Code
+a bibliography for each part, chapter, section, subsection or child (sub-documen
+t) of the document, are also supported by \SpecialChar LyX
+.
+ In order to enable it, go to 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-verbatim
+Document\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
+Bibliography
 \end_layout
 
 \end_inset
 
- mode, with the characters set in a fixed-width typewriter font.
- Normally, spaces in this file are invisible, though two consecutive spaces
- are conserved, unlike \SpecialChar LyX
-'s normal treatment of spaces.
- However, setting the 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-Mark
-\begin_inset space ~
+ and select the relevant unit (e.
+\begin_inset space \thinspace{}
 \end_inset
 
-spaces
-\begin_inset space ~
+g., 
+\begin_inset Quotes eld
 \end_inset
 
-in
-\begin_inset space ~
+per section
+\begin_inset Quotes erd
 \end_inset
 
-output
+) in the 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+Multiple Bibliographies
 \end_layout
 
 \end_inset
 
- checkbox typesets a mark to unambiguously define the presence of a space.
-\end_layout
-
-\begin_layout Standard
-Generally, the master file is converted into a full \SpecialChar LaTeX
- file before typesetting,
- while the included files are converted to \SpecialChar LaTeX
- files that do not have all the
- preamble information.
-\end_layout
+ combo box.
+ Then add a Bib(la)\SpecialChar TeX
+ bibliography to each unit (e.
+\begin_inset space \thinspace{}
+\end_inset
 
-\begin_layout Subsection
-Cross-References Between Files
+g., section) of your document.
+ In the output, a separate bibliography, containing only the references
+ done in the current unit is generated.
 \end_layout
 
 \begin_layout Standard
-\begin_inset Box Shadowbox
-position "t"
-hor_pos "c"
-has_inner_box 1
-inner_pos "t"
-use_parbox 0
-use_makebox 0
-width "100col%"
-special "none"
-height "1in"
-height_special "totalheight"
-thickness "0.4pt"
-separation "3pt"
-shadowsize "4pt"
-framecolor "black"
-backgroundcolor "none"
-status open
+If you use Bib\SpecialChar TeX
+, either the 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
-This section is somewhat out of date.
- Need to describe default master documents and how children are opened when
- the master is.
- [[FIXME]]
+chapterbib
 \end_layout
 
 \end_inset
 
+ or the 
+\begin_inset Flex Code
+status collapsed
 
+\begin_layout Plain Layout
+bibtopic
 \end_layout
 
-\begin_layout Standard
-It is possible to set up cross-references between the different files.
- First, open all the files in question: let's call them A and B in a two
- file example, where B is included in A.
- Let's say you insert a label in A, then want to reference it in B.
- Open the cross-reference dialog whilst in document B, and you can select
- the 
+\end_inset
+
+ package is used to create multiple bibliographies.
+ The former package is used if you select 
 \begin_inset Quotes eld
 \end_inset
 
-buffer
+per child document
 \begin_inset Quotes erd
 \end_inset
 
- to use.
-\end_layout
+ and do 
+\emph on
+not
+\emph default
+ check 
+\begin_inset Flex Noun
+status collapsed
 
-\begin_layout Subsection
-Bibliography Lists in all Subdocuments
+\begin_layout Plain Layout
+Sectioned Bibliography
 \end_layout
 
-\begin_layout Standard
-If you work with child documents, you might want to have only one main bibliogra
-phy at the end, but still be able to have a selected bibliography for the
- child if you output it on its own.
- Here is how to achieve this.
-\end_layout
+\end_inset
 
-\begin_layout Standard
-For the main document, you just insert a bibliography inset at the place
- where the main bibliography has to appear (within the master file or within
- a child).
- If the bibliography inset is in the master file, the references will be
- inherited by all children, so they are available in the citation dialog
- within each child.
+.
+ In all other cases, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+bibtopic
 \end_layout
 
-\begin_layout Standard
-For child-specific bibliographies, insert bibliography insets within the
- child documents, at the place where the bibliography should appear when
- the child is compiled separately.
- However, the trick is to insert them into a branch (
-\family sans
-Insert\SpecialChar menuseparator
-Branch\SpecialChar menuseparator
-Insert New Branch...
-\family default
-), e.
-\begin_inset space \thinspace{}
 \end_inset
 
-g.
- called 
-\begin_inset Quotes eld
-\end_inset
+ is used.
+\begin_inset Foot
+status collapsed
 
-Childonly
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
+An alternative approach, if you are willing to use some 
+\begin_inset Flex Noun
+status collapsed
 
-.
- Within the children, activate the branch (
-\family sans
-Document\SpecialChar menuseparator
-Settings...\SpecialChar menuseparator
-Branches
-\family default
-).
- Within the master, deactivate the branch (
-\family sans
-Document\SpecialChar menuseparator
-Settings...\SpecialChar menuseparator
-Branches
-\family default
-).
- Now the child's bibliography will be ignored by the master, but considered
- by the child.
+\begin_layout Plain Layout
+\SpecialChar TeX
+ Code
 \end_layout
 
-\begin_layout Standard
-If you need multiple bibliographies (e.
-\begin_inset space \thinspace{}
 \end_inset
 
-g., one per child in the 
-\emph on
-main document
-\emph default
-), please refer to sec.
+ (see section
 \begin_inset space ~
 \end_inset
 
 
 \begin_inset CommandInset ref
 LatexCommand ref
-reference "subsec:Multiple-Bibliographies"
+reference "sec:Inserting-TeX-Code"
 
 \end_inset
 
-.
-\end_layout
+), is to use the 
+\begin_inset Flex Code
+status collapsed
 
-\begin_layout Section
-\SpecialChar LyX
- Archives
+\begin_layout Plain Layout
+bibunits
 \end_layout
 
-\begin_layout Standard
-Users sometimes need to be able to 
-\begin_inset Quotes eld
 \end_inset
 
-bundle
-\begin_inset Quotes erd
+ package.
+\end_layout
+
 \end_inset
 
- a \SpecialChar LyX
- file together with all the images (and other files) on which it depends,
- either for sending to a publisher or for sharing with a co-author.
- \SpecialChar LyX
- includes a Python script (
+ If 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxpak.py
+bibtopic
 \end_layout
 
 \end_inset
 
-) that automates this process.
- To use it, you must have either the 
+ is used, \SpecialChar LyX
+ encloses the specified units in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-zipfile
+bibtopic
 \end_layout
 
 \end_inset
 
- or 
+'s 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-tarfile
+
+\backslash
+begin{btUnit}
 \end_layout
 
 \end_inset
 
- python modules installed on your system.
- By default, the script prefers the 
+ and 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-gzip
+
+\backslash
+end{btUnit}
 \end_layout
 
 \end_inset
 
--compressed 
+ in order to create the units.
+ Note that this approach has some limitations.
+ First, every citation reference has to be inside some 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-tar
+btUnit
 \end_layout
 
 \end_inset
 
- format on Unix-like systems and the 
-\begin_inset Flex Code
-status collapsed
+.
+ So citations outside a defined unit (e.
+\begin_inset space \thinspace{}
+\end_inset
 
-\begin_layout Plain Layout
-zip
-\end_layout
+g., before the first section if you use 
+\begin_inset Quotes eld
+\end_inset
 
+by section
+\begin_inset Quotes erd
 \end_inset
 
- format on Windows.
-\end_layout
+) will appear as 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Standard
-\SpecialChar LyX
-'s configuration process will set the script up to export a `\SpecialChar LyX
- Archive',
- and this format will then be available under 
+???
+\begin_inset Quotes erd
+\end_inset
+
+.
+ You can also create your own units by entering 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-File\SpecialChar menuseparator
-Export
+
+\backslash
+begin{btUnit}
 \end_layout
 
 \end_inset
 
-.
-\end_layout
-
-\begin_layout Standard
-Independently of the platform, the generation of a particular archive format
- can be forced by adding either the 
+ and 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
--t
+
+\backslash
+end{btUnit}
 \end_layout
 
 \end_inset
 
- (for the 
+ as \SpecialChar TeX
+ code (for instance to work around the mentioned limitation).
+ Note, though, that 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-tar
+btUnit
 \end_layout
 
 \end_inset
 
- format) or 
+s cannot be nested.
+ A second limitation is that 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
--z
+bibtopic
 \end_layout
 
 \end_inset
 
- (for the 
+ always processes all references of a bibliography database, even if they
+ are not cited.
+ This can result in odd labels (e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
+\begin_inset Quotes eld
+\end_inset
+
+Miller 2014b
+\begin_inset Quotes erd
+\end_inset
+
+ if two works of this author from 2014 are in the database, even if only
+ one is cited).
+\end_layout
+
+\begin_layout Standard
+If you use 
+\family sans
+Biblatex
+\family default
+, the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-zip
+refsection
 \end_layout
 
 \end_inset
 
- format) switch to the 
+ option is used instead.
+ If you need specific units, you can start them with the \SpecialChar TeX
+ code 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-\SpecialChar LyX
-\SpecialChar menuseparator
-\SpecialChar LyX
- Archive
+
+\backslash
+newrefsection
 \end_layout
 
 \end_inset
 
- converter in 
+ or 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Tools\SpecialChar menuseparator
-Preferences\SpecialChar menuseparator
-File Handling\SpecialChar menuseparator
-Converters
-\end_layout
 
-\end_inset
-
-.
- (Make sure you add the switch after the script name, not before it.)
+\backslash
+newrefsegment
 \end_layout
 
-\begin_layout Section
-Fancy Headers and Footers
-\end_layout
+\end_inset
 
-\begin_layout Standard
-The default page layout is rather plain; for an 
+, respectively.
+ If you also want to control the end of the unit, use the environment 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-article
+
+\backslash
+begin{refsection}
 \end_layout
 
 \end_inset
 
- document class, all you get is a centered page number at the bottom of
- the page.
- This document uses KOMA-script's book class, so it appears to be a bit
- fancier.
- But to really put on a show, you need to set the document page style to
+ \SpecialChar ldots
  
-\begin_inset Quotes eld
-\end_inset
-
-fancy
-\begin_inset Quotes erd
-\end_inset
-
-, as mentioned in the 
-\emph on
-User Guide
-\emph default
-.
- This section describes the \SpecialChar LaTeX
- code you need to insert in your \SpecialChar LaTeX
- preamble in
- order to get the desired effects.
-\end_layout
-
-\begin_layout Standard
-For more information on fancy headers, see the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-fancyhdr
+
+\backslash
+end{refsection}
 \end_layout
 
 \end_inset
 
package documentation.
- (
-\begin_inset Flex URL
instead.
+ Note, though, that 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-
-https://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
+refsection
 \end_layout
 
 \end_inset
 
-)
-\end_layout
+s cannot be nested.
+ In addition to the individual bibliography of the current unit, 
+\family sans
+Biblatex
+\family default
+ also provides an easy way to output all bibliographies, subsequently, at
+ one place (e.
+\begin_inset space \thinspace{}
+\end_inset
 
-\begin_layout Standard
-The page header is divided into three fields, not surprisingly labeled 
+g., at the end of the document).
+ Select 
 \begin_inset Quotes eld
 \end_inset
 
-left
+all reference units
 \begin_inset Quotes erd
 \end_inset
 
-, 
-\begin_inset Quotes eld
-\end_inset
+ from the Content combo box of the Bib(la)TeX inset dialog in order to achieve
+ this.
+ Please refer to the 
+\family sans
+Biblatex
+\family default
+ manual for more information on this topic.
+\end_layout
 
-center
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Section
+Multipart Documents
+\end_layout
 
-, and 
+\begin_layout Subsection
+General Operation
+\end_layout
+
+\begin_layout Standard
+When you are working on a large file with many sections, it is often convenient
+ to break up the document into several files, or perhaps you have something
+ where a table may change from time to time, but the preceding text does
+ not.
+ In these cases, you should seriously consider using multipart documents.
+ For example, scientific papers often have five major sections: the introduction
+, observations, results, discussion, and conclusion.
+ Each of these could be its own separate \SpecialChar LyX
+ file, with one 
 \begin_inset Quotes eld
 \end_inset
 
-right
+master
 \begin_inset Quotes erd
 \end_inset
 
-.
- The footer is also divided into these three fields.
- The \SpecialChar LaTeX
- commands to set these fields in the simplest manner are 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-lhead
-\end_layout
-
+ file which contains the title, authors, abstract, references, etc., plus
+ the five included files.
+ It is important to note that each of these files is a full \SpecialChar LyX
+ file which
+ can be formatted and printed on its own, as well as included in a master
+ file.
+ Each of these files must have the same document class, however—don't attempt
+ to mix book classes with article classes.
+ You may also include \SpecialChar LaTeX
+ files; however, these files must not have their own
+ preamble (i.
+\begin_inset space \thinspace{}
 \end_inset
 
-, 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-chead
-\end_layout
-
+e.
+\begin_inset space \space{}
 \end_inset
 
-, 
+everything up to and including the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
 
 \backslash
-rhead
+begin{document}
 \end_layout
 
 \end_inset
 
-, 
+ line as well as the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
 
 \backslash
-lfoot
+end{document}
 \end_layout
 
 \end_inset
 
-, etc.
- Suppose you wish to put your name in the upper left hand corner of each
- page.
- Simply insert the following command in the preamble: 
+ line must be deleted) or else errors will be generated when you try to
+ make a DVI file.
 \end_layout
 
 \begin_layout Standard
+\SpecialChar LyX
+ allows you to include files quite easily with 
+\begin_inset Flex Noun
+status collapsed
 
-\family typewriter
-
-\backslash
-lhead{John Q.
- DocWriter}
-\end_layout
-
-\begin_layout Standard
-You will now see your name in the upper left.
- If a field has a default entry that you would like to get rid of (often
- the page number appears in the central footer) simply include a command
- with a blank argument, e.
-\begin_inset space \thinspace{}
+\begin_layout Plain Layout
+Insert\SpecialChar menuseparator
+Child
+\begin_inset space ~
 \end_inset
 
-g.:
+Document
 \end_layout
 
-\begin_layout Standard
-
-\family typewriter
+\end_inset
 
-\backslash
-cfoot{}
+.
+ When you click on this selection a small box is inserted into the file
+ at the current cursor location.
+ Clicking on the box raises a dialog which allows you to select the file
+ to be included, and the method of its inclusion.
 \end_layout
 
 \begin_layout Standard
-Let's get really fancy: lets put the section number with the word 
+The file selection box should by now be obvious.
+ The three inclusion methods are 
 \begin_inset Quotes eld
 \end_inset
 
-Section
+include
 \begin_inset Quotes erd
 \end_inset
 
- (e.
-\begin_inset space \thinspace{}
+, 
+\begin_inset Quotes eld
 \end_inset
 
-g.
-\begin_inset space \space{}
+input
+\begin_inset Quotes erd
 \end_inset
 
-Section 3) in the upper left, the page number (e.
-\begin_inset space \thinspace{}
+, and 
+\begin_inset Quotes eld
 \end_inset
 
-g.
-\begin_inset space \space{}
+verbatim
+\begin_inset Quotes erd
 \end_inset
 
-Page 4) in the upper right, your name in the lower left, and the date in
- the lower right.
- The following commands should now appear in the preamble:
-\end_layout
-
-\begin_layout Standard
-
-\family typewriter
+.
+ The methods 
+\begin_inset Quotes eld
+\end_inset
 
-\backslash
-lhead{Section 
-\backslash
-thesection}
-\end_layout
+include
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout Standard
+ and 
+\begin_inset Quotes eld
+\end_inset
 
-\family typewriter
+input
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-chead{}
+ are similar in many ways, but there are also some notable differences:
 \end_layout
 
-\begin_layout Standard
-
-\family typewriter
+\begin_layout Enumerate
+Files that are 
+\begin_inset Quotes eld
+\end_inset
 
-\backslash
-rhead{Page 
-\backslash
-thepage}
-\end_layout
+included
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout Standard
+ are typeset beginning on a new page, while files that are 
+\begin_inset Quotes eld
+\end_inset
 
-\family typewriter
+inputted
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-lfoot{John Q.
- DocWriter}
+ are typeset starting on the current page.
 \end_layout
 
-\begin_layout Standard
+\begin_layout Enumerate
+\begin_inset Quotes eld
+\end_inset
 
-\family typewriter
+Included
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-cfoot{}
-\end_layout
+ files cannot themselves 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Standard
+include
+\begin_inset Quotes erd
+\end_inset
 
-\family typewriter
+ further files (
+\begin_inset Quotes eld
+\end_inset
 
-\backslash
-rfoot{
-\backslash
-today}
-\end_layout
+grandchilds
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout Standard
-The commands 
-\begin_inset Flex Code
-status collapsed
+).
+ With 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Plain Layout
+input
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-thesection
+, on the other hand, infinite sub-inputting is possible.
 \end_layout
 
+\begin_layout Enumerate
+\begin_inset Quotes eld
 \end_inset
 
- and 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-thepage
-\end_layout
-
+Include
+\begin_inset Quotes erd
 \end_inset
 
- access \SpecialChar LaTeX
-'s section and page counters, and so print out the current section
- and page number.
-\begin_inset Flex Code
-status collapsed
+ allow for the output of only selected 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Plain Layout
+included
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-today
-\end_layout
+ files, while maintaining the actual counters (pagination etc.) and references
+ (please refer to the section 
+\emph on
+Child
+\begin_inset space ~
+\end_inset
 
+Documents
+\emph default
+ of the 
+\emph on
+Embedded
+\begin_inset space ~
 \end_inset
 
- simply prints out today's date.
+Objects
+\emph default
+ manual for details).
 \end_layout
 
 \begin_layout Standard
-The thicknesses of the horizontal rules drawn beneath the header and above
- the footer can also be modified.
- If you don't want one of the rules, set its thickness to 0.
- The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
- Use commands
-\family typewriter
-\family default
-like 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-renewcommand{
-\backslash
-headrulewidth}{0.4pt}
-\end_layout
-
+Hence, 
+\begin_inset Quotes eld
 \end_inset
 
- and 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
+include
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-renewcommand{
-\backslash
-footrulewidth}{0.4pt}
-\end_layout
+ is the preferred method for chapters that are outsourced to child documents,
+ while 
+\begin_inset Quotes eld
+\end_inset
 
+input
+\begin_inset Quotes erd
 \end_inset
 
to set the thicknesses.
is more suitable for arbitrary file inheritance.
 \end_layout
 
 \begin_layout Standard
-You can switch the header/footer settings on and off for individual pages
- using commands like 
-\begin_inset Flex Code
-status collapsed
+A 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Plain Layout
+verbatim
+\begin_inset Quotes erd
+\end_inset
 
-\backslash
-thispagestyle{empty}
-\end_layout
+ included file allows you to include a file typeset exactly as it appears
+ in the file, i.
+\begin_inset space \thinspace{}
+\end_inset
 
+e.
+\begin_inset space \space{}
 \end_inset
 
-, 
+in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-thispagestyle{plain}
+verbatim
 \end_layout
 
 \end_inset
 
-, and 
-\begin_inset Flex Code
+ mode, with the characters set in a fixed-width typewriter font.
+ Normally, spaces in this file are invisible, though two consecutive spaces
+ are conserved, unlike \SpecialChar LyX
+'s normal treatment of spaces.
+ However, setting the 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
+Mark
+\begin_inset space ~
+\end_inset
 
-\backslash
-thispagestyle{fancy}
-\end_layout
+spaces
+\begin_inset space ~
+\end_inset
 
+in
+\begin_inset space ~
 \end_inset
 
-.
- Simply insert them in the text on the page you want changed and mark them
- as \SpecialChar TeX
- code.
- In fact, title pages are marked as plain by default, while following pages
- are marked fancy when using the global fancy setting.
+output
 \end_layout
 
-\begin_layout Standard
-As a final example, it is possible to include an image in the header or
- footer.
- Suppose you want to put a company logo in the upper lefthand corner.
- You might try something like
+\end_inset
+
+ checkbox typesets a mark to unambiguously define the presence of a space.
 \end_layout
 
 \begin_layout Standard
+Generally, the master file is converted into a full \SpecialChar LaTeX
+ file before typesetting,
+ while the included files are converted to \SpecialChar LaTeX
+ files that do not have all the
+ preamble information.
+\end_layout
 
-\family typewriter
-
-\backslash
-lhead{
-\backslash
-resizebox{1in}{!}{
-\backslash
-includegraphics{logo.eps}}}
+\begin_layout Subsection
+Cross-References Between Files
 \end_layout
 
 \begin_layout Standard
-\noindent
-(you may need to preface this with 
-\begin_inset Flex Code
-status collapsed
+\begin_inset Box Shadowbox
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "none"
+status open
 
 \begin_layout Plain Layout
-
-\backslash
-usepackage{graphics}
+This section is somewhat out of date.
+ Need to describe default master documents and how children are opened when
+ the master is.
+ [[FIXME]]
 \end_layout
 
 \end_inset
 
- if you don't include graphics elsewhere in your document).
+
 \end_layout
 
-\begin_layout Section
-Itemize Bullet Selection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:bullet"
+\begin_layout Standard
+It is possible to set up cross-references between the different files.
+ First, open all the files in question: let's call them A and B in a two
+ file example, where B is included in A.
+ Let's say you insert a label in A, then want to reference it in B.
+ Open the cross-reference dialog whilst in document B, and you can select
+ the 
+\begin_inset Quotes eld
+\end_inset
 
+buffer
+\begin_inset Quotes erd
 \end_inset
 
+ to use.
+\end_layout
 
+\begin_layout Subsection
+Bibliography Lists in all Subdocuments
 \end_layout
 
 \begin_layout Standard
-by
-\noun on
- Allan Rae
+If you work with child documents, you might want to have only one main bibliogra
+phy at the end, but still be able to have a selected bibliography for the
+ child if you output it on its own.
+ Here is how to achieve this.
 \end_layout
 
-\begin_layout Subsection
-Introduction
+\begin_layout Standard
+For the main document, you just insert a bibliography inset at the place
+ where the main bibliography has to appear (within the master file or within
+ a child).
+ If the bibliography inset is in the master file, the references will be
+ inherited by all children, so they are available in the citation dialog
+ within each child.
 \end_layout
 
 \begin_layout Standard
-\SpecialChar LyX
- provides 216 bullet shapes that can be accessed from a simple dialog.
- Using this dialog you can easily specify what bullet shape to use at each
- level of an itemized list.
- These settings are document-wide so you won't be able to specify different
- sets of bullets for different paragraphs.
-\begin_inset Foot
-status collapsed
+For child-specific bibliographies, insert bibliography insets within the
+ child documents, at the place where the bibliography should appear when
+ the child is compiled separately.
+ However, the trick is to insert them into a branch (
+\family sans
+Insert\SpecialChar menuseparator
+Branch\SpecialChar menuseparator
+Insert New Branch...
+\family default
+), e.
+\begin_inset space \thinspace{}
+\end_inset
 
-\begin_layout Plain Layout
-Well, actually you can but you'll have to do it by hand.
+g.
+ called 
+\begin_inset Quotes eld
+\end_inset
+
+Childonly
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Within the children, activate the branch (
+\family sans
+Document\SpecialChar menuseparator
+Settings...\SpecialChar menuseparator
+Branches
+\family default
+).
+ Within the master, deactivate the branch (
+\family sans
+Document\SpecialChar menuseparator
+Settings...\SpecialChar menuseparator
+Branches
+\family default
+).
+ Now the child's bibliography will be ignored by the master, but considered
+ by the child.
 \end_layout
 
+\begin_layout Standard
+If you need multiple bibliographies (e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g., one per child in the 
+\emph on
+main document
+\emph default
+), please refer to sec.
+\begin_inset space ~
 \end_inset
 
 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:Multiple-Bibliographies"
+
+\end_inset
+
+.
 \end_layout
 
-\begin_layout Subsection
-How it looks
+\begin_layout Section
+\SpecialChar LyX
+ Archives
 \end_layout
 
 \begin_layout Standard
-Open the dialog by selecting the 
-\begin_inset Flex Noun
+Users sometimes need to be able to 
+\begin_inset Quotes eld
+\end_inset
+
+bundle
+\begin_inset Quotes erd
+\end_inset
+
+ a \SpecialChar LyX
+ file together with all the images (and other files) on which it depends,
+ either for sending to a publisher or for sharing with a co-author.
+ \SpecialChar LyX
+ includes a Python script (
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Document\SpecialChar menuseparator
-Settings
+lyxpak.py
 \end_layout
 
 \end_inset
 
- menu item and then select the 
-\begin_inset Flex Noun
+) that automates this process.
+ To use it, you must have either the 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Bullets
+zipfile
 \end_layout
 
 \end_inset
 
- tab.
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+tarfile
 \end_layout
 
-\begin_layout Standard
-The dialog provides you with a table of bullet shapes.
- A column of buttons on the left of the table provides access to the six
- different panels of bullet shapes.
- The row of buttons across the top is used to select which bullet depth
- you are changing.
+\end_inset
 
-\change_deleted 244031559 1603875981
- A text entry under the table shows the currently selected bullet shape's
- \SpecialChar LaTeX
- equivalent and this can be edited if desired.
- If you do modify the text you will also need to specify any needed packages
- in the \SpecialChar LaTeX
- preamble.
-\change_unchanged
+ python modules installed on your system.
+ By default, the script prefers the 
+\begin_inset Flex Code
+status collapsed
 
+\begin_layout Plain Layout
+gzip
 \end_layout
 
-\begin_layout Standard
-The six panels are divided up by the packages they require.
- The following table shows the mappings from button name to \SpecialChar LaTeX
- package.
-\end_layout
+\end_inset
 
-\begin_layout Standard
-\align center
-\begin_inset Tabular
-<lyxtabular version="3" rows="7" columns="2">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="0pt">
-<column alignment="center" valignment="top" width="0pt">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
+-compressed 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
-
-\family roman
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-Button
+tar
 \end_layout
 
 \end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
+
+ format on Unix-like systems and the 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
+zip
+\end_layout
 
-\family roman
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-Packages Required
+\end_inset
+
+ format on Windows.
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
+\begin_layout Standard
+\SpecialChar LyX
+'s configuration process will set the script up to export a `\SpecialChar LyX
+ Archive',
+ and this format will then be available under 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
-
-\family sans
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-Standard
+File\SpecialChar menuseparator
+Export
 \end_layout
 
 \end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+.
+\end_layout
 
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-base \SpecialChar LaTeX
+\begin_layout Standard
+Independently of the platform, the generation of a particular archive format
+ can be forced by adding either the 
+\begin_inset Flex Code
+status collapsed
 
+\begin_layout Plain Layout
+-t
 \end_layout
 
 \end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+ (for the 
+\begin_inset Flex Code
+status collapsed
 
-\family sans
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-Maths
+\begin_layout Plain Layout
+tar
 \end_layout
 
 \end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+ format) or 
+\begin_inset Flex Code
+status collapsed
 
-\family typewriter
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-amssymb.sty
+\begin_layout Plain Layout
+-z
 \end_layout
 
 \end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+ (for the 
+\begin_inset Flex Code
+status collapsed
 
-\family sans
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-Ding1
+\begin_layout Plain Layout
+zip
 \end_layout
 
 \end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+ format) switch to the 
+\begin_inset Flex Code
+status collapsed
 
-\family typewriter
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-pifont.sty
+\begin_layout Plain Layout
+\SpecialChar LyX
+\SpecialChar menuseparator
+\SpecialChar LyX
+ Archive
 \end_layout
 
 \end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+ converter in 
+\begin_inset Flex Code
+status collapsed
 
-\family sans
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-Ding2
+\begin_layout Plain Layout
+Tools\SpecialChar menuseparator
+Preferences\SpecialChar menuseparator
+File Handling\SpecialChar menuseparator
+Converters
 \end_layout
 
 \end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+.
+ (Make sure you add the switch after the script name, not before it.)
+\end_layout
 
-\family typewriter
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-pifont.sty
+\begin_layout Section
+Fancy Headers and Footers
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
+\begin_layout Standard
+The default page layout is rather plain; for an 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
-
-\family sans
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-Ding3
+article
 \end_layout
 
 \end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+ document class, all you get is a centered page number at the bottom of
+ the page.
+ This document uses KOMA-script's book class, so it appears to be a bit
+ fancier.
+ But to really put on a show, you need to set the document page style to
+\begin_inset Quotes eld
+\end_inset
 
-\family typewriter
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-pifont.sty
+fancy
+\begin_inset Quotes erd
+\end_inset
+
+, as mentioned in the 
+\emph on
+User Guide
+\emph default
+.
+ This section describes the \SpecialChar LaTeX
+ code you need to insert in your \SpecialChar LaTeX
+ preamble in
+ order to get the desired effects.
 \end_layout
 
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
+\begin_layout Standard
+For more information on fancy headers, see the 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
-
-\family sans
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-Ding4
+fancyhdr
 \end_layout
 
 \end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\begin_layout Plain Layout
+ package documentation.
+ (
+\begin_inset Flex URL
+status collapsed
 
-\family typewriter
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-pifont.sty
-\end_layout
+\begin_layout Plain Layout
 
-\end_inset
-</cell>
-</row>
-</lyxtabular>
+https://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
+\end_layout
 
 \end_inset
 
-
+)
 \end_layout
 
 \begin_layout Standard
-\SpecialChar LyX
- doesn't stop you using bullets from packages you don't have.
- If you get errors from \SpecialChar LaTeX
- when you try to view or print the file, then it
- is likely you are missing a package.
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-\SpecialChar LyX
- doesn't restrict your use since you may be editing locally and exporting
- elsewhere.
-\end_layout
-
+The page header is divided into three fields, not surprisingly labeled 
+\begin_inset Quotes eld
 \end_inset
 
+left
+\begin_inset Quotes erd
+\end_inset
 
-\end_layout
-
-\begin_layout Subsection
-How to use it
-\end_layout
+, 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Standard
-Select which bullet depth you want to change then select the bullet shape
- and size.
- Any changes will not be visible in \SpecialChar LyX
-, but are visible when viewing the document.
-\end_layout
+center
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout Standard
-You can reset a bullet shape to the default simply by clicking your right
- mouse button on the appropriate bullet depth button.
-\begin_inset Foot
-status open
+, and 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Plain Layout
-If you 
-\emph on
-really
-\emph default
- want to have multiple sets of paragraphs with different sets of bullets
- in each, then you're going to have to get your hands dirty with \SpecialChar TeX
- code.
- The bullet selection dialog can help though because it provides you with
- the \SpecialChar LaTeX
- code for a wide range of bullet shapes.
- To make your own custom paragraphs you have the following options:
-\end_layout
+right
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout Plain Layout
-\begin_inset ERT
-status open
+.
+ The footer is also divided into these three fields.
+ The \SpecialChar LaTeX
+ commands to set these fields in the simplest manner are 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
 
-
-\backslash
-let
-\backslash
-savelabelitemi=
 \backslash
-labelitemi
+lhead
 \end_layout
 
 \end_inset
 
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset ERT
-status open
+, 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
 
-
-\backslash
-renewcommand
-\backslash
-labelitemi[0]{
-\backslash
-small
-\backslash
-(
-\backslash
-sharp
 \backslash
-)}
+chead
 \end_layout
 
 \end_inset
 
-
-\end_layout
-
-\begin_layout Itemize
-Use the \SpecialChar LaTeX
- command 
+, 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
 
 \backslash
-renewcommand{}{}
+rhead
 \end_layout
 
 \end_inset
 
- to specify a new bullet shape for a given depth.
- You'll also need to save the current bullet shape so you can restore it
- again afterwards.
- In this itemized list the following \SpecialChar LaTeX
- code was used to change the bullet
- used for the first depth.
-\end_layout
+, 
+\begin_inset Flex Code
+status collapsed
 
-\begin_deeper
-\begin_layout LyX-Code
+\begin_layout Plain Layout
 
 \backslash
-let
-\backslash
-savelabelitemi=
-\backslash
-labelitemi 
+lfoot
 \end_layout
 
-\begin_layout LyX-Code
+\end_inset
 
-\backslash
-renewcommand
-\backslash
-labelitemi[0]{
-\backslash
-small
-\backslash
-(
-\backslash
-sharp
-\backslash
-)}
+, etc.
+ Suppose you wish to put your name in the upper left hand corner of each
+ page.
+ Simply insert the following command in the preamble: 
 \end_layout
 
-\end_deeper
-\begin_layout Itemize
-Note that the itemize depth is specified in Roman numerals as part of the
+\begin_layout Standard
+
 \family typewriter
 
 \backslash
-labelitem
-\family default
- command.
+lhead{John Q.
+ DocWriter}
 \end_layout
 
-\begin_layout Itemize
-\begin_inset Argument item:1
-status open
+\begin_layout Standard
+You will now see your name in the upper left.
+ If a field has a default entry that you would like to get rid of (often
+ the page number appears in the central footer) simply include a command
+ with a blank argument, e.
+\begin_inset space \thinspace{}
+\end_inset
 
-\begin_layout Plain Layout
-\begin_inset ERT
-status open
+g.:
+\end_layout
 
-\begin_layout Plain Layout
+\begin_layout Standard
 
+\family typewriter
 
 \backslash
-(
-\backslash
-star
-\backslash
-)
+cfoot{}
 \end_layout
 
+\begin_layout Standard
+Let's get really fancy: lets put the section number with the word 
+\begin_inset Quotes eld
 \end_inset
 
+Section
+\begin_inset Quotes erd
+\end_inset
 
-\end_layout
-
+ (e.
+\begin_inset space \thinspace{}
 \end_inset
 
- Specify each individual entry by starting each item with the bullet shape
- enclosed in a 
-\begin_inset Quotes eld
+g.
+\begin_inset space \space{}
 \end_inset
 
-Custom Item
-\begin_inset Quotes erd
+Section 3) in the upper left, the page number (e.
+\begin_inset space \thinspace{}
 \end_inset
 
- inset (available at 
-\family sans
-Insert\SpecialChar menuseparator
-Custom Item
-\family default
-) and set as 
-\begin_inset Flex Noun
-status collapsed
+g.
+\begin_inset space \space{}
+\end_inset
 
-\begin_layout Plain Layout
-\SpecialChar TeX
- Code
+Page 4) in the upper right, your name in the lower left, and the date in
+ the lower right.
+ The following commands should now appear in the preamble:
 \end_layout
 
-\end_inset
-
-.
- For example, this item was started with 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Standard
 
-\begin_layout Plain Layout
+\family typewriter
 
 \backslash
-(
-\backslash
-star
+lhead{Section 
 \backslash
-)
+thesection}
 \end_layout
 
-\end_inset
+\begin_layout Standard
 
-.
-\end_layout
+\family typewriter
 
-\begin_layout Plain Layout
-\begin_inset ERT
-status open
+\backslash
+chead{}
+\end_layout
 
-\begin_layout Plain Layout
+\begin_layout Standard
 
+\family typewriter
 
 \backslash
-renewcommand
-\backslash
-labelitemi[0]{
+rhead{Page 
 \backslash
-savelabelitemi}
+thepage}
 \end_layout
 
-\end_inset
+\begin_layout Standard
 
+\family typewriter
 
+\backslash
+lfoot{John Q.
+ DocWriter}
 \end_layout
 
-\begin_layout Plain Layout
-You'll also need to revert the labelitem back to its previous setting for
- the global bullet shape settings to remain in effect.
- The way used here was:
-\end_layout
+\begin_layout Standard
 
-\begin_layout LyX-Code
+\family typewriter
 
 \backslash
-renewcommand
-\backslash
-labelitemi[0]{
-\backslash
-savelabelitemi}
+cfoot{}
 \end_layout
 
-\end_inset
-
+\begin_layout Standard
 
-\end_layout
+\family typewriter
 
-\begin_layout Chapter
-\SpecialChar LyX
- and the World Wide Web
+\backslash
+rfoot{
+\backslash
+today}
 \end_layout
 
 \begin_layout Standard
-\SpecialChar LyX
- has long supported the export of documents to various web-friendly formats,
- such as HTML.
- Before version 2.0, however, HTML export was always accomplished by the
- use of external converters.
-\begin_inset Foot
+The commands 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-For details on the use of external converters with \SpecialChar LyX
-, see the 
-\emph on
-Converters
-\emph default
- section of the Customization manual.
+
+\backslash
+thesection
 \end_layout
 
 \end_inset
 
- These fall into two large groups: there are converters that use \SpecialChar LaTeX
- as an
- intermediate format, such as 
+ and 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-htlatex
+
+\backslash
+thepage
 \end_layout
 
 \end_inset
 
-, 
+ access \SpecialChar LaTeX
+'s section and page counters, and so print out the current section
+ and page number.
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-html2latex
+
+\backslash
+today
 \end_layout
 
 \end_inset
 
-, and 
+ simply prints out today's date.
+\end_layout
+
+\begin_layout Standard
+The thicknesses of the horizontal rules drawn beneath the header and above
+ the footer can also be modified.
+ If you don't want one of the rules, set its thickness to 0.
+ The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
+ Use commands
+\family typewriter
+\family default
+like 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-plastex
+
+\backslash
+renewcommand{
+\backslash
+headrulewidth}{0.4pt}
 \end_layout
 
 \end_inset
 
-, relying upon \SpecialChar LyX
- to produce the \SpecialChar LaTeX
-; and there is a converter that works directly
- on \SpecialChar LyX
- files, 
+ and 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-e\SpecialChar LyX
-er
+
+\backslash
+renewcommand{
+\backslash
+footrulewidth}{0.4pt}
 \end_layout
 
 \end_inset
 
-.
- All of these have different advantages and disadvantages.
+ to set the thicknesses.
 \end_layout
 
 \begin_layout Standard
-The \SpecialChar LaTeX
--based converters have the advantage that, in principle, they know everythin
-g about the exported document that \SpecialChar LaTeX
- does.
- Such converters do not care, for example, if a certain block of code was
- produced by \SpecialChar LyX
- or was Evil Red Text.
- These converters know about 
+You can switch the header/footer settings on and off for individual pages
+ using commands like 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-aux
+
+\backslash
+thispagestyle{empty}
 \end_layout
 
 \end_inset
 
- files, counters, and references, and can often make use of the 
+, 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-bbl
+
+\backslash
+thispagestyle{plain}
 \end_layout
 
 \end_inset
 
- files generated by Bib\SpecialChar TeX
-.
- On the other hand, \SpecialChar LaTeX
- is a very hard language to parse—it is sometimes said
- that only \SpecialChar TeX
- itself understands \SpecialChar TeX
-—and \SpecialChar LaTeX
--based converters will often choke on
- what seem to be quite simple constructs; complex ones can throw them completely
-, and as of this writing, for example, the 
-\emph on
-Embedded Objects
-\emph default
- manual will not export with 
+, and 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-htlatex
+
+\backslash
+thispagestyle{fancy}
 \end_layout
 
 \end_inset
 
-, though the others will.
- The other issue concerns how math is handled.
- These converters typically convert the formulae into little pictures that
- are then linked from the HTML document.
- Since these are actually generated by \SpecialChar LaTeX
-, they are accurate.
- But they do not scale well, and just getting them to look as if they are
- actually meant to be in your document—so that the font sizes seem to be
- roughly the same—can be a challenge.
+.
+ Simply insert them in the text on the page you want changed and mark them
+ as \SpecialChar TeX
+ code.
+ In fact, title pages are marked as plain by default, while following pages
+ are marked fancy when using the global fancy setting.
 \end_layout
 
 \begin_layout Standard
-Alex Fernandez's 
+As a final example, it is possible to include an image in the header or
+ footer.
+ Suppose you want to put a company logo in the upper lefthand corner.
+ You might try something like
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+
+\backslash
+lhead{
+\backslash
+resizebox{1in}{!}{
+\backslash
+includegraphics{logo.eps}}}
+\end_layout
+
+\begin_layout Standard
+\noindent
+(you may need to preface this with 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-e\SpecialChar LyX
-er
+
+\backslash
+usepackage{graphics}
 \end_layout
 
 \end_inset
 
- (
-\begin_inset CommandInset href
-LatexCommand href
-name "http://pinchito.es/elyxer/"
-target "http://pinchito.es/elyxer/"
-literal "false"
+ if you don't include graphics elsewhere in your document).
+\end_layout
+
+\begin_layout Section
+Itemize Bullet Selection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:bullet"
 
 \end_inset
 
-) solves some of these problems.
- In particular, the formulae it produces scale perfectly, since it renders
- math using a combination of HTML and CSS rather than converting the formulae
- to images.
- But even moderately complex formula are rendered less well than with 
-\begin_inset Flex Code
-status collapsed
 
-\begin_layout Plain Layout
-htlatex
 \end_layout
 
-\end_inset
+\begin_layout Standard
+by
+\noun on
+ Allan Rae
+\end_layout
 
-; this reflects the limitations of HTML.
-\begin_inset Foot
-status collapsed
+\begin_layout Subsection
+Introduction
+\end_layout
 
-\begin_layout Plain Layout
-That said, 
-\begin_inset Flex Code
+\begin_layout Standard
+\SpecialChar LyX
+ provides 216 bullet shapes that can be accessed from a simple dialog.
+ Using this dialog you can easily specify what bullet shape to use at each
+ level of an itemized list.
+ These settings are document-wide so you won't be able to specify different
+ sets of bullets for different paragraphs.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-e\SpecialChar LyX
-er
+Well, actually you can but you'll have to do it by hand.
 \end_layout
 
 \end_inset
 
- can also use jsMath and MathJax for equations, but this setting is only
- available globally and requires one to have access to a server that runs
- the backend.
-\end_layout
 
-\end_inset
+\end_layout
 
- More importantly (as of version 1.1.1, at least), 
-\begin_inset Flex Code
+\begin_layout Subsection
+How it looks
+\end_layout
+
+\begin_layout Standard
+Open the dialog by selecting the 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-e\SpecialChar LyX
-er
+Document\SpecialChar menuseparator
+Settings
 \end_layout
 
 \end_inset
 
- has limited support for math macros and no support for user-defined paragraph
- or character styles.
- These limitations make 
-\begin_inset Flex Code
+ menu item and then select the 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-e\SpecialChar LyX
-er
+Bullets
 \end_layout
 
 \end_inset
 
- unsuitable for many of the documents \SpecialChar LyX
- users produce.
- In principle, of course, these problems could be solved, but the \SpecialChar LyX
- developers
- have decided to follow a different path and have made \SpecialChar LyX
- itself capable of
- writing XHTML, just as it is capable of writing \SpecialChar LaTeX
-, DocBook, and plaintext.
+ tab.
 \end_layout
 
 \begin_layout Standard
-As of this writing, XHTML output remains under development and should probably
- be regarded as 
-\begin_inset Quotes eld
-\end_inset
+The dialog provides you with a table of bullet shapes.
+ A column of buttons on the left of the table provides access to the six
+ different panels of bullet shapes.
+ The row of buttons across the top is used to select which bullet depth
+ you are changing.
 
-experimental
-\begin_inset Quotes erd
-\end_inset
+\change_deleted 244031559 1603875981
+ A text entry under the table shows the currently selected bullet shape's
+ \SpecialChar LaTeX
+ equivalent and this can be edited if desired.
+ If you do modify the text you will also need to specify any needed packages
+ in the \SpecialChar LaTeX
+ preamble.
+\change_unchanged
 
-.
-\begin_inset Foot
-status collapsed
+\end_layout
 
-\begin_layout Plain Layout
-The file 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Standard
+The six panels are divided up by the packages they require.
+ The following table shows the mappings from button name to \SpecialChar LaTeX
+ package.
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="2">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
 
 \begin_layout Plain Layout
-development/HTML/HTML.notes
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Button
 \end_layout
 
 \end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
-, which can be found in the \SpecialChar LyX
- source tree or 
-\begin_inset CommandInset href
-LatexCommand href
-name "accessed online"
-target "https://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
-literal "false"
+\begin_layout Plain Layout
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Packages Required
+\end_layout
 
 \end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-, usually contains up-to-date information about the state of XHTML output.
- See also the list of XHTML bugs on 
-\begin_inset CommandInset href
-LatexCommand href
-name "the bug tracker"
-target "https://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
-literal "false"
+\begin_layout Plain Layout
+
+\family sans
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Standard
+\end_layout
 
 \end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+base \SpecialChar LaTeX
 
-.
 \end_layout
 
 \end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
- Still, the developers have chosen this approach because it has several
- potential advantages over the other two.
+\begin_layout Plain Layout
+
+\family sans
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Maths
 \end_layout
 
-\begin_layout Standard
-These advantages are primarily due to the fact that the XHTML output routines,
- since they are part of \SpecialChar LyX
-, know everything \SpecialChar LyX
- knows about the document being
- exported.
-\begin_inset Foot
-status collapsed
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
 \begin_layout Plain Layout
-Another advantage is that, since these routines are internal to \SpecialChar LyX
-, they are
- immune to changes in \SpecialChar LyX
-'s file format, or to changes in the semantics of
- existing insets.
+
+\family typewriter
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+amssymb.sty
 \end_layout
 
 \end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
- So they know about the table of contents (as displayed in the outline),
- about the counters associated with different paragraph styles, and about
- user-defined styles.
- The XHTML output routines know what \SpecialChar LyX
- knows about internationalization,
- too, so they will output 
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Plain Layout
 
-Chapter 1
-\begin_inset Quotes erd
-\end_inset
+\family sans
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Ding1
+\end_layout
 
- or 
-\begin_inset Quotes eld
 \end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
+\begin_layout Plain Layout
+
+\family typewriter
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+pifont.sty
+\end_layout
 
-\lang ngerman
-Kapitel
-\lang english
- 1
-\begin_inset Quotes erd
 \end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-, depending upon the language in effect at the time.
-\end_layout
+\begin_layout Plain Layout
 
-\begin_layout Standard
-Quite generally, the output routines know what \SpecialChar LyX
- knows about document layout,
- that is, about how the document is to be rendered on screen.
- We use this information when we output the document as XHTML.
- In particular, \SpecialChar LyX
-\emph on
-automatically
-\emph default
- generates CSS style information corresponding to the layout information
- it uses to render the document on screen: if section headings are supposed
- to be sans-serif and bold as seen in \SpecialChar LyX
-, then (by default) they will be sans-seri
-f and bold when viewed in a web browser, too.
- And this is true not just for pre-defined styles, like Section, but for
- any style, including user-defined styles.
- Indeed, the XHTML output routines make no distinction between user-defined
- paragraph and 
-\change_deleted 244031559 1603876931
-character
-\change_inserted 244031559 1603876940
-text
-\change_unchanged
- styles and \SpecialChar LyX
-'s own pre-defined styles: in each case, everything \SpecialChar LyX
- knows about
- the styles is contained in the layout files.
- And much the same is true as regards pre-defined textual insets, such as
- footnotes, and various custom insets.
-\end_layout
-
-\begin_layout Standard
-The result is that XHTML output can be customized and extended in exactly
- the same way \SpecialChar LaTeX
- output can be customized and extended: through layout files
- and modules.
- See chapter five of the 
-\emph on
-Customization 
-\emph default
-manual for the details.
+\family sans
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Ding2
 \end_layout
 
-\begin_layout Standard
-The remainder of this chapter contains more detailed information on XHTML
- output, its limitations, and ways to work around those limitations.
-\end_layout
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
-\begin_layout Section
-Math Output in XHTML
-\end_layout
+\begin_layout Plain Layout
 
-\begin_layout Standard
-\SpecialChar LyX
- offers four choices for how math is rendered.
- These have various advantages and disadvantages:
+\family typewriter
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+pifont.sty
 \end_layout
 
-\begin_layout Itemize
-MathML
-\begin_inset Newline newline
-\end_inset
-
-MathML is a dialect of XML designed specifically for mathematics on the
- web, and it typically renders very well in browsers that support it.
- The disadvantage is that not all browsers support MathML, and support is
- not complete even in the Gecko-based browsers, such as Firefox.
-\begin_inset Newline newline
 \end_inset
-
-If \SpecialChar LyX
- is unable to render a formula as MathML—for example, if the formula
- uses the 
-\begin_inset Flex Code
-status collapsed
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
 \begin_layout Plain Layout
-xymatrix
-\end_layout
-
-\end_inset
 
- package or ERT—then it will instead output the formula as an image.
+\family sans
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Ding3
 \end_layout
 
-\begin_layout Itemize
-HTML
-\begin_inset Newline newline
 \end_inset
-
-As mentioned above, 
-\begin_inset Flex Code
-status collapsed
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
 \begin_layout Plain Layout
-elyxer
+
+\family typewriter
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+pifont.sty
 \end_layout
 
 \end_inset
-
- outputs math as HTML, styled by CSS.
-\begin_inset Foot
-status collapsed
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
 
 \begin_layout Plain Layout
-\SpecialChar LyX
- has borrowed some of the CSS for its HTML output from 
-\begin_inset Flex Code
-status collapsed
 
-\begin_layout Plain Layout
-elyxer
+\family sans
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+Ding4
 \end_layout
 
 \end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
-.
+\begin_layout Plain Layout
+
+\family typewriter
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+pifont.sty
 \end_layout
 
 \end_inset
+</cell>
+</row>
+</lyxtabular>
 
- For simple formulae, this can work quite well, though with more complicated
- formulae it tends to break down.
- Still, this method has the advantage that it is very widely supported and
- so it may be appropriate for documents that contain only a little, fairly
- simple math.
-\begin_inset Newline newline
 \end_inset
 
-If Lyx is unable to render a formula as HTML—for example, if the formula
- uses the 
-\begin_inset Flex Code
-status collapsed
 
-\begin_layout Plain Layout
-xymatrix
 \end_layout
 
-\end_inset
+\begin_layout Standard
+\SpecialChar LyX
+ doesn't stop you using bullets from packages you don't have.
+ If you get errors from \SpecialChar LaTeX
+ when you try to view or print the file, then it
+ is likely you are missing a package.
+\begin_inset Foot
+status collapsed
 
- package or ERT—then it will instead output the formula as an image.
+\begin_layout Plain Layout
+\SpecialChar LyX
+ doesn't restrict your use since you may be editing locally and exporting
+ elsewhere.
 \end_layout
 
-\begin_layout Itemize
-Images
-\begin_inset Newline newline
 \end_inset
 
-Like 
-\begin_inset Flex Code
-status collapsed
 
-\begin_layout Plain Layout
-htlatex
 \end_layout
 
-\end_inset
+\begin_layout Subsection
+How to use it
+\end_layout
 
-, \SpecialChar LyX
- will output formulae as images, the very same images, in fact, that are
- used for instant preview.
+\begin_layout Standard
+Select which bullet depth you want to change then select the bullet shape
+ and size.
+ Any changes will not be visible in \SpecialChar LyX
+, but are visible when viewing the document.
+\end_layout
+
+\begin_layout Standard
+You can reset a bullet shape to the default simply by clicking your right
+ mouse button on the appropriate bullet depth button.
 \begin_inset Foot
-status collapsed
+status open
 
 \begin_layout Plain Layout
-Instant preview does 
+If you 
 \emph on
-not 
+really
 \emph default
-have to be on for images to be output, however.
+ want to have multiple sets of paragraphs with different sets of bullets
+ in each, then you're going to have to get your hands dirty with \SpecialChar TeX
+ code.
+ The bullet selection dialog can help though because it provides you with
+ the \SpecialChar LaTeX
+ code for a wide range of bullet shapes.
+ To make your own custom paragraphs you have the following options:
 \end_layout
 
-\end_inset
-
- The advantage to this method is that the images are simply generated by
- \SpecialChar LaTeX
-, so they are very accurate.
- The disadvantage, as mentioned earlier, is that these are bitmapped images,
- so they do not scale terribly well, and one cannot copy them, etc.
-\begin_inset Newline newline
-\end_inset
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
 
-The size of the images can be controlled by setting the 
-\begin_inset Quotes eld
-\end_inset
+\begin_layout Plain Layout
 
-Math Images Scaling
-\begin_inset Quotes erd
-\end_inset
 
- parameter under 
-\begin_inset Flex Noun
-status collapsed
+\backslash
+let
+\backslash
+savelabelitemi=
+\backslash
+labelitemi
+\end_layout
+
+\end_inset
+
+
+\end_layout
 
 \begin_layout Plain Layout
-Document\SpecialChar menuseparator
-Settings\SpecialChar menuseparator
-Formats
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+renewcommand
+\backslash
+labelitemi[0]{
+\backslash
+small
+\backslash
+(
+\backslash
+sharp
+\backslash
+)}
 \end_layout
 
 \end_inset
 
-.
-\begin_inset Foot
+
+\end_layout
+
+\begin_layout Itemize
+Use the \SpecialChar LaTeX
+ command 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-For those who want to know, this controls the resolution of the image in
- dots per inch and is based upon a default of 75 dpi.
+
+\backslash
+renewcommand{}{}
 \end_layout
 
 \end_inset
 
+ to specify a new bullet shape for a given depth.
+ You'll also need to save the current bullet shape so you can restore it
+ again afterwards.
+ In this itemized list the following \SpecialChar LaTeX
+ code was used to change the bullet
+ used for the first depth.
+\end_layout
 
-\begin_inset Newline newline
-\end_inset
+\begin_deeper
+\begin_layout LyX-Code
 
-If \SpecialChar LyX
- for some reason fails to create an image for a formula (e.g., if a required
- \SpecialChar LaTeX
- package is not installed), then it will fall back to outputing the raw
- \SpecialChar LaTeX
-.
+\backslash
+let
+\backslash
+savelabelitemi=
+\backslash
+labelitemi 
+\end_layout
+
+\begin_layout LyX-Code
+
+\backslash
+renewcommand
+\backslash
+labelitemi[0]{
+\backslash
+small
+\backslash
+(
+\backslash
+sharp
+\backslash
+)}
 \end_layout
 
+\end_deeper
 \begin_layout Itemize
-\SpecialChar LaTeX
+Note that the itemize depth is specified in Roman numerals as part of the
+\family typewriter
+
+\backslash
+labelitem
+\family default
+ command.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Argument item:1
+status open
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+(
+\backslash
+star
+\backslash
+)
+\end_layout
 
-\begin_inset Newline newline
 \end_inset
 
-Finally, \SpecialChar LyX
- will happily output math as \SpecialChar LaTeX
-.
- As well as being the output of last resort, this method can be used with
- such tools as 
-\begin_inset CommandInset href
-LatexCommand href
-name "jsMath"
-target "http://www.math.union.edu/~dpvc/jsMath/"
-literal "false"
+
+\end_layout
 
 \end_inset
 
-, which uses JavaScript to render \SpecialChar LaTeX
- embedded in HTML documents.
- \SpecialChar LyX
- wraps the \SpecialChar LaTeX
- in either a 
-\begin_inset Flex Code
+ Specify each individual entry by starting each item with the bullet shape
+ enclosed in a 
+\begin_inset Quotes eld
+\end_inset
+
+Custom Item
+\begin_inset Quotes erd
+\end_inset
+
+ inset (available at 
+\family sans
+Insert\SpecialChar menuseparator
+Custom Item
+\family default
+) and set as 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-span
+\SpecialChar TeX
+ Code
 \end_layout
 
 \end_inset
 
- (for inline formulas) or 
+.
+ For example, this item was started with 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-div
+
+\backslash
+(
+\backslash
+star
+\backslash
+)
 \end_layout
 
 \end_inset
 
- (for displayed formulas) with 
-\begin_inset Flex Code
-status collapsed
+.
+\end_layout
 
 \begin_layout Plain Layout
-class='math'
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+renewcommand
+\backslash
+labelitemi[0]{
+\backslash
+savelabelitemi}
 \end_layout
 
 \end_inset
 
-, as is required for jsMath.
-\end_layout
 
-\begin_layout Standard
-One of these output methods must be selected under 
-\begin_inset Flex Noun
-status collapsed
+\end_layout
 
 \begin_layout Plain Layout
-Document\SpecialChar menuseparator
-Settings\SpecialChar menuseparator
-Formats
+You'll also need to revert the labelitem back to its previous setting for
+ the global bullet shape settings to remain in effect.
+ The way used here was:
+\end_layout
+
+\begin_layout LyX-Code
+
+\backslash
+renewcommand
+\backslash
+labelitemi[0]{
+\backslash
+savelabelitemi}
 \end_layout
 
 \end_inset
 
-.
- By default, \SpecialChar LyX
- outputs MathML.
- This is a document-wide setting, therefore.
+
+\end_layout
+
+\begin_layout Chapter
+\SpecialChar LyX
+ and the World Wide Web
 \end_layout
 
 \begin_layout Standard
-Eventually, \SpecialChar LyX
- will offer the user the option to select an alternate output
- method for a particular inset, say, one that isn't being rendered very
- well by MathML.
+\SpecialChar LyX
+ has long supported the export of documents to various web-friendly formats,
+ such as HTML.
+ Before version 2.0, however, HTML export was always accomplished by the
+ use of external converters.
 \begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-That said, since \SpecialChar LyX
- falls back to images if the inset contains ERT, then one
- can force output as an image by putting some harmless ERT into the math,
- for example: 
-\begin_inset Formula $a=b\relax$
+For details on the use of external converters with \SpecialChar LyX
+, see the 
+\emph on
+Converters
+\emph default
+ section of the Customization manual.
+\end_layout
+
 \end_inset
 
-.
+ These fall into two large groups: there are converters that use \SpecialChar LaTeX
+ as an
+ intermediate format, such as 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+htlatex
 \end_layout
 
 \end_inset
 
+, 
+\begin_inset Flex Code
+status collapsed
 
+\begin_layout Plain Layout
+html2latex
 \end_layout
 
-\begin_layout Section
-Bibliography and Citations
-\end_layout
+\end_inset
 
-\begin_layout Standard
-XHTML output fully supports bibliographies and citations.
+, and 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+plastex
 \end_layout
 
-\begin_layout Standard
-Citation labels are generated by the same machinery that generates \SpecialChar LyX
-'s on-screen
- labels, so the labels will look in the output much as they do in \SpecialChar LyX
-, though
- better.
- If you are using numerical citations, then \SpecialChar LyX
- will output numerical labels,
- such as [1] or [17], rather than simply showing the citation key in square
- brackets, as it does on-screen.
- If you are using author-year citations, then \SpecialChar LyX
- will add lowercase letters
- to the years, just as Bib\SpecialChar TeX
- does, if it finds more than one citation for
- a given author-year combination.
- The labels will be printed with the bibliography entries.
- Note that there is, at present, no way to customize the appearance of the
- labels, for example, to choose between square brackets and parentheses.
+\end_inset
+
+, relying upon \SpecialChar LyX
+ to produce the \SpecialChar LaTeX
+; and there is a converter that works directly
+ on \SpecialChar LyX
+ files, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+e\SpecialChar LyX
+er
 \end_layout
 
-\begin_layout Standard
-Bibliography output is handled by the same machinery that handles the presentati
-on of reference information in the citation dialog, so you will see in the
- XHTML output pretty much what you would see if you were to look at a given
- entry in the citation dialog.
- The formatting can be customized in your layout file or, preferably, in
- a module.
- See the 
-\emph on
-Customization
-\emph default
- manual for the details.
+\end_inset
+
+.
+ All of these have different advantages and disadvantages.
 \end_layout
 
 \begin_layout Standard
-The main defect at present is that cross-referenced information is printed
- with every entry with which it is associated.
- So you can see things like this:
+The \SpecialChar LaTeX
+-based converters have the advantage that, in principle, they know everythin
+g about the exported document that \SpecialChar LaTeX
+ does.
+ Such converters do not care, for example, if a certain block of code was
+ produced by \SpecialChar LyX
+ or was Evil Red Text.
+ These converters know about 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+aux
 \end_layout
 
-\begin_layout Quote
-Jason Stanley, 
-\begin_inset Quotes eld
 \end_inset
 
-Context and Logical Form
-\begin_inset Quotes erd
-\end_inset
+ files, counters, and references, and can often make use of the 
+\begin_inset Flex Code
+status collapsed
 
-, in 
-\emph on
-Language in Context: Selected Essays
-\emph default
- (Oxford: Oxford University Press, 2007), pp.
- 30–68.
+\begin_layout Plain Layout
+bbl
 \end_layout
 
-\begin_layout Quote
-Jason Stanley, 
-\begin_inset Quotes eld
-\end_inset
-
-Semantics in Context
-\begin_inset Quotes erd
 \end_inset
 
-, in 
+ files generated by Bib\SpecialChar TeX
+.
+ On the other hand, \SpecialChar LaTeX
+ is a very hard language to parse—it is sometimes said
+ that only \SpecialChar TeX
+ itself understands \SpecialChar TeX
+—and \SpecialChar LaTeX
+-based converters will often choke on
+ what seem to be quite simple constructs; complex ones can throw them completely
+, and as of this writing, for example, the 
 \emph on
-Language in Context: Selected Essays
+Embedded Objects
 \emph default
- (Oxford: Oxford University Press, 2007), pp.
- 201–30.
+ manual will not export with 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+htlatex
 \end_layout
 
-\begin_layout Standard
-This should be fixed before long.
+\end_inset
+
+, though the others will.
+ The other issue concerns how math is handled.
+ These converters typically convert the formulae into little pictures that
+ are then linked from the HTML document.
+ Since these are actually generated by \SpecialChar LaTeX
+, they are accurate.
+ But they do not scale well, and just getting them to look as if they are
+ actually meant to be in your document—so that the font sizes seem to be
+ roughly the same—can be a challenge.
 \end_layout
 
 \begin_layout Standard
-There is no support at present for sectioned bibliographies.
- If you have multiple bibliographies, then \SpecialChar LyX
- will print the same bibliography
- over and over.
-\end_layout
+Alex Fernandez's 
+\begin_inset Flex Code
+status collapsed
 
-\begin_layout Section
-Indexes
+\begin_layout Plain Layout
+e\SpecialChar LyX
+er
 \end_layout
 
-\begin_layout Standard
-\SpecialChar LyX
- will happily export indexes as XHTML, but with certain limitations at the
- moment.
+\end_inset
+
+ (
+\begin_inset CommandInset href
+LatexCommand href
+name "http://pinchito.es/elyxer/"
+target "http://pinchito.es/elyxer/"
+literal "false"
+
+\end_inset
+
+) solves some of these problems.
+ In particular, the formulae it produces scale perfectly, since it renders
+ math using a combination of HTML and CSS rather than converting the formulae
+ to images.
+ But even moderately complex formula are rendered less well than with 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+htlatex
 \end_layout
 
-\begin_layout Standard
-Index export will be most reliable when you do not attempt to use the fancy
- constructs that are described in the section on indexes in the 
-\emph on
-User's Guide
-\emph default
-.
+\end_inset
+
+; this reflects the limitations of HTML.
 \begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-The main issue here is that \SpecialChar LyX
- itself does not really handle these.
- It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
-.
+That said, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+e\SpecialChar LyX
+er
 \end_layout
 
 \end_inset
 
- We'll describe how they are handled using the subsection headings from
- that section.
+ can also use jsMath and MathJax for equations, but this setting is only
+ available globally and requires one to have access to a server that runs
+ the backend.
 \end_layout
 
-\begin_layout Itemize
-Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
- makes an effort to support these,
- but the entries must be separated by 
-\begin_inset Quotes eld
 \end_inset
 
- ! 
-\begin_inset Quotes erd
+ More importantly (as of version 1.1.1, at least), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+e\SpecialChar LyX
+er
+\end_layout
+
 \end_inset
 
-, that is, there must be spaces around the exclamation point.
- This is because it is otherwise too difficult to check for escaped exclamation
- points, ones in math, and so forth.
+ has limited support for math macros and no support for user-defined paragraph
+ or character styles.
+ These limitations make 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+e\SpecialChar LyX
+er
 \end_layout
 
-\begin_layout Itemize
-Page Ranges: There is no support at all for page ranges, since these make
- no sense with XHMTL.
- Instead, you will just get two index entries, one at either end.
+\end_inset
+
+ unsuitable for many of the documents \SpecialChar LyX
+ users produce.
+ In principle, of course, these problems could be solved, but the \SpecialChar LyX
+ developers
+ have decided to follow a different path and have made \SpecialChar LyX
+ itself capable of
+ writing XHTML, just as it is capable of writing \SpecialChar LaTeX
+, DocBook, and plaintext.
 \end_layout
 
-\begin_layout Itemize
-Cross-referencing: There is no support for cross-referencing.
- If \SpecialChar LyX
- finds an entry containing the 
+\begin_layout Standard
+As of this writing, XHTML output remains under development and should probably
+ be regarded as 
 \begin_inset Quotes eld
 \end_inset
 
-|see\SpecialChar ldots
-
+experimental
 \begin_inset Quotes erd
 \end_inset
 
- construct, it is just dropped, and the rest is treated as an ordinary index
- entry.
-\end_layout
+.
+\begin_inset Foot
+status collapsed
 
-\begin_layout Itemize
-Index Entry Order: \SpecialChar LyX
- does support attempts to fix the sorting order.
- It will take what is before the first `@' it finds and use that for sorting,
- taking what follows the first `@' to be the actual entry.
- At present, \SpecialChar LyX
- does not check for escaped `@', so do not try to index email
- addresses.
+\begin_layout Plain Layout
+The file 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+development/HTML/HTML.notes
 \end_layout
 
-\begin_layout Itemize
-Index Entry Layout: You can format entries by using the text style dialog,
- or by using any other method available within \SpecialChar LyX
- itself.
- There is no support for constructs like: 
-\begin_inset Quotes eld
 \end_inset
 
-entry|textbf
-\begin_inset Quotes erd
+, which can be found in the \SpecialChar LyX
+ source tree or 
+\begin_inset CommandInset href
+LatexCommand href
+name "accessed online"
+target "https://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
+literal "false"
+
+\end_inset
+
+, usually contains up-to-date information about the state of XHTML output.
+ See also the list of XHTML bugs on 
+\begin_inset CommandInset href
+LatexCommand href
+name "the bug tracker"
+target "https://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
+literal "false"
+
 \end_inset
 
 .
- Indeed, if \SpecialChar LyX
- finds a pipe symbol, `|', in an entry, it will delete it and
- everything that follows it.
 \end_layout
 
-\begin_layout Itemize
-Multiple Indexes: There is no support for multiple indexes.
- Rather, all index entries will be printed as one large index.
- To avoid our printing several versions of the index, we print only the
- main index, so make sure you have one.
-\end_layout
+\end_inset
 
-\begin_layout Section
-Nomenclature and Glossary
+ Still, the developers have chosen this approach because it has several
+ potential advantages over the other two.
 \end_layout
 
 \begin_layout Standard
-There is at present no support for glossaries.
- Adding it would be fairly trivial, and welcome.
+These advantages are primarily due to the fact that the XHTML output routines,
+ since they are part of \SpecialChar LyX
+, know everything \SpecialChar LyX
+ knows about the document being
+ exported.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+Another advantage is that, since these routines are internal to \SpecialChar LyX
+, they are
+ immune to changes in \SpecialChar LyX
+'s file format, or to changes in the semantics of
+ existing insets.
 \end_layout
 
-\begin_layout Chapter
+\end_inset
 
-\change_inserted 1075283030 1616534180
-DocBook Output
-\end_layout
+ So they know about the table of contents (as displayed in the outline),
+ about the counters associated with different paragraph styles, and about
+ user-defined styles.
+ The XHTML output routines know what \SpecialChar LyX
+ knows about internationalization,
+ too, so they will output 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Standard
+Chapter 1
+\begin_inset Quotes erd
+\end_inset
 
-\change_inserted 1075283030 1616534386
-Apart from HTML, \SpecialChar LyX
- can generate documents in the DocBook XML vocabulary.
- With versions 2.3 and before, only select templates could be used to generate
- DocBook documents (only version 4).
- Starting with \SpecialChar LyX
- 2.4, most \SpecialChar LyX
- layouts can generate valid DocBook documents (only
- version 5).
- This feature is built into \SpecialChar LyX
- and does not require the use of external tools.
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+
+\lang ngerman
+Kapitel
+\lang english
+ 1
+\begin_inset Quotes erd
+\end_inset
+
+, depending upon the language in effect at the time.
 \end_layout
 
 \begin_layout Standard
+Quite generally, the output routines know what \SpecialChar LyX
+ knows about document layout,
+ that is, about how the document is to be rendered on screen.
+ We use this information when we output the document as XHTML.
+ In particular, \SpecialChar LyX
+\emph on
+automatically
+\emph default
+ generates CSS style information corresponding to the layout information
+ it uses to render the document on screen: if section headings are supposed
+ to be sans-serif and bold as seen in \SpecialChar LyX
+, then (by default) they will be sans-seri
+f and bold when viewed in a web browser, too.
+ And this is true not just for pre-defined styles, like Section, but for
+ any style, including user-defined styles.
+ Indeed, the XHTML output routines make no distinction between user-defined
+ paragraph and 
+\change_deleted 244031559 1603876931
+character
+\change_inserted 244031559 1603876940
+text
+\change_unchanged
+ styles and \SpecialChar LyX
+'s own pre-defined styles: in each case, everything \SpecialChar LyX
+ knows about
+ the styles is contained in the layout files.
+ And much the same is true as regards pre-defined textual insets, such as
+ footnotes, and various custom insets.
+\end_layout
 
-\change_inserted 1075283030 1616534437
-The result is that the DocBook output can be customized and extended in
exactly the same way \SpecialChar LaTeX
- output can be customized and extended: through layout
files and modules.
+\begin_layout Standard
+The result is that XHTML output can be customized and extended in exactly
+ the same way \SpecialChar LaTeX
+ output can be customized and extended: through layout files
+ and modules.
  See chapter five of the 
 \emph on
 Customization 
@@ -6024,2041 +6171,2343 @@ manual for the details.
 \end_layout
 
 \begin_layout Standard
-
-\change_inserted 1075283030 1616534475
-Most \SpecialChar LyX
- features are supported with DocBook, like math output.
+The remainder of this chapter contains more detailed information on XHTML
+ output, its limitations, and ways to work around those limitations.
 \end_layout
 
-\begin_layout Itemize
-
-\change_inserted 1075283030 1616534741
-Math output is performed mostly in MathML (the major exception being constructio
-ns not supported by \SpecialChar LyX
-, i.e.
- ERTs).
- All formulae are also available in raw \SpecialChar TeX
- in the DocBook output for further
- processing.
+\begin_layout Section
+Math Output in XHTML
 \end_layout
 
-\begin_layout Itemize
-
-\change_inserted 1075283030 1616534852
-Bibliographies and citations are implemented, including with an external
- BibTeX file.
- Bibliography entries are not prerendered when the detailed information
- are available, but rather output with the standard DocBook constructs.
- The external DocBook processor is expected to handle the rendering of entries.
+\begin_layout Standard
+\SpecialChar LyX
+ offers four choices for how math is rendered.
+ These have various advantages and disadvantages:
 \end_layout
 
 \begin_layout Itemize
+MathML
+\begin_inset Newline newline
+\end_inset
 
-\change_inserted 1075283030 1616534863
-Indexes are supported, including multiple indices.
- Grouping (with 
-\family typewriter
-!
-\family default
-), page ranges, and cross-references (
-\family typewriter
-|see
-\family default
-) are supported, with the exception of the same symbols escaped.
- Entry order (
-\family typewriter
-@
-\family default
-) and layout (
-\family typewriter
-|mathbf
-\family default
-) are not supported.
- There is no support for escaping of index entries.
-\end_layout
+MathML is a dialect of XML designed specifically for mathematics on the
+ web, and it typically renders very well in browsers that support it.
+ The disadvantage is that not all browsers support MathML, and support is
+ not complete even in the Gecko-based browsers, such as Firefox.
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout Itemize
+If \SpecialChar LyX
+ is unable to render a formula as MathML—for example, if the formula
+ uses the 
+\begin_inset Flex Code
+status collapsed
 
-\change_inserted 1075283030 1616534884
-Glossaries are implemented.
+\begin_layout Plain Layout
+xymatrix
 \end_layout
 
-\begin_layout Standard
+\end_inset
 
-\change_inserted 1075283030 1616534894
-Two major parameters can be set at the document level.
+ package or ERT—then it will instead output the formula as an image.
 \end_layout
 
 \begin_layout Itemize
+HTML
+\begin_inset Newline newline
+\end_inset
 
-\change_inserted 1075283030 1616534948
-Format for tables: \SpecialChar LyX
- can generate tables either as HTML (default value) or
- CALS, depending on the user's requirements.
- Most DocBook processors accept both formats.
-\end_layout
-
-\begin_layout Itemize
+As mentioned above, 
+\begin_inset Flex Code
+status collapsed
 
-\change_inserted 1075283030 1616535006
-MathML prefix: in DocBook, MathML is included within its own name space,
- unlike HTML.
- The implication is that there must be an indication of the tags belonging
- to the MathML standard.
- Three choices are offered: 
+\begin_layout Plain Layout
+elyxer
 \end_layout
 
-\begin_deeper
-\begin_layout Itemize
+\end_inset
 
-\change_inserted 1075283030 1616535044
-Inline: the MathML name space is defined for each formula (using the 
-\family typewriter
-xmlns
-\family default
- attribute on each formula)
-\end_layout
+ outputs math as HTML, styled by CSS.
+\begin_inset Foot
+status collapsed
 
-\begin_layout Itemize
+\begin_layout Plain Layout
+\SpecialChar LyX
+ has borrowed some of the CSS for its HTML output from 
+\begin_inset Flex Code
+status collapsed
 
-\change_inserted 1075283030 1616535090
-With the 
-\family typewriter
-m
-\family default
- prefix (default): the MathML name space is defined at the document level
- (using the 
-\family typewriter
-xmlns:m
-\family default
- attribute on the root element).
- Each MathML is prefixed with 
-\family typewriter
-m
-\family default
-: for instance, 
-\family typewriter
-m:math
+\begin_layout Plain Layout
+elyxer
 \end_layout
 
-\begin_layout Itemize
+\end_inset
 
-\change_inserted 1075283030 1616620405
-With the 
-\family typewriter
-mml
-\family default
- prefix: similar to the 
-\family typewriter
-m
-\family default
- option, but with 
-\family typewriter
-mml
+.
 \end_layout
 
-\begin_layout Standard
-
-\change_inserted 1075283030 1616620470
-This option is especially useful if you want \SpecialChar LyX
- to match your personal style
- or to work with buggy software that only accepts one prefix for MathML.
-\change_unchanged
+\end_inset
 
-\end_layout
+ For simple formulae, this can work quite well, though with more complicated
+ formulae it tends to break down.
+ Still, this method has the advantage that it is very widely supported and
+ so it may be appropriate for documents that contain only a little, fairly
+ simple math.
+\begin_inset Newline newline
+\end_inset
 
-\end_deeper
-\begin_layout Chapter
-The \SpecialChar LyX
- Server
-\end_layout
+If Lyx is unable to render a formula as HTML—for example, if the formula
+ uses the 
+\begin_inset Flex Code
+status collapsed
 
-\begin_layout Section
-Introduction
+\begin_layout Plain Layout
+xymatrix
 \end_layout
 
-\begin_layout Standard
-The `\SpecialChar LyX
- server' allows other programs to talk to \SpecialChar LyX
-, invoke \SpecialChar LyX
- commands, and retrieve
- information about the \SpecialChar LyX
- internal state.
- This is only intended for advanced users, but they should find it useful.
- It is by writing to the \SpecialChar LyX
- server, for example, that bibliography managers,
- such as JabRef, are able to 
-\begin_inset Quotes eld
-\end_inset
-
-push
-\begin_inset Quotes erd
 \end_inset
 
- citations to \SpecialChar LyX
-.
+ package or ERT—then it will instead output the formula as an image.
 \end_layout
 
-\begin_layout Section
-Starting the \SpecialChar LyX
- Server
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Starting-the-Server"
-
+\begin_layout Itemize
+Images
+\begin_inset Newline newline
 \end_inset
 
-
-\end_layout
-
-\begin_layout Standard
-The \SpecialChar LyX
- server works through the use of a pair of named pipes.
- These are usually located in 
+Like 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-UserDir
+htlatex
 \end_layout
 
 \end_inset
 
-, (except on Windows, where 
-\emph on
-local
-\emph default
- named pipes are special objects located in 
-\begin_inset Flex Code
+, \SpecialChar LyX
+ will output formulae as images, the very same images, in fact, that are
+ used for instant preview.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-
-\backslash
-
-\backslash
-.
-\backslash
-pipe
+Instant preview does 
+\emph on
+not 
+\emph default
+have to be on for images to be output, however.
 \end_layout
 
 \end_inset
 
-) and have the names 
+ The advantage to this method is that the images are simply generated by
+ \SpecialChar LaTeX
+, so they are very accurate.
+ The disadvantage, as mentioned earlier, is that these are bitmapped images,
+ so they do not scale terribly well, and one cannot copy them, etc.
+\begin_inset Newline newline
+\end_inset
+
+The size of the images can be controlled by setting the 
 \begin_inset Quotes eld
 \end_inset
 
+Math Images Scaling
+\begin_inset Quotes erd
+\end_inset
 
-\begin_inset Flex Code
+ parameter under 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-lyxpipe.in
+Document\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
+Formats
 \end_layout
 
 \end_inset
 
+.
+\begin_inset Foot
+status collapsed
 
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
+For those who want to know, this controls the resolution of the image in
+ dots per inch and is based upon a default of 75 dpi.
+\end_layout
 
- and 
-\begin_inset Quotes eld
 \end_inset
 
 
-\begin_inset Flex Code
-status collapsed
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout Plain Layout
-lyxpipe.out
+If \SpecialChar LyX
+ for some reason fails to create an image for a formula (e.g., if a required
+ \SpecialChar LaTeX
+ package is not installed), then it will fall back to outputing the raw
+ \SpecialChar LaTeX
+.
 \end_layout
 
+\begin_layout Itemize
+\SpecialChar LaTeX
+
+\begin_inset Newline newline
 \end_inset
 
+Finally, \SpecialChar LyX
+ will happily output math as \SpecialChar LaTeX
+.
+ As well as being the output of last resort, this method can be used with
+ such tools as 
+\begin_inset CommandInset href
+LatexCommand href
+name "jsMath"
+target "http://www.math.union.edu/~dpvc/jsMath/"
+literal "false"
 
-\begin_inset Quotes erd
 \end_inset
 
-.
- External programs write into 
+, which uses JavaScript to render \SpecialChar LaTeX
+ embedded in HTML documents.
+ \SpecialChar LyX
+ wraps the \SpecialChar LaTeX
+ in either a 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxpipe.in
+span
 \end_layout
 
 \end_inset
 
- and read back data from 
+ (for inline formulas) or 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxpipe.out
+div
 \end_layout
 
 \end_inset
 
-.
- The stem of the pipe names can be defined in the 
-\begin_inset Flex Noun
+ (for displayed formulas) with 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Tools\SpecialChar menuseparator
-Preferences
+class='math'
 \end_layout
 
 \end_inset
 
- dialog, for example 
-\begin_inset Flex Code
+, as is required for jsMath.
+\end_layout
+
+\begin_layout Standard
+One of these output methods must be selected under 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-"/home/myhome/lyxpipe"
+Document\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
+Formats
 \end_layout
 
 \end_inset
 
-, or 
-\begin_inset Flex Code
+.
+ By default, \SpecialChar LyX
+ outputs MathML.
+ This is a document-wide setting, therefore.
+\end_layout
+
+\begin_layout Standard
+Eventually, \SpecialChar LyX
+ will offer the user the option to select an alternate output
+ method for a particular inset, say, one that isn't being rendered very
+ well by MathML.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-"
-\backslash
+That said, since \SpecialChar LyX
+ falls back to images if the inset contains ERT, then one
+ can force output as an image by putting some harmless ERT into the math,
+ for example: 
+\begin_inset Formula $a=b\relax$
+\end_inset
 
-\backslash
 .
-\backslash
-pipe
-\backslash
-lyxpipe"
 \end_layout
 
 \end_inset
 
- on Windows (where any working path instead of lyxpipe can be used, for
- example 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-"
-\backslash
 
-\backslash
-.
-\backslash
-pipe
-\backslash
-my
-\backslash
-lyx
-\backslash
-pipe"
 \end_layout
 
-\end_inset
-
- would also work).
- You 
-\emph on
-must
-\emph default
- configure this manually in order for the server to start.
+\begin_layout Section
+Bibliography and Citations
 \end_layout
 
 \begin_layout Standard
-\SpecialChar LyX
- will add the '
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-.in
+XHTML output fully supports bibliographies and citations.
 \end_layout
 
-\end_inset
-
-' and '
-\begin_inset Flex Code
-status collapsed
+\begin_layout Standard
+Citation labels are generated by the same machinery that generates \SpecialChar LyX
+'s on-screen
+ labels, so the labels will look in the output much as they do in \SpecialChar LyX
+, though
+ better.
+ If you are using numerical citations, then \SpecialChar LyX
+ will output numerical labels,
+ such as [1] or [17], rather than simply showing the citation key in square
+ brackets, as it does on-screen.
+ If you are using author-year citations, then \SpecialChar LyX
+ will add lowercase letters
+ to the years, just as Bib\SpecialChar TeX
+ does, if it finds more than one citation for
+ a given author-year combination.
+ The labels will be printed with the bibliography entries.
+ Note that there is, at present, no way to customize the appearance of the
+ labels, for example, to choose between square brackets and parentheses.
+\end_layout
 
-\begin_layout Plain Layout
-.out
+\begin_layout Standard
+Bibliography output is handled by the same machinery that handles the presentati
+on of reference information in the citation dialog, so you will see in the
+ XHTML output pretty much what you would see if you were to look at a given
+ entry in the citation dialog.
+ The formatting can be customized in your layout file or, preferably, in
+ a module.
+ See the 
+\emph on
+Customization
+\emph default
+ manual for the details.
 \end_layout
 
-\end_inset
+\begin_layout Standard
+The main defect at present is that cross-referenced information is printed
+ with every entry with which it is associated.
+ So you can see things like this:
+\end_layout
 
-' to create the pipes.
- If one of the pipes already exists, \SpecialChar LyX
- will assume that another \SpecialChar LyX
- process
- is already running and will not start the server.
- On POSIX (Unix like) systems, if for some other reason, an unused 
+\begin_layout Quote
+Jason Stanley, 
 \begin_inset Quotes eld
 \end_inset
 
-stale
+Context and Logical Form
 \begin_inset Quotes erd
 \end_inset
 
- pipe is left in existence when \SpecialChar LyX
- closes, then \SpecialChar LyX
- will try to delete it.
- If this fails for some reason, you will need to delete the pipes manually
- and then restart \SpecialChar LyX
-.
- On Windows, pipes are deleted by the OS on program termination or crash,
- so 
+, in 
+\emph on
+Language in Context: Selected Essays
+\emph default
+ (Oxford: Oxford University Press, 2007), pp.
+ 30–68.
+\end_layout
+
+\begin_layout Quote
+Jason Stanley, 
 \begin_inset Quotes eld
 \end_inset
 
-stale
+Semantics in Context
 \begin_inset Quotes erd
 \end_inset
 
- pipes should not be possible.
+, in 
+\emph on
+Language in Context: Selected Essays
+\emph default
+ (Oxford: Oxford University Press, 2007), pp.
+ 201–30.
 \end_layout
 
 \begin_layout Standard
-To have several \SpecialChar LyX
- processes with servers at the same time, you have to use
- different configurations, perhaps by using separate user directories, each
- with its own 
-\begin_inset Flex Code
-status collapsed
+This should be fixed before long.
+\end_layout
 
-\begin_layout Plain Layout
-preferences
+\begin_layout Standard
+There is no support at present for sectioned bibliographies.
+ If you have multiple bibliographies, then \SpecialChar LyX
+ will print the same bibliography
+ over and over.
 \end_layout
 
-\end_inset
+\begin_layout Section
+Indexes
+\end_layout
 
- file, for each process.
+\begin_layout Standard
+\SpecialChar LyX
+ will happily export indexes as XHTML, but with certain limitations at the
+ moment.
 \end_layout
 
 \begin_layout Standard
-If you are developing a client program, you might find it useful to enable
- debugging information from the \SpecialChar LyX
- server.
- Do this by starting \SpecialChar LyX
- as 
-\begin_inset Flex Code
+Index export will be most reliable when you do not attempt to use the fancy
+ constructs that are described in the section on indexes in the 
+\emph on
+User's Guide
+\emph default
+.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-lyx -dbg lyxserver
+The main issue here is that \SpecialChar LyX
+ itself does not really handle these.
+ It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
+.
 \end_layout
 
 \end_inset
 
-.
+ We'll describe how they are handled using the subsection headings from
+ that section.
 \end_layout
 
-\begin_layout Standard
-You can find a complete example client written in C++ in the source distribution
- as 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Itemize
+Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
+ makes an effort to support these,
+ but the entries must be separated by 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Plain Layout
-development/lyxserver/server_monitor.cpp
+ ! 
+\begin_inset Quotes erd
+\end_inset
+
+, that is, there must be spaces around the exclamation point.
+ This is because it is otherwise too difficult to check for escaped exclamation
+ points, ones in math, and so forth.
+\end_layout
+
+\begin_layout Itemize
+Page Ranges: There is no support at all for page ranges, since these make
+ no sense with XHMTL.
+ Instead, you will just get two index entries, one at either end.
 \end_layout
 
+\begin_layout Itemize
+Cross-referencing: There is no support for cross-referencing.
+ If \SpecialChar LyX
+ finds an entry containing the 
+\begin_inset Quotes eld
 \end_inset
 
-.
-\end_layout
+|see\SpecialChar ldots
 
-\begin_layout Standard
-Another useful tool is the command-line based client found in 
-\begin_inset Flex Code
-status collapsed
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout Plain Layout
-src/client/lyxclient
+ construct, it is just dropped, and the rest is treated as an ordinary index
+ entry.
+\end_layout
+
+\begin_layout Itemize
+Index Entry Order: \SpecialChar LyX
+ does support attempts to fix the sorting order.
+ It will take what is before the first `@' it finds and use that for sorting,
+ taking what follows the first `@' to be the actual entry.
+ At present, \SpecialChar LyX
+ does not check for escaped `@', so do not try to index email
+ addresses.
 \end_layout
 
+\begin_layout Itemize
+Index Entry Layout: You can format entries by using the text style dialog,
+ or by using any other method available within \SpecialChar LyX
+ itself.
+ There is no support for constructs like: 
+\begin_inset Quotes eld
+\end_inset
+
+entry|textbf
+\begin_inset Quotes erd
 \end_inset
 
 .
+ Indeed, if \SpecialChar LyX
+ finds a pipe symbol, `|', in an entry, it will delete it and
+ everything that follows it.
+\end_layout
+
+\begin_layout Itemize
+Multiple Indexes: There is no support for multiple indexes.
+ Rather, all index entries will be printed as one large index.
+ To avoid our printing several versions of the index, we print only the
+ main index, so make sure you have one.
 \end_layout
 
 \begin_layout Section
-Normal communication
+Nomenclature and Glossary
 \end_layout
 
 \begin_layout Standard
-To issue a \SpecialChar LyX
- call, the client writes a line of ASCII text into the input
- pipe.
- This line has the following format:
+There is at present no support for glossaries.
+ Adding it would be fairly trivial, and welcome.
 \end_layout
 
-\begin_layout Quote
-LYXCMD:
-\emph on
-clientname
-\emph default
-:
-\emph on
-function
-\emph default
-:
-\emph on
-argument
-\end_layout
-
-\begin_layout Description
-clientname is a name that the client can choose arbitrarily.
- Its only use is that \SpecialChar LyX
- will echo it if it sends an answer—so a client can
- dispatch results from different requesters.
-\end_layout
+\begin_layout Chapter
 
-\begin_layout Description
-function is the function you want \SpecialChar LyX
- to perform.
- It is the same as the commands you'd use in the minibuffer.
+\change_inserted 1075283030 1616534180
+DocBook Output
 \end_layout
 
-\begin_layout Description
-argument is an optional argument which is meaningful only to some functions
- (for instance, the 
-\begin_inset Quotes eld
-\end_inset
-
-self-insert
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Standard
 
- LFUN will insert the argument as text at the cursor position).
+\change_inserted 1075283030 1616534386
+Apart from HTML, \SpecialChar LyX
+ can generate documents in the DocBook XML vocabulary.
+ With versions 2.3 and before, only select templates could be used to generate
+ DocBook documents (only version 4).
+ Starting with \SpecialChar LyX
+ 2.4, most \SpecialChar LyX
+ layouts can generate valid DocBook documents (only
+ version 5).
+ This feature is built into \SpecialChar LyX
+ and does not require the use of external tools.
 \end_layout
 
 \begin_layout Standard
-The answer from \SpecialChar LyX
- will arrive in the output pipe and be of the form
-\end_layout
 
-\begin_layout Quote
-INFO:
-\emph on
-clientname
-\emph default
-:
+\change_inserted 1075283030 1616534437
+The result is that the DocBook output can be customized and extended in
+ exactly the same way \SpecialChar LaTeX
+ output can be customized and extended: through layout
+ files and modules.
+ See chapter five of the 
 \emph on
-function
+Customization 
 \emph default
-:
-\emph on
-data
+manual for the details.
 \end_layout
 
 \begin_layout Standard
-where 
-\emph on
-clientname
-\emph default
- and 
-\emph on
-function
-\emph default
- are just echoed from the command request, while 
-\emph on
-data
-\emph default
- is more or less useful information filled according to how the command
- execution worked out.
- Some commands, such as 
-\begin_inset Quotes eld
-\end_inset
-
-font-state
-\begin_inset Quotes erd
-\end_inset
 
-, will return information about the internal state of \SpecialChar LyX
-, while other will
- return an empty data-response.
- This means that the command execution went fine.
+\change_inserted 1075283030 1616534475
+Most \SpecialChar LyX
+ features are supported with DocBook, like math output.
 \end_layout
 
-\begin_layout Standard
-In case of errors, the response from \SpecialChar LyX
- will have this form
-\end_layout
+\begin_layout Itemize
 
-\begin_layout Quote
-ERROR:
-\emph on
-clientname
-\emph default
-:
-\emph on
-function
-\emph default
-:
-\emph on
-error message
+\change_inserted 1075283030 1616534741
+Math output is performed mostly in MathML (the major exception being constructio
+ns not supported by \SpecialChar LyX
+, i.e.
+ ERTs).
+ All formulae are also available in raw \SpecialChar TeX
+ in the DocBook output for further
+ processing.
 \end_layout
 
-\begin_layout Standard
-where the 
-\emph on
-error message
-\emph default
- should contain an explanation of why the command failed.
-\end_layout
+\begin_layout Itemize
 
-\begin_layout Standard
-Examples:
+\change_inserted 1075283030 1616534852
+Bibliographies and citations are implemented, including with an external
+ BibTeX file.
+ Bibliography entries are not prerendered when the detailed information
+ are available, but rather output with the standard DocBook constructs.
+ The external DocBook processor is expected to handle the rendering of entries.
 \end_layout
 
-\begin_layout LyX-Code
-echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
-\begin_inset Newline newline
-\end_inset
-
-echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
-\begin_inset Newline newline
-\end_inset
-
-read a <~/.lyxpipe.out
-\begin_inset Newline newline
-\end_inset
+\begin_layout Itemize
 
-echo $a
+\change_inserted 1075283030 1616534863
+Indexes are supported, including multiple indices.
+ Grouping (with 
+\family typewriter
+!
+\family default
+), page ranges, and cross-references (
+\family typewriter
+|see
+\family default
+) are supported, with the exception of the same symbols escaped.
+ Entry order (
+\family typewriter
+@
+\family default
+) and layout (
+\family typewriter
+|mathbf
+\family default
+) are not supported.
+ There is no support for escaping of index entries.
 \end_layout
 
-\begin_layout Subsection
-AppleScript (Mac OS X)
-\end_layout
+\begin_layout Itemize
 
-\begin_layout Standard
-Since \SpecialChar LyX
- 2.1, \SpecialChar LyX
- supports basic interactions with AppleScript for normal communicatio
-n through the command run.
- This command takes a direct argument (the 
-\series bold
-function
-\series default
- to perform) and an optional argument.
- It either returns the output of the function or triggers an error with
- the error message and code.
+\change_inserted 1075283030 1616534884
+Glossaries are implemented.
 \end_layout
 
 \begin_layout Standard
-Example:
-\end_layout
 
-\begin_layout LyX-Code
-tell application "\SpecialChar LyX
-"
+\change_inserted 1075283030 1616534894
+Two major parameters can be set at the document level.
 \end_layout
 
-\begin_layout LyX-Code
-  try
-\end_layout
+\begin_layout Itemize
 
-\begin_layout LyX-Code
-    -- Stores the current file name into f
+\change_inserted 1075283030 1616534948
+Format for tables: \SpecialChar LyX
+ can generate tables either as HTML (default value) or
+ CALS, depending on the user's requirements.
+ Most DocBook processors accept both formats.
 \end_layout
 
-\begin_layout LyX-Code
-    set f to (run "server-get-filename" with argument "")
-\end_layout
+\begin_layout Itemize
 
-\begin_layout LyX-Code
-    on error the error_message number the error_number
+\change_inserted 1075283030 1616535006
+MathML prefix: in DocBook, MathML is included within its own name space,
+ unlike HTML.
+ The implication is that there must be an indication of the tags belonging
+ to the MathML standard.
+ Three choices are offered: 
 \end_layout
 
-\begin_layout LyX-Code
-      display dialog "Error: " & the error_number & ".
- " ¬
-\end_layout
+\begin_deeper
+\begin_layout Itemize
 
-\begin_layout LyX-Code
-              & the error_message buttons {"OK"} default button 1
+\change_inserted 1075283030 1616535044
+Inline: the MathML name space is defined for each formula (using the 
+\family typewriter
+xmlns
+\family default
+ attribute on each formula)
 \end_layout
 
-\begin_layout LyX-Code
-  end try
-\end_layout
+\begin_layout Itemize
 
-\begin_layout LyX-Code
-end tell
+\change_inserted 1075283030 1616535090
+With the 
+\family typewriter
+m
+\family default
+ prefix (default): the MathML name space is defined at the document level
+ (using the 
+\family typewriter
+xmlns:m
+\family default
+ attribute on the root element).
+ Each MathML is prefixed with 
+\family typewriter
+m
+\family default
+: for instance, 
+\family typewriter
+m:math
 \end_layout
 
-\begin_layout Section
-Notification
-\end_layout
+\begin_layout Itemize
 
-\begin_layout Standard
-\SpecialChar LyX
- can notify clients of events going on asynchronously.
- Currently it will only do this if the user binds a key sequence with the
- function 
-\begin_inset Quotes eld
-\end_inset
-
-notify
-\begin_inset Quotes erd
-\end_inset
-
-.
- The format of the string \SpecialChar LyX
- sends is as follows:
+\change_inserted 1075283030 1616620405
+With the 
+\family typewriter
+mml
+\family default
+ prefix: similar to the 
+\family typewriter
+m
+\family default
+ option, but with 
+\family typewriter
+mml
 \end_layout
 
-\begin_layout Quote
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-NOTIFY:
-\end_layout
+\begin_layout Standard
 
-\end_inset
+\change_inserted 1075283030 1616620470
+This option is especially useful if you want \SpecialChar LyX
+ to match your personal style
+ or to work with buggy software that only accepts one prefix for MathML.
+\change_unchanged
 
+\end_layout
 
-\emph on
-key-sequence
+\end_deeper
+\begin_layout Chapter
+The \SpecialChar LyX
+ Server
 \end_layout
 
-\begin_layout Standard
-where 
-\emph on
-key-sequence
-\emph default
- is the printed representation of the key sequence that was actually typed
- by the user.
+\begin_layout Section
+Introduction
 \end_layout
 
 \begin_layout Standard
-This mechanism can be used to extend \SpecialChar LyX
-'s command set and implement macros.
- Bind some key sequence to 
+The `\SpecialChar LyX
+ server' allows other programs to talk to \SpecialChar LyX
+, invoke \SpecialChar LyX
+ commands, and retrieve
+ information about the \SpecialChar LyX
+ internal state.
+ This is only intended for advanced users, but they should find it useful.
+ It is by writing to the \SpecialChar LyX
+ server, for example, that bibliography managers,
+ such as JabRef, are able to 
 \begin_inset Quotes eld
 \end_inset
 
-notify
+push
 \begin_inset Quotes erd
 \end_inset
 
-.
- Then start a client that listens on the output pipe, dispatches the command
- according to the sequence, and starts a function that may use \SpecialChar LyX
- calls and
- \SpecialChar LyX
- requests to issue a command or a series of commands to \SpecialChar LyX
+ citations to \SpecialChar LyX
 .
 \end_layout
 
 \begin_layout Section
-The simple \SpecialChar LyX
- Server Protocol
+Starting the \SpecialChar LyX
+ Server
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Starting-the-Server"
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Standard
-\SpecialChar LyX
- implements a simple protocol that can be used for session management.
- All messages are of the form
-\end_layout
+The \SpecialChar LyX
+ server works through the use of a pair of named pipes.
+ These are usually located in 
+\begin_inset Flex Code
+status collapsed
 
-\begin_layout Quote
-LYXSRV:
-\emph on
-clientname
-\emph default
-:
-\emph on
-protocol message
+\begin_layout Plain Layout
+UserDir
 \end_layout
 
-\begin_layout Standard
-where 
+\end_inset
+
+, (except on Windows, where 
 \emph on
-protocol message
+local
 \emph default
- can be 
-\begin_inset Quotes eld
-\end_inset
+ named pipes are special objects located in 
+\begin_inset Flex Code
+status collapsed
 
-hello
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
 
- or 
-\begin_inset Quotes eld
-\end_inset
+\backslash
+
+\backslash
+.
+\backslash
+pipe
+\end_layout
 
-bye
-\begin_inset Quotes erd
 \end_inset
 
-.
- If 
+) and have the names 
 \begin_inset Quotes eld
 \end_inset
 
-hello
-\begin_inset Quotes erd
-\end_inset
 
- is received from a client, \SpecialChar LyX
- will report back to inform the client that
- it's listening to it's messages, while 
-\begin_inset Quotes eld
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxpipe.in
+\end_layout
+
 \end_inset
 
-bye
+
 \begin_inset Quotes erd
 \end_inset
 
- sent from \SpecialChar LyX
- will inform clients that \SpecialChar LyX
- is closing.
-\end_layout
+ and 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Section
-Reverse DVI/PDF search
-\end_layout
 
-\begin_layout Standard
-Some DVI/PDF viewers
-\begin_inset Foot
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
- Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
+lyxpipe.out
 \end_layout
 
 \end_inset
 
- provide 
-\emph on
-reverse search
-\emph default
- facility (also called 
-\emph on
-inverse search
-\emph default
-).
- This means that you can tell \SpecialChar LyX
- to put the cursor to a specific line in the
- document by clicking at the respective position in the DVI/PDF output.
- To achieve this, the viewer must be able to communicate with \SpecialChar LyX
+
+\begin_inset Quotes erd
+\end_inset
+
 .
- This is done via the \SpecialChar LyX
- server either by using the named pipe (
-\emph on
-lyxpipe
-\emph default
-), or the UNIX domain socket (
-\emph on
-lyxsocket
-\emph default
-) that \SpecialChar LyX
- creates in its temporary directory (this is the way the 
+ External programs write into 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxclient
-\end_layout
-
-\end_inset
-
- program communicates with \SpecialChar LyX
-).
- In some cases, you need a helper script that mediates between the viewer
- and \SpecialChar LyX
-, in others, the viewer can communicate with \SpecialChar LyX
- directly.
- This depends on the selected viewer and on your operating system.
- The same applies to the way viewers need to be configured and the way the
- reverse search is actually performed.
- In what follows, we will thus describe how to setup reverse search for
- specific viewers.
- Before we turn to this, though, we will explain what needs to be done generally
- to enable reverse search in the DVI/PDF output.
+lyxpipe.in
 \end_layout
 
-\begin_layout Subsection
-Automatic setup
-\begin_inset CommandInset label
-LatexCommand label
-name "subsec:rev-search"
-
 \end_inset
 
+ and read back data from 
+\begin_inset Flex Code
+status collapsed
 
+\begin_layout Plain Layout
+lyxpipe.out
 \end_layout
 
-\begin_layout Standard
-In most cases \SpecialChar LyX
- will do the work for you by pressing the following button
- in the toolbar: 
-\begin_inset Info
-type  "icon"
-arg   "buffer-toggle-output-sync"
 \end_inset
 
 .
- Alternatively, you can also enable the feature by checking 
-\family sans
-Synchronize with Output
-\family default
- in 
+ The stem of the pipe names can be defined in the 
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-Document\SpecialChar menuseparator
-Settings\SpecialChar menuseparator
-Formats
+Tools\SpecialChar menuseparator
+Preferences
 \end_layout
 
 \end_inset
 
-.
- In such a case \SpecialChar LyX
- will automatically insert the necessary Sync\SpecialChar TeX
- macro (for
- PDF) or load the srcltx package (for DVI) respectively.
- This option can be easily reached also on 
+ dialog, for example 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-View/Update
-\end_layout
-
-\end_inset
-
- Toolbar.
-\end_layout
-
-\begin_layout Standard
-If you need a different setting, you can select or input a custom macro
- from the drop down box just below 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-Document\SpecialChar menuseparator
-Settings\SpecialChar menuseparator
-Output\SpecialChar menuseparator
-Synchronize with Output
+"/home/myhome/lyxpipe"
 \end_layout
 
 \end_inset
 
-.
-\end_layout
-
-\begin_layout Standard
-Note that the method 
+, or 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
+"
+\backslash
 
 \backslash
-synctex=1
+.
+\backslash
+pipe
+\backslash
+lyxpipe"
 \end_layout
 
 \end_inset
 
- enables gzip compression.
If your viewer does not support it, you should instead us
+ on Windows (where any working path instead of lyxpipe can be used, for
exampl
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
+"
+\backslash
 
 \backslash
-synctex=-1
+.
+\backslash
+pipe
+\backslash
+my
+\backslash
+lyx
+\backslash
+pipe"
 \end_layout
 
 \end_inset
 
-.
+ would also work).
+ You 
+\emph on
+must
+\emph default
+ configure this manually in order for the server to start.
 \end_layout
 
 \begin_layout Standard
-Please also note that including the 
+\SpecialChar LyX
+ will add the '
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-srcltx
+.in
 \end_layout
 
 \end_inset
 
- package or 
+' and '
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-src-specials
+.out
 \end_layout
 
 \end_inset
 
- sometimes has an undesired impact on the typesetting.
- Thus, you should switch output synchronization off for the final typesetting
- if you use the 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-srcltx
-\end_layout
-
+' to create the pipes.
+ If one of the pipes already exists, \SpecialChar LyX
+ will assume that another \SpecialChar LyX
+ process
+ is already running and will not start the server.
+ On POSIX (Unix like) systems, if for some other reason, an unused 
+\begin_inset Quotes eld
 \end_inset
 
- package or 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-src-specials
-\end_layout
-
+stale
+\begin_inset Quotes erd
 \end_inset
 
+ pipe is left in existence when \SpecialChar LyX
+ closes, then \SpecialChar LyX
+ will try to delete it.
+ If this fails for some reason, you will need to delete the pipes manually
+ and then restart \SpecialChar LyX
 .
-\end_layout
-
-\begin_layout Standard
-In case you need some more special settings that are not covered by the
- automatic settings, read the next section about how to set up output synchroniz
-ation manually.
- If the automatic setup suits your needs, you can readily jump to section
-\begin_inset space ~
+ On Windows, pipes are deleted by the OS on program termination or crash,
+ so 
+\begin_inset Quotes eld
 \end_inset
 
-
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "subsec:configuring-viewers"
-
+stale
+\begin_inset Quotes erd
 \end_inset
 
-, where the necessary configuration steps in your viewer – needed both with
- the automatic and the manual setup – are described.
-\end_layout
-
-\begin_layout Subsection
-Manual setup
+ pipes should not be possible.
 \end_layout
 
 \begin_layout Standard
-\SpecialChar LaTeX
- provides several different methods for reverse search.
- Some are built-in in the 
+To have several \SpecialChar LyX
+ processes with servers at the same time, you have to use
+ different configurations, perhaps by using separate user directories, each
+ with its own 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-latex/pdflatex
+preferences
 \end_layout
 
 \end_inset
 
- program, some are provided by external packages.
- Your choice depends on whether your \SpecialChar LaTeX
- distribution already provides a given
- method (the built-in methods are rather new) and whether your viewer can
- cope with it.
- The available methods are described in the following.
-\end_layout
-
-\begin_layout Subsubsection*
-Built-in DVI-search via src-specials (DVI only) 
+ file, for each process.
 \end_layout
 
 \begin_layout Standard
-This method provides the DVI file with the necessary information for reverse
- search.
- It is available in \SpecialChar LaTeX
- since quite some time (any somewhat recent \SpecialChar LaTeX
- distribution
- should include it), and it works reliably.
- To enable it, change the 
-\begin_inset Flex Noun
+If you are developing a client program, you might find it useful to enable
+ debugging information from the \SpecialChar LyX
+ server.
+ Do this by starting \SpecialChar LyX
+ as 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-La
-\family sans
-TeX
-\family default
- (plain)->DVI
+lyx -dbg lyxserver
 \end_layout
 
 \end_inset
 
- or 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-La
-\family sans
-TeX
-\family default
- (plain)->DraftDVI
+.
 \end_layout
 
-\end_inset
-
- converter in 
-\begin_inset Flex Noun
+\begin_layout Standard
+You can find a complete example client written in C++ in the source distribution
+ as 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Preferences\SpecialChar menuseparator
-File Handling\SpecialChar menuseparator
-Converters
+development/lyxserver/server_monitor.cpp
 \end_layout
 
 \end_inset
 
- to 
+.
+\end_layout
+
+\begin_layout Standard
+Another useful tool is the command-line based client found in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-latex -src-specials $$i
+src/client/lyxclient
 \end_layout
 
 \end_inset
 
 .
- If this doesn't work, check if your \SpecialChar TeX
- engine needs different options (the
- syntax might differ in some distributions).
 \end_layout
 
-\begin_layout Subsubsection*
-External Packages (PDFSync and scrltx) 
+\begin_layout Section
+Normal communication
 \end_layout
 
 \begin_layout Standard
-The packages 
+To issue a \SpecialChar LyX
+ call, the client writes a line of ASCII text into the input
+ pipe.
+ This line has the following format:
+\end_layout
+
+\begin_layout Quote
+LYXCMD:
 \emph on
-pdfsync
+clientname
 \emph default
- and 
+:
 \emph on
-scrltx
+function
 \emph default
- provide reverse search facility for PDF output (via pdflatex) and DVI output,
- respectively.
- In order to enable it, load the packages in the \SpecialChar LyX
- preamble: 
+:
+\emph on
+argument
 \end_layout
 
-\begin_layout Itemize
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
+\begin_layout Description
+clientname is a name that the client can choose arbitrarily.
+ Its only use is that \SpecialChar LyX
+ will echo it if it sends an answer—so a client can
+ dispatch results from different requesters.
+\end_layout
 
-\backslash
-usepackage{pdfsync}
+\begin_layout Description
+function is the function you want \SpecialChar LyX
+ to perform.
+ It is the same as the commands you'd use in the minibuffer.
 \end_layout
 
+\begin_layout Description
+argument is an optional argument which is meaningful only to some functions
+ (for instance, the 
+\begin_inset Quotes eld
 \end_inset
 
- for reverse PDF search,
+self-insert
+\begin_inset Quotes erd
+\end_inset
+
+ LFUN will insert the argument as text at the cursor position).
 \end_layout
 
-\begin_layout Itemize
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
+\begin_layout Standard
+The answer from \SpecialChar LyX
+ will arrive in the output pipe and be of the form
+\end_layout
 
-\backslash
-usepackage[active]{srcltx}
+\begin_layout Quote
+INFO:
+\emph on
+clientname
+\emph default
+:
+\emph on
+function
+\emph default
+:
+\emph on
+data
 \end_layout
 
+\begin_layout Standard
+where 
+\emph on
+clientname
+\emph default
+ and 
+\emph on
+function
+\emph default
+ are just echoed from the command request, while 
+\emph on
+data
+\emph default
+ is more or less useful information filled according to how the command
+ execution worked out.
+ Some commands, such as 
+\begin_inset Quotes eld
+\end_inset
+
+font-state
+\begin_inset Quotes erd
 \end_inset
 
- for reverse DVI search.
+, will return information about the internal state of \SpecialChar LyX
+, while other will
+ return an empty data-response.
+ This means that the command execution went fine.
 \end_layout
 
 \begin_layout Standard
-If you want to be able to perform both DVI and PDF reverse searches, you
- can also insert in the preamble the following lines
+In case of errors, the response from \SpecialChar LyX
+ will have this form
 \end_layout
 
-\begin_layout LyX-Code
-
-\backslash
-usepackage{ifpdf}
-\begin_inset Newline newline
-\end_inset
+\begin_layout Quote
+ERROR:
+\emph on
+clientname
+\emph default
+:
+\emph on
+function
+\emph default
+:
+\emph on
+error message
+\end_layout
 
+\begin_layout Standard
+where the 
+\emph on
+error message
+\emph default
+ should contain an explanation of why the command failed.
+\end_layout
 
-\backslash
-ifpdf
-\begin_inset Newline newline
-\end_inset
+\begin_layout Standard
+Examples:
+\end_layout
 
-  
-\backslash
-usepackage{pdfsync}
+\begin_layout LyX-Code
+echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
 \begin_inset Newline newline
 \end_inset
 
-
-\backslash
-else
+echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
 \begin_inset Newline newline
 \end_inset
 
-  
-\backslash
-usepackage[active]{srcltx}
+read a <~/.lyxpipe.out
 \begin_inset Newline newline
 \end_inset
 
+echo $a
+\end_layout
 
-\backslash
-fi
+\begin_layout Subsection
+AppleScript (Mac OS X)
 \end_layout
 
 \begin_layout Standard
-This way, you can preview the file as either DVI or PDF (pdflatex) and the
- right package will be used.
+Since \SpecialChar LyX
+ 2.1, \SpecialChar LyX
+ supports basic interactions with AppleScript for normal communicatio
+n through the command run.
+ This command takes a direct argument (the 
+\series bold
+function
+\series default
+ to perform) and an optional argument.
+ It either returns the output of the function or triggers an error with
+ the error message and code.
 \end_layout
 
 \begin_layout Standard
-Note that PDFSync might affect the output layout of your document.
- It is therefore advised to disable PDFsync for final documents.
+Example:
 \end_layout
 
-\begin_layout Subsubsection*
-Built-in reverse search via Sync\SpecialChar TeX
- (DVI and PDF) 
+\begin_layout LyX-Code
+tell application "\SpecialChar LyX
+"
 \end_layout
 
-\begin_layout Standard
-Recent versions of 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-(pdf)latex
+\begin_layout LyX-Code
+  try
 \end_layout
 
-\end_inset
-
- have built-in support for both PDF and DVI reverse search.
- This so-called 
-\emph on
-Sync\SpecialChar TeX
-
-\emph default
- facility is basically the result of the integration of the PDFSync package
- to the pdftex program and its merge with the 
-\emph on
-scr-specials
-\emph default
- approach.
- You need at least \SpecialChar TeX
-Live 2008 or a recent Mik\SpecialChar TeX
- distribution in order to use
- it.
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-For some reason, Mik\SpecialChar TeX
- does not understand/obey the command \SpecialChar LyX
- inserts into
- the preamble when you check the "Enable Forward/Reverse Search" button
- in the toolbar and does not generate the necessary info.
+\begin_layout LyX-Code
+    -- Stores the current file name into f
 \end_layout
 
-\begin_layout Plain Layout
-The generation of the required info can be forced by changing the converter
- "\SpecialChar LaTeX
- (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
- from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
- the -synctex=1 switch).
+\begin_layout LyX-Code
+    set f to (run "server-get-filename" with argument "")
 \end_layout
 
-\end_inset
-
- Also note that only a few PDF viewers (such as Okular and Qpdfview on Unix,
- Skim on the Mac, SumatraPDF on Windows; see the next section for details)
- already provide Sync\SpecialChar TeX
- support.
+\begin_layout LyX-Code
+    on error the error_message number the error_number
 \end_layout
 
-\begin_layout Standard
-To enable Sync\SpecialChar TeX
- for DVI output, change the 
-\begin_inset Flex Noun
-status collapsed
+\begin_layout LyX-Code
+      display dialog "Error: " & the error_number & ".
+ " ¬
+\end_layout
 
-\begin_layout Plain Layout
-La
-\family sans
-TeX
-\family default
- (plain) -> DVI
+\begin_layout LyX-Code
+              & the error_message buttons {"OK"} default button 1
 \end_layout
 
-\end_inset
+\begin_layout LyX-Code
+  end try
+\end_layout
 
- or 
-\begin_inset Flex Noun
-status collapsed
+\begin_layout LyX-Code
+end tell
+\end_layout
 
-\begin_layout Plain Layout
-La
-\family sans
-TeX
-\family default
- (plain) -> DraftDVI
+\begin_layout Section
+Notification
 \end_layout
 
+\begin_layout Standard
+\SpecialChar LyX
+ can notify clients of events going on asynchronously.
+ Currently it will only do this if the user binds a key sequence with the
+ function 
+\begin_inset Quotes eld
 \end_inset
 
- converter in 
-\begin_inset Flex Noun
-status collapsed
+notify
+\begin_inset Quotes erd
+\end_inset
 
-\begin_layout Plain Layout
-Preferences\SpecialChar menuseparator
-File Handling\SpecialChar menuseparator
-Converters
+.
+ The format of the string \SpecialChar LyX
+ sends is as follows:
 \end_layout
 
-\end_inset
-
- to 
+\begin_layout Quote
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-latex -synctex=1 $$i
+NOTIFY:
 \end_layout
 
 \end_inset
 
-, and for PDF output, change the 
-\begin_inset Flex Noun
-status collapsed
 
-\begin_layout Plain Layout
-La
-\family sans
-TeX
-\family default
- (pdflatex) -> PDF (pdflatex)
+\emph on
+key-sequence
 \end_layout
 
-\end_inset
-
- converter to 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-pdflatex -synctex=1 $$i
+\begin_layout Standard
+where 
+\emph on
+key-sequence
+\emph default
+ is the printed representation of the key sequence that was actually typed
+ by the user.
 \end_layout
 
+\begin_layout Standard
+This mechanism can be used to extend \SpecialChar LyX
+'s command set and implement macros.
+ Bind some key sequence to 
+\begin_inset Quotes eld
+\end_inset
+
+notify
+\begin_inset Quotes erd
 \end_inset
 
 .
- Should your viewer not be considered in the following description, or in
- case of missing success, please check the documentation of your viewer
- whether the viewer needs to be configured for the use with Sync\SpecialChar TeX
+ Then start a client that listens on the output pipe, dispatches the command
+ according to the sequence, and starts a function that may use \SpecialChar LyX
+ calls and
+ \SpecialChar LyX
+ requests to issue a command or a series of commands to \SpecialChar LyX
 .
-\begin_inset Foot
-status collapsed
+\end_layout
 
-\begin_layout Plain Layout
-Note that the option 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Section
+The simple \SpecialChar LyX
+ Server Protocol
+\end_layout
 
-\begin_layout Plain Layout
--synctex=1
+\begin_layout Standard
+\SpecialChar LyX
+ implements a simple protocol that can be used for session management.
+ All messages are of the form
+\end_layout
+
+\begin_layout Quote
+LYXSRV:
+\emph on
+clientname
+\emph default
+:
+\emph on
+protocol message
 \end_layout
 
+\begin_layout Standard
+where 
+\emph on
+protocol message
+\emph default
+ can be 
+\begin_inset Quotes eld
 \end_inset
 
- option enables gzip compression.
- If your viewer does not support it, you should instead use 
-\begin_inset Flex Code
+hello
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+bye
+\begin_inset Quotes erd
+\end_inset
+
+.
+ If 
+\begin_inset Quotes eld
+\end_inset
+
+hello
+\begin_inset Quotes erd
+\end_inset
+
+ is received from a client, \SpecialChar LyX
+ will report back to inform the client that
+ it's listening to it's messages, while 
+\begin_inset Quotes eld
+\end_inset
+
+bye
+\begin_inset Quotes erd
+\end_inset
+
+ sent from \SpecialChar LyX
+ will inform clients that \SpecialChar LyX
+ is closing.
+\end_layout
+
+\begin_layout Section
+Reverse DVI/PDF search
+\end_layout
+
+\begin_layout Standard
+Some DVI/PDF viewers
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
--synctex=-1
+The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
+ Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
 \end_layout
 
 \end_inset
 
+ provide 
+\emph on
+reverse search
+\emph default
+ facility (also called 
+\emph on
+inverse search
+\emph default
+).
+ This means that you can tell \SpecialChar LyX
+ to put the cursor to a specific line in the
+ document by clicking at the respective position in the DVI/PDF output.
+ To achieve this, the viewer must be able to communicate with \SpecialChar LyX
 .
+ This is done via the \SpecialChar LyX
+ server either by using the named pipe (
+\emph on
+lyxpipe
+\emph default
+), or the UNIX domain socket (
+\emph on
+lyxsocket
+\emph default
+) that \SpecialChar LyX
+ creates in its temporary directory (this is the way the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxclient
 \end_layout
 
 \end_inset
 
-
+ program communicates with \SpecialChar LyX
+).
+ In some cases, you need a helper script that mediates between the viewer
+ and \SpecialChar LyX
+, in others, the viewer can communicate with \SpecialChar LyX
+ directly.
+ This depends on the selected viewer and on your operating system.
+ The same applies to the way viewers need to be configured and the way the
+ reverse search is actually performed.
+ In what follows, we will thus describe how to setup reverse search for
+ specific viewers.
+ Before we turn to this, though, we will explain what needs to be done generally
+ to enable reverse search in the DVI/PDF output.
 \end_layout
 
 \begin_layout Subsection
-Configuring and using specific viewers
+Automatic setup
 \begin_inset CommandInset label
 LatexCommand label
-name "subsec:configuring-viewers"
+name "subsec:rev-search"
 
 \end_inset
 
 
 \end_layout
 
-\begin_layout Subsubsection*
-Xdvi (all platforms)
-\end_layout
-
 \begin_layout Standard
-If you use 
-\begin_inset Flex Code
+In most cases \SpecialChar LyX
+ will do the work for you by pressing the following button
+ in the toolbar: 
+\begin_inset Info
+type  "icon"
+arg   "buffer-toggle-output-sync"
+\end_inset
+
+.
+ Alternatively, you can also enable the feature by checking 
+\family sans
+Synchronize with Output
+\family default
+ in 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-xdvi
+Document\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
+Formats
 \end_layout
 
 \end_inset
 
-, you don't need to do anything else for performing a reverse DVI search,
- as \SpecialChar LyX
- already provides the necessary hooks for automatically using the 
+.
+ In such a case \SpecialChar LyX
+ will automatically insert the necessary Sync\SpecialChar TeX
+ macro (for
+ PDF) or load the srcltx package (for DVI) respectively.
+ This option can be easily reached also on 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxclient
+View/Update
 \end_layout
 
 \end_inset
 
- program.
- Just setup your document as described above (reverse search is triggered
- by Ctrl-click or Alt-click on Mac OSX, respectively).
+ Toolbar.
 \end_layout
 
 \begin_layout Standard
-However, if for whatever reason you want to use the named pipe instead of
- the socket for communicating with \SpecialChar LyX
-, simply change the DVI viewer in 
+If you need a different setting, you can select or input a custom macro
+ from the drop down box just below 
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-Preferences\SpecialChar menuseparator
-File Handling\SpecialChar menuseparator
-File formats
+Document\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
+Output\SpecialChar menuseparator
+Synchronize with Output
 \end_layout
 
 \end_inset
 
- to
-\begin_inset Foot
-status collapsed
+.
+\end_layout
 
-\begin_layout Plain Layout
-On Mac OSX you have to use 
+\begin_layout Standard
+Note that the method 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
+
+\backslash
+synctex=1
 \end_layout
 
 \end_inset
 
+ enables gzip compression.
+ If your viewer does not support it, you should instead use 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
 
+\backslash
+synctex=-1
 \end_layout
 
 \end_inset
 
+.
+\end_layout
+
+\begin_layout Standard
+Please also note that including the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-xdvi -editor "lyxeditor.sh %f %l"
+srcltx
 \end_layout
 
 \end_inset
 
-, where 
+ package or 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor.sh
+src-specials
 \end_layout
 
 \end_inset
 
- is a suitable script.
- For example, a minimal shell script is the following one:
+ sometimes has an undesired impact on the typesetting.
+ Thus, you should switch output synchronization off for the final typesetting
+ if you use the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+srcltx
 \end_layout
 
-\begin_layout LyX-Code
-#!/bin/sh
-\begin_inset Newline newline
 \end_inset
 
-LYXPIPE="/path/to/lyxpipe"
-\begin_inset Newline newline
-\end_inset
+ package or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src-specials
+\end_layout
 
-COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
-\begin_inset Newline newline
 \end_inset
 
-echo "$COMMAND" > "${LYXPIPE}".in || exit
-\begin_inset Newline newline
+.
+\end_layout
+
+\begin_layout Standard
+In case you need some more special settings that are not covered by the
+ automatic settings, read the next section about how to set up output synchroniz
+ation manually.
+ If the automatic setup suits your needs, you can readily jump to section
+\begin_inset space ~
 \end_inset
 
-read TMP < "${LYXPIPE}".out || exit
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:configuring-viewers"
+
+\end_inset
+
+, where the necessary configuration steps in your viewer – needed both with
+ the automatic and the manual setup – are described.
+\end_layout
+
+\begin_layout Subsection
+Manual setup
 \end_layout
 
 \begin_layout Standard
-where 
+\SpecialChar LaTeX
+ provides several different methods for reverse search.
+ Some are built-in in the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-/path/to/lyxpipe
+latex/pdflatex
 \end_layout
 
 \end_inset
 
- is the LyXServer pipe path specified in 
+ program, some are provided by external packages.
+ Your choice depends on whether your \SpecialChar LaTeX
+ distribution already provides a given
+ method (the built-in methods are rather new) and whether your viewer can
+ cope with it.
+ The available methods are described in the following.
+\end_layout
+
+\begin_layout Subsubsection*
+Built-in DVI-search via src-specials (DVI only) 
+\end_layout
+
+\begin_layout Standard
+This method provides the DVI file with the necessary information for reverse
+ search.
+ It is available in \SpecialChar LaTeX
+ since quite some time (any somewhat recent \SpecialChar LaTeX
+ distribution
+ should include it), and it works reliably.
+ To enable it, change the 
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-Preferences\SpecialChar menuseparator
-Paths
+La
+\family sans
+TeX
+\family default
+ (plain)->DVI
 \end_layout
 
 \end_inset
 
-.
-\begin_inset Foot
+ or 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-In the 
-\begin_inset Flex Code
+La
+\family sans
+TeX
+\family default
+ (plain)->DraftDVI
+\end_layout
+
+\end_inset
+
+ converter in 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-development/tools
+Preferences\SpecialChar menuseparator
+File Handling\SpecialChar menuseparator
+Converters
 \end_layout
 
 \end_inset
 
- folder of a source distribution you can find a 
+ to 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor
+latex -src-specials $$i
 \end_layout
 
 \end_inset
 
- script which is able to locate the 
+.
+ If this doesn't work, check if your \SpecialChar TeX
+ engine needs different options (the
+ syntax might differ in some distributions).
+\end_layout
+
+\begin_layout Subsubsection*
+External Packages (PDFSync and scrltx) 
+\end_layout
+
+\begin_layout Standard
+The packages 
 \emph on
-lyxpipe
+pdfsync
 \emph default
- based on your preferences.
+ and 
+\emph on
+scrltx
+\emph default
+ provide reverse search facility for PDF output (via pdflatex) and DVI output,
+ respectively.
+ In order to enable it, load the packages in the \SpecialChar LyX
+ preamble: 
 \end_layout
 
-\end_inset
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
 
+\begin_layout Plain Layout
 
+\backslash
+usepackage{pdfsync}
 \end_layout
 
-\begin_layout Subsubsection*
-MacDviX (Mac OSX)
+\end_inset
+
+ for reverse PDF search,
 \end_layout
 
-\begin_layout Standard
-At the end of 
+\begin_layout Itemize
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-/Applications/MacDviX_Folder/calleditor.script
+
+\backslash
+usepackage[active]{srcltx}
 \end_layout
 
 \end_inset
 
-, add the following lines:
+ for reverse DVI search.
+\end_layout
+
+\begin_layout Standard
+If you want to be able to perform both DVI and PDF reverse searches, you
+ can also insert in the preamble the following lines
 \end_layout
 
 \begin_layout LyX-Code
-/Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
+
+\backslash
+usepackage{ifpdf}
 \begin_inset Newline newline
 \end_inset
 
-exit 1
+
+\backslash
+ifpdf
+\begin_inset Newline newline
+\end_inset
+
+  
+\backslash
+usepackage{pdfsync}
+\begin_inset Newline newline
+\end_inset
+
+
+\backslash
+else
+\begin_inset Newline newline
+\end_inset
+
+  
+\backslash
+usepackage[active]{srcltx}
+\begin_inset Newline newline
+\end_inset
+
+
+\backslash
+fi
 \end_layout
 
 \begin_layout Standard
-Modify the lines accordingly if you install \SpecialChar LyX
- somewhere else than in the
- Applications folder.
+This way, you can preview the file as either DVI or PDF (pdflatex) and the
+ right package will be used.
 \end_layout
 
 \begin_layout Standard
-Reverse search is triggered by Alt-click (OPTION-click).
+Note that PDFSync might affect the output layout of your document.
+ It is therefore advised to disable PDFsync for final documents.
 \end_layout
 
 \begin_layout Subsubsection*
-Skim (Mac OSX)
+Built-in reverse search via Sync\SpecialChar TeX
+ (DVI and PDF) 
 \end_layout
 
 \begin_layout Standard
-Enter 
+Recent versions of 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-open -a Skim.app $$i
+(pdf)latex
 \end_layout
 
 \end_inset
 
- to the viewer setting in 
-\begin_inset Flex Noun
+ have built-in support for both PDF and DVI reverse search.
+ This so-called 
+\emph on
+Sync\SpecialChar TeX
+
+\emph default
+ facility is basically the result of the integration of the PDFSync package
+ to the pdftex program and its merge with the 
+\emph on
+scr-specials
+\emph default
+ approach.
+ You need at least \SpecialChar TeX
+Live 2008 or a recent Mik\SpecialChar TeX
+ distribution in order to use
+ it.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-Preferences\SpecialChar menuseparator
-File Handling\SpecialChar menuseparator
-File formats\SpecialChar menuseparator
-PDF (pdflatex)
+For some reason, Mik\SpecialChar TeX
+ does not understand/obey the command \SpecialChar LyX
+ inserts into
+ the preamble when you check the "Enable Forward/Reverse Search" button
+ in the toolbar and does not generate the necessary info.
+\end_layout
+
+\begin_layout Plain Layout
+The generation of the required info can be forced by changing the converter
+ "\SpecialChar LaTeX
+ (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
+ from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
+ the -synctex=1 switch).
 \end_layout
 
 \end_inset
 
-, and then in 
+ Also note that only a few PDF viewers (such as Okular and Qpdfview on Unix,
+ Skim on the Mac, SumatraPDF on Windows; see the next section for details)
+ already provide Sync\SpecialChar TeX
+ support.
+\end_layout
+
+\begin_layout Standard
+To enable Sync\SpecialChar TeX
+ for DVI output, change the 
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-Skim\SpecialChar menuseparator
-Preferences\SpecialChar menuseparator
-Sync
+La
+\family sans
+TeX
+\family default
+ (plain) -> DVI
 \end_layout
 
 \end_inset
 
- choose 
+ or 
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-custom
+La
+\family sans
+TeX
+\family default
+ (plain) -> DraftDVI
 \end_layout
 
 \end_inset
 
- preset and enter command 
+ converter in 
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-/Applications/\SpecialChar LyX
-.app/Contents/MacOS/lyxeditor
+Preferences\SpecialChar menuseparator
+File Handling\SpecialChar menuseparator
+Converters
 \end_layout
 
 \end_inset
 
-.
-\end_layout
-
-\begin_layout Standard
-Reverse search is triggered by COMMAND-SHIFT-click
-\end_layout
+ to 
+\begin_inset Flex Code
+status collapsed
 
-\begin_layout Subsubsection*
-Evince (GNOME)
+\begin_layout Plain Layout
+latex -synctex=1 $$i
 \end_layout
 
-\begin_layout Standard
-Reverse search with evince does not work out of the box, but it can be achieved
- by means of some third party helper scripts.
- Please refer to 
-\begin_inset CommandInset href
-LatexCommand href
-target "https://wiki.lyx.org/LyX/SyncTeX"
-literal "false"
-
 \end_inset
 
- for details.
-\end_layout
+, and for PDF output, change the 
+\begin_inset Flex Noun
+status collapsed
 
-\begin_layout Subsubsection*
-Okular (KDE)
+\begin_layout Plain Layout
+La
+\family sans
+TeX
+\family default
+ (pdflatex) -> PDF (pdflatex)
 \end_layout
 
-\begin_layout Standard
-Go to 
-\begin_inset Flex Noun
+\end_inset
+
+ converter to 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Settings\SpecialChar menuseparator
-Configure Okular\SpecialChar menuseparator
-Editor
+pdflatex -synctex=1 $$i
 \end_layout
 
 \end_inset
 
- and select LyX
-\begin_inset Quotes erd
-\end_inset
+.
+ Should your viewer not be considered in the following description, or in
+ case of missing success, please check the documentation of your viewer
+ whether the viewer needs to be configured for the use with Sync\SpecialChar TeX
+.
+\begin_inset Foot
+status collapsed
 
- as editor.
- This inserts the appropriate command (
+\begin_layout Plain Layout
+Note that the option 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxclient -g %f %l
+-synctex=1
 \end_layout
 
 \end_inset
 
-).
-\end_layout
+ option enables gzip compression.
+ If your viewer does not support it, you should instead use 
+\begin_inset Flex Code
+status collapsed
 
-\begin_layout Standard
-Reverse search is triggered by SHIFT-click.
+\begin_layout Plain Layout
+-synctex=-1
+\end_layout
 
-\change_inserted -712698321 1578211026
- Note that this only works if Okular is in 
-\begin_inset Quotes eld
 \end_inset
 
-Browse
-\begin_inset Quotes erd
+.
+\end_layout
+
 \end_inset
 
- mode (i.
-\begin_inset space \thinspace{}
+
+\end_layout
+
+\begin_layout Subsection
+Configuring and using specific viewers
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:configuring-viewers"
+
 \end_inset
 
-e., the hand symbol is clicked).
-\change_unchanged
 
 \end_layout
 
 \begin_layout Subsubsection*
-Qpdfview (Unix)
+Xdvi (all platforms)
 \end_layout
 
 \begin_layout Standard
-Qpdfview supports Sync\SpecialChar TeX
- since version 0.3.5.
- Go to 
-\begin_inset Flex Noun
+If you use 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Edit\SpecialChar menuseparator
-Settings\SpecialChar menuseparator
-Behavior
+xdvi
 \end_layout
 
 \end_inset
 
-, click on the input field of the 
-\begin_inset Quotes eld
-\end_inset
-
-Source editor
-\begin_inset Quotes erd
-\end_inset
-
- item and add the command 
+, you don't need to do anything else for performing a reverse DVI search,
+ as \SpecialChar LyX
+ already provides the necessary hooks for automatically using the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxclient -g %1 %2
+lyxclient
 \end_layout
 
 \end_inset
 
-.
+ program.
+ Just setup your document as described above (reverse search is triggered
+ by Ctrl-click or Alt-click on Mac OSX, respectively).
 \end_layout
 
 \begin_layout Standard
-Reverse search is triggered by double-click or, in more recent versions,
- by context menu.
-\end_layout
+However, if for whatever reason you want to use the named pipe instead of
+ the socket for communicating with \SpecialChar LyX
+, simply change the DVI viewer in 
+\begin_inset Flex Noun
+status collapsed
 
-\begin_layout Subsubsection*
-YAP (Windows)
+\begin_layout Plain Layout
+Preferences\SpecialChar menuseparator
+File Handling\SpecialChar menuseparator
+File formats
 \end_layout
 
-\begin_layout Standard
-Launch yap, choose its 
-\begin_inset Flex Noun
+\end_inset
+
+ to
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-View\SpecialChar menuseparator
-Options
+On Mac OSX you have to use 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
 \end_layout
 
 \end_inset
 
- menu and select the 
-\begin_inset Quotes eld
-\end_inset
 
-Inverse DVI Search
-\begin_inset Quotes erd
-\end_inset
+\end_layout
 
- tab.
- Click on the 
-\begin_inset Quotes eld
 \end_inset
 
-New\SpecialChar ldots
+\begin_inset Flex Code
+status collapsed
 
-\begin_inset Quotes erd
-\end_inset
+\begin_layout Plain Layout
+xdvi -editor "lyxeditor.sh %f %l"
+\end_layout
 
- button and, in the window that opens, enter 
-\begin_inset Quotes eld
 \end_inset
 
-\SpecialChar LyX
- Editor
-\begin_inset Quotes erd
-\end_inset
+, where 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.sh
+\end_layout
 
- (or any other name you like) in the 
-\begin_inset Quotes eld
 \end_inset
 
-Name:
-\begin_inset Quotes erd
+ is a suitable script.
+ For example, a minimal shell script is the following one:
+\end_layout
+
+\begin_layout LyX-Code
+#!/bin/sh
+\begin_inset Newline newline
 \end_inset
 
- field.
- Now click on the button labeled 
-\begin_inset Quotes eld
+LYXPIPE="/path/to/lyxpipe"
+\begin_inset Newline newline
 \end_inset
 
-\SpecialChar ldots
+COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
+\begin_inset Newline newline
+\end_inset
 
-\begin_inset Quotes erd
+echo "$COMMAND" > "${LYXPIPE}".in || exit
+\begin_inset Newline newline
 \end_inset
 
- to open a file dialog and navigate to the directory containing the batch
- file 
+read TMP < "${LYXPIPE}".out || exit
+\end_layout
+
+\begin_layout Standard
+where 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor.bat
+/path/to/lyxpipe
 \end_layout
 
 \end_inset
 
- (see below).
- Select 
-\begin_inset Flex Code
+ is the LyXServer pipe path specified in 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor.bat
+Preferences\SpecialChar menuseparator
+Paths
 \end_layout
 
 \end_inset
 
- and then specify the program arguments as 
+.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+In the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-%f %l
+development/tools
 \end_layout
 
 \end_inset
 
-.
- The 
+ folder of a source distribution you can find a 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor.bat
+lyxeditor
 \end_layout
 
 \end_inset
 
- wrapper is used for communicating with \SpecialChar LyX
- through the 
+ script which is able to locate the 
 \emph on
 lyxpipe
 \emph default
- and is as follows:
+ based on your preferences.
 \end_layout
 
-\begin_layout LyX-Code
-@echo off
-\begin_inset Newline newline
 \end_inset
 
-echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> 
-\backslash
 
-\backslash
-.
-\backslash
-pipe
-\backslash
-lyxpipe.in
+\end_layout
+
+\begin_layout Subsubsection*
+MacDviX (Mac OSX)
+\end_layout
+
+\begin_layout Standard
+At the end of 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+/Applications/MacDviX_Folder/calleditor.script
+\end_layout
+
+\end_inset
+
+, add the following lines:
+\end_layout
+
+\begin_layout LyX-Code
+/Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
 \begin_inset Newline newline
 \end_inset
 
-type 
-\backslash
+exit 1
+\end_layout
 
-\backslash
-.
-\backslash
-pipe
-\backslash
-lyxpipe.out
+\begin_layout Standard
+Modify the lines accordingly if you install \SpecialChar LyX
+ somewhere else than in the
+ Applications folder.
 \end_layout
 
 \begin_layout Standard
-Make sure that the \SpecialChar LyX
-Server pipe path you specified in \SpecialChar LyX
- is 
+Reverse search is triggered by Alt-click (OPTION-click).
+\end_layout
+
+\begin_layout Subsubsection*
+Skim (Mac OSX)
+\end_layout
+
+\begin_layout Standard
+Enter 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
+open -a Skim.app $$i
+\end_layout
 
-\backslash
+\end_inset
 
-\backslash
-.
-\backslash
-pipe
-\backslash
-lyxpipe
+ to the viewer setting in 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+Preferences\SpecialChar menuseparator
+File Handling\SpecialChar menuseparator
+File formats\SpecialChar menuseparator
+PDF (pdflatex)
 \end_layout
 
 \end_inset
 
-, otherwise change the 
-\begin_inset Flex Code
+, and then in 
+\begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor.bat
+Skim\SpecialChar menuseparator
+Preferences\SpecialChar menuseparator
+Sync
 \end_layout
 
 \end_inset
 
- wrapper accordingly.
+ choose 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+custom
+\end_layout
+
+\end_inset
+
+ preset and enter command 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+/Applications/\SpecialChar LyX
+.app/Contents/MacOS/lyxeditor
+\end_layout
+
+\end_inset
+
+.
 \end_layout
 
 \begin_layout Standard
-In yap, reverse search is triggered by double-click.
+Reverse search is triggered by COMMAND-SHIFT-click
 \end_layout
 
 \begin_layout Subsubsection*
-SumatraPDF (Windows)
+Evince (GNOME)
 \end_layout
 
 \begin_layout Standard
-In order to use SumatraPDF for inverse search, enter 
+Reverse search with evince does not work out of the box, but it can be achieved
+ by means of some third party helper scripts.
+ Please refer to 
+\begin_inset CommandInset href
+LatexCommand href
+target "https://wiki.lyx.org/LyX/SyncTeX"
+literal "false"
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout Subsubsection*
+Okular (KDE)
+\end_layout
+
+\begin_layout Standard
+Go to 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+Settings\SpecialChar menuseparator
+Configure Okular\SpecialChar menuseparator
+Editor
+\end_layout
+
+\end_inset
+
+ and select LyX
+\begin_inset Quotes erd
+\end_inset
+
+ as editor.
+ This inserts the appropriate command (
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-SumatraPDF -inverse-search "lyxeditor.bat "%f" %l"
+lyxclient -g %f %l
 \end_layout
 
 \end_inset
 
- in the viewer setting in 
+).
+\end_layout
+
+\begin_layout Standard
+Reverse search is triggered by SHIFT-click.
+
+\change_inserted -712698321 1578211026
+ Note that this only works if Okular is in 
+\begin_inset Quotes eld
+\end_inset
+
+Browse
+\begin_inset Quotes erd
+\end_inset
+
+ mode (i.
+\begin_inset space \thinspace{}
+\end_inset
+
+e., the hand symbol is clicked).
+\change_unchanged
+
+\end_layout
+
+\begin_layout Subsubsection*
+Qpdfview (Unix)
+\end_layout
+
+\begin_layout Standard
+Qpdfview supports Sync\SpecialChar TeX
+ since version 0.3.5.
+ Go to 
 \begin_inset Flex Noun
 status collapsed
 
 \begin_layout Plain Layout
-Preferences\SpecialChar menuseparator
-File Handling\SpecialChar menuseparator
-File formats\SpecialChar menuseparator
-PDF (pdflatex)
+Edit\SpecialChar menuseparator
+Settings\SpecialChar menuseparator
+Behavior
 \end_layout
 
 \end_inset
 
-, where 
+, click on the input field of the 
+\begin_inset Quotes eld
+\end_inset
+
+Source editor
+\begin_inset Quotes erd
+\end_inset
+
+ item and add the command 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor.bat
+lyxclient -g %1 %2
 \end_layout
 
 \end_inset
 
- is the previous wrapper.
- If SumatraPDF.exe is not in your command PATH, use its full file name.
+.
 \end_layout
 
 \begin_layout Standard
-Reverse search is triggered by double-click.
+Reverse search is triggered by double-click or, in more recent versions,
+ by context menu.
 \end_layout
 
 \begin_layout Subsubsection*
-YAP (Cygwin)
+YAP (Windows)
 \end_layout
 
 \begin_layout Standard
-First of all, make sure that yap is your default DVI viewer in the Windows
- environment, then launch it, choose its 
+Launch yap, choose its 
 \begin_inset Flex Noun
 status collapsed
 
@@ -8114,24 +8563,24 @@ Name:
 \begin_inset Quotes erd
 \end_inset
 
- to open a file dialog and navigate to the directory containing the 
+ to open a file dialog and navigate to the directory containing the batch
+ file 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor.exe
+lyxeditor.bat
 \end_layout
 
 \end_inset
 
- program (which is installed by default on Cygwin along with the \SpecialChar LyX
- executable).
+ (see below).
  Select 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyxeditor.exe
+lyxeditor.bat
 \end_layout
 
 \end_inset
@@ -8141,47 +8590,272 @@ lyxeditor.exe
 status collapsed
 
 \begin_layout Plain Layout
--g %f %l
+%f %l
 \end_layout
 
 \end_inset
 
 .
- In this way, you will be using the 
-\emph on
-lyxsocket
-\emph default
- for communicating with \SpecialChar LyX
-.
- If, for whatever reason, you want to use the 
-\emph on
-lyxpipe
-\emph default
-, omit the 
+ The 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
--g
+lyxeditor.bat
 \end_layout
 
 \end_inset
 
- option and be sure to specify the \SpecialChar LyX
-Server pipe path in the \SpecialChar LyX
- preferences.
+ wrapper is used for communicating with \SpecialChar LyX
+ through the 
+\emph on
+lyxpipe
+\emph default
+ and is as follows:
 \end_layout
 
-\begin_layout Standard
-In yap, reverse search is triggered by double-click.
-\end_layout
+\begin_layout LyX-Code
+@echo off
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout Subsubsection*
-SumatraPDF (Cygwin)
-\end_layout
+echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> 
+\backslash
 
-\begin_layout Standard
-In order to use SumatraPDF for inverse search, enter 
+\backslash
+.
+\backslash
+pipe
+\backslash
+lyxpipe.in
+\begin_inset Newline newline
+\end_inset
+
+type 
+\backslash
+
+\backslash
+.
+\backslash
+pipe
+\backslash
+lyxpipe.out
+\end_layout
+
+\begin_layout Standard
+Make sure that the \SpecialChar LyX
+Server pipe path you specified in \SpecialChar LyX
+ is 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\backslash
+.
+\backslash
+pipe
+\backslash
+lyxpipe
+\end_layout
+
+\end_inset
+
+, otherwise change the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.bat
+\end_layout
+
+\end_inset
+
+ wrapper accordingly.
+\end_layout
+
+\begin_layout Standard
+In yap, reverse search is triggered by double-click.
+\end_layout
+
+\begin_layout Subsubsection*
+SumatraPDF (Windows)
+\end_layout
+
+\begin_layout Standard
+In order to use SumatraPDF for inverse search, enter 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+SumatraPDF -inverse-search "lyxeditor.bat "%f" %l"
+\end_layout
+
+\end_inset
+
+ in the viewer setting in 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+Preferences\SpecialChar menuseparator
+File Handling\SpecialChar menuseparator
+File formats\SpecialChar menuseparator
+PDF (pdflatex)
+\end_layout
+
+\end_inset
+
+, where 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.bat
+\end_layout
+
+\end_inset
+
+ is the previous wrapper.
+ If SumatraPDF.exe is not in your command PATH, use its full file name.
+\end_layout
+
+\begin_layout Standard
+Reverse search is triggered by double-click.
+\end_layout
+
+\begin_layout Subsubsection*
+YAP (Cygwin)
+\end_layout
+
+\begin_layout Standard
+First of all, make sure that yap is your default DVI viewer in the Windows
+ environment, then launch it, choose its 
+\begin_inset Flex Noun
+status collapsed
+
+\begin_layout Plain Layout
+View\SpecialChar menuseparator
+Options
+\end_layout
+
+\end_inset
+
+ menu and select the 
+\begin_inset Quotes eld
+\end_inset
+
+Inverse DVI Search
+\begin_inset Quotes erd
+\end_inset
+
+ tab.
+ Click on the 
+\begin_inset Quotes eld
+\end_inset
+
+New\SpecialChar ldots
+
+\begin_inset Quotes erd
+\end_inset
+
+ button and, in the window that opens, enter 
+\begin_inset Quotes eld
+\end_inset
+
+\SpecialChar LyX
+ Editor
+\begin_inset Quotes erd
+\end_inset
+
+ (or any other name you like) in the 
+\begin_inset Quotes eld
+\end_inset
+
+Name:
+\begin_inset Quotes erd
+\end_inset
+
+ field.
+ Now click on the button labeled 
+\begin_inset Quotes eld
+\end_inset
+
+\SpecialChar ldots
+
+\begin_inset Quotes erd
+\end_inset
+
+ to open a file dialog and navigate to the directory containing the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.exe
+\end_layout
+
+\end_inset
+
+ program (which is installed by default on Cygwin along with the \SpecialChar LyX
+ executable).
+ Select 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+lyxeditor.exe
+\end_layout
+
+\end_inset
+
+ and then specify the program arguments as 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+-g %f %l
+\end_layout
+
+\end_inset
+
+.
+ In this way, you will be using the 
+\emph on
+lyxsocket
+\emph default
+ for communicating with \SpecialChar LyX
+.
+ If, for whatever reason, you want to use the 
+\emph on
+lyxpipe
+\emph default
+, omit the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+-g
+\end_layout
+
+\end_inset
+
+ option and be sure to specify the \SpecialChar LyX
+Server pipe path in the \SpecialChar LyX
+ preferences.
+\end_layout
+
+\begin_layout Standard
+In yap, reverse search is triggered by double-click.
+\end_layout
+
+\begin_layout Subsubsection*
+SumatraPDF (Cygwin)
+\end_layout
+
+\begin_layout Standard
+In order to use SumatraPDF for inverse search, enter 
 \begin_inset Flex Code
 status collapsed
 
@@ -10365,534 +11039,6 @@ Your mileage may vary.
  So, go forth and publish!
 \end_layout
 
-\begin_layout Section
-AMS \SpecialChar LaTeX
-
-\end_layout
-
-\begin_layout Standard
-by 
-\noun on
-David Johnson
-\noun default
-; updated by 
-\noun on
-Richard Kimberly Heck
-\end_layout
-
-\begin_layout Standard
-\begin_inset VSpace bigskip
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-The AMS \SpecialChar LaTeX
- layouts are set up to conform to suggested styles for mathematical
- papers to be submitted to American Mathematical Society publications.
- The layouts are not tailored to a specific journal, but easily can be.
- You should refer to the AMS documentation for specific instructions for
- each journal (usually it will entail only changing a single line in the
- \SpecialChar TeX
- output).
- That documentation is available on the Web at 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-http://www.ams.org
-\end_layout
-
-\end_inset
-
- or by ftp at 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-ftp://ftp.ams.org/pub/tex/amslatex/
-\end_layout
-
-\end_inset
-
-.
- These layouts are appropriate, and useful, for any mathematical writing.
-\end_layout
-
-\begin_layout Standard
-There are two basic AMS \SpecialChar LaTeX
- layouts: 
-\end_layout
-
-\begin_layout Itemize
-amsart: The standard AMS article format.
-\end_layout
-
-\begin_layout Itemize
-amsbook: the standard AMS book (really, monograph) format.
-\end_layout
-
-\begin_layout Standard
-The layouts themselves contain only the minimum necessary to use the AMS
- classes.
- They do not, in particular, contain any of the `theorem' environments used
- for setting theorems, lemmas, and the like.
- These are contained, instead, in the 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (AMS)
-\end_layout
-
-\end_inset
-
- module, which is loaded by default when you select one of the AMS classes.
- (It can also be used with other classes and can be removed, if you would
- rather use something else.) Less commonly used environments are in the 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (AMS-Extended)
-\end_layout
-
-\end_inset
-
- module, which must be loaded manually.
-\end_layout
-
-\begin_layout Standard
-By default, theorems and the like are numbered consecutively throughout
- the document, but this may be modified by loading the module 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (Order by Section)
-\end_layout
-
-\end_inset
-
- or, if you are using 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-book (AMS)
-\end_layout
-
-\end_inset
-
-, the module 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (Order by Chapter)
-\end_layout
-
-\end_inset
-
-.
- These will number the results as 
-\begin_inset Formula $n.m$
-\end_inset
-
-, where the first number refers to the section (or chapter) and the second
- refers to the total number of results so far in that section (or chapter).
- Many environments are also available unnumbered.
- These are indicated by an asterisk at the end.
- If you happen to want 
-\emph on
-only
-\emph default
- unnumbered results, the module 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (Starred)
-\end_layout
-
-\end_inset
-
- provides that option.
-\end_layout
-
-\begin_layout Standard
-Note that these modules do not 
-\emph on
-have
-\emph default
- to be used with the AMS classes.
- It is perfectly possible to use the 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (AMS)
-\end_layout
-
-\end_inset
-
- module, and the others mentioned, with other classes, such as 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-article
-\end_layout
-
-\end_inset
-
-, 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-report
-\end_layout
-
-\end_inset
-
-, 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-book (KOMA-script)
-\end_layout
-
-\end_inset
-
-, and so forth.
-\end_layout
-
-\begin_layout Subsection
-What these layouts provide
-\end_layout
-
-\begin_layout Standard
-There is a long list of included environments provided by these layouts.
- In AMS-\SpecialChar LaTeX
-, there is, in fact, an opportunity to define an unlimited variety
- of `theorem' environments.
- However, the AMS recommends the environments that are available in \SpecialChar LyX
-.
-\end_layout
-
-\begin_layout Standard
-The following environments—as well as the standard environments, such as
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-section
-\end_layout
-
-\end_inset
-
-, 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-bibliography
-\end_layout
-
-\end_inset
-
-, 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-title
-\end_layout
-
-\end_inset
-
-, 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-author
-\end_layout
-
-\end_inset
-
-, and 
-\begin_inset Flex Noun
-status collapsed
-
-\begin_layout Plain Layout
-date
-\end_layout
-
-\end_inset
-
-—are provided by 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-article (AMS)
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-book (AMS)
-\end_layout
-
-\end_inset
-
-:
-\end_layout
-
-\begin_layout Description
-Address This should be the author's permanent address.
-\end_layout
-
-\begin_layout Description
-Current
-\begin_inset space ~
-\end_inset
-
-Address This should be the author's temporary address at the time of submission,
- if different from the Address.
-\end_layout
-
-\begin_layout Description
-Email Author's e-mail address
-\end_layout
-
-\begin_layout Description
-URL Author's Web address, if desired.
-\end_layout
-
-\begin_layout Description
-Keywords Key words or phrases used to identify specific topics discussed
- in the paper.
-\end_layout
-
-\begin_layout Description
-Subjectclass These refer to the AMS Subject Classifications, published and
- described in 
-\emph on
-Mathematical Reviews
-\emph default
-.
- These are also available online at the AMS cites listed above.
-\end_layout
-
-\begin_layout Description
-Thanks
-\end_layout
-
-\begin_layout Description
-Dedicatory
-\end_layout
-
-\begin_layout Description
-Translator
-\end_layout
-
-\begin_layout Standard
-The following environments are provided by both the 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems
-\end_layout
-
-\end_inset
-
- and 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (AMS)
-\end_layout
-
-\end_inset
-
- modules, in the latter case in both starred (unnumbered) and unstarred
- (numbered) versions.
- These same environments are provided only in the starred versions by the
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (Starred)
-\end_layout
-
-\end_inset
-
- module:
-\end_layout
-
-\begin_layout Theorem
-This is typically used for the statements of major results.
-\end_layout
-
-\begin_layout Corollary*
-This is used for statements which follow fairly directly from previous statement
-s.
- Again, these can be major results.
-\end_layout
-
-\begin_layout Lemma
-These are smaller results needed to prove other statements.
-\end_layout
-
-\begin_layout Proposition
-These are less major results which (hopefully) add to the general theory
- being discussed.
-\end_layout
-
-\begin_layout Conjecture
-These are statements provided without justification, which the author does
- not know how to prove, but which seem to be true (to the author, at least).
-\end_layout
-
-\begin_layout Definition*
-Guess what this is for.
- The font is different for this environment than for the previous ones.
-\end_layout
-
-\begin_layout Example*
-Used for examples illustrating proven results.
-\end_layout
-
-\begin_layout Problem
-It's not really known what this is for.
- You should figure it out.
-\end_layout
-
-\begin_layout Exercise*
-Write a description for this one.
-\end_layout
-
-\begin_layout Remark
-This environment is also a type of theorem, usually a lesser sort of observation.
-\end_layout
-
-\begin_layout Claim*
-Often used in the course of giving a proof of a larger result.
-\end_layout
-
-\begin_layout Case
-Generally, these are used to break up long arguments, using specific instances
- of some condition.
-\end_layout
-
-\begin_layout Case
-The numbering scheme for cases is on its own, not together with other numbered
- statements.
-\end_layout
-
-\begin_layout Proof
-At the end of this environment, a QED symbol (usually a square, but it can
- vary with different styles) is placed.
- If you want to have other environments within this one—for example, Case
- environments—and have the QED symbol appear only after them, then the other
- environments need to be nested within the proof environment.
- See the section 
-\emph on
-Nesting Environments
-\emph default
- of the 
-\emph on
-User's Guide
-\emph default
- for information on nesting.
-\end_layout
-
-\begin_layout Standard
-And these environments are provided by 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Theorems (AMS-Extended)
-\end_layout
-
-\end_inset
-
-:
-\end_layout
-
-\begin_layout Criterion*
-A required condition.
-\end_layout
-
-\begin_layout Algorithm*
-A general procedure to be used.
-\end_layout
-
-\begin_layout Axiom*
-This is a property or statement taken as true within the system being discussed.
-\end_layout
-
-\begin_layout Condition*
-Sometimes used to state a condition assumed within the present context of
- discussion.
-\end_layout
-
-\begin_layout Note*
-Similar to a Remark.
-\end_layout
-
-\begin_layout Notation*
-Used for the explanation of, yes, notation.
-\end_layout
-
-\begin_layout Summary
-Do we really need to tell you? 
-\end_layout
-
-\begin_layout Acknowledgement*
-Acknowledgement.
-\end_layout
-
-\begin_layout Conclusion*
-Sometimes used at the end of a long train of argument.
-\end_layout
-
-\begin_layout Fact
-Used in a way similar to Proposition, though perhaps lower on the scale.
-\end_layout
-
-\begin_layout Standard
-In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
- and AMS fonts
- packages.
- They need to be available on your system in order to use these environments.
-\end_layout
-
 \begin_layout Section
 Broadway
 \end_layout