TkDVI - A TeX Previewer based on Tcl/Tk
Anselm Lingnau (email@example.com)
What is TkDVI?
TkDVI is a new DVI previewer for Unix,
based on John Ousterhout's script language
TkDVI defines »DVI images«
that display a page from a DVI file in a Tk widget such as the canvas
The usual features are available,
for example, shrinking the image by various amounts.
Optionally the image is anti-aliased using grey levels (like in xdvi)
to enhance readability.
TkDVI uses the popular Kpathsea library to locate fonts,
and missing PK fonts are generated on demand by calling out to Metafont.
TkDVI is readily compatible with popular Unix TeX distributions such as
But TkDVI also offers various unusual features:
It must also be said that some important features are currently missing
from TkDVI (but will be added as soon as time permits) -- but hey, this
is still alpha code!
- A single instance of TkDVI can display multiple DVI windows
to show pages from one or more DVI files.
Every font is loaded just once;
multiple DVI files using the same fonts will access a single copy.
- TkDVI can show adjacent pages in a »spread«, like a book, and can
also display a high-level »overview« of 16 pages all at once
- Other Tk programs can control TkDVI remotely
via Tk's send mechanism.
- DVI pages can be mixed with other types of structured graphics.
This makes it possible to write DVI pages that are `multimedia
- TkDVI's DVI image type is encapsulated as a Tk extension
package. You can use it in your own programs to display DVI files.
- The DVI browser is also implemented as a re-usable
- DVI files can contain document information and clickable
»bookmarks«, much like those seen in PDF documents.
- TkDVI can easily be extended to include new functionality, simply
by scripting the desired features in Tcl.
TkDVI is free software which is distributed under the same
license as Tcl/Tk.
- TkDVI doesn't support EPS graphics inclusion. I will be looking
at this eventually.
Here is a
I presented at EuroTeX'99 which describes the design
and implementation of TkDVI in somewhat more detail. This is written for
TeXnicians with little or no knowledge of Tcl; there's also
similar paper that I gave at the 1st European Tcl/Tk User
Meeting which is geared towards Tcl people with little or no knowledge
From TkDVI 0.1 to TkDVI 0.2:
- Virtual fonts are now supported. (This could use some more testing.)
- You can switch between display modes using the `o' (overview), `s'
(single) and `d' (double-page spread) keys in addition to the menu.
- Various bugs relating to the page selector, moving between pages
and the measuring rubber line have been fixed.
- Various bugs in the DVI rendering engine have also been fixed.
- The configure.in script has been made a bit more sophisticated.
In particular, you can give separate directories for Kpathsea and
the Kpathsea include files, in case the heuristic (read: guesswork)
- TkDVI no longer uses GNU libtool, but takes advantage of the
information in the local tclConfig.sh instead.
- See the
log for more details.
From TkDVI 0.2 to TkDVI 0.3:
- Completely re-vamped user interface along the lines of Acrobat Reader
- Too numerous to list. See the
log for more details.
From TkDVI 0.3 to TkDVI 0.3.1:
- Various patches to the build environment, mostly contributed by
From TkDVI 0.3.1 to TkDVI 0.4:
- Various GUI tweaks (for better visual compatibility with stuff
like KDE or GNOME).
- Improved interfaces for extension by users.
- New, extensible \special command execution model.
- Internationalization (and a German message catalog).
- Lots of assorted bug fixes.
- More patches to the build environment.
- Lots of other things (see the change log).
You can download source code for the
current release of TkDVI from
SourceForge download server. Older releases may also be
available (not that they would be particularly interesting)
from the project file list.
CVS access to the source code is being worked on.
TkDVI has been tested on PCs running
Debian GNU/Linux 2.1, 2.2 and pre-3.0,
as well as SuSE Linux 6.4 (with a
reasonable installation of Tcl/Tk rather than the pile of junk that
SuSE sees fit to include in their distribution). There is no
particular reason why it shouldn't work on other Linux and Unix platforms.
If you do get it to run, please drop me a
containing a description of your system so it can be listed here.
A Debian package of TkDVI 0.3.1 is part of the »testing« and
»unstable« distributions and will be in the next Debian release
(unless we manage to sneak TkDVI 0.4 in first).
You need Tcl/Tk 8.0 or newer (Tcl/Tk 8.2.x, 8.3.x, and the current
alpha releases of Tcl 8.4 are fine; I recommend Tcl/Tk 8.3.3)
-- older versions emphatically do not work --
and the Kpathsea library, which comes,
e.g., with teTeX, but can be obtained as part of the Web2C
distribution available from CTAN. (If
you're running Debian GNU/Linux, install the »tetex-dev« or
»libkpathsea-dev« packages, depending on which one is in your release.)
A version of Kpathsea that doesn't force you to fetch and compile
all of web2c or even teTeX is available from
SourceForge download server.
These screenshots show TkDVI 0.3.1.
Click on the images to view them at their original size.
TkDVI showing a single page of a DVI file.
TkDVI showing a 16-page booklet in »overview« mode.
Feel free to contact me with suggestions, patches, constructive criticism
etc. at firstname.lastname@example.org.
(Flames can go to /dev/null.)
There are two mailing lists for TkDVI:
- This is a low-traffic moderated mailing list for TkDVI-related
announcements such as the publication of new versions.
- This is a forum for general exchange between TkDVI users (such as
there will be, hopefully). All the traffic from tkdvi-announce
shows up here as well, so if you're interested in both lists you
only need to read this one.
9 August 2001