# (La)TeX vs other typesetting systems: the glue

Short background

Once a latex document is seen, almost everyone want to start using it. Then, as it is difficult to use, one get interested in the comparison to other typesetting systems like Word or Open Office.

In The not so short introduction to latex2e (latex pronounced 'laytech') it can be read that LaTeX is very good for:

• Writing mathematical formulas,

• Generate well-structured docs because the logical structure must be specified.

Also, by changing the preamble, we can change the whole document, which is quite a good feature.

But although I am newbie, it is quite straightforward that one of the (La)TeX 's beauties is the glue. (La)TeX enclose letters and words into boxes and make them fit in a nice way into the line; and same for paragraphs to fit on the page.

Question

Is this feature particular of (La)TeX and so an important difference with other typesetting systems?

• InDesign also has line-breaking that takes the entire paragraph into account and stretches glue accordingly (borrowed from TeX); non-typesetting systems like Word and Open Office (and the line-breaking in browsers) don't. Apr 15 '18 at 5:55
• LaTeX isn't difficult to use! Apr 15 '18 at 6:55
• @IanThompson, LaTeX is nothing but straightforward. Especially for people that are not familiar with coding. Apr 15 '18 at 11:24
• tex's linebreaking is still (after all these years) state of the art, but it is not just available in tex these days, many web browsers use the same hyphenation mechanism and tables. Apr 15 '18 at 12:14
• Answers and comments focused in linebreaking but IMHO glues certainly are important not only for that. In most (all?) words processor you can set the X length for such-and-such but not X plus Y minus Z, i.e., stretchable and shrinkable lengths even to infinite. That allow a lot lot of flexibility in another aspects such as paragraph skips.
– Fran
Apr 19 '18 at 0:17

There are a number of things that LaTeX does better than Word. To illustrate, I set the same passage (from Milton's Areopagitica) in both. I tried to make the comparison fair by incuding settings in both that should maximise quality. For LaTeX I used microtype. For Word, I switched kerning and ligatures on--though ligatures didn't help because I didn't have an opentype version of Times. Still, that seems a fair comparison of both systems "out of the box", since LaTeX does have a properly supplied version of Times. I set both systems to use 12 point type as that is now conventionally understood (i.e., for LaTeX, 12 "big points") on 14 point fixed baselines.

The first example has LaTeX at the top (A), Word at the bottom (C).

The LaTeX version runs a little shorter than Word, even though Word has introduced three successive hyphens which look pretty bad. The first two lines are notably poor. To my eye the LaTeX version, although generally more even, has a distinct blemish around "men. And", where it looks like there is a hole in the paragraph because the wide spacing there forms a river (maybe a pool?) with the relatively wide spacing in "dragons' teeth" above.

For the second comparison, I set LaTeX (B) to \frenchspacing and I turned off hyphenation in Word (D), in each case in order to address what seemed the biggest blemish in the first version.

Both now do, I think, better. The LaTeX setting is more even (though there is still a bit of a river around "men. And" if one wanted to be super-picky). The Word version, however, is much less even and, without hyphenation, with several lines that have too much space (especially where the hyphens have been lost).

So I think we can say, yes, LaTeX does do an objectively better job. But both tools need (to my mind) tuning: Word needs kerning switched on, and LaTeX needs \frenchspacing. Word could be improved further, I think, if I had an opentype version of Times to give it. The essential difference here is in the algorithm used for hyphenation and justification: LaTeX looks at the whole paragraph to produce something that works best overall, where Word simply makes line-by-line decisions which sometimes don't really pay off.

As comments note, there are commercial systems (like InDesign) that will do a much better job than wordprocessors at this: word processors after all are not meant as professional typesetting systems. Note also that the differences may seem small but they are definitely still noticeable, even to a non-expert, although the non-expert may not be able to say why one looks better.

I think it's a matter of opinion whether LaTeX is really "difficult to use". It's definitely easier than InDesign, I'd say (which can't really be used to write documents). Although Word seems easier, most users have trouble finding and using the settings (like hyphenation, kerning, and ligatures) which are needed to make its output more-or-less acceptable. And there are many other things (e.g. labels, cross-references, bibliographies) where LaTeX seems, to me at least, simpler than Word, and certainly more reliable. Which is easier or more difficult depends on what you are doing.

• Reminds me of a blog post I've done a few years ago niederberger-musik.de/warum-latex-ein-vergleich-mit-libreoffice Apr 15 '18 at 9:55
• The really hard part is making tables and changing the appereance of LaTeX. For the first, there are online services that help on that and for the second, LaTeX was built to be consistent, therefore it needs knowledge to tweak it. Apr 18 '18 at 2:33