Next Up Previous Contents
Next: 3.4 Using marks to position bitmaps
Up: 3 Usage notes
Previous: 3.2 Using dvi2bitmap in a pipe
[ID index][Keyword index]

3.3 Processing many bitmaps

If you have a large number of fragments of TeX to process, it is best not to invoke dvi2bitmap for each one individually. Also, the program does not (yet) allow you to specify more than one DVI file as input. In this situation, it is best to generate an input TeX or LaTeX file which contains all of the text you wish to process, with one fragment per page.

For example, the following can help:


\documentclass{article}
\pagestyle{empty}
\special{dvi2bitmap default imageformat png}
\newcommand{\neweq}[1]{\vfil\break\special{dvi2bitmap outputfile #1.png}}
\begin{document}

\neweq{index-html-alpha}
$\alpha$

\neweq{index-html-aprime}
$A'=(0,\alpha,0,0)$

[...]

\end{document}
That includes a special to make PNG the default output format, and defines a command sequence, \neweq which simultaneously forces a new page and inserts a special to name the output file. A script which generates a file like this and then looks for the resulting bitmaps, with known names of course, can run very efficiently. Combining that with the techniques in Section 3.2 can work wonders.


Next Up Previous Contents
Next: 3.4 Using marks to position bitmaps
Up: 3 Usage notes
Previous: 3.2 Using dvi2bitmap in a pipe
[ID index][Keyword index]
Dvi2bitmap -- convert DVI files to bitmap images
Starlink System Note 71
Norman Gray
14 June 1999. Release 0.12. Last updated 20 December 2003