1
2
3
4local common = fonts.goodies.load("common-math.lfg")
5local presets = common.mathematics.tweaks.presets
6
7return {
8 name = "erewhon-math",
9 version = "1.00",
10 comment = "Goodies that complement erewhon math.",
11 author = "Hans Hagen & Mikael Sundqvist",
12 copyright = "ConTeXt development team",
13 mathematics = {
14 parameters = {
15 AccentBaseDepth = 60,
16 DelimiterPercent = 85,
17 DelimiterShortfall = 400,
18 DelimiterDisplayPercent = 90,
19 DelimiterDisplayShortfall = 400,
20 SubscriptShiftDown = 200,
21 SuperscriptShiftUp = 400,
22 SubscriptShiftDownWithSuperscript = "1.2*SubscriptShiftDown",
23 PrimeShiftUp = "1*SuperscriptShiftUp",
24 PrimeShiftUpCramped = "1*SuperscriptShiftUp",
25 PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
26 RadicalDisplayStyleVerticalGap = "RadicalVerticalGap",
27
28
29 },
30 tweaks = {
31 aftercopying = {
32 {
33 tweak = "fixprimes",
34 factor = 0.94 ,
35 fake = 0.85,
36 },
37 {
38 tweak = "addmirrors",
39 },
40 {
41 tweak = "addcomposites",
42 },
43
44
45
46
47
48
49
50 {
51 tweak = "fixintegrals",
52 },
53 presets.scripttocalligraphic { },
54 presets.rsfstoscript { },
55 presets.rsfsuprighttoscript { },
56 presets.moderntocalligraphic { },
57 presets.eulertocalligraphic { },
58 presets.xitsarabic { rscale = 0.90 },
59 presets.fallbacks { },
60 presets.moveitalics { correct = true },
61 presets.moveitalics { correct = true, letters = true },
62 presets.moveintegrals { factor = 1.5 },
63 presets.wipeitalics { },
64 {
65 tweak = "checkaccents",
66 },
67 {
68 tweak = "kerns",
69 list = {
70 [0x002F] = { topleft = -0.15, bottomright = -0.15 },
71 ["0x7D.parts.top"] = { topright = -0.15, },
72 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
73 ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 },
74 ["0x29.parts.top"] = { topright = -0.1, },
75 ["0x29.parts.bottom"] = { bottomright = -0.1 },
76 ["0x29.variants.*"] = { topright = -0.1, bottomright = -0.1 },
77 ["0x221A.parts.top"] = { topright = 0.2, },
78 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
79 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
80 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
81 ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
82 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
83 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
84 [0x00393] = { bottomright = -0.3 },
85 },
86 },
87 {
88 tweak = "flattenaccents",
89 },
90 {
91 tweak = "radicaldegreeanchors",
92 list = {
93 ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.025 },
94 }
95 },
96 {
97 tweak = "checkspacing",
98 },
99 {
100 tweak = "addscripts",
101 },
102 {
103 tweak = "accentdimensions",
104 },
105 {
106 tweak = "addrules",
107 },
108{
109 tweak = "replacerules",
110
111
112
113
114
115
116 fraction = {
117 height = .188,
118 yoffset = .812,
119 },
120 radical = {
121 height = .188,
122 yoffset = .812,
123 leftoffset = 0.12,
124 rightoffset = 0.12,
125 },
126 stacker = {
127 height = .188,
128 yoffset = .812,
129 },
130},
131 {
132 tweak = "addactuarian",
133 },
134 {
135 tweak = "addequals",
136 },
137 {
138 tweak = "addfourier",
139 variant = 2,
140 },
141 {
142 tweak = "addprimed",
143 },
144 {
145 tweak = "setoptions",
146 },
147 },
148 },
149 bigslots = {
150 1, 2, 3, 4
151 },
152 },
153
154}
155 |