From 8b678f473da7b81842dbc13b50c6303991570521 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 25 May 2019 11:48:47 +0200 Subject: 2019-05-25 10:53:00 --- tex/context/base/mkiv/back-pdf.lua | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'tex/context/base/mkiv/back-pdf.lua') diff --git a/tex/context/base/mkiv/back-pdf.lua b/tex/context/base/mkiv/back-pdf.lua index 8886967e0..5f845fdcd 100644 --- a/tex/context/base/mkiv/back-pdf.lua +++ b/tex/context/base/mkiv/back-pdf.lua @@ -10,17 +10,38 @@ if not modules then modules = { } end modules ['back-pdf'] = { -- the way we manage resources, info, etc. Users should use the \type {lpdf} -- interface instead. If needed I will provide replacement functionality. +local setmetatableindex = table.setmetatableindex + interfaces.implement { name = "setpdfcompression", arguments = { "integer", "integer" }, actions = lpdf.setcompression, } -if CONTEXTLMTXMODE == 0 then - updaters.apply("backend.update.pdf") - updaters.apply("backend.update.lpdf") - updaters.apply("backend.update.tex") - updaters.apply("backend.update") +do + + local dummy = function() end + local report = logs.reporter("backend") + + local function unavailable(t,k) + report("calling unavailable pdf.%s function",k) + t[k] = dummy + return dummy + end + + updaters.register("backend.update",function() + -- + -- For now we keep this for tikz. If really needed some more can be made + -- accessible but it has to happen in a controlled way then, for instance + -- by first loading or enabling some compatibility layer so that we can + -- trace possible interferences. + -- + pdf = { + immediateobj = pdf.immediateobj + } + setmetatableindex(pdf,unavailable) + end) + end backends.install("pdf") -- cgit v1.2.3