"Dr. Ing. Roland Krause" <[EMAIL PROTECTED]> writes:
| Ok here we go again.
| I am trying to get ps figures to get rendered. I have followed the code to the
| point where gs
| gets called. That is where the problem starts because the standard gswin32c
| (this is gs on windows)
| executable does not have an X11 driver compiled in. I am contemplating to either
| compile a recent Unix gs on NT or recompile the gs distro with an X11 driver.
| The latter would mean that I'd have to make that available if others wanted to
| use it.
|
| Question: Wouldnt it be better to generate e.g. png or jpeg format and then
| insert the jpeg bitmap at the appropriate
| place since that is what gets done after all anyway?
|
| But I also do not understand this code in runqueue() (figinset.C) at this point:
|
| int err = execlp(lyxrc->ps_command.c_str(),
| lyxrc->ps_command.c_str(),
| "-sDEVICE=x11",
| "-dNOPAUSE", "-dQUIET",
| "-dSAFER",
| rbuf, gbuf, tbuf,
| p->data->fname.c_str(),
| "showpage.ps", "quit.ps", "-", 0);
|
| This is the call to gs but what will happen next if that is succesful?
| In my man pages it says that execlp never returns instead takes over the calling
| process but:
| Where does it go?
It goes like this:
- fork
- set up the environment for the gs process that will make gs able to
write directly into the LyX document window (close to the truth)
- exec gs and let it do its work.
This use of gs is something we (I) really want to change. I want us to have
a "subprocess" that converts the image files into the wanted format.
And an InsetFig that asks this "subprocess" for an image.
Preferrably I'd like to have the convertees cached on disk and not in
memory. (ok, sometimes both would be needed.)
As part of this change I'd like to make it possible to use all kind of
graphics format with LyX without user intervention.
The idea is that the InsetFig will be very simple, it should just ask
the GraphicsCache for a image name, the format that it wants it in,
the size aspect, rotatation etc. (as of graphicx.sty) and get an image
object returned from the GraphicsCache. The means he GraphicsCache
uses to provide the correct format does not matter for InsetFig.
InsetFig("foo.png") will f.ex. make GraphicsCache use pngtopnm | \
ppmquant | ppmtoxpm
to make the image to view on screen, and pnmtopnm | pnmtops to create
the image used by latex.
the program "identify" could be used to get the bounding box/image
size from the graphics file.
OK, Who wants to develop this?
Lgb