[texhax] TeX without backslash: possible?

Michael Doob mdoob at ccu.umanitoba.ca
Thu Nov 8 17:17:52 CET 2007


On Thursday 08 November 2007 6:53 am, Michael Barr wrote:
> I am typing this from a public access terminal in a Quebec City hotel. 
> The keyboard lacks a backslash and it got me wondering if TeX was even 
> possible on it.  Sure you can change the catcode of some other character 
> (but which?), but you cannot do that without a backslash.  The first place 
> I read about TeX, it was TeX 1 (TeX and MetaFont published around 1980) 
> the way it worked was that the first character in the TeX file that it saw 
> became the escape character for that file.  There were (and remain) things 
> like backslash sb and backslash sp for sub- and superscripts on deficient 
> terminals.  AFAIK, there is no way of doing this in TeX 2.*.
> 
> Of course a decent editor would allow you do this by copying the backslash 
> from a working file and using it to change the catcode of something else 
> to be the escape.

How about this approach?

perl -e 'printf("%ccatcode%c%c%c=0 ",92,96,92,47);printf("I like /TeX! /bye");' | tex

Wrap it in a script and you're home free!

Cheers,
Michael

--

------------------------------------------------------------------
Michael Doob                    Telephone: (204) 474-9796
Department of Mathematics       Fax: (204) 474-7606
University of Manitoba          email: Michael_Doob at umanitoba.ca
Winnipeg, MB, Canada R3T 2N2
------------------------------------------------------------------


More information about the texhax mailing list