texlive[68762] Master/texmf-dist: newpax (9nov23)
commits+karl at tug.org
commits+karl at tug.org
Thu Nov 9 23:07:14 CET 2023
Revision: 68762
https://tug.org/svn/texlive?view=revision&revision=68762
Author: karl
Date: 2023-11-09 23:07:14 +0100 (Thu, 09 Nov 2023)
Log Message:
-----------
newpax (9nov23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/newpax/README.md
trunk/Master/texmf-dist/doc/latex/newpax/doc-input1.pdf
trunk/Master/texmf-dist/doc/latex/newpax/doc-input2.pdf
trunk/Master/texmf-dist/doc/latex/newpax/doc-use-newpax.pdf
trunk/Master/texmf-dist/doc/latex/newpax/doc-use-pax.pdf
trunk/Master/texmf-dist/doc/latex/newpax/newpax.pdf
trunk/Master/texmf-dist/doc/latex/newpax/newpax.tex
trunk/Master/texmf-dist/source/latex/newpax/newpax.dtx
trunk/Master/texmf-dist/tex/latex/newpax/newpax.lua
trunk/Master/texmf-dist/tex/latex/newpax/newpax.sty
Modified: trunk/Master/texmf-dist/doc/latex/newpax/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/newpax/README.md 2023-11-09 22:06:50 UTC (rev 68761)
+++ trunk/Master/texmf-dist/doc/latex/newpax/README.md 2023-11-09 22:07:14 UTC (rev 68762)
@@ -7,7 +7,7 @@
The package is based on and uses code from [pax](https://ctan.org/pkg/pax) by Heiko Oberdiek.
-Packageversion: 0.54
+Packageversion: 0.55
Packagedate: 2023-09-11 Author: Ulrike Fischer
## License
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-input1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-input2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-use-newpax.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-use-pax.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/newpax/newpax.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/newpax/newpax.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/newpax/newpax.tex 2023-11-09 22:06:50 UTC (rev 68761)
+++ trunk/Master/texmf-dist/doc/latex/newpax/newpax.tex 2023-11-09 22:07:14 UTC (rev 68762)
@@ -1,7 +1,7 @@
% !Mode:: "TeX:UTF-8:Main"
\makeatletter
-\def\UlrikeFischer at package@version{0.54}
-\def\UlrikeFischer at package@date{2023-09-11}
+\def\UlrikeFischer at package@version{0.55}
+\def\UlrikeFischer at package@date{2023-11-08}
\makeatother
\DocumentMetadata{pdfversion=1.7,lang=en-UK, uncompress}
Modified: trunk/Master/texmf-dist/source/latex/newpax/newpax.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/newpax/newpax.dtx 2023-11-09 22:06:50 UTC (rev 68761)
+++ trunk/Master/texmf-dist/source/latex/newpax/newpax.dtx 2023-11-09 22:07:14 UTC (rev 68762)
@@ -29,7 +29,7 @@
%<@@=newpax>
\NeedsTeXFormat{LaTeX2e}[2022-11-01]
\ProvidesPackage{newpax}%
- [2023-09-11 v0.54 Annotation support for PDF graphics based on pax.sty adapted by (UF)]%
+ [2023-11-08 v0.55 Annotation support for PDF graphics based on pax.sty adapted by (UF)]%
% \end{macrocode}
% Test if the pdfmanagement is loaded:
% \begin{macrocode}
@@ -919,8 +919,8 @@
%<*lua>
local ProvidesLuaModule = {
name = "newpax",
- version = "0.54", --TAGVERSION
- date = "2023-09-11", --TAGDATE
+ version = "0.55", --TAGVERSION
+ date = "2023-11-08", --TAGDATE
description = "newpax lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -1085,9 +1085,17 @@
-- destinations can be an dict (/D [array]) or only an array!
local function getdestdata (name,pagereftonum,destnamestoref)
- local destref = destnamestoref[name]
+ local destref
local type,ref,pagenum,destx,desty = nil, nil, 1,0,0
local data = {{0,0}, {5,constDEST_XYZ}}
+ -- if we get directly an array
+ if (TYPE(name) == "pdfe.array") then
+ data = ARRAYTOTABLE(name)
+ type, ref, pageref = GETFROMARRAY(name,1)
+ pagenum = pagereftonum[pageref]
+ else
+ destref = destnamestoref[name]
+ end
if destref then
type,value,detail = GETFROMREFERENCE(destref)
if TYPE(value) == "pdfe.dictionary" then
@@ -1103,9 +1111,11 @@
pagenum = pagereftonum[pageref]
end
end
+ -- print("XXXXXXXXXX",table.serialize(data),pagenum)
return pagenum, data
end
+
-- output functions
-- write the info
-- XXXXXX encode/escape the file name?
@@ -1481,14 +1491,22 @@
WRITE (collected_destinations[i])
end
-- write out the rest of the destinations.
+ -- We order first the table so that the newpax file doesn't change between
+ -- compilations, see issue #25 and PR #25
+ local destnamessorted = {}
for k,v in pairs (destnamestorefVAR) do
-- ignore use dests and page destinations.
i=string.find(k,"page.",1)
if not useddestnames[k] and not i then
+ table.insert (destnamessorted,k)
+ end
+ end
+ table.sort(destnamessorted)
+ for i = 1, #destnamessorted do
+ k=destnamessorted[i]
destcountVAR=destcountVAR + 1
WRITE(outputENTRY_dest(destcountVAR,k,pagereftonumVAR,destnamestorefVAR,docVAR))
- end
- end
+ end
io.close(writeVAR)
end
Modified: trunk/Master/texmf-dist/tex/latex/newpax/newpax.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newpax/newpax.lua 2023-11-09 22:06:50 UTC (rev 68761)
+++ trunk/Master/texmf-dist/tex/latex/newpax/newpax.lua 2023-11-09 22:07:14 UTC (rev 68762)
@@ -20,8 +20,8 @@
--
local ProvidesLuaModule = {
name = "newpax",
- version = "0.54", --TAGVERSION
- date = "2023-09-11", --TAGDATE
+ version = "0.55", --TAGVERSION
+ date = "2023-11-08", --TAGDATE
description = "newpax lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -180,9 +180,17 @@
-- destinations can be an dict (/D [array]) or only an array!
local function getdestdata (name,pagereftonum,destnamestoref)
- local destref = destnamestoref[name]
+ local destref
local type,ref,pagenum,destx,desty = nil, nil, 1,0,0
local data = {{0,0}, {5,constDEST_XYZ}}
+ -- if we get directly an array
+ if (TYPE(name) == "pdfe.array") then
+ data = ARRAYTOTABLE(name)
+ type, ref, pageref = GETFROMARRAY(name,1)
+ pagenum = pagereftonum[pageref]
+ else
+ destref = destnamestoref[name]
+ end
if destref then
type,value,detail = GETFROMREFERENCE(destref)
if TYPE(value) == "pdfe.dictionary" then
@@ -198,6 +206,7 @@
pagenum = pagereftonum[pageref]
end
end
+ -- print("XXXXXXXXXX",table.serialize(data),pagenum)
return pagenum, data
end
@@ -568,13 +577,21 @@
WRITE (collected_destinations[i])
end
-- write out the rest of the destinations.
+ -- We order first the table so that the newpax file doesn't change between
+ -- compilations, see issue #25 and PR #25
+ local destnamessorted = {}
for k,v in pairs (destnamestorefVAR) do
-- ignore use dests and page destinations.
i=string.find(k,"page.",1)
if not useddestnames[k] and not i then
+ table.insert (destnamessorted,k)
+ end
+ end
+ table.sort(destnamessorted)
+ for i = 1, #destnamessorted do
+ k=destnamessorted[i]
destcountVAR=destcountVAR + 1
WRITE(outputENTRY_dest(destcountVAR,k,pagereftonumVAR,destnamestorefVAR,docVAR))
- end
end
io.close(writeVAR)
end
Modified: trunk/Master/texmf-dist/tex/latex/newpax/newpax.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newpax/newpax.sty 2023-11-09 22:06:50 UTC (rev 68761)
+++ trunk/Master/texmf-dist/tex/latex/newpax/newpax.sty 2023-11-09 22:07:14 UTC (rev 68762)
@@ -20,7 +20,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2022-11-01]
\ProvidesPackage{newpax}%
- [2023-09-11 v0.54 Annotation support for PDF graphics based on pax.sty adapted by (UF)]%
+ [2023-11-08 v0.55 Annotation support for PDF graphics based on pax.sty adapted by (UF)]%
\ExplSyntaxOn
\IfDocumentMetadataTF
{}
More information about the tex-live-commits
mailing list.