[texhax] inovoke command without backslash ?

Uwe Lück uwe.lueck at web.de
Thu Mar 4 16:22:01 CET 2010


At 15:12 04.03.10, wawan wrote:
>Hmmm very interesting ....
>I'll try to read LuaTeX for now I using "preprocessor" (perl) to do that 
>jobs, but I can imagine, it will beutifull (at least for me) when 
>users  could type a command without \ ...
>
>Gamma symbol is sgamma
>*sgamma replace \gamma
>
>or may be we can write there are symblos \begin[symbol} gamma beta alpha 
>\end{symbol}

\begin{symbol} would call LaTeX's \symbol command, which is a kind of 
improvement of the primitive \char, i.e., \symbol{...} is a bit safer than 
\char...

But indeed you might try "symbols" instead, with the following definition:

      \newcommand{\symbols}{\catcode`\ =0 \catcode`\^^M=0\relax}

Curious,

     Uwe.
>1. For wawan: I think in large portions of his code, he generates each 
>glyph by a command, so
>
>     alpha beta gamma  delta epsilon
>
>or more clearly
>
>     alpha beta gamma space delta epsilon
>
>may be more comfortable than
>
>    \alpha\beta\gamma\ \delta\epsilon
>
>or
>
>    \alpha\beta\gamma\space\delta\epsilon
>
>This mode of "characters/glyphs only" may need be ended by a certain command
>
>     ReturnToUsualMode
>
>(\ReturnToUsualMode)
>
>2. The issue caught my interest because I have sometimes thought of 
>defining a script language (that does not need any escape characters, just 
>as "normal" programming languages) merely by TeX macros. Just locally, 
>there would be a "script reading mode" for comfortably defining control 
>macros where you could type
>
>   for i = 1 to n
>
>in place of
>
>   \@fornum \@forvar=1\@forto\@forlast
>
>or so. Maybe for a LuaTeX where Lua is implemented by TeX macros.
>
>Cheers,
>
>    Uwe.
>
>
>
>
>



More information about the texhax mailing list