-\backslash
-aliaspagestyle{title}{empty}
-\family default
-in the preamble.
-\end_layout
-
-\begin_layout Description
-Article: With the class option
-\emph on
-article
-\emph default
-(to be inserted in
-\family sans
-Layout\SpecialChar \menuseparator
-Document\SpecialChar \menuseparator
-Extra\InsetSpace ~
-Options
-\family default
-), you can emulate article style.
- That is, counters (footnotes, figures, tables etc.) will not be reset on
- new chapters, chapters don't start a new page (but are---in contrary to
-
-\begin_inset Quotes eld
-\end_inset
-
-real
-\begin_inset Quotes erd
-\end_inset
-
- article classes---still allowed), parts, though, use their own page, as
- in book.
-\end_layout
-
-\begin_layout Description
-Oldfontcommands: By default, Memoir does not allow the use of the deprecated
- font commands, which have been used in the old LaTeX version 2.09 (e.
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-,
-\end_layout
-
-\end_inset
-
-g.
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-
-\end_layout
-
-\end_inset
-
-
-\family typewriter
-
-\backslash
-rm
-\family default
-,
-\family typewriter
-
-\backslash
-it
-\family default
-).
- It produces an error and stops LaTeX whenever such a command appears.
- The class option
-\emph on
-oldfontcommands
-\emph default
- reallows the commands and spits out warnings instead (which does at least
- not stop LaTeX).
- Since a lot of packages and particularly BibTeX style files are still using
- those commands, we have decided to use this option by default.
-\end_layout
-
-\begin_layout Subsection
-Extra features
-\end_layout
-
-\begin_layout Standard
-We will only describe the features supported by LyX (which is not much currently
-).
- Please consult the Memoir manual
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-Cf.
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-
-\end_layout
-
-\end_inset
-
-
-\begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
-
-\end_inset
-
-.
-\end_layout
-
-\end_inset
-
- for details.
-\end_layout
-
-\begin_layout Description
-Abstract: You may wonder why an abstract is an extra feature.
- Well, it is in book class.
- Usually books don't have abstracts.
- Memoir, however, has.
- You can use it whereever and how often you like.
-\end_layout
-
-\begin_layout Description
-Chapterprecis: You may know this from belletristic: The contents of a chapter
- is shortly described below the title and also in the table of contents
- (e.
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-,
-\end_layout
-
-\end_inset
-
-g.
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-
-\end_layout
-
-\end_inset
-
-
-\emph on
-Our hero arrives in Troia; he loses some friends; he finds others
-\emph default
-).
- Chapterprecis does exactly this.
- It is therefore only sensible below a chapter.
-\end_layout
-
-\begin_layout Description
-Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
- The epigraph environment provides an elegant way of typesetting such a
- motto.
- The motto itself (text) and its author (source) are divided by a short
- line.
- Unfortunately, we have to fool LyX a bit here again, since the environment
- needs two arguments (text and source).
- In this case, we have to use curly brackets (in TeX mode) between the two
- arguments:
-\emph on
-<smart slogan>
-\emph default
-
-\family typewriter
-}{
-\family default
-
-\emph on
-<author of the slogan>.
-\end_layout
-
-\begin_layout Description
-Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
- complex figurative poems).
- Lyx can only support a few of them.
- One is poemtitle, which is a centered title for poems, which will also
- be added to the table of contents (verse is the standard environment for
- poems.
- Memoir has some enhanced versions of verse, but you need to use ERT, because
- they have to be nested inside regular verse environments, which is not
- possible with LyX).
-\end_layout
-
-\begin_layout Description
-Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
-\end_layout
-
-\begin_layout Chapter
-Importing and Exporting Alternate File Formats
-\begin_inset OptArg
-status collapsed
-
-\begin_layout Standard
-Importing and Exporting
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Considerations
-\end_layout
-
-\begin_layout Standard
-Importing and exporting LyX documents from/to other formats has been touched
- on briefly in the
-\emph on
-User Guide
-\emph default
-.
- Here we describe more of the gory details needed to understand just what
- is going on when you click on the
-\family sans
-\bar under
-F
-\bar default
-ile\SpecialChar \menuseparator
-
-\bar under
-I
-\bar default
-mport
-\family default
- and
-\family sans
-\bar under
-F
-\bar default
-ile\SpecialChar \menuseparator
-E
-\bar under
-x
-\bar default
-port
-\family default
- menu items.
-
-\end_layout
-
-\begin_layout Section
-Importing Other Formats
-\end_layout
-
-\begin_layout Subsection
-LaTeX
-\end_layout
-
-\begin_layout Standard
-Translating from LaTeX into LyX is performed by a Perl script called reLyX.
- Although it is a standalone program which can be called from the command
- line, LyX will call it automatically when a LaTeX document is imported.
- See section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sec:reLyX}
-
-\end_inset
-
- for a complete description.
- There are no user tunable parameters for reLyX within LyX.
-\end_layout
-
-\begin_layout Subsection
-ASCII Text
-\end_layout
-
-\begin_layout Standard
-When importing plain ASCII text, there are two methods of reading the file.
- Importing
-\begin_inset Quotes eld
-\end_inset
-
-as lines
-\begin_inset Quotes erd
-\end_inset
-
- preserves all the linebreaks in the ASCII; to LyX, then, each line looks
- like a paragraph.
- Importing
-\begin_inset Quotes eld
-\end_inset
-
-as paragraphs
-\begin_inset Quotes erd
-\end_inset
-
- assumes that consecutive lines separated by only a single linebreak form
- a single paragraph.
- Successive linebreaks with no intervening text are thus assumed to be paragraph
- delimiters.
-\end_layout
-
-\begin_layout Subsection
-Noweb
-\end_layout
-
-\begin_layout Standard
-
-\emph on
-[Editor's note: Needs to be written, obviously - any volunteers? --- mer]
-\end_layout
-
-\begin_layout Section
-Exporting Other Formats
-\end_layout
-
-\begin_layout Subsection
-LaTeX
-\end_layout
-
-\begin_layout Standard
-LyX generates two types of LaTeX files: stripped down versions for the normal
- processing (
-\family sans
-View DVI
-\family default
-, etc.) which one normally never sees
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-The resulting file is a perfectly valid LaTeX file, though the preamble
- might look a bit strange since it includes some definitions used by LyX
- which wouldn't show up in most human-written files.
-\end_layout
-
-\end_inset
-
-, and human readable forms which are suitable for exchanging with your colleague
-s.
- The only settable option for the translation is the line length of the
- output file.
- The default is 65 characters, but it can be set in
-\family sans
-\bar under
-T
-\bar default
-ools
-\family default
-\SpecialChar \menuseparator
-
-\family sans
-\bar under
-P
-\bar default
-references
-\family default
- using the
-\family sans
-\bar under
-A
-\bar default
-scii\InsetSpace ~
-line\InsetSpace ~
-length
-\family default
- field.
-
-\end_layout
-
-\begin_layout Subsection
-Device Independent Files
-\end_layout
-
-\begin_layout Standard
-Device Independent files (DVI files) are produced by running LaTeX on your
- document.
- There are no user settable options.
-\end_layout
-
-\begin_layout Subsection
-PostScript®
-\end_layout
-
-\begin_layout Standard
-The next step in the conversion chain is converting a DVI file into Postscript®.
- You can either use
-\family sans
-\bar under
-F
-\bar default
-ile
-\family default
-\SpecialChar \menuseparator
-
-\family sans
-\bar under
-E
-\bar default
-xport
-\family default
-\SpecialChar \menuseparator
-
-\family sans
-Pos
-\bar under
-t
-\bar default
-script
-\family default
- or, if you need more control on the result,
-\family sans
-\bar under
-F
-\bar default
-ile
-\family default
-\SpecialChar \menuseparator
-
-\family sans
-\bar under
-P
-\bar default
-rint
-\family default
-.
- If you use the later, note that it is possible to configure, in
-\family sans
-\bar under
-T
-\bar default
-ools
-\family default
-\SpecialChar \menuseparator
-
-\family sans
-\bar under
-P
-\bar default
-references
-\family default
-, the options passed to the dvips program to achieve different effects.
-\end_layout
-
-\begin_layout Subsection
-ASCII text
-\end_layout
-
-\begin_layout Standard
-Exporting as ASCII attempts to preserve the
-\begin_inset Quotes eld
-\end_inset
-
-shape
-\begin_inset Quotes erd
-\end_inset
-
- of the document as well as possible, but things like centering and indentation
- are thrown out; paragraphs are separated by blank lines.
- Section numbering and cross-references are done correctly, so the resulting
- text files is remarkably readable.
- The only changeable option is the length of lines, as for LaTeX output.
-\end_layout
-
-\begin_layout Subsection
-HTML
-\end_layout
-
-\begin_layout Standard
-LyX documents can be converted to hypertext markup, usually by converting
- to LaTeX first, then converting that to HTML\SpecialChar \@.
- Four LaTeX
-\begin_inset Formula $\rightarrow$
-\end_inset
-
-HTML converters are currently known to LyX:
-\family typewriter
-tth
-\family default
-,
-\family typewriter
-latex2html
-\family default
-,
-\family typewriter
-hevea
-\family default
- and
-\family typewriter
-htlatex
-\family default
-.
- Though they are autodetected, you can overide the selection in preferences.
- You can also include further command line options in this dialog.
-
-\end_layout
-
-\begin_layout Subsection
-PDF
-\end_layout
-
-\begin_layout Standard
-by
-\noun on
-Dekel Tsur
-\noun default
- (mostly)
-\end_layout
-
-\begin_layout Standard
-\begin_inset VSpace bigskip
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The fastest way to generate a basic PDF file (no tags, links, etc.) with
- any version of LyX is to save the document as a Postscript® file, then
- run the
-\family typewriter
-ps2pdf
-\family default
- command on it.
- Starting with version 1.1.6, the menu item
-\family sans
-File->Export->PDF
-\family default
- will do all this for you.
- There are some issues with fonts that you need to pay attention to: see
- Section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sec:badfonts}
-
-\end_inset
-
-.
- Also, as of version 1.1.6, there is a better method that will generate much
- more sophisticated files.
-\end_layout
-
-\begin_layout Subsubsection
-Use pdfLaTeX
-\end_layout
-
-\begin_layout Standard
-With pdfLaTeX you need to convert your eps figures to PDF (see Section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sec:pdfeps}
-
-\end_inset
-
-), and you cannot use pstricks.
- On the other hand, with pdfLaTeX it is possible to insert directly images
- in JPEG or PNG format, use TrueType fonts, and more.
-\end_layout
-
-\begin_layout Subsubsection
-Why does the text look so bad when viewed with Acrobat Reader?
-\begin_inset LatexCommand \label{sec:badfonts}
-
-\end_inset
-
-
-\begin_inset OptArg
-status collapsed
-
-\begin_layout Standard
-Bad Fonts in Acrobat Reader
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The problem is that bitmap fonts are displayed poorly by Acrobat Reader.
- When creating a PDF from the LyX file, you need to use outline font instead
- of the default bitmap fonts (in fact, you should also use outline fonts
- for Postscript files).
- Recent LaTeX distributions come with Postscript® Type 1 version of the
- standard (Computer Modern) fonts.
- pdfLaTeX uses these font by default.
- Dvips doesn't use these fonts by default, so to make it use them, add the
- following to lines to your
-\family typewriter
-~/.dvipsrc
-\family default
- file
-\end_layout
-
-\begin_layout LyX-Code
-p+ psfonts.cmz
-\end_layout
-
-\begin_layout LyX-Code
-p+ psfonts.amz
-\end_layout
-
-\begin_layout Standard
-If the default LaTeX font encoding (OT1) is used, nothing else need to be
- done.
- However, if the T1 font encoding is used, then LaTeX uses the newer EC
- fonts, for which there are no Type1 version.
- The solution is to use the ae package which emulates T1 coded fonts using
- the standard CM fonts.
- This is done by adding
-\family typewriter
-
-\backslash
-usepackage{ae,aecompl}
-\family default
- to the preamble of the LyX file.
- However, some glyphs are missing from the CM fonts (e.g.
- eth, thorn), and they are taken from the EC fonts.
- Therefore you get these glyphs as bitmaps.
-\end_layout
-
-\begin_layout Standard
-Note: LyX uses by default the T1 font encoding.
- If you wish to use the default font encoding (this is not recommended,
- unless you only write English documents), clear the field
-\family sans
-\bar under
-T
-\bar default
-eX\InsetSpace ~
-encoding
-\family default
- in preferences (tabs
-\family sans
-Outputs
-\family default
-,
-\family sans
-Misc
-\family default
-).
-
-\end_layout
-
-\begin_layout Standard
-An alternate option is to use the standard Postscript® fonts instead of
- the Computer Modern fonts.
- To do that, you need to select
-\family sans
-pslatex
-\family default
- as the global font in the document layout dialog.
- When using the Postscript® fonts, the result PDF file is smaller as the
- fonts are not saved into the file.
- Furthermore, the Postscript® fonts include all T1 glyphs.
- On the other hand, the Postscript® fonts have no bold symbol font, so poor
- man's bold must be used (see Section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sec:pdfbold}
-
-\end_inset
-
-).
- The Postscript® fonts also look different from the Computer Modern fonts.
-\end_layout
-
-\begin_layout Standard
-To sum up, both the Computer Modern and the Postscript® fonts gives good
- results (with few exceptions).
- The decision of which one to use is a matter of taste.
-\end_layout
-
-\begin_layout Subsubsection
-Why doesn't the
-\backslash
-boldsymbol{} command work when I use pslatex?
-\begin_inset LatexCommand \label{sec:pdfbold}
-
-\end_inset
-
-
-\begin_inset OptArg
-status collapsed
-
-\begin_layout Standard
-
-\family typewriter
-
-\backslash
-boldsymbol{}
-\family default
- and
-\family typewriter
-pslatex
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The Postscript® fonts do not have a bold symbol font.
- The solution is to use the
-\family typewriter
-
-\backslash
-pmb{}
-\family default
- (poor man's bold) command.
-\end_layout
-
-\begin_layout Standard
-It is possible to redefine the
-\family typewriter
-
-\backslash
-boldsymbol
-\family default
- command to use
-\family typewriter
-
-\backslash
-pmb
-\family default
- by putting
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-renewcommand{
-\backslash
-boldsymbol}[1]{
-\backslash
-pmb{#1}}
-\end_layout
-
-\begin_layout Standard
-in the preamble.
-\end_layout
-
-\begin_layout Subsubsection
-Is it possible to do write latex code which is processed only when running
- pdfLaTeX?
-\begin_inset OptArg
-status collapsed
-
-\begin_layout Standard
-Conditionals with pdfLaTeX
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Yes.
- Here is an example:
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-newif
-\backslash
-ifpdf
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-ifx
-\backslash
-pdfoutput
-\backslash
-undefined
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-pdffalse
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-else
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-pdftrue
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-fi
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-ifpdf
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-pdfinfo { /Author (your name and e-mail address)
-\end_layout
-
-\begin_layout LyX-Code
- /Title (official title -- i.e., title element)
-\end_layout
-
-\begin_layout LyX-Code
- /Subject (one line description of the document)
-\end_layout
-
-\begin_layout LyX-Code
- }
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-pdfcatalog { /PageMode (/UseNone)
-\end_layout
-
-\begin_layout LyX-Code
- % /OpenAction (fitbh)
-\end_layout
-
-\begin_layout LyX-Code
- }
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-usepackage[pdftex]{hyperref}
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-else
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-usepackage[ps2pdf]{hyperref}
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-fi
-\end_layout
-
-\begin_layout Subsubsection
-How can I make URLs clickable ?
-\end_layout
-
-\begin_layout Standard
-See the references here :
-\end_layout
-
-\begin_layout Standard
-\begin_inset LatexCommand \url{http://wiki.lyx.org/pmwiki.php/FAQ/PDF}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Custom
-\end_layout
-
-\begin_layout Standard
-Custom exports are possible if you have some particularly weird format you
- wish to convert to, assuming you have the relevant converter, of course.
- The format of the
-\emph on
-input
-\emph default
- file can be chosen in the
-\family sans
-\bar under
-F
-\bar default
-ile\SpecialChar \menuseparator
-
-\bar under
-E
-\bar default
-xport\SpecialChar \menuseparator
-
-\bar under
-C
-\bar default
-ustom
-\family default
-dialog; LyX will automatically convert the file to this point, then feed
- it to your custom converter.
- The possible values are all formats that LyX can produce from its own documents.
-
-\end_layout
-
-\begin_layout Standard
-The converter command is also specified in the dialog.It should be a completely
- qualified command line which uses the variable
-\family typewriter
-$$FName
-\family default
- to specify the name of the file.
- If this variable is not given, then the file will be sent to the standard
- input of your command.
- You may have to apply a bit of ingenuity to escape this sequence correctly
- so that it is compatible with your shell.
-
-\end_layout
-
-\begin_layout Standard
-While it is not possible to save this command using the
-\family sans
-Preferences
-\family default
-dialog, you can manually edit your
-\family typewriter
-.lyx/preferences
-\family default
- to add a line like
-\end_layout
-
-\begin_layout LyX-Code
-
-\backslash
-custom_export_command "mycommand $$FName"
-\end_layout
-
-\begin_layout Section
-The Complete reLyX Description
-\begin_inset LatexCommand \label{sec:reLyX}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Synopsis
-\end_layout
-
-\begin_layout Standard
-The simplest way to use reLyX is via the
-\family sans
-\bar under
-F
-\bar default
-ile\SpecialChar \menuseparator
-
-\bar under
-I
-\bar default
-mport
-\family default
- command in LyX.
- That runs reLyX on the given file and loads the resulting file into LyX.
- You should try that first, and call it from the command line only if you
- need to use more complicated options.
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-reLyX
-\series default
- [
-\series bold
--c
-\series default
-
-\shape italic
-textclass
-\shape default
- ] [
-\series bold
--df
-\series default
- ] [
-\series bold
--o
-\series default
-
-\shape italic
-outputdir
-\shape default
- ] [
-\series bold
- -r
-\series default
-\shape italic
- renv1
-\shape default
-[,
-\shape italic
-renv2
-\shape default
-...]] [
-\series bold
- -s
-\series default
-\shape italic
- sfile1
-\shape default
-[,
-\shape italic
-sfile2
-\shape default
-...]]
-\emph on
-inputfile
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-reLyX
-\series default
-
-\series bold
--p
-\series default
-
-\series bold
--c
-\series default
-
-\shape italic
-textclass
-\shape default
- [
-\series bold
--df
-\series default
- ] [
-\series bold
--o
-\series default
-
-\shape italic
-outputdir
-\shape default
- ] [
-\series bold
- -r
-\series default
-\shape italic
- renv1
-\shape default
-[,
-\shape italic
-renv2
-\shape default
-...]] [
-\series bold
- -s
-\series default
-\shape italic
- sfile1
-\shape default
-[,
-\shape italic
-sfile2
-\shape default
-...]]
-\emph on
-inputfiles
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-reLyX
-\series default
-
-\series bold
--h
-\end_layout
-
-\begin_layout Subsection
-Options
-\end_layout
-
-\begin_layout Description
-
-\series bold
--c
-\series default
- Class.
- By default, when reLyX sees a
-\family typewriter
-
-\backslash
-documentclass{foo}
-\family default
- command, it creates a file of textclass
-\begin_inset Quotes eld
-\end_inset
-
-foo
-\begin_inset Quotes erd
-\end_inset
-
- and reads the LyX layout file for that class.
- Use
-\series bold
--c
-\series default
- to declare a different textclass (and read a different layout file).
-\end_layout
-
-\begin_layout Description
-
-\series bold
--d
-\series default
- Debug.
- By default, reLyX gives sparse output and deletes the temporary files which
- were created during translation.
- Using the
-\series bold
--d
-\series default
- flag will create much more output (both to stdout and stderr) and leave
- the temporary files around.
-\end_layout
-
-\begin_layout Description
-
-\series bold
--f
-\series default
- Force.
- reLyX will not run if the
-\family typewriter
-.lyx
-\family default
- file it would generate already exists Use the
-\series bold
--f
-\series default
- option (carefully) to clobber any existing files.
-\end_layout
-
-\begin_layout Description
-
-\series bold
--h
-\series default
- Help.
- Print out usage information and quit
-\end_layout
-
-\begin_layout Description
-
-\series bold
--o
-\series default
- Output directory.
- With this option, all temporary files and LyX output files (for the given
- input file, for any included files, or for any file fragments given with
- the
-\series bold
--p
-\series default
- option) will be put into
-\shape italic
-outputdir
-\shape default
-.
- Otherwise, for each file
-\emph on
-dir/foo.tex
-\emph default
-, the temporary files and the LyX output file will be created in
-\emph on
-dir
-\emph default
-.
- This can be useful if a file includes files from other directories which
- you want to consolidate in one directory, or if you don't have write permission
- on the directory the LaTeX files are in.
-\end_layout
-
-\begin_layout Description
-
-\series bold
--p
-\series default
- Partial file.
- The input files are LaTeX fragments, with no preamble matter or
-\family typewriter
-
-\backslash
-begin{document}
-\family default
- commands.
- This option requires the
-\series bold
--c
-\series default
- option, since there are no
-\family typewriter
-
-\backslash
-documentclass
-\family default
- commands in the files reLyX is translating.
- When using this option, you can translate more than one file, as long as
- all files are the same class.
- The LyX file created by reLyX can be included in an existing LyX file using
-
-\family sans
-\bar under
-I
-\bar default
-nsert\SpecialChar \menuseparator
-Fil
-\bar under
-e
-\bar default
-\SpecialChar \menuseparator
-Ly
-\bar under
-X
-\bar default
-\InsetSpace ~
-Document
-\family default
-.
-\end_layout
-
-\begin_layout Description
-
-\series bold
--r
-\series default
- Regular environments (see the Section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sub:relyx-syntax}
-
-\end_inset
-
-).
- If you give more than one environment, separate them with commas (not
- spaces).
- You'll probably need to quote the environment list, especially if it has
- asterisk environments (foo*) in it.
- If you use this command often, considering creating a personal syntax file.
-\end_layout
-
-\begin_layout Description
-
-\series bold
--s
-\series default
- Syntax files.
- Input (one or more quoted, comma-separated) syntax files to read in addition
- to the default.
- (see the section Section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sub:relyx-syntax}
-
-\end_inset
-
- for details).
-\end_layout
-
-\begin_layout Subsection
-Description
-\end_layout
-
-\begin_layout Subsubsection
-Introduction
-\end_layout
-
-\begin_layout Standard
-reLyX will create a LyX file
-\emph on
-dir/foo.lyx
-\emph default
- from the LaTeX file
-\emph on
-dir/foo.tex
-\emph default
- (unless the
-\series bold
--o
-\series default
- option is used).
-\end_layout
-
-\begin_layout Standard
-Suffixes
-\family typewriter
-.tex
-\family default
-,
-\family typewriter
-.ltx
-\family default
- and
-\family typewriter
-.latex
-\family default
- are supported.
- If
-\emph on
-inputfile
-\emph default
- does not exist and does not have one of these suffixes, reLyX will try
- to translate
-\emph on
-inputfile.tex
-\emph default
-.
- (This is similar to the behavior of LaTeX.)
-\end_layout
-
-\begin_layout Standard
-The purpose of reLyX is to translate
-\shape italic
-well-behaved
-\shape default
- LaTeX2e into LyX.
- If your LaTeX file doesn't compile---or if you do weird things, like redefining
- standard LaTeX commands---it may choke.
- LaTeX209 will often be translated correctly, but it's not guaranteed.
-\end_layout
-
-\begin_layout Standard
-reLyX has some bugs and lacks a few features.
- However, its main goals are:
-\end_layout
-
-\begin_layout Itemize
-Get through a well-behaved LaTeX2e file without crashing
-\end_layout
-
-\begin_layout Itemize
-Translate a lot of that file.
-\end_layout
-
-\begin_layout Itemize
-Localize the parts that can't be translated and copy them in TeX mode
-\end_layout
-
-\begin_layout Standard
-It achieves these main goals pretty well on most files.
-\end_layout
-
-\begin_layout Standard
-There are many improvements that can and will be made to reLyX in the future.
- However, we wanted to get reLyX out there early on, to make it easier for
- new LyX users to read in their existing LaTeX files.
-\end_layout
-
-\begin_layout Subsubsection
-Usage
-\end_layout
-
-\begin_layout Standard
-Here's a more lengthy description of what you should do to translate a LaTeX
- document into LyX.
-\end_layout
-
-\begin_layout Itemize
-Run reLyX.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-reLyX will inform you of its progress and give any warnings to stderr, so
- if you don't want any output at all, try (in csh)
-\begin_inset Quotes eld
-\end_inset
-
-
-\family typewriter
-reLyX foo.tex >& /dev/null
-\family default
-
-\begin_inset Quotes erd
-\end_inset
-
- or (in bash)
-\begin_inset Quotes eld
-\end_inset
-
-
-\family typewriter
-reLyX foo.tex
-\family default
-
-\family typewriter
-2>&1 >/dev/null
-\family default
-
-\begin_inset Quotes erd
-\end_inset
-
-.
- You should NOT redirect standard output to
-\family typewriter
-foo.lyx
-\family default
-.
-
-\end_layout
-
-\end_deeper
-\begin_layout Itemize
-Run LyX on the resulting .lyx file.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-In theory, most of the file will have been translated, and anything that's
- untranslatable will be highlighted in red (TeX mode).
- In theory, LyX will be able to read in the file, and to create printed
- documents from it, because all that untranslated red stuff will be passed
- directly back to LaTeX, which LyX uses as a backend.
- Unfortunately, reality doesn't always reflect theory.
- If reLyX crashes, or LyX cannot read the generated LyX file, see Section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sub:relyx-bugs}
-
-\end_inset
-
- or the
-\family typewriter
-BUGS
-\family default
- file.
-\end_layout
-
-\end_deeper
-\begin_layout Itemize
-Change things that are in ERT boxes (TeX code) by hand in LyX.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-As mentioned above, you should be able to print out the LyX file even without
- doing this.
- However, changing a command in TeX mode to the corresponding LyX object
- will allow you to take advantage of LyX's WYSIWYM editing.
-\end_layout
-
-\begin_layout Standard
-reLyX is not guaranteed to create a LyX file which generates exactly the
- same output as the LaTeX file, but it should come close.
- reLyX will generally err on the side of translating less to ensure that
- dvi or ps files are accurate, even though this leads to more
-\begin_inset Quotes eld
-\end_inset
-
-evil red text
-\begin_inset Quotes erd
-\end_inset
-
- and less WYSIWYM.
-\end_layout
-
-\end_deeper
-\begin_layout Itemize
-PROOFREAD THE DOCUMENT!!
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-I'm sure you were planning on doing this anyway, but it's particularly important
- after translating a LaTeX document.
- reLyX is, at least now, better at
-\begin_inset Quotes eld
-\end_inset
-
-macro-translating
-\begin_inset Quotes erd
-\end_inset
-
- (translating the whole document) than
-\begin_inset Quotes eld
-\end_inset
-
-micro-translating
-\begin_inset Quotes erd
-\end_inset
-
- (translating every little detail).
- For example, you may see extra spaces or deleted spaces.
- Space handling has improved, but it's not perfect.
-\end_layout
-
-\end_deeper
-\begin_layout Subsubsection
-What reLyX Can Handle
-\end_layout
-
-\begin_layout Standard
-reLyX understands many LaTeX commands.
- It will translate:
-\end_layout
-
-\begin_layout Itemize
-regular text, including mini-commands like ~, '',
-\family typewriter
-
-\backslash
-@
-\family default
-,
-\family typewriter
-
-\backslash
-TeX
-\family default
-, as well as accented characters like
-\family typewriter
-
-\backslash
-'{a}
-\family default
-, and the special cases ?` and !`
-\end_layout
-
-\begin_layout Itemize
-title commands like
-\family typewriter
-
-\backslash
-author
-\family default
-,
-\family typewriter
-
-\backslash
-date
-\family default
-,
-\family typewriter
-
-\backslash
-title
-\family default
-,
-\family typewriter
-
-\backslash
-thanks
-\family default
- and the abstract environment
-\end_layout
-
-\begin_layout Itemize
-heading commands like
-\family typewriter
-
-\backslash
-section
-\family default
- including starred commands (
-\family typewriter
-
-\backslash
-section*
-\family default
-)
-\end_layout
-
-\begin_layout Itemize
-Environments:
-\family typewriter
-quote
-\family default
-,
-\family typewriter
-quotation
-\family default
-, and
-\family typewriter
-verse
-\family default
-;
-\family typewriter
-center
-\family default
-,
-\family typewriter
-flushright
-\family default
-, and
-\family typewriter
-flushleft
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-itemize
-\family default
-,
-\family typewriter
-enumerate
-\family default
-, and
-\family typewriter
-description
-\family default
- environments, and their
-\family typewriter
-
-\backslash
-item
-\family default
- commands.
- Also, well-behaved nested lists
-\end_layout
-
-\begin_layout Itemize
-cross-referencing commands:
-\family typewriter
-
-\backslash
-ref
-\family default
-,
-\family typewriter
-
-\backslash
-pageref
-\family default
-,
-\family typewriter
-
-\backslash
-label
-\family default
-, and
-\family typewriter
-
-\backslash
-cite
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-
-\backslash
-footnote
-\family default
- and
-\family typewriter
-
-\backslash
-margin
-\end_layout
-
-\begin_layout Itemize
-font-changing commands including
-\family typewriter
-
-\backslash
-em
-\family default
-,
-\family typewriter
-
-\backslash
-emph
-\family default
-,
-\family typewriter
-
-\backslash
-textit
-\family default
-, and corresponding commands to change family, size, series, and shape
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-
-\backslash
-input{foo}
-\family default
- (or
-\family typewriter
-
-\backslash
-input{foo.blah}
-\family default
-) and
-\family typewriter
-
-\backslash
-include{foo}
-\family default
-.
- Plain TeX
-\family typewriter
-
-\backslash
-input
-\family default
- command
-\begin_inset Quotes erd
-\end_inset
-
-
-\family typewriter
-
-\backslash
-input foo.tex
-\family default
-
-\begin_inset Quotes erd
-\end_inset
-
- is also supported.
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-tabular
-\family default
- environment, and commands that go inside it like
-\family typewriter
-
-\backslash
-hline
-\family default
-,
-\family typewriter
-
-\backslash
-cline
-\family default
-, and
-\family typewriter
-
-\backslash
-multicolumn
-\family default
- (but see below)
-\end_layout
-
-\begin_layout Itemize
-float environments
-\family typewriter
-table
-\family default
- and
-\family typewriter
-table*
-\family default
-, as well as
-\family typewriter
-
-\backslash
-caption
-\family default
- commands within them
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-thebibliography
-\family default
- environment and
-\family typewriter
-
-\backslash
-bibitem
-\family default
- command, as well as BibTeX's
-\family typewriter
-
-\backslash
-bibliography
-\family default
- and
-\family typewriter
-
-\backslash
-bibliographystyle
-\family default
- commands
-\end_layout
-
-\begin_layout Itemize
-miscellaneous commands:
-\family typewriter
-
-\backslash
-hfill
-\family default
-,
-\family typewriter
-
-\backslash
-
-\backslash
-
-\family default
-,
-\family typewriter
-
-\backslash
-noindent
-\family default
-,
-\family typewriter
-
-\backslash
-ldots
-\family default
-...
-\end_layout
-
-\begin_layout Itemize
-documentclass-specific environments (and some commands) which can be translated
- to LyX layouts
-\end_layout
-
-\begin_layout Itemize
-arguments to certain untranslatable commands (e.g.
-
-\family typewriter
-
-\backslash
-mbox
-\family default
-)
-\end_layout
-
-\begin_layout Standard
-Some of this support may not be 100% yet.
- See below for details
-\end_layout
-
-\begin_layout Standard
-reLyX copies math (almost) verbatim from your LaTeX file.
- Luckily, LyX reads in LaTeX math, so (almost) any math which is supported
- by LyX should work just fine.
- A few math commands which are not supported by LyX will be replaced with
- their equivalents, e.g.,
-\family typewriter
-
-\backslash
-to
-\family default
- is converted to
-\family typewriter
-
-\backslash
-rightarrow
-\family default
-.
- See the section on
-\shape italic
-Syntax Files
-\shape default
- for more details.
-\end_layout
-
-\begin_layout Standard
-reLyX will also copy any preamble commands (i.e., anything before
-\family typewriter
-
-\backslash
-begin{document}
-\family default
-) verbatim, so fancy stuff you've got in your preamble should be conserved
- in dvi and printed documents, although it will not of course show up in
- the LyX window.
- Check the preamble to make sure.
-\end_layout
-
-\begin_layout Subsubsection
-What reLyX Can't Handle --- But it's OK
-\end_layout
-
-\begin_layout Itemize
-figures and
-\family typewriter
-tabular*
-\family default
- tables
-\end_layout
-
-\begin_layout Itemize
-minipages
-\end_layout
-
-\begin_layout Itemize
-spacing commands (
-\family typewriter
-
-\backslash
-vspace
-\family default
-,
-\family typewriter
-
-\backslash
-pagebreak
-\family default
-,
-\family typewriter
-
-\backslash
-par
-\family default
-)
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-
-\backslash
-centering
-\family default
-,
-\family typewriter
-
-\backslash
-raggedleft
-\family default
-,
-\family typewriter
-
-\backslash
-raggedright
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-
-\backslash
-verb
-\family default
- and
-\family typewriter
-verbatim
-\family default
- environment.
- reLyX is careful to copy
-\shape italic
-exactly
-\shape default
- in this case, including comments and whitespace.
-\end_layout
-
-\begin_layout Itemize
-some unknown (e.g., user-defined) environments and commands
-\end_layout
-
-\begin_layout Standard
-reLyX copies unknown commands, along with their arguments, verbatim into
- the LyX file.
- Also, if it sees a
-\family typewriter
-
-\backslash
-begin{foo}
-\family default
- where it doesn't recognize the
-\begin_inset Quotes eld
-\end_inset
-
-foo
-\begin_inset Quotes erd
-\end_inset
-
- environment, it will copy verbatim until it sees
-\family typewriter
-
-\backslash
-end{foo}
-\family default
- (unless you use the
-\series bold
--r
-\series default
- option).
- Hopefully, then, most of these unknown commands won't cause reLyX to break;
- they'll merely require you to do some editing once you've loaded the file
- up in LyX.
- That should be less painful than editing either the
-\family typewriter
-.tex
-\family default
- or the
-\family typewriter
-.lyx
-\family default
- file using a text editor.
-\end_layout
-
-\begin_layout Subsubsection
-What reLyX Handles Badly --- a.\InsetSpace ~
-k.\InsetSpace ~
-a.
- BUGS
-\begin_inset LatexCommand \label{sub:relyx-bugs}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Since reLyX is relatively new, it's got a number of problems.
- As it matures, these bugs will be squished.
- A number of bugs and missing features can be found listed on the LyX bug
- tracker,
-\begin_inset LatexCommand \url[LyX Bugzilla]{http://bugzilla.lyx.org/}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-If reLyX is choking on something, or LyX can't read it after reLyX translates
- it, the best thing to do is to put
-\family typewriter
-
-\backslash
-begin{reLyXskip}
-\family default
- before the offending text, and
-\family typewriter
-
-\backslash
-end{reLyXskip}
-\family default
- after it.
- I call this a
-\begin_inset Quotes eld
-\end_inset
-
-skip
-\begin_inset Quotes erd
-\end_inset
-
- block.
- reLyX will copy this block exactly, in TeX mode.
- Then edit the resulting LyX file, and translate the unknown stuff by hand.
- The
-\family typewriter
-reLyXskip
-\family default
- environment is magical; the
-\family typewriter
-
-\backslash
-begin
-\family default
- and
-\family typewriter
-
-\backslash
-end
-\family default
- commands will not be put into the LyX file.
-\end_layout
-
-\begin_layout Itemize
-\begin_inset Quotes eld
-\end_inset
-
-Exact
-\begin_inset Quotes erd
-\end_inset
-
- copying of unknown environments and commands isn't quite exact.
- Specifically, newlines and comments may be lost.
- This will yield ugly LyX, but in almost all cases the output will be the
- same.
- However, certain parts of the file will be copied perfectly, including
- whitespace and comments.
- This includes: the LaTeX preamble,
-\family typewriter
-verbatim
-\family default
- environments and
-\family typewriter
-
-\backslash
-verb
-\family default
- commands, and skip blocks.
-\end_layout
-
-\begin_layout Itemize
-reLyX translates only a few options to the
-\family typewriter
-
-\backslash
-documentclass
-\family default
- command.
- (Specifically 1[012]pt, [letter|legal|executive|a4|a5|b5]paper, [one|two]side,
- landscape, and [one|two]column.) Other options are placed in the extra class
- options field in the
-\family sans
-\bar under
-D
-\bar default
-ocument\SpecialChar \menuseparator
-
-\bar under
-S
-\bar default
-ettings
-\family default
- dialog.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-More importantly, reLyX doesn't translate
-\family typewriter
-
-\backslash
-usepackage
-\family default
- commands, margin commands,
-\family typewriter
-
-\backslash
-newcommand
-\family default
-s, or, in fact, anything else from the preamble.
- It simply copies them into the LaTeX preamble.
- If you have margin commands in your preamble, then the LyX file will generate
- the right margins.
- However, these margins will override any margins you set in the LyX
-\family sans
-\bar under
-D
-\bar default
-ocument
-\bar under
-\SpecialChar \menuseparator
-S
-\bar default
-ettings
-\family default
- dialog.
- So you should remove the options from the preamble to be safe.
- The same goes for setting your language with babel,
-\family typewriter
-
-\backslash
-inputencoding
-\family default
-,
-\family typewriter
-
-\backslash
-pagestyle
-\family default
-, etc.
-\end_layout
-
-\end_deeper
-\begin_layout Itemize
-The foil class has a couple bugs.
- reLyX may do weird things with optional arguments to
-\family typewriter
-
-\backslash
-foilhead
-\family default
- commands.
- Also, it may handle
-\family typewriter
-
-\backslash
-begin{dinglist}
-\family default
- incorrectly (although the stuff in the environment should translate normally).
-\end_layout
-
-\begin_layout Standard
-reLyX is hopefully rather robust.
- As mentioned above, it may not translate your file perfectly, but it shouldn't
- crash.
- If it does crash---and the problem is not one of those mentioned above
- or in the
-\emph on
-BUGS
-\emph default
- file---see Section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sub:relyx-bug-reports}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Subsubsection
-What LyX Can't Handle
-\end_layout
-
-\begin_layout Standard
-LyX itself is missing a couple features, such that even if reLyX translates
- things perfectly, LyX may still have trouble reading it.
- If you really need these features, you can export your final document as
- LaTeX, and put them back in.
- See
-\emph on
-BUGS
-\emph default
- for more details on these bugs.
-\end_layout
-
-\begin_layout Itemize
-For a number of commands, LyX does not support the optional argument.
- Examples include
-\family typewriter
-
-\backslash
-sqrt
-\family default
-,
-\family typewriter
-
-\backslash
-chapter
-\family default
- (and other sectioning commands), and
-\family typewriter
-
-\backslash
-
-\backslash
-
-\family default
-.
- reLyX will automatically discard the optional arguments with a warning
- to stdout.
- LyX also ignores the width argument for the
-\family typewriter
-thebibliography
-\family default
- environment.
-\end_layout
-
-\begin_layout Itemize
-Centering (or right or left justifying) works on full paragraphs.
-\end_layout
-
-\begin_layout Itemize
-LyX support for tables isn't perfect.
- For complicated tables, use a
-\begin_inset Quotes eld
-\end_inset
-
-skip
-\begin_inset Quotes erd
-\end_inset
-
- block, so that they will be copied in TeX mode.
-\end_layout
-
-\begin_layout Itemize
-The LyX math editor can't handle the AMS-LaTeX math environments align,
- split, etc.
- So those environments will be copied in TeX mode.
- You can change
-\family typewriter
-equation*
-\family default
- environments to the exactly equivalent displaymath, and then they will
- be translated correctly.
-\end_layout
-
-\begin_layout Subsection
-Examples
-\end_layout
-
-\begin_layout Standard
-
-\family typewriter
-reLyX -df -o
-\begin_inset Quotes eld
-\end_inset
-
-my/dir
-\begin_inset Quotes erd
-\end_inset
-
- -r
-\begin_inset Quotes eld
-\end_inset
-
-myenv
-\begin_inset Quotes erd
-\end_inset
-
- foo.tex > foo.debug
-\end_layout
-
-\begin_layout Standard
-The above will create a file my/dir/foo.lyx from foo.tex, overwriting if necessary.
- When it finds a
-\family typewriter
-
-\backslash
-begin{myenv} ...
-
-\backslash
-end{myenv}
-\family default
- block, it will translate the stuff within the block, but copy the
-\family typewriter
-
-\backslash
-begin
-\family default
- and
-\family typewriter
-
-\backslash
-end
-\family default
- commands in TeX mode.
- Finally, I'm going to keep the temporary files around (they will also
- be in my/dir/) and output lots of debugging information into the file foo.debug.
-\end_layout
-
-\begin_layout Subsection
-Notes
-\end_layout
-
-\begin_layout Subsubsection
-Bug Reports
-\begin_inset LatexCommand \label{sub:relyx-bug-reports}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-If reLyX is crashing or otherwise acting strangely---in ways other than
- those described in Section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sub:relyx-bugs}
-
-\end_inset
-
- or the bug tracker---then please run reLyX
-\series bold
- -d
-\series default
-.
- That will allow you to figure out where in the reLyXing process it crashed.
- That, in turn, will allow you to write a better bug report, which will
- allow the developers to fix it more quickly and easily.
-\end_layout
-
-\begin_layout Standard
-Bug reports should be sent to the LyX developers' mailing list.
- Its address is currently
-\family typewriter
-lyx-devel@lists.lyx.org
-\family default
-.
- If you are running reLyX on a huge file, please do not send all of the
- output in your bug report.
- Just include the last ten or twenty lines of output, along with the piece
- of the LaTeX file it crashed on.
- Or, even better, attach a small but complete file which causes the same
- problem as your original file.
-\end_layout
-
-\begin_layout Subsubsection
-Implementation Details:
-\end_layout
-
-\begin_layout Standard
-reLyX makes several
-\begin_inset Quotes eld
-\end_inset
-
-passes
-\begin_inset Quotes erd
-\end_inset
-
- in order to translate a TeX file.
- On each pass, it creates one or two files.
-\end_layout
-
-\begin_layout Description
-Pass\InsetSpace ~
-0 \InsetSpace ~
-
-\newline
-Before doing anything, read the syntax file (or files).
-\end_layout
-
-\begin_layout Description
-Pass\InsetSpace ~
-1a \InsetSpace ~
-
-\newline
-Split preamble (anything before a
-\family typewriter
-
-\backslash
-begin{document}
-\family default
- command) off the rest of the file.
- It saves the two pieces in separate files.
- This is necessary because there may be very strange stuff in a preamble.
- It also ignores anything after the
-\family typewriter
-
-\backslash
-end{document}
-\family default
-, on the assumption that it isn't LaTeX.
-\end_layout
-
-\begin_layout Description
-Pass\InsetSpace ~
-1b \InsetSpace ~
-
-\newline
-Translate the preamble.
- Currently, that just means translating the
-\family typewriter
-
-\backslash
-documentclass
-\family default
- command and copying the rest exactly into the LyX preamble.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-Once you know what class the document is, read the LyX layout file for that
- class.
-\end_layout
-
-\end_deeper
-\begin_layout Description
-Pass\InsetSpace ~
-2 \InsetSpace ~
-
-\newline
-
-\begin_inset Quotes eld
-\end_inset
-
-Clean
-\begin_inset Quotes erd
-\end_inset
-
- the TeX file, generating slightly stricter LaTeX.
- This includes:
-\end_layout
-
-\begin_deeper
-\begin_layout Itemize
-Change, e.g.,
-\family typewriter
-x^2
-\family default
- to the equivalent but clearer
-\family typewriter
-x^{2}
-\end_layout
-
-\begin_layout Itemize
-Removing optional arguments that LyX can't handle (e.g., from
-\family typewriter
-
-\backslash
-sqrt
-\family default
-)
-\end_layout
-
-\begin_layout Itemize
-Changing
-\family typewriter
-{
-\backslash
-em foo}
-\family default
- to
-\family typewriter
-
-\backslash
-emph{foo}
-\family default
-, etc.
- This is necessary because LyX always writes out the non-local forms anyway.
- This should very rarely make a difference.
-\end_layout
-
-\end_deeper
-\begin_layout Description
-Pass\InsetSpace ~
-3 \InsetSpace ~
-
-\newline
-Translate LaTeX text, commands, and environments to LyX.
-\end_layout
-
-\begin_layout Description
-Pass\InsetSpace ~
-4 \InsetSpace ~
-
-\newline
-Put the two pieces back together, and do some final tweaking, to generate
- the LyX file
-\end_layout
-
-\begin_layout Standard
-If there are any
-\family typewriter
-
-\backslash
-input
-\family default
- or
-\family typewriter
-
-\backslash
-include
-\family default
- commands, reLyX will loop back to the beginning and translate those.
- It assumes that the included files are the same class as the main file,
- and that they have no preamble matter.
- (If you have an
-\family typewriter
-
-\backslash
-input
-\family default
- command in the preamble of a file, the command will be copied exactly into
- the LaTeX preamble portion of the LyX file, so the included file won't
- be translated.) So when translating included files, it skips passes 0 and
- 1.
-\end_layout
-
-\begin_layout Standard
-If reLyX doesn't find a file you wanted to include, it will give a warning,
- but will continue to translate any files it does find.
-\end_layout
-
-\begin_layout Subsubsection
-Layout Files
-\end_layout
-
-\begin_layout Standard
-reLyX reads a LyX layout file to know how to handle LaTeX environments and
- commands which get translated to LyX layouts.
- This file will include all
-\begin_inset Quotes eld
-\end_inset
-
-normal
-\begin_inset Quotes erd
-\end_inset
-
- non-math environments (i.e., including quote and itemize, but not tabular,
- minipage, and some other fancy environments), and commands like
-\family typewriter
-
-\backslash
-section
-\family default
- and
-\family typewriter
-
-\backslash
-title
-\family default
-.
- If you want to reLyX a class that doesn't have an existing layout file,
- then you'll have to create a layout file.
- But you have to do this anyway, in order to LyX the file, since LyX depends
- on layout files to know how to display and process its files.
- Check the LyX documentation for help with this task (which can be hard
- or easy, depending on the class you want to create a layout file for.) If
- your class is quite similar to a class that has a layout file, then consider
- using the
-\series bold
--c
-\series default
- option.
-\end_layout
-
-\begin_layout Subsubsection
-Syntax Files
-\begin_inset LatexCommand \label{sub:relyx-syntax}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-reLyX always reads at least one syntax file, called the default syntax file.
- reLyX will read your personal syntax file if it exists; otherwise it will
- read the system-wide file.
- reLyX will read additional syntax files if you specify them with the
-\series bold
--s
-\series default
- option.
- (These extra files should have the same format as the default file, but
- will tend to be shorter, since they only have to specify extra commands
- not found in the default file.) A syntax file tells reLyX a few things.
-\end_layout
-
-\begin_layout Standard
-First, it describes the syntax of each command, that is, how many required
- arguments and how many optional arguments the command takes.
- Knowing this makes it easier for reLyX to copy (in TeX mode) commands that
- it doesn't know how to translate.
- The syntax file simply has a command, followed by braces or brackets describing
- its arguments in the correct order.
- For example, a syntax file entry
-\family typewriter
-
-\backslash
-bibitem[]{}
-\family default
- means that the
-\family typewriter
-
-\backslash
-bibitem
-\family default
- command takes an optional argument followed by a required one, while the
- entry
-\family typewriter
-
-\backslash
-bf
-\family default
- means that the
-\family typewriter
-
-\backslash
-bf
-\family default
- command takes no arguments at all.
- When reLyX encounters a token that it doesn't know how to translate into
- LyX, it will copy the token---along with the correct number of arguments---exac
-tly.
- If the token is not in the syntax file, then reLyX just copies as many
- arguments as it finds.
- This means that it may copy too much.
- But since the user can specify additional syntax files, that shouldn't
- happen often.
-\end_layout
-
-\begin_layout Standard
-Some commands that cannot be translated to LyX, like
-\family typewriter
-
-\backslash
-mbox
-\family default
-, have as one of their arguments regular LaTeX text.
- If the string
-\begin_inset Quotes eld
-\end_inset
-
-translate
-\begin_inset Quotes erd
-\end_inset
-
- is put into an argument of an (untranslatable) command in the syntax file,
- then reLyX will translate that argument instead of copying it verbatim.
- So, for example, the default syntax file has
-\family typewriter
-
-\backslash
-raisebox{}[][]{translate}
-\family default
-.
- This means that the
-\family typewriter
-
-\backslash
-raisebox
-\family default
- command and the first argument (and optional arguments if they exist) are
- copied in TeX mode, but the last argument (which may contain math, complicated
- LaTeX, other untranslatable commands, etc.) will be translated into LyX.
- You can't use
-\begin_inset Quotes eld
-\end_inset
-
-translate
-\begin_inset Quotes erd
-\end_inset
-
- on optional arguments.
-\end_layout
-
-\begin_layout Standard
-User-defined syntax files are allowed to define new commands and their syntax,
- or override the number of arguments for a command given in the default
- syntax file.
- (E.g., if you're using a style that gives an extra argument to some command...)
- However, this will only be useful for commands copied in TeX mode.
- Commands which are actually translated by reLyX (like
-\family typewriter
-
-\backslash
-item
-\family default
-) have their argument syntax hard-coded.
- The hard-coded commands are identified in the default syntax file.
-\end_layout
-
-\begin_layout Standard
-Second, the syntax file describes any
-\begin_inset Quotes eld
-\end_inset
-
-regular environments
-\begin_inset Quotes erd
-\end_inset
-
-.
- Usually, an entire unknown environment will be copied in TeX mode.
- If you define a regular environment
-\begin_inset Quotes eld
-\end_inset
-
-foo
-\begin_inset Quotes erd
-\end_inset
-
-, though, then only the
-\family typewriter
-
-\backslash
-begin{foo}
-\family default
- and
-\family typewriter
-
-\backslash
-end{foo}
-\family default
- commands will be copied in TeX mode; the text within the environment will
- be treated (i.e., translated) by reLyX as regular LaTeX, rather than being
- copied into TeX mode.
- Don't try to declare
-\family typewriter
-tabbing
-\family default
- and
-\family typewriter
-picture
-\family default
- as regular environments, as the text within those environments will confuse
- reLyX; use this capability for new environments you create that have plain
- text or math or simple commands in them.
- You also can't declare unknown math environments (like
-\family typewriter
-equation*
-\family default
-) as regular environments, either, since the LyX math editor won't understand
- them.
- The names of regular environments appear, whitespace-separated, between
-
-\family typewriter
-
-\backslash
-begin{reLyXre}
-\family default
- and
-\family typewriter
-
-\backslash
-end{reLyXre}
-\family default
- statements in the syntax file.
- (If you have a regular environment which you won't use very often, you
- can use the
-\series bold
--r
-\series default
- option rather than writing a syntax file.)
-\end_layout
-
-\begin_layout Standard
-Third, the syntax file describes a math translation table.
- The LyX math editor doesn't support a few commands.
- For example,
-\family typewriter
-_
-\family default
- is supported, but the equivalent
-\family typewriter
-
-\backslash
-sb
-\family default
- is not.
- Put any commands you'd like translate between
-\family typewriter
-
-\backslash
-begin{reLyXmt}
-\family default
- and
-\family typewriter
-
-\backslash
-end{reLyXmt}
-\family default
- statements.
- The statement
-\begin_inset Quotes eld
-\end_inset
-
-
-\family typewriter
-
-\backslash
-| {
-\backslash
-Vert}
-\family default
-
-\begin_inset Quotes erd
-\end_inset
-
- means that any
-\family typewriter
-
-\backslash
-|
-\family default
- in math mode will be converted to
-\begin_inset Quotes eld
-\end_inset
-
-
-\family typewriter
-
-\backslash
-Vert
-\family default
-
-\begin_inset Quotes erd
-\end_inset
-
-
-\family typewriter
-
-\family default
-(in cases where a token made up of a backslash and a non-letter is translated
- to something with letters at the end, a space is added by reLyX.
- That way,
-\begin_inset Quotes eld
-\end_inset
-
-
-\family typewriter
-
-\backslash
-|a
-\family default
-
-\begin_inset Quotes erd
-\end_inset
-
- is correctly translated to
-\begin_inset Quotes eld
-\end_inset
-
-
-\family typewriter
-
-\backslash
-Vert a
-\family default
-
-\begin_inset Quotes erd
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Subsubsection
-Miscellaneous
-\end_layout
-
-\begin_layout Standard
-You need Perl version 5.002 or later to run reLyX.
- <plug> If you don't have Perl, you should get it anyway (at
-\begin_inset LatexCommand \url[Perl]{http://www.perl.com/}
-
-\end_inset
-
-), because it's a really useful tool for pretty much anything.
- </plug>
-\end_layout
-
-\begin_layout Subsection
-Diagnostics
-\end_layout
-
-\begin_layout Standard
-reLyX should always explain why it crashes, if it crashes.
- Some diagnostics may be very technical, though, if they come from the guts
- of the code.
- reLyX gives much more information while running if you use the
-\series bold
--d
-\series default
- option, but you shouldn't need that unless something goes wrong.
-\end_layout
-
-\begin_layout Standard
-When it's finished, reLyX will tell you if it finished successfully or died
- due to some error.
-\end_layout
-
-\begin_layout Subsection
-Warnings
-\end_layout
-
-\begin_layout Standard
-Always keep a copy of your original LaTeX files either under a different
- name or in a different directory.
- There are a couple ways in which using LyX could lead to overwriting the
- original LaTeX file.
-\end_layout
-
-\begin_layout Standard
-If you import
-\family typewriter
-foo.tex
-\family default
- to create
-\family typewriter
-foo.lyx
-\family default
-, then edit
-\family typewriter
-foo.lyx
-\family default
- and want to re-export it, note that it will overwrite the original
-\family typewriter
-foo.tex
-\family default
-.
- (LyX will
-\emph on
-not
-\emph default
- ask you if you want to overwrite it.)
-\end_layout
-
-\begin_layout Standard
-If you have chosen not to use a temporary directory in the preferences,
- then LyX will create its temporary files in your current directory, which
- means your LaTeX original may be overwritten (without a warning from LyX)
- when you
-\begin_inset Quotes eld
-\end_inset
-
-view dvi
-\begin_inset Quotes erd
-\end_inset
-
- or print the LyX document.
-\end_layout
-
-\begin_layout Subsection
-Files
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-\series medium
-MY_LYXDIR/layouts/*.layout
-\family default
-\series default
- \InsetSpace ~
-
-\newline
-User's personal layout files for document classes
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-\series medium
-MY_LYXDIR/reLyX/syntax.default
-\family default
-\series default
- \InsetSpace ~
-
-\newline
-User's personal syntax file
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-\series medium
-LIBDIR/layouts/*.layout
-\family default
-\series default
- \InsetSpace ~
-
-\newline
-System-wide layout files for document classes
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-\series medium
-LIBDIR/reLyX/syntax.default
-\family default
-\series default
- \InsetSpace ~
-
-\newline
-System-wide LaTeX syntax file
-\end_layout
-
-\begin_layout Standard
-
-\family typewriter
-LIBDIR
-\family default
- is the system-wide LyX directory, usually something like
-\family typewriter
-/usr/local/share/lyx/
-\family default
-.
-
-\family typewriter
-MY_LYXDIR
-\family default
- is your personal LyX directory, something like
-\family typewriter
-.lyx/
-\family default
- in your home directory.
- You can see their actual values in the
-\family sans
-\bar under
-H
-\bar default
-elp\SpecialChar \menuseparator
-About\InsetSpace ~
-Ly
-\bar under
-X
-\family default
-\bar default
- dialog.
-\end_layout
-
-\begin_layout Subsection
-See also
-\end_layout
-
-\begin_layout Standard
-
-\shape italic
-lyx
-\shape default
-(1),
-\shape italic
-latex
-\shape default
-(1)
-\end_layout
-
-\begin_layout Subsection
-Authors
-\end_layout
-
-\begin_layout Standard
-Copyright (c) 1998--9
-\noun on
-Amir Karger
-\noun default
- (
-\family typewriter
-karger@voth.chem.utah.edu
-\family default
-)
-\end_layout
-
-\begin_layout Standard
-Code contributors:
-\end_layout
-
-\begin_layout Itemize
-
-\noun on
-John Weiss
-\noun default
- wrote the original CleanTeX pass.
-\end_layout
-
-\begin_layout Itemize
-
-\noun on
-Etienne Grossmann
-\end_layout
-
-\begin_layout Itemize
-
-\noun on
-Jos\i \'{e}
- Ab\i \'{\i}
-lio Oliveira Matos
-\end_layout
-
-\begin_layout Itemize
-
-\noun on
-David Suarez de Lis
-\end_layout
-
-\begin_layout Standard
-Other contributors:
-\end_layout
-
-\begin_layout Itemize
-
-\noun on
-Jean-Marc Lasgouttes
-\noun default
- worked on the wrapper script and offered lots of bug reports, advice, and
- feature suggestions.
-\end_layout
-
-\begin_layout Itemize
-
-\noun on
-Asger K.
- Alstrup Nielsen
-\noun default
- and
-\noun on
-Marc Pavese
-\noun default
- provided advice.
-\end_layout
-
-\begin_layout Itemize
-Various members of the LyX developers' and users' lists provided bug reports
- and feature suggestions.
-\end_layout
-
-\begin_layout Standard
-reLyX uses a modified version the Perl TeX parser
-\family typewriter
-Text::TeX
-\family default
- package written by
-\noun on
-Ilya Zakharevich
-\noun default
- (
-\family typewriter
-ilya@math.ohio-state.edu
-\family default
-), available on CPAN.
-\end_layout
-
-\begin_layout Chapter
-LyX Features needing Extra Software
-\end_layout
-
-\begin_layout Section
-Using LyX with SGML-Tools (aka LinuxDoc)
-\end_layout
-
-\begin_layout Standard
-by
-\noun on
-Paul Evans
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-LinuxDoc is a document class available in LyX if you have the
-\family typewriter
-sgml-tools
-\family default
- package installed.
- You can use it to produce documents in the so-called Standardized General
- Mark-up Language (SGML) in the particular format used by the Linux Documentatio
-n Project.
- That is obviously helpful if you are contributing to that project.
- You can use the SGML format with the
-\family typewriter
-sgml-tools
-\family default
- package of scripts and programs (to produce other formats, including Latex,
- HTML, plain text, man pages and\SpecialChar \ldots{}
-).
- You may therefore prefer to use this document class if you want to write
- something that can be easily translated into other formats.
-\end_layout
-
-\begin_layout Standard
-You will find that LinuxDoc has fewer layout options than the other text
- classes in LyX.
- This is mainly so that the translations into other formats have a chance
- of making some sense.
- In this section we describe:
-\end_layout
-
-\begin_layout Itemize
-how to setup and use a document in LinuxDoc
-\end_layout
-
-\begin_layout Itemize
-how to use the tags in LinuxDoc to layout your document
-\end_layout
-
-\begin_layout Itemize
-how to use the SGML packages to produce the various formats
-\end_layout
-
-\begin_layout Itemize
-how to sort out some problems.
-\end_layout
-
-\begin_layout Subsection
-Preparing and using a LinuxDoc document
-\end_layout
-
-\begin_layout Subsubsection
-Getting started
-\end_layout
-
-\begin_layout Standard
-You start by selecting the LinuxDoc class using the
-\family sans
-\bar under
-D
-\bar default
-ocument\SpecialChar \menuseparator
-
-\bar under
-S
-\bar default
-ettings
-\family default
- dialog.
-
-\family sans
-
-\family default
-Then you will find that there are fewer paragraph environments than for
- most other classes.
- You can see them on the pull down box on the left of the tool bar.
- How to use them is described in section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sec:sgmlparas}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-You
-\emph on
-must
-\emph default
- enter a title for the document, followed by an author, marking each with
- the appropriate paragraph environment.
- If you don't do this, you will get errors when you try to print the file.
- You can then enter the date and an abstract.
- The document proper must start with a Section paragraph environment rather
- than any standard layout.
-\end_layout
-
-\begin_layout Standard
-After that you can prepare a document as usual using the available range
- of paragraph environments.
- See section\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sec:sgmlparas}
-
-\end_inset
-
- for the full list and their uses.
-\end_layout
-
-\begin_layout Subsubsection
-Output from LinuxDoc
-\end_layout
-
-\begin_layout Standard
-You can print and save these documents in the normal way.
- To use the other features of the SGML package you need to save your document
- as LinuxDoc; this is a version in which the document is translated into
- the basic sgml tags.
- Use
-\family sans
-
-\bar under
-F
-\bar default
-ile\SpecialChar \menuseparator
-
-\bar under
-E
-\bar default
-xport\SpecialChar \menuseparator
-Linu
-\bar under
-x
-\bar default
-Doc.
-
-\family default
- You will get a file with the same name and a
-\family typewriter
-.sgml
-\family default
- extension rather than a
-\family typewriter
-.lyx
-\family default
- extension.
- See\InsetSpace ~
-
-\begin_inset LatexCommand \ref{sec:sgmloperate}
-
-\end_inset
-
- on how you than make use of this file.
-\end_layout
-
-\begin_layout Subsection
-Using the paragraph environments in LinuxDoc
-\end_layout
-
-\begin_layout Subsubsection
-The Structure of a LinuxDoc Document
-\end_layout
-
-\begin_layout Standard
-There is a formal structure for LinuxDoc which limits how you can place
- tags.
- There are two parts to all documents:
-\end_layout
-
-\begin_layout Description
-Header: this is everything up to the first time you insert a Section layout
- marker.
- It can include title, author, date, abstract and ToC.
- You must include the first two.
-\end_layout
-
-\begin_layout Description
-Body: from the beginning of the first section onwards.
- All other tags are allowed.
-
-\end_layout
-
-\begin_layout Subsubsection
-The LinuxDoc Paragraph Environments
-\end_layout
-
-\begin_layout Standard
-\begin_inset LatexCommand \label{sec:sgmlparas}
-
-\end_inset
-
-Here is a list of all the tags you will find listed on the layout bar in
- the order they come there, with some comments where the purpose or use
- is not obvious:
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Standard:
-\family roman
- works as described in [cross reference]
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Title
-\family default
-: This will appear at the top left of the document when printed, above a
- heavy horizontal rule, although you will not see this on the LyX screen.
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Section, Subsection, Subsubsection, Paragraph and Subparagraph:
-\family default
- all do what you would expect and in the usual order.
- Whether they are numbered or not is controlled by the
-\family sans
-Section\InsetSpace ~
-number\InsetSpace ~
-depth
-\family default
- setting.
- You cannot get the equivalent number free versions in any other way; there
- is no
-\family sans
-Section*
-\family default
- or similar
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Enumerate:
-\family default
- As usual this produces a numbered and indented list as described in the
-
-\emph on
-User's Guide
-\emph default
-.
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Itemize:
-\family roman
-Again much the same as in the other classes: see the
-\emph on
-User's Guide
-\emph default
-.
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Description
-\family default
-: As explained in the
-\emph on
-User's Guide
-\emph default
-.
- Remember that if you want the bold element at the start of a description
- to be more than one word then you need to put protected spaces between
- the words.
-
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Verbatim:
-\family default
-As usual.
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Code: similar to the Lyx-Code
-\family roman
- environment
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Author
-\family default
-: Anything you mark with this will appear on the left of the heading of
- the document, under the heavy rule.
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Date:
-\family default
- Anything you mark with this will appear on the right of the heading under
- the rule.
- You do not have to make this a date.
- Any text can be entered, e.\InsetSpace ~
-g.
- a version number.
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Abstract
-\family default
-: You can use this to produce a free standing paragraph after the author
- and date, and before the first section.
- You are only allowed one such paragraph.
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-
-\emph on
-Author's note.
-
-\emph default
-This needs checking ---
-\emph on
-pe.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-Displaymath
-\family default
-:
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-
-\emph on
-Author's note:
-\emph default
-I have not yet checked this ---
-\emph on
-pe.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Other document features
-\end_layout
-
-\begin_layout Standard
-You can also use the
-\family sans
-Layout
-\family default
-menu to set fonts or to emphasis words.
- You can also use the table of contents as usual; see the corresponding
- section of the
-\emph on
-User's Guide
-\emph default
-.
- Although you will find some some other features on the menus e.\InsetSpace ~
-g.
- inserting footnotes.
- There is some doubt about whether these will work correctly.
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-
-\emph on
-Author's note:
-\emph default
-Again still checking to see whether this is my system
-\emph on
- ---pe.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Cross references and HTML
-\end_layout
-
-\begin_layout Standard
-On the
-\family sans
- Insert
-\family default
- menu you will find two new options relating to the inclusion of URL addresses.
- If you use either option you will find some highlighted TeX code inserted
- into your document in three separate blocks with spaces available between.
- The blocks will be:
-\end_layout
-
-\begin_layout Quote
-
-\family typewriter
-
-\backslash
-htmlurl{
-\family default
- or
-\family typewriter
-
-\backslash
-url{
-\family roman
-
-\hfill
-space
-\family default
-
-\family typewriter
-
-\hfill
-}{
-\family roman
-
-\hfill
-space
-\hfill
-
-\family typewriter
-}
-\end_layout
-
-\begin_layout Standard
-You insert a full HTML tag between the first and second blocks.
- This can be
-\begin_inset LatexCommand \url{http://any.address}
-
-\end_inset
-
- or other valid tags such as
-\begin_inset LatexCommand \url{mailto:me@my.address}
-
-\end_inset
-
-
-\family typewriter
-.
-\family default
-Then y
-\family roman
-ou
-\family default
-insert some description between the second and third blocks.
- The differences are:
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-URL:
-\family roman
- both the HTML tag and the description will appear in the document
-\end_layout
-
-\begin_layout Itemize
-
-\family sans
-HTML\InsetSpace ~
-URL:
-\family roman
-only the description appears in the printed version
-\end_layout
-
-\begin_layout Subsection
-Using the LinuxDoc Sgml scripts
-\begin_inset Note Note
-status collapsed
-
-\begin_layout Standard
-This section is completely outdated.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset LatexCommand \label{sec:sgmloperate}
-
-\end_inset
-
-You can use LinuxDoc as a text class without any additional scripts or programs,
- but there is not much point in doing this.
- All you will get is a document that looks like a
-\emph on
-Linux Documentation Project Howto
-\family sans
-\emph default
-.
-
-\family default
-To do the document translation you need to get and install the
-\family typewriter
-sgml-tools-1.0.x.tar.gz
-\family default
-(with
-\begin_inset Formula $x\geq3$
-\end_inset
-
-) package from
-\family roman
-the SGML-Tools WWW Page
-\family default
- at
-\end_layout
-
-\begin_layout LyX-Code
-
-\family roman
-\begin_inset LatexCommand \url{http://pobox.com/~cg/sgmltools}
-
-\end_inset
-
-
-\family default
-
-\end_layout
-
-\begin_layout Standard
-Alternatively, you can go to the
-\family typewriter
-sunsite
-\family default
- archive at
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-Note that, at the time of this writing (01/1998), version 1.0.3 of sgml-tools
- has not yet been made available at
-\family typewriter
-sunsite
-\family default
-.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\family roman
-\begin_inset LatexCommand \url{ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-1.0.x.tar.gz}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-
-\family roman
-The
-\family default
- file
-\family typewriter
-sgml-tools-1.0.x.tar.gz
-\family default
- contains everything that you need to write SGML documents and convert them
- to groff, LaTeX, HTML, GNU info, LyX, and RTF\SpecialChar \@.
-
-\end_layout
-
-\begin_layout Standard
-This package was renamed from
-\family typewriter
-linuxdoc-sgml-1.5.tar.gz
-\family default
- in January 1997.
-\end_layout
-
-\begin_layout Standard
-Follow the instructions in that package on how to install it and how to
- use it.
- All this has to be done outside of LyX, before you can use the
-\family sans
-\bar under
-F
-\bar default
-ile\SpecialChar \menuseparator
-
-\bar under
-E
-\bar default
-xport\SpecialChar \menuseparator
-as\InsetSpace ~
-LinuxDoc
-\family roman
-option.
-\end_layout
-
-\begin_layout Subsection
-Troubleshooting LinuxDoc
-\end_layout
-
-\begin_layout Standard
-When you print or preview a LinuxDoc document some checking is done of the
- tags before LaTeX is run.
- Some errors are trapped here, especially those concerning the structure
- of the document.
- LyX may produce an error message, but not leave an error box in the document
- for you to open.
- You may have to look at the files directly to discover what is wrong.
- Most problems seem to come from the use of options that are not fully available
- in the text class.
-\end_layout
-
-\begin_layout Section
-Checking TeX
-\end_layout
-
-\begin_layout Standard
-by
-\noun on
-Asger Alstrup
-\end_layout
-
-\begin_layout Subsection
-Introduction
-\end_layout
-
-\begin_layout Standard
-Under the
-\family sans
-\bar under
-T
-\bar default
-ools
-\family default
- menu, you'll find a
-\family sans
-\bar under
-C
-\bar default
-heck\InsetSpace ~
-TeX
-\family default
- command.
- This feature requires you to have the
-\family typewriter
-chktex
-\family default
- program installed, and is grayed out if you don't have it.
- You can get it from your nearest CTAN mirror, or over the Web from
-\begin_inset LatexCommand \url{http://www.ifi.uio.no/~jensthi/chktex/}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-The
-\family sans
-ChkTeX
-\family default
- package is a program that was written by
-\noun on
-Jens T.
- Berger Thielemann
-\noun default
- in frustration because some constructs in LaTeX are sometimes non-intuitive,
- and easy to forget.
- The program runs over your LaTeX file and checks the integrity of the file,
- and flags some common errors.
- In other technical words, it is
-\family typewriter
-Lint
-\family default
- for LaTeX.
-\end_layout
-
-\begin_layout Standard
-Well, what is a syntax checker doing in LyX which is supposed to produce
- correct LaTeX anyways? The answer is simple: Just as
-\family typewriter
-Lint
-\family default
- not only checks the
-\emph on
-syntax
-\emph default
- of C programs, but also does
-\emph on
-semantic
-\emph default
- checks for type-errors,
-\family sans
-ChkTeX
-\family default
- catches some common
-\emph on
-typographic
-\emph default
- errors, in addition to the syntactical ones.
- Specifically,
-\family sans
-ChkTeX
-\family default
- is capable of detecting several common errors, such as
-\end_layout
-
-\begin_layout Itemize
-Ellipsis detection:
-\newline
-Use \SpecialChar \ldots{}
- instead of ...
-\end_layout
-
-\begin_layout Itemize
-No space in front of/after parenthesis:
-\newline
-( wrong spacing )
-\end_layout
-
-\begin_layout Itemize
-Enforcement of normal space after common abbreviations:
-\newline
-e.
- g.
- is too wide spacing.
-\end_layout
-
-\begin_layout Itemize
-Enforcement of end-of-sentence space when the last sentence ends with a
- capital letter:
-\newline
-This is a TEST.
- And this is wrong spacing.
-\end_layout
-
-\begin_layout Itemize
-Space in front of labels and similar commands:
-\newline
-The label should stick right
- up to the text to avoid falling to a wrong page.
-
-\begin_inset LatexCommand \label{sec:chktex}
-
-\end_inset
-
-
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-This footnote is in danger of falling off to a wrong page
-\end_layout
-
-\end_inset
-
- The label is separated too much.
-\end_layout
-
-\begin_layout Itemize
-Space in front of references, instead of hard spaces:
-\newline
-In you are in bad luck,
- the text will break right between the referenced text and reference number,
- and that's a pity.
- See section
-\begin_inset LatexCommand \ref{sec:chktex}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Itemize
-Use of
-\begin_inset Quotes eld
-\end_inset
-
-x
-\begin_inset Quotes erd
-\end_inset
-
- instead of
-\begin_inset Formula $\times$
-\end_inset
-
- between numbers:
-\newline
-2x2 looks cheap compared to
-\begin_inset Formula $2\times2$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-and more \SpecialChar \ldots{}
- It is an invaluable tool when you are
-\begin_inset Quotes eld
-\end_inset
-
-finishing up
-\begin_inset Quotes erd
-\end_inset
-
- your document before printing, and you should run it right after the obligatory
- spelling check, and before you go fine tuning the typesetting.
-\end_layout
-
-\begin_layout Subsection
-How to use it
-\end_layout
-
-\begin_layout Standard
-If you have the program installed, usage is as simple as choosing
-\family sans
-\bar under
-T
-\bar default
-ools\SpecialChar \menuseparator
-
-\bar under
-C
-\bar default
-heck\InsetSpace ~
-TeX
-\family default
-.
- This will make LyX generate a LaTeX file of your document, start
-\family sans
-ChkTeX
-\family default
- to check it, and then make LyX insert
-\begin_inset Quotes eld
-\end_inset
-
-error boxes
-\begin_inset Quotes erd
-\end_inset
-
- with the warnings from
-\family sans
-ChkTeX
-\family default
-, if there were any.
- The warnings will be placed close to the point of the mistake, and you
- can quickly find them by using the
-\family sans
-\bar under
-N
-\bar default
-avigate\SpecialChar \menuseparator
-
-\bar under
-E
-\bar default
-rror
-\family default
- menu item, or the shortcut key
-\family sans
-C-g
-\family default
- from the default
-\family typewriter
-cua
-\family default
- bind file.
- Open the error boxes by clicking on them with the mouse, or use the shortcut
- key
-\family sans
-C-i
-\family default
- from
-\family typewriter
-cua
-\family default
- bindings, or the corresponding
-\family sans
-C-o
-\family default
- for the alternate
-\family typewriter
-emacs
-\family default
- bind file.
- Read the warning and correct the mistake, if it is a mistake.
- If you have trouble understanding what the warning is about, you can safely
- ignore it.
- Remember that there is a hidden layer between the document on screen and
- the technical details in invoking
-\family sans
-ChkTeX
-\family default
-, and this gap can make some warnings seem arcane or just right down plain
- silly.
-\end_layout
-
-\begin_layout Standard
-This document is an excellent testing bed for the feature, and it should
- provide quite a few warnings for you to fiddle with.
- Since computers are only so smart, expect most of the warnings to be false
- alarms, though.
-\end_layout
-
-\begin_layout Subsection
-How to fine tune it
-\end_layout
-
-\begin_layout Standard
-Sometimes, you'll find that
-\family sans
-ChkTeX
-\family default
- makes more noise than suits your mood.
- Then you can choose not to use it, wait until your mood changes, or try
- to customize
-\family sans
-ChkTeX
-\family default
- to get better along with you.
- Another choice in the most desperate situations is to use
-\family sans
-\bar under
-V
-\bar default
-iew\SpecialChar \menuseparator
-
-\bar under
-R
-\bar default
-emove\InsetSpace ~
-All\InsetSpace ~
-Error\InsetSpace ~
-Boxes
-\family default
-, which will get rid of all warnings instantly.
-\end_layout
-
-\begin_layout Standard
-Although
-\family sans
-ChkTeX
-\family default
-
-\emph on
-is
-\emph default
- very configurable and extensible, you shouldn't expect to solve all problems
- with
-\family sans
-ChkTeX
-\family default
- in LyX this way.
- Since LyX has to generate a somewhat special LaTeX file to be able to match
- the line numbers from the
-\family sans
-ChkTeX
-\family default
- output
-\begin_inset Foot
-status collapsed
-
-\begin_layout Standard
-You can inspect the specific output from
-\family sans
-chktex
-\family default
- by using
-\family sans
-Edit\SpecialChar \menuseparator
-View\InsetSpace ~
-LaTeX\InsetSpace ~
-Log
-\family default
- right after a
-\family sans
-chktex
-\family default
- run.
-\end_layout
-
-\end_inset
-
- to the internal document structure, some of the warnings will not seen
- to appear correctly.
- There are two things you can do about this:
-\end_layout
-
-\begin_layout Itemize
-Fine tune the
-\family sans
-ChkTeX
-\family default
- invocation command line in
-\family sans
-Preferences
-\family default
- (tabs
-\family sans
-Outputs
-\family default
-,
-\family sans
-Misc
-\family default
-), or the global
-\family sans
-ChkTeX
-\family default
- installation configuration file (usually with the file
-\family typewriter
-/usr/local/share/chktexrc
-\family default
-).
- See below to learn what warnings can be enabled and disabled on the command
- line.
-
-\end_layout
-
-\begin_layout Itemize
-Export your document as a raw LaTeX file using
-\family sans
-\bar under
-F
-\bar default
-ile\SpecialChar \menuseparator
-
-\bar under
-E
-\bar default
-xport\SpecialChar \menuseparator
-
-\bar under
-L
-\bar default
-aTeX
-\family default
- and run
-\family typewriter
-chktex
-\family default
- manually on that.
- Invoked in this way, it can be a hassle to find the corresponding place
- in the document inside LyX, but with a little patience, you should be able
- to do it.
-\end_layout
-
-\begin_layout Standard
-Here follows the warning messages that can be enabled and disabled in
-\family sans
-Preferences
-\family default
-.
- Use
-\family typewriter
--n#
-\family default
- to disable a warning, and
-\family typewriter
--w#
-\family default
- to enable a warning.
- The emphasized entries are disabled by default, because the default is
- "
-\family typewriter
-chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
-\family default
-".
-\end_layout
-
-\begin_layout Standard
-Notice that you should only use the options that enable and disable warnings,
- because LyX relies on some of the other command line parameters to be set
- in a specific way to have a chance to communicate with
-\family typewriter
-chktex