summaryrefslogtreecommitdiff
path: root/tex/context/base/x-chemml.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-07-21 16:50:00 +0200
committerHans Hagen <pragma@wxs.nl>2012-07-21 16:50:00 +0200
commit86a5122e2c2370f4b190374fcbb68d6bcb63149b (patch)
treeede2bdb89ee7ad276e7a1bad23b9c104fe8831eb /tex/context/base/x-chemml.mkiv
parent7b3b116e3777e1dd17ef3d335b2a503a603bc264 (diff)
downloadcontext-86a5122e2c2370f4b190374fcbb68d6bcb63149b.tar.gz
beta 2012.07.21 16:50
Diffstat (limited to 'tex/context/base/x-chemml.mkiv')
-rw-r--r--tex/context/base/x-chemml.mkiv20
1 files changed, 10 insertions, 10 deletions
diff --git a/tex/context/base/x-chemml.mkiv b/tex/context/base/x-chemml.mkiv
index 80e8317d8..99a371107 100644
--- a/tex/context/base/x-chemml.mkiv
+++ b/tex/context/base/x-chemml.mkiv
@@ -11,34 +11,34 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% This needs an update!
+
\writestatus{loading}{ConTeXt XML Macros / Chemistry}
\registerctxluafile{x-chemml}{}
\def\ctxmodulechemml#1{\directlua\zerocount{moduledata.chemml.#1}}
-\usemodule[pictex,chemic] % someday we will do structural fomulas in mp
-
%D The following code assumes a load||flush approach to \XML.
\unprotect
\startxmlsetups xml:cml:process
- \xmlstrip {\xmldocument} {cml:chem|cml:ichem|cml:dchem|cml:reaction|cml:molecule|cml:ion|cml:structure}
+ \xmlstrip {#1} {cml:chem|cml:ichem|cml:dchem|cml:reaction|cml:molecule|cml:ion|cml:structure}
- \xmlgrab {\xmldocument} {cml:*} {*}
- \xmlgrab {\xmldocument} {cml:gives|cml:equilibrium|cml:mesomeric} {cml:arrow}
- \xmlgrab {\xmldocument} {cml:plus|cml:minus|cml:equal} {cml:operator}
- \xmlgrab {\xmldocument} {cml:bond|cml:singlebond|cml:doublebound|cml:triplebond} {cml:bond}
+ \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 {\xmldocument} {pi::chemml} {cml:pi}
+ \xmlgrab {#1} {pi::chemml} {cml:pi}
\stopxmlsetups
\xmlregistersetup{xml:cml:process}
\xmlregisterns{cml}{chemml}
-\unexpanded\def\setupCMLappearance[#1]{\dodoubleargument\getparameters[@@CML#1]}
+\unexpanded\def\setupCMLappearance[#1]{\dodoubleargument\getparameters[@@CML#1]} % old stuff
\setupCMLappearance [ion] [\c!alternative=\v!a]
@@ -67,7 +67,7 @@
\xmlflush{#1}
\stopxmlsetups
-\def\doCMLtext#1#2#3% main top bot
+\unexpanded\def\doCMLtext#1#2#3% main top bot
{\setbox0\hbox{\doifsomething{#2}{\txx\setstrut\strut\ignorespaces#2\unskip}}%
\setbox2\hbox{\ignorespaces\strut#1\unskip}%
\setbox4\hbox{\doifsomething{#3}{\txx\setstrut\strut\ignorespaces#3\unskip}}%