summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/toks-scn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/toks-scn.lua')
-rw-r--r--tex/context/base/mkiv/toks-scn.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/toks-scn.lua b/tex/context/base/mkiv/toks-scn.lua
index 297ef7121..f259bcee5 100644
--- a/tex/context/base/mkiv/toks-scn.lua
+++ b/tex/context/base/mkiv/toks-scn.lua
@@ -144,6 +144,26 @@ scanners.list = scanlist
scanners.table = scantable
scanners.conditional = scanconditional
+function scanners.whd()
+ local width, height, depth
+ while true do
+ if scankeyword("width") then
+ width = scandimen()
+ elseif scankeyword("height") then
+ height = scandimen()
+ elseif scankeyword("depth") then
+ depth = scandimen()
+ else
+ break
+ end
+ end
+ if width or height or depth then
+ return width or 0, height or 0, depth or 0
+ else
+ -- we inherit
+ end
+end
+
local shortcuts = {
tokens = tokens,
bits = tokenbits,