Ich habs hingekriegt:
Hier die Ergänzungen/Änderungen:
Code:
...
\usepackage{adjustbox}
\newsavebox\IBox %
\newdimen\width %
\newdimen\height %
\makeatletter
\newcommand{\dummy}[1]{%
\dummy@i{#1}%
}
\def\dummy@i#1{%
\vspace{2mm}%
\hspace{3mm} %
\savebox\IBox
{%
#1%
}%
\width=\wd\IBox %
\height=\ht\IBox %
\begin{tikzpicture}%
\node [
mybox,
text width=\columnwidth-35pt
]\bgroup%
\pgfmathparse{max(\width-\columnwidth,0)} %
\clipbox{0pt 0pt \pgfmathresult pt 0pt}{#1}%
%
\egroup;%
\end{tikzpicture}%
\par%
}
\makeatother
Und hier nochmal das komplette Beispiel:
Code:
\documentclass[11pt,twoside,paper=a4]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{calc}
\usepackage{mathtools}
\usepackage{tikz,pgf,pgfplots}
\usepackage{adjustbox}
\usepackage[outer=37mm,inner=20mm,bottom=23mm,top=20mm]{geometry}
\geometry{papersize={170mm,240mm},total={124mm,185mm}}
\tikzstyle{mybox} = [draw=black!100, fill=black!0, very thick,
rectangle, inner sep=5pt]
\newsavebox\IBox %
\newdimen\width %
\newdimen\height %
\makeatletter
\newcommand{\dummy}[1]{%
\dummy@i{#1}%
}
\def\dummy@i#1{%
\vspace{2mm}%
\hspace{3mm} %
\savebox\IBox
{%
#1%
}%
\width=\wd\IBox %
\height=\ht\IBox %
\begin{tikzpicture}%
\node [
mybox,
text width=\columnwidth-35pt
]\bgroup%
\pgfmathparse{max(\width-\columnwidth,0)} %
\clipbox{0pt 0pt \pgfmathresult pt 0pt}{#1}%
%
\egroup;%
\end{tikzpicture}%
\par%
}
\makeatother
\begin{document}
\dummy{\includegraphics[scale=0.8]{PDF-Datei.pdf}}
\end{document}
Lesezeichen