[OS X TeX] pdf the size of printed text?
Maarten Sneep
maarten.sneep at xs4all.nl
Wed Oct 4 18:42:21 EDT 2006
On 4-okt-2006, at 0:51, Ross Moore wrote:
> All these methods work, but are way more complicated than necessary.
> pdfTeX can do it directly.
>
> See the PDF examples at:
> http://www-texdev.ics.mq.edu.au/WARM/WARMhome/node5.html
This page fails to load for me. All my comments are based on the
snippet below.
> These are multipage PDFs containing at least one page that
> is sized to fit the content.
>
> The examples also have a link to download the (La)TeX source.
> There's about 10 lines of TeX coding towards the end
> that does the \shipout of a box with the correct size and
> contents.
>
> Here are the relevant bits:
>
> \newbox\shipoutbox
>
> \setbox\shipoutbox=\hbox{%
> ... your LaTeX material ...
> ... properly sized and boxed ...
> }
>
> \setbox0=\vbox{\kern-1truein
> \hbox{\kern-1truein
> \framebox{\box\shipoutbox }%
> \kern1 truein}%
> \kern1truein}%
> \dimen0\ht0 \advance\dimen0\dp0
> \pdfpageheight\dimen0
> \pdfpagewidth\wd0
> \shipout\box0
>
>
> That's it.
> You can put as many of these into a document as you like.
> Then you can use \includegraphics[page=<num>]{....}
> to extract the pages as separate PDF images,
> for use within other LaTeX documents.
This isn't that different from the code I use in http://
mactextoolbox.sourceforge.net/articles/baseline.html
The main difference is that I use LaTeX methods, while this is closer
to the metal, in the form of TeX code. Of course, my method is
limited to a single equation, but if you keep in mind what the
destination most likely is (a Keynote presentation), then that isn't
much of a limitation. If I need a latex equation in another latex
document, I'll use \input, if the need arises.
Ross, can you phrase the advantage of this code over mine?
Regards,
Maarten
Murphy's Law, supplemental: Friends come and go, but enemies accumulate.
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the MacOSX-TeX
mailing list