UserGuide.lyx: more work on Appendix B

Customization.lyx: revise converters section

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@20242 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2007-09-12 18:39:30 +00:00
parent 378f3ec631
commit 1a91f18eaf
2 changed files with 568 additions and 109 deletions

View File

@ -551,17 +551,6 @@ languages
this file contains a list of all the languages currently supported by LyX.
\end_layout
\begin_layout List
\labelwidthstring 00.00.0000
\family typewriter
unicodesymbols
\family default
this contains a mapping of unicode symbols to LaTeX commands.
The commands from this file are used whenever a particular symbol cannot
be output with the currently active encoding.
\end_layout
\begin_layout Section
Your local configuration directory
\end_layout
@ -2070,33 +2059,75 @@ Converters
\end_layout
\begin_layout Standard
To define a converter from one format to another---e.g., LaTeX to PDF---select
the Converters panel.
Choose the `From' and `To' formats, and then enter the program to be used
in the conversion in the Converter field.
To define a new converter, select an existing one, select a different format
in the
\family sans
From\InsetSpace ~
format
\family default
and\InsetSpace \thinspace{}
/\InsetSpace \thinspace{}
or
\family sans
To\InsetSpace ~
format
\family default
drop-down list, modify the
\family sans
Converter
\family default
field, and press the
\family sans
Add
\family default
button.
\end_layout
\begin_layout Standard
You do not have to define converters between all the Formats between which
You do not have to define converters between all the formats between which
you want to convert.
For example, you will note that there is no `LyX to PostScript®' converter,
but LyX will export PostScript®.
For example, you will note that there is no `LyX to PostScript' converter,
but LyX will export PostScript.
It does so by first creating a LaTeX file (no converter needs to be defined
for this) which it then converts to DVI using the `LaTeX to DVI' converter,
and then it converts the resulting DVI file to PostScript®.
for this) which is then converted to DVI using the `LaTeX to DVI' converter,
and finally converts the resulting DVI file to PostScript.
LyX finds such `chains' of converters automatically, and it will always
choose the shortest chain possible.
choose the shortest possible chain.
You can, though, still define multiple conversion methods between file
formats.
For example, the standard LyX configuration provides three ways to convert
LaTeX to PDF: Directly, using pdflatex; via (DVI and) PostScript®, using
ps2pdf; or via DVI, using dvipdfm.
LaTeX to PDF: Directly, using
\family sans
pdflatex
\family default
; via (DVI and) PostScript, using
\family sans
ps2pdf
\family default
; or via DVI, using
\family sans
dvipdfm
\family default
.
To define such alternate chains, you must define multiple target `file
formats'.
In the standard configuration, for example, formats named `pdf', `pdf2',
and `pdf3' are defined, all of which share the extension `pdf'.
formats', as described in the next section.
For example in the standard configuration the formats named
\family sans
pdf
\family default
,
\family sans
pdf2
\family default
, and
\family sans
pdf3
\family default
are defined, all of which share the extension
\family sans
.pdf
\family default
.
\end_layout
\begin_layout Standard
@ -2105,11 +2136,7 @@ Several variables can be used in the definition of converters:
\begin_layout List
\labelwidthstring 00.00.0000
$$s The LyX system directory (e.g.,
\family typewriter
/usr/share/lyx
\family default
).
$$s The LyX system directory
\end_layout
\begin_layout List
@ -2133,19 +2160,27 @@ $$p The path to the input file
\end_layout
\begin_layout Standard
In the `Extra Flag' field you can enter as many of the following flags as
you wish, separated by commas:
In the
\family sans
Extra\InsetSpace ~
Flag
\family default
field you can enter the following flags, separated by commas:
\end_layout
\begin_layout List
\labelwidthstring 00.00.0000
latex This converter runs some form of LaTeX.
(This will make LyX's LaTeX error logs available.)
This will make LyX's LaTeX error logs available.
\end_layout
\begin_layout List
\labelwidthstring 00.00.0000
needaux Needs the LaTeX .aux file for the conversion.
needaux Needs the LaTeX
\family sans
.aux
\family default
file for the conversion.
\end_layout
\begin_layout List
@ -2154,13 +2189,14 @@ xml Output is XML.
\end_layout
\begin_layout Standard
The following three variables are not really flags at all but take an argument
in the
The following three flags are not really flags at all because they take
an argument in the
\family sans
key\InsetSpace ~
= value
=\InsetSpace ~
value
\family default
format.
format:
\end_layout
\begin_layout List
@ -2197,10 +2233,9 @@ Note
\begin_layout List
\labelwidthstring 00.00.0000
resultfile Determines the output filename and may, again, contain $$b.
resultfile Determines the output filename and may, contain $$b.
Sensible only with resultdir, and optional even then; if not given, it
defaults to `index'.
\end_layout
\begin_layout Standard

View File

@ -4042,7 +4042,7 @@ Standard
If you want to keep both the current nesting depth and paragraph environment,
you should use
\family sans
C-Return
M-Return
\family default
to break paragraphs.
\end_layout
@ -23590,14 +23590,10 @@ reference "sub:LaTeX-settings"
\end_inset
.
When you need for example the German DIN\InsetSpace ~
5007 word ordering, add there the
option
\begin_inset Quotes eld
\end_inset
The available options are listed and explained in
\begin_inset LatexCommand cite
key "makeindex"
-g
\begin_inset Quotes erd
\end_inset
.
@ -35489,10 +35485,14 @@ PATH\InsetSpace ~
prefix This field contains a list of paths to external programs.
When LyX needs to use an external program, it looks in this list where
to find it on the system.
The path list is automatically set up on Windows systems while LyX is configure
d, so that you normally don't have to modify it.
On Unix/Linux and Mac systems the PATH-prefix might be empty because it
is not needed on theses systems.
The path list is automatically set up on Windows and Mac systems while
LyX is configured, so that you normally don't have to modify it.
On Unix\InsetSpace \thinspace{}
/\InsetSpace \thinspace{}
Linux systems, the path list will need to be set only if there
are external programs you wish to use that are not in your normal system
path ($PATH).
\end_layout
\begin_layout Section
@ -35577,12 +35577,36 @@ Table
\begin_layout Description
Command\InsetSpace ~
start ??
start When a special LaTeX-package is needed to write in a certain
document language, you can here specify the command to start the package.
An example is the start command
\family sans
\backslash
begin{arabtext}
\family default
that is needed to write Arabic using the package
\series bold
ArabTeX
\series default
, see
\begin_inset LatexCommand cite
key "Arabic"
\end_inset
.
\end_layout
\begin_layout Description
Command\InsetSpace ~
end ??
end Counterpart to
\family sans
Command start
\family default
.
Some packages, like the default, don't have an end command since the start
command toggles the package on and off.
\end_layout
\begin_layout Description
@ -35591,7 +35615,14 @@ babel Whether babel is used or not.
\end_layout
\begin_layout Description
Global ??
Global When this option is set, the languages used in the document will
be added as options to the document class options, so that they can be
used by all LaTeX-packages.
Otherwise they will only be used as options for the
\series bold
babel
\series default
package.
\end_layout
\begin_layout Description
@ -35601,7 +35632,12 @@ begin ??
\begin_layout Description
Auto\InsetSpace ~
end ??
end Counterpart to
\family sans
Auto\InsetSpace ~
begin
\family default
.
\end_layout
\begin_layout Description
@ -35658,7 +35694,7 @@ name "Printer Settings"
\begin_layout Description
Default\InsetSpace ~
printer Here you can specify the name of your default printer.
The name will be used whe the
The name will be used when the
\family sans
Printer command
\family default
@ -35824,7 +35860,49 @@ status collapsed
\end_inset
X\InsetSpace ~
encoding ??
encoding This is the default encoding of the document font.
\family sans
T1
\family default
is the default and covers western languages and symbols.
\family sans
T2A
\family default
,
\family sans
T2B
\family default
,
\family sans
T2C
\family default
,
\family sans
LCY
\family default
, and
\family sans
X2
\family default
are for Cyrillic.
Combinations of the encodings are possible, like
\begin_inset Quotes erd
\end_inset
\family sans
T1, T2B
\family default
\begin_inset Quotes erd
\end_inset
.
The font encoding is normally automatically loaded by the language packages
LyX sets up in the background.
So there is no need to change the default encoding.
\end_layout
\begin_layout Description
@ -35965,64 +36043,231 @@ Converters
\end_layout
\begin_layout Standard
LyX has a powerful mechanism to convert to and from any file format using
external programs.
Define a pair of formats, e.g.
\family typewriter
LaTeX
\family default
and
\family typewriter
PDF
\family default
.
Now define a converter from one format to the other.
In our example, two possible mechanisms exist.
\end_layout
\begin_layout Enumerate
A direct conversion, from LaTeX to PDF using pdflatex
\end_layout
\begin_layout Enumerate
A more convoluted route using intermediate formats and converters: LaTeX
to DVI (using latex) to PostScript® (using dvips) to PDF (using ps2pdf).
\end_layout
\begin_layout Standard
LyX will always choose the shortest possible route, so you must specify
two different Format names for
\family typewriter
.pdf
\family default
files to be able to use either.
Both are included by default in the
Here you find the list of defined converter commands to convert material
from one format to another.
You can modify them or create new ones.
To modify a converter, select it, change the entry of the field
\family sans
Preferences
Converter
\family default
dialog.
Have a look and then invent your own!
and\InsetSpace \thinspace{}
/\InsetSpace \thinspace{}
or
\family sans
Extra\InsetSpace ~
flag
\family default
, and press then the
\family sans
Modify
\family default
button.
To create a new converter, select an existing one, select a different format
in the
\family sans
From\InsetSpace ~
format
\family default
and\InsetSpace \thinspace{}
/\InsetSpace \thinspace{}
or
\family sans
To\InsetSpace ~
format
\family default
drop-down list, modify the
\family sans
Converter
\family default
field, and press the
\family sans
Add
\family default
button.
\end_layout
\begin_layout Standard
Moreover, each Format can have a Viewer associated with it.
For example, you might want to use
\family typewriter
Ghostview
When the
\family sans
Converter File Cache
\family default
to examine PostScript files, or
\family typewriter
xdvi
\family default
to preview the LaTeX output.
You can alter the viewer to use (and what options to pass to it) via the
is enabled, conversions will be cached as long as specified in the field
\family sans
Maximum Age (in days
\family default
).
This means that images don't need to be converted again when you reopen
a document; the converted images from the cache will be used instead.
\end_layout
\begin_layout Standard
More about converters, like the variables and flags that can be used in
the converter definition, is described in section
\emph on
Converters
\emph default
of the
\emph on
Customization
\emph default
manual.
\end_layout
\begin_layout Section
File Formats
\end_layout
\begin_layout Standard
The first step is to define your file formats, e.g.
PDF, if they are not already defined.
To do so, open the
\family sans
Tools\SpecialChar \menuseparator
Preferences:Converters
\family default
dialog.
Enter a new format name; a new GUI name (used in, e.g., the View and Export
menus); and a file extension.
These are required.
\end_layout
\begin_layout Standard
There are also two flags that can be set using the checkboxes in the dialog.
The
\family typewriter
document
\family default
flag tells LyX that a format is suitable for document export.
If this flag is set for a format, and if a suitable conversion route exists,
then the format will appear in the
\family sans
File\SpecialChar \menuseparator
Export
\family default
menu.
The format will also appear in the
\family sans
View
\family default
menu if it has a viewer associated with it.
(See below.) Pure image formats (e.g.\InsetSpace ~
\family typewriter
png
\family default
) should not have this flag set; formats that can both represent vector
graphics and documents (e.g.\InsetSpace ~
\family typewriter
pdf
\family default
) should have it set.
\end_layout
\begin_layout Standard
The
\family typewriter
vector
\family default
flag tells LyX whether a format can contain vector graphics.
This information is used to determine the target format of included graphics
for
\family typewriter
pdflatex
\family default
export.
Included graphics may need to be converted to either
\family typewriter
pdf
\family default
,
\family typewriter
png
\family default
or
\family typewriter
jpg
\family default
, since
\family typewriter
pdflatex
\family default
cannot handle other image formats.
If an included graphic is not already in
\family typewriter
pdf
\family default
,
\family typewriter
png
\family default
or
\family typewriter
jpg
\family default
format, it is converted to
\family typewriter
pdf
\family default
if the
\family typewriter
vector
\family default
flag of the format is set, and otherwise to
\family typewriter
png
\family default
.
\end_layout
\begin_layout Standard
A Format can have a Viewer associated with it.
For example, you might want to use
\family typewriter
ghostview
\family default
to look at PostScript® files, or
\family typewriter
xdvi
\family default
to preview the LaTeX output.
You can enter the program to use as a viewer (and what options to pass
to it) in the Viewer field.
You can also modify the viewer associated with a pre-defined format simply
by changing what you find in this field, clicking the
\family sans
Modify
\family default
button, and then (if you're sure you want to do this) clicking the
\family sans
Apply
\family default
or
\family sans
Save
\family default
button.
\begin_inset Foot
status collapsed
\begin_layout Standard
Changes to the formats are kept in the
\family typewriter
preferences
\family default
file in you local LyX directory (for example,
\family typewriter
$HOME/.lyx/
\family default
).
If you want to restore the defaults, edit this file and delete the lines
in the Formats and Converters sections.
\end_layout
\end_inset
For example, to change the
\family typewriter
dvi
@ -36042,14 +36287,148 @@ Modify
.
\end_layout
\begin_layout Section
File Formats
\begin_layout Standard
If the operating system has a default viewer associated to a format, this
viewer is used instead of the one defined here in the Windows® and OS X
versions of LyX.
(It is planned to implement this feature on other platforms.)
\end_layout
\begin_layout Standard
Editors are like viewers: Each Format can have an Editor associated to it,
entered in the Editor field, and the editor associated with a format can
be altered via the
\family sans
Tools\SpecialChar \menuseparator
Preferences:Converters
\family default
dialog.
LyX will launch the associated editor whenever an included file
\begin_inset Foot
status collapsed
\begin_layout Standard
This can be an included
\family typewriter
.tex
\family default
file, a verbatim included text file, external material or an included graphics
file.
\end_layout
\end_inset
needs to be edited.
\end_layout
\begin_layout Section
Copiers
\end_layout
\begin_layout Standard
Each Format can have a Copier associated with it.
These are defined in the
\family sans
\bar under
T
\bar default
ools\SpecialChar \menuseparator
\bar under
P
\bar default
references:Copiers
\family default
dialog.
Since all conversions from one Format to another take place in LyX's temporary
directory, it is sometimes necessary to modify a file before copying it
to the temporary directory in order that the conversion may be performed.
\begin_inset Foot
status collapsed
\begin_layout Standard
For example, the file may refer to other files---images, for example---using
relative filenames, and these may become invalid when the file is copied
to the temporary directory.
\end_layout
\end_inset
This is done by the Copier: It copies a file to (or from) the temporary
directory and may modify it in the process.
\end_layout
\begin_layout Standard
Copiers may also be used for other purposes.
For example, if appropriate converters are found, LyX will automatically
install copiers for the html and wordhtml formats.
When these formats are exported, the copier sees to it that not just the
main HTML file but various associated files (style files, images, and the
like) are also copied, and all these files are written to a subdirectory
of the directory in which the original LyX file was found.
The copier may of course be customized.
The optional -e argument takes a comma-separated list of extensions to
be copied; if it is omitted, all files will be copied.
The -t argument determines the extension added to the generated directory.
By default, it is
\begin_inset Quotes eld
\end_inset
LyXconv
\begin_inset Quotes erd
\end_inset
, so HTML generated from
\family typewriter
/path/to/filename.lyx
\family default
will end up in
\family typewriter
/path/to/filename.html.LyXconv
\family default
.
\end_layout
\begin_layout Standard
The definitions of the copiers may use four variables:
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
$$s The LyX system directory (e.g.,
\family typewriter
/usr/share/lyx
\family default
).
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
$$i The input file
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
$$o The output file
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
$$l The `LaTeX name'
\end_layout
\begin_layout Standard
The latter is to be given in a form suitable for inclusion in a LaTeX
\family typewriter
\backslash
include
\family default
command and is relevant only when exporting files suitable for such inclusion.
\end_layout
\begin_layout Chapter
Units available in LyX
\begin_inset LatexCommand index
@ -36885,6 +37264,51 @@ target "http://www.tex.ac.uk/cgi-bin/texfaq2html"
\end_inset
\end_layout
\begin_layout Bibliography
\begin_inset LatexCommand bibitem
key "makeindex"
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Standard
\backslash
href{http://tug.ctan.org/indexing/makeindex/doc/manpages.dvi}{
\end_layout
\end_inset
Documentation
\begin_inset ERT
status collapsed
\begin_layout Standard
}
\end_layout
\end_inset
of the program
\family sans
makeindex
\family default
:
\newline
\begin_inset LatexCommand url
target "http://tug.ctan.org/indexing/makeindex/doc/manpages.dvi"
\end_inset
\end_layout
\begin_layout Bibliography