-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcore.tex
46 lines (36 loc) · 1002 Bytes
/
core.tex
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
% (hopefully plain) TeX implementation of FreeCHR
% must never be empty!
\edef\chr@ns{chr@}
\def\chr@version{0.0.1}
% must be an undefined mapping!
\def\chr@nnil{\chr@nil}
\newdimen\z@ \z@=0pt
\newdimen\p@ \p@=1pt
\newcount\@ne \@ne=1
\def\m@ne{-\@ne}
\def\chr@firstoftwo#1#2{#1}
\def\chr@secondoftwo#1#2{#2}
\def\chr@empty{}
\def\chr@step#1{\advance#1 by\@ne}
\def\chr@error#1{\errmessage{Error: #1}}
\let\chr@true=\iftrue
\let\chr@false=\iffalse
\newcount\chr@unused
\newcount\chr@rulecount \chr@rulecount=\z@
\newcount\chr@constraintcount \chr@constraintcount=\z@
\newcount\chr@tempcount
\newcount\chr@tempcountb
\newcount\chr@tempcountc
\newcount\chr@runcyclecount
\newif\ifchr@tempif@
\newif\ifchr@result@
% maximum numbers of runs
\def\chr@maxruncycles{30}
\def\chr@app#1#2{%
\begingroup\toks@\expandafter{#1#2}\xdef\@tmp{\the\toks@}\endgroup
\let#1=\@tmp
}
\def\chr@gapp#1#2{%
\begingroup\toks@\expandafter{#1#2}\xdef#1{\the\toks@}\endgroup
}
\def\chr@strip@meaning#1>{}