[motivation] | [status] | [download] | [new features] | [error/warning messages] |
Why not implement a TeX-like program in a completely modern object
oriented fashion, from scratch (like NTS for instance, or ant)?
The reason is simply that there is no point throwing away things that
work. Moreover, there are zillions of documents out there written in
TeX, using the macro facilities of TeX in such a way that they will
never translate properly into a subset of the language. It is
therefore very hard to write a program that is not TeX yet processes
all existing .tex files properly. CommonTeX is an excellent
implementation which is easy to maintain, and more importantly, it is
completely functional now. A slow conversion to more
and more "modern" programming styles is anticipated.
See also Never
rewrite code from scratch (which I certainly do not agree with in
general, but applies beautifully to this particular project).
I chose CommonTeX as the starting point for TeX++ because it was
written from scratch in C, rather than being converted from the
Pascal sources by an automatic converter (see TeX in C for an
example of a TeX version in C which was based on an automatic
conversion from the Pascal original). The automatically generated
C sources are typically horrible to read, let alone extend.
Current work focuses on getting the TeX++ specific features in place
(margin settings and other page geometry) and cleaning up the I/O as
well as the error messages and warnings. More information on recent
progress can be found in the ChangeLog.
Then download and install texpp.tar.gz
( Kb).
The current version is 1.27 dated
2003-09-14. The usual GNU installation instructions apply.
See the file
After installation, you should be able to go to the
Other anticipated features, to be added in the near future:
The binary of TeX++ is a bit under 200Kb in size, linked to the
standard C and C++ libraries, and that's it: no
zillions of supporting programs and libraries,
no huge directory trees with zillions
of configuration files, but just a single nice Unix binary that you
can install anywhere you like.
If you don't like "everything in one spot" idea, you should not
be tempted to re-invent kpathsea. Instead, take a look
at Graft
for the right solution to the separation of packages in their own
directories (hint: soft links are your friend).
If you have a performance problem without kpathsea, then
you probably should be thinking about dropping NFS in favour of
more intelligent networked filesystems.
Why a new TeX implementation?
The current de-facto standard implementation of TeX for Unix,
namely the one based on Web2c,
has a number of shortcomings:
TeX++ solves all of these issues, while at the same time staying as
close as possible to the original TeX.
Moreover, it has a number of interesting new
features which make it possible to use TeX as a typesetting engine
for a web browser. More on this at some later stage.
tex
" binary may be small). It is also a pain to install from
sources (with TeX++ it's a matter of ./configure
,
make
, make install
together with some
trivial settings to make it pick up the fonts and
style files).
This is work in progress, but the full functionality of CommonTeX is
already present (thanks to the excellent work of Pat Monardo 10 years ago).
I have tested both plain TeX and LaTeX input files, the latter also
with use of add-on packages like amsLaTeX. In order to preload
plain.tex or latex.ltx, use the options
--plain
or --latex
(you need the plain tex or latex input files
for this to work; note that TeX++ currently does not use format
files, but on modern machines reading and processing of
plain.tex or latex.ltx typically takes only a small fraction of a second).
You need the following additional software in order to compile
and use TeX++:
COPYING
for license information (it's
essentially the license of CommonTeX).
tests
directory and run
texpp --plain < tst.tex > out.dvi
--help
flag for a list of the
options.
TeX++ has the following new features (compared to Knuth's original TeX):
texpp --hsize=20cm --vsize=25cm
--verbose
, which makes the
diagnostics on stderr more verbose. Unless your TeX file
does \open
calls, TeX++ does not produce any
files, just output to stdout and stderr.
\dump
command. Such dump
files can be read with \restore
.
Error and warning messages have been cleaned up and are presented in a more
structured way:
file.tex:345-387:Overfull hbox (4.5pt too wide)
another.tex:843:
The following startup options are available:
--help --hsize set the initial value of the \hsize dimen --vsize set the initial value of the \vsize dimen --hoffset set the value of \hoffset --voffset set the value of \voffset --margin different way to set the margin size --verbose --debug --version --verbose
(the
--compatible
option is now switched on by default and
switches off automatically when you add margin options). Output,
however, still goes to stdout instead of a .dvi file, and logging
information goes to stderr instead of the .log file.
TeX++ uses the simple though effective Unix philosophy: everything
that belongs together should sit in the same directory. Therefore,
path settings for TeX++ are extremely simple: use the environment
variables
These variables contain ':' separated lists of paths. Typically,
you would have one system-wide /usr/lib/tex/tfm
and one /usr/lib/tex/sty
as well as per-user directories
for these sitting in users' home directories.
$Id: index.html,v 1.18 2004/01/16 16:10:31 kp229 Exp $