summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-ref.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/strc-ref.lua')
-rw-r--r--tex/context/base/strc-ref.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index 7f37f20ff..61f9dc69e 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -1733,7 +1733,7 @@ function references.filter(name,...) -- number page title ...
if data then
if name == "realpage" then
local cs = references.analyze() -- normally already analyzed but also sets state
- context(cs.realpage or 0) -- todo, return and in command namespace
+ context(tonumber(cs.realpage) or 0) -- todo, return and in command namespace
else -- assumes data is table
local kind = type(data) == "table" and data.metadata and data.metadata.kind
if kind then
@@ -1751,6 +1751,8 @@ function references.filter(name,...) -- number page title ...
report_references("name '%s', unknown kind",name)
end
end
+ elseif name == "realpage" then
+ context(0)
elseif trace_referencing then
report_references("name '%s', no reference",name)
end