summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-09-11 20:45:55 +0000
committerKarl Berry <karl@freefriends.org>2022-09-11 20:45:55 +0000
commit8f897f2b3b66d8aeb25b120b6ea4844b27dfe262 (patch)
tree956b157bef1f8bb53f14363cd3565775a2015e89 /Master/texmf-dist/source
parentfb23ac2833adaf897f093a9d14e2c5ef95d8ddc7 (diff)
newpax (11sep22)
git-svn-id: svn://tug.org/texlive/trunk@64347 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/newpax/newpax.dtx63
-rw-r--r--Master/texmf-dist/source/latex/newpax/newpax.ins4
2 files changed, 21 insertions, 46 deletions
diff --git a/Master/texmf-dist/source/latex/newpax/newpax.dtx b/Master/texmf-dist/source/latex/newpax/newpax.dtx
index 0d32683bd42..01f68546ddb 100644
--- a/Master/texmf-dist/source/latex/newpax/newpax.dtx
+++ b/Master/texmf-dist/source/latex/newpax/newpax.dtx
@@ -2,7 +2,7 @@
%
% File: newpax.dtx
% Copyright 2006-2008, 2011, 2012 Heiko Oberdiek (original pax.sty)
-% Copyright (C) 2021, 2022 Ulrike Fischer
+% Copyright (C) 2021 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -29,7 +29,7 @@
%<@@=newpax>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{newpax}%
- [2022-06-27 v0.52 Annotation support for PDF graphics based on pax.sty adapted by (UF)]%
+ [2021-03-07 v0.51 Annotation support for PDF graphics based on pax.sty adapted by (UF)]%
\ExplSyntaxOn
\bool_if:nF
{
@@ -702,7 +702,7 @@
local ProvidesLuaModule = {
name = "newpax",
version = "0.52", --TAGVERSION
- date = "2022-06-27", --TAGDATE
+ date = "2022-09-11", --TAGDATE
description = "newpax lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -893,7 +893,7 @@ end
-- XXXXXX encode/escape the file name?
local function outputENTRY_file (file, pdfedoc)
local bytes = GETSIZE(pdfedoc)
- local date = GETINFO(pdfedoc).CreationDate
+ local date = (GETINFO(pdfedoc) and GETINFO(pdfedoc).CreationDate) or "D:22222222222222"
-- file
local a = strENTRY_BEG
a = a .. strCMD_BEG .. constCMD_FILE .. strCMD_END
@@ -1031,48 +1031,24 @@ local function outputKV_N (pdfedict)
return a
end
--- if a gotoR has a filespec filespec we use this
--- to output the reference. It is rather crude and handles only names and strings
-local function outputDICT (dictionary)
- local dict = DICTIONARYTOTABLE(dictionary)
- local a = "<<"
- for k,v in pairs (dict) do
- a = a .. strNAME.. k
- if v[1]== 5 then -- it is a name
- b = string.gsub(v[2], "/", "#2F")
- a = a .. strNAME .. b
- elseif v[1] == 6 then -- it is a string
- local b
- if v[3] then
- b = "<" .. v[2] .. ">"
- else
- b = "(" .. v[2] .. ")"
- end
- a = a ..strRECT_SEP .. b
- -- everything else is ignored for now!
- end
- end
- a = a .. ">>"
- return a
-end
-
local function outputKV_gotor (pdfedict) -- action dictionary
- local type, value, hex = GETFROMDICTIONARY(pdfedict,"F")
- local desttype, destvalue, destdetail = GETFROMDICTIONARY(pdfedict,"D")
+ local type, value, desttype, destvalue, hex
+ local checktype, checkvalue, checkhex = GETFROMDICTIONARY(pdfedict,"F")
+ if checktype==10 then
+ -- TODO resolve reference deeper!!
+ local a,b,c= GETFROMREFERENCE(checkvalue)
+ type, value, hex = GETFROMDICTIONARY(b,"F")
+ desttype,destvalue = GETFROMDICTIONARY(b,"D")
+ else
+ value=checkvalue
+ desttype,destvalue = GETFROMDICTIONARY(pdfedict,"D")
+ end
local a = strKV_BEG .. constKEY_FILE .. strVALUE_BEG
- if TYPE(value) == "pdfe.reference" then
- local x,dictionary = GETFROMREFERENCE(value)
- if TYPE(dictionary) == "pdfe.dictionary" then
- a = a .. outputDICT (dictionary)
- else
- print("ERROR!? this is not a dictionary!!")
- end
+ a = strKV_BEG .. constKEY_FILE .. strVALUE_BEG
+ if hex then
+ a = a .. strHEX_STR_BEG .. value .. strHEX_STR_END
else
- if hex then
- a = a .. strHEX_STR_BEG .. value .. strHEX_STR_END
- else
- a = a .. strLIT_STR_BEG .. value .. strLIT_STR_END
- end
+ a = a .. strLIT_STR_BEG .. value .. strLIT_STR_END
end
a = a .. strVALUE_END .. strKV_END
if desttype == 7 then
@@ -1087,7 +1063,6 @@ local function outputKV_gotor (pdfedict) -- action dictionary
return a
end
-
local function outputKV_goto (count)
local a = strKV_BEG .. constKEY_DEST_LABEL .. strVALUE_BEG .. count .. strVALUE_END .. strKV_END
return a
diff --git a/Master/texmf-dist/source/latex/newpax/newpax.ins b/Master/texmf-dist/source/latex/newpax/newpax.ins
index ccce1d73c00..62ec48b0c9f 100644
--- a/Master/texmf-dist/source/latex/newpax/newpax.ins
+++ b/Master/texmf-dist/source/latex/newpax/newpax.ins
@@ -2,7 +2,7 @@
File: newpax.ins
-Copyright (C) 2021,2022 Ulrike Fischer
+Copyright (C) 2021 Ulrike Fischer
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -34,7 +34,7 @@ for those people who are interested.
\let\MetaPrefix\relax
\preamble
-Copyright (C) 2021,2022 Ulrike Fischer
+Copyright (C) 2021 Ulrike Fischer
It may be distributed and/or modified under the conditions of
the LaTeX Project Public License (LPPL), either version 1.3c of