summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/x-chemml.mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-17 12:15:07 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-17 12:15:07 +0100
commitb13dd166ce8563c60c10affc97ab28940d6a7776 (patch)
tree6b15f0462d36ae916875ce1fbcdd990660d3f410 /tex/context/modules/mkiv/x-chemml.mkiv
parenta036ac2dd19b592316e1b479360e9e6c6700e935 (diff)
downloadcontext-b13dd166ce8563c60c10affc97ab28940d6a7776.tar.gz
2016-02-17 11:13:00
Diffstat (limited to 'tex/context/modules/mkiv/x-chemml.mkiv')
-rw-r--r--tex/context/modules/mkiv/x-chemml.mkiv32
1 files changed, 19 insertions, 13 deletions
diff --git a/tex/context/modules/mkiv/x-chemml.mkiv b/tex/context/modules/mkiv/x-chemml.mkiv
index bb9065921..f0511206e 100644
--- a/tex/context/modules/mkiv/x-chemml.mkiv
+++ b/tex/context/modules/mkiv/x-chemml.mkiv
@@ -24,14 +24,12 @@
\unprotect
\startxmlsetups xml:cml:process
- \xmlstrip {#1} {cml:chem|cml:ichem|cml:dchem|cml:reaction|cml:molecule|cml:ion|cml:structure}
-
- \xmlgrab {#1} {cml:*} {cml:*}
- \xmlgrab {#1} {cml:gives|cml:equilibrium|cml:mesomeric} {cml:arrow}
- \xmlgrab {#1} {cml:plus|cml:minus|cml:equal} {cml:operator}
- \xmlgrab {#1} {cml:bond|cml:singlebond|cml:doublebound|cml:triplebond} {cml:bond}
-
- \xmlgrab {#1} {pi::chemml} {cml:pi}
+ \xmlstrip {#1} {cml:chem|cml:ichem|cml:dchem|cml:reaction|cml:molecule|cml:ion|cml:structure}
+ \xmlsetsetup {#1} {cml:*} {cml:*}
+ \xmlsetsetup {#1} {cml:gives|cml:equilibrium|cml:mesomeric} {cml:arrow}
+ \xmlsetsetup {#1} {cml:plus|cml:minus|cml:equal} {cml:operator}
+ \xmlsetsetup {#1} {cml:bond|cml:singlebond|cml:doublebound|cml:triplebond} {cml:bond}
+ \xmlsetsetup {#1} {pi::chemml} {cml:pi}
\stopxmlsetups
\xmlregistersetup{xml:cml:process}
@@ -97,15 +95,23 @@
\startxmlsetups cml:atom
\doCMLtext {
\lohi {
- $\tfxx\xmlatt{#1}{protons}$
+ \normalstartimath
+ \tfxx\xmlatt{#1}{protons}%
+ \normalstopimath
} {
- $\tfxx\xmlatt{#1}{weight}$
+ \normalstartimath
+ \tfxx\xmlatt{#1}{weight}%
+ \normalstopimath
}
\xmlflush{#1}
\lohi {
- $\tfxx\xmlatt{#1}{n}$
+ \normalstartimath
+ \tfxx\xmlatt{#1}{n}%
+ \normalstopimath
} {
- $\tfxx\xmlatt{#1}{charge}$%
+ \normalstartimath
+ \tfxx\xmlatt{#1}{charge}%
+ \normalstopimath
}
}
{\xmlindex{#1}{cml:caption}{2}}
@@ -167,7 +173,7 @@
\def\dodoCMLbond#1#2#3%
{\begingroup
- \setbox\scratchbox\hbox{$M$}%
+ \setbox\scratchbox\hbox{\normalstartimath M\normalstopimath}%
\vbox to \ht\scratchbox
{\hsize\wd\scratchbox
\vskip.1\wd\scratchbox