Skip to content
Mirror of ftp://ftp.cs.uni-sb.de/formulae - "A Functional Description of TeX's Formula Layout"
Standard ML Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Accent.sml
AxisCenter.sml
BasicBox.sml
BasicChar.sml
BasicTypes.sml
Boundaries.sml
BoxPack.sml
BoxTypes.sml
ChangeKind.sml
ChangeStyle.sml
CharFunctions.sml
CharInfo.sml
Const.sml
Delimiter.sml
Distance.sml
DviCmd.sml
DviState.sml
EX09
EX10
FontParams.sml
FontTypes.sml
FontVector.sml
Formula.sml
GenFraction.sml
General.sml
GlueCalculation.sml
HListGlue.sml
IListDim.sml
IListTranslate.sml
IListTypes.sml
Input.sml
Kind.sml
LoadFont.sml
MI05
MI06
MI07
MI08
MI09
MI10
MakeAtop.sml
MakeChar.sml
MakeFract.sml
MakeLimOp.sml
MakeLine.sml
MakeScripts.sml
MakeVBox.sml
MathGlue.sml
MathPenalty.sml
MathSpace.sml
MathTranslate.sml
MathTypes.sml
NodeDim.sml
NodeListDim.sml
OVERVIEW
Out.sml
OutDvi.sml
OutHigh.sml
Powers2.sml
README
RM05
RM06
RM07
RM08
RM09
RM10
Radical.sml
SY05
SY06
SY07
SY08
SY09
SY10
SetBox.sml
SetNode.sml
ShipOut.sml
Size.sml
Spacing.sml
StyleParams.sml
all.sml
das.dvi
dastex.tex
edit.m
test.sml

README

This directory contains a re-implementation of TeX's formula layout
written in Standard ML of New Jersey, version 109.2
by Reinhold Heckmann, Universitaet des Saarlandes,
following suggestions by Reinhard Wilhelm, Universitaet des Saarlandes.

WARNING:  The system is still in the status of development.
-------   This distribution may contain errors of any kind.

The present system can typeset nearly all formulae
by translating them from formula terms (see MathTypes.sml)
into box terms (see BoxTypes.sml).
The only exceptions are accents, roots, and big delimiters.
The resulting box terms can be translated into dvi output.
At present, there is no good way to enter formulae;
a parser is needed which can read TeX input and build formula terms from it.
Also, the testing possibilities and user friendliness
are not yet well developed.

To install:
   get formulae.tar.gz
   zcat formulae.tar.gz | tar -xf -
This gives a directory called `formulae'.
Go into this directory.
Start sml (best: Standard ML of New Jersey, version 109.2).
   use "edit.m";
   U "all";
... and everything is read in and translated (hopefully).

At the moment, the system provides two test functions (see test.sml)
  test1, test2: unit -> unit
which, when executed, typeset certain fixed formulae,
translate them to dvi and write them into file  "das.dvi".
(Sorry, this file name is built in.)
As an example, the distributed system contains
the file "das.dvi" resulting from running test1.
It also contains a TeX file "dastex.tex" which contains the formulae
of test2 to allow comparing TeX layout with our system's layout.
More tests can be programmed by editing or augmenting file "test.sml".

The typesetting system itself is contained in files "----.sml".
For a rough description of their organization, see file "OVERVIEW".
In addition, there are files RM05 ... RM10 MI05 ... MI10 SY05 ... SY10 EX09 EX10
which contain condensed font information (height, depth, and width of characters).
These files have been derived from TeX's TFM files.

File "edit.m" contains functions which provide access to the Unix editor "vi"
from within sml.
   E "xxx";
runs the editor on file "xxx.sml" (note the addition of the suffix).
After leaving the editor, the file is reloaded
if there have been any changes to it.
A call
   U "xxx";
loads file "xxx.sml" without editing.
Both functions store the file name internally;
if the same file is to be edited / loaded again,
it suffices to call
   E "";
and likewise with U.

File "all.sml" contains a sequence of U's
which load the files containing the system in their proper order.
(Sorry, there is no "make" or any other kind of source code management.)

Documentation:
The core system is described in the paper
"A Functional Description of TeX's Formula Layout"
submitted to Journal of Functional Programming.
Unfortunately, there is no documentation of the usage of the system
other than the remarks in this file
(mainly because we have not yet implemented a nice user interface).
You can’t perform that action at this time.