10

This answer contains the statement:

It requires a current tex system (texlive 2021 or a current miktex) as it needs some new primitives.

Do newer tex systems add primitives that weren't already part of TeX? Do they add to the tex.web source code? If so, do they make use of the extension concept mentioned in part 53 of TeX: The Program?

Or have I misunderstood the quoted statement?

  • Ah, the \expanded one, this is not e-tex. – user202729 Jun 11 '22 at 10:31
  • 1
    Not generally. You can find pdftex.web and read it after weaving: https://tug.org/svn/texlive/trunk/Build/source/texk/web2c/pdftexdir/pdftex.web?revision=63056&view=co – egreg Jun 11 '22 at 11:55
  • 2
    Pdftex is under active development and new primitives are added if needed. E.g last year support for structure destinations and commands to interrupt a link has been added. – Ulrike Fischer Jun 11 '22 at 12:32
  • It sort of depends on how you define primitives. Is \AddToHook a primitive? How about \hangindent? I'm fairly centain \hrule and \vrule qualify as primitives, since they don't use normal arguments. – John Kormylo Jun 12 '22 at 03:50
  • Primitives are defined in the C or Pascal program, not via \def or \let. – Heiko Theißen Jun 12 '22 at 06:06

1 Answers1

12

As far as I understand how the development took place, there was first e-TeX that was written using change files for the standard tex.web. The new primitives were added in the main code, not as extensions such as \special (which was written by Knuth as an extension in order to provide an example), because this would make it too difficult to interact with the rest of the program.

However, the “change file” strategy became too heavy for pdftex, so a whole new .web source was written that contains the original tex.web and also the changes by e-TeX.

You can find pdftex.web in the repository for TeX Live at https://tug.org/svn/texlive/trunk/Build/source/texk/web2c/pdftexdir/pdftex.web?revision=63056&view=co

It can be weaved and compiled normally. As an example, here is module 442 that shows some new primitives alongside original ones.

enter image description here

Compilation of pdftex requires C, because it needs to be linked to standard C libraries, but nowadays every implementation of TeX and friends is compiled with web2c that proved to be very reliable in the last thirty years.

egreg
  • 1,121,712