blob: 4d516a45c2ad35e4bd73e90bde12020b44a0182f (
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
|
%D \module
%D [ file=math-ini,
%D version=2008.01.02,
%D title=\CONTEXT\ Lua Macros,
%D subtitle=Math Initializations,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright=PRAGMA]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
%D We move these definitions into the format:
% test [[\char948 \ctxlua{tex.sprint(utf.char(948))}]]
% test $[[\char948 \ctxlua{tex.sprint(utf.char(948))}]]$
\registerctxluafile{math-ini}{1.001}
\registerctxluafile{math-ent}{1.001}
% \registerctxluafile{math-def}{1.001}
% \ctxlua{mathematics.traditional()}
\ctxlua{mathematics.define()}
\def\utfmathclass #1{\ctxlua{tex.sprint (mathematics.utfmathclass ("#1"))}}
\def\utfmathcommand#1{\ctxlua{commands.cs(mathematics.utfmathcommand("#1"))}}
\def\utfmathclassdefault #1#2{\ctxlua{
tex.sprint(mathematics.utfmathclass("#1","#2"))
}}
\def\utfmathcommanddefault#1#2#3{\ctxlua{
local cmd = mathematics.utfmathcommand("#1","") or ""
if cmd == "" then
commands.cs("#2","#3")
else
commands.cs(cmd)
end}}
% \let\math@normal@int\int \def\int{\math@normal@int\intlimits}
\protect \endinput
|