diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
commit | b55577d0998160c0174e250b542016ecd6ca9056 (patch) | |
tree | 27093212d5ca3e6ffe4ae434c3ec094233ed37ba /tex/context/base/blob-ini.lua | |
parent | 624cbb5da392e9403984dd1cf368c0d408b1c2a8 (diff) | |
download | context-b55577d0998160c0174e250b542016ecd6ca9056.tar.gz |
2015-05-15 23:06:00
Diffstat (limited to 'tex/context/base/blob-ini.lua')
-rw-r--r-- | tex/context/base/blob-ini.lua | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/tex/context/base/blob-ini.lua b/tex/context/base/blob-ini.lua index 32fac7662..b837250ce 100644 --- a/tex/context/base/blob-ini.lua +++ b/tex/context/base/blob-ini.lua @@ -45,6 +45,8 @@ local tohpackfast = typesetters.tohpackfast local tovpack = typesetters.tovpack local tovpackfast = typesetters.tovpackfast +local implement = interfaces.implement + blobs = blobs or { } -- provide copies here (nicer for manuals) @@ -195,18 +197,7 @@ blobs.strht = strht blobs.strdp = strdp blobs.strhd = strhd -function commands.strwd(str) context(strwd(str)) end -function commands.strht(str) context(strht(str)) end -function commands.strdp(str) context(strdp(str)) end -function commands.strhd(str) context(strhd(str)) end - --- less efficient: --- --- function commands.widthof(str) --- local b = blobs.new() --- blobs.append(b,str) --- blobs.pack(b) --- local w = blobs.dimensions(b) --- context(number.todimen(w)) --- blobs.dispose(b) --- end +implement { name = "strwd", arguments = "string", actions = { strwd, context } } +implement { name = "strht", arguments = "string", actions = { strht, context } } +implement { name = "strdp", arguments = "string", actions = { strdp, context } } +implement { name = "strhd", arguments = "string", actions = { strhd, context } } |