Tuesday, May 23, 2006

Comparison of math typesetting software - Part 2

Continuing last weeks examination of math typesetting software, following are some comments on the capabilities of the systems.

This is a big subject, so picked a few choice features to look at closely:
1) As examples of non-trivial expressions I looked at two nested constructs: how does sqrt(sqrt(sqrt(.... look, and how does 2^2^2^2^2 look?
2) Do the systems have any automatic layout? IE What happens if you can't figure out how to fit an expression on the page, what happens if you re-size the page or fonts so that it goes off the page?
3) Antialiasing. These days its embarrassing to give a presentation by printing on transparency and using an OHP, so expressions should look good on screen too.
4) Detail control. What can you do, if you don't like the default choices?

Maple:
Maple was the only system that made no attempt to handle the nested expression test in any special way. Because the sqrt sign gets bigger as it gets nested, the leading slope, which is attractive for a small sign, takes up a lot of room as the sign gets bigger, making this expression very wide. All the other systems used a steeper, more compact, sqrt sign for the outer placements. Likewise, there is a drop in font size to the first superscript, but none for the subsequent superscripts.
There is a layout control system, typing a very long expression next to the pi in the test caused it to line break at the page width without breaking the meaning of the expression. sqrt signs were replaced with new parenthesis and ^1/2. However, it rather unnecessarily chose to put a line break after the opening parenthesis each time, resulting in lots of unused space. Oddly the closing parenthesis all happily sit on the same line.
Maple managed to antialiase the hard parts just fine (parentheses even when they are stretched to accommodate large expressions, sqrt signs etc), but didn't antialias any characters, which one might expect to be provided by the OS for free. (Click on the image to see the full size version, to see the jagged pi and 2s).
There appears to be no control over the look of typeset expressions beyond font characteristics (size, font, color etc).
Overall pretty basic, considering the system has just had a major overhall.

MathType:
MathType does a little better on the nested test. First and second sqrt are different and first and second superscript are different, though third occurrences do not change.
There is no automatic layout in MathType, make the expression too large for the page and it just gets wider and wider, as if you are on an infinite page, so it is up to you to plan the layout of a large expression. Without a page preview or any indication of the page width on the ruler, you may well waste some paper.
Antialiasing is the way round I expected. Characters handled nicely, sqrt signs showing jagged edges. Spanning parenthesis are handled well.
There is some basic detail control s- you can set the relative size of certain fonts (eg the superscript is by default 58% of the size of the parent character), but not many of them.

Mathematica/Publicon:
Mathemetica performs well on the nested test. There are five levels of different sqrt sign, and nest superscripts keep getting smaller indefinitely until a floor font size is reached.
Automatic layout happens in two ways. Expressions break automatically as the page width is exceeded. In this example, Mathematica switches to a prefix version of a sqrt sign and parentheses, instead of the ()^1/2 favoured by Maple. You can also ask it to do an automatic layout to try and fit the expression the best way that it can, though this discards any character level settings and may replace linear notations like ^ or / that you have chosen with superscripts and fractions.
Mathematica fully antialiases.
One difference is that math symbols are provided in two new fonts, which switch depending on whether the surrounding font is mono-spacing like Courier or proportional like Times. Whether you think this is a good thing is a matter of taste, but you can use the Symbol font like the other systems, if you prefer.
The place where it seems to stand out is in detail control. There is an overwhelming number of options from how thick the horizontal line is in a fraction, to how high or far across the nth root value appears in a radical. There are perhaps a couple of hundred options and they can be set for a single character, the document or as default.

Scientific Word/Scientific Workplace:
Scientif Word came second in the nesting test. There are three levels of sqrt, though it makes these go further by using the third at the fourth level of the test, and two levels of superscript size.
There is no layout control, suffering from the same infinite page as MathType, though it does have a page preview.
Only characters are antialiased, and with the quite compact sqrt sign, this is probably the I think the worst screen representation from my examples.
Detail control was good, with access to lots of TeX tags, though the fact that these are applied through named tags was very frustrating. One doesn't appear to be able to select a character and make it 48 point. You have to edit a tag to have a 48 point and then apply the tag, being aware that any other use of that tag will inherit that value. Style sheets and abstraction like this are good, and ScientificWord provided a good range of pre-defined style sheets and tags. But to be forced to work like this is frustrating. I don't know if this is imposed by the use of TeX as the underlying language or if it is Mackitchin imposing good practice on us!


All systems claim to export into HTML, MathML, and TeX. I have not looked closely at this. Scientific Word and Publicon also support a range of target specific TeX or XML formats (eg specific journals).

So in conclusion, the Mathematica family performed best under these criterion, followed by the Scientific Word family. Though I repeat, there is a lot more to this subject, and this review was just a sampling of the feature space.

Putting this with my experience in the first part of the review, the Mathematica family are the clear winners (Mathematica if you have $1000+ and need computation, or Publicon if you have $150 and don't). For simple and easy to learn I still like MathType, though I was rather surprized by how basic it is considering its long pedigree and well known name. But at $130 its not expensive.

1 comment:

Anonymous said...

Here come the LaTeX version of the sqrt(sqrt(.. :
http://julien.hillairet.free.fr/upload/sqrt.png

I think it could be a good element of comparison with the other typersetting software.