texlive[64347] Master/texmf-dist: newpax (11sep22)
commits+karl at tug.org
commits+karl at tug.org
Sun Sep 11 22:45:55 CEST 2022
Revision: 64347
http://tug.org/svn/texlive?view=revision&revision=64347
Author: karl
Date: 2022-09-11 22:45:55 +0200 (Sun, 11 Sep 2022)
Log Message:
-----------
newpax (11sep22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/newpax/doc-input1.pdf
trunk/Master/texmf-dist/doc/latex/newpax/doc-input1.tex
trunk/Master/texmf-dist/doc/latex/newpax/doc-input2.pdf
trunk/Master/texmf-dist/doc/latex/newpax/doc-input2.tex
trunk/Master/texmf-dist/doc/latex/newpax/doc-use-newpax.pdf
trunk/Master/texmf-dist/doc/latex/newpax/doc-use-newpax.tex
trunk/Master/texmf-dist/doc/latex/newpax/doc-use-pax.pdf
trunk/Master/texmf-dist/doc/latex/newpax/doc-use-pax.tex
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/source/latex/newpax/newpax.ins
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/doc-input1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-input1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/newpax/doc-input1.tex 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/doc/latex/newpax/doc-input1.tex 2022-09-11 20:45:55 UTC (rev 64347)
@@ -1,5 +1,6 @@
% !Mode:: "TeX:UTF-8:Main"
-\DocumentMetadata{uncompress}
+\RequirePackage{pdfmanagement-testphase}
+\DeclareDocumentMetadata{uncompress}
\documentclass{article}
\usepackage{hyperref}
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-input2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-input2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/newpax/doc-input2.tex 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/doc/latex/newpax/doc-input2.tex 2022-09-11 20:45:55 UTC (rev 64347)
@@ -1,5 +1,6 @@
% !Mode:: "TeX:UTF-8:Main"
-\DocumentMetadata{uncompress}
+\RequirePackage{pdfmanagement-testphase}
+\DeclareDocumentMetadata{uncompress}
\documentclass{article}
\usepackage{hyperref}
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-newpax.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/newpax/doc-use-newpax.tex 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/doc/latex/newpax/doc-use-newpax.tex 2022-09-11 20:45:55 UTC (rev 64347)
@@ -1,7 +1,7 @@
% !Mode:: "TeX:UTF-8:Main"
-% The next command needs LaTeX 2022-06-01, for older formats see documentation
-% of pdfmanagement-testphase
-\DocumentMetadata{uncompress}
+
+\RequirePackage{pdfmanagement-testphase}
+\DeclareDocumentMetadata{uncompress}
\documentclass{article}
\usepackage{pdfpages,xcolor}
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-use-pax.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/newpax/doc-use-pax.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/newpax/doc-use-pax.tex 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/doc/latex/newpax/doc-use-pax.tex 2022-09-11 20:45:55 UTC (rev 64347)
@@ -16,10 +16,6 @@
%correct a bug in pax affecting clipping
\makeatletter
\patchcmd\PAX at pdf@annot{\PAX at pagellx}{\PAX at page@llx}{}{\fail}
-%allow hashes and percent in the pax file
-\patchcmd\PAX at AddAnnots{\InputIfFileExists\PAX at file{}{\typeout{* Missing: \PAX at file}}}
- {\begingroup \catcode`\#=12 \catcode`\%=12
- \InputIfFileExists\PAX at file{}{\typeout{* Missing: \PAX at file}}\endgroup}{}{\fail}
\makeatother
\begin{document}
\includegraphics[scale=0.5,trim=5cm 15cm 8cm 3cm,clip,page=2]{doc-input1}
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 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/doc/latex/newpax/newpax.tex 2022-09-11 20:45:55 UTC (rev 64347)
@@ -1,9 +1,10 @@
% !Mode:: "TeX:UTF-8:Main"
\makeatletter
\def\UlrikeFischer at package@version{0.52}
-\def\UlrikeFischer at package@date{2022-06-27}
+\def\UlrikeFischer at package@date{2022-09-11}
\makeatother
-\DocumentMetadata{pdfversion=1.7,lang=en-UK, uncompress}
+\RequirePackage{pdfmanagement-testphase}
+\DeclareDocumentMetadata{pdfversion=1.7,lang=en-UK, uncompress}
\documentclass[DIV=12,parskip=half-,bibliography=totoc]{scrartcl}
\usepackage{scrlayer-scrpage}
@@ -52,7 +53,7 @@
The action of such an annotation can be an external URL, but also an internal destination.
Such destination are objects describing a page and some instructions how to display the page---again using absolute coordinates.
-When a PDF is included in another PDF---may it be with \cs{includegraphics} or with \cs{includepdf}\hspace{0pt}---\hspace{0pt}the annotation coordinates no longer make sense as they don't refer to the receiving page (and often the action of an annotation doesn't make sense either), so all TeX-engines and backends strip them away when including a PDF: the net effect is that external and internal links are lost.
+When a PDF is included in another PDF---may it be with \cs{includegraphics} or with \cs{includepdf}--the annotation coordinates no longer make sense as they don't refer to the receiving page (and often the action of an annotation doesn't make sense either), so all TeX-engines and backends strip them away when including a PDF: the net effect is that external and internal links are lost.
The \pkg{pax} package from Heiko Oberdiek offers a solution for this problem: it extracts all the annotations
and destinations of the included PDF in a text file, does some clever recalculations of their coordinates and reinserts them.
@@ -208,12 +209,11 @@
\item This works with pdflatex and lualatex. lualatex needs the extra code demonstrated in the document.
\item It needs two or three compilations until every reference is correct.
\item There is a small typo in \pkg{pax.sty} which affects clipping, the patch shown in the listing correct this.
-\item In some cases the catcode of \# and \% must be set to letter to avoid errors.
\item Don't include PDFs with destinations twice as this will lead to duplicate destinations and pdflatex will complain.
\item If annotations should not be reinserted remove the \texttt{.pax}-file.
\item If \pkg{hyperref} is loaded you can change the color and style of link borders with hyperref options.
\end{itemize}
-\enlargethispage{\baselineskip}
-\lstinputlisting[firstline=2,caption=doc-use-pax.tex,escapechar={}]{doc-use-pax.tex}
+\lstinputlisting[firstline=2,caption=doc-use-pax.tex]{doc-use-pax.tex}
+
\end{document}
Modified: trunk/Master/texmf-dist/source/latex/newpax/newpax.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/newpax/newpax.dtx 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/source/latex/newpax/newpax.dtx 2022-09-11 20:45:55 UTC (rev 64347)
@@ -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 @@
-- 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 @@
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 @@
return a
end
-
local function outputKV_goto (count)
local a = strKV_BEG .. constKEY_DEST_LABEL .. strVALUE_BEG .. count .. strVALUE_END .. strKV_END
return a
Modified: trunk/Master/texmf-dist/source/latex/newpax/newpax.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/newpax/newpax.ins 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/source/latex/newpax/newpax.ins 2022-09-11 20:45:55 UTC (rev 64347)
@@ -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 @@
\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
Modified: trunk/Master/texmf-dist/tex/latex/newpax/newpax.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newpax/newpax.lua 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/tex/latex/newpax/newpax.lua 2022-09-11 20:45:55 UTC (rev 64347)
@@ -6,7 +6,7 @@
--
-- newpax.dtx (with options: `lua')
--
--- 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
@@ -21,7 +21,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"
}
@@ -206,7 +206,7 @@
-- 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
@@ -341,48 +341,24 @@
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
Modified: trunk/Master/texmf-dist/tex/latex/newpax/newpax.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newpax/newpax.sty 2022-09-11 20:45:39 UTC (rev 64346)
+++ trunk/Master/texmf-dist/tex/latex/newpax/newpax.sty 2022-09-11 20:45:55 UTC (rev 64347)
@@ -6,7 +6,7 @@
%%
%% newpax.dtx (with options: `package')
%%
-%% 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
@@ -20,7 +20,7 @@
%%
\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
{
More information about the tex-live-commits
mailing list.