diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
commit | 8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch) | |
tree | 94286bc131ef7d994f9432febaf03fe23d10eef8 /tex/context/base/mkiv/chem-ini.mkiv | |
parent | f5aed2e51223c36c84c5f25a6cad238b2af59087 (diff) | |
download | context-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz |
2016-01-12 16:26:00
Diffstat (limited to 'tex/context/base/mkiv/chem-ini.mkiv')
-rw-r--r-- | tex/context/base/mkiv/chem-ini.mkiv | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/chem-ini.mkiv b/tex/context/base/mkiv/chem-ini.mkiv new file mode 100644 index 000000000..a5cd41f2b --- /dev/null +++ b/tex/context/base/mkiv/chem-ini.mkiv @@ -0,0 +1,51 @@ +%D \module +%D [ file=chem-ini, +%D version=2008.03.06, +%D subtitle=Chemistry, +%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. + +\writestatus{loading}{ConTeXt Chemistry Macros / Initialization} % might become Inline + +\registerctxluafile{chem-ini}{1.001} + +\unprotect + +% todo: use \mathscriptsmode if needed + +%D \macros +%D {molecule} +%D +%D Quick and dirty: +%D +%D \starttyping +%D \unexpanded\def\molecule#1% +%D {$\enablesupersub\tf#1$} +%D \stoptyping +%D +%D Using \LUA: +%D +%D \startbuffer +%D \molecule{H_2SO_4^-2} +%D \molecule{H_2SO_4^{-2}} +%D \molecule{H_2SO_4^{-2{x}}} +%D \stopbuffer +%D +%D \typebuffer \getbuffer + +\unexpanded\def\molecule#1% + {\clf_molecule{#1}} + +%D For old times sake: + +\unexpanded\def\chem#1#2#3% + {\dontleavehmode\begingroup#1\lohi{#2}{#3}\endgroup} + +\protect \endinput + + |