Menu

Tree [69edec] default tip /
 History

Read Only access


File Date Author Commit
 doc 2017-04-10 Norman Gray Norman Gray [24df21] Various clarifications to the documentation, in...
 extras 2005-08-21 normang normang [dfa1c7] Initial version. It has the correct outline, I...
 html 2017-04-10 Norman Gray Norman Gray [24df21] Various clarifications to the documentation, in...
 test 2017-04-11 Norman Gray Norman Gray [69edec] Fix rounding error: pt sizes retained as floats...
 .hgignore 2015-01-12 Norman Gray Norman Gray [be0883] Release 1.0
 .hgtags 2017-04-09 Norman Gray Norman Gray [c27162] Added tag 1.1rc1 for changeset a17a33519f5f
 AUTHORS 2013-04-13 Norman Gray Norman Gray [4989f5] Adjustments of author acknowledgements
 Bitmap.cc 2013-04-14 Norman Gray Norman Gray [ff3cfa] Distribution fixes for release
 Bitmap.h 2013-04-14 Norman Gray Norman Gray [ff3cfa] Distribution fixes for release
 BitmapImage.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 BitmapImage.h 2013-04-14 Norman Gray Norman Gray [ff3cfa] Distribution fixes for release
 Byte.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 ChangeLog 2013-04-14 Norman Gray Norman Gray [ff3cfa] Distribution fixes for release
 Doxyfile.in 2004-11-04 nxg nxg [4298dd] Doxyfile updated by doxygen -u
 DviError.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 DviError.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 DviFile.cc 2017-04-11 Norman Gray Norman Gray [69edec] Fix rounding error: pt sizes retained as floats...
 DviFile.h 2017-04-11 Norman Gray Norman Gray [69edec] Fix rounding error: pt sizes retained as floats...
 DviFilePosition.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 DviFilePosition.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 FileByteStream.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 FileByteStream.h 2013-04-14 Norman Gray Norman Gray [ff3cfa] Distribution fixes for release
 GIFBitmap.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 GIFBitmap.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 InputByteStream.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 InputByteStream.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 Journal 2017-04-09 Norman Gray Norman Gray [a17a33] Prepare release 1.1rc1
 KarlPathSearcher.cc 2014-11-25 Norman Gray Norman Gray [eaabc1] Fix a few compiler warnings
 KarlPathSearcher.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 LICENCE 2003-02-16 norman norman [dffbdf] Finally GPLed, so added prolix headers to all s...
 Makefile.am 2015-01-12 Norman Gray Norman Gray [be0883] Release 1.0
 NEWS 2003-06-12 norman norman [ec9653] Merged from branch-dvi2bitmap-0-10: now configu...
 PNGBitmap.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 PNGBitmap.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 PageRange.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 PageRange.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 PipeStream.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 PipeStream.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 PkFont.cc 2014-11-25 Norman Gray Norman Gray [eaabc1] Fix a few compiler warnings
 PkFont.h 2013-04-14 Norman Gray Norman Gray [ff3cfa] Distribution fixes for release
 README.developer 2015-01-12 Norman Gray Norman Gray [be0883] Release 1.0
 README.md 2017-04-09 Norman Gray Norman Gray [a17a33] Prepare release 1.1rc1
 TODO 2017-04-09 Norman Gray Norman Gray [a17a33] Prepare release 1.1rc1
 Util.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 Util.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 XBMBitmap.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 XBMBitmap.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 XPMBitmap.cc 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 XPMBitmap.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 bootstrap 2015-01-12 Norman Gray Norman Gray [be0883] Release 1.0
 configure.ac 2017-04-09 Norman Gray Norman Gray [a17a33] Prepare release 1.1rc1
 defects.xml 2003-02-19 norman norman [feaf65] <defect> had wrong attribute -- wasn't showing ...
 doxygen-package.html 2003-09-30 norman norman [314103] Added DviFileEvent::release method to release e...
 dvi2bitmap.1.in 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 dvi2bitmap.cc 2017-04-11 Norman Gray Norman Gray [69edec] Fix rounding error: pt sizes retained as floats...
 dvireport.1 2003-09-26 norman norman [32c98d] Added dvireport program, using new DviFile func...
 dvireport.cc 2013-04-13 Norman Gray Norman Gray [70815e] Compiles cleanly with -Wall and i686-apple-darw...
 getopt_long.c 2003-02-19 norman norman [43fde9] Fix confusing comment
 getopt_long.h 2003-02-19 norman norman [8b2d23] Add check for unistd.h, and include it in getop...
 getsubopt.c 2003-02-18 norman norman [0d65b0] Add a definition of glibc-internal __strchrnul,...
 slfontgen 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 stringstream.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files
 verbosity.h 2013-04-14 Norman Gray Norman Gray [6d074e] Fix Id/licence headers on source files

Read Me

dvi2bitmap

Version @VERSION@, @RELEASEDATE@

dvi2bitmap is a utility to convert TeX DVI files directly to bitmaps,
without going through the complicated (and slow!) route of conversion
via PostScript and PNM. The prime motivation for this is to prepare
mathematical equations for inclusion in HTML files, but there are
plenty of uses beyond that. It uses the same kpathsea font-searching
library as other TeX programs, as long as you have the
appropriate library installed.

Note: this code has not been much changed since around 2005, with main
development having tailed off, as being more-or-less feature complete,
from 2003. It's had a few bugfixes since then, and there are some
possibilities for future projects in the file TODO.

Features:

  • Written in C++.

  • The program is a wrapper for libdvi2bitmap, a library which abstracts
    DVI and PK files, Bitmaps, and various other objects supporting
    these.

  • Supports GIF, XBM, XPM bitmaps as output, plus PNG if libpng is
    installed.

  • Can read DVI files from a non-seekable stream such as a pipe.

  • Internally constructed bitmap is expandable.

  • Integrated with the kpathsea path-searching algorithm, as used by other
    TeX and DVI programs. It is not, however, dependent on it, so it
    will still work happily if you don't have the library installed.
    Can use a pre-set search path, or scripts, to find fonts instead.

  • Can generate fonts on the fly.

  • Highly configurable, and very fast. Designed for use in a batch
    production mode.

  • Released under the GPL.

See http://purl.org/nxg/dist/dvi2bitmap

Configuring and building

To configure and build:

./configure
make
make install

Important ./configure options are

  • --with-png=... : points to the libpng library

  • --with-kpathsea=... : points to the kpathsea library, for finding
    TeX fonts; see the documentation for discussion

You can override the C++ compiler the configure script will choose by
setting the environment variable CXX, either via CXX=cxx ./configure' orenv CXX=cxx ./configure', depending on your shell. Choose the
install location with the argument --prefix.

Since this program uses standard' TeX fonts, but at resolutions appropriate for screens rather than paper, there is a certain fuss involved in generating, and after that, finding, these fonts. If you have thekpathsea' library installed, then this should Just Work.
Failing that, you might have to set an environment variable. See the
section of the manual entitled `Finding fonts' for some discussion of
this. As well, it's a good idea to give the command

(cd test; make)

after you've built the distribution. As well as testing the program,
this attempts to give you some advice about what you need to do on
your particular system to tell dvi2bitmap where its fonts are.

The program can work with the kpathsea library. This is the same
path-searching library which several TeX implementations use to find
fonts (and more). If you wish to use this (you should, if you can),
then give the option `--with-kpathsea' to the configure command, again
optionally specifying a path, and if the library is installed on your
machine, the program will use it. To build the library, see the
discussion on 'building kpathsea' below.

If you want it to be able to generate GIFs, then give the configure
option --enable-gif'. Starting in 2005, this is enabled by default, since the Unisys patents appear to have expired in 2004. You can disable the ability to generate GIFs (probably a good plan, if you have the PNG library available) with the option--disable-gif'.

If you want it to be able to generate PNG files (much better, since
they're free of the GIF copyright problems), then give the configure
option --with-png'; if you don't have libpng in the default places (typically /usr/lib or /usr/local/lib), then instead use--with-png=/path/to/png', where the specified path is that to the
directory which contains the png include/ and lib/ directories. This
will check you have the libpng library and headers somewhere the
compilers can find them, and build in support if it finds them. The
PNG library is not distributed with this utility: you can find it at
http://www.libpng.org/pub/png/.

The program builds successfully on (at least) the following
machine/compiler combinations. It should be written in
standards-conforming C++, so if it doesn't build then (1) it's not as
conformant as I think it is (in which case please tell me), (2) your
compiler is not as conformant as you think it is (in which case please
don't tell me), or (3) you need to invoke some magic to get the
compiler to be conformant (in which case tell me, if there's something
I can do in the autoconfigure script).

powerpc-apple-darwin6.6 (MacOS X, 10.2.6)
    g++ 3.1 20020420 (prerelease)

sun-sparc-solaris2.9
    CXX=CC: Sun WorkShop 6 update 2 C++ 5.3 2001/05/15

alphaev67-dec-osf5.1
    CXX=cxx: Compaq C++ V6.5-014

i686-pc-linux-gnu (RedHat 7.3)
    g++ 2.96

Building kpathsea

To build the kpathsea library (presuming it's not available in your
TeX distribution), you should start from a Subversion checkout.
You can check out the entire tree
(with the command 'svn co svn://tug.org/texlive/trunk/Build/source')
but that takes a long while.
Or you can check out just the required bits:

% svn co svn://tug.org/texlive/trunk/Build/source/m4
% svn export svn://tug.org/texlive/trunk/Build/source/version.ac
% svn co svn://tug.org/texlive/trunk/Build/source/texk/am texk/am
% svn co svn://tug.org/texlive/trunk/Build/source/texk/kpathsea texk/kpathsea
% svn co svn://tug.org/texlive/trunk/Build/source/texk/tests/texmf texk/tests/texmf
% cd texk/kpathsea

Then build:

% autoreconf --install --symlink
% ./configure
% make
% make check
% make install

Alternatively, snarf a copy of the base tree from eg
http://www.tex.ac.uk/tex-archive/graphics/metapost/base.zip, unpack
it, cd to base/source/texk/kpathsea, and build as above.

Font-string templates

Several things which can be configured -- either at ./configure time
or in the config.h file, if you have to edit that explicitly -- are
specified as being in the form of a `font string
template'. This is a printf-like string which has %? specifiers
replaced by font parameters, according to the following scheme:
%M = mode (eg. ibmvga)
%f = font name (eg. cmr10)
%d = dpi (eg. 330)
%b = base dpi (eg. 110)
%m = magnification (eg. 3)
%% = %

This also applies to the DVI2BITMAP_PK_PATH environment variable,
which may be used to point to the PK paths generated by dvi2bitmap.

This applies to the font-generation script and font-search scripts.

Documentation

See directory doc/ -- there are fuller installation instructions
there. Full library documentation in directory doc_libdvi2bitmap/.
There's also a man-page in dvi2bitmap.1, but this is not
necessarily as up-to-date as the main documentation.

Author

Norman Gray http://nxg.me.uk
See also the other contributors in the file AUTHORS.

Copyright 1999--2004, Council for the Central Laboratories of the Research Councils.
Copyright 2005--2017, Norman Gray.
Released under the terms of the GPLv2, a copy of which is included in the file LICENCE.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.