summaryrefslogtreecommitdiff
path: root/tex/context/base/blob-ini.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/blob-ini.mkiv')
-rw-r--r--tex/context/base/blob-ini.mkiv18
1 files changed, 17 insertions, 1 deletions
diff --git a/tex/context/base/blob-ini.mkiv b/tex/context/base/blob-ini.mkiv
index eaaae844c..4fdb9e4b6 100644
--- a/tex/context/base/blob-ini.mkiv
+++ b/tex/context/base/blob-ini.mkiv
@@ -18,9 +18,25 @@
%D down the road (close to version 1.00 of \LUATEX). Typesetting in
%D pure \LUA\ sometimes makes sense.
+\registerctxluafile{node-typ}{1.001} % experimental
\registerctxluafile{blob-ini}{1.001}
-\endinput
+%D For the moment here:
+
+\unprotect
+
+% this one takes simple (utf) strings
+
+\def\widthofstring#1{\ctxcommand{widthofstring(\!!bs#1\!!es)}}
+
+% this one takes anything that can be typeset
+
+\unexpanded\def\setwidthof#1\to#2%
+ {\bgroup
+ \setbox\scratchbox\hbox{#1}%
+ \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}
+
+\protect \endinput
% \starttext
%