summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/unicode-data/README.md10
-rw-r--r--Master/texmf-dist/tex/generic/unicode-data/load-unicode-data.tex2
-rw-r--r--Master/texmf-dist/tex/generic/unicode-data/load-unicode-math-classes.tex2
-rw-r--r--Master/texmf-dist/tex/generic/unicode-data/load-unicode-xetex-classes.tex35
4 files changed, 31 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/generic/unicode-data/README.md b/Master/texmf-dist/doc/generic/unicode-data/README.md
index 2bebefbb40e..4d0bc7cd11a 100644
--- a/Master/texmf-dist/doc/generic/unicode-data/README.md
+++ b/Master/texmf-dist/doc/generic/unicode-data/README.md
@@ -59,6 +59,7 @@ From the files `EastAsianWidth.txt` and `LineBreak.txt` inter
character classes for XeTeX (`\XeTeXcharclass`) are set for the
following classes
- "ID" (ideographic)
+- "CJ" (conditional Japanese starter)
- "OP" (opener)
- "CL" (closer)
- "NS" (non-starter)
@@ -66,13 +67,13 @@ following classes
- "IS" (infix separator)
- "CM" (combining marks)
-All code points of class "ID" are assigned to a
+All code points of classes "ID" and "CJ" are assigned to a
`\XeTeXcharclass`, but for other classes this only occurs when
they fall into east Asian width type "F", "H" or "W" (full-,
half- and wide-width).
The following mappings between Unicode and XeTeX classes occur
-- "ID" is class 1
+- "ID" and "CJ" are class 1
- "OP" is class 2
- "CL", "NS", "EX", "IS" are class 3
- "CM" is class 256 (ignored)
@@ -141,7 +142,10 @@ Changes
- Set all letters as math type 7 (var) in
`load-unicode-data.tex`
- v1.3a (2016-02-06)
- - Add defintion of `\loop` to `load-unicode-math-classes.tex`
+ - Add definition of `\loop` to `load-unicode-math-classes.tex`
+- v1.4 (2016-02-16)
+ - Treat "CJ" chars like "ID" chars for setting XeTeX character
+ class
License and permission
======================
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 e3629d0e181..3c382e0bd9f 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
@@ -57,7 +57,7 @@
\catcode`\^=7 %
\newlinechar=`\^^J %
\message{^^J}%
- \message{load-unicode-data.tex v1.3a (2016-02-06)^^J}%
+ \message{load-unicode-data.tex v1.4 (2016-02-16)^^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
diff --git a/Master/texmf-dist/tex/generic/unicode-data/load-unicode-math-classes.tex b/Master/texmf-dist/tex/generic/unicode-data/load-unicode-math-classes.tex
index c9655082a3c..1b649b05207 100644
--- a/Master/texmf-dist/tex/generic/unicode-data/load-unicode-math-classes.tex
+++ b/Master/texmf-dist/tex/generic/unicode-data/load-unicode-math-classes.tex
@@ -48,7 +48,7 @@
\catcode`\^=7 %
\newlinechar=`\^^J %
\message{^^J}%
- \message{load-unicode-math-classes.tex v1.3a (2016-02-06)^^J}%
+ \message{load-unicode-math-classes.tex v1.4 (2016-02-16)^^J}%
\message{Reading math class data^^J}%
% The parser for data lines starts by skipping any comments (which start with
% a |#| and which will be category code~$12$).
diff --git a/Master/texmf-dist/tex/generic/unicode-data/load-unicode-xetex-classes.tex b/Master/texmf-dist/tex/generic/unicode-data/load-unicode-xetex-classes.tex
index c5b4d72f178..aec6fe13d8f 100644
--- a/Master/texmf-dist/tex/generic/unicode-data/load-unicode-xetex-classes.tex
+++ b/Master/texmf-dist/tex/generic/unicode-data/load-unicode-xetex-classes.tex
@@ -15,6 +15,7 @@
% Unicode Consortium, and when used with XeTeX sets \XeTeXcharclass for
% the following classes of code point:
% - "ID" (ideographic)
+% - "CJ" (conditional Japanese starter)
% - "OP" (opener)
% - "CL" (closer)
% - "NS" (non-starter)
@@ -22,12 +23,12 @@
% - "IS" (infix separator)
% - "CM" (combining marks)
%
-% All code points of class "ID" are assigned to a \XeTeXcharclass, but for
-% other classes this only occurs when they fall into east Asian width type
-% "F", "H" or "W" (full-, half- and wide-width).
+% All code points of classes "ID" and "CJ" are assigned to a \XeTeXcharclass,
+% but for other classes this only occurs when they fall into east Asian width
+% type "F", "H" or "W" (full-, half- and wide-width).
%
% The following mappings between Unicode and XeTeX classes occur
-% - "ID" is class 1
+% - "ID" and "CJ" are class 1
% - "OP" is class 2
% - "CL", "NS", "EX", "IS" are class 3
% - "CM" is class 256 (ignored)
@@ -62,7 +63,7 @@
\catcode`\^=7 %
\newlinechar=`\^^J %
\message{^^J}%
- \message{load-unicode-xetex-classes.tex v1.3a (2016-02-06)^^J}%
+ \message{load-unicode-xetex-classes.tex v1.4 (2016-02-16)^^J}%
\message{Reading Unicode east Asian character class data^^J}%
% A string version of |#| will be needed to look for comment lines in the
% source. Once that is done proper parsing can begin.
@@ -116,6 +117,10 @@
\else
\chardef\XeTeXcharclassID=1 %
\fi
+ \ifdefined\XeTeXcharclassCJ
+ \else
+ \chardef\XeTeXcharclassCJ=1 %
+ \fi
\ifdefined\XeTeXcharclassOP
\else
\chardef\XeTeXcharclassOP=2 %
@@ -141,18 +146,22 @@
\chardef\XeTeXcharclassCM=256 %
\fi
% Check the line break class and if necessary the east Asian width for the
-% current code point. For code points of class |ID| there may be a range to
-% set, and these are always recorded. In other cases if the code point is
-% one of those we may need to set up then save it for checking against the
+% current code point. For code points of class |ID| or |CJ| there may be a
+% range to set, and these are always recorded. In other cases if the code point
+% is one of those we may need to set up then save it for checking against the
% list of east Asian widths.
\def\ID{ID}%
+ \def\CJ{CJ}%
\def\parseunicodedataIII#1..#2..#3\relax#4{%
\def\temp{#4}%
- \ifx\temp\ID
+ \ifnum 0%
+ \ifx\temp\ID 1\fi
+ \ifx\temp\CJ 1\fi
+ >0 %
\ifx\relax#2\relax
- \parseunicodedataIV{#1}{#1}%
+ \parseunicodedataIV{#1}{#1}{#4}%
\else
- \parseunicodedataIV{#1}{#2}%
+ \parseunicodedataIV{#1}{#2}{#4}%
\fi
\else
\ifcsname XeTeXcharclass#4\endcsname
@@ -173,12 +182,12 @@
}%
% As we are inside a loop already, there needs to be a group here to preserve
% the iterator.
- \def\parseunicodedataIV#1#2{%
+ \def\parseunicodedataIV#1#2#3{%
\begingroup
\count0="#1 %
\loop
\unless\ifnum\count0>"#2 %
- \global\XeTeXcharclass\count0=\XeTeXcharclassID
+ \global\XeTeXcharclass\count0=\csname XeTeXcharclass#3\endcsname
\advance\count0 by 1 %
\repeat
\endgroup