FAQ |
PDF manual "bmeps.pdf" available german PDF manual "bmepsde.pdf" available |
Basics
What is bmeps?
bmeps is a project to add bitmap graphics support to dvips.
It consists of three parts:
- a library containing routines for conversion from different bitmap graphic types to EPS,
- a command line tool to do conversions and to get bounding box data and
- modifications in dvips sources to call these routines.
Which filetypes are supported?
The filetypes supported are:
- PNG
- JPEG
- PNM/PPM/PGM/PBM
- it provides a good compression rata,
- the compression is not lossy and
- the license conditions allow to distribute PNG related software as open source.
The JPEG file format uses DCT compression. Compression is lossy, typically the picture quality can be adjusted by the user during JPEG export in graphics applications.
The JPEG file format is a good choice for "natural scenes" such as photos.
Bmeps runs some tests on JPEG files (check for image dimensions, number of color channels, number of bits per components; check for usable SOF markers...), on success it uses the JPEG file directly as DCT-encoded data and only adds ASCII85- or ASCII-Hex-encoding. If one of the tests fails the JPEG library is used to decode the image and uses the combination of run-length, flate and ASCII85-/ASCII-Hex-encoding for output.
Support for NetPBM filetypes was added because it allows to use a lot of image file types via the NetPBM tools.
One can convert other image types to EPS by
xxxtopnm image.xxx | bmeps > image.epsThe library can be extended to add support for further filetypes.
- New configuration mechanism
Version 1.x.x required to specify all conversion features as command line argument. Version 2.x.x only needs the name of a configuration, in most cases one of the built-in configurations will meet your needs. The built-in configurations have the usefull features turned on automatically.
I think it is easier to writebmeps -l eps2 ...
instead ofbmeps -p 2 -c -e 8r ...
- Additional compression methods
Bmeps can pass-through DCT-compressed data from JPEG files (in most cases).
Using the "multiple data sources" feature in PS level 2 and above allows run-length compression of colored rows and areas. - PDF output
Bmeps can now produce PS/EPS and PDF output and bounding box files for LaTeX. - Partial TIFF support
Bmeps uses the TIFFReadRGBAImage() function from the libtiff library, so bmeps can only handle TIFF images readable by that function.
The intended purpose of the partial TIFF support is to convert TIFF files produced by a fax gateway to PDF for better viewing. This was tested successfully.
The TIFF file format is a collection of different compression and encoding mechanisms. The TIFF V6.0 baseline standard lists a number of TIFF tags, but some software vendors also use non-standard tags when writing TIFF files. You should not be surprised if bmeps fails to convert a TIFF file. If you have a choice, use PNG files instead.
Installation
Installation from source on Unix/Linux systems
Where can I get it?
Source code and documentation can be found at
http://sourceforge.net/projects/bmeps.
What other software is required to install bmeps?
You need to install
- zlib, http://www.gzip.org/zlib/ (required)
- libbz2, http://sources.redhat.com/bzip2/ (optional)
- libpng, http://www.libpng.org/pub/png/libpng.html (required)
- JPEG lib, ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz (required)
- NetPBM, ftp://ftp.metalab.unc.edu/pub/Linux/apps/graphics/convert/netpbm-10.11.10.tgz (optional)
- Tiff library, http://www.remotesensing.org/libtiff (optional)
- dklibs libraries, http://dklibs.sourceforge.net/ (required)
Install the libraries in the given order, set the environment variables CPPFLAGS, CFLAGS and LDFLAGS so the header files and libraries are found.
Example:
CPPFLAGS: -I/usr/local/netpbm/include -I/usr/local/include -I/usr/include CFLAGS: -KPIC -xCC -v -I/usr/local/netpbm/include -I/usr/local/include -I/usr/include LDFLAGS: -L/usr/local/netpbm/lib -L/usr/local/lib -L/usr/lib
What does "system preparation" mean?
Before you install this software or any of the required/recommended
libraries you must make sure the software can be built.
The C compiler must be ready to use both header files distributed
with your system and as a part of additional software. The linker
must be configured to use both the system libraries and additional
libraries.
Some C compilers and linkers are only pre-configured to use libraries
shipped with the OS or with the compiler, but no additional libraries.
In such cases you need to extend the search paths.
If additional software is installed into /usr/local (found on many
Unix/Linux systems), /sw (found on MacOS) or /opt/another-directory
(just an example) the C compiler must be configured to search for
header files in /usr/local/include, /sw/include and
/opt/another-directory/include in addition to the default directories.
The linker must be configured to search for library files in
/usr/local/lib, /sw/lib and /opt/another-directory/lib.
Why doesn't the configure script handle an incomplete setup?
- If software distributions provide a C compiler and libraries and install both into /sw, it is common sense that C compiler and linker must have /sw/include and /sw/lib in the search paths. The installation process should set this automatically or remind you to do it manually.
- The effort would be growing with m*n*p where m is the number of directories (/usr/local, /sw, /opt/another-directory, /opt/yet-another-directory...), n is the number of compilers to support (one wants CFLAGS, one wants C_INCLUDE_PATH...) and p is the number of projects to maintain.
- Automatic guessing of directories is not the usual behaviour of configure scripts. Most users expect the configure script to use exactly the search paths they have configured.
- To check for a number of directories and to support a number of compilers would produce more code in the configure script than the real configure script contents. But I like to keep things small and simple.
- This large amount of work is possibly (and likely) for the trash can after software distribution comes with a useful setup.
For gcc, how can I report the include search path?
Type
gcc -v -E -and press CTRL-D after inspecting the output.
Normally the library search path is corresponding to the include search path, the final "include" subdirectory is replaced by "lib".
How can I set the search paths?
You can set the environment variables CFLAGS and LDFLAGS, i.e.
CPPFLAGS="-I/usr/local/include -I/sw/include -I/opt/another-directory/include" CFLAGS="-I/usr/local/include -I/sw/include -I/opt/another-directory/include" LDFLAGS="-L/usr/local/lib -L/sw/lib -L/opt/another-directory/lib" export CPPFLAGS CFLAGS LDFLAGSTo have the settings available immediately after each login, add a section
if [ "X$CPPFLAGS" = "X" ] then CPPFLAGS="-I/usr/local/include -I/sw/include -I/opt/another-directory/include" else CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/sw/include -I/opt/another-directory/include" fi if [ "X$CFLAGS" = "X" ] then CFLAGS="-I/usr/local/include -I/sw/include -I/opt/another-directory/include" else CFLAGS="$CFLAGS -I/usr/local/include -I/sw/include -I/opt/another-directory/include" fi if [ "X$LDFLAGS" = "X" ] then LDFLAGS="-L/usr/local/lib -L/sw/lib -L/opt/another-directory/lib" else LDFLAGS="$LDFLAGS -L/usr/local/lib -L/sw/lib -L/opt/another-directory/lib" fi export CPPFLAGS CFLAGS LDFLAGSto your .profile file.
To make the settings available to all users, add the section to /etc/profile.
Note: Different shells might use different file names and a different syntax.
For gcc, how can I set defaults for the search paths?
For gcc you can use environment variables instead of command line options
to extend the search paths. Add
if [ "X$C_INCLUDE_PATH" = "X" ]
then
C_INCLUDE_PATH="/usr/local/include:/sw/include:/opt/another-directory/include"
else
C_INCLUDE_PATH="${C_INCLUDE_PATH}:/usr/local/include:/sw/include:/opt/another-directory/include"
fi
if [ "X$CPP_INCLUDE_PATH" = "X" ]
then
CPP_INCLUDE_PATH="/usr/local/include:/sw/include:/opt/another-directory/include"
else
CPP_INCLUDE_PATH="${CPP_INCLUDE_PATH}:/usr/local/include:/sw/include:/opt/another-directory/include"
fi
if [ "X$LIBRARY_PATH" = "X" ]
then
LIBRARY_PATH="/usr/local/include:/sw/include:/opt/another-directory/include"
else
LIBRARY_PATH="${LIBRARY_PATH}:/usr/local/include:/sw/include:/opt/another-directory/include"
fi
export C_INCLUDE_PATH CPP_INCLUDE_PATH LIBRARY_PATH
either to your .profile (for a user-specific setup) or to /etc/profile
(for a system-wide setup).
Note: Different shells might use different file names and a different syntax.
How do I install the bmeps library?
Unpack the bmeps.tgz file.
Change into the bmeps directory, run
./configure make make installMake sure to set the environment variable CFLAGS and LDFLAGS properly.
Should I build a modified dvips driver?
Simple answer: If you want to convert images ``on the fly'' -- yes.
The modified driver runs faster when converting pictures because
it is not necessary to start background processes for each picture.
If you want to do image conversion on the fly using the original dvips
this requires to run external programs. This is denied by default
in most modern LaTeX distributions. Using the ``-R0'' dvips option
does not only allow to run the bmeps program for image conversion,
it allows to run any command a *.dvi file contains. Are you sure
there are no destructive commands in a *.dvi file you want to process?
How do I build the modified dvips driver?
Download tetex-src.tar.gz from
ftp://ftp.dante.de/pub/tex/systems/unix/teTeX/current/distrib. Unpack the archive using
gzip -dc tetex-src.tar.gz | tar xf -Change into the texk sources directory using
cd tetex-src-2.0.2 cd texkMake sure the environment variables needed to run TeX are set.
Change into the kpathsea-* directory and run
./configure ... make make installNow go into the dvipsk-* directory and run
./configure ... make make installPossibly you want to make a backup copy of the unmodified dvips as dvips.original.
If you succeeded to build an unmodified dvips you can copy the contents of the .../bmeps/dvips-mods directory into the dvipsk source directory.
Now run
make make installagain to build and install the modified dvips.
Installation on Windows systems
I'm on a Win32 system. Is there a binary?
In the download section of
http://sourceforge.net/projects/dklibs
get the executable setup from the dklibs-win32 section.
If you just want to use bmeps get the *user*.exe file. If you are
interested in development... get the *dev*.exe file. Note: The developer
file is significantly larger.
For previous versions (1.x.x) a Windows binary was shipped with the
source package of bmeps.
Bmeps 2.x.x uses the dklibs library set and needs
the supplemental files (libraries, string tables...), so it can not
run without if the dklibs library set is not installed.
I'm on a Win32 system. How can I build bmeps.exe?
Building bmeps.exe is not trivial and requires practical
skills in using your development software on Win32.
For normal users I recommend to use the binary package mentioned above.
The text below gives a general guideline how to build the executable
and the libraries it depends on. Depending on library versions and depending
on your development software the information below might be only
partially valid.
Some notes about the Visual C++ runtime library:
There are at least 6 different versions of the runtime library:
| C-compiler switch | Purpose |
|---|---|
| /ML | static, single-thread, release |
| /MLd | static, single-thread, debug |
| /MT | static, multi-thread, release |
| /MTd | static, multi-thread, debug |
| /MD | DLL, multi-thread, release |
| /MDd | DLL, multi-thread, release |
The linker inspects the modules and tries to load support for all the run-time library versions found in all modules (even in modules in *.lib files). If different run-time library switches were used in some modules the linker complains about conflicts.
Conclusion: You need to compile all libraries and bmeps using the same version of the run-time library.
If you decide to use static libraries, I suggest "/MT", if you decide to build DLLs, use "/MD /GD" for the libraries and "/MD" for the application.
First we need to create the zlib library.
Copy the files from the Win32 subdirectory into the libraries top-level directory, modify the makefile "makefile.msc" (replace "/MD" by "/MT" if you want to build a static library), run nmake and copy the files into the appropriate places:
xcopy win32\*.* . /Y edit makefile.msc nmake -f makefile.msc zlib.lib xcopy *.lib \p\lib-stt\lib\ /Y xcopy *.h \p\lib-stt\include\ /YNow we can create the libpng library.
Here we have a makefile in the scripts subdirectory and a *.def file in the projects\msvc directory. Copy both files into the top-level directory, and edit the makefile. If you want to build a static library, replace the CFLAGS line by
CFLAGS= /nologo /MT /Oait -I\p\lib-stt-include /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE"to build a static library or use
CFLAGS= /nologo /MD /GD /Oait -I\p\lib-stt-include /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE"to build a DLL. Replace the section
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) del libpng.lib lib libpng $(OBJS1) lib libpng $(OBJS2) lib libpng $(OBJS3)by
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) -ERASE libpng.lib LIB /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3)to build a static library.
To build a DLL use
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) -ERASE libpng.lib -ERASE libpng.dll LINK /nologo /DLL /RELASE /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /OUT:libpng.dll /IMPLIB:libpng.lib /DEF:png32ms.def $(OBJS1) $(OBJS2) $(OBJS3)instead.
Run
nmake -f makefile.msc libpng.lib xcopy *.lib \p\lib-stt\lib\ /Y xcopy *.dll \p\lib-stt\bin\ /Y xcopy *.h \p\lib-stt\include\ /Y
If you want JPEG support we need to create the JPEG library. The jpeg-6b directory contains a makefile named "makefile.vc" and a configuration header "jconfig.vc"
Edit the makefile, the CFLAGS and LDFLAGS lines should look like this
CFLAGS= /nologo /MT /W3 /O2 /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /I. /QI0f /QIfdiv LDFLAGS= /nologo /RELEASE /INCREMENTAL:NO /SUBSYSTEM:CONSOLECopy "jconfig.vc" to "jconfig.h", build and install the library.
copy jconfig.vc jconfig.h edit makefile.vc nmake -f makefile.vc libjpeg.lib xcopy *.lib \p\lib-stt\lib\ /Y xcopy *.h \p\lib-stt\include\ /YIf you want to create a DLL you need to create the file jpeg.def like this (you can copy and paste from here):
LIBRARY LIBJPEG DESCRIPTION 'The independent JPEG groups JPEG library' EXPORTS jpeg_std_error jpeg_CreateDecompress jpeg_stdio_src jpeg_read_header jpeg_start_decompress jpeg_abort jpeg_read_scanlines jpeg_finish_decompress jpeg_destroy_decompressThe "makefile.vc" should be changed to
CFLAGS= /nologo /MD /GD /W3 /O2 /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /I. /QI0f /QIfdiv LDFLAGS= /nologo /RELEASE /INCREMENTAL:NO /SUBSYSTEM:CONSOLE ... libjpeg.lib: $(LIBOBJECTS) -DEL libjpeg.lib -DEL libjpeg.dll -DEL *.obj LINK /DLL $(LDFLAGS) /OUT:libjpeg.dll /IMPLIB:libjpeg.lib /DEF:jpeg.def $(LIBOBJECTS)before building and installing the library.
If you want NetPBM support we need to create a pbm library. Change into the lib subdirectory. Copy the contents of the util subdirectory to here. Change the shhopt.c file, add the following contents:
char *rindex(char *s, int c)
{
char *back = NULL;
char *ptr;
ptr = s;
while(*ptr) {
if(*ptr == c) {
back = ptr;
}
ptr++;
}
return back;
}
Change the libpm.c file, add the following contents:
#include <io.h>
#include <process.h>
#include <stdlib.h>
static int _S_ISREG(int m)
{
int back = 0;
if((m & _S_IFMT) == _S_IFREG) {
back = 1;
}
return back;
}
Create a makefile "makefile.msc" as follows (you can copy and paste
from here):
# Where do you want to install the software? PREFIX=c:\p\lib-stt # Which programs to use for compiling and linking? CC=CL LD=LINK # Where is Visual C? # Directories lib, include and bin must be beyound this. VC=C:\Programme\DevStudio\Vc all: lib install: all -mkdir $(PREFIX) -mkdir $(PREFIX)\include -mkdir $(PREFIX)\lib -mkdir $(PREFIX)\bin xcopy *.h $(PREFIX)\include\ xcopy ..\*.h $(PREFIX)\include\ xcopy *.lib $(PREFIX)\lib\ clean: -del *.obj -del *.lib -del *.exe -del *.dll lib: netpbm.lib OBJS= libpm.obj bitio.obj colorname.obj \ libpbm1.obj libpbm2.obj libpbm3.obj libpbm4.obj libpbm5.obj \ libpgm1.obj libpgm2.obj \ libppm1.obj libppm2.obj libppmcmap.obj libppm4.obj libppm5.obj \ libppmfloyd.obj \ libpnm1.obj libpnm2.obj libpnm3.obj \ libpam.obj libpammap.obj nstring.obj shhopt.obj netpbm.lib: $(OBJS) lib /nologo /out:netpbm.lib $(OBJS) COBJFLAGS= /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /I. /I.. /I"$(VC)\Include" $(SCD) $(DEFS) /QI0f /QIfdiv .c.obj: $(CC) $(COBJFLAGS) /c $*.c
Now create a new project of type "Win32 Console Application" named bmeps.
Add the sources
- bmepsm.c
- bmeps.c
- bmepsoe.c
- pngeps.c
- jpgeps.c
- pnmeps.c
Add the libraries created above to the project.
Now we need to edit the file bmepsco.h. By default all the libraries are enabled by HAVE_... contants. To disable libraries define the appropriate constants to 0:
| JPEG | HAVE_JPEGLIB_H |
| NetPBM | HAVE_PNM_H |
Where can I get a Win32 binary of the modified dvips?
The MikTeX 2.1 distribution includes a dvips
containing the bitmap support.
See http://www.miktex.org.
Where is the GUI?
The Java GUI was removed, the old GUI can not be used with the current
version of bmeps.
Usage
General Usage
How do I create an EPS file?
Run
bmeps -leps input.png output.eps
How do I create a PS file?
Run
bmeps -lps input.png output.ps
How do I create a PDF file?
Run
bmeps -lpdf input.png output.pdf
How do I create a bb file?
Run
bmeps -lbb input.png output.bb
What are the easiest to use bmeps command lines?
The most simple way to convert an input image to EPS, PS, PDF or bb using
bmeps is to run one of the commands
bmeps input.png output.eps bmeps input.png output.ps bmeps input.png output.pdf bmeps input.png output.bbNote: I the ``-l'' option is omitted bmeps inspects the output file name suffix to find an appropriate output configuration. If you want to overwrite configuration entries using the ``-o'' option, place these options after the output file name.
Using bmeps with LaTeX
What must I do in my LaTeX source to use bitmap graphics?
If you use the modified dvips add
\DeclareGraphicsRule{.png}{eps}{.bb}{}
to your LaTeX source's preamble.If you use an unmodified dvips add
\DeclareGraphicsRule{.png}{eps}{.bb}{`bmeps #1}
or
\DeclareGraphicsRule{.png}{eps}{.bb}{`bmeps -leps2 #1}
instead. See below for bmeps options.To include a graphics file, type
\includegraphics{file.png}
You can also specifiy additional options like
\includegraphics[width=\linewidth]{file.png}
What's the .bb file for?
To calcaluate the documents layout LaTeX needs information
about the bounding boxes of included graphics.
In EPS files this information is contained in a line like
%%BoundingBox: 0 0 800 600directly in the file.
Other file types do not allow text lines in the file, a separated file must contain this information.
How can I build the .bb file?
Use
bmeps -lbb file.png file.bbto create the bounding box file file.bb for file.png.
Do not use the ebb program coming with some LaTeX distributions in conjunction with bmeps. Bmeps and ebb use different formulas to calculate the BoundingBox:
- bmeps: 1 PNG pixel = 1 EPS point.
72 PNG pixels are used to fill one inch. - ebb: 1 PNG pixel = 72/150 EPS points.
150 PNG pixels are used to fill one inch.
Can I use PNGs with both latex/dvips and pdflatex?
Of course you can.
In your documents preamble (before \begin{document}) write
\usepackage{ifpdf}
\ifpdf
...
\else
\DeclareGraphicsRule{.png}{eps}{.bb}{}
\fi
for modified dvips or
\usepackage{ifpdf}
\ifpdf
...
\else
\DeclareGraphicsRule{.png}{eps}{.bb}{`bmeps #1}
\fi
for unmodified dvips.
If your document contains EPS graphics too, you should change
\includegraphics[...]{xxx.eps}
to
\includegraphics[...]{xxx}
and provide both an EPS and a PDF version of the picture.Use
ps2pdf xxx.eps xxx.pdfor - for large pictures -
cat xxx.eps | epsffit -c 87 92 487 363 | ps2pdf - xxx.pdfto convert the EPS file to PDF.
The epsffit program is contained in the psutils (http://www.dcs.ed.ac.uk/home/ajcd/psutils/index.html).
The ps2pdf script is contained in the Gostscript distributions. (http://www.cs.wisc.edu/~ghost)
Which options are recognized by bmeps?
The syntax to run bmeps is
bmeps [<options>] [ [<infputfile>] [<outputfile>] ]The following options can be used:
- -lconfiguration
chooses a configuration, either from the configuration file or one of the built-in configurations. - -okey=value
overwrites one configuration entry.
How can I use bitmap graphics with the modified dvips?
Options for bitmap-to-EPS-conversion can be specified on the command
line. Use
dvips -I <configuration-name> ...where <configuration-name> is the same as the ``-l'' argument to the bmeps program (a configuration name, configuration entry overwrites optionally appended separated by comma).
Examples:
- PS level 1 printer:
dvips -I eps1 ...
- PS level 2 grayscale printer
dvips -I eps2,color=no ...
- PS level 2 color printer
dvips -I eps2 ...
I don't want to specifiy EPS output configuration on the command line each time.
How do I configure default settings?
Both bmeps and the modified dvips retrieve
default settings from the EPSOUTPUT environment variable
before processing command line options.
The contents of the variable must be the same as the argument to
the -I option of the modified dvips as
explained in the section above.
This variable can be set in your login scripts, i.e.
setenv EPSOUTPUT eps2,color=noin .cshrc or
EPSOUTPUT="eps2,color=no" export EPSOUTPUTin .profile or
set EPSOUTPUT="eps2,color=no"in AUTOEXEC.BAT.
Is there a template to see how things work? [Last Update: 2003/05/05]
Here I show a template how to use the bmeps with an
unmodified dvips.
\documentclass[ngerman,12pt,a4paper]{scrartcl}
\usepackage{ngerman}
\usepackage{ifpdf}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{mathptmx}
\usepackage[scaled=.92]{helvet}
\usepackage{courier}
\usepackage{array}
\usepackage{enumerate}
\usepackage{longtable}
\usepackage{latexsym}
\usepackage[ngerman]{varioref}
\usepackage{makeidx}
\usepackage{color}
\ifpdf
\usepackage[activate=normal]{pdfcprot}
\usepackage[pdftex]{graphicx}
%
% - The epstopdf package requires the write18 feature to invoke
% eps -> pdf conversion from pdfLaTeX. To enable it use
% - -shell-escape command line option (recommended)
% - write18=enable in miktex.ini or (not recommended, security risk)
% - shell_escape=1 in texmf.cnf or (not recommended, security risk)
% - on Windows there are errors if epstopdf is invoked by pdfLaTeX
% (possibly the epstopdf program does not set stdout to binary mode?)
%
\usepackage{epstopdf}
\pdfcompresslevel=9
\usepackage[
pdftex,
a4paper=true,
pdftitle={Test},
pdfsubject={Test},
pdfauthor={Dipl.-Ing. D. Krause},
colorlinks=true,
linkcolor=linkgreen,
pdfpagemode=None,
pdfstartview=FitH
]{hyperref}
\definecolor{linkgreen}{rgb}{0,0.5,0}
\else
\usepackage[dvips]{graphicx}
\DeclareGraphicsRule{.png}{eps}{.bb}{`bmeps #1}
\DeclareGraphicsRule{.jpg}{eps}{.bb}{`bmeps #1}
\DeclareGraphicsRule{.jpeg}{eps}{.bb}{`bmeps #1}
\DeclareGraphicsRule{.pgm}{eps}{.bb}{`bmeps #1}
\DeclareGraphicsRule{.pbm}{eps}{.bb}{`bmeps #1}
\DeclareGraphicsRule{.pnm}{eps}{.bb}{`bmeps #1}
\DeclareGraphicsRule{.ppm}{eps}{.bb}{`bmeps #1}
\usepackage[
dvips,
colorlinks=true,
linkcolor=linkgreen
]{hyperref}
\definecolor{linkgreen}{rgb}{0,0.5,0}
\fi
\setlength{\parindent}{0cm}
\author{Dipl.-Ing.~D.~Krause}
\title{Test mit Bildformaten}
\renewcommand*{\sectfont}{\bfseries}
\makeindex
\begin{document}
\begin{sloppy}
\newpage
\section{Test}
Dies ist ein Test für das Einfügen von Graphiken.
\begin{figure}
{\centering
\includegraphics[width=0.9\linewidth]{arch5.jpg}
\caption{Delicate Arch}
}
\end{figure}
\end{sloppy}
\end{document}
This template allows to use latex+dvips and pdflatex (latex+dvipdfm was not testet).
It is the template I use when writing new documents, maybee you need other packages and options.
The DeclareGraphicsRule is used only when not running pdftex/pdflatex/.
Using bmeps with other applications
How can I export MS Excel charts to EPS using bmeps?
A VB macro ChartPict_save() -
placed in
contrib/kant_krishna/excel_to_eps.vbs
-
was provided by Krishna Kant to export all charts to
PNG files and run bmeps on these files.
Note (1): This macro is provided "as-is", no support for it as
I have no knowledge of VB. I tested the macro on Office Prof. 2003,
works fine. On earlier Office version (i.e. Office 97 Prof.) there
were problems.
Note (2): This conversion produces bitmap graphics EPS files.
Possibly you want to try exporting to WMF and use the wmf2eps program
to obtain vector graphics EPS files.
Are there command line options for integration to Windows explorer?
To create context menu entries for bmeps use the ``-a'' option, create
commands like
bmeps -a -lbb "%1"
Troubleshooting
Why do I get dvips: ... Counldn't find ... file ...errors?
The dvips driver uses the kpathsea library to locate files.
This library assumes a directory structure having a so called BASEDIR.
Executable files are expected to be in BASEDIR/bin/<architecture>.
When searching for a file the library estimates the directory where
the executable for the current process was taken from, goes up two
directory levels and treats that directory as BASEDIR.
In BASEDIR/share/texmf there is a file ls-R containing the file name
database. This file is needed by kpathsea to find files.
Type
which dvipsto find where your dvips is located. If it is in a directory
BASEDIR/bin move it to BASEDIR/bin/<architecture>.
Why are pictures not converted?
Probably the original dvips is used. Type
dvips --versionIf the first output line looks like
dvips(k) 5.86you are using an unmodified dvips. If it looks like
dvips(k) 5.86 modified for bitmap graphics supportthe dvips version is correct.

