[tex-eplain] TeX--XeT
Laurence.Finston at gmx.net
Laurence.Finston at gmx.net
Wed Oct 25 16:17:53 CEST 2023
[...] since all the macros themselves boil down to plain TeX, albeit with a few changes.
All macros from all macro packages boil down to TeX primitives, with the exception that they might boil down to e-TeX primitives, if they depend on ones that are specific to e-TeX or theoretically have different behavior in e-TeX than in TeX. I don't know if there are such things in e-TeX. The same would apply to any other implementation of a TeX-like program that doesn't conform to Knuth's definition of what TeX's behavior should be. That is, that fails his "trip test". I believe he goes into this in _The TeXbook_.
eplain's verbatim feature works fine for me. It's not really a very complicated feature to implement: The catcodes of most characters that have special meanings have to be changed to 12 but you need to leave one as an escape (to replace backslash), preferably one that's unlikely to occur in the text you want to print verbatim. You need the escape character in order to be able to access the macro for turning verbatim back off.
Then you need a font with characters matching the characters in your text. That's why the typewriter font Computer Modern Typewriter Text (cmtt10 or cmtt12 or at whatever type size) is used. For example, it has an underline character and a double quote character in the appropriate positions.
In verbatim, you normally also want \obeylines and \obeyspaces. \obeylines works by making paragraphs out of lines, so you usually need to change \parskip and \parindent.
This is a list of the category codes and the characters to which they are assigned per default, where this makes sense, using plain TeX:
Category Meaning
-------- -------
0 Escape \
1 Beginning of group {
2 End of group }
3 Math shift $
4 Alignment tab &
5 End of line <return>
6 Parameter #
7 Superscript ^
8 Subscript _
9 Ignored <null>
10 Space
11 Letter
12 Other
13 Active ~
14 Comment %
15 Invalid <delete>
Please note that <return> will be a line-feed character (ASCII 12) under Unix and a line-feed character followed by a return character (ASCII 12, ASCII 13) under MS-DOS and Windows.
> Gesendet: Mittwoch, 25. Oktober 2023 um 15:53 Uhr
> Von: terry.s at Safe-mail.net
> An: tex-eplain at tug.org
> Betreff: Re: [tex-eplain] TeX--XeT
>
> Thank you,
>
> I could do a shortcut to the wrappers I have. I have some other documents on plain TeX to read then I hope to get The TeXbook. (I also have the free excerpt from The LaTeX Companion, Third, which will be helpful for fonts in LaTeX.) I think I should have a look at the OpTeX source (even if it's mostly over my head) for verbatim definitons and the like, since all the macros themselves boil down to plain TeX, albeit with a few changes.
>
> Sincerely,
> Terry S.
>
>
> -------- Original Message --------
> From: Laurence.Finston at gmx.net
> Apparently from: tex-eplain-bounces+terry.s=safe-mail.net at tug.org
> To: tex-eplain TUG <tex-eplain at tug.org>
> Subject: Re: [tex-eplain] TeX--XeT
> Date: Mon, 16 Oct 2023 14:08:27 +0200
>
> > You can use \begingroup and \endgroup instead of brackets. I don't remember off-hand if there's an \everyverbatim. You could write a wrapper for \verbatim using \bgroup and one for \endverbatim with \egroup. This is an advanced topic. Knuth addresses the issue of verbatim typesetting in _The TeXbook_. It might just be easiest to use \begingroup and \endgroup and change \parskip everytime you use \verbatim.
> >
> > > Gesendet: Montag, 16. Oktober 2023 um 14:00 Uhr
> > > Von: terry.s at Safe-mail.net
> > > An: Laurence.Finston at gmx.net
> > > Betreff: Re: Aw: Re: [tex-eplain] TeX--XeT
>
More information about the tex-eplain
mailing list.