summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/oberdiek
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-01-10 14:24:11 +0000
committerKarl Berry <karl@freefriends.org>2007-01-10 14:24:11 +0000
commitb9fd29406413c01cc709fb8b05db351a186b59e1 (patch)
treef340b9080eaa3ae132e4f385a9e4599484b4184f /Master/texmf-dist/tex/latex/oberdiek
parent9b59cc38f7742b307db35f5c1a70c197e998f61a (diff)
oberdiek: pdfcolfoot 1.0, transparent 1.0
git-svn-id: svn://tug.org/texlive/trunk@3290 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek')
-rw-r--r--Master/texmf-dist/tex/latex/oberdiek/pdfcolfoot.sty188
-rw-r--r--Master/texmf-dist/tex/latex/oberdiek/transparent.sty141
2 files changed, 329 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/pdfcolfoot.sty b/Master/texmf-dist/tex/latex/oberdiek/pdfcolfoot.sty
new file mode 100644
index 00000000000..503fca17db8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/oberdiek/pdfcolfoot.sty
@@ -0,0 +1,188 @@
+%%
+%% This is file `pdfcolfoot.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pdfcolfoot.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.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.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% This work consists of the main source file pdfcolfoot.dtx
+%% and the derived files
+%% pdfcolfoot.sty, pdfcolfoot.pdf, pdfcolfoot.ins, pdfcolfoot.drv.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pdfcolfoot}%
+ [2007/01/08 v1.0 pdfTeX's color stack for footnotes (HO)]
+\RequirePackage{ifpdf}
+\ifpdf
+\else
+ \PackageWarningNoLine{pdfcolfoot}{%
+ Loading aborted, because pdfTeX is not running in PDF mode%
+ }%
+ \expandafter\endinput
+\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfcolorstackinit\endcsname\relax
+ \PackageWarningNoLine{pdfcolfoot}{%
+ Your pdfTeX version does not support color stacks%
+ }%
+ \expandafter\endinput
+\fi
+\@ifpackageloaded{color}{}{\RequirePackage[pdftex]{color}}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname @pdfcolorstack\endcsname\relax
+ \PackageWarningNoLine{pdfcolfoot}{%
+ Your pdftex.def is too old, you need at least 2007/01/02 v0.04b%
+ }%
+ \expandafter\endinput
+\fi
+\newcommand{\pdfcolfoot@stack}{}
+\edef\pdfcolfoot@stack{%
+ \pdfcolorstackinit direct{\current@color}%
+}
+\begingroup
+ \let\on@line\@empty
+ \PackageInfo{pdfcolfoot}{%
+ Color stack number: \pdfcolfoot@stack
+ }%
+\endgroup
+\newcommand*{\pdfcolfoot@switch}{%
+ \let\@pdfcolorstack\pdfcolfoot@stack
+}
+\AtBeginDocument{%
+ \newcommand*{\pdfcolfoot@makefntext}{}%
+ \let\pdfcolfoot@makefntext\@makefntext
+ \renewcommand{\@makefntext}[1]{%
+ \pdfcolfoot@makefntext{%
+ \if@minipage
+ \else
+ \pdfcolfoot@switch
+ \fi
+ #1%
+ }%
+ }%
+}
+\newcommand*{\pdfcolfoot@current}{%
+ \pdfcolorstack\pdfcolfoot@stack current\relax
+}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname detokenize\endcsname\relax
+ \PackageWarningNoLine{pdfcolfoot}{%
+ Missing e-TeX for patching \string\@makecol
+ }%
+ \expandafter\endinput
+\fi
+\newif\ifPCF@result
+\def\pdfcolfoot@patch#1{%
+ \ifx#1\@undefined
+ \else
+ \ifx#1\relax
+ \else
+ \begingroup
+ \toks@{}%
+ \let\on@line\@empty
+ \expandafter\PCF@CheckPatched
+ \detokenize\expandafter{#1pdfcolfoot@current}\@nil
+ \ifPCF@result
+ \PackageInfo{pdfcolfoot}{\string#1\space is already patched}%
+ \else
+ \expandafter\PCF@CanPatch
+ \detokenize\expandafter{%
+ #1\setbox\@outputbox\vbox{\footnoterule}%
+ }%
+ \@nil
+ \ifPCF@result
+ \PackageInfo{pdfcolfoot}{\string#1 is being patched}%
+ \expandafter\PCF@PatchA#1\PCF@nil#1%
+ \else
+ \PackageInfo{pdfcolfoot}{%
+ \string#1\space cannot be patched%
+ }%
+ \fi
+ \fi
+ \expandafter\endgroup
+ \the\toks@
+ \fi
+ \fi
+}
+\expandafter\def\expandafter\PCF@CheckPatched
+ \expandafter#\expandafter1\detokenize{pdfcolfoot@current}#2\@nil{%
+ \ifx\\#2\\%
+ \PCF@resultfalse
+ \else
+ \PCF@resulttrue
+ \fi
+}
+\edef\PCF@BraceLeft{\string{}
+\edef\PCF@BraceRight{\string}}
+\begingroup
+ \edef\x{\endgroup
+ \def\noexpand\PCF@CanPatch
+ ##1\detokenize{\setbox\@outputbox\vbox}\PCF@BraceLeft
+ ##2\detokenize{\footnoterule}##3\PCF@BraceRight
+ }%
+\x#4\@nil{%
+ \ifx\\#2#3#4\\%
+ \PCF@resultfalse
+ \else
+ \PCF@resulttrue
+ \fi
+}
+\def\PCF@PatchA#1\setbox\@outputbox\vbox#2#3\PCF@nil#4{%
+ \PCF@PatchB{#1}#2\PCF@nil{#3}#4%
+}
+\def\PCF@PatchB#1#2\footnoterule#3\PCF@nil#4#5{%
+ \toks@{%
+ \def#5{%
+ #1%
+ \setbox\@outputbox\vbox{%
+ #2%
+ \footnoterule
+ \pdfcolfoot@current
+ #3%
+ }%
+ #4%
+ }%
+ }%
+}
+\def\pdfcolfoot@all#1{%
+ \begingroup
+ \let\on@line\@empty
+ \PackageInfo{pdfcolfoot}{%
+ Patching \string\@makecol\space macros (#1)%
+ }%
+ \endgroup
+ \pdfcolfoot@patch\@makecol
+ \pdfcolfoot@patch\@makecol@pptt
+ \pdfcolfoot@patch\mem@makecol
+ \pdfcolfoot@patch\mem@makecolbf
+ \pdfcolfoot@patch\@combineinserts
+ \pdfcolfoot@patch\ltx@makecol
+ \pdfcolfoot@patch\dfn@latex@makecol
+ \pdfcolfoot@patch\latex@makecol
+ \pdfcolfoot@patch\LS@makecol
+ \pdfcolfoot@patch\@LN@orig@makecol
+ \pdfcolfoot@patch\org@makecol
+ \pdfcolfoot@patch\fn@makecol
+}
+\AtBeginDocument{\pdfcolfoot@all{AtBeginDocument}}
+\pdfcolfoot@all{AtEndOfPackage}
+\endinput
+%%
+%% End of file `pdfcolfoot.sty'.
diff --git a/Master/texmf-dist/tex/latex/oberdiek/transparent.sty b/Master/texmf-dist/tex/latex/oberdiek/transparent.sty
new file mode 100644
index 00000000000..f9e232e18a9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/oberdiek/transparent.sty
@@ -0,0 +1,141 @@
+%%
+%% This is file `transparent.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% transparent.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.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.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% 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.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{transparent}%
+ [2007/01/08 v1.0 Using a pdfTeX's color stack for transparency (HO)]
+\RequirePackage{ifpdf}
+\ifpdf
+\else
+ \PackageWarningNoLine{transparent}{%
+ Loading aborted, because pdfTeX is not running in PDF mode%
+ }%
+ \expandafter\endinput
+\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfcolorstackinit\endcsname\relax
+ \PackageWarningNoLine{transparent}{%
+ Your pdfTeX version does not support color stacks%
+ }%
+ \expandafter\endinput
+\fi
+\RequirePackage{auxhook}
+\AddLineBeginAux{%
+ \string\providecommand{\string\transparent@use}[1]{}%
+}
+\gdef\TRP@list{/TRP1<</ca 1/CA 1>>}
+\def\transparent@use#1{%
+ \@ifundefined{TRP#1}{%
+ \g@addto@macro\TRP@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@addresource
+ \let\transparent@use\@gobble
+}
+\def\TRP@addresource{%
+ \begingroup
+ \edef\x{\endgroup
+ \pdfpageresources{%
+ \the\pdfpageresources
+ /ExtGState<<\TRP@list>>%
+ }%
+ }%
+ \x
+}
+\newif\ifTRP@rerun
+\xdef\TRP@colorstack{%
+ \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@pt\dimen@}%
+ \edef\x{\expandafter\@gobble\x}%
+ \fi
+ \fi
+ \if@filesw
+ \immediate\write\@auxout{%
+ \string\transparent@use{\x}%
+ }%
+ \fi
+ \edef\x{\endgroup
+ \def\noexpand\transparent@current{\x}%
+ }%
+ \x
+ \transparent@set
+}
+\AtEndDocument{%
+ \ifTRP@rerun
+ \PackageWarningNoLine{transparent}{%
+ Rerun to get transparencies right%
+ }%
+ \fi
+}
+\def\transparent@current{/TRP1 gs}
+\def\transparent@set{%
+ \@ifundefined{TRP\transparent@current}{%
+ \global\TRP@reruntrue
+ }{%
+ \pdfcolorstack\TRP@colorstack push{%
+ \csname TRP\transparent@current\endcsname
+ }%
+ \aftergroup\transparent@reset
+ }%
+}
+\def\transparent@reset{%
+ \pdfcolorstack\TRP@colorstack pop\relax
+}
+\newcommand*{\texttransparent}[2]{%
+ \protect\leavevmode
+ \begingroup
+ \transparent{#1}%
+ #2%
+ \endgroup
+}
+\endinput
+%%
+%% End of file `transparent.sty'.