summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/sort-ini.mkii
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2009-08-23 11:11:32 +0000
committerTaco Hoekwater <taco@elvenkind.com>2009-08-23 11:11:32 +0000
commit8fc3039c82d48605b5ca8b2eda3f4fdd755681e1 (patch)
tree3cd9bbdd599bc4d1ac0409e167fee2136e4c0ec9 /Master/texmf-dist/tex/context/base/sort-ini.mkii
parent850fc99b7cd3ae7a20065531fe866ff7bae642ec (diff)
this is context 2009.08.19 17:10
git-svn-id: svn://tug.org/texlive/trunk@14827 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/sort-ini.mkii')
-rw-r--r--Master/texmf-dist/tex/context/base/sort-ini.mkii32
1 files changed, 22 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/sort-ini.mkii b/Master/texmf-dist/tex/context/base/sort-ini.mkii
index 0f049994637..f1ed1c3162e 100644
--- a/Master/texmf-dist/tex/context/base/sort-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/sort-ini.mkii
@@ -1,7 +1,7 @@
%D \module
%D [ file=sort-ini,
%D version=2005.08.08,
-%D title=\CONTEXT\ Sort Macros,
+%D title=\CONTEXT\ Sorting Macros,
%D subtitle=Initialization,
%D author=Hans Hagen,
%D date=\currentdate,
@@ -17,6 +17,12 @@
%D used with the new texutil functionality. This module defines a few
%D auxiliary macros.
+\writestatus{loading}{ConTeXt Sorting Macros / Initialization}
+
+%D This module replaces existing sort key handling and is meant to be
+%D used with the new texutil functionality. This module defines a few
+%D auxiliary macros.
+
\ifx\exportsortaction\undefined \else \endinput \fi
%D The sorting method is largely bases on the one used in the old version
@@ -72,6 +78,14 @@
\unprotect
+\def\savesortkeys
+ {\ifproductionrun
+ \the\everysavesortkeys
+ \global\everysavesortkeys\emptytoks
+ \fi}
+
+\appendtoks \savesortkeys \to \everyshipout
+
\let\currentexportclass\empty
\def\exportsortaction#1#2#3%
@@ -105,17 +119,17 @@
{\exportutfsortexpansion{0}{128}{255}%
\exportutfsortexpansion{1}{0}{255}}
{\def\defineactivecharacter##1 ##2% mkii code !
- {\expanded{\exportsortshortcut{\rawcharacter{##1}}}{##2}}%
+ {\doifnumberelse{##1}
+ {\expanded{\exportsortshortcut{\rawcharacter{##1}}}{##2}}%
+ {\expanded{\exportsortshortcut{\rawcharacter{\number`##1}}}{##2}}}%
\doifelsenothing\currentregime
{\doifnot\characterencoding\nocharacterencoding % to be sure, autoregime
{\dowalkregime\characterencoding}}%
{\dowalkregime\characterencoding}}%
\egroup
\startnointerference
-% \startreadingfile
-\setcatcodetable\ctxcatcodes
- \readsysfile{\f!sortprefix def}\donothing\donothing % default
-% \stopreadingfile
+ \setcatcodetable\ctxcatcodes
+ \readsysfile{\f!sortprefix def.mkii}\donothing\donothing % default
\stopnointerference
\global\let\savesortdefinitions\relax}
@@ -126,10 +140,8 @@
\global\letvalue{\f!sortprefix::#1}\empty
\def\currentexportclass{#1}%
\enablemode[sortorder-#1]%
-% \startreadingfile
-\setcatcodetable\ctxcatcodes
- \readsysfile{\f!sortprefix lan}\donothing\donothing
-% \stopreadingfile
+ \setcatcodetable\ctxcatcodes
+ \readsysfile{\f!sortprefix lan.mkii}\donothing\donothing
\stopnointerference}}}
\prependtoks