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}{}
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\unexpanded\def\lxml_add_mml_blob#1#2
33 {\relax
34 \clf_xmlformulatobuffer\number\c_strc_formulas_n{tempxmlexport}
35 #2
36 [\c!symbol=#1,
37 \c!space=\v!yes,
38 \c!buffer=tempxmlexport,
39 \c!name={formula\number\c_strc_formulas_n.xml}]
40 \relax}
41
42\unexpanded\def\xmlattachmml
43 {\iftrialtypesetting \else \ifexporting \iflocation
44 \dostarttagged\t!ignore\empty
45 \lxml_add_mml_blob{mmlattachment}\attachment
46 \dostoptagged
47 \fi \fi \fi}
48
49\unexpanded\def\xmlcommentmml
50 {\iftrialtypesetting \else \ifexporting \iflocation
51 \dostarttagged\t!ignore\empty
52 \lxml_add_mml_blob{mmlcomment}\comment
53 \dostoptagged
54 \fi \fi \fi}
55
56
57
58\unexpanded\def\xmladdmmlsource
59 {\iftrialtypesetting \else \ifexporting \iflocation
60 \dostarttagged\t!ignore\empty
61 \inleftmargin{
62 \lxml_add_mml_blob{mmlattachment}\attachment
63 \quad
64 \lxml_add_mml_blob{mmlcomment}\comment
65 }
66 \dostoptagged
67 \fi \fi \fi}
68
69\protect \endinput
70 |