14

ConTeXt and LaTeX are well-known and I'm aware of different engines to process those, e.g., XeTeX, pdfTeX, or LuaTeX.

But on this meta question discussion came up about TeX, plain-TeX, initex. Can someone please tell me the quick difference between those? Are there any other meta-packages? And what is bare minimum TeX (the one everything else is based upon)? And which one of these are "frozen" in featureset and bugs.

3
  • 1
    What is a metapackage? Is it a format? Commented Aug 11, 2010 at 20:49
  • @Charles Stetwart: TeX is frozen. People have extended TeX into something else which you can call "a fork". These forks have substantially modified TeX for them to become separate subjects in document processing.
    – Dima
    Commented Aug 12, 2010 at 20:03
  • I am unable to find csplain here. Maybe this is due to csplain is not less-well-known, it is well-known :)
    – wipet
    Commented Mar 31, 2016 at 19:50

3 Answers 3

23

I think you are wanting to know about IniTeX and the plain format, mainly. The TeX binary knows roughly 300 primitives: things which are actually defined in the binary. This includes some you probably know (such as \let or \def) and others you probably don't (such as \output). An easy way to see if something is a primitive is to \show it: you'll just get the name again.

> \let=\let.
l.1 \show\let

If you start TeX in IniTeX mode (tex -ini), that is all you get. The problem is that this is not very useful. There are no fonts loaded, there is no output routine (so you get a 'fallback' dump of \box255), and so on. The primitives are all you need to build a working typesetting system, but there is 'some assembly required'. What IniTeX is good for is creating a format: you can only dump TeX's memory into a format when in IniTeX mode. So this is what is used 'behind the scenes' by TeX distributions to produce the LaTeX format, the plain TeX format (see below) and so on.

This brings us to the plain TeX format, which is often referred to simply as 'plain'. This is a minimal set of macros, etc., that Knuth wrote to make the TeX typesetting engine produce something usable. It doesn't provide very much, but there is a lot more than just the 300-ish iniTeX primitives. For example, there is an output routine, so things actually print. Plain TeX defines a lot of useful basics, such as constants and methods to allocate variables. If you type tex at the terminal, you will be using this plain format (unless you specifically ask for IniTeX).

LaTeX2e uses most of the plain format as a base, and so you will find a source file l2plain.dtx which copies much of plain TeX into LaTeX. There are some differences (for example, LaTeX's output routine is very different from plain TeX's). In that sense, plain TeX is a 'base'. If you look at the LaTeX3 work, things are rather different in implementation. However, the base requirements (set up variables, load fonts, do output, provide minimal macro support) remain the same. It's not really possible to drop parts of plain TeX and still do anything useful.

Both the TeX engine itself and the plain TeX format are maintained by Knuth. There are no new features added to either of these by Knuth, but he does fix bugs. The later are very rare indeed, so if you think you've found one make very sure! One of the reasons for projects such as pdfTeX, XeTeX and LuaTeX is to add new features to the engine, something that will not happen with TeX itself.

Of course, over time there have been other formats. Knuth's model (as seen with The TeXbook) was to have dedicated formats for dedicated purposes. Both LaTeX and ConTeXt have gone the other way: they are general formats that can be used for many things. Other specialised formats do exist (see CTAN for example), but these have never really caught on. It turns out to be easier to have more generalised formats (LaTeX, ConTeXt or indeed plain with custom macros) and choose which bits to use than to have many formats and have to pick which one to use.

3
  • 1
    It was when Knuth wrote TeX (when each page might take minutes to generate on a seriously expensive computer system). Today, the case is not so strong. The TeXbook is actually pretty light on macros compared to something like loading Tikz (or indeed my own siunitx, which is about 6000 lines long plus loading all of expl3).
    – Joseph Wright
    Commented Jul 28, 2010 at 9:08
  • what do you mean there is no output routine (so nothing will print)? does this contradict tex.stackexchange.com/a/296883/71471or I am mistaken? I was about asking this question what is the output routine of initex?
    – touhami
    Commented Mar 31, 2016 at 17:18
  • @touhami You are right: the fallback OR is operative. I've edited.
    – Joseph Wright
    Commented Mar 31, 2016 at 19:00
7

This site gobbled my previous answer, so you miss out on the hyperlinks, but some other less-known macro formats include:

  • lollipop
  • eplain
  • BLUe

Of these, I think that eplain is the only one that is currently used and maintained.

Update 2015: some time in the recent past, Vafa Khalighi has revived lollipop.

1
6

First, there are two macro packages that have still some user base:

  • amstex (The original plain TeX based format used by the American Mathematical Society)
  • texinfo A very specialised and different TeX format to typeset info pages from the GNU project.

Then, there are a few macro packages of mainly historical interest

  • amslatex before the creation of the amsmath package, there was a special format merging amstex and latex features.
  • manmac the format used by D.E.Knuth to typeset the Computers and Typesetting series.
  • ilatex (aka international LaTeX), a fork of LaTeX2.09 to support other languages than english

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .