summaryrefslogtreecommitdiff
path: root/tex/context/base/s-fnt-32.mkiv
blob: 5ffbb2ac5d833f5b69519c90ba536fda625bf28b (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
%D \module
%D   [      file=s-fnt-31,
%D        version=2011.05.12,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Unicode Math Scripts,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\startluacode
    function fonts.tracers.mathscripts()
        context.starttabulate { "|cT|c|cT|c|c|l|" }
        for k, v in table.sortedpairs(table.merged(characters.superscripts,characters.subscripts)) do
            local ck = utf.char(k)
            local cv = utf.char(v)
            local ss = characters.superscripts[k] and "^" or "_"
            context.NC() context("U+%05X",k)
            context.NC() context(ck)
            context.NC() context("U+%05X",v)
            context.NC() context(cv)
            context.NC() context("$x%s = x%s%s$",ck,ss,cv)
            context.NC() context(string.lower(characters.data[k].description))
            context.NC() context.NR()
        end
        context.stoptabulate()
    end
\stopluacode

\doifnotmode{demo}{\endinput}

\setupbodyfont[dejavu,10pt]

% \enabletrackers[math.normalizing]
% \setupbackend[export=yes]

\setuplayout
  [backspace=1cm,
   topspace=1cm,
   footer=1cm,
   header=0cm,
   height=middle,
   width=middle]

\starttext

\startbuffer
$e=mc²$ ${}²$ $²$ $x²ᶞ$ $x⁽²⁺²⁼²⁺²⁾$ $x²⁺²⁼²⁺²$ $x₅²$ $x²₅²$
\stopbuffer

\typebuffer \getbuffer

\startluacode
    fonts.tracers.mathscripts()
\stopluacode

\stoptext