summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx')
-rw-r--r--Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx115
1 files changed, 101 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx b/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx
index 829459b6486..aa7094a397a 100644
--- a/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx
+++ b/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx
@@ -25,7 +25,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{adjustbox.dtx}[2011/08/13 v0.5 DTX File]
+\ProvidesFile{adjustbox.dtx}[2011/08/21 v0.5a DTX File]
\expandafter\ifx\csname ifenglish\endcsname\relax
\expandafter\newif\csname ifenglish\endcsname
\englishtrue
@@ -48,7 +48,7 @@
\MakeSpecialShortVerb\qverb\"
%\AtBeginDocument{\MakeShortMacroArgs\`\relax}
%\AtEndDocument{\DeleteShortVerb\`}
-\usepackage{adjustbox}
+\usepackage{adjustbox}[2011/08/21]
\usepackage{tikz}
\normalmarginpar
@@ -186,6 +186,7 @@
% \changes{v0.3}{2011/03/20}{Bug fix for wrong baseline placed on the bottom}
% \changes{v0.4}{2011/07/xx}{Added pdftex driver}
% \changes{v0.5}{2011/08/13}{Added more macros and keys}
+% \changes{v0.5a}{2011/08/21}{Fixed \Key{left} and \Key{right} keys. Fixed \Key{valign}'='t}
%
% \GetFileInfo{adjustbox.dtx}
%
@@ -967,9 +968,9 @@
% \adjustbox{valign=M}{\textcolor{red}{\rule{1em}{2em}\unskip}}\unskip
% \adjustbox{valign=M}{\textcolor{green}{\rule{1em}{3em}\unskip}}\unskip
% \adjustbox{valign=M}{\textcolor{blue}{\rule{1em}{1ex}\unskip}} &
-% \adjustbox{valign=T}{\textcolor{red}{\rule{1em}{2em}\unskip}}\unskip
-% \adjustbox{valign=T}{\textcolor{green}{\rule{1em}{3em}\unskip}}\unskip
-% \adjustbox{valign=T}{\textcolor{blue}{\rule{1em}{1ex}\unskip}} &
+% \adjustbox{valign=B}{\textcolor{red}{\rule{1em}{2em}\unskip}}\unskip
+% \adjustbox{valign=B}{\textcolor{green}{\rule{1em}{3em}\unskip}}\unskip
+% \adjustbox{valign=B}{\textcolor{blue}{\rule{1em}{1ex}\unskip}} &
% Mxy \newline \mbox{\vr Mxy}\newline Mxy \\
% \midrule
% \texttt{t} & \texttt{m} & \texttt{b} & Text \\
@@ -979,9 +980,9 @@
% \adjustbox{valign=m}{\textcolor{red}{\rule{1em}{2em}\unskip}}\unskip
% \adjustbox{valign=m}{\textcolor{green}{\rule{1em}{3em}\unskip}}\unskip
% \adjustbox{valign=m}{\textcolor{blue}{\rule{1em}{1ex}\unskip}} &
-% \adjustbox{valign=t}{\textcolor{red}{\rule{1em}{2em}\unskip}}\unskip
-% \adjustbox{valign=t}{\textcolor{green}{\rule{1em}{3em}\unskip}}\unskip
-% \adjustbox{valign=t}{\textcolor{blue}{\rule{1em}{1ex}\unskip}} &
+% \adjustbox{valign=b}{\textcolor{red}{\rule{1em}{2em}\unskip}}\unskip
+% \adjustbox{valign=b}{\textcolor{green}{\rule{1em}{3em}\unskip}}\unskip
+% \adjustbox{valign=b}{\textcolor{blue}{\rule{1em}{1ex}\unskip}} &
% Mxy \newline \mbox{\vr Mxy}\newline Mxy \\
% \bottomrule
% \end{tabular}}
@@ -1249,7 +1250,7 @@
% \subsection{Package header, options and dependencies}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \begin{macrocode}
-\ProvidesPackage{adjustbox}[2011/08/07 v0.5 Adjusting TeX boxes (trim, clip, ...)]
+\ProvidesPackage{adjustbox}[2011/08/21 v0.5a Adjusting TeX boxes (trim, clip, ...)]
% \end{macrocode}
%
% \begin{macrocode}
@@ -1283,7 +1284,7 @@
%
% \begin{macrocode}
\RequirePackage{graphicx}[1999/02/16]
-\RequirePackage{collectbox}[2011/08/06]
+\RequirePackage{collectbox}[2011/08/11]
% \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2123,7 +2124,7 @@
% \begin{macro}{\adjbox@valign@t}
% \begin{macrocode}
\def\adjbox@valign@t{%
- \adjbox@Gin@Add{\@irsbox{\height+\adjboxvtop}[]}%
+ \adjbox@Gin@Add{\@irsbox{-\height+\adjboxvtop}[]}%
}
% \end{macrocode}
% \end{macro}
@@ -2177,12 +2178,45 @@
% \begin{key}{adjbox}{bgcolor}
% \begin{macrocode}
\define@key\adjbox@fam{bgcolor}{%
- \adjbox@Gin@add{\colorbox{#1}}%
+ \@ifnextchar\bgroup{%
+ \adjbox@bgcolor
+ }{%
+ \adjbox@bgcolor{}{#1}%
+ }#1\@nnil
}
% \end{macrocode}
% \end{key}
%
%
+% \begin{macro}{\adjbox@bgcolor}
+% \begin{macrocode}
+\def\adjbox@bgcolor#1#2#3\@nnil{%
+ \adjbox@Gin@add{\@collectbox{\adjbox@@bgcolor{#1}{#2}}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\adjbox@@bgcolor}
+% \begin{macrocode}
+\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
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{key}{adjbox}{set height}
% \begin{macrocode}
\define@key\adjbox@fam{set height}{%
@@ -2255,7 +2289,7 @@
% \begin{key}{adjbox}{left}
% \begin{macrocode}
\define@key\adjbox@fam{left}[\linewidth]{%
- \adjbox@halign{#1}\hss\relax
+ \adjbox@halign{#1}\relax\hss
}
% \end{macrocode}
% \end{key}
@@ -2263,7 +2297,7 @@
% \begin{key}{adjbox}{right}
% \begin{macrocode}
\define@key\adjbox@fam{right}[\linewidth]{%
- \adjbox@halign{#1}\relax\hss
+ \adjbox@halign{#1}\hss\relax
}
% \end{macrocode}
% \end{key}
@@ -2699,6 +2733,59 @@
% \end{macro}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \subsection{New, experimental macros and keys}
+%
+% \begin{macro}{\bgimagebox}
+% \begin{macrocode}
+\newcommand*\bgimagebox[2][]{%
+ \collectboxcheckenv{bgimagebox}%
+ \@collectbox{\@bgimagebox{#1}{#2}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@bgimagebox}
+% \begin{macrocode}
+\def\@bgimagebox#1#2{%
+ \mbox{%
+ \lower\depth\hbox{%
+ \edef\@tempa{\noexpand\includegraphics%
+ [#1,width=\the\width,totalheight=\the\totalheight]%
+ {#2}%
+ }%
+ \@tempa
+ }%
+ \hskip-\width%
+ \BOXCONTENT
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{key}{adjbox}{bgimage}
+% \begin{macrocode}
+\define@key{adjbox}{bgimage}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@bgimage
+ }{%
+ \adjbox@bgimage{}{#1}%
+ }#1\@nnil
+}
+% \end{macrocode}
+% \end{key}
+%
+%
+% \begin{macro}{\adjbox@bgimage}
+% \begin{macrocode}
+\def\adjbox@bgimage#1#2#3\@nnil{%
+ \adjbox@Gin@add{\@collectbox{\@bgimagebox{#1}{#2}}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \iffalse
%</adjustbox>
% \fi