mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 09:32:20 +00:00
Customization.lyx: revise Copiers and Formats section
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@20251 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
22af50e83f
commit
09096f00a9
@ -1717,233 +1717,156 @@ Formats
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The first step is to define your file formats, e.g.
|
The first step is to define your file formats if they are not already defined.
|
||||||
PDF, if they are not already defined.
|
|
||||||
To do so, open the
|
To do so, open the
|
||||||
\family sans
|
\family sans
|
||||||
\bar under
|
Tools\SpecialChar \menuseparator
|
||||||
T
|
Preferences:Converters
|
||||||
\bar default
|
|
||||||
ools\SpecialChar \menuseparator
|
|
||||||
|
|
||||||
\bar under
|
|
||||||
P
|
|
||||||
\bar default
|
|
||||||
references:Converters
|
|
||||||
\family default
|
\family default
|
||||||
dialog.
|
dialog.
|
||||||
Enter a new format name; a new GUI name (used in, e.g., the View and Export
|
Enter a new format name; a new GUI name (used in e.\InsetSpace \thinspace{}
|
||||||
|
g.\InsetSpace ~
|
||||||
|
the
|
||||||
|
\family sans
|
||||||
|
View
|
||||||
|
\family default
|
||||||
|
and
|
||||||
|
\family sans
|
||||||
|
Export
|
||||||
|
\family default
|
||||||
menus); and a file extension.
|
menus); and a file extension.
|
||||||
These are required.
|
These are required.
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
There are also two flags that can be set using the checkboxes in the dialog.
|
The
|
||||||
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
|
\family sans
|
||||||
\bar under
|
Document format
|
||||||
F
|
\family default
|
||||||
\bar default
|
option tells LyX that a format is suitable for document export.
|
||||||
ile\SpecialChar \menuseparator
|
If this is is set and if a suitable conversion route exists, the format
|
||||||
|
will appear in the
|
||||||
\bar under
|
\family sans
|
||||||
E
|
File\SpecialChar \menuseparator
|
||||||
\bar default
|
Export
|
||||||
xport
|
|
||||||
\family default
|
\family default
|
||||||
menu.
|
menu.
|
||||||
The format will also appear in the
|
The format will also appear in the
|
||||||
\family sans
|
\family sans
|
||||||
\bar under
|
View
|
||||||
V
|
|
||||||
\bar default
|
|
||||||
iew
|
|
||||||
\family default
|
\family default
|
||||||
menu if it has a viewer associated with it.
|
menu if it has a specified viewer.
|
||||||
(See below.) Pure image formats (e.g.\InsetSpace ~
|
Pure image formats, e.\InsetSpace \thinspace{}
|
||||||
|
g.\InsetSpace ~
|
||||||
|
|
||||||
\family typewriter
|
\family typewriter
|
||||||
png
|
png
|
||||||
\family default
|
\family default
|
||||||
) should not have this flag set; formats that can both represent vector
|
, should not use this option.
|
||||||
graphics and documents (e.g.\InsetSpace ~
|
Formats that can both represent vector graphics and documents like e.\InsetSpace \thinspace{}
|
||||||
|
g.\InsetSpace ~
|
||||||
|
|
||||||
\family typewriter
|
\family typewriter
|
||||||
pdf
|
pdf
|
||||||
\family default
|
\family default
|
||||||
) should have it set.
|
should use it.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The
|
The option
|
||||||
\family typewriter
|
\family sans
|
||||||
vector
|
Vector graphics format
|
||||||
\family default
|
\family default
|
||||||
flag tells LyX whether a format can contain vector graphics.
|
tells LyX that a format can contain vector graphics.
|
||||||
This information is used to determine the target format of included graphics
|
This information is used to determine the target format of included graphics
|
||||||
for
|
for
|
||||||
\family typewriter
|
\family sans
|
||||||
pdflatex
|
pdflatex
|
||||||
\family default
|
\family default
|
||||||
export.
|
export.
|
||||||
Included graphics may need to be converted to either
|
Included graphics may need to be converted to either
|
||||||
\family typewriter
|
\family sans
|
||||||
pdf
|
pdf
|
||||||
\family default
|
\family default
|
||||||
,
|
,
|
||||||
\family typewriter
|
\family sans
|
||||||
png
|
png
|
||||||
\family default
|
\family default
|
||||||
or
|
, or
|
||||||
\family typewriter
|
\family sans
|
||||||
jpg
|
jpg
|
||||||
\family default
|
\family default
|
||||||
, since
|
, since
|
||||||
\family typewriter
|
\family sans
|
||||||
pdflatex
|
pdflatex
|
||||||
\family default
|
\family default
|
||||||
cannot handle other image formats.
|
cannot handle other image formats.
|
||||||
If an included graphic is not already in
|
If an included graphic is not already in
|
||||||
\family typewriter
|
\family sans
|
||||||
pdf
|
pdf
|
||||||
\family default
|
\family default
|
||||||
,
|
,
|
||||||
\family typewriter
|
\family sans
|
||||||
png
|
png
|
||||||
\family default
|
\family default
|
||||||
or
|
, or
|
||||||
\family typewriter
|
\family sans
|
||||||
jpg
|
jpg
|
||||||
\family default
|
\family default
|
||||||
format, it is converted to
|
format, it is converted to
|
||||||
\family typewriter
|
\family sans
|
||||||
pdf
|
pdf
|
||||||
\family default
|
\family default
|
||||||
if the
|
if the vector format option is set, and otherwise to
|
||||||
\family typewriter
|
\family sans
|
||||||
vector
|
|
||||||
\family default
|
|
||||||
flag of the format is set, and otherwise to
|
|
||||||
\family typewriter
|
|
||||||
png
|
png
|
||||||
\family default
|
\family default
|
||||||
.
|
.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
A Format can have a Viewer associated with it.
|
A Format can have a Viewer and Editor program associated with it.
|
||||||
For example, you might want to use
|
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
|
\family sans
|
||||||
Modify
|
Ghostview
|
||||||
\family default
|
\family default
|
||||||
button, and then (if you're sure you want to do this) clicking the
|
to view PostScript files.
|
||||||
|
You can enter the program call and its options to the corresponding fields.
|
||||||
|
For the call you can use the four variable listed in the next section.
|
||||||
|
The viewer is launched when you view an image in LyX or use the
|
||||||
\family sans
|
\family sans
|
||||||
Apply
|
View
|
||||||
\family default
|
\family default
|
||||||
or
|
menu.
|
||||||
\family sans
|
If the operating system has a default viewer associated to a format, this
|
||||||
Save
|
viewer is used instead of the one defined here when you enter in the Viewer
|
||||||
\family default
|
field
|
||||||
button.
|
\begin_inset Quotes eld
|
||||||
\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
|
\end_inset
|
||||||
|
|
||||||
For example, to change the
|
|
||||||
\family typewriter
|
|
||||||
dvi
|
|
||||||
\family default
|
|
||||||
viewer, select the
|
|
||||||
\family typewriter
|
|
||||||
DVI
|
|
||||||
\family default
|
|
||||||
format in the dialog, change the viewer to be
|
|
||||||
\family typewriter
|
|
||||||
kdvi
|
|
||||||
\family default
|
|
||||||
(or whatever), and hit
|
|
||||||
\family sans
|
\family sans
|
||||||
\bar under
|
auto
|
||||||
M
|
|
||||||
\bar default
|
|
||||||
odify
|
|
||||||
\family default
|
\family default
|
||||||
|
|
||||||
|
\begin_inset Quotes erd
|
||||||
|
\end_inset
|
||||||
|
|
||||||
.
|
.
|
||||||
\end_layout
|
The editor is for example launched when you press the
|
||||||
|
|
||||||
\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
|
\family sans
|
||||||
\bar under
|
Edit
|
||||||
T
|
\family default
|
||||||
\bar default
|
button in the
|
||||||
ools\SpecialChar \menuseparator
|
\family sans
|
||||||
|
Graphics
|
||||||
\bar under
|
\family default
|
||||||
P
|
or the
|
||||||
\bar default
|
\family sans
|
||||||
references:Converters
|
External material
|
||||||
\family default
|
\family default
|
||||||
dialog.
|
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
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Subsection
|
\begin_layout Subsection
|
||||||
@ -1951,21 +1874,14 @@ Copiers
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Each Format can have a Copier associated with it.
|
Each format can have a Copier associated with it.
|
||||||
These are defined in the
|
These are defined in the
|
||||||
\family sans
|
\family sans
|
||||||
\bar under
|
Tools\SpecialChar \menuseparator
|
||||||
T
|
Preferences:Copiers
|
||||||
\bar default
|
|
||||||
ools\SpecialChar \menuseparator
|
|
||||||
|
|
||||||
\bar under
|
|
||||||
P
|
|
||||||
\bar default
|
|
||||||
references:Copiers
|
|
||||||
\family default
|
\family default
|
||||||
dialog.
|
dialog.
|
||||||
Since all conversions from one Format to another take place in LyX's temporary
|
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
|
directory, it is sometimes necessary to modify a file before copying it
|
||||||
to the temporary directory in order that the conversion may be performed.
|
to the temporary directory in order that the conversion may be performed.
|
||||||
\begin_inset Foot
|
\begin_inset Foot
|
||||||
@ -1981,35 +1897,67 @@ For example, the file may refer to other files---images, for example---using
|
|||||||
|
|
||||||
This is done by the Copier: It copies a file to (or from) the temporary
|
This is done by the Copier: It copies a file to (or from) the temporary
|
||||||
directory and may modify it in the process.
|
directory and may modify it in the process.
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Copiers may also be used for other purposes.
|
Copiers may also be used for other purposes.
|
||||||
For example, if appropriate converters are found, LyX will automatically
|
For example, if appropriate converters are found, LyX will automatically
|
||||||
install copiers for the html and wordhtml formats.
|
install copiers for the
|
||||||
When these formats are exported, the copier sees to it that not just the
|
\family sans
|
||||||
main HTML file but various associated files (style files, images, and the
|
HTML
|
||||||
like) are also copied, and all these files are written to a subdirectory
|
\family default
|
||||||
of the directory in which the original LyX file was found.
|
and
|
||||||
The copier may of course be customized.
|
\family sans
|
||||||
The optional -e argument takes a comma-separated list of extensions to
|
HTML\InsetSpace ~
|
||||||
be copied; if it is omitted, all files will be copied.
|
(MS Word)
|
||||||
The -t argument determines the extension added to the generated directory.
|
\family default
|
||||||
|
formats.
|
||||||
|
When these formats are exported, the copier sees that not just the main
|
||||||
|
HTML file but various associated files (style files, images, etc.) are also
|
||||||
|
copied.
|
||||||
|
All these files are written to a subdirectory of the directory in which
|
||||||
|
the original LyX file was found.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Standard
|
||||||
|
Copier can of course be customized.
|
||||||
|
The optional
|
||||||
|
\begin_inset Quotes eld
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
-e
|
||||||
|
\begin_inset Quotes erd
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
argument takes a comma-separated list of extensions to be copied; if it
|
||||||
|
is omitted, all files will be copied.
|
||||||
|
The
|
||||||
|
\begin_inset Quotes eld
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
-t
|
||||||
|
\begin_inset Quotes erd
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
argument determines the extension added to the generated directory.
|
||||||
By default, it is
|
By default, it is
|
||||||
\begin_inset Quotes eld
|
\begin_inset Quotes eld
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\family sans
|
||||||
LyXconv
|
LyXconv
|
||||||
|
\family default
|
||||||
|
|
||||||
\begin_inset Quotes erd
|
\begin_inset Quotes erd
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
, so HTML generated from
|
, so HTML generated from
|
||||||
\family typewriter
|
\family sans
|
||||||
/path/to/filename.lyx
|
/path/to/filename.lyx
|
||||||
\family default
|
\family default
|
||||||
will end up in
|
will end up in
|
||||||
\family typewriter
|
\family sans
|
||||||
/path/to/filename.html.LyXconv
|
/path/to/filename.html.LyXconv
|
||||||
\family default
|
\family default
|
||||||
.
|
.
|
||||||
@ -2022,8 +1970,10 @@ The definitions of the copiers may use four variables:
|
|||||||
|
|
||||||
\begin_layout List
|
\begin_layout List
|
||||||
\labelwidthstring 00.00.0000
|
\labelwidthstring 00.00.0000
|
||||||
$$s The LyX system directory (e.g.,
|
$$s The LyX system directory (e.\InsetSpace \thinspace{}
|
||||||
\family typewriter
|
g.\InsetSpace ~
|
||||||
|
|
||||||
|
\family sans
|
||||||
/usr/share/lyx
|
/usr/share/lyx
|
||||||
\family default
|
\family default
|
||||||
).
|
).
|
||||||
@ -2045,12 +1995,13 @@ $$l The `LaTeX name'
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The latter is to be given in a form suitable for inclusion in a LaTeX
|
The latter is to be given in a form suitable for inclusion in a LaTeX's
|
||||||
\family typewriter
|
|
||||||
|
\series bold
|
||||||
|
|
||||||
\backslash
|
\backslash
|
||||||
include
|
include
|
||||||
\family default
|
\series default
|
||||||
command and is relevant only when exporting files suitable for such inclusion.
|
command and is relevant only when exporting files suitable for such inclusion.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user