Hex is a reimplementation of TeX in Haskell. It is not very functional yet. It just does macro expansion. The main goals are for me to learn TeX and Haskell by implementing on in the other.
Ideally, I will have a version of TeX that is more flexible and extensible than the current one (which I use because I love its output, but cannot bear its error messages).
The plan is to first write a faithful reimplementation of TeX and then, make it better.
Implements very basic Math typesetting.
Added font capabilities (font etc). Also, improve macro expansion (delimited macros, if).
TeX-like line breaking. Added input and message.
Implements character codes and macro namespaces. I think we have the basic machinery to read input and covert it into a stream of TeX commands (except for input). Now, it is the backend which needs the most work.
Pre-pre-pre-pre-...-alpha. It can take an input file and output a DVI file of text with badly broken lines. It does it slowly and with a lot of hardcoded definitions (it supports exactly one font). It does not do any page breaking: everything is on one page.
Right now, it is only interesting if you care to get involved in development.
What needs to be better in TeX?
Here are my ideas for improving TeX:
- Better error messages.
- Better package management.
- Document at-once-typesetting (instead of page-per-page).
- Single pass implementation of cross-references.
- Better handling of floats.
- Better handling of images.
- Better scripting.
- In-built (or script written) facilities for things like references (instead of relying on external programmes).
- Use of multi-core machines.
- More output formats (ePub?)
Some of these are traditionally built on top of TeX instead of modifying it. While that is a good way to do some things, it also means that the results are not as good as they should be. There is no reason to not have the handling of floats at the TeX level, for example.
What needs to stay the same?
Good quality output.
Author: Luis Pedro Coelho <email@example.com>
License: GPLv3 or later