[texhax] compile to a small PDF
Philip TAYLOR
P.Taylor at Rhul.Ac.Uk
Mon Sep 8 17:25:25 CEST 2008
ap wrote:
> But that's not satisfactory when I want, for some reasons, to compile
> using the pdflatex engine. So my question is, how can I generate a PDF
> using pdflatex in a way that acts like (latex + dvips -E + epstopdf) ?
An idea (untested) : typeset into a box, measure
the box, then set PdfTeX's page dimensions to the
box dimensions before shipping the box out.
Something like :
\setbox 0 = \hbox {$x = {-b \pm \sqrt {b^2 - 4ac} \over 2a}$}
\hsize = \wd 0
\vsize = \ht 0
\advance \vsize by \dp 0
\pdfpageheight = \vsize
\pdfpagewidth = \hsize
\pdfhorigin = 0 px
\pdfvorigin = 0 px
\box 0
\end
Philip TAYLOR
More information about the texhax
mailing list