Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

Direc­tory tex-archive/dviware/dvi2bitmap

dvi2bitmap
==========

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, again as long as you have the
appropriate library installed.

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://www.astro.gla.ac.uk/users/norman/star/dvi2bitmap/>

Configuring and building
------------------------

To configure and build:

    ./configure
    make
    make install

You can override the C++ compiler the configure script will choose by
setting the environment variable CXX, either via `CXX=cxx ./configure'
or `env 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 the `kpathsea' 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.

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 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.  The kpathsea library is distributed
as part of the web2c (Unix TeX source) distribution, which you can
find at <ftp://ftp.tug.org/tex/web2c.tar.gz>, or mirrored on CTAN
sites (for example at <http://www.tex.ac.uk> in directory
systems/web2c).  The dvi2bitmap manual includes a brief discussion of
obtaining and building this library.

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


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 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://www.astro.gla.ac.uk/users/norman/
norman@astro.gla.ac.uk


Copyright
---------

Copyright 1999--2003, Council for the Central Laboratories of the
Research Councils.  Released under the terms of the GPL, a copy of
which is included in the file LICENCE.


$Id: README,v 1.23 2005/01/16 20:57:00 nxg Exp $

Direc­to­ries

Name Notes
doc
doc_libdvi2bitmap
html
test

Files

Name Size Date Notes
AUTHORS 56 2003-06-12 10:27
Bitmap.cc 40742 2005-06-04 05:51
Bitmap.h 7695 2003-10-03 03:17
BitmapImage.cc 4810 2003-02-17 05:11
BitmapImage.h 3230 2003-02-16 10:48
Byte.h 1507 2003-02-16 10:48
COPYING 17992 2005-06-04 05:26
ChangeLog 5208 2005-08-19 06:43
Doxyfile.in 47364 2004-11-04 10:56
DviError.cc 2033 2005-06-04 05:51
DviError.h 1745 2003-02-16 10:48
DviFile.cc 49476 2005-06-04 05:51
DviFile.h 21752 2004-10-19 10:39
FileByteStream.cc 4889 2005-06-04 05:51
FileByteStream.h 1658 2003-08-22 04:05
GIFBitmap.cc 21388 2004-11-04 09:32
GIFBitmap.h 3794 2003-02-17 05:11
INSTALL 9478 2005-06-04 05:26
InputByteStream.cc 26602 2005-06-04 05:51
InputByteStream.h 6204 2004-11-04 09:32
KarlPathSearcher.cc 10353 2004-11-04 09:32
KarlPathSearcher.h 2275 2003-08-03 11:54
Makefile.am 2953 2005-08-19 06:42
Makefile.in 33824 2005-08-21 07:18
NEWS 34 2003-06-12 10:27
PNGBitmap.cc 15400 2005-06-08 02:21
PNGBitmap.h 2046 2003-02-17 05:11
PageRange.cc 7292 2005-06-04 05:51
PageRange.h 1816 2003-02-16 10:48
PipeStream.cc 19628 2005-06-04 05:51
PipeStream.h 2345 2003-08-07 12:34
PkFont.cc 37583 2005-06-04 05:51
PkFont.h 14641 2003-10-03 03:26
README 6072 2005-01-16 09:57
TODO 2241 2004-09-09 08:15
Util.cc 5768 2005-06-04 05:51
Util.h 1720 2003-08-07 12:13
VERSION 5 2005-08-21 07:21
XBMBitmap.cc 2840 2005-06-04 05:51
XBMBitmap.h 1649 2003-02-16 10:48
XPMBitmap.cc 2864 2005-06-04 05:51
XPMBitmap.h 1646 2003-02-16 10:48
aclocal.m4 249813 2005-08-21 07:18
config.guess 44251 2005-06-04 05:25
config.h.in 8127 2005-08-21 07:18
config.sub 31552 2005-06-04 05:25
configure 782002 2005-08-21 07:18
configure.ac 23550 2005-08-19 06:43
depcomp 15868 2005-06-04 05:26
dvi2bitmap.1 30090 2003-10-27 04:18
dvi2bitmap.cc 50839 2005-06-04 05:51
dvireport.1 2332 2003-09-27 12:41
dvireport.cc 5210 2005-06-04 05:51
getopt_long.c 35164 2003-02-19 11:04
getopt_long.h 6274 2003-02-19 11:07
getsubopt.c 2719 2003-02-18 11:50
install-sh 9233 2005-06-04 05:26
ltmain.sh 185918 2005-06-04 05:25
missing 10872 2005-06-04 05:26
stringstream.h 1825 2004-11-04 09:32
verbosity.h 2108 2003-06-15 07:55
version.h.in 50 2003-06-12 10:27

Down­load the con­tents of this pack­age in one zip archive (1.3M).

dvi2bitmap – Util­ity to con­vert TeX DVI files di­rectly to bitmaps

A util­ity to con­vert TeX DVI files di­rectly to bitmaps, with­out go­ing through the com­pli­cated (and slow!) route of con­ver­sion via PostScript and PNM. The prime mo­ti­va­tion for this is to pre­pare math­e­mat­i­cal equa­tions for in­clu­sion in HTML files but there are many other uses be­yond that. It can gen­er­ate XBM and GIF bitmaps, plus PNG, if you have the libpng li­brary in­stalled. It uses the same kpath­sea font-search­ing li­brary as other TeX pro­grams, again as long as you have the ap­pro­pri­ate li­brary in­stalled. The pro­gram is writ­ten in C++, and in­ci­den­tally pro­vides a good ob­ject in­ter­face for DVI and PK files.

Pack­age De­tailsdvi2bitmap
Home pagehttp://dvi2bitmap.source­forge.net/
Ver­sion0.13
Li­censeGNU Gen­eral Public Li­cense
Main­tainerNor­man Gray
Topics gen­er­ate graphic bitmaps from DVI files
See also dvipng
Guest Book Sitemap Contact