diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
commit | fc4466b32ed330a956ac603b00fd145524cff49a (patch) | |
tree | 2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base/syst-str.mkii | |
parent | 50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff) |
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-str.mkii')
-rw-r--r-- | Master/texmf-dist/tex/context/base/syst-str.mkii | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-str.mkii b/Master/texmf-dist/tex/context/base/syst-str.mkii deleted file mode 100644 index aacb70ec742..00000000000 --- a/Master/texmf-dist/tex/context/base/syst-str.mkii +++ /dev/null @@ -1,124 +0,0 @@ -%D \module -%D [ file=syst-str, -%D version=2006.09.18, -%D title=\CONTEXT\ System Macros, -%D subtitle=String Processing, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%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 - -%D We need a convenient way to change lccode vectors. - -\dostepwiserecurse{0}{255}{1} - {\@EA\chardef\csname-\recurselevel\endcsname\recurselevel} - -\newtoks\withminorcharacters -\newtoks\withlowercharacters -\newtoks\withuppercharacters - -\dostepwiserecurse{0}{31}{1} - {\expanded - {\appendtoks\noexpand\withcharacter\csname-\recurselevel\endcsname - \noexpand\to\withminorcharacters}} - -\dostepwiserecurse{32}{127}{1} - {\expanded - {\appendtoks\noexpand\withcharacter\csname-\recurselevel\endcsname - \noexpand\to\withlowercharacters}} - -\dostepwiserecurse{128}{255}{1} - {\expanded - {\appendtoks\noexpand\withcharacter\csname-\recurselevel\endcsname - \noexpand\to\withuppercharacters}} - -\chardef\obeyedlccode=`. % so <32 and >127 chars become . - -%D \macros -%D {retainlccodes} -%D -%D One way of manipulating characters is changing the their -%D \type{\lccode} and applying \type{\lowcase}. An example of -%D this can be found in \type{spec-mis}. - -\def\setownlccode #1{\lccode#1#1} -\def\setobeyedlccode#1{\lccode#1\obeyedlccode} - -\def\obeylccodes - {\let\withcharacter\setownlccode - \the\withlowercharacters - \let\withcharacter\setobeyedlccode - \the\withminorcharacters - \the\withuppercharacters - \relax} - -\def\retainlccodes - {\let\withcharacter\setownlccode - \the\withlowercharacters - \the\withminorcharacters - \the\withuppercharacters - \relax} - -%D I got tired of making dedicated clean up macros using the -%D same mechanism again and again, so now we have: -%D -%D \starttyping -%D \def\xxxx{abc.d} \replacecharacters\xxxx{a.}{-} \xxxx -%D \stoptyping - -\def\replacecharacters#1#2#3% macro characters replacement - {\bgroup - \edef\ascii{#1}% - \retainlccodes - \def\docommand##1{\lccode\expandafter`\csname##1\endcsname=\expandafter`\csname#3\endcsname}% - \handletokens#2\with\docommand - \lowercase\@EA{\@EA\xdef\@EA\globalascii\@EA{\ascii}}% - \egroup - \dodoglobal\let#1\globalascii} - -% \bgroup -% \catcode`\ =\@@other % needed in order to get it visible -% \lccode`\ =`\- -% \lowercase{\xdef\globalascii{aap noot}}% -% \egroup -% -% [\globalascii] {\tttf [\globalascii]} -% -% interesting: -% -% \setvalue{xxx}{oeps} -% \setvalue{test-test}{\getvalue{xxx}oeps} -% \bgroup\lccode`\ =`\-\lowercase{\egroup\csname test test\endcsname} -% -% \setvalue{test\string~test}{\getvalue{xxx}oeps} -% \bgroup\lccode`\ =`\~\lowercase{\egroup\csname test test\endcsname} -% -% \bgroup\catcode`\~=\@@letter\lowercase{\egroup\csname test~test\endcsname} - -\def\separatestring#1\to#2% - {\bgroup - \retainlccodes - \lccode `\ =`\,% - % when typesetting: \catcode`\ =\@@other - \edef\ascii{#1}% - \lowercase\@EA{\@EA\xdef\@EA\globalascii\@EA{\ascii}}% - \egroup - \let#2\globalascii} - -\def\unspacefilename#1\to#2% - {\bgroup - \def\obeyedspace{-}% - \sanitizefilename#1\to\ascii - \retainlccodes - \lccode `\ =`\-% - % when typesetting: \catcode`\ =\@@other - \lowercase\@EA{\@EA\xdef\@EA\globalascii\@EA{\ascii}}% - \egroup - \let#2\globalascii} - -\protect \endinput |