summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lpdf-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-03-22 19:57:53 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-03-22 19:57:53 +0100
commit5c46359f4fa543e24e5d4a0a327d41bf8a9ff7c8 (patch)
tree79fc6a0e161820ebb16a8830572868dcd0e1aae2 /tex/context/base/mkiv/lpdf-ini.lua
parentf47b4939787074397c9ea37c1d892a1f7ccc7290 (diff)
downloadcontext-5c46359f4fa543e24e5d4a0a327d41bf8a9ff7c8.tar.gz
2018-03-22 19:49:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-ini.lua')
-rw-r--r--tex/context/base/mkiv/lpdf-ini.lua30
1 files changed, 26 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/lpdf-ini.lua b/tex/context/base/mkiv/lpdf-ini.lua
index f8cff2032..8af1fb409 100644
--- a/tex/context/base/mkiv/lpdf-ini.lua
+++ b/tex/context/base/mkiv/lpdf-ini.lua
@@ -1082,10 +1082,28 @@ end
do
+ -- It's a bit of a historical mess here.
+
+ local metadata = nil
local timestamp = backends.timestamp()
- function lpdf.timestamp()
- return timestamp
+ function lpdf.getmetadata()
+ if not metadata then
+ local contextversion = environment.version
+ local luatexversion = format("%1.2f",LUATEXVERSION)
+ local luatexfunctionality = tostring(LUATEXFUNCTIONALITY)
+ metadata = {
+ producer = format("LuaTeX-%s",luatexversion),
+ creator = format("LuaTeX %s %s + ConTeXt MkIV %s",luatexversion,luatexfunctionality,contextversion),
+ luatexversion = luatexversion,
+ contextversion = contextversion,
+ luatexfunctionality = luatexfunctionality,
+ luaversion = tostring(LUAVERSION),
+ platform = os.platform,
+ time = timestamp,
+ }
+ end
+ return metadata
end
function lpdf.settime(n)
@@ -1096,6 +1114,9 @@ do
timestamp = backends.timestamp()
end
end
+ if metadata then
+ metadata.time = timestamp
+ end
return timestamp
end
@@ -1107,10 +1128,11 @@ do
end
function lpdf.id(nodate)
+ local banner = environment.jobname or tex.jobname or "unknown"
if nodate then
- return tex.jobname
+ return banner
else
- return format("%s.%s",tex.jobname,timestamp)
+ return format("%s.%s",banner,timestamp)
end
end