I was browsing the TeXbook source file texbook.tex from CTAN. In it, I came across the control word pair \begintt, \endtt (e.g., lines 445–447, looks like for marking up source code). But I couldn't find them mentioned in the TeXbook, nor are they in Knuth's plain.tex macro file. I also tried $ tex '\show\begintt' on the command line, which returns undefined.

I'm wondering, is texbook.tex from CTAN the actual original file that Knuth authored? Because it just seems odd (to me, anyway) that he would have used any macros when writing his original book that he wouldn't have included as "plain TeX".

  • 4
    plain tex are what are described in the texbook as "basic macros" it isn't intended to use plain tex for writing documents, but instead a more extensive format, the texbook uses manmac, other fromats are amstex, latex, etc Aug 29, 2019 at 22:30
  • @DavidCarlisle That gives a good perspective—thank you.
    – yroc
    Aug 29, 2019 at 22:33

1 Answer 1


\begintt and \endtt are defined in manmac.tex

\outer\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=\z@
  \catcode`\|=0 \rightskip-5pc \ttfinish}
{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character
  |obeylines % end of line is active

Actually \endtt is not a macro, but just a delimiter for deciding where to stop the verbatim listings.

The source of the TeXbook starts with

% This manual is copyright (C) 1984 by the American Mathematical Society.
% All rights are reserved!
% The file is distributed only for people to see its examples of TeX input,
% not for use in the preparation of books like The TeXbook.
% Permission for any other use of this file must be obtained in writing
% from the copyright holder and also from the publisher (Addison-Wesley).
  \errmessage{This manual is copyrighted and should not be TeXed}\repeat
\pausing1 \input manmac
  • 1
    I see, thank you. Would manmac.tex macros be considered part of "plain TeX"?
    – yroc
    Aug 29, 2019 at 22:20
  • 2
    @yroc No, they're a supplement used specifically for the TeXbook.
    – egreg
    Aug 29, 2019 at 22:23
  • 2
    @yroc -- manmac is also the macro set used for the METAFONTbook. Aug 30, 2019 at 0:25

You must log in to answer this question.

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