I want to superpose a text to some other object (in this aces a picture). My idea is to store the picture in \mabox, to display it with in a \makebox with 0 width and height, then to display the text thru a second \makebox, with width and height equal to those of \mabox. My attempt fails, because \wd\mabox delivers a length with unit, and \makebox expects a length without unit. How could i do it better?
\documentclass{article}
\usepackage{graphicx}
\usepackage{blindtext}
\begin{document}
\newsavebox\mabox
\sbox{\mabox}{\includegraphics[scale=0.10]{Pingouin}}
\makebox(0,0)[b]{\put(0,0){\usebox\mabox}}
\fbox{\makebox(\wd\mabox,\ht\mabox)[b]{\put(0,0){\parbox{\wd\mabox}{\blindtext}}}}
\end{document}
\raiseboxand\rlapto removeheightandwidthas well. Also,adjustboxallows for that (see keybgimagefor example). – Martin Scharrer Mar 30 '18 at 07:09