[cl-pdf-devel] Generating embeddable Postscript?
Björn Lindberg
d95-bli at nada.kth.se
Wed Oct 13 10:33:57 UTC 2004
"Marc Battyani" <marc.battyani at fractalconcept.com> writes:
> Hi Björn,
>
> Björn Lindberg wrote:
>
>
> >My ultimate goal is to be able to programmatically generate Postscript
> >histograms, and embed them into Latex documents. For this, cl-pdf
> >seems at least to be a good start. At the very least I should be able
> >to generate PDF files containing the histograms, convert them to
> >(E)PS, and include them into the Latex documents.
>
> AFAIK, you can directly include PDF files in LaTeX so you don't need to
> generated them in Postscript.
> BTW LaTeX is deprecated you should use cl-typesetting ;-)
>
> >What I am wondering is wether it is possible to
>
> >(a) Avoid having to put the histograms on a "page", so that I don't
> > have to prune it later.
>
> You can't have a standalone histogram. The graphic stream is not enough, you
> at least need the fonts.
> But you can make a small page that has exactly the size needed to put the
> histogram.
This seems to work well, I have been experimenting with the :bounds
argument to with-page, and the results are good. The only problem now
is that when I try to include the PDF file in Latex, it complains that
! LaTeX Error: Cannot determine size of graphic in \unhbox
\voidb at x \penalty \@ M \ /src/lisp/pdf.pdf (no BoundingBox).
>From googling it seems that the PDF file is missing a BoundingBox
parameter that tells Latex the coordinates of the figure. I tried
converting to PS and to EPS, but to no avail. Would you happen to have
any idea on how to work around this?
> >(b) Would it even be possible to make cl-pdf output PS directly?
>
> There is no need for this. Postscript devices can render PDF files directly
> and there are utilities like pdftops which can convert a PDF file to PS and
> EPS.
>
> >(c) Is there a much better approach to all this which I am missing?
>
> Yes, keep the PDF as LaTeX can include it.
> Or even better you could switch to cl-typesetting :)
I already have a large part of this document in Latex, and also I have
to use a certain document class. But next time, I will have a look at
cl-typesetting. One step at a time... :-)
If cl-pdf works out for what I want to do it would be a huge time
saver for me. The data for the histograms is produced by a lisp
program, so generating texable histograms is hopefully just a matter
of writing one more lisp function.
Thanks for your help, and thanks for the very cool cl-pdf!
Björn
More information about the cl-pdf-devel
mailing list