TeX is amazingly customizable. I would never do this, but I am curious whether TeX possesses the following functionality:
As I understand it, TeX reads in a stream of bytes, and assigns each a category code. A letter or other character byte, if it is not part of a control sequence, is processed literally, by looking up the byte in the current font table (in horizontal or vertical mode), and looking up the byte 's mathcode in math mode.
Thus, if the byte 0x61
(ASCII a
) currently has catcode 11, then in horizontal or vertical mode, the glyph at position 0x61
in the font table will be placed in the current list (as long as the byte is not part of the name of a control sequence, or part of a macro).
I am wondering whether it is possible to alter this functionality -- to, for instance, place the glyph at position 0x62
instead, when inputting byte 0x61
. I suppose this is possible in math mode, with the \mathcode
primitive, but is there a way to do something like this in horizontal or vertical mode? Again, not that I want to do this, but I'm playing around with the boundaries of TeX's capability and am curious whether this is a thing.