[tex-eplain] TeX--XeT
terry.s at Safe-mail.net
terry.s at Safe-mail.net
Wed Oct 25 22:12:49 CEST 2023
(Oops, meant to reply to list)
Thank you Laurence,
Maybe what you said in your other email --- something about particular glyphs in fonts --- is involved, though I can't see why. I did get ONE of the characters to display normally ONCE, so maybe not --- much seemed dependent on the exact syntax of my macro and where I reset the catcode again. (This issue did NOT occur with the demonstrated macro making "|TeX" a shortcut for "\TeX" from the 2005 TUGboat article.) But I'll have to re-construct my experiments to facilitate further demonstration (not doing it soon).
I was using "|" because I can't use "\" to end verbatim, for obvious reasons. "|" seemed a good choice because (unless one is demonstrating math code or listing command-line options) "|" is almost NEVER used in normal text (thus it's used for "|endverbatim").
> If I define a macro using one character as the escape and then set the catcode of another character to be the escape character, then the macro still exists, but you need to use the new escape character.
Aha ... so my code was probably TOTALLY GOOD (at one point) except I needed to RE-declare "\" as THE escape character!!!
(I BELIEVE that I once had "|" printable as the long dash in normal text after a previous verbatim was closed, and "|", supposedly escaped to be printed in math, was the character that still wouldn't print, [EDIT: but usually both wouldn't print] ... obviously referring to when code first compiled without error and verbatim opening and closing worked.) Sorry for the caps ... for emphasis only.
Do I understand you correcty??? There can be only 1 at a time????
Thank you,
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: Wed, 25 Oct 2023 17:06:23 +0200
> It's not necessary to use | as the escape character. Any character that you can type and reaches TeX as a value between 0 and 255 will do. There can be problems if your editor automatically converts some special characters to 16-bit characters. This can be a real pain in the neck.
>
> Definitions don't just disappear. If I define a macro using one character as the escape and then set the catcode of another character to be the escape character, then the macro still exists, but you need to use the new escape character. I don't remember whether there can be more than one at a time; I don't think so, but maybe there can.
>
> A definition may disappear if it's defined locally. Then it will only exist within its scope.
>
> > Gesendet: Mittwoch, 25. Oktober 2023 um 16:48 Uhr
> > Von: terry.s at Safe-mail.net
> > An: Laurence.Finston at gmx.net
> > Betreff: Re: [tex-eplain] TeX--XeT
> >
> > Thank you Laurence,
> >
> > In addition to (hopefully) define a shortcut-and-wrapper-in-one, I just don't like typing \verbatim ... |endverbatim all the time (as opposed to, say, \verb ... |verb. I actually had a nearly-working implementation inspired by a 2005 eplain article defining |TeX to do the same as \TeX, to the point where it threw no more errors but wouldn't print "|" or "---" (solid) ... even printing one of those (I forgot), but I lost that implementation and got back to errors. (My bad, should have saved individual documents at each step.) The issue appeared to be the NEED to declare "|" an escape character for \def to even allow it (still required escaped: \def||verb{blahblah}) ... on reverting the catcode, the definitions that printed the original characters was NOT reinstated --- whereas the |TeX example which merely needs it *active* (not *escape*) did not have this issue of the original definitions getting lost. I was going to post the nearly-working source (it actually worked so fa!
> r as opening and closing a verbatim environment is concerned). But I'm just not touching it any more now; it's not a priority; it's a wish-list/to-do item.
> >
> > Terry S.
More information about the tex-eplain
mailing list.