summaryrefslogtreecommitdiff
path: root/macros/latex/exptl/mem/Mtp/t2a-com.mtp
blob: 1be9be92d31d61e865390bc1adc4ee349c4bc303 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
% (c) 2001-2004 Javier Bezos

input: 2;
output: 1;

states: acc, end;

aliases:

topaccent  = (@"0300-@"0315 | @"031A-@"031B | @"033D-@"0344);
botaccent  = (@"0316-@"0319 | @"031C-@"0333 | @"0339-@"033C | @"0345);
overaccent = (@"0334-@"0338);
accent     = (@"0300-@"0345);

expressions:



% Combine if composed form not in main font

^({accent}) {topaccent} {topaccent} {accent}    => <=
     \4 "c{" \3 "c{" \2 "l{" \1 "}}}" @"1B  <push: acc>;
^({accent}) {topaccent} {botaccent} {topaccent} => <=
     \3 "c{" \4 "c{" \2 "l{" \1 "}}}" @"1B  <push: acc>;
^({accent}) {botaccent} {topaccent} {topaccent} => <=
     \2 "c{" \4 "c{" \3 "l{" \1 "}}}" @"1B  <push: acc>;
^({accent}) {topaccent} {accent}                => <=
     \3 "c{" \2 "l{" \1 "}}" @"1B  <push: acc>;
^({accent}) {botaccent} {topaccent}             => <=
     \2 "c{" \3 "l{" \1 "}}" @"1B  <push: acc>;
^({accent}) {accent}                            => <=
     \2 "l{" \1 "}" @"1B  <push: acc>;

<acc> @"1B   => <pop:>;
<acc>[COMBINING GRAVE ACCENT] => "\UseMemAccent{t}{0}";
<acc>[COMBINING GRAVE ACCENT BELOW] => "\UseMemAccent{u}{0}";
<acc>[COMBINING ACUTE ACCENT] => "\UseMemAccent{t}{1}";
<acc>[COMBINING ACUTE ACCENT BELOW] => "\UseMemAccent{u}{1}";
<acc>[COMBINING CIRCUMFLEX ACCENT] => "\UseMemAccent{t}{2}";
<acc>[COMBINING CIRCUMFLEX ACCENT BELOW] => "\UseMemAccent{u}{2}";
<acc>[COMBINING TILDE] => "\UseMemAccent{t}{3}";
<acc>[COMBINING TILDE BELOW] => "\UseMemAccent{u}{3}";
<acc>[COMBINING MACRON] => "\UseMemAccent{t}{9}";
<acc>[COMBINING MACRON BELOW] => "\UseMemAccent{u}{9}";
<acc>[COMBINING BREVE] => "\UseMemAccent{t}{8}";
<acc>[COMBINING BREVE BELOW] => "\UseMemAccent{u}{8}";
<acc>[COMBINING DOT ABOVE] => "\UseMemAccent{t}{10}";
<acc>[COMBINING DOT BELOW] => "\UseMemAccent{u}{10}";
<acc>[COMBINING DIAERESIS] => "\UseMemAccent{t}{4}";
<acc>[COMBINING DIAERESIS BELOW] => "\UseMemAccent{u}{4}";
<acc>[COMBINING RING ABOVE] => "\UseMemAccent{t}{6}";
<acc>[COMBINING RING BELOW] => "\UseMemAccent{u}{6}";
<acc>[COMBINING DOUBLE ACUTE ACCENT] => "\UseMemAccent{t}{5}";
<acc>[COMBINING CARON] => "\UseMemAccent{t}{7}";
<acc>[COMBINING CARON BELOW] => "\UseMemAccent{u}{7}";
<acc>[COMBINING CEDILLA] => "\UseMemAccent{c}{11}";
<acc>[COMBINING OGONEK] => "\UseMemAccent{k}{12}";
<acc>[COMBINING COMMA BELOW] => "\UseMemAccent{p}{,}";
<acc>[COMBINING DOT BELOW] => "\UseMemAccent{p}{.}";


% PUA -> ASCII

@"E125          => "\MemMoveOtherChar\%"; % as a special case (37).
(@"E100-@"E17F) => "\MemMoveOtherChar\" #(\1 - @"E100);



% Glyphs in main font with same value as Unicode characters

(@"0020-@"0026|@"0028-@"005F|@"0061-@"007E) => \1;