summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty')
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty65
1 files changed, 56 insertions, 9 deletions
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'.