Am 12.01.2009 um 10:39 schrieb Taco Hoekwater:

The example text is flawed in itself: \newcatcodetable gives you an
empty table, and \startcatcodetable upgrades that to 'initex' level
itself. But initex *does not* set the catcodes of { and }. Nor
does it set the catcode of $, & and %, so the catcode assignments
that are needed are not there, and the ones that are there are
superfluous.

 \startcatcodetable \mycatcodetable
   \catcode`\{ = 1
   \catcode`\} = 2
 \stopcatcodetable

is enough.


No in a real macro, here is a problem I posted a long time ago where
I was now able to replace my low level catcodes changes with catcode
tables, I hope this will help other users if they have the same problem.

\unprotect

\newcatcodetable \diacatcodes

\startcatcodetable \diacatcodes
    \catcode`\^^M =  5
    \catcode`\    = 10
    \catcode`\\   =  0
    \catcode`\{   =  1
    \catcode`\}   =  2
    \catcode`\%   = 11
    \catcode`\!   = 11
    \catcode`\?   = 11
\stopcatcodetable

\def\????ax{@@@@ax}

\def\setupaxis
 {\pushcatcodetable
  \setcatcodetable\diacatcodes
  \dodoubleargument\dosetupaxis}

\def\dosetupaxis[#1][#2]%
 {\def\docommand##1{\getparameters[\????ax##1][#2]}%
  \popcatcodetable
  \processcommalist[#1]\docommand}

\setupaxis
 [\c!x,\c!y]
 [\c!format=%d]

\protect

\starttext
\getvalue{@@@@axxformat}
\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to