1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Math Macros XML inclusion}
15
16\registerctxluafile{mathinc}{autosuffix}
17
18
19
20
21
22
23
24
25
26
27\unprotect
28
29\definesymbol[mmlattachment][{\infofont\darkred mml}]
30\definesymbol[mmlcomment] [{\infofont\darkblue mml}]
31
32\permanent\protected\def\lxml_add_mml_blob#1#2
33 {\relax
34 \clf_xmlformulatobuffer\c_strc_formulas_n{tempxmlexport}
35 #2
36 [\c!symbol=#1,
37 \c!space=\v!yes,
38 \c!buffer=tempxmlexport,
39 \c!name={formula\the\c_strc_formulas_n.xml}]
40 \relax}
41
42\permanent\protected\def\xmlattachmml
43 {\iftrialtypesetting\orelse\ifexporting\iflocation
44 \dostarttaggednodetail\t!ignore
45 \lxml_add_mml_blob{mmlattachment}\attachment
46 \dostoptagged
47 \fi\fi}
48
49\permanent\protected\def\xmlcommentmml
50 {\iftrialtypesetting\orelse\ifexporting\iflocation
51 \dostarttaggednodetail\t!ignore
52 \lxml_add_mml_blob{mmlcomment}\comment
53 \dostoptagged
54 \fi\fi}
55
56
57
58\permanent\protected\def\xmladdmmlsource
59 {\iftrialtypesetting\orelse\ifexporting\iflocation
60 \dostarttaggednodetail\t!ignore
61 \inleftmargin{
62 \lxml_add_mml_blob{mmlattachment}\attachment
63 \quad
64 \lxml_add_mml_blob{mmlcomment}\comment
65 }
66 \dostoptagged
67 \fi\fi}
68
69\protect \endinput
70 |