From 16895587e51f8243a7e4dc6185979894fb199d4f Mon Sep 17 00:00:00 2001
From: Marius <mariausol@gmail.com>
Date: Fri, 3 Sep 2010 12:35:26 +0300
Subject: beta 2010.09.03 11:05

---
 tex/context/base/catc-ctx.tex | 208 +++++++++++++++++++++++-------------------
 1 file changed, 115 insertions(+), 93 deletions(-)

(limited to 'tex/context/base/catc-ctx.tex')

diff --git a/tex/context/base/catc-ctx.tex b/tex/context/base/catc-ctx.tex
index 21e7d0136..e2c35c42b 100644
--- a/tex/context/base/catc-ctx.tex
+++ b/tex/context/base/catc-ctx.tex
@@ -15,10 +15,11 @@
 %D of everywhere around.
 
 \ifdefined \ctxcatcodes  \else \newcatcodetable \ctxcatcodes  \fi
+\ifdefined \txtcatcodes  \else \newcatcodetable \txtcatcodes  \fi
 \ifdefined \mthcatcodes  \else \newcatcodetable \mthcatcodes  \fi % math, not used, too tricky
-\ifdefined \xmlcatcodesn \else \newcatcodetable \xmlcatcodesn \fi % normal
-\ifdefined \xmlcatcodese \else \newcatcodetable \xmlcatcodese \fi % entitle
-\ifdefined \xmlcatcodesr \else \newcatcodetable \xmlcatcodesr \fi % reduce
+% \ifdefined \xmlcatcodesn \else \newcatcodetable \xmlcatcodesn \fi % normal
+% \ifdefined \xmlcatcodese \else \newcatcodetable \xmlcatcodese \fi % entitle
+% \ifdefined \xmlcatcodesr \else \newcatcodetable \xmlcatcodesr \fi % reduce
 \ifdefined \typcatcodesa \else \newcatcodetable \typcatcodesa \fi % { }
 \ifdefined \typcatcodesb \else \newcatcodetable \typcatcodesb \fi % < >
 
@@ -84,64 +85,64 @@
    %\catcode`\|   = 13
 \stopcatcodetable
 
-\startcatcodetable \xmlcatcodesn
-    \catcode`\^^I = 10 % ascii tab is a blank space
-    \catcode`\^^M =  5 % ascii return is end-line
-    \catcode`\^^L =  5 % ascii form-feed
-    \catcode`\    = 10 % ascii space is blank space
-    \catcode`\^^Z =  9 % ascii eof is ignored
-    \catcode`\&   = 13 % entity
-    \catcode`\<   = 13 % element
-    \catcode`\>   = 12
-    \catcode`\"   = 12 % probably not needed any more
-    \catcode`\/   = 12 % probably not needed any more
-    \catcode`\'   = 12 % probably not needed any more
-    \catcode`\~   = 12 % probably not needed any more
-    \catcode`\#   = 12 % probably not needed any more
-    \catcode`\\   = 12 % probably not needed any more
-\stopcatcodetable
+% \startcatcodetable \xmlcatcodesn
+%     \catcode`\^^I = 10 % ascii tab is a blank space
+%     \catcode`\^^M =  5 % ascii return is end-line
+%     \catcode`\^^L =  5 % ascii form-feed
+%     \catcode`\    = 10 % ascii space is blank space
+%     \catcode`\^^Z =  9 % ascii eof is ignored
+%     \catcode`\&   = 13 % entity
+%     \catcode`\<   = 13 % element
+%     \catcode`\>   = 12
+%     \catcode`\"   = 12 % probably not needed any more
+%     \catcode`\/   = 12 % probably not needed any more
+%     \catcode`\'   = 12 % probably not needed any more
+%     \catcode`\~   = 12 % probably not needed any more
+%     \catcode`\#   = 12 % probably not needed any more
+%     \catcode`\\   = 12 % probably not needed any more
+% \stopcatcodetable
 
-\startcatcodetable \xmlcatcodese
-    \catcode`\^^I = 10 % ascii tab is a blank space
-    \catcode`\^^M =  5 % ascii return is end-line
-    \catcode`\^^L =  5 % ascii form-feed
-    \catcode`\    = 10 % ascii space is blank space
-    \catcode`\^^Z =  9 % ascii eof is ignored
-    \catcode`\&   = 13 % entity
-    \catcode`\<   = 13 % element
-    \catcode`\>   = 12
-    \catcode`\#   = 13
-    \catcode`\$   = 13
-    \catcode`\%   = 13
-    \catcode`\\   = 13
-    \catcode`\^   = 13
-    \catcode`\_   = 13
-    \catcode`\{   = 13
-    \catcode`\}   = 13
-    \catcode`\|   = 13
-    \catcode`\~   = 13
-\stopcatcodetable
+% \startcatcodetable \xmlcatcodese
+%     \catcode`\^^I = 10 % ascii tab is a blank space
+%     \catcode`\^^M =  5 % ascii return is end-line
+%     \catcode`\^^L =  5 % ascii form-feed
+%     \catcode`\    = 10 % ascii space is blank space
+%     \catcode`\^^Z =  9 % ascii eof is ignored
+%     \catcode`\&   = 13 % entity
+%     \catcode`\<   = 13 % element
+%     \catcode`\>   = 12
+%     \catcode`\#   = 13
+%     \catcode`\$   = 13
+%     \catcode`\%   = 13
+%     \catcode`\\   = 13
+%     \catcode`\^   = 13
+%     \catcode`\_   = 13
+%     \catcode`\{   = 13
+%     \catcode`\}   = 13
+%     \catcode`\|   = 13
+%     \catcode`\~   = 13
+% \stopcatcodetable
 
-\startcatcodetable \xmlcatcodesr
-    \catcode`\^^I = 10 % ascii tab is a blank space
-    \catcode`\^^M =  5 % ascii return is end-line
-    \catcode`\^^L =  5 % ascii form-feed
-    \catcode`\    = 10 % ascii space is blank space
-    \catcode`\^^Z =  9 % ascii eof is ignored
-    \catcode`\&   = 13 % entity
-    \catcode`\<   = 13 % element
-    \catcode`\>   = 12
-    \catcode`\#   = 13
-    \catcode`\$   = 13
-    \catcode`\%   = 13
-    \catcode`\\   = 13
-    \catcode`\^   = 13
-    \catcode`\_   = 13
-    \catcode`\{   = 13
-    \catcode`\}   = 13
-    \catcode`\|   = 13
-    \catcode`\~   = 13
-\stopcatcodetable
+% \startcatcodetable \xmlcatcodesr
+%     \catcode`\^^I = 10 % ascii tab is a blank space
+%     \catcode`\^^M =  5 % ascii return is end-line
+%     \catcode`\^^L =  5 % ascii form-feed
+%     \catcode`\    = 10 % ascii space is blank space
+%     \catcode`\^^Z =  9 % ascii eof is ignored
+%     \catcode`\&   = 13 % entity
+%     \catcode`\<   = 13 % element
+%     \catcode`\>   = 12
+%     \catcode`\#   = 13
+%     \catcode`\$   = 13
+%     \catcode`\%   = 13
+%     \catcode`\\   = 13
+%     \catcode`\^   = 13
+%     \catcode`\_   = 13
+%     \catcode`\{   = 13
+%     \catcode`\}   = 13
+%     \catcode`\|   = 13
+%     \catcode`\~   = 13
+% \stopcatcodetable
 
 \startcatcodetable \typcatcodesa
     \catcode`\^^I = 12
@@ -163,46 +164,67 @@
     \catcode`\>   =  2
 \stopcatcodetable
 
+\startcatcodetable \txtcatcodes
+    \catcode`\^^I = 10
+    \catcode`\^^M =  5
+    \catcode`\^^L =  5
+    \catcode`\    = 10
+    \catcode`\^^Z =  9
+    \catcode`\\   =  0
+    \catcode`\{   =  1
+    \catcode`\}   =  2
+    \catcode`\%   = 14
+\stopcatcodetable
+
 \letcatcodecommand \ctxcatcodes  `\|   \relax
 \letcatcodecommand \ctxcatcodes  `\~   \relax
 
 %letcatcodecommand \prtcatcodes  `\|   \relax % falls back on ctx
 %letcatcodecommand \prtcatcodes  `\~   \relax % falls back on ctx
 
-\letcatcodecommand \xmlcatcodesn `\&   \relax
-\letcatcodecommand \xmlcatcodesn `\<   \relax
-
-\letcatcodecommand \xmlcatcodese `\&   \relax
-\letcatcodecommand \xmlcatcodese `\<   \relax
-
-\letcatcodecommand \xmlcatcodesr `\&   \relax
-\letcatcodecommand \xmlcatcodesr `\<   \relax
-
-\letcatcodecommand \xmlcatcodese `\#   \relax
-\letcatcodecommand \xmlcatcodese `\$   \relax
-\letcatcodecommand \xmlcatcodese `\%   \relax
-\letcatcodecommand \xmlcatcodese `\\   \relax
-\letcatcodecommand \xmlcatcodese `\^   \relax
-\letcatcodecommand \xmlcatcodese `\_   \relax
-\letcatcodecommand \xmlcatcodese `\{   \relax
-\letcatcodecommand \xmlcatcodese `\}   \relax
-\letcatcodecommand \xmlcatcodese `\|   \relax
-\letcatcodecommand \xmlcatcodese `\~   \relax
-
-\letcatcodecommand \xmlcatcodesr `\#   \relax
-\letcatcodecommand \xmlcatcodesr `\$   \relax
-\letcatcodecommand \xmlcatcodesr `\%   \relax
-\letcatcodecommand \xmlcatcodesr `\\   \relax
-\letcatcodecommand \xmlcatcodesr `\^   \relax
-\letcatcodecommand \xmlcatcodesr `\_   \relax
-\letcatcodecommand \xmlcatcodesr `\{   \relax
-\letcatcodecommand \xmlcatcodesr `\}   \relax
-\letcatcodecommand \xmlcatcodesr `\|   \relax
-\letcatcodecommand \xmlcatcodesr `\~   \relax
-
-    \catcodetable       \ctxcatcodes
-\let\defaultcatcodetable\ctxcatcodes
-\let\xmlcatcodes        \xmlcatcodesn % beware, in mkiv we use \notcatcodes
+% \letcatcodecommand \xmlcatcodesn `\&   \relax
+% \letcatcodecommand \xmlcatcodesn `\<   \relax
+
+% \letcatcodecommand \xmlcatcodese `\&   \relax
+% \letcatcodecommand \xmlcatcodese `\<   \relax
+
+% \letcatcodecommand \xmlcatcodesr `\&   \relax
+% \letcatcodecommand \xmlcatcodesr `\<   \relax
+
+% \letcatcodecommand \xmlcatcodese `\#   \relax
+% \letcatcodecommand \xmlcatcodese `\$   \relax
+% \letcatcodecommand \xmlcatcodese `\%   \relax
+% \letcatcodecommand \xmlcatcodese `\\   \relax
+% \letcatcodecommand \xmlcatcodese `\^   \relax
+% \letcatcodecommand \xmlcatcodese `\_   \relax
+% \letcatcodecommand \xmlcatcodese `\{   \relax
+% \letcatcodecommand \xmlcatcodese `\}   \relax
+% \letcatcodecommand \xmlcatcodese `\|   \relax
+% \letcatcodecommand \xmlcatcodese `\~   \relax
+
+% \letcatcodecommand \xmlcatcodesr `\#   \relax
+% \letcatcodecommand \xmlcatcodesr `\$   \relax
+% \letcatcodecommand \xmlcatcodesr `\%   \relax
+% \letcatcodecommand \xmlcatcodesr `\\   \relax
+% \letcatcodecommand \xmlcatcodesr `\^   \relax
+% \letcatcodecommand \xmlcatcodesr `\_   \relax
+% \letcatcodecommand \xmlcatcodesr `\{   \relax
+% \letcatcodecommand \xmlcatcodesr `\}   \relax
+% \letcatcodecommand \xmlcatcodesr `\|   \relax
+% \letcatcodecommand \xmlcatcodesr `\~   \relax
+
+     \catcodetable        \ctxcatcodes
+\let \defaultcatcodetable \ctxcatcodes
+%\let\xmlcatcodes         \xmlcatcodesn % beware, in mkiv we use \notcatcodes
+
+% for the moment here:
+
+\def\starttexcode
+  {\pushcatcodetable
+   \catcodetable\prtcatcodes}
+
+\def\stoptexcode
+  {\popcatcodetable}
 
 \endinput
 
-- 
cgit v1.2.3

