From c5302d6e70af92a0af1ac25b956b650bd04d65b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Thu, 13 Sep 2007 01:14:55 +0000 Subject: [PATCH] Customization.lyx: revise Converters, Copiers and Formats section git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20252 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/doc/Customization.lyx | 415 +++++++++++++++++++------------------- 1 file changed, 206 insertions(+), 209 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 291798d8f8..237f82bc54 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -1,5 +1,5 @@ #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ -\lyxformat 283 +\lyxformat 284 \begin_document \begin_header \textclass book @@ -1717,233 +1717,156 @@ Formats \end_layout \begin_layout Standard -The first step is to define your file formats, e.g. - PDF, if they are not already defined. +The first step is to define your file formats if they are not already defined. To do so, open the \family sans -\bar under -T -\bar default -ools\SpecialChar \menuseparator - -\bar under -P -\bar default -references:Converters +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 + 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. 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 +The +\family sans +Document format \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 + option tells LyX that a format is suitable for document export. + If this is is set and if a suitable conversion route exists, the format + will appear in the \family sans -\bar under -F -\bar default -ile\SpecialChar \menuseparator - -\bar under -E -\bar default -xport +File\SpecialChar \menuseparator +Export \family default menu. The format will also appear in the \family sans -\bar under -V -\bar default -iew +View \family default - menu if it has a viewer associated with it. - (See below.) Pure image formats (e.g.\InsetSpace ~ + menu if it has a specified viewer. + Pure image formats, e.\InsetSpace \thinspace{} +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 ~ +, should not use this option. + Formats that can both represent vector graphics and documents like e.\InsetSpace \thinspace{} +g.\InsetSpace ~ \family typewriter pdf \family default -) should have it set. + should use it. \end_layout \begin_layout Standard -The -\family typewriter -vector +The option +\family sans +Vector graphics format \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 for -\family typewriter +\family sans pdflatex \family default export. Included graphics may need to be converted to either -\family typewriter +\family sans pdf \family default , -\family typewriter +\family sans png \family default - or -\family typewriter +, or +\family sans jpg \family default , since -\family typewriter +\family sans pdflatex \family default cannot handle other image formats. If an included graphic is not already in -\family typewriter +\family sans pdf \family default , -\family typewriter +\family sans png \family default - or -\family typewriter +, or +\family sans jpg \family default format, it is converted to -\family typewriter +\family sans pdf \family default - if the -\family typewriter -vector -\family default - flag of the format is set, and otherwise to -\family typewriter + if the vector format option is set, and otherwise to +\family sans png \family default . \end_layout \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 -\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 +Ghostview \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 -Apply -\family default - or -\family sans -Save +View \family default - button. -\begin_inset Foot -status collapsed + menu. + If the operating system has a default viewer associated to a format, this + viewer is used instead of the one defined here when you enter in the Viewer + field +\begin_inset Quotes eld +\end_inset -\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 sans +auto \family default -). - If you want to restore the defaults, edit this file and delete the lines - in the Formats and Converters sections. -\end_layout +\begin_inset Quotes erd \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 +. + The editor is for example launched when you press the +\family sans +Edit \family default - (or whatever), and hit + button in the \family sans -\bar under -M -\bar default -odify +Graphics \family default -. -\end_layout - -\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 + or the \family sans -\bar under -T -\bar default -ools\SpecialChar \menuseparator - -\bar under -P -\bar default -references:Converters +External material \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 Subsection @@ -1951,21 +1874,14 @@ Copiers \end_layout \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 \family sans -\bar under -T -\bar default -ools\SpecialChar \menuseparator - -\bar under -P -\bar default -references:Copiers +Tools\SpecialChar \menuseparator +Preferences:Copiers \family default 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 to the temporary directory in order that the conversion may be performed. \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 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. + install copiers for the +\family sans +HTML +\family default + and +\family sans +HTML\InsetSpace ~ +(MS Word) +\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 \begin_inset Quotes eld \end_inset + +\family sans LyXconv +\family default + \begin_inset Quotes erd \end_inset , so HTML generated from -\family typewriter +\family sans /path/to/filename.lyx \family default will end up in -\family typewriter +\family sans /path/to/filename.html.LyXconv \family default . @@ -2022,8 +1970,10 @@ The definitions of the copiers may use four variables: \begin_layout List \labelwidthstring 00.00.0000 -$$s The LyX system directory (e.g., -\family typewriter +$$s The LyX system directory (e.\InsetSpace \thinspace{} +g.\InsetSpace ~ + +\family sans /usr/share/lyx \family default ). @@ -2045,12 +1995,13 @@ $$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 +The latter is to be given in a form suitable for inclusion in a LaTeX's + +\series bold \backslash include -\family default +\series default command and is relevant only when exporting files suitable for such inclusion. \end_layout @@ -2059,33 +2010,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 @@ -2094,11 +2087,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 @@ -2122,19 +2111,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 @@ -2143,13 +2140,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 @@ -2186,10 +2184,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 -- 2.39.5