summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt')
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt25
1 files changed, 14 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt
index 3047402bc93..99610338ae0 100644
--- a/Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt
@@ -55,15 +55,15 @@ local registrations = pdfbackend.registrations
local executers = structures.references.executers
local variables = interfaces.variables
-local v_hidden = variables.hidden
-local v_auto = variables.auto
-local v_embed = variables.embed
-local v_max = variables.max
-local v_yes = variables.yes
-local v_no = variables.no
-local v_compress = variables.compress
-local v_list = variables.list
-local v_title = variables.title
+local v_hidden <const> = variables.hidden
+local v_auto <const> = variables.auto
+local v_embed <const> = variables.embed
+local v_max <const> = variables.max
+local v_yes <const> = variables.yes
+local v_no <const> = variables.no
+local v_compress <const> = variables.compress
+local v_list <const> = variables.list
+local v_title <const> = variables.title
local lpdf = lpdf
@@ -285,8 +285,10 @@ end
lpdf.registerdocumentfinalizer(flushembeddedfiles,"embeddedfiles")
+-- relation: Supplement, Data, Source, Alternative, Data
+
function codeinjections.embedfile(specification)
- if enabled then
+ if enabled or specification.force then
local data = specification.data
local filename = specification.file
local name = specification.name or ""
@@ -297,6 +299,7 @@ function codeinjections.embedfile(specification)
local filetype = specification.filetype
local compress = specification.compress
local mimetype = specification.mimetype or specification.mime
+ local relation = specification.relation or "Unspecified"
if filename == "" then
filename = nil
end
@@ -371,7 +374,7 @@ function codeinjections.embedfile(specification)
UF = pdfunicode(savename),
EF = pdfdictionary { F = pdfreference(f) },
Desc = title ~= "" and pdfunicode(title) or nil,
- AFRelationship = pdfconstant("Unspecified"), -- Supplement, Data, Source, Alternative, Data
+ AFRelationship = pdfconstant(relation),
}
local r = pdfreference(pdfflushobject(d))
filestreams[hash] = r