diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
commit | fc4466b32ed330a956ac603b00fd145524cff49a (patch) | |
tree | 2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv | |
parent | 50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff) |
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv new file mode 100644 index 00000000000..d18ba47a10a --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv @@ -0,0 +1,53 @@ +%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. + +% todo: \mathscriptsmode + +\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 + + |