bmeps + dvips add-on
Usage
Preparing LaTeX sources
In the header section of your TeX source write
\DeclareGraphicsRule{.png}{eps}{.bb}{}
This advises LaTeX to treat PNG graphics as EPS. Bounding box
information is retrieved from files having the suffix .bb.
The bmeps program can be used to create .bb-files, i.e.
bmeps -b file1.png file1.bb
creates the bounding box for graphics file file1.png and stores
the bounding box data into file1.bb.
You can use shell scripts like the following to create bounding box files
for all PNG files in a given directory:
#! /bin/csh
foreach png (*.png)
set j = $png:r
set bb = ${j}.bb
bmeps -b ${png} ${bb}
end
New dvips command line options
Options can be given on command line via
-I <conversion-options>
where conversion-options is a string containing the following characters:
- PS level
Use 1, 2 or 3 to select the PS level 1, 2 or 3.
- Color or grayscale printer
Use c if you have a color printer or g for conversion to
grayscale. Color printing requires PS level 2 or higher.
- Encoding algorithms
Use f to get flate encoding (requires PS level 3), r
to get run-length-encoding (requires PS level 2), 8 to
get ASCII85-encoding instead ASCII-Hex-encoding (requires PS level 2) or
h to use ASCII-Hex-encoding.
Flate encoding, run-length-encoding and one from ASCII85- or ASCII-Hex-encoding
can be used combined.
- Draft mode
Use d to turn draft mode on. bitmap images are not printed, only
the place is marked.
- Alpha channel use
To convert an alpha channel into an EPS level 3 masked
bitmap use the a option. By use of o you can
specify the alpha channel expresses opacity (default), t
specifies transparency. Normally only pixels with 0 opacity
are masked, all others are drawn. The alternative behaviour is
to draw only pixels with full opacity and mask all others, this
can be reached by option l.
If no command line options are given dvips consults the environment variable
EPSOUTPUT.
Option examples
- -I 2g8r
is suitable for most Level 2 printers (or at least for my printer).
- -I 3c8rf
keeps colors and provides a good compression rate. Usefull for large documents
to be post-processed by ps2pdf.
- -I d
prints a draft. Images are not really inserted, placeholders are
used instead. This is a fast way to get a preview.
Option defaults
Be default dvips is configured for PS level 2,
grayscale printing and uses run-length-encoding in combination
whit ASCII-85-encoding.
Dirk Krause d.krause@e-technik.fh-schmalkalden.de 2000/08/16