summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/xelatex/interchar
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-02-17 23:13:42 +0000
committerKarl Berry <karl@freefriends.org>2015-02-17 23:13:42 +0000
commite4a12a5dd8b2c14000efbb0157d29d90ce187642 (patch)
tree6330fb48edc763171284c8d274dcdc150d4ca644 /Master/texmf-dist/doc/xelatex/interchar
parent8c0c4be4e6514c1e76789c60b49b499ec8ebc708 (diff)
interchar (17feb15)
git-svn-id: svn://tug.org/texlive/trunk@36312 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/xelatex/interchar')
-rw-r--r--Master/texmf-dist/doc/xelatex/interchar/README15
-rw-r--r--Master/texmf-dist/doc/xelatex/interchar/interchar.pdfbin0 -> 67551 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/interchar/interchar.tex178
-rw-r--r--Master/texmf-dist/doc/xelatex/interchar/interchardemo1.pdfbin0 -> 5175 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/interchar/interchardemo1.tex49
-rw-r--r--Master/texmf-dist/doc/xelatex/interchar/interchartest.pdfbin0 -> 11406 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/interchar/interchartest.tex238
7 files changed, 480 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/xelatex/interchar/README b/Master/texmf-dist/doc/xelatex/interchar/README
new file mode 100644
index 00000000000..0de6815b56d
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/interchar/README
@@ -0,0 +1,15 @@
+
+Package interchar: managing character class schemes of XeTeX
+Copyright (C) 2015 Zou Hu <zohooo@yeah.net>
+
+The package requires LaTeX3 support as provided in the l3kernel and
+l3packages bundles.
+
+Please report bugs, problems, and suggestions via
+ https://github.com/zohooo/interchar
+
+The package may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3 of this
+license or (at your option) any later version. The latest version
+of this license is in
+ http://www.latex-project.org/lppl.txt
diff --git a/Master/texmf-dist/doc/xelatex/interchar/interchar.pdf b/Master/texmf-dist/doc/xelatex/interchar/interchar.pdf
new file mode 100644
index 00000000000..5ffe0337d7f
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/interchar/interchar.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/interchar/interchar.tex b/Master/texmf-dist/doc/xelatex/interchar/interchar.tex
new file mode 100644
index 00000000000..641d9f0c608
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/interchar/interchar.tex
@@ -0,0 +1,178 @@
+% -*- coding: utf-8 -*-
+% Package interchar: managing character class schemes of XeTeX
+% Copyright (C) 2015 Zou Hu <zohooo@yeah.net>
+%
+% Please report bugs, problems, and suggestions via
+% https://github.com/zohooo/interchar
+%
+% This file may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3 of this
+% license or (at your option) any later version. The latest version
+% of this license is in
+% http://www.latex-project.org/lppl.txt
+\documentclass{article}
+\usepackage[b5paper,margin=17mm]{geometry}
+\usepackage{xcolor,hyperref,float,makedoc,niceverb,interchar}
+\hypersetup{
+ colorlinks,
+ citecolor = teal,
+ linkcolor = blue,
+ urlcolor = purple,
+ pdfstartview = {FitH},
+ bookmarksnumbered
+}
+\begin{document}
+
+\title{Documentation for package \texttt{interchar}
+\footnote{Version 0.2. Please report bugs via \url{https://github.com/zohooo/interchar}.}}
+\author{Zou Hu (zohooo@yeah.net)}
+\maketitle
+\tableofcontents
+
+\section{Introduction}
+
+With XeTeX\rq s character class mechanism, we could put characters into different classes,
+and insert some tokens to the input stream between characters in one class and those in
+another class. This mechanism is originally used for switching fonts and adjusting spaces.
+But it has many other useful applications.
+
+By default, all characters are of class 0, except CJK ideographs are of class 1, CJK left
+punctuation of class 2, CJK right punctuation of class 3, text boundaries (glues, kerns,
+maths, boxes, etc.) of class 255, and several characters of class 256 (this class is ignored).
+
+\MakeNormal\`
+\newintercharclass{\myclass}
+\intercharclass{`\o}{\myclass}
+\interchartoks{0}{\myclass}{\bgroup\color{red}}
+\interchartoks{255}{\myclass}{\bgroup\color{red}}
+\interchartoks{\myclass}{0}{\egroup}
+\interchartoks{\myclass}{255}{\egroup}
+\intercharstate{1}
+\MakeActive\`
+Package 'interchar' is written for making character class mechanism more easy to use. For example,
+after loading the package with `\usepackage{interchar}', you may change the color of every
+occurrences of character \texttt{o}:
+\intercharstate[foo]{0}
+\begin{verbatim}
+\newintercharclass{\myclass}
+\intercharclass{`\o}{\myclass}
+\interchartoks{0}{\myclass}{\bgroup\color{red}}
+\interchartoks{255}{\myclass}{\bgroup\color{red}}
+\interchartoks{\myclass}{0}{\egroup}
+\interchartoks{\myclass}{255}{\egroup}
+\intercharstate{1}
+\end{verbatim}
+
+There are some existing packages using this mechanism, such as 'polyglossia', 'xeCJK' and
+'xesearch'. But since one character could only be put into one single class, when loading two
+or more of these packages simultaneously, it would be very likely that some conflicts occur.
+
+Package 'interchar' also provides some migration commands for these packages. With minor changes
+these packages should be compatible with 'interchar', and users could switch between different
+character class schemes when loading these packages at the same time.
+
+\section{Commands for normal users}
+
+\begin{itemize}
+ \item |\newintercharscheme{<scheme>}| creates a new char class scheme. For example,
+ \begin{verbatim}\newintercharscheme{foo}\end{verbatim}
+ There is a prebuilt `default' scheme which you need not to create it.
+ The first argument of the other commands in this section is optional;
+ its default value is `default'.
+ \item |\intercharstate[<scheme>]{<state-code>}| changes current scheme.
+ If '<state-code>' is positive, changes current scheme to `<scheme>';
+ otherwise, changes current scheme to `default'. For example,
+ \begin{verbatim}\intercharstate[foo]{1}\end{verbatim}
+ \item |\getintercharstate[<scheme>]{\cs}| gets current state of the specified scheme
+ and store the state code in `\cs'. For example,
+ \begin{verbatim}\getintercharstate[foo]{\mystate}\end{verbatim}
+ \item |\newintercharclass[<scheme>]{\cs}| creates a new char class in the specified scheme
+ and stores the class number in `\cs'. For example,
+ \begin{verbatim}\newintercharclass[foo]{\myclass}\end{verbatim}
+ \item |\intercharclass[<scheme>]{<char-range>}{<char-class>}| moves all characters within
+ `<char-range>' to the class `<char-class>' in the specified scheme. For example,
+\begin{verbatim}
+\intercharclass[foo]{`\@}{255}
+\intercharclass[foo]{`\a-`\z}{\myclass}
+\end{verbatim}
+ \item |\getintercharclass[<scheme>]{<char-code>}{\cs}| gets the class number of the specified
+ character in the specified scheme, and stores the result in `\cs'. For example,
+ \begin{verbatim}\getintercharclass[foo]{`\@}{\result}\end{verbatim}
+ \item |\interchartoks[<scheme>]{<char-class-1>}{<char-class-2>}{<tokens>}| defines tokens to be
+ inserted between `<char-class-1>' and `<char-class-2>' (in that order) in the specified
+ scheme. For example,
+\begin{verbatim}
+\interchartoks[foo]{0}{\myclass}{\bgroup\color{red}}
+\interchartoks[foo]{\myclass}{0}{\egroup}
+\end{verbatim}
+ \item |\getinterchartoks[<scheme>]{<char-class-1>}{<char-class-2>}{\cs}| gets the tokens to be
+ inserted between `<char-class-1>' and `<char-class-2>' in the specified scheme, and stores
+ the result in `\cs'. For example,
+ \begin{verbatim}\getinterchartoks[foo]{0}{\myclass}{\mytoks}\end{verbatim}
+\end{itemize}
+
+\section{Commands for macro writers}
+
+For macro writers, we provide |\NewIntercharScheme| command which is an alias of user command `\newintercharscheme'. When you write `\NewIntercharScheme{foo}', 'interchar' package also
+creates the following migration commands for you:
+
+\begin{table}[H]
+\MakeNormal\& \MakeNormal\` \MakeNormal\| \catcode`\?=13 \let?=| \MakeActive\` \MakeActive\|
+\renewcommand{\arraystretch}{1.4}
+\begin{tabular}{?l?l?}
+ \hline
+ \textbf{Migration Command} & \textbf{Analogous to Commands} \\ \hline
+ |\FooIntercharState = <state-code>| & `\XeTeXinterchartokenstate' \\
+ |\GetFooIntercharState| & `\the\XeTeXinterchartokenstate' \\
+ |\NewFooIntercharClass <control-sequence>| & `\newXeTeXintercharclass' \\
+ |\FooIntercharClass <char-code> = <char-class>| & `\XeTeXcharclass' \\
+ |\GetFooIntercharClass <char-code>| & `\the\XeTeXcharclass'. \\
+ |\FooIntercharToks <class1> <class2> = {<toks>}| & `\XeTeXinterchartoks' \\
+ |\GetFooIntercharToks <class1> <class2>| & `\the\XeTeXinterchartoks' \\
+ \hline
+\end{tabular}
+\end{table}
+
+Within the command specifications in the above table, all of the equal signs `='
+and most of the spaces are optional.
+
+If you are the author of package 'foo' which use XeTeX\rq s char class mechanism,
+with some minor changes you could make your package compatible with other packages.
+
+\begin{enumerate}
+ \item Add the following lines to the beginning of your package file:
+\begin{verbatim}
+\ifdefined\NewIntercharScheme
+ \NewIntercharScheme{foo}%
+\else
+ \let \FooIntercharState = \XeTeXinterchartokenstate
+ \def \GetFooIntercharState {\the\XeTeXinterchartokenstate}%
+ \let \NewFooIntercharClass = \newXeTeXintercharclass
+ \let \FooIntercharClass = \XeTeXcharclass
+ \def \GetFooIntercharClass {\the\XeTeXcharclass}%
+ \let \FooIntercharToks = \XeTeXinterchartoks
+ \def \GetFooIntercharToks {\the\XeTeXinterchartoks}%
+\fi
+\end{verbatim}
+ \item Rename every occurrence of XeTeX\rq s commands in your package file with the new name
+ according to the above table.
+\end{enumerate}
+
+After these modifications, when users doesn\rq t load 'interchar', your package should
+behave as before, but when users load 'interchar' package \textbf{before} your package,
+'interchar' will takes over XeTeX\rq s char class mechanism, therefore users could switch
+among different char class schemes at will.
+
+Note that `\GetFooIntercharState' is \textbf{fully expandable}, which means you could write
+the following conditional test:
+\begin{verbatim}\ifnum \GetFooIntercharState > 0 doA \else doB \fi\end{verbatim}
+However `\GetFooIntercharClass' and `\GetFooIntercharToks' are
+\textbf{not fully expandable} for the time being.
+
+\section{Implementation}
+
+%\AutoCmdSyntaxVerb
+\NoEmptyCodeLines
+\MakeInputJobDoc[sty][ltx]{0}{\ProcessInputWith{PScomment}}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/interchar/interchardemo1.pdf b/Master/texmf-dist/doc/xelatex/interchar/interchardemo1.pdf
new file mode 100644
index 00000000000..181b741f2cb
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/interchar/interchardemo1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/interchar/interchardemo1.tex b/Master/texmf-dist/doc/xelatex/interchar/interchardemo1.tex
new file mode 100644
index 00000000000..2499462b5e3
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/interchar/interchardemo1.tex
@@ -0,0 +1,49 @@
+% -*- coding: utf-8 -*-
+\documentclass{article}
+\usepackage[b5paper]{geometry}
+\usepackage{interchar,xcolor}
+\begin{document}
+
+\newintercharscheme{FOO}
+
+\newintercharclass[FOO]{\myclassU}
+\intercharclass[FOO]{`\o}{\myclassU}
+
+\interchartoks[FOO]{0}{\myclassU}{\bgroup\color{red}}
+\interchartoks[FOO]{255}{\myclassU}{\bgroup\color{red}}
+\interchartoks[FOO]{\myclassU}{0}{\egroup}
+\interchartoks[FOO]{\myclassU}{255}{\egroup}
+
+\intercharstate[FOO]{1}
+
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+
+\newintercharscheme{BAR}
+
+\newintercharclass[BAR]{\myclassX}
+\intercharclass[BAR]{`\u}{\myclassX}
+\intercharclass[BAR]{`\e}{\myclassX}
+
+\interchartoks[BAR]{0}{\myclassX}{\bgroup\color{blue}}
+\interchartoks[BAR]{255}{\myclassX}{\bgroup\color{blue}}
+\interchartoks[BAR]{\myclassX}{0}{\egroup}
+\interchartoks[BAR]{\myclassX}{255}{\egroup}
+
+\intercharstate[BAR]{1}
+
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+
+\intercharstate[BAR]{0}
+
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xelatex/interchar/interchartest.pdf b/Master/texmf-dist/doc/xelatex/interchar/interchartest.pdf
new file mode 100644
index 00000000000..61f31eca778
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/interchar/interchartest.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/interchar/interchartest.tex b/Master/texmf-dist/doc/xelatex/interchar/interchartest.tex
new file mode 100644
index 00000000000..cc6d1a9d4ba
--- /dev/null
+++ b/Master/texmf-dist/doc/xelatex/interchar/interchartest.tex
@@ -0,0 +1,238 @@
+% -*- coding: utf-8 -*-
+\documentclass{article}
+
+\usepackage[b5paper]{geometry}
+\usepackage{pifont,xcolor,etoolbox}
+%\usepackage[check-declarations,log-functions]{expl3}
+\usepackage{expl3,xparse}
+\ExplSyntaxOn
+\newcommand{\patchsuccess}[1]{\typeout{Patching~of~\string#1~succeeded.}}
+\newcommand{\patchfailure}[1]{\typeout{Patching~of~\string#1~failed!}}
+\ifx \chk_if_free_cs:N \undefined
+ \apptocmd{\__chk_if_free_cs:N}
+ { \iow_log:x { Defining\c_space_tl\token_to_str:N #1\c_space_tl\msg_line_context: } }
+ { \patchsuccess{\__chk_if_free_cs:N}} { \patchfailure{\__chk_if_free_cs:N} }
+\else
+ \apptocmd{\chk_if_free_cs:N}
+ { \iow_log:x { Defining\c_space_tl\token_to_str:N #1\c_space_tl\msg_line_context: } }
+ { \patchsuccess{\chk_if_free_cs:N}} { \patchfailure{\chk_if_free_cs:N} }
+\fi
+%\show\chk_if_free_cs:N
+\ExplSyntaxOff
+\usepackage{interchar}
+
+\setlength{\parskip}{2pt plus 1pt}
+\setlength{\parindent}{0pt}
+\pagestyle{empty}
+\newcommand{\unspace}{\unskip\unskip\unskip\unskip\unskip\unskip}
+\newcommand{\passed}{\unspace\hspace{6pt}\textcolor{teal}{\ding{51}}}
+\newcommand{\failed}{\unspace\hspace{6pt}\textcolor{purple}{\ding{55}}}
+
+\begin{document}
+
+%\ExplSyntaxOn
+%\char_set_catcode_space:n {`\ }
+\catcode `\_ = 11 \catcode `\: = 11
+
+\cs_generate_variant:Nn \tl_if_eq:nnTF {V,x}
+
+Testing \verb-\__interchar_class_compare_char:nn-
+\cs_new_eq:NN \comparechar \__interchar_class_compare_char:nn
+\tl_set:Nx\l_tmpa_tl{\comparechar{2}{A},\comparechar{10}{A},\comparechar{12}{A}.%
+\comparechar{40}{2A-2F},\comparechar{45}{2A-2F},\comparechar{50}{2A-2F}.}
+\tl_if_eq:xnTF {\tl_to_str:N \l_tmpa_tl} {-1,0,1.-1,0,1.} {\passed}{\failed}
+
+Testing \verb-\__interchar_class_split_range:nNN-
+\__interchar_class_split_range:nNN {1234-ABCD} \l_tmpa_tl \l_tmpb_tl
+\tl_if_eq:VnTF \l_tmpb_tl {ABCD} {\passed}{\failed}
+\__interchar_class_split_range:nNN {ABCD} \l_tmpa_tl \l_tmpb_tl
+\tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl {\passed}{\failed}
+\__interchar_class_split_range:nNN {"AC-"BD} \l_tmpa_tl \l_tmpb_tl
+\tl_if_eq:VnTF \l_tmpb_tl {"BD} {\passed}{\failed}
+\__interchar_class_split_range:nNN {"AC} \l_tmpa_tl \l_tmpb_tl
+\tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl {\passed}{\failed}
+\__interchar_class_split_range:nNN {`\A} \l_tmpa_tl \l_tmpb_tl
+\tl_if_eq:VnTF \l_tmpb_tl {`\A} {\passed}{\failed}
+
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+
+\vspace{1em}
+
+Testing \verb-\newintercharscheme{foo}-
+\newintercharscheme{foo}
+\cs_if_exist:cTF {l_interchar_foo_chars_3_clist} {\passed}{\failed}
+
+Testing \verb-\newintercharclass[foo]{#2}-
+\newintercharclass[foo]{\myclassU}
+\newintercharclass[foo]{\myclassV}
+\clist_if_in:NnTF \g_interchar_foo_classes_clist {4} {\passed}{\failed}
+
+%\intercharclass{"1234}{1}
+%\intercharclass{"FF45}{2}
+%\intercharclass{"4567}{3}
+
+% `\A `\F `\K `\P `\U `\Z `\a `\f `\k `\p `\u `\z
+% "41 "46 "4B "50 "55 "5A "61 "66 "6B "70 "75 "7A
+% 65 70 75 80 85 90 97 102 107 112 117 122
+% '101 '106 '113 '120 '125 '132 '141 '146 '153 '160 '165 '172
+Testing \verb-\intercharclass[foo]{#2}{#3}-
+\intercharclass[foo]{"4B}{9}
+\cs_if_exist:cTF {l_interchar_foo_chars_9_clist} {\passed}{\failed}
+\intercharclass[foo]{"4B}{0}
+\clist_if_empty:cTF {l_interchar_foo_chars_9_clist} {\passed}{\failed}
+\intercharclass[foo]{"5A}{1}
+\intercharclass[foo]{"5A}{2}
+\clist_if_in:cnTF {l_interchar_foo_chars_2_clist} {5A} {\passed}{\failed}
+\intercharclass[foo]{"5A}{3}
+\clist_if_empty:cTF {l_interchar_foo_chars_2_clist} {\passed}{\failed}
+\intercharclass[foo]{"44-"47}{3}
+\clist_if_in:cnTF {l_interchar_foo_chars_3_clist} {44-47} {\passed}{\failed}
+\intercharclass[foo]{"50-"53}{3}
+\clist_if_in:cnTF {l_interchar_foo_chars_3_clist} {50-53} {\passed}{\failed}
+\intercharclass[foo]{"48-"51}{2}
+\clist_if_in:cnTF {l_interchar_foo_chars_3_clist} {52-53} {\passed}{\failed}
+\intercharclass[foo]{"45}{2}
+\clist_if_in:cnTF {l_interchar_foo_chars_3_clist} {46-47} {\passed}{\failed}
+
+Testing \verb-\getintercharclass[foo]{#2}{#3}-
+\cs_new_eq:NN \getclass \interchar_get_class:nn
+\tl_set:Nx \l_tmpa_tl {\getclass{default}{"5555}\getclass{default}{"300A}\getclass{default}{"3001}}
+\tl_if_eq:xnTF {\tl_to_str:N \l_tmpa_tl} {123} {\passed}{\failed}
+\getintercharclass{"3456}{\l_tmpa_tl}
+\tl_if_eq:VnTF \l_tmpa_tl {1} {\passed}{\failed}
+
+Testing \verb-\interchartoks[foo]{#2}{#3}{#4}-
+\newintercharclass[foo]{\myclassW}
+\intercharclass[foo]{`\o}{\myclassW}
+\interchartoks[foo]{0}{\myclassW}{\bgroup\color{blue}}
+\interchartoks[foo]{255}{\myclassW}{\bgroup\color{blue}}
+\interchartoks[foo]{\myclassW}{0}{\egroup}
+\interchartoks[foo]{\myclassW}{255}{\egroup}
+\prop_get:NnN \l_interchar_foo_toks_prop {255 6} \l_tmpa_tl
+\tl_if_eq:VnTF \l_tmpa_tl {\bgroup\color{blue}} {\passed}{\failed}
+
+\XeTeXinterchartokenstate = 0
+Testing \verb-\getinterchartoks[foo]{#2}{#3}{#4}-
+\interchartoks[foo]{\myclassW}{1}{u}
+\tl_set:Nx \l_tmpa_tl {\interchar_get_toks:nVn{foo}{\myclassW}{1}}
+\tl_if_eq:VnTF \l_tmpa_tl {u} {\passed}{\failed}
+
+\XeTeXinterchartokenstate = 0
+Testing \verb-\intercharstate[foo]{#2}-:
+\intercharstate[foo]{0}
+\tl_if_eq:VnTF {\XeTeXcharclass `\o} {0} {\passed}{\failed}
+\tl_if_eq:VnTF {\XeTeXinterchartoks 0 1} {\xtxHanSpace} {\passed}{\failed}
+
+\XeTeXinterchartokenstate = 1
+Testing \verb-\getintercharstate[foo]{#2}-:
+\getintercharstate[foo]{\l_tmpa_tl}
+\tl_if_eq:VnTF \l_tmpa_tl {0} {\passed}{\failed}
+\intercharstate[foo]{2}
+\tl_set:Nx \l_tmpa_tl {\interchar_get_state:n{foo}}
+\tl_if_eq:xnTF {\tl_to_str:N \l_tmpa_tl} {1} {\passed}{\failed}
+
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+
+\vspace{1em}
+
+\XeTeXinterchartokenstate = 0
+Testing \verb-\NewFooIntercharClass #1-
+\NewFooIntercharClass \myclassQ
+\clist_if_in:NnTF \g_interchar_foo_classes_clist {7} {\passed}{\failed}
+
+Testing \verb-\FooIntercharClass #1 = #2-
+\FooIntercharClass `\c = \myclassU
+\FooIntercharClass `\b = \myclassU
+\FooIntercharClass `\a = \myclassU
+\clist_if_in:cnTF {l_interchar_foo_chars_4_clist} {61-63} {\passed}{\failed}
+\FooIntercharClass `\y \myclassV
+\FooIntercharClass `\z \myclassV
+\clist_if_in:cnTF {l_interchar_foo_chars_5_clist} {79-7A} {\passed}{\failed}
+\FooIntercharClass "43 9
+\FooIntercharClass "45 9
+\FooIntercharClass "44 9
+\clist_if_in:cnTF {l_interchar_foo_chars_9_clist} {43-45} {\passed}{\failed}
+\FooIntercharClass `\L 9
+\FooIntercharClass `\M 9
+\FooIntercharClass `\O 9
+\FooIntercharClass `\N 9
+\clist_if_in:cnTF {l_interchar_foo_chars_9_clist} {4C-4F} {\passed}{\failed}
+\FooIntercharClass `\N 0
+\clist_if_in:cnTF {l_interchar_foo_chars_9_clist} {4C-4D} {\passed}{\failed}
+\FooIntercharClass `\L 0
+\FooIntercharClass `\M 0
+\FooIntercharClass `\N 0
+\FooIntercharClass `\O 0
+\FooIntercharClass `\E 0
+\FooIntercharClass `\C 0
+\FooIntercharClass `\D 0
+\clist_if_empty:cTF {l_interchar_foo_chars_9_clist} {\passed}{\failed}
+
+Testing \verb-\FooIntercharToks #1 #2 = {#3}-
+\FooIntercharToks \myclassU \myclassV = {\textcolor{red}{zzz}}
+\prop_get:NnN \l_interchar_foo_toks_prop {4 5} \l_tmpa_tl
+\tl_if_eq:VnTF \l_tmpa_tl {\textcolor{red}{zzz}} {\passed}{\failed}
+
+Testing \verb-\FooIntercharState = #1-
+\FooIntercharClass `\o = \myclassV
+\FooIntercharState = 1
+%aa\the\XeTeXinterchartoks 4 5 bb
+\tl_if_eq:VnTF {\XeTeXcharclass `\o} {5} {\passed}{\failed}
+\tl_if_eq:VnTF {\XeTeXinterchartoks 4 5} {\textcolor{red}{zzz}} {\passed}{\failed}
+
+\FooIntercharState = 2
+Testing \verb-\GetFooIntercharState-:
+\ifnum \GetFooIntercharState = 1 \passed \else \failed \fi
+
+\XeTeXinterchartokenstate = 0
+Testing \verb-\BarIntercharState = #1-:
+\XeTeXinterchartokenstate = 1
+\newintercharscheme{bar}
+\NewBarIntercharClass \myclassX
+\BarIntercharClass `\f \myclassX
+\BarIntercharClass `\x \myclassX
+\NewBarIntercharClass \myclassY
+\BarIntercharClass `\d \myclassY
+\BarIntercharClass `\g \myclassY
+\BarIntercharClass `\. \myclassY
+\BarIntercharToks 255 \myclassX = {\bgroup\color{orange}}
+\BarIntercharToks \myclassX 255 = {\egroup}
+\BarIntercharToks 255 \myclassY = {\bgroup\color{olive}}
+\BarIntercharToks \myclassY 255 = {\egroup}
+\tl_if_eq:xnTF \l_interchar_current_scheme_tl {foo} {\passed}{\failed}
+\BarIntercharState = 1
+\tl_if_eq:VnTF \l_interchar_current_scheme_tl {bar} {\passed}{\failed}
+\tl_if_eq:VnTF {\XeTeXcharclass `\d} {5} {\passed}{\failed}
+\tl_if_eq:VnTF {\XeTeXinterchartoks 255 4} {\bgroup\color{orange}} {\passed}{\failed}
+
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+
+\BarIntercharState = 1
+
+\FooIntercharState = 1
+
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog.
+
+% ------------------------------------------------------------------------------
+
+%\clist_show:c {l_interchar_default_chars_1_clist}
+%\clist_show:c {l_interchar_default_chars_2_clist}
+%\clist_show:c {l_interchar_default_chars_3_clist}
+%\clist_show:c {l_interchar_foo_chars_4_clist}
+%\clist_show:c {l_interchar_foo_chars_5_clist}
+%\prop_show:N \l_interchar_foo_toks_prop
+%\prop_show:N \l_interchar_bar_toks_prop
+
+\catcode `\_ = 8 \catcode `\: = 12
+%\char_set_catcode_ignore:n {`\ }%
+%\ExplSyntaxOff
+
+\end{document}