Tex systems

Robert Crowther Jan 2022
Last Modified: Feb 2023

What is it?

TeX is a way of marking text. Tex programs take the resulting documents and from the marks decide where and how the letters of the text should be placed. The output is usually in PDF format.

LaTeX is a system built on top of TeX to provide easy generalities for setting page sizes, making titles/subheads, footnotes, page references, and so on. The actions most people think need a ‘word processor’. Incidentally there are other programs beside LaTeX, such as ConTeXt (which leans towards more creative and versatile typography). Mostly in this article I’ll say TeX, or a ‘TeX system’, meaning TeX with these kinds of packages on top.

If you are really interested, much of a TeX system models the art of laying out print as it used to be done by hand—the layout on a page of paper, the packing of letters into lines, the subtle stretching of space, the choices made in hyphenation, and so forth.

What it’s made from

The base programs were written in a kind of Pascal. These programs are usually converted to C for porting to different computer systems.

The marks and configuration of TeX are their own language. TeX language is all most users ever need.

Where it can run

The system has been converted to most kinds of computers, new or old. There are a few bundles, or ‘packages’ of TeX, such as ‘TeX Live’. Unix users can find these in repositories.

Who looks after it?

Since Donald Knuth made TeX, various organisations, loose and formal, have curated parts of the expanding TeX universe. Depends which part of this universe you are talking about.

History

Original and base TeX code is by a guy called Donald Knuth, who was big in computer algorithms, with additions by Guy Steele. Knuth despaired that word processors couldn’t match the quality of the old handset, paper‐print processes. Worse, Knuth’s day‐job was mathematical expressions, and word processors couldn’t print them. This was in the late‐1970’s–1980’s.

Licence

The core of TeX is stated as ‘public domain’… with an odd, license‐like statement that, if altered, TeX code must be called something else. Derivatives and packages of TeX tend to be stubbornly GPL free‐licenced. TeX systems are capable of handling fonts, for example Adobe’s TrueType fonts, which require commercial licences.

Install

There are bundles of software available for Apple and Windows computers. On a Linux system, install a package like ‘tex‐live’. Listen to me, you don’t want to assemble a TeX system yourself—it’s halfway towards assembling an operating system.

Internal structure

TeX is the base ‘engine’. Since it is intended to work on many computers, it ignores operating systems. A TeX system is very much a ‘put this bit in this named folder at this position’, ‘output pours into this folder’, ‘run with a commandline’ kind of system. Configuration and convention, not GUIs.

After that, there are masses, thousands, of extra modules, templates and whatever. They usually need to placed in the right places, then TeX is fairly slick at gathering them in.

What does it look like (configuration)?

TeX marks begin with a backslash and add parameters with curly brackets. In some systems, a quote within some text may look like this,

Lines from the book,
\begin{quotation}
 “Land of Darkness?” exclaimed Monkey, at last coming fully awake. “But that’s the realm of Yama, Lord of the Dead! I don’t belong here!”

“That’s what they all say!” said Horse Face.
\sourceatright{Tales of the Monkey King}
\end{quotation}

I'm a big fan of this book, ever since I read the Arthur Waley translation. One version or another has always been on my shelf, and when I loose it, I replace it.

Incidentally I rate the Arthur Waley translation highly.

For the technically interested: TeX configuration is a Turing‐complete, text‐based, macro language,

What does it look like (output)?

Usually the output is a PDF intended for printing. The PDF will look like a book. When I say it looks like a book, here is the above marked text run through a Tex/LaTeX system,

image of tex_quote_sample
Low res, but you can see...

And I’m not trying. You see, word processors have many concerns, so do not prioritise structured input or quality output. Here’s the above as printed by a modern word processor,

image of libreoffice_quote_sample
8 lines of text being adequate

I had to work on that for over a minute, yet it’s obviously not the same quality. At the time of writing, word processors have existed for thirty years, they do a job which is important, but they can not match code like TeX or InDesign.

Getting started

Download a bundle then install, or use a package. Then follow instructions. Best to try a few marks in a text file, then immediately try make a PDF. Generating output is involved, and gets more involved the more functionality you want.

In use

You’ll need a manual on your chosen TeX system. You’ll need to learn the marks. This is not difficult for simple word‐processing. The commands become involved if you want to, for example, make a book index, or a table of contents. And very involved if you want to generate your own specialist titles/headlines etc.

Extending

Humm, depends what you mean. It’s highly unlikely you mean modify the base TeX code. If you want to add packages for extra functionality, you drop them into named folders and the like, then import them to the documents. If you want to write your own kind of headlines, make a template for a special kind of letter, you can write these kind of things in TeX code. In practice, this is usually tidy and neat, but from cold requires much research.

Libraries

Oh my, lurking on obscure sites, newsgroups and mailists, there is a world of TeX. For starters, a sea of templates. More coherent, you can find major package bundles. For example, if your interest is ‘I want to use TeX to generate documents fit for a philosophical magazine, formatted and cited in the magazine house style’, ask the magazine. If they use a TeX system, they’ll tell you what you need.

Project policy

It’s not so much policy, but there’s a kind of attitude, or culture, round Tex usage. The culture is that time spent on formatting a document is time wasted. Better to get the document written. This culture naturally comes from the ability of TeX to pour out documents to very high, preset standards.

It’s hard to argue with this, as people who do this work for a living love TeX. But argue I will. Most people’s experience of computers is through a graphical system like Apple or Windows. Moreover, writing text is a job most people only will ever do occasionally. And the TeX process is alienating—confronted with a blank screen, most people want to write a headline then change the colour.

I’ll be direct. I come from England where, aside from a few specialist departments, Universities have no idea what TeX is. I know that TeX can handle everything in a final dissertation/thesis submission—page numbering, structured headings, bibliographies to academic standards, tables broken across pages. I know also that a Tex system can do this, if necessary, through thousands of pages. But I still would not recommend TeX—I’d recommend whatever laptop tool everyone else is using. I don’t want to be blamed, in those final hallucinogenic days of dissertation submission, for failure.

Documentation

Especially for the free world, is extraordinary. Perhaps because TeX is designed for making documents? Or because many of it’s users are teaching academics? Yes, much of the documentation is in PDF format, but you should see some TeX documentation. The effort and presentation is exceptional—shows possibilities that most code documentation never approaches. And, yes, there are books available.

MIA

For most users, TeX output goes far beyond anything they expected from a computer. The following are personal comments, may not be shared by others, but anyway…

We are here talking about ‘word‐processing’. Is there a TeX ‘program’ like Microsoft Word? Saying that, you are asking for a Graphic User Interface, not a system where you fiddle about in files. Yes, there are and have been a few, most enduring seems to be Lyx. Now, these GUI programs may be of great interest to academics who need to churn out articles. But I’ve found them poor for general use—they have messy setup procedures, awkward cross‐platform GUIs, and tend to obscure what a TeX system is doing. To me, though the utility is obvious, they go against the grain of TeX procedure. I’d never recommend a curious person start in TeX with a GUI.

The other comment I might add is that the TeX universe is wild and capable, but has never reached beyond it’s own world. I know TeX doesn’t need to, and you can’t fault the attitude of the contributors—but from code to documentation, TeX is strange and insular.

Examples of use

Truckloads of academic books, and stacks of academic magazines, are made using TeX— it’s as simple as that. However, I believe for general and magazine purpose most print‐presses use programs like the Adobe flagship ‘InDesign’. I do not know the coverage, market percentages, and so forth. However, for sure, InDesign, like TeX, is capable of making fine books.

Off‐hand facts

There’s cultural load round the name ‘TeX’, which is reported by Wikipedia to be pronounced ‘with the final consonant of loch or Bach’. The name itself is rooted in etymology. The TeX universe is full of this kind of arcane game playing.

Weird behaviour

Actually, never. I’ve never had a problem. Sometimes a TeX stack doesn’t do what you want, or designs move in ways that you do not want, but no outright misbehaviour. Knuth offers a reward for anyone who finds a bug. And the plan is, when Knuth dies, to freeze the TeX system forever.

Performance

Produces results nearly instantaneously, even on large documents. When I say large, I mean a TeX system can chew up an 80,000 page document, a standard ‘novel’, in seconds.

This is worth considering. Most ‘word processors’ will break down above 80 pages or so, but TeX can keep processing.

Summary

Pros,

Cons,

Conclusion

Honestly, I think the first thing to say about TeX is that not many people need it. It’s mainly for technical books, and the number of printing presses that use TeX are fewer than people seem to think. The guy in the local town who makes restaurant fliers will not know what TeX is. I’d go far and say, unless someone requires you to use a TeX system, or you are considering self‐printing, you should avoid it. TeX systems are slick, but you must learn them, and Tex is a long road for the end of better output. Not only that, but if you intend to go to a print‐firm, such firms are good at fixing errors in what they are given. You should to use whatever system they know.

That said, there has always been the positives. Tex‐work is faster than a word processor. Not a little faster—I estimate a Tex system can often half the time. And TeX systems can do all the things word processors can not—intermittent page numbering, indexes, bibliographies… no problem. And TeX output looks better—not a little better, but like an artist put it together. Which, in fact, is what has happened. So what can I say? I recommend you never use TeX unless you must. But you, me, the world, we all miss out.

References

Tex on Wikipedia,

https://en.wikipedia.org/wiki/TeX

LaTex on Wikipedia,

https://en.wikipedia.org/wiki/LaTeX

Latex bundles,

https://www.latex-project.org/get/

Example of LaTeX PDF output. Is a manual for font usage, but LaTeX can churn this quality and design of document, no problem,

https://anorien.csc.warwick.ac.uk/mirrors/CTAN/info/Type1fonts/fontinstallationguide/fontinstallationguide.pdf

If you are serious about publication, Adobe’s InDesign is likely the start point, though it will be expensive,

https://en.wikipedia.org/wiki/Adobe_InDesign