[texhax] defining unusual control sequences

Uwe Lueck uwe.lueck at web.de
Sat Nov 20 18:40:20 CET 2010


"Vafa Khalighi" <vafakhlgh at gmail.com>, 20.11.2010 16:30:47:
> Can you define a control sequence in a package,  say,
> \me at test, such that you can use it in your document body
> without using \csname me at test\endcsname or without using
> \makeatletter, \makeatother in the body of your document?

Essentially not. Without \makeatletter, TeX only sees a command 
\me with a `@' ahead and some letters following. You could define 
\me to collect the `@' and the following "letters" and then call 
\csname ...\endcsname internally, i.e., you create a macro that 
mimicks/varies TeX's tokenizing, e.g., using \ifcat or so 
(ahm, niceverb in my nicetext bundle does similar tricks, 
 i.e., may provide "templates" for this purpose).

Cheers, 

    Uwe.


More information about the texhax mailing list