summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/strc-ref.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/strc-ref.lua')
-rw-r--r--tex/context/base/mkiv/strc-ref.lua18
1 files changed, 15 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/strc-ref.lua b/tex/context/base/mkiv/strc-ref.lua
index 2c9765a44..951c9a44a 100644
--- a/tex/context/base/mkiv/strc-ref.lua
+++ b/tex/context/base/mkiv/strc-ref.lua
@@ -52,6 +52,8 @@ local context = context
local commands = commands
local implement = interfaces.implement
+local ctx_latelua = context.latelua
+
local texgetcount = tex.getcount
local texsetcount = tex.setcount
local texconditionals = tex.conditionals
@@ -436,17 +438,27 @@ end
references.synchronizepage = synchronizepage
-function references.enhance(prefix,tag)
+local function enhancereference(prefix,tag)
local l = tobesaved[prefix][tag]
if l then
synchronizepage(l.references)
end
end
+references.enhance = enhancereference
+
+-- implement {
+-- name = "enhancereference",
+-- arguments = "2 strings",
+-- actions = references.enhance,
+-- }
+
implement {
- name = "enhancereference",
- actions = references.enhance,
+ name = "deferredenhancereference",
arguments = "2 strings",
+ actions = function(prefix,tag)
+ ctx_latelua(function() enhancereference(prefix,tag) end)
+ end,
}
-- -- -- related to strc-ini.lua -- -- --