Sunteți pe pagina 1din 11

A short comparison of various typesetting engines

Maarten Sneep March 2005


Abstract There are a lot of dierent typesetting engines in use out there. The quality of the output they deliver varies greatly. This document intends to show some samples of various text engines.

Introduction

When describing the engine, I use either simple or complex. The simple engine can already be rather complicated, but it basically works like the following description. Start to put words on the rst line. Notice after putting a few words on the rst line, that there is not enough space on the current line. Push the word that doesnt t to the next line and expand the inter-word spacing to ll the line. For extra points: try to hyphenate the word that doesnt t to make at least some part of it t on the rst line. Another trick that might get extra points at least for trying: try to squeeze the space between the letters and words on the rst line in an eort to get more on that line. Rinse, repeat. . . The complex engines look at the whole paragraph, instead of at one line at a time. This means that adding a word at the end of a (long) paragraph may change the line-break of the rst line. For the whole paragraph a parameter is calculated how ugly the breaks are. This parameter is then minimised. This requires some computational eort, and is not used often in interactive applications. The results however are much more pleasant to look at and easier to read or at least that is the idea. This technique of a paragraph at a time follows the long book-printing tradition starting from the Gutenberg bible. The remainder of this document shows one paragraph from Alice in Wonderland, from the last chapter: 1

Oh, Ive had such a curious dream! said Alice, and she told her sister, as well as she could remember them, all these strange Adventures of hers that you have just been reading about; and when she had nished, her sister kissed her, and said, It was a curious dream, dear, certainly: but now run in to your tea; its getting late. So Alice got up and ran o, thinking while she ran, as well she might, what a wonderful dream it had been. The careful reader may see other dierences between various text engines, including the use of ligatures, hyphenation, the line-breaking algorithm, et-cetera. All text is supposed to be in 10 pt Times, in a narrow 5 cm wide column. The gures as included here are 600 dpi bit-map renderings, to ensure that you see exactly what I had in mind. The consequence is that the pdf may look blurry on screen. On the upside: it will allow you to judge the greyness even better. For the best comparison, I would recommend to print these pages. The text itself plus a few extra paragraphs can be downloaded from http:// www.nat.vu.nl/~sneep/ars/type/sample.html. The css formatting instruction should result in the same typesetting as for what I used, and is easy enough to read to get your application to produce exactly the same as what I intended. Additional samples can be sent to sneep.latex-faq@xs4all.nl. At the moment Im still looking for a sample from a current Word version, FrameMaker, Nisus Writer Classic, Wolfram Publicon and something like components of the ArborText Enterprise Publishing System. Other applications from which I do not already have a sample, are of course welcome. Please submit as pdf or ps with all fonts embedded, if possible and a description of the application you used.

Web browsers

All web browsers support a simple engine. A selection of four of them is included in gure 1. When available on multiple platforms, they should act the same, but dierences in font availability may cause dierent results. Despite this, the results of three of the browsers look remarkably similar. The html code has an indication of the language, so in theory the web browsers could try to hyphenate the text for better display. Safari is an interesting one: I do not know what engine it uses: either it uses the same one as KDEs Konqueror, or it uses the Cocoa text object. Comparison with TextEdit may show which of the two it is, see gure 4.

Word processors and page layout applications

The word processors are the most often used layout engines around. Sadly, they are not the best out there. They are, as far as I know all variations on the simple theme. But, lets face it: the focus of a word processor is not layout, it is on munching through vast amounts of content, and for producing the best layout, one should turn to a specialised application. Sadly most people never do, and we all have to endure the results. That may sound a bit over the top, but really, once youve seen how good computer generated typesetting can look, youll want all typography to be beautiful. 2

Page layout applications are meant to produce pleasant looking output, and they do with a varying degree of success.

A L TEX

This is the grand-daddy of the complex text-engines: TEX. Its focus is on generating the best looking layout. The process is rather dierent, as you give it your text, and TEX processes it all at once. It is a batch program, rather than an interactive one. Since the debut op PageMaker on the Mac in 1988, weve been conditioned to believe that the only way to produce good looking text is through wysiwyg. While it is not for everyone, and probably not for every occasion, with a programmable batch system better results may be achieved. It is only now that computers have become powerful enough to support a complex typesetting engine in an interactive application and even then footnotes had to be left out. A Needless to say that for scholarly texts footnotes are essential, and then L TEX is your only option. Similarly, for mathematical equations: while Microsoft Word does have an equation editor, it doesnt come close to the quality TEX delivers. A full description of the TEX engine is way beyond the scope of this text. The full and completely accurate description can be found in The TEXbook by Donald E. Knuth. The samples in gure 12 need some extra comments. With its default settings, A L TEX is stretched beyond breaking point, and it cannot satisfy its high demands, resulting in lines that are too long. In draft mode these lines are marked by a black block to draw your attention to them. Luckily we can set some parameters to alter TEXs behaviour, allowing TEX to accept slightly worse results. In recent years the development on TEX has continued, and two major contributions have been added to the hyphenation and justication algorithm. The rst is to allow certain characters to stick into the margin, creating an optically straight margin even though with a ruler youll see that the right margin isnt straight at all. The second addition is to allow the letters themselves to stretch and shrink to get the space between words to be more uniform.

Microsoft Internet Explorer 6 (SP 2)

Firefox

Apples Safari

Opera 7.54

Figure 1: A selection of the various web browsers out there.

Word 2004 for Mac OS X (no hyphenation)

Word 2004 for Mac OS X (with hyphenation)

Word v. X for Mac OS X Figure 2: Two dierent Word versions, three samples. The Word 2004 sample should be the same as Word 2003 for Windows but conrmation would be nice.

NeoOce

AbiWord 2.2.5

Figure 3: The main Open Source Word replacement: OpenOce, or at least its Mac OS X/Java clone: NeoOce. When you compare this to the real thing, shown in gure 2, you can see that it can never be a one on one replacement, page numbers will change. AbiWord is another Open Source word processor with many features and powerful import and export features. Alas, despite the fact that I told the application to produce fully justied text, the result looks like crap.

TextEdit (no hyphenation)

TextEdit (with hyphenation)

Figure 4: TextEdit is the Wordpad counterpart of Mac OS X. It uses the default text object of Mac OS X. It can work with or without hyphenation.

Mellel 1.8.2

Nisus Writer Express 2.1.1

Figure 5: These are two competing word processors for Mac OS X. Mellel has full support for international text (xing some problems that are inherent in Mac OS Xs own support), while Nisus Writer Express is a re-creation of the old Nisus Writer in Cocoa (but the classic version still has way more features).

AppleWorks

Mariner Write

Figure 6: AppleWorks and Mariner Write are two Carbon ports of classic Mac OS word processors.

FrameMaker 5.5

Ragtime Solo 5.6.4

Figure 7: Calling FrameMaker a word processor doesnt do it justice. It is a very powerful document creation tool. Its engine seems to be of the simple variety however. Ragtime Solo is another obeat application: it is word processor which can create some of its content dynamically. The engine also appears to be simple, although it oers an option for hanging punctuation.

Pages without hyphenation

Pages with hyphenation

Figure 8: Pages is part of iWork, released by Apple in the beginning of 2005.

InDesign 2 without hyphenation

InDesign 2 with hyphenation

Figure 9: InDesign 2 is the page layout application created by Adobe that nearly killed the application that held the page layout application market in a stranglehold for about a decade. It features a complex layout engine.

Scribus 1.3 GNU/Linux without hyphenation

Scribus 1.3 GNU/Linux with hyphenation

Figure 10: Scribus is an open-source page-layout application for Linux. It seems Scribus doesnt support ligatures, nor kerning. The layout engine is from the simple category. Instead of Times, the font actually used is the close lookA alike Nimbus Roman No9 L, which should be the same as the font used in L TEX. Thanks to Marcus Macauley for providing this sample.

Quark 4.1 (Classic) Figure 11: Quark is the application that most magazines have used to format their content for the last decade or so. As far as I know this is a simple engine, and apparently it has no facilities for automatic ligatures notice the fi rather than in nished.

10

A L TEX default settings

A L TEX with added tolerance

A L TEX with character protrusion

A L TEX with character protrusion and font expansion

A Figure 12: Four samples from L TEX. The main text contains an explanation.

11

S-ar putea să vă placă și