summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/back-pdp.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-08-11 16:54:53 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-08-11 16:54:53 +0200
commit4f97d7d7cd942dfe76cd4bb54fc3f5b890654235 (patch)
tree5fad3eb091bfa3b05b46f4975d2e5f6284e4ed97 /tex/context/base/mkiv/back-pdp.lua
parenta8723a3d1ee935e8d403bd0f5d96a072c0974755 (diff)
downloadcontext-4f97d7d7cd942dfe76cd4bb54fc3f5b890654235.tar.gz
2020-08-11 15:59:00
Diffstat (limited to 'tex/context/base/mkiv/back-pdp.lua')
-rw-r--r--tex/context/base/mkiv/back-pdp.lua40
1 files changed, 21 insertions, 19 deletions
diff --git a/tex/context/base/mkiv/back-pdp.lua b/tex/context/base/mkiv/back-pdp.lua
index 6e663f1dd..036c81177 100644
--- a/tex/context/base/mkiv/back-pdp.lua
+++ b/tex/context/base/mkiv/back-pdp.lua
@@ -214,7 +214,7 @@ local function pdfextension()
if e then
e()
else
- report("\\pdfextension: unknown %a",w)
+ report("\\pdfextension: unsupported %a",w)
end
end
end
@@ -235,7 +235,7 @@ local function pdffeedback()
if f then
f()
else
- report("\\pdffeedback: unknown %a",w)
+ report("\\pdffeedback: unsupported %a",w)
end
end
end
@@ -248,28 +248,30 @@ end
-- linkmargin threadmargin vorigin xformmargin (tokenlists:) pageattr pageresources
-- pagesattr pkmode trailerid xformattr xformresources
--- local variables = {
--- }
---
--- local function pdfvariable()
--- local w = scanword()
--- if w then
--- local f = variables[w]
--- if f then
--- f()
--- else
--- print("invalid variable",w)
--- end
--- else
--- print("missing variable")
--- end
--- end
+local variables = {
+ minorversion = function() context(lpdf.minorversion()) end,
+ majorversion = function() context(lpdf.majorversion()) end,
+}
+
+local function pdfvariable()
+ local w = scanword()
+ if w then
+ local f = variables[w]
+ if f then
+ f()
+ else
+ report("\\pdfvariable: unsupported %a",w)
+ end
+ else
+ print("missing variable")
+ end
+end
-- kept:
implement { name = "pdfextension", actions = pdfextension }
implement { name = "pdffeedback", actions = pdffeedback }
---------- { name = "pdfvariable", actions = pdfvariable }
+implement { name = "pdfvariable", actions = pdfvariable }
-- for the moment (tikz)