On Aug 10, 2006, at 6:25 AM, Georg Baum wrote:
Jens Noeckel wrote:
I had brought up an issue on the LyX users list, see the quoted text
below; meanwhile I've looked around for some more info on this, and
felt I could make some suggestions here. Looking at Bug 2419, I see
the rationale for having self-contained export from LyX to LaTeX that
includes the matching graphics formats as well. But I think in order
for LyX to retain its full customizability it is also essential to
have a pure LaTeX export function that leaves included graphics
untouched.
Why? The exported document is useless without the converted images.
If the
images are already in a suitable format they are not converted (at
least in
theory. If that is not the case please file a bug report).
Right now, both "plain and PDF"-latex exports run additional scripts
that attempt to provide not only the LaTeX file but also the
corresponding graphics files. But those kinds of scripts are not the
core functionality of a LaTeX export - they are added sugar. If they
have to be in the export menu, they should certainly not REPLACE the
original pure LaTeX file export; they should be offered IN ADDITION
to it.
I guess that would not be too difficult to implement, but I see no
reason to
do it. Maybe it would help if you describe what exactly you are
trying to
do.
The simple answer is: I'd like to see backwards compatibility
restored, because if you want to take lyx seriously as a command-line
tool AS WELL AS a GUI application, you have to expect that users will
find unforeseen uses for lyx. Just as the makers of ImageMagick had
to expect that "convert -depth 8" will be made an integral part of
LyX, the makers of lyx should then expect that "lyx --export" will be
relied on in some new application. Since "lyx --export" used to leave
graphics untouched in earlier versions, it should stay that way. What
would LyX developers say if "convert -depth 8" suddenly started to
add a legend to every figure it converts... (just to make a point)?
There are many applications for a bare LaTeX export. For one of my
lectures several years ago, I had made a script that exports a LyX
document as as PHP script so that it not only shows what I typed but
also includes some dynamic information. In that case, the included
graphics were placeholders for the points where dynamic information
is inserted in the PHP script. So I have no need for the graphics
from the LyX document to be touched during export.
That's perhaps one of the more esoteric applications. But if I look
at the LyX export menu, there is a Custom Option, which obviously
means that you encourage the user's creativity in this respect. A
more "main-stream" application of plain LaTeX export, which I have
used for large documents under LyX 1.3.6, is to make an improved HTML
converter based on tex4ht. You already have HTML and OpenOffice
export in LyX, but the HTML export is hard-coded and therefore
doesn't allow all the flexibility of the tex4ht post-processors to be
used. The idea there was to create more readable HTML with math
content, but not to rely on MathML. tex4ht is excellent for this kind
of thing, but only if you can really customize it.
In this case, I export the LyX file to a temporary tex file, make
various replacements in the tex file (using tex4ht's HCode to insert
custom CSS layouts in inline equations that have simple two-
dimensional structures like vectors or overbars, thereby reducing the
number of GIFs needed for inline formulas). Now during this whole
process, there is NEVER any need for EPS graphics version of my LyX
document to be created. All I need is the original graphics, the
plain tex file, and then feed a modified tex file (with the ORIGINAL
pictures) to htlatex (tex4ht) which then converts graphics to PNG or
JPG format.
This is just one example that I actually use a lot. I'm sure that
many others can be contrived...
Jens