From 48196732729473c093a5f7d4228ca2db256d0502 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 2 Sep 2018 21:15:59 +0000 Subject: overpic (2sep18) git-svn-id: svn://tug.org/texlive/trunk@48550 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/overpic/overpic.dtx | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/overpic/overpic.dtx b/Master/texmf-dist/source/latex/overpic/overpic.dtx index aaa2ffde7a0..72bb795dbe2 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}[2017/10/06 1.0 picture overlays] +\ProvidesPackage{overpic}[2018/09/02 1.2 picture overlays (RN)] % % %<*driver> @@ -58,7 +58,7 @@ % % \fi % -% \CheckSum{174} +% \CheckSum{176} % % \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 @@ -244,12 +244,12 @@ % \end{macrocode} % % \begin{macro}{\OVP@scale} -% Reference value for rel mode, "100" (percent) and "1000" (permil) +% Reference value for rel mode (percent: 100, permil: 1000) % \begin{macrocode} \newcommand*\OVP@scale{\z@} % \end{macrocode} % \end{macro} -% All the keys. +% All the keys: % \begin{macrocode} \define@key{Gin}{rel}{% \def\OVP@scale{#1}% @@ -309,7 +309,7 @@ } % \end{macrocode} % \end{macro} -% The package options set the defaults. +% The package options set the defaults: % \begin{macrocode} \DeclareOption{percent}{\setkeys{Gin}{rel=100}} \DeclareOption{permil}{\setkeys{Gin}{rel=\@m}} @@ -317,21 +317,26 @@ \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}} \ExecuteOptions{percent} \ProcessOptions +\newsavebox\OVP@box % \end{macrocode} % % \begin{environment}{overpic} % Box 0 gets a graphic. +% \changes{1.2}{2018/09/02}{Wrong place of \cmd\setkeys +% (bug report from 'aminophen')} % \begin{macrocode} \newenvironment{overpic}[2][]{% - \sbox\z@{\includegraphics[#1]{#2}}% + \sbox\OVP@box{\includegraphics[#1]{#2}}% + \count@=\z@ \Gin@gridfalse + \setkeys{Gin}{#1}% % \end{macrocode} -% reset the graphics parameter +% Reset the graphics parameter: % \begin{macrocode} \let\Gin@outer@scalex\relax \let\Gin@outer@scaley\relax \let\Gin@angle\relax \let\Gin@ewidth\Gin@exclamation - \let\Gin@eheight\Gin@ewidth + \let\Gin@eheight\Gin@exclamation \def\Gin@scalex{1}% \let\Gin@scaley\Gin@exclamation \OVP@picture{#1}% @@ -343,25 +348,23 @@ % Box 0 gets any \TeX\ code. % \begin{macrocode} \newenvironment{Overpic}[2][]{% - \sbox\z@{#2}% + \sbox\OVP@box{#2}% \OVP@picture{#1}% }{\endpicture} % \end{macrocode} % \end{environment} % \begin{macro}{\OVP@picture} -% Put box 0 and an optionally grid at the lower left corner of a +% Put box 0 and and optionally grid at the lower left corner of a % picture environment. % \begin{macrocode} \newcommand*\OVP@picture[1]{% - \settodepth{\@tempcnta}{\usebox\z@}% - \settoheight{\@tempcntb}{\usebox\z@}% + \settodepth{\@tempcnta}{\usebox\OVP@box}% + \settoheight{\@tempcntb}{\usebox\OVP@box}% \advance\@tempcntb\@tempcnta - \settowidth{\@tempcnta}{\usebox\z@}% - \count@=\z@ \Gin@gridfalse - \setkeys{Gin}{#1}% + \settowidth{\@tempcnta}{\usebox\OVP@box}% \OVP@calc \picture(\@tempcnta,\@tempcntb)% - \put(0,0){\makebox(0,0)[bl]{\usebox\z@}}% + \put(0,0){\makebox(0,0)[bl]{\usebox\OVP@box}}% \ifGin@grid \put(0,0){\normalfont\fontsize\@viipt\@viiipt\selectfont \grid(\@tempcnta,\@tempcntb)(\count@,\count@)[0,0]}% -- cgit v1.2.3