summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/xelatex/interchar/interchardemo1.tex
blob: 2499462b5e362727321bd5968f5fbb8500c49b46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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}