diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-11-12 19:54:50 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-11-12 19:54:50 +0100 |
commit | 0c75a2acf592eb4360685375904440f5e6b8125a (patch) | |
tree | 0a23a35bf947d13b3975bacdc27ad1d7edc9454c /tex/context/base/mkiv/strc-ref.lua | |
parent | 5c195236a1a69b23762df71a791e6b4e2c671892 (diff) | |
download | context-0c75a2acf592eb4360685375904440f5e6b8125a.tar.gz |
2019-11-12 18:53:00
Diffstat (limited to 'tex/context/base/mkiv/strc-ref.lua')
-rw-r--r-- | tex/context/base/mkiv/strc-ref.lua | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/strc-ref.lua b/tex/context/base/mkiv/strc-ref.lua index a4f31ec0c..da2d50120 100644 --- a/tex/context/base/mkiv/strc-ref.lua +++ b/tex/context/base/mkiv/strc-ref.lua @@ -2615,8 +2615,8 @@ implement { -- } implement { - name = "referencerealpage", - actions = function() + name = "referencerealpage", + actions = function() local actions = references.currentset context(not actions and 0 or actions.realpage or setreferencerealpage(actions)) end @@ -2632,11 +2632,24 @@ local function referencepos(key) v = a[key] or 0 end end - context("%p",v) + return v end -implement { name = "referenceposx", actions = function() referencepos("x") end } -implement { name = "referenceposy", actions = function() referencepos("y") end } +implement { name = "referenceposx", actions = function() context("%p",referencepos("x")) end } +implement { name = "referenceposy", actions = function() context("%p",referencepos("y")) end } + + +implement { + name = "referencecolumn", + actions = function() + local actions = references.currentset + local column = 1 + if actions then + column = jobpositions.columnofpos(actions.realpage or setreferencerealpage(actions),referencepos("x")) + end + context(column or 1) + end +} local plist, nofrealpages |