summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-03 23:00:03 +0000
committerKarl Berry <karl@freefriends.org>2016-02-03 23:00:03 +0000
commit6070500531400ed643be5b4d7a4cdd5a881aaab5 (patch)
tree546493e301c202eed96c6833ca4b317e05a63456 /Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex
parent1290d7454b9754f3c7a7e4a229981e18f58ea6f6 (diff)
unicode-data (3feb16)
git-svn-id: svn://tug.org/texlive/trunk@39560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex')
-rw-r--r--Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex55
1 files changed, 13 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex b/Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex
index 77a8f5f1963..b9011421e23 100644
--- a/Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex
+++ b/Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex
@@ -19,35 +19,22 @@
% - \catcode 11 for all letters (Unicode class "L")
% - \catcode 11 for all combining marks (Unicode class "M")
% - \sfcode 999 for all code points of class "Lu" (upper case letters)
-% - \lccode for all of class "Ll" (upper case letters) to the code point
+% - \lccode for all of class "Ll" (lower case letters) to the code point
% itself, and \uccode to the upper case mapping (or if not given
% to the code point itself)
% - \uccode for all of class "Lu" (upper case letters) to the code point
% itself, and \lccode to the lower case mapping (or if not given
% to the code point itself)
% - \lccode and \uccode for all of class "Lt" (title case letters) to the
-% lower can upper case mappings (or if not given to the code point itself)
+% lower and upper case mappings (or if not given to the code point itself)
% - \lccode and \uccode for all other letter code points are set to
% the code point itself
% - \lccode and/or \uccode for non-letter code points for which an upper
% or lower case mapping is given
% - \sfcode 0 (ignored) for code points of Unicode classes "Pe" (closing
% punctuation marks) and "Pf" (final quotation marks)
-%
-% From the file MathClass.txt the following mapping are implemented between
-% Unicode classes and TeX math types
-% - "L" (large) \mathop
-% - "B" (binary) \mathbin
-% - "V" (vary) \mathbin
-% - "R" (relation) \mathrel
-% - "O" (opening) \mathopen
-% - "C" (closing) \mathclose
-% - "P" (punctuation) \mathpunct
-% - "A" (alphabetic) \mathalpha
-%
-% For each code point processed, the result is of the form
-%
-% \Umathcode <codepoint> = <type> 1 <codepoint>
+% - \Umathcode for all letters in the base plane class 7 (var) and for
+% the supplementary plane class 0 (regular)
%
% =============================================================================
%
@@ -71,7 +58,7 @@
\catcode`\^=7 %
\newlinechar=`\^^J %
\message{^^J}%
- \message{load-unicode-data.tex v1.1b (2016-01-08)^^J}%
+ \message{load-unicode-data.tex v1.2 (2016-02-02)^^J}%
\message{Reading Unicode data^^J}%
% The first stage of parsing is dealing with the fact that there are lots of
% data items separated by |;|. Of those, only a few are needed so they are
@@ -125,6 +112,13 @@
\parseunicodedataVI\lccode{#1}{#4}%
\global\sfcode"#1=999 %
\fi
+% Letters in base plane are class~$7$, those in the supplementary plane are
+% class~$0$.
+ \ifnum"#1<10000 %
+ \global\Umathcode"#1="7"01"#1 %
+ \else
+ \global\Umathcode"#1="0"01"#1 %
+ \fi
\else
\def\temp{#2}%
\ifnum 0\ifx\temp\Pe 1\fi\ifx\temp\Pf 1\fi>0 %
@@ -169,7 +163,7 @@
\count0="#3 %
\loop
\unless\ifnum\count0>"#1 %
- \parseunicodedataV{\count0}%
+ \parseunicodedataV{\count0 }%
\advance\count0 by 1 %
\repeat
\endgroup
@@ -247,27 +241,4 @@
\catcode`\#=6 %
\closein0 %
}%
-% |MathClass.txt|: this just needs one token of the 'rest' of the line.
-% Examine the Unicode class and if known set up the math code appropriately.
- \chardef\mathclassL=1 %
- \chardef\mathclassB=2 %
- \chardef\mathclassV=2 %
- \chardef\mathclassR=3 %
- \chardef\mathclassO=4 %
- \chardef\mathclassC=5 %
- \chardef\mathclassP=6 %
- \chardef\mathclassA=7 %
- \def\parseunicodedataIV#1#2#3#4\relax{%
- \begingroup
- \count0="#1 %
- \loop
- \unless\ifnum\count0>"#2 %
- \ifcsname mathclass#3\endcsname
- \global\Umathcode\count0=\csname mathclass#3\endcsname 1 \count0 %
- \fi
- \advance\count0 by 1 %
- \repeat
- \endgroup
- }%
- \readandparse{MathClass}%
\endgroup