diff options
author | Hans Hagen <pragma@wxs.nl> | 2005-08-15 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2005-08-15 00:00:00 +0200 |
commit | f8482bca2d7d031de38b8c751aadf5e2523f1a52 (patch) | |
tree | e4d206aab12d18e9a7b3e449e2c87ac0e9e7f9da /tex/context/base/sort-new.tex | |
parent | 94afc97dd44b93da18e681e265b3c2b8666cd3e6 (diff) | |
download | context-f8482bca2d7d031de38b8c751aadf5e2523f1a52.tar.gz |
stable 2005.08.15
Diffstat (limited to 'tex/context/base/sort-new.tex')
-rw-r--r-- | tex/context/base/sort-new.tex | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tex/context/base/sort-new.tex b/tex/context/base/sort-new.tex new file mode 100644 index 000000000..cc6d6983d --- /dev/null +++ b/tex/context/base/sort-new.tex @@ -0,0 +1,59 @@ +% temporary overloading + +\unprotect + +\def\strippedcsname + {\expandafter\dostrippedcsname\string} + +\def\dostrippedcsname#1% + {\if\noexpand#1\letterbackslash\else#1\fi} + +\def\doregisterreference[#1]#2% + {\doifvalue{\??id#1\c!referencing}\v!on + {\pagereference[#1:\strippedcsname#2]}} + +\def\doprocesspageregister[#1]#2#3% key altnum entry + {\begingroup + \thisisnextinternal\s!ind + \ifduplicate\getlastregisterentry{#3}\fi + \convertexpanded{\registerparameter\c!keyexpansion}{#1}\asciiregisterentryA + \convertexpanded{\registerparameter\c!expansion }{#3}\asciiregisterentryB + \doifsomething{\registerparameter\c!keyexpansion} + {\ifx\asciiregisterentryA\empty + \convertexpanded{\registerparameter\c!keyexpansion}{#3}\asciiregisterentryA + \fi}% + \makesectionformat + \doifelse{\registerparameter\c!ownnumber}\v!yes + \donetrue\donefalse + % the spaces between } { are essential for texutil's split + \expanded + {\writeutility% + {r \ifcase\registerpagestatus\space\or e \or f \or t \fi + {\currentregister} % + {\nextinternalreference} % + {\asciiregisterentryA} % + {\asciiregisterentryB} % + {\sectionformat\sectionseparator\sectionseparator + \ifdone#2\else\noexpand\pagenumber\fi} % + {\noexpand\realfolio}}}% + \getfirstcharacter\currentregister + \registerinfo{> \firstcharacter}{#3}% + \endgroup} + +\def\convertmeaning#1\to % watch the double expansion ! + {\bgroup + \honorunexpanded + %dontexpandencoding % new + \literateencodedtokens % newer + \xdef\@@globalexpanded{#1}% + \xdef\@@globalexpanded{\@@globalexpanded}% + \egroup + \convertcommand\@@globalexpanded\to} + +\def\reduceargument#1\to#2% + {\begingroup + \reducetocoding[raw]% + \edef\ascii{#1}% + \expandafter\endgroup\expandafter\edef\expandafter#2\expandafter{\ascii}} + +\protect |