[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop, test-new-or-change: remove pdflscape and transparent firstaid and replace by version check (e08e255)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sat Oct 29 12:34:05 CEST 2022
Repository : https://github.com/latex3/pdfresources
On branches: develop,test-new-or-change
Link : https://github.com/latex3/pdfresources/commit/e08e2554e7503669d7aa21d3a936f4b827a6b164
>---------------------------------------------------------------
commit e08e2554e7503669d7aa21d3a936f4b827a6b164
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sat Oct 29 12:34:05 2022 +0200
remove pdflscape and transparent firstaid and replace by version check
>---------------------------------------------------------------
e08e2554e7503669d7aa21d3a936f4b827a6b164
firstaid/pdflscape-ltx.sty | 54 --------------------------------------------
firstaid/transparent-ltx.sty | 26 ---------------------
pdfmanagement-firstaid.dtx | 27 ++++++++++++++++++----
3 files changed, 23 insertions(+), 84 deletions(-)
diff --git a/firstaid/pdflscape-ltx.sty b/firstaid/pdflscape-ltx.sty
deleted file mode 100644
index 2ae273e..0000000
--- a/firstaid/pdflscape-ltx.sty
+++ /dev/null
@@ -1,54 +0,0 @@
-%%
-%% This is file `pdflscape-ltx.sty',
-%%
-%% Copyright (C) 2021 The LaTeX Project
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either
-%% version 1.3c of this license or (at your option) any later
-%% version. This version of this license is in
-%% https://www.latex-project.org/lppl/lppl-1-3c.txt
-%% and the latest version of this license is in
-%% https://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
-%%
-%% This work has the LPPL maintenance status "maintained".
-%%
-%% The Current Maintainers of this work are
-%% The LaTeX Project
-%%
-%%
-%% This work consists of the main source file pdflscape-ltx.sty
-%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{pdflscape-ltx}{2022-09-26}{0.95s}
- {Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)}
-
-\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
-\ProcessOptions
-\RequirePackage{lscape}
-% this always turns in the same direction as pdflscape does too.
-% left and right would need
-% \pdfmanagement_add:nnn{ThisPage}{Rotate}{..}
-% on every page (e.g. in a shipout hook) and some option to control the wanted
-% orientation.
-
-\tl_new:N\g__pdflscape_saverotate_tl
-\hook_gput_code:nnn {env/landscape/begin}{pdflscape}
- {
- \pdfmanagement_get:nnN {Page}{Rotate}\l_tmpa_tl
- \tl_gset_eq:NN\g__pdflscape_saverotate_tl\l_tmpa_tl
- \clearpage
- \pdfmanagement_add:nnn{Page}{Rotate}{90}
- }
-\hook_gput_code:nnn {env/landscape/after}{pdflscape}
- {
- \quark_if_no_value:NTF\g__pdflscape_saverotate_tl
- {\pdfmanagement_remove:nn{Page}{Rotate}}
- {\pdfmanagement_add:nnx{Page}{Rotate}{\g__pdflscape_saverotate_tl}}
- }
-
-\endinput
-%%
-%% End of file `pdflscape-ltx.sty'.
diff --git a/firstaid/transparent-ltx.sty b/firstaid/transparent-ltx.sty
deleted file mode 100644
index 3207231..0000000
--- a/firstaid/transparent-ltx.sty
+++ /dev/null
@@ -1,26 +0,0 @@
-%%
-%% This is file `transparent-ltx.sty',
-%% a replacement for transparent sty from Heiko Oberdiek
-%%
-\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{transparent-ltx}{2022-09-26}{0.95s}
- {Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}%
-
-\RequirePackage{l3opacity}
-
-\NewDocumentCommand{\transparent} { m }
- {
- \opacity_select:n{\fp_eval:n{ min(max(0,#1),1) } }
- }
-
-\NewDocumentCommand{\texttransparent}{m m}
- {
- \mode_leave_vertical:
- \group_begin:
- \transparent{#1}
- #2
- \group_end:
- }
-
-
-\endinput
diff --git a/pdfmanagement-firstaid.dtx b/pdfmanagement-firstaid.dtx
index e7d4450..972fb4e 100644
--- a/pdfmanagement-firstaid.dtx
+++ b/pdfmanagement-firstaid.dtx
@@ -86,6 +86,9 @@
\msg_new:nnn { pdfmanagement } { firstaid-disabled }
{ The~loading~of~package~#1~is~disabled.\\
It~is~not~compatible~with~the~PDF~management. }
+\msg_new:nnn { pdfmanagement } { firstaid-too-old }
+ { Package~#1~is~too~old~and~not~compatible.\\
+ Get~at~least~version~#2.}
% \end{macrocode}
% \subsection{Fontspec}
@@ -296,19 +299,35 @@
% \end{macrocode}
% \subsection{\pkg{transparent}}
-% We simply replace by the new version.
+% We check if the new version is used and issue a warning otherwise
% \begin{macrocode}
\bool_if:NT \g_@@_firstaid_transparent_bool
{
- \declare at file@substitution{transparent.sty}{transparent-ltx.sty}
+ \AddToHook{package/transparent/after}
+ {
+ \@ifpackagelater{transparent}{2022-10-27}{}
+ {
+ \msg_warning:nnnn{pdfmanagement}{firstaid-too-old}
+ {transparent}
+ {1.5~from~2022-10-27}
+ }
+ }
}
% \end{macrocode}
% \subsection{\pkg{pdflscape}}
-% We simply replace by the new version.
+% We check if the new version is used and issue a warning otherwise
% \begin{macrocode}
\bool_if:NT \g_@@_firstaid_pdflscape_bool
{
- \declare at file@substitution{pdflscape.sty}{pdflscape-ltx.sty}
+ \AddToHook{package/pdflscape/after}
+ {
+ \@ifpackagelater{pdflscape}{2022-10-27}{}
+ {
+ \msg_warning:nnnn{pdfmanagement}{firstaid-too-old}
+ {pdflscape}
+ {0.13~from~2022-10-27}
+ }
+ }
}
% \end{macrocode}
%
More information about the latex3-commits
mailing list.