summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/adjustbox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-24 00:11:12 +0000
committerKarl Berry <karl@freefriends.org>2011-08-24 00:11:12 +0000
commit9562128503e3bb590d215ae1c6470f83b8f57b24 (patch)
tree820dacb05edf90fa504a420bf2d72868ca0b6aa9 /Master/texmf-dist/tex/latex/adjustbox
parente0166386d95b2853abff6b4f8d87b2ec8ff7ba0b (diff)
adjustbox (22aug11)
git-svn-id: svn://tug.org/texlive/trunk@23673 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/adjustbox')
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty5
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/adjgrfx.sty5
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/adjpgf.def5
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty65
4 files changed, 62 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty b/Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty
index 47e512f3aba..6eec7f21017 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty
+++ b/Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty
@@ -22,9 +22,8 @@
%%
%% The Current Maintainer of this work is Martin Scharrer.
%%
-%% This work consists of the files adjustbox.dtx and adjustbox.ins
-%% and the derived files adjustbox.sty, adjcalc.sty, adjpgf.def and
-%% adjgrfx.sty.
+%% This work consists of the files adjustbox.dtx, adjustbox.ins,
+%% storebox.dtx and the derived files adjustbox.sty and storebox.sty.
%%
\begingroup
\def\@tempa{adjcalc}
diff --git a/Master/texmf-dist/tex/latex/adjustbox/adjgrfx.sty b/Master/texmf-dist/tex/latex/adjustbox/adjgrfx.sty
index 215159e1fda..b06a15c801c 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/adjgrfx.sty
+++ b/Master/texmf-dist/tex/latex/adjustbox/adjgrfx.sty
@@ -22,9 +22,8 @@
%%
%% The Current Maintainer of this work is Martin Scharrer.
%%
-%% This work consists of the files adjustbox.dtx and adjustbox.ins
-%% and the derived files adjustbox.sty, adjcalc.sty, adjpgf.def and
-%% adjgrfx.sty.
+%% This work consists of the files adjustbox.dtx, adjustbox.ins,
+%% storebox.dtx and the derived files adjustbox.sty and storebox.sty.
%%
\ProvidesPackage{adjgrfx}[2011/07/28 v0.1 Patches to graphicx used by adjustbox]
\RequirePackage{graphicx}
diff --git a/Master/texmf-dist/tex/latex/adjustbox/adjpgf.def b/Master/texmf-dist/tex/latex/adjustbox/adjpgf.def
index e4b3e3b6d94..e0224fbc28a 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/adjpgf.def
+++ b/Master/texmf-dist/tex/latex/adjustbox/adjpgf.def
@@ -22,9 +22,8 @@
%%
%% The Current Maintainer of this work is Martin Scharrer.
%%
-%% This work consists of the files adjustbox.dtx and adjustbox.ins
-%% and the derived files adjustbox.sty, adjcalc.sty, adjpgf.def and
-%% adjgrfx.sty.
+%% This work consists of the files adjustbox.dtx, adjustbox.ins,
+%% storebox.dtx and the derived files adjustbox.sty and storebox.sty.
%%
\RequirePackage{pgf}
\def\@clipbox#1#2#3#4#5{%
diff --git a/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty b/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty
index 9cb704520bf..97e2d82fca6 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty
+++ b/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty
@@ -22,13 +22,12 @@
%%
%% The Current Maintainer of this work is Martin Scharrer.
%%
-%% This work consists of the files adjustbox.dtx and adjustbox.ins
-%% and the derived files adjustbox.sty, adjcalc.sty, adjpgf.def and
-%% adjgrfx.sty.
+%% This work consists of the files adjustbox.dtx, adjustbox.ins,
+%% storebox.dtx and the derived files adjustbox.sty and storebox.sty.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{adjustbox}[2011/08/07 v0.5 Adjusting TeX boxes (trim, clip, ...)]
+\ProvidesPackage{adjustbox}[2011/08/21 v0.5a Adjusting TeX boxes (trim, clip, ...)]
\RequirePackage{xkeyval}
\def\adjbox@defaultunit{bp}
@@ -56,7 +55,7 @@
\input{adjcalc.sty}
\disable@keys{adjbox}{patch,export,PGF,minimal}
\RequirePackage{graphicx}[1999/02/16]
-\RequirePackage{collectbox}[2011/08/06]
+\RequirePackage{collectbox}[2011/08/11]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\define@key{adjbox}{viewport}{%
@@ -506,7 +505,7 @@
\def\adjboxvcenter{1ex}
\def\adjboxvbottom{-\dp\strutbox}
\def\adjbox@valign@t{%
- \adjbox@Gin@Add{\@irsbox{\height+\adjboxvtop}[]}%
+ \adjbox@Gin@Add{\@irsbox{-\height+\adjboxvtop}[]}%
}
\def\adjbox@valign@T{%
\adjbox@Gin@Add{\@irsbox{-\height}[]}%
@@ -524,8 +523,29 @@
\adjbox@Gin@Add{\@irsbox{\depth}[]}%
}
\define@key\adjbox@fam{bgcolor}{%
- \adjbox@Gin@add{\colorbox{#1}}%
+ \@ifnextchar\bgroup{%
+ \adjbox@bgcolor
+ }{%
+ \adjbox@bgcolor{}{#1}%
+ }#1\@nnil
+}
+\def\adjbox@bgcolor#1#2#3\@nnil{%
+ \adjbox@Gin@add{\@collectbox{\adjbox@@bgcolor{#1}{#2}}}%
}
+\def\adjbox@@bgcolor#1#2{%
+ \mbox{%
+ \hbox{%
+ \ifx\@nnil#1\@nnil
+ \color{#2}%
+ \else
+ \color[#1]{#2}%
+ \fi
+ \vrule\@width\width\@height\height\@depth\depth
+ }%
+ \hskip-\width
+ \BOXCONTENT
+ }%
+}%
\define@key\adjbox@fam{set height}{%
\adjbox@Gin@Add{\@irsbox\z@[{#1}]}%
}
@@ -559,10 +579,10 @@
\adjbox@halign{#1}\hss\hss
}
\define@key\adjbox@fam{left}[\linewidth]{%
- \adjbox@halign{#1}\hss\relax
+ \adjbox@halign{#1}\relax\hss
}
\define@key\adjbox@fam{right}[\linewidth]{%
- \adjbox@halign{#1}\relax\hss
+ \adjbox@halign{#1}\hss\relax
}
\define@key\adjbox@fam{outer}[\linewidth]{%
\def\@tempa{\adjbox@halign{#1}}%
@@ -784,6 +804,33 @@
\toks@\expandafter\expandafter\expandafter{\expandafter\@tempa\expandafter{\the\toks@}#2}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand*\bgimagebox[2][]{%
+ \collectboxcheckenv{bgimagebox}%
+ \@collectbox{\@bgimagebox{#1}{#2}}%
+}
+\def\@bgimagebox#1#2{%
+ \mbox{%
+ \lower\depth\hbox{%
+ \edef\@tempa{\noexpand\includegraphics%
+ [#1,width=\the\width,totalheight=\the\totalheight]%
+ {#2}%
+ }%
+ \@tempa
+ }%
+ \hskip-\width%
+ \BOXCONTENT
+ }%
+}
+\define@key{adjbox}{bgimage}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@bgimage
+ }{%
+ \adjbox@bgimage{}{#1}%
+ }#1\@nnil
+}
+\def\adjbox@bgimage#1#2#3\@nnil{%
+ \adjbox@Gin@add{\@collectbox{\@bgimagebox{#1}{#2}}}%
+}
\endinput
%%
%% End of file `adjustbox.sty'.