summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-07 21:26:42 +0000
committerKarl Berry <karl@freefriends.org>2024-01-07 21:26:42 +0000
commit20b51efbc819f03c784d23252578ceedd707e15a (patch)
treeafd9038333967dff8643f02d9ca67af30a8449cc
parent5eb5c2bd75077417694f9ca3e361d48456d5aec5 (diff)
overpic (6jan24)
git-svn-id: svn://tug.org/texlive/trunk@69335 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/overpic/overpic.pdfbin404377 -> 405917 bytes
-rw-r--r--Master/texmf-dist/source/latex/overpic/overpic.dtx33
-rw-r--r--Master/texmf-dist/tex/latex/overpic/overpic.sty26
3 files changed, 48 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/overpic/overpic.pdf b/Master/texmf-dist/doc/latex/overpic/overpic.pdf
index 0fca353cfc8..6d9fd2c03ef 100644
--- a/Master/texmf-dist/doc/latex/overpic/overpic.pdf
+++ b/Master/texmf-dist/doc/latex/overpic/overpic.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/overpic/overpic.dtx b/Master/texmf-dist/source/latex/overpic/overpic.dtx
index 4961b179eb0..2ac63e69b2b 100644
--- a/Master/texmf-dist/source/latex/overpic/overpic.dtx
+++ b/Master/texmf-dist/source/latex/overpic/overpic.dtx
@@ -19,7 +19,7 @@
%
%<*package>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{overpic}[2024/01/04 2.0 picture overlays (RN)]
+\ProvidesPackage{overpic}[2024/01/06 2.1 picture overlays (RN)]
%</package>
%
%<*driver>
@@ -58,7 +58,7 @@
%</driver>
% \fi
%
-% \CheckSum{178}
+% \CheckSum{199}
%
% \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
@@ -289,7 +289,7 @@
}
% \end{macrocode}
% \end{macro}
-% \changes{2.0}{2024/01/01}{Use a separate namespace for the keys to avoid
+% \changes{2.0}{2024/01/04}{Use a separate namespace for the keys to avoid
% unfavorable influence on \cmd\includegraphics.}
% \begin{macro}{\OVP@calc@rel}
% Some calculations in rel mode. The bigger value of width or height
@@ -323,6 +323,25 @@
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
\ExecuteOptions{percent}
\ProcessOptions
+\AtBeginDocument{%
+ \@ifpackageloaded{xkeyval}{%
+ \def\OVP@setkeys@relaxed{%
+ \let\OVP@setkeys\setkeys
+ \def\setkeys{\OVP@setkeys*}
+ }
+ \def\OVP@setkeys@strict{%
+ \let\setkeys\OVP@setkeys
+ }
+ }{%
+ \def\OVP@setkeys@relaxed{%
+ \let\OVP@KV@errx\KV@errx
+ \let\KV@errx\@gobble
+ }
+ \def\OVP@setkeys@strict{%
+ \let\KV@errx\OVP@KV@errx
+ }
+ }
+}
\newsavebox\OVP@box
% \end{macrocode}
%
@@ -331,20 +350,20 @@
% \changes{1.2}{2018/09/02}{Wrong place of \cmd\setkeys
% (bug report from 'aminophen')}
% \changes{2.0}{2024/01/04}{Better key handling}
+% \changes{2.1}{2024/01/06}{Consideration of xkeyval's \cmd\setkeys}
% \begin{macrocode}
\newenvironment{overpic}[2][]{%
- \let\OVP@temp=\KV@errx
% \end{macrocode}
% Silently ignore unknown keys.
% \begin{macrocode}
- \let\KV@errx\@gobble
+ \OVP@setkeys@relaxed
\sbox\OVP@box{\includegraphics[#1]{#2}}%
\count@=\z@ \OVP@gridfalse
\setkeys{OVP}{#1}%
% \end{macrocode}
-% Reset to previous state.
+% Stop ignoring unknown keys.
% \begin{macrocode}
- \let\KV@errx\OVP@temp
+ \OVP@setkeys@strict
\OVP@picture{#1}%
}{\endpicture}
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/latex/overpic/overpic.sty b/Master/texmf-dist/tex/latex/overpic/overpic.sty
index 65579d1f977..6793b4bcc34 100644
--- a/Master/texmf-dist/tex/latex/overpic/overpic.sty
+++ b/Master/texmf-dist/tex/latex/overpic/overpic.sty
@@ -19,7 +19,7 @@
%% version 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{overpic}[2024/01/04 2.0 picture overlays (RN)]
+\ProvidesPackage{overpic}[2024/01/06 2.1 picture overlays (RN)]
\RequirePackage{keyval,graphicx,epic}
\newcommand*\OVP@scale{\z@}
\define@key{OVP}{rel}{%
@@ -73,14 +73,32 @@
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
\ExecuteOptions{percent}
\ProcessOptions
+\AtBeginDocument{%
+ \@ifpackageloaded{xkeyval}{%
+ \def\OVP@setkeys@relaxed{%
+ \let\OVP@setkeys\setkeys
+ \def\setkeys{\OVP@setkeys*}
+ }
+ \def\OVP@setkeys@strict{%
+ \let\setkeys\OVP@setkeys
+ }
+ }{%
+ \def\OVP@setkeys@relaxed{%
+ \let\OVP@KV@errx\KV@errx
+ \let\KV@errx\@gobble
+ }
+ \def\OVP@setkeys@strict{%
+ \let\KV@errx\OVP@KV@errx
+ }
+ }
+}
\newsavebox\OVP@box
\newenvironment{overpic}[2][]{%
- \let\OVP@temp=\KV@errx
- \let\KV@errx\@gobble
+ \OVP@setkeys@relaxed
\sbox\OVP@box{\includegraphics[#1]{#2}}%
\count@=\z@ \OVP@gridfalse
\setkeys{OVP}{#1}%
- \let\KV@errx\OVP@temp
+ \OVP@setkeys@strict
\OVP@picture{#1}%
}{\endpicture}
\newenvironment{Overpic}[2][]{%