File: proofwiki.sty.ltxml

package info (click to toggle)
latexml 0.8.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 29,128 kB
  • sloc: xml: 98,982; perl: 29,706; sh: 179; javascript: 28; makefile: 15
file content (326 lines) | stat: -rw-r--r-- 14,890 bytes parent folder | download | duplicates (3)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# -*- mode: Perl -*-
# /=====================================================================\ #
# |  proofwiki                                                          | #
# | LaTeXML Bindings for simulating proofwiki.org's macros              | #
# |=====================================================================| #
# | Part of LaTeXML:                                                    | #
# |  Public domain software, produced as part of work done by the       | #
# |  United States Government & not subject to copyright in the US.     | #
# |---------------------------------------------------------------------| #
# | Bruce Miller <bruce.miller@nist.gov>                        #_#     | #
# | http://dlmf.nist.gov/LaTeXML/                              (o o)    | #
# \=========================================================ooo==U==ooo=/ #
package LaTeXML::Package::Pool;
use strict;
use warnings;
use LaTeXML::Package;

# Adapated from the MathJax-enabling preamble of proofwiki.org
# so load texvc.sty.ltxml as a MathJax-approximating prerequisite
RequirePackage('texvc');

# ProofWiki preference for this symbol
DefMacro('\empty',     '\varnothing');
DefMacro('\P',         '\unicode{xb6}');
DefMacro('\Alpha',     '\unicode{x391}');
DefMacro('\Beta',      '\unicode{x392}');
DefMacro('\Epsilon',   '\unicode{x395}');
DefMacro('\Zeta',      '\unicode{x396}');
DefMacro('\Eta',       '\unicode{x397}');
DefMacro('\Iota',      '\unicode{x399}');
DefMacro('\Kappa',     '\unicode{x39a}');
DefMacro('\Mu',        '\unicode{x39c}');
DefMacro('\Nu',        '\unicode{x39d}');
DefMacro('\Pi',        '\unicode{x3a0}');
DefMacro('\Rho',       '\unicode{x3a1}');
DefMacro('\Sigma',     '\unicode{x3a3}');
DefMacro('\Tau',       '\unicode{x3a4}');
DefMacro('\Chi',       '\unicode{x3a7}');
DefMacro('\bsalpha',   '\boldsymbol \alpha');
DefMacro('\bsbeta',    '\boldsymbol \beta');
DefMacro('\bsgamma',   '\boldsymbol \gamma');
DefMacro('\bsdelta',   '\boldsymbol \delta');
DefMacro('\bsepsilon', '\boldsymbol \epsilon');
DefMacro('\bszeta',    '\boldsymbol \zeta');
DefMacro('\bseta',     '\boldsymbol \eta');
DefMacro('\bstheta',   '\boldsymbol \theta');
DefMacro('\bsiota',    '\boldsymbol \iota');
DefMacro('\bskappa',   '\boldsymbol \kappa');
DefMacro('\bslambda',  '\boldsymbol \lambda');
DefMacro('\bsmu',      '\boldsymbol \mu');
DefMacro('\bsnu',      '\boldsymbol \nu');
DefMacro('\bsxi',      '\boldsymbol \xi');
DefMacro('\bsomicron', '\boldsymbol \omicron');
DefMacro('\bspi',      '\boldsymbol \pi');
DefMacro('\bsrho',     '\boldsymbol \rho');
DefMacro('\bssigma',   '\boldsymbol \sigma');
DefMacro('\bstau',     '\boldsymbol \tau');
DefMacro('\bsupsilon', '\boldsymbol \upsilon');
DefMacro('\bsphi',     '\boldsymbol \phi');
DefMacro('\bschi',     '\boldsymbol \chi');
DefMacro('\bspsi',     '\boldsymbol \psi');
DefMacro('\bsomega',   '\boldsymbol \omega');
# the pound symbol unaccountably missing from mathjax
DefMacro('\pounds', '{\it\unicode{xA3}}');
# the complex numbers
DefMacro('\C', '\mathbb C');
# the natural numbers
DefMacro('\N', '\mathbb N');
# the rational numbers
DefMacro('\Q', '\mathbb Q');
# the real numbers
DefMacro('\R', '\mathbb R');
# the integer numbers
DefMacro('\Z', '\mathbb Z');
# the empty set
DefMacro('\O', '\varnothing');

# some extra macros for ease of use; these are non-standard!

# true
DefMacro('\T', '\mathrm T');
# false
DefMacro('\F', '\mathrm F');
# Galois field
DefMacro('\GF', '\mathbb F');
# ring of Hamiltonians
DefMacro('\H', '\mathbb H');
# vector of zeros
DefMacro('\bszero', '\boldsymbol 0');
# vector of ones
DefMacro('\bsone', '\boldsymbol 1');
# a vector 't'
DefMacro('\bst', '\boldsymbol t');
# a vector 'v'
DefMacro('\bsv', '\boldsymbol v');
# a vector 'w'
DefMacro('\bsw', '\boldsymbol w');
# a vector 'x'
DefMacro('\bsx', '\boldsymbol x');
# a vector 'y'
DefMacro('\bsy', '\boldsymbol y');
# a vector 'z'
DefMacro('\bsz', '\boldsymbol z');
# a vector '\Delta'
DefMacro('\bsDelta', '\boldsymbol \Delta');
# the exponential
DefMacro('\E', '\mathrm e');
# roman d for use in integrals: $\int f(x) \rd x$
DefMacro('\rd', '\,\mathrm d');
# roman d for use in derivatives: $\dfrac \d{\d x}$
DefMacro('\d', '\mathrm d');
# delta operator for use in sums
DefMacro('\rdelta', '\,\delta');
# differential operator D
DefMacro('\rD', '\mathrm D');

# example from MathJax on how to define macros with parameters:
DefMacro('\bold{}', '{\bf #1}');

DefMacro('\AA', '\mathcal A');
DefMacro('\BB', '\mathcal B');
DefMacro('\CC', '\mathcal C');
DefMacro('\DD', '\mathcal D');
DefMacro('\EE', '\mathcal E');
DefMacro('\FF', '\mathcal F');
DefMacro('\GG', '\mathcal G');
DefMacro('\HH', '\mathcal H');
DefMacro('\II', '\mathcal I');
DefMacro('\JJ', '\mathcal J');
DefMacro('\KK', '\mathcal K');
DefMacro('\LL', '\mathcal L');
DefMacro('\MM', '\mathcal M');
DefMacro('\NN', '\mathcal N');
DefMacro('\OO', '\mathcal O');
DefMacro('\PP', '\mathcal P');
DefMacro('\QQ', '\mathcal Q');
DefMacro('\RR', '\mathcal R');
DefMacro('\SS', '\mathcal S');
DefMacro('\TT', '\mathcal T');
DefMacro('\UU', '\mathcal U');
DefMacro('\VV', '\mathcal V');
DefMacro('\WW', '\mathcal W');
DefMacro('\XX', '\mathcal X');
DefMacro('\YY', '\mathcal Y');
DefMacro('\ZZ', '\mathcal Z');

DefMacro('\lcm', '\operatorname{lcm}');

# Otherwise undefined trigometrical and hyperbolic functions

DefMacro('\cosec',  '\operatorname{cosec}');
DefMacro('\sech',   '\operatorname{sech}');
DefMacro('\csch',   '\operatorname{csch}');
DefMacro('\arccot', '\operatorname{arccot}');
DefMacro('\arccsc', '\operatorname{arccsc}');
DefMacro('\arcsec', '\operatorname{arcsec}');
DefMacro('\hav',    '\operatorname{hav}');
DefMacro('\vers',   '\operatorname{vers}');
DefMacro('\cis',    '\operatorname{cis}');
DefMacro('\Ci',     '\operatorname{Ci}');
DefMacro('\Si',     '\operatorname{Si}');
DefMacro('\Li',     '\operatorname{Li}');
DefMacro('\Ei',     '\operatorname{Ei}');
DefMacro('\Sinh',   '\operatorname{Sinh}');
DefMacro('\Cosh',   '\operatorname{Cosh}');
DefMacro('\Sech',   '\operatorname{Sech}');
DefMacro('\Csch',   '\operatorname{Csch}');
DefMacro('\Tanh',   '\operatorname{Tanh}');
DefMacro('\Coth',   '\operatorname{Coth}');
DefMacro('\arsinh', '\operatorname{arsinh}');
DefMacro('\arcosh', '\operatorname{arcosh}');
DefMacro('\artanh', '\operatorname{artanh}');
DefMacro('\arcoth', '\operatorname{arcoth}');
DefMacro('\arsech', '\operatorname{arsech}');
DefMacro('\arcsch', '\operatorname{arcsch}');
DefMacro('\Arsinh', '\operatorname{Arsinh}');
DefMacro('\Arcosh', '\operatorname{Arcosh}');
DefMacro('\Artanh', '\operatorname{Artanh}');
DefMacro('\Arcoth', '\operatorname{Arcoth}');
DefMacro('\Arsech', '\operatorname{Arsech}');
DefMacro('\Arcsch', '\operatorname{Arcsch}');
DefMacro('\erf',    '\operatorname{erf}');
DefMacro('\erfc',   '\operatorname{erfc}');

# Bracketing constructs

DefMacro('\paren{}',      '\left( #1 \right)');
DefMacro('\leftparen{}',  '\left( #1 \right.');
DefMacro('\rightparen{}', '\left. #1 \right)');
DefMacro('\sqbrk{}',      '\left[ #1 \right]');

DefMacro('\set{}',      '\left\lbrace #1 \right\rbrace');
DefMacro('\leftset{}',  '\left\lbrace #1 \right.');
DefMacro('\rightset{}', '\left. #1 \right\rbrace');
DefMacro('\cmod{}',     '\left\lvert #1 \right\rvert');
DefMacro('\polar{}',    '\left\langle #1 \right\rangle');
DefMacro('\norm{}',     '\left\lVert #1 \right\rVert');
DefMacro('\floor{}',    '\left\lfloor #1 \right\rfloor');
DefMacro('\ceiling{}',  '\left\lceil #1 \right\rceil');
DefMacro('\nint{}',     '\left\lfloor #1 \right\rceil');

DefMacro('\closedint{}{}', '\left[ #1 \,.\,.\, #2 \right]');
DefMacro('\openint{}{}',   '\left( #1 \,.\,.\, #2 \right)');
DefMacro('\hointl{}{}',    '\left( #1 \,.\,.\, #2 \right]');
DefMacro('\hointr{}{}',    '\left[ #1 \,.\,.\, #2 \right)');
DefMacro('\horectl{}{}',   '\left(\left( #1 \,.\,.\, #2 \right]\right]');
DefMacro('\horectr{}{}',   '\left[\left[ #1 \,.\,.\, #2 \right)\right)');
DefMacro('\multiset{}',    '\left\lbrace\!\left\lbrace #1 \right\rbrace\!\right\rbrace');

DefMacro('\tuple{}',       '\left( #1 \right)');
DefMacro('\struct{}',      '\left( #1 \right)');
DefMacro('\ideal{}',       '\left( #1 \right)');
DefMacro('\sequence{}',    '\left\langle #1 \right\rangle');
DefMacro('\family{}',      '\left\langle #1 \right\rangle');
DefMacro('\innerprod{}{}', '\left\langle #1, #2 \right\rangle');
DefMacro('\gen{}',         '{\left\langle #1 \right\rangle}');
DefMacro('\eqclass{}{}',   '\left[\!\left[ #1 \right]\!\right]_{#2}');
DefMacro('\index{}{}',     '\left[ #1 : #2 \right]');
DefMacro('\order{}',       '\left\lvert #1 \right\rvert');
DefMacro('\size{}',        '\left\lvert #1 \right\rvert');
DefMacro('\bigsize{}',     '\bigl\lvert #1 \bigr\rvert');
DefMacro('\card{}',        '\left\lvert #1 \right\rvert');
DefMacro('\fractpart{}',   '\left\lbrace #1 \right\rbrace');
DefMacro('\map{}{}',       '#1 \left( #2 \right)');
DefMacro('\braket{}{}',    '{\left\langle #1 \, \middle \vert \, #2 \right\rangle{}}');

DefMacro('\Syl{}{}',            '\mathrm{Syl}_{#1} \left( #2 \right)');
DefMacro('\relcomp{}{}',        '\complement_{#1} \left( #2 \right)');
DefMacro('\laptrans{}',         '\LL \left\lbrace #1 \right\rbrace');
DefMacro('\invlaptrans{}',      '\LL^{-1} \left\lbrace #1 \right\rbrace');
DefMacro('\powerset{}',         '\PP \left( #1 \right)');
DefMacro('\intlimits{}{}{}',    '\left[ #1 \right]_{#2}^{#3}');
DefMacro('\bigintlimits{}{}{}', '\Bigl[ #1 \Bigr]_{#2}^{#3}');
DefMacro('\valueat{}{}',        '\left. #1 \right\rvert_{#2}');
DefMacro('\bigvalueat{}{}',     '\Bigl. #1 \Bigr\rvert_{#2}');

# Mathematical Logic

DefMacro('\Add',  '\operatorname{Add}');
DefMacro('\Mult', '\operatorname{Mult}');
DefMacro('\Succ', '\operatorname{Succ}');
DefMacro('\Zero', '\operatorname{Zero}');

# Miscellaneous

DefMacro('\hcf',                   '\operatorname{hcf}');
DefMacro('\inj',                   '\operatorname{inj}');
DefMacro('\rem',                   '\operatorname{rem}');
DefMacro('\pr',                    '\operatorname{pr}');
DefMacro('\proj',                  '\operatorname{proj}');
DefMacro('\tr',                    '\operatorname{tr}');
DefMacro('\len',                   '\operatorname{len}');
DefMacro('\sgn',                   '\operatorname{sgn}');
DefMacro('\grad',                  '\operatorname{grad}');
DefMacro('\curl',                  '\operatorname{curl}');
DefMacro('\dr{}',                  '\mathrm{dr} \left( #1 \right)');
DefMacro('\cl',                    '\mathrm{cl}');
DefMacro('\var{}',                 '\mathsf{var} \left( #1 \right)');
DefMacro('\cov{}',                 '\mathsf{cov} \left( #1 \right)');
DefMacro('\expect{}',              '\mathsf E \left( #1 \right)');
DefMacro('\conjclass{}',           '\mathrm C_{#1}');
DefMacro('\Log',                   '\operatorname{Log}');
DefMacro('\Ln',                    '\operatorname{Ln}');
DefMacro('\On',                    '\operatorname{On}');
DefMacro('\Area',                  '\operatorname{Area}');
DefMacro('\Card',                  '\operatorname{Card}');
DefMacro('\Frob',                  '\operatorname{Frob}');
DefMacro('\Bernoulli{}',           '\mathrm{Bern} \left( #1 \right)');
DefMacro('\BetaDist{}{}',          '\mathrm{Beta} \left( #1, #2 \right)');
DefMacro('\Binomial{}{}',          '\mathrm B \left( #1, #2 \right)');
DefMacro('\Cauchy{}{}',            '\mathrm{Cauchy} \left( #1, #2 \right)');
DefMacro('\NegativeBinomial{}{}',  '\mathrm{NB} \left( #1, #2 \right)');
DefMacro('\Exponential{}',         '\mathrm{Exp} \left( #1 \right)');
DefMacro('\Gaussian{}{}',          'N \left( #1, #2 \right)');
DefMacro('\Geometric{}',           '\mathrm G_0 \left( #1 \right)');
DefMacro('\ShiftedGeometric{}',    '\mathrm G_1 \left( #1 \right)');
DefMacro('\Poisson{}',             '\mathrm{Poisson} \left( #1 \right)');
DefMacro('\StudentT{}',            't_{#1}');
DefMacro('\ContinuousUniform{}{}', '\mathrm U \left[ #1 \,.\,.\, #2 \right]');
DefMacro('\DiscreteUniform{}',     '\mathrm U \left( #1 \right)');
DefMacro('\condprob{}{}',          '\Pr \left( #1 \, \middle \vert \, #2 \right)');
DefMacro('\Arg{}',                 '\mathrm{Arg} \left( #1 \right)');
DefMacro('\domain{}',              '\mathrm{Dom} \left( #1 \right)');
DefMacro('\cont{}',                '\mathrm{cont} \left( #1 \right)');
DefMacro('\Dom{}',                 '\mathrm{Dom} \left( #1 \right)');
DefMacro('\Cdm{}',                 '\mathrm{Cdm} \left( #1 \right)');
DefMacro('\Rng{}',                 '\mathrm{Rng} \left( #1 \right)');
DefMacro('\adj{}',                 '\mathrm{adj} \left( #1 \right)');
DefMacro('\Img{}',                 '\mathrm{Img} \left( #1 \right)');
DefMacro('\Preimg{}',              '\mathrm{Img}^{-1} \left( #1 \right)');
DefMacro('\image{}',               '\Img #1 ');
DefMacro('\Orb{}',                 '\mathrm{Orb} \left( #1 \right)');
DefMacro('\Stab{}',                '\mathrm{Stab} \left( #1 \right)');
DefMacro('\Dic{}',                 '\operatorname{Dic}_{#1}');
DefMacro('\GL{}',                  '\mathrm{GL} \left( #1 \right)');
DefMacro('\SL{}',                  '\mathrm{SL} \left (#1 \right)');
DefMacro('\SU{}',                  '\operatorname{SU_{#1} }');
DefMacro('\Aut{}',                 '\mathrm{Aut} \left( #1 \right)');
DefMacro('\Out{}',                 '\mathrm{Out} \left( #1 \right)');
DefMacro('\Gal{}',                 '\mathrm{Gal} \left( #1 \right)');
DefMacro('\Inn{}',                 '\mathrm{Inn} \left( #1 \right)');
DefMacro('\Fix{}',                 '\mathrm{Fix} \left( #1 \right)');
DefMacro('\Char{}',                '\mathrm{Char} \left( #1 \right)');
DefMacro('\Spec{}',                '\mathrm{Spec} \left( #1 \right)');
DefMacro('\Nil{}',                 '\mathrm{Nil} \left( #1 \right)');
DefMacro('\Ord{}',                 '\map{\mathrm{Ord} } #1');
DefMacro('\Res{}{}',               '\mathrm{Res} \left( #1, #2 \right)');
DefMacro('\Int{}',                 '\mathrm{Int} \left( #1 \right)');
DefMacro('\Ext{}',                 '\mathrm{Ext} \left( #1 \right)');
DefMacro('\Ber',                   '\mathrm{Ber}');
DefMacro('\Bei',                   '\mathrm{Bei}');
DefMacro('\Rad',                   '\mathrm{Rad}');
DefMacro('\diam',                  '\mathrm{diam}');
DefMacro('\stratgame{}{}{}',       '\left\langle #1, \sequence #2, \sequence #3 \right\rangle');
DefMacro('\divides',               '\mathrel \backslash');
DefMacro('\PV',                    '\mathrm{PV} \displaystyle \int');
DefMacro('\leadstoandfrom',        '\mathrel \leftrightsquigarrow');
DefMacro('\degrees',               '^\circ');
DefMacro('\radians',               '\, \mathrm{rad}');
DefMacro('\cels',                  '\, \degrees \mathrm C');
DefMacro('\fahr',                  '\, \degrees \mathrm F');
DefMacro('\Re',                    '\mathfrak{Re}');
DefMacro('\Im',                    '\mathfrak{Im}');
DefMacro('\ds',                    '\displaystyle');

1;