diff options
author | Karl Berry <karl@freefriends.org> | 2006-11-18 01:37:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-11-18 01:37:52 +0000 |
commit | 5c91b9f8a88e06f057a6a08b0a755a224d08e019 (patch) | |
tree | 57cfafb6bd6c146dcdfc911dbef8db622c6476bd /Master/texmf-dist/tex/context/base/syst-cat.mkii | |
parent | 983736c2ab572e9a860c74f0f781b3decd282f13 (diff) |
context 17nov06 update
git-svn-id: svn://tug.org/texlive/trunk@2449 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-cat.mkii')
-rw-r--r-- | Master/texmf-dist/tex/context/base/syst-cat.mkii | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-cat.mkii b/Master/texmf-dist/tex/context/base/syst-cat.mkii new file mode 100644 index 00000000000..6146102586e --- /dev/null +++ b/Master/texmf-dist/tex/context/base/syst-cat.mkii @@ -0,0 +1,61 @@ +%D \module +%D [ file=syst-cat, +%D version=2006.09.18, +%D title=\CONTEXT\ System Macros, +%D subtitle=Catcode Handling, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\def\newcatcodetable#1% + {\global\advance\cctdefcounter\plusone + \global\mathchardef#1\cctdefcounter + \expandafter\xdef\csname @@ccn:\number\cctdefcounter\endcsname{\string#1}% logging + \expandafter\newtoks\csname @@cct:\number\cctdefcounter\endcsname} + +\mathchardef\currentcatcodetable\zerocount + +\newtoks \setdefaultlowercatcodes +\newtoks \setdefaultuppercatcodes + +\def\next#1% we don't have a proper loop defined yet + {\edef\nextnext{#1{\the#1\catcode\the\cctcountera\space\ifnum\catcode\cctcountera=11 11\else12\fi}}% + \nextnext\ifnum\cctcountera<\cctcounterb \advance\cctcountera\plusone \expandafter\next\expandafter#1\fi} + +\cctcountera 0 \cctcounterb 127 \next\setdefaultlowercatcodes +\cctcountera 128 \cctcounterb 255 \next\setdefaultuppercatcodes + +% \chardef\activehackcode=`~ + +% \def\next#1% we don't have a proper loop defined yet +% {\catcode\cctcountera 13 +% \cctcounterc\uccode\activehackcode +% \uccode\activehackcode\cctcountera +% \catcode\uccode\activehackcode 13 +% \uppercase{\edef~{\detokenize{~}}}% +% \uccode\activehackcode\cctcounterc +% \ifnum\cctcountera<\cctcounterb \advance\cctcountera\plusone \expandafter\next\expandafter#1\fi} + +% \cctcountera 128 \cctcounterb 255 \next\setdefaultuppercatcodes + +\recatcodeuppercharactersfalse + +\def\catcodetable#1% + {\mathchardef\currentcatcodetable#1% + \the\setdefaultlowercatcodes + \ifrecatcodeuppercharacters\the\setdefaultuppercatcodes\fi + \the\csname @@cct:\number#1\endcsname} + +\long\def\startcatcodetable#1#2\stopcatcodetable + {\global\csname @@cct:\number#1\endcsname{#2}} + +\long\def\startextendcatcodetable#1#2\stopextendcatcodetable + {\global\csname @@cct:\number#1\endcsname\expandafter{\the\csname @@cct:\number#1\endcsname#2}} + +\protect \endinput |