texlive[64852] Master: transparent (29oct22)

commits+karl at tug.org commits+karl at tug.org
Sat Oct 29 21:52:26 CEST 2022


Revision: 64852
          http://tug.org/svn/texlive?view=revision&revision=64852
Author:   karl
Date:     2022-10-29 21:52:26 +0200 (Sat, 29 Oct 2022)
Log Message:
-----------
transparent (29oct22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/transparent/README.md
    trunk/Master/texmf-dist/doc/latex/transparent/transparent-example.tex
    trunk/Master/texmf-dist/doc/latex/transparent/transparent.pdf
    trunk/Master/texmf-dist/source/latex/transparent/transparent.dtx
    trunk/Master/texmf-dist/tex/latex/transparent/transparent.sty
    trunk/Master/tlpkg/libexec/ctan2tds

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/transparent/transparent-nometadata.sty

Modified: trunk/Master/texmf-dist/doc/latex/transparent/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/transparent/README.md	2022-10-29 19:49:11 UTC (rev 64851)
+++ trunk/Master/texmf-dist/doc/latex/transparent/README.md	2022-10-29 19:52:26 UTC (rev 64852)
@@ -1,8 +1,21 @@
-# transparent
+# transparent package for LaTeX
 
-transparent package for LaTeX
+Version: 2022-10-27 v1.5
 
-Since version 1.40 pdfTeX supports several color stacks. This
+pdfTeX and luatex supports several color stacks. This
 package shows, how a separate color stack can be used for transparency,
-a property besides color.
+a property besides color, that works across page breaks.
 
+If the PDF management is used it can also be used with other engines 
+but without support for page breaks.
+
+% Copyright (C)
+%    2007 Heiko Oberdiek
+%    2016-2022 Oberdiek Package Support Group
+%    https://github.com/ho-tex/transparent/issues
+
+
+## License
+LATEX Project Public License, version 1.3c or later.
+
+

Modified: trunk/Master/texmf-dist/doc/latex/transparent/transparent-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/transparent/transparent-example.tex	2022-10-29 19:49:11 UTC (rev 64851)
+++ trunk/Master/texmf-dist/doc/latex/transparent/transparent-example.tex	2022-10-29 19:52:26 UTC (rev 64852)
@@ -9,11 +9,11 @@
 %% This is a generated file.
 %% 
 %% Project: transparent
-%% Version: 2019/11/29 v1.4
+%% Version: 2022-10-27 v1.5
 %% 
 %% Copyright (C)
 %%    2007 Heiko Oberdiek
-%%    2016-2019 Oberdiek Package Support Group
+%%    2016-2022 Oberdiek Package Support Group
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either
@@ -31,11 +31,10 @@
 %% Heiko Oberdiek and the Oberdiek Package Support Group
 %% https://github.com/ho-tex/transparent/issues
 %% 
-%% 
 %% This work consists of the main source file transparent.dtx
 %% and the derived files
-%%    transparent.sty, transparent.pdf, transparent.ins, transparent.drv,
-%%    transparent-example.tex.
+%%    transparent.sty, transparent-nometadata.sty, transparent.pdf,
+%%    transparent.ins, transparent.drv, transparent-example.tex.
 %% 
 \documentclass[12pt]{article}
 

Modified: trunk/Master/texmf-dist/doc/latex/transparent/transparent.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/transparent/transparent.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/transparent/transparent.dtx	2022-10-29 19:49:11 UTC (rev 64851)
+++ trunk/Master/texmf-dist/source/latex/transparent/transparent.dtx	2022-10-29 19:52:26 UTC (rev 64852)
@@ -1,12 +1,12 @@
 % \iffalse meta-comment
 %
 % File: transparent.dtx
-% Version: 2019/11/29 v1.4
+% Version: 2022-10-27 v1.5
 % Info: Transparency via pdfTeX's color stack
 %
 % Copyright (C)
 %    2007 Heiko Oberdiek
-%    2016-2019 Oberdiek Package Support Group 2018
+%    2016-2022 Oberdiek Package Support Group 2018
 %    https://github.com/ho-tex/transparent/issues
 %
 % This work may be distributed and/or modified under the
@@ -27,8 +27,8 @@
 %
 % This work consists of the main source file transparent.dtx
 % and the derived files
-%    transparent.sty, transparent.pdf, transparent.ins, transparent.drv,
-%    transparent-example.tex.
+%    transparent.sty, transparent-nometadata.sty, transparent.pdf, 
+%    transparent.ins, transparent.drv, transparent-example.tex.
 %
 % Distribution:
 %    CTAN:macros/latex/contrib/transparent/transparent.dtx
@@ -62,6 +62,7 @@
 %
 % Installation:
 %    TDS:tex/latex/transparent/transparent.sty
+%    TDS:tex/latex/transparent/transparent-nometadata.sty
 %    TDS:doc/latex/transparent/transparent.pdf
 %    TDS:source/latex/transparent/transparent.dtx
 %
@@ -80,7 +81,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: transparent 2019/11/29 v1.4 Transparency via pdfTeX's color stack (HO)}
+\Msg{* Package: transparent 2022-10-27 v1.5 Transparency via pdfTeX's color stack (HO)}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -92,11 +93,11 @@
 This is a generated file.
 
 Project: transparent
-Version: 2019/11/29 v1.4
+Version: 2022-10-27 v1.5
 
 Copyright (C)
    2007 Heiko Oberdiek
-   2016-2019 Oberdiek Package Support Group
+   2016-2022 Oberdiek Package Support Group
 
 This work may be distributed and/or modified under the
 conditions of the LaTeX Project Public License, either
@@ -117,8 +118,8 @@
 
 This work consists of the main source file transparent.dtx
 and the derived files
-   transparent.sty, transparent.pdf, transparent.ins, transparent.drv,
-   transparent-example.tex.
+   transparent.sty, transparent-nometadata.sty, transparent.pdf,
+   transparent.ins, transparent.drv, transparent-example.tex.
 
 \endpreamble
 \let\MetaPrefix\DoubleperCent
@@ -127,13 +128,10 @@
   \file{transparent.ins}{\from{transparent.dtx}{install}}%
   \file{transparent.drv}{\from{transparent.dtx}{driver}}%
   \usedir{tex/latex/transparent}%
-  \file{transparent.sty}{\from{transparent.dtx}{package}}%
+  \file{transparent-nometadata.sty}{\from{transparent.dtx}{package}}%
+  \file{transparent.sty}{\from{transparent.dtx}{package-new}}%
   \usedir{doc/latex/transparent}%
   \file{transparent-example.tex}{\from{transparent.dtx}{example}}%
-  \nopreamble
-  \nopostamble
-%  \usedir{source/latex/transparent/catalogue}%
-%  \file{transparent.xml}{\from{transparent.dtx}{catalogue}}%
 }
 
 \catcode32=13\relax% active space
@@ -144,6 +142,7 @@
 \Msg{* file into a directory searched by TeX:}
 \Msg{*}
 \Msg{*     transparent.sty}
+\Msg{*     transparent-nometadata.sty}
 \Msg{*}
 \Msg{* To produce the documentation run the file `transparent.drv'}
 \Msg{* through LaTeX.}
@@ -160,7 +159,7 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{transparent.drv}%
-  [2019/11/29 v1.4 Transparency via pdfTeX's color stack (HO)]%
+  [2022-10-27 v1.5 Transparency via pdfTeX's color stack (HO)]%
 \documentclass{ltxdoc}
 \usepackage{holtxdoc}[2011/11/22]
 \begin{document}
@@ -170,26 +169,11 @@
 % \fi
 %
 %
-% \CharacterTable
-%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%   Digits        \0\1\2\3\4\5\6\7\8\9
-%   Exclamation   \!     Double quote  \"     Hash (number) \#
-%   Dollar        \$     Percent       \%     Ampersand     \&
-%   Acute accent  \'     Left paren    \(     Right paren   \)
-%   Asterisk      \*     Plus          \+     Comma         \,
-%   Minus         \-     Point         \.     Solidus       \/
-%   Colon         \:     Semicolon     \;     Less than     \<
-%   Equals        \=     Greater than  \>     Question mark \?
-%   Commercial at \@     Left bracket  \[     Backslash     \\
-%   Right bracket \]     Circumflex    \^     Underscore    \_
-%   Grave accent  \`     Left brace    \{     Vertical bar  \|
-%   Right brace   \}     Tilde         \~}
 %
 % \GetFileInfo{transparent.drv}
 %
 % \title{The \xpackage{transparent} package}
-% \date{2019/11/29 v1.4}
+% \date{2022-10-27 v1.5}
 % \author{Heiko Oberdiek\thanks
 % {Please report any issues at \url{https://github.com/ho-tex/transparent/issues}}}
 %
@@ -196,9 +180,9 @@
 % \maketitle
 %
 % \begin{abstract}
-% Since version 1.40 \pdfTeX\ supports several color stacks. This
+% \pdfTeX\ and lua\TeX{} supports several color stacks. This
 % package shows, how a separate color stack can be used for transparency,
-% a property besides color.
+% a property besides color, that also works across page break.
 % \end{abstract}
 %
 % \tableofcontents
@@ -207,12 +191,23 @@
 %
 % The package \xpackage{transparent} defines \cs{transparent} and
 % \cs{texttransparent}. They are used like \cs{color} and \cs{textcolor}.
-% The first argument is the transparency value between 0 and 1.
+% The first argument is the transparency value between 0 and 1 where 0
+% is fully transparent and 1 is opaque.
+% 
+% \section{Engine support}
+% If the PDF management is loaded by using \verb+\DocumentMetadata{}+ at the beginning
+% of the document the package makes use of \texttt{l3opacity} and
+% can be used with all engines supported by \texttt{l3backend}.
+% But only with \pdfTeX\ and lua\TeX{} the transparency will also work across page break.
+% 
+% 
+% Without the PDF management, the package works only with \pdfTeX\ and lua\TeX{}.
+% It then uses the original code by Heiko Oberdiek. It then uses the
+% primitive \cs{pdfpageresources} and can clash with other packages that also use
+% \cs{pdfpageresources}.
+% 
 %
-% Because of the poor interface for page resources, there can be problems
-% with packages that also use \cs{pdfpageresources}.
-%
-% Example for usage:
+% \section{Example for usage}
 %    \begin{macrocode}
 %<*example>
 \documentclass[12pt]{article}
@@ -241,14 +236,47 @@
 % }
 %
 % \section{Implementation}
-%
-% \subsection{Identification}
-%
+% \subsection{New version using the methods of the PDF management} 
+% Identification
 %    \begin{macrocode}
+%<*package-new>
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+\ProvidesExplPackage{transparent}{2022-10-27}{1.5}
+  {Transparency with color stacks}%
+%    \end{macrocode}
+% Testing if the pdfmanagement is used
+%    \begin{macrocode}
+\@ifl at t@r\fmtversion{2022-06-01}
+  {
+    \IfDocumentMetadataTF {}{\RequirePackage{transparent-nometadata}}
+    \IfDocumentMetadataTF {}{\endinput}
+  }
+  {\RequirePackage{transparent-nometadata}}  
+%    \end{macrocode}
+%    \begin{macrocode}
+\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:
+  }
+%</package-new>
+%    \end{macrocode}
+% \subsection{Old version without the PDF management}
+%    \begin{macrocode}
 %<*package>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{transparent}%
-  [2019/11/29 v1.4 Transparency via pdfTeX's color stack (HO)]%
+\ProvidesPackage{transparent-nometadata}%
+  [2022-10-27 v1.5 Transparency via pdfTeX's color stack (HO)]%
 %    \end{macrocode}
 %
 % \subsection{Initial checks}
@@ -432,26 +460,7 @@
 % \end{description}
 %
 %
-% \paragraph{Bundle.} All the packages of the bundle `transparent'
-% are also available in a TDS compliant ZIP archive. There
-% the packages are already unpacked and the documentation files
-% are generated. The files and directories obey the TDS standard.
-% \begin{description}
-% \item[\CTANinstall{install/macros/latex/contrib/transparent.tds.zip}]
-% \end{description}
-% \emph{TDS} refers to the standard ``A Directory Structure
-% for \TeX\ Files'' (\CTANpkg{tds}). Directories
-% with \xfile{texmf} in their name are usually organized this way.
 %
-% \subsection{Bundle installation}
-%
-% \paragraph{Unpacking.} Unpack the \xfile{transparent.tds.zip} in the
-% TDS tree (also known as \xfile{texmf} tree) of your choice.
-% Example (linux):
-% \begin{quote}
-%   |unzip transparent.tds.zip -d ~/texmf|
-% \end{quote}
-%
 % \subsection{Package installation}
 %
 % \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
@@ -468,6 +477,7 @@
 % \def\t{^^A
 % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
 %   transparent.sty & tex/latex/transparent/transparent.sty\\
+%   transparent-nometadata.sty & tex/latex/transparent/transparent-nometadata.sty\\   
 %   transparent.pdf & doc/latex/transparent/transparent.pdf\\
 %   transparent-example.tex & doc/latex/transparent/transparent-example.tex\\
 %   transparent.dtx & source/latex/transparent/transparent.dtx\\
@@ -603,6 +613,9 @@
 % \item
 % Use \xpackage{iftex} package.
 %   \end{Version}
+%   \begin{Version}{2022-10-27 v1.5}
+%   \item Made the package compatible with the PDF management.
+%   \end{Version}
 % \end{History}
 %
 % \PrintIndex

Added: trunk/Master/texmf-dist/tex/latex/transparent/transparent-nometadata.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/transparent/transparent-nometadata.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/transparent/transparent-nometadata.sty	2022-10-29 19:52:26 UTC (rev 64852)
@@ -0,0 +1,165 @@
+%%
+%% This is file `transparent-nometadata.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% transparent.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Project: transparent
+%% Version: 2022-10-27 v1.5
+%% 
+%% Copyright (C)
+%%    2007 Heiko Oberdiek
+%%    2016-2022 Oberdiek Package Support Group
+%% 
+%% 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
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/transparent/issues
+%% 
+%% This work consists of the main source file transparent.dtx
+%% and the derived files
+%%    transparent.sty, transparent-nometadata.sty, transparent.pdf,
+%%    transparent.ins, transparent.drv, transparent-example.tex.
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{transparent-nometadata}%
+  [2022-10-27 v1.5 Transparency via pdfTeX's color stack (HO)]%
+\RequirePackage{iftex}
+\ifpdf
+\else
+  \PackageWarningNoLine{transparent}{%
+    Loading aborted, because pdfTeX is not running in PDF mode%
+  }%
+  \expandafter\endinput
+\fi
+\ifx\pdfextension\@undefined
+  \let\TRP at pdfcolorstackinit\pdfcolorstackinit
+  \let\TRP at pdfpageresources\pdfpageresources
+  \let\TRP at pdfcolorstack\pdfcolorstack
+\else
+  \def\TRP at pdfcolorstackinit           {\pdffeedback colorstackinit}
+  \protected\edef\TRP at pdfpageresources {\pdfvariable pageresources}
+  \protected\def\TRP at pdfcolorstack     {\pdfextension colorstack}
+\fi
+\ifcsname TRP at pdfcolorstackinit\endcsname\else
+  \PackageWarningNoLine{transparent}{%
+    Your pdfTeX version does not support color stacks%
+  }%
+  \expandafter\endinput
+\fi
+\AtBeginDocument
+ {%
+   \ifcsname pgfutil at addpdfresource@extgs\endcsname
+    \let\TRP at addresource\relax
+    \pgfutil at addpdfresource@extgs{\TRP at list}%
+   \fi
+ }
+\RequirePackage{auxhook}
+\AddLineBeginAux{%
+  \string\providecommand{\string\transparent at use}[1]{}%
+}
+\gdef\TRP at list{/TRP1<</ca 1/CA 1>>}
+\def\transparent at use#1{%
+  \@ifundefined{TRP#1}{%
+    \g at addto@macro\TRP at list{%
+      /TRP#1<</ca #1/CA #1>>%
+    }%
+    \expandafter\gdef\csname TRP#1\endcsname{/TRP#1 gs}%
+  }{%
+    % #1 is already known, nothing to do
+  }%
+}
+\AtBeginDocument{%
+  \TRP at addresource
+  \let\transparent at use\@gobble
+}
+\def\TRP at addresource{%
+  \begingroup
+    \edef\x{\endgroup
+      \TRP at pdfpageresources{%
+        \the\TRP at pdfpageresources
+        /ExtGState<<\TRP at list>>%
+      }%
+    }%
+  \x
+}
+\newif\ifTRP at rerun
+\xdef\TRP at colorstack{%
+  \TRP at pdfcolorstackinit page direct{/TRP1 gs}%
+}
+\newcommand*{\transparent}[1]{%
+  \begingroup
+    \dimen@=#1\p@\relax
+    \ifdim\dimen@>\p@
+      \dimen@=\p@
+    \fi
+    \ifdim\dimen@<\z@
+      \dimen@=\z@
+    \fi
+    \ifdim\dimen@=\p@
+      \def\x{1}%
+    \else
+      \ifdim\dimen@=\z@
+        \def\x{0}%
+      \else
+        \edef\x{\strip at pt\dimen@}%
+        \edef\x{\expandafter\@gobble\x}%
+      \fi
+    \fi
+    \if at filesw
+      \immediate\write\@auxout{%
+        \string\transparent at use{\x}%
+      }%
+    \fi
+    \edef\x{\endgroup
+      \def\noexpand\transparent at current{\x}%
+    }%
+  \x
+  \transparent at set
+}
+\AtEndDocument{%
+  \ifTRP at rerun
+    \PackageWarningNoLine{transparent}{%
+      Rerun to get transparencies right%
+    }%
+  \fi
+}
+\def\transparent at current{/TRP1 gs}
+\def\transparent at set{%
+  \@ifundefined{TRP\transparent at current}{%
+    \global\TRP at reruntrue
+  }{%
+    \TRP at pdfcolorstack\TRP at colorstack push{%
+      \csname TRP\transparent at current\endcsname
+    }%
+    \aftergroup\transparent at reset
+  }%
+}
+\def\transparent at reset{%
+  \TRP at pdfcolorstack\TRP at colorstack pop\relax
+}
+\newcommand*{\texttransparent}[2]{%
+  \protect\leavevmode
+  \begingroup
+    \transparent{#1}%
+    #2%
+  \endgroup
+}
+\endinput
+%%
+%% End of file `transparent-nometadata.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/transparent/transparent-nometadata.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/transparent/transparent.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/transparent/transparent.sty	2022-10-29 19:49:11 UTC (rev 64851)
+++ trunk/Master/texmf-dist/tex/latex/transparent/transparent.sty	2022-10-29 19:52:26 UTC (rev 64852)
@@ -4,16 +4,16 @@
 %%
 %% The original source files were:
 %%
-%% transparent.dtx  (with options: `package')
+%% transparent.dtx  (with options: `package-new')
 %% 
 %% This is a generated file.
 %% 
 %% Project: transparent
-%% Version: 2019/11/29 v1.4
+%% Version: 2022-10-27 v1.5
 %% 
 %% Copyright (C)
 %%    2007 Heiko Oberdiek
-%%    2016-2019 Oberdiek Package Support Group
+%%    2016-2022 Oberdiek Package Support Group
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either
@@ -31,136 +31,35 @@
 %% Heiko Oberdiek and the Oberdiek Package Support Group
 %% https://github.com/ho-tex/transparent/issues
 %% 
-%% 
 %% This work consists of the main source file transparent.dtx
 %% and the derived files
-%%    transparent.sty, transparent.pdf, transparent.ins, transparent.drv,
-%%    transparent-example.tex.
+%%    transparent.sty, transparent-nometadata.sty, transparent.pdf,
+%%    transparent.ins, transparent.drv, transparent-example.tex.
 %% 
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{transparent}%
-  [2019/11/29 v1.4 Transparency via pdfTeX's color stack (HO)]%
-\RequirePackage{iftex}
-\ifpdf
-\else
-  \PackageWarningNoLine{transparent}{%
-    Loading aborted, because pdfTeX is not running in PDF mode%
-  }%
-  \expandafter\endinput
-\fi
-\ifx\pdfextension\@undefined
-  \let\TRP at pdfcolorstackinit\pdfcolorstackinit
-  \let\TRP at pdfpageresources\pdfpageresources
-  \let\TRP at pdfcolorstack\pdfcolorstack
-\else
-  \def\TRP at pdfcolorstackinit           {\pdffeedback colorstackinit}
-  \protected\edef\TRP at pdfpageresources {\pdfvariable pageresources}
-  \protected\def\TRP at pdfcolorstack     {\pdfextension colorstack}
-\fi
-\ifcsname TRP at pdfcolorstackinit\endcsname\else
-  \PackageWarningNoLine{transparent}{%
-    Your pdfTeX version does not support color stacks%
-  }%
-  \expandafter\endinput
-\fi
-\AtBeginDocument
- {%
-   \ifcsname pgfutil at addpdfresource@extgs\endcsname
-    \let\TRP at addresource\relax
-    \pgfutil at addpdfresource@extgs{\TRP at list}%
-   \fi
- }
-\RequirePackage{auxhook}
-\AddLineBeginAux{%
-  \string\providecommand{\string\transparent at use}[1]{}%
-}
-\gdef\TRP at list{/TRP1<</ca 1/CA 1>>}
-\def\transparent at use#1{%
-  \@ifundefined{TRP#1}{%
-    \g at addto@macro\TRP at list{%
-      /TRP#1<</ca #1/CA #1>>%
-    }%
-    \expandafter\gdef\csname TRP#1\endcsname{/TRP#1 gs}%
-  }{%
-    % #1 is already known, nothing to do
-  }%
-}
-\AtBeginDocument{%
-  \TRP at addresource
-  \let\transparent at use\@gobble
-}
-\def\TRP at addresource{%
-  \begingroup
-    \edef\x{\endgroup
-      \TRP at pdfpageresources{%
-        \the\TRP at pdfpageresources
-        /ExtGState<<\TRP at list>>%
-      }%
-    }%
-  \x
-}
-\newif\ifTRP at rerun
-\xdef\TRP at colorstack{%
-  \TRP at pdfcolorstackinit page direct{/TRP1 gs}%
-}
-\newcommand*{\transparent}[1]{%
-  \begingroup
-    \dimen@=#1\p@\relax
-    \ifdim\dimen@>\p@
-      \dimen@=\p@
-    \fi
-    \ifdim\dimen@<\z@
-      \dimen@=\z@
-    \fi
-    \ifdim\dimen@=\p@
-      \def\x{1}%
-    \else
-      \ifdim\dimen@=\z@
-        \def\x{0}%
-      \else
-        \edef\x{\strip at pt\dimen@}%
-        \edef\x{\expandafter\@gobble\x}%
-      \fi
-    \fi
-    \if at filesw
-      \immediate\write\@auxout{%
-        \string\transparent at use{\x}%
-      }%
-    \fi
-    \edef\x{\endgroup
-      \def\noexpand\transparent at current{\x}%
-    }%
-  \x
-  \transparent at set
-}
-\AtEndDocument{%
-  \ifTRP at rerun
-    \PackageWarningNoLine{transparent}{%
-      Rerun to get transparencies right%
-    }%
-  \fi
-}
-\def\transparent at current{/TRP1 gs}
-\def\transparent at set{%
-  \@ifundefined{TRP\transparent at current}{%
-    \global\TRP at reruntrue
-  }{%
-    \TRP at pdfcolorstack\TRP at colorstack push{%
-      \csname TRP\transparent at current\endcsname
-    }%
-    \aftergroup\transparent at reset
-  }%
-}
-\def\transparent at reset{%
-  \TRP at pdfcolorstack\TRP at colorstack pop\relax
-}
-\newcommand*{\texttransparent}[2]{%
-  \protect\leavevmode
-  \begingroup
-    \transparent{#1}%
-    #2%
-  \endgroup
-}
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+\ProvidesExplPackage{transparent}{2022-10-27}{1.5}
+  {Transparency with color stacks}%
+\@ifl at t@r\fmtversion{2022-06-01}
+  {
+    \IfDocumentMetadataTF {}{\RequirePackage{transparent-nometadata}}
+    \IfDocumentMetadataTF {}{\endinput}
+  }
+  {\RequirePackage{transparent-nometadata}}
+\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
 %%
 %% End of file `transparent.sty'.

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2022-10-29 19:49:11 UTC (rev 64851)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2022-10-29 19:52:26 UTC (rev 64852)
@@ -3211,6 +3211,7 @@
  'tikz-page'	=> 'tex -8bit',    # no doc remake, 8-bit name
  'tikzmark'	=> 'tex',
  'todonotes'    => 'latex',  # requires interaction
+ 'transparent'	=> 'etex',
  'tudscr'       => 'tex',
  'uadocs'       => 'latex',  # requires interaction
  'undolabl'     => 'tex',



More information about the tex-live-commits mailing list.