Hi, can you fix the catcode related macros in syst-cat.mkiv, the macros did not work because a few macros are not define like \savecatcodetable and a few other are only defined in the MkII part like \catcodetable. Wolfgang
On Mon, 29 Dec 2008, Wolfgang Schuster wrote:
Hi,
can you fix the catcode related macros in syst-cat.mkiv, the macros did not work because a few macros are not define like \savecatcodetable and a few other are only defined in the MkII part like \catcodetable.
Aren't \savecatcodetable and \catcodetable luatex primitives? Aditya
Am 29.12.2008 um 23:03 schrieb Aditya Mahajan:
can you fix the catcode related macros in syst-cat.mkiv, the macros did not work because a few macros are not define like \savecatcodetable and a few other are only defined in the MkII part like \catcodetable.
Aren't \savecatcodetable and \catcodetable luatex primitives?
You're right, this helped me to find the problematic parts in the MkII and MkIV macros. I was able to make a working example where I commented the problematic parts. I hope this helps Hans to fix it and thank you for the hint. \startmode[mkiv] \long\def\startcatcodetable#1#2\stopcatcodetable {\bgroup %\catcodetable\scratchcatcodetable \the\setdefaultcatcodes #2% \savecatcodetable#1\relax \egroup} \stopmode \startmode[mkii] \def\catcodetable#1% {\mathchardef\currentcatcodetable#1% %\the\setdefaultlowercatcodes %\ifrecatcodeuppercharacters\the\setdefaultuppercatcodes\fi \the\csname @@cct:\number#1\endcsname} \stopmode \newcatcodetable \mycatcodetable \startcatcodetable \mycatcodetable \catcode`\$ = 12 \catcode`\& = 12 \catcode`\% = 12 \stopcatcodetable \def\normaltext {\pushcatcodetable \setcatcodetable\mycatcodetable \donormaltext} \def\donormaltext#1% {#1% \popcatcodetable} \starttext \normaltext{Procter & Gamble's stock climbed to $2, a 10% gain.} \stoptext Wolfgang
Hi Hans, is there no a fix availabe for this problem. Wolfgang
Am 29.12.2008 um 23:03 schrieb Aditya Mahajan:
can you fix the catcode related macros in syst-cat.mkiv, the macros did not work because a few macros are not define like \savecatcodetable and a few other are only defined in the MkII part like \catcodetable.
Aren't \savecatcodetable and \catcodetable luatex primitives?
You're right, this helped me to find the problematic parts in the MkII and MkIV macros. I was able to make a working example where I commented the problematic parts.
I hope this helps Hans to fix it and thank you for the hint.
\startmode[mkiv]
\long\def\startcatcodetable#1#2\stopcatcodetable {\bgroup %\catcodetable\scratchcatcodetable \the\setdefaultcatcodes #2% \savecatcodetable#1\relax \egroup}
\stopmode
\startmode[mkii]
\def\catcodetable#1% {\mathchardef\currentcatcodetable#1% %\the\setdefaultlowercatcodes %\ifrecatcodeuppercharacters\the\setdefaultuppercatcodes\fi \the\csname @@cct:\number#1\endcsname}
\stopmode
\newcatcodetable \mycatcodetable
\startcatcodetable \mycatcodetable \catcode`\$ = 12 \catcode`\& = 12 \catcode`\% = 12 \stopcatcodetable
\def\normaltext {\pushcatcodetable \setcatcodetable\mycatcodetable \donormaltext}
\def\donormaltext#1% {#1% \popcatcodetable}
\starttext \normaltext{Procter & Gamble's stock climbed to $2, a 10% gain.} \stoptext
Wolfgang
Wolfgang Schuster wrote:
Hi Hans,
is there no a fix availabe for this problem.
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. Best wishes, Taco PS sorry, I missed this message the first time around.
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
participants (3)
-
Aditya Mahajan
-
Taco Hoekwater
-
Wolfgang Schuster