summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-10-08 22:42:37 +0000
committerKarl Berry <karl@freefriends.org>2017-10-08 22:42:37 +0000
commit841aed00b258ed3eb5fb6a6d49b6c6537cabf3be (patch)
treeb71d21a09c4b0392597a619995a04b56190a5bd8 /Master/texmf-dist/tex
parentd47f67722cb136dbf87bf7f8bebb18c97c8c15ac (diff)
overpic (8oct17)
git-svn-id: svn://tug.org/texlive/trunk@45500 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/overpic/overpic.sty204
1 files changed, 103 insertions, 101 deletions
diff --git a/Master/texmf-dist/tex/latex/overpic/overpic.sty b/Master/texmf-dist/tex/latex/overpic/overpic.sty
index 59cc29ad622..7be39328b51 100644
--- a/Master/texmf-dist/tex/latex/overpic/overpic.sty
+++ b/Master/texmf-dist/tex/latex/overpic/overpic.sty
@@ -1,107 +1,109 @@
-
-% overpic.sty
-
-% Copyright 1999-2010 Rolf Niepraschk, Rolf.Niepraschk@gmx.de
-% This program can be redistributed and/or modified under the terms
-% of the LaTeX Project Public License Distributed from CTAN
-% archives in directory macros/latex/base/lppl.txt; either
-% version 1 of the License, or any later version.
-
-% \changes{v0.53}{2010/09/13}{reset the graphics parameter}
-% \changes{v0.51}{1999/03/02}{New (LPPL) license}
-% \changes{v0.52}{1999/07/04}{Correction of wrong height calculation
-% (if depth != 0)}
-
-
-\def\fileversion{v0.53}
-\def\filedate{2010/09/13}%
-
-\ProvidesPackage{overpic}
- [\filedate\space\fileversion\space\space Overwriting graphics]
-
-\NeedsTeXFormat{LaTeX2e}
-
-\typeout{Package: overpic \fileversion\space <\filedate> (RN)}
-
-\newcommand\OVP@scale{}
-
-\DeclareOption{percent}{\renewcommand\OVP@scale{100}}
-\DeclareOption{permil}{\renewcommand\OVP@scale{\@m}}
-\DeclareOption{abs}{\renewcommand\OVP@scale{\z@}}
-
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
-
-\ExecuteOptions{percent}
-
-\ProcessOptions
-
+%%
+%% This is file `overpic.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% overpic.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 1997-2016 by Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
+%% --------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://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.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{overpic}[2017/10/06 1.0 picture overlays]
\RequirePackage{graphicx,epic}
-
-\newif\ifGin@grid
-
+\newcommand*\OVP@scale{\z@}
+\define@key{Gin}{rel}{%
+ \def\OVP@scale{#1}%
+ \ifnum\OVP@scale>\z@
+ \let\OVP@calc\OVP@calc@rel
+ \else
+ \PackageError{overpic}{Invalid number for option `rel'}\@ehc
+ \fi
+}
+\define@key{Gin}{percent}[]{%
+ \setkeys{Gin}{rel=100}%
+}
+\define@key{Gin}{permil}[]{%
+ \setkeys{Gin}{rel=\@m}%
+}
+\define@key{Gin}{abs}[]{%
+ \let\OVP@calc\OVP@calc@abs
+}
+\newif\ifGin@grid
\define@key{Gin}{grid}[true]{\lowercase{\Gin@boolkey{#1}}{grid}}
\define@key{Gin}{tics}{\count@=#1}
-\define@key{Gin}{unit}{\setlength{\@tempdima}{#1}}
-
-\ifnum\OVP@scale>\z@%
- \ifnum\OVP@scale=\@m%
- \typeout{overpic: relative positioning in permil}%
- \else%
- \typeout{overpic: relative positioning in percent}%
- \fi%
- \newcommand\OVP@calc{%
- \ifnum\@tempcnta>\@tempcntb%
- \divide\@tempcnta by \OVP@scale%
- \setlength\unitlength{\@tempcnta sp}%
- \@tempcnta=\OVP@scale%
- \divide\@tempcntb by \unitlength%
- \else%
- \divide\@tempcntb by \OVP@scale%
- \setlength\unitlength{\@tempcntb sp}%
- \@tempcntb=\OVP@scale%
- \divide\@tempcnta by \unitlength%
- \fi%
- \ifnum\count@=\z@%
- \count@=\OVP@scale\divide\count@ by 10 %
- \fi%
- }%
-\else%
- \typeout{overpic: absolute positioning in \unitlength}%
- \newcommand\OVP@calc{%
- \setlength{\unitlength}{\@tempdima}%
- \divide\@tempcnta by \unitlength%
- \divide\@tempcntb by \unitlength%
- \ifnum\count@=\z@\count@=10\fi%
- }%
-\fi%
-
+\define@key{Gin}{unit}{\unitlength=\dimexpr#1\relax}
+\newcommand*\OVP@calc@abs{%
+ \divide\@tempcnta by \unitlength
+ \divide\@tempcntb by \unitlength
+ \ifnum\count@=\z@\count@=10\fi
+}
+\newcommand*\OVP@calc@rel{%
+ \ifnum\@tempcnta>\@tempcntb
+ \divide\@tempcnta by \OVP@scale
+ \unitlength=\@tempcnta sp %
+ \@tempcnta=\OVP@scale
+ \divide\@tempcntb by \unitlength
+ \else
+ \divide\@tempcntb by \OVP@scale
+ \unitlength=\@tempcntb sp %
+ \@tempcntb=\OVP@scale
+ \divide\@tempcnta by \unitlength
+ \fi
+ \ifnum\count@=\z@
+ \count@=\OVP@scale
+ \divide\count@ by 10 %
+ \fi
+}
+\DeclareOption{percent}{\setkeys{Gin}{rel=100}}
+\DeclareOption{permil}{\setkeys{Gin}{rel=\@m}}
+\DeclareOption{abs}{\setkeys{Gin}{abs}}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
+\ExecuteOptions{percent}
+\ProcessOptions
\newenvironment{overpic}[2][]{%
- \sbox{\z@}{\includegraphics[#1]{#2}}%
- \settodepth{\@tempcnta}{\usebox{\z@}}%
- \settoheight{\@tempcntb}{\usebox{\z@}}%
- \advance\@tempcntb\@tempcnta%
- \settowidth{\@tempcnta}{\usebox{\z@}}%
- \setlength{\@tempdima}{\unitlength}%
- \count@=\z@\Gin@gridfalse\setkeys{Gin}{#1}%
-%
- \OVP@calc%
-%
- \begin{picture}(\@tempcnta,\@tempcntb)%
- \put(0,0){\makebox(0,0)[bl]{\usebox{\z@}}}%
- \ifGin@grid%
- \put(0,0){\normalfont\fontsize\@viipt\@viiipt\selectfont%
+ \sbox\z@{\includegraphics[#1]{#2}}%
+ \let\Gin@outer@scalex\relax
+ \let\Gin@outer@scaley\relax
+ \let\Gin@angle\relax
+ \let\Gin@ewidth\Gin@exclamation
+ \let\Gin@eheight\Gin@ewidth
+ \def\Gin@scalex{1}%
+ \let\Gin@scaley\Gin@exclamation
+ \OVP@picture{#1}%
+}{\endpicture}
+\newenvironment{Overpic}[2][]{%
+ \sbox\z@{#2}%
+ \OVP@picture{#1}%
+}{\endpicture}
+\newcommand*\OVP@picture[1]{%
+ \settodepth{\@tempcnta}{\usebox\z@}%
+ \settoheight{\@tempcntb}{\usebox\z@}%
+ \advance\@tempcntb\@tempcnta
+ \settowidth{\@tempcnta}{\usebox\z@}%
+ \count@=\z@ \Gin@gridfalse
+ \setkeys{Gin}{#1}%
+ \OVP@calc
+ \picture(\@tempcnta,\@tempcntb)%
+ \put(0,0){\makebox(0,0)[bl]{\usebox\z@}}%
+ \ifGin@grid
+ \put(0,0){\normalfont\fontsize\@viipt\@viiipt\selectfont
\grid(\@tempcnta,\@tempcntb)(\count@,\count@)[0,0]}%
- \fi%
- % reset the graphics parameter
- \let\Gin@outer@scalex\relax
- \let\Gin@outer@scaley\relax
- \let\Gin@angle\relax
- \let\Gin@ewidth\Gin@exclamation
- \let\Gin@eheight\Gin@ewidth
- \def\Gin@scalex{1}
- \let\Gin@scaley\Gin@exclamation
-}{%
- \end{picture}%
-}%
-
+ \fi
+}
+\newcommand*\setOverpic[1]{%
+ \setkeys{Gin}{#1}%
+}
\endinput
+%%
+%% End of file `overpic.sty'.