summaryrefslogtreecommitdiff
path: root/tex/context/base/blob-ini.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-06-15 13:00:13 +0300
committerMarius <mariausol@gmail.com>2011-06-15 13:00:13 +0300
commit776071a1ec8278bcd8cbcf92cb1e5507bcac14d2 (patch)
treee22cab2d01d20ee59ad05a213eb70cf3c13091dd /tex/context/base/blob-ini.mkiv
parentfaaa984b45c82f7345e0a8daf457685feae54dcc (diff)
downloadcontext-776071a1ec8278bcd8cbcf92cb1e5507bcac14d2.tar.gz
beta 2011.06.15 11:49
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
%