blob: 34b285ba67ca68475b264d2a069550f7fc50574a (
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
72
73
|
def selectpunct expr t =
currenttitle:= t;
if t = "Hash mark (number sign)" : let next_ = lose_it_
elseif t = "At sign" : let next_ = lose_it_
elseif t = "Semicolon" :
code_offset := ASCII"?" - ASCII";"; let next_ = use_it_
elseif t = "Apostrophe" :
code_offset := quotesnglright - ASCII"'"; let next_ = use_it_
elseif t = "Reverse apostrophe" :
code_offset := quotesnglleft - ASCII"`"; let next_ = use_it_
else: code_offset := 0; let next_ = use_it_ fi; next_ enddef;
def remapcomlig expr t =
currenttitle:= t;
if t = "Closing quotes" :
code_offset := quotedblright - oct"42"; let next_ = use_it_
elseif t = "Opening quotes" :
code_offset := quotedblleft - oct"134"; let next_ = use_it_
elseif t = "En dash" :
code_offset := endash - oct"173"; let next_ = use_it_
elseif t = "Em dash" :
code_offset := emdash - ASCII"|"; let next_ = use_it_
else: code_offset := 0; let next_ = use_it_ fi; next_ enddef;
% Get a good set of critical edition marks for this font.
def selectsym expr t =
currenttitle:= t;
if t = "Left curly brace" :
code_offset := braceleft - oct"146"; let next_ = use_it_
elseif t = "Right curly brace" :
code_offset := braceright - oct"147"; let next_ = use_it_
elseif t = "Left floor bracket" :
code_offset := bracketleftbt - oct"142"; let next_ = use_it_
elseif t = "Right floor bracket" :
code_offset := bracketrightbt - oct"143"; let next_ = use_it_
elseif t = "Left angle bracket" :
code_offset := angleleft - oct"150"; let next_ = use_it_
elseif t = "Right angle bracket" :
code_offset := angleright - oct"151"; let next_ = use_it_
elseif t = "Dagger mark" :
code_offset := dagger - oct"171"; let next_ = use_it_
elseif t = "Double dagger mark" :
code_offset := daggerdbl - oct"172"; let next_ = use_it_
else: let next_ = lose_it_ fi; next_ enddef;
% Use Computer modern characters for as many signs as possible.
let cmchar = selectpunct;
input punct
let ligtable_ = ligtable;
def ligtable text t = enddef;
let cmchar = remapcomlig;
input comlig
let cmchar = relax;
let ligtable = ligtable_;
let cmchar = selectsym;
input symbol
code_offset := 0;
% Special Greek punctuation from Silvio Levy's src/punct.mf.
def selectgrpunct expr t =
currenttitle:= t;
if t = "'Anw tele'ia" : let next_ = use_it_
elseif t = "Open quotes (eisagwgik'a)" : let next_ = use_it_
elseif t = "Close quotes (eisagwgik'a)" : let next_ = use_it_
else: code_offset := 0; let next_ = lose_it_ fi; next_ enddef;
let cmchar = selectgrpunct;
readfrom("grpunct");
|