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