diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4095 -> 4092 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 106555 -> 104764 bytes | |||
-rw-r--r-- | tex/context/base/lpdf-swf.lua | 66 | ||||
-rw-r--r-- | tex/context/base/lpdf-wid.lua | 16 | ||||
-rw-r--r-- | tex/context/base/scrn-fld.mkvi | 8 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 23872 -> 23873 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 162212 -> 162210 bytes | |||
-rw-r--r-- | tex/context/base/syst-aux.mkiv | 4 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
9 files changed, 77 insertions, 19 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 0c9566b18..b8c6d79f7 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex d8e17946a..99232f0ca 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/lpdf-swf.lua b/tex/context/base/lpdf-swf.lua index aadbbd639..c3e83dc69 100644 --- a/tex/context/base/lpdf-swf.lua +++ b/tex/context/base/lpdf-swf.lua @@ -30,6 +30,10 @@ local nodeinjections = backends.pdf.nodeinjections local pdfannotation_node = nodes.pool.pdfannotation +local trace_swf = false trackers.register("backend.swf", function(v) trace_swf = v end) + +local report_swf = logs.reporter("backend","swf") + local activations = { click = "XA", page = "PO", @@ -87,27 +91,79 @@ local function insertswf(spec) }, } + -- todo: check op subpath figuur (relatief) + if resources then local names = configuration.Assets.Names - local function add(filename) + local root = file.dirname(filename) + local prefix = format("^%s/",root) + local function add(filename,strip) local filename = gsub(filename,"%./","") - local embeddedreference = codeinjections.embedfile { file = filename, keepdir = true } + local usedname = strip and gsub(filename,prefix,"") -- always when relative + local embeddedreference = codeinjections.embedfile { + file = filename, + usedname = usedname, + keepdir = true, + } names[#names+1] = pdfstring(filename) names[#names+1] = embeddedreference + if trace_swf then + if usedname == filename then + report_swf("embedding file '%s'",filename) + else + report_swf("embedding file '%s' as '%s'",filename,usedname) + end + end + end + local relativepaths = resources.relativepaths + if relativepaths then + if trace_swf then + report_swf("checking %s relative paths",#relativepaths) + end + for i=1,#relativepaths do + local relativepath = relativepaths[i] + if trace_swf then + report_swf("checking path '%s' relative to '%s'",relativepath,root) + end + local path = file.join(root,relativepath) + local files = dir.glob(path .. "/**") + for i=1,#files do + add(files[i],true) + end + end end local paths = resources.paths if paths then + if trace_swf then + report_swf("checking %s paths",#paths) + end for i=1,#paths do - local files = dir.glob(paths[i] .. "/**") + local path = paths[i] + if trace_swf then + report_swf("checking path '%s'",path) + end + local files = dir.glob(path .. "/**") for i=1,#files do - add(files[i]) + add(files[i],false) end end end + local relativefiles = resources.relativefiles + if relativefiles then + if trace_swf then + report_swf("checking %s relative files",#relativefiles) + end + for i=1,#relativefiles do + add(relativefiles[i],true) + end + end local files = resources.files if files then + if trace_swf then + report_swf("checking %s files",#files) + end for i=1,#files do - add(files[i]) + add(files[i],false) end end end diff --git a/tex/context/base/lpdf-wid.lua b/tex/context/base/lpdf-wid.lua index 2b1a241e6..0d73c56ba 100644 --- a/tex/context/base/lpdf-wid.lua +++ b/tex/context/base/lpdf-wid.lua @@ -200,12 +200,13 @@ end lpdf.registerdocumentfinalizer(flushembeddedfiles,"embeddedfiles") function codeinjections.embedfile(specification) - local data = specification.data - local filename = specification.file - local name = specification.name or "" - local title = specification.title or "" - local hash = specification.hash or filename - local keepdir = specification.keepdir -- can change + local data = specification.data + local filename = specification.file + local name = specification.name or "" + local title = specification.title or "" + local hash = specification.hash or filename + local keepdir = specification.keepdir -- can change + local usedname = specification.usedname if filename == "" then filename = nil end @@ -243,7 +244,8 @@ function codeinjections.embedfile(specification) end end end - local basename = keepdir == true and filename or file.basename(filename) + usedname = usedname ~= "" and usedname or filename + local basename = keepdir == true and usedname or file.basename(usedname) local basename = gsub(basename,"%./","") local savename = file.addsuffix(name ~= "" and name or basename,"txt") -- else no valid file local a = pdfdictionary { Type = pdfconstant("EmbeddedFile") } diff --git a/tex/context/base/scrn-fld.mkvi b/tex/context/base/scrn-fld.mkvi index 6e4d6ba85..f296b6a55 100644 --- a/tex/context/base/scrn-fld.mkvi +++ b/tex/context/base/scrn-fld.mkvi @@ -165,7 +165,7 @@ \def\scrn_field_check_category {\edef\currentfieldbodycategory{\fieldbodyparameter\c!category}% \ifx\currentfieldbodycategory\empty - letfieldbodyparameter\s!parent\??fd + \letfieldbodyparameter\s!parent\??fd %\setevalue{\currentfieldbodyhash\s!parent}{\namedfieldcategoryhash\empty}% to WS: not hash ! \else \normalexpanded{\setfieldbodyparameter{\s!parent}{\??fd\currentfieldbodycategory}}% @@ -398,7 +398,7 @@ \setupfieldcontentframed [\c!align=\v!flushleft, \c!strut=\v!no, - \s!parent=\??ol] + \s!parent=\??ol] % needs checking \setupfieldcontentframed % independent [\c!alternative=\v!normal, @@ -414,13 +414,13 @@ [\c!style=, \c!color=, \c!align=\v!flushleft, - \s!parent=\??ol] + \s!parent=\??ol] % needs checking \setupfieldtotalframed [%\c!alternative={\v!label,\v!frame,\v!horizontal}, \c!strut=\v!no, \c!align=, - \s!parent=\??ol] + \s!parent=\??ol] % needs checking % \setupcurrent diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex a5ed9b1f8..02c9c5bc9 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 10b93574c..b24a70205 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv index 1aae19ee1..571ca05b9 100644 --- a/tex/context/base/syst-aux.mkiv +++ b/tex/context/base/syst-aux.mkiv @@ -1196,8 +1196,8 @@ %D complicated arguments, for instance arguments that %D consist of two or more expandable tokens. -\def\getfirstcharacter #1{\ctxcommand{getfirstcharacter(\!!bs#1\e!!es)}} -\def\doiffirstcharelse#1#2{\ctxcommand{doiffirstcharelse(\!!bs#1\e!!es,\!!bs#2\e!!es)}} % chr str +\def\getfirstcharacter #1{\ctxcommand{getfirstcharacter(\!!bs#1\!!es)}} +\def\doiffirstcharelse#1#2{\ctxcommand{doiffirstcharelse(\!!bs#1\!!es,\!!bs#2\!!es)}} % chr str %D \macros %D {doifinstringelse, doifincsnameelse} diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index cef1d5616..432a83a8d 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 08/18/11 17:42:44 +-- merge date : 08/20/11 01:39:23 do -- begin closure to overcome local limits and interference |