# Memoir class, graphicx, \resizebox

My first post here, I apologize in advance for typos, misused code scripts or for anything. (First post, however, I have been using and digging this great site for long years and always found answers to my actual latex problems -- until today.)

I have a xelatex document, memoir class, I created back in 2013 and that time it worked, compiled, pdf-ed (... stamped, signed and delivered...) The other day I had to recompile it, TL2016 running on Arch linux 64, and at a given image setting point after a \resizebox command it got stubborn, saying "!Dimensions too large." The updates I had to do in the document are only pure text changes, no commands, no package invocations, no latex specific stuff were changed, even the image is the very same I used three years ago...

Affected lines:

\begin{picture}(0,0)(0,0)
\put(270,530){\resizebox{5.5cm}{!}{\includegraphics{USZT}}}
\end{picture}


I can't find a reason why a 5.5 cm logo would be kind of a too large dimension. Is it possible that memoir class has got some new features recently which can produce such a failure now and not back in 2013? Or xelatex, or graphicx package? Or have I been staring the source too long to be able to pick an obvious mistake?

A dummy code:

\documentclass[11pt, a4paper, oneside]{memoir}
\usepackage{fontspec}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{xfrac}
\usepackage{calc}
\usepackage{multirow}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{lipsum}
\usepackage{xunicode}
\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text, Numbers=OldStyle}
\setromanfont [Ligatures={Discretionary}, BoldFont={WarnockPro-Semibold}, ItalicFont={WarnockPro-LightIt}]{WarnockPro-Light}
\usepackage{memhfixc}

\begin{document}
\pagestyle{empty}

\lipsum[1-3]

\begin{picture}(0,0)(0,0)
\put(270,530){\resizebox{5.5cm}{!}{\includegraphics{USZT}}}
\end{picture}

\begin{picture}(0,0)(0,0)
\put(270,-100){\resizebox{5.5cm}{!}{\includegraphics{ESZA_egyes3}}}
\end{picture}

\end{document}

• Hard to tell. Is this the first error reported in the .log file? Can you post that part of the .log? – Andrew Swann Aug 30 '16 at 15:21
• Is resizebox really necessary? Tra with \begin{picture}(0,0)(0,0) \put(270,530){\includegraphics[width=5.5cm]{USZT}}} \end{picture}. However, to be more defined, please provide small but cmolete document (with dummy text), which we ca compile and see, what is the problem. It seems, that is not particular related to memoir package ... – Zarko Aug 30 '16 at 15:26
• the .log part says: \@outlinefile=\write4 \openout4 = egterv_6.1.2.out'. ! Dimension too large. <to be read again> b l.81 ...sizebox{5.5cm}{!}{\includegraphics{USZT}}} I can't work with sizes bigger than about 19 feet. Continue and I'll use the largest value I can. File: USZT.jpg Graphic file (type QTm) <use "USZT.jpg" > – xatt Aug 30 '16 at 15:28
• \resizebox seems superfluous, as was already said. But the real issue is that would-be helpers would be helped by having a real MWE to work with.... – jon Aug 30 '16 at 15:47
• Thanks for all of you. I have put a dummy into the original question. – xatt Aug 30 '16 at 16:20

This is extend comment (in comment I cant add picture ...) and I will delete it after while. Your troubles aren't caused by code, since using demo images from graphics package works as expected:

So, I conclude, that you problems is caused by picture. probably they haven't properly defined bounding box. I made test with XeLaTeX, but without your fonts (I haven't them):

\documentclass[11pt, a4paper, oneside]{memoir}
\usepackage[showframe]{geometry}
%\usepackage{calc}
\usepackage[demo]{graphicx}
%\usepackage{xfrac}
%\usepackage{multirow}
%\usepackage{float}
%\usepackage{wrapfig}
\usepackage{lipsum}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
%\defaultfontfeatures{Mapping=tex-text, Numbers=OldStyle}
%\setromanfont[Ligatures={Discretionary},BoldFont={WarnockPro-Semibold}, ItalicFont={WarnockPro-LightIt}]{WarnockPro-Light}
\usepackage{memhfixc}
pdftitle={bla},pdfauthor={BLA}}

\begin{document}
\lipsum[1]

\begin{picture}(0,0)(0,0)
\put(245,-120){\includegraphics[width=5.5cm]{USZT}}
\end{picture}

\begin{picture}(0,0)(0,0)
\put(245,-240){\includegraphics[width=5.5cm]{ESZA_egyes3}}
\end{picture}
\end{document}
`
• I tried, with exactly the same parameters as you suggested... the same dimension error... – xatt Aug 30 '16 at 19:23
• But I tried the same (your suggested) file with an other picture and it worked, even the other picture with my original code worked well. So it is the original picture to blame now, it's clear, you are right. However, the question is still open, why did it work with TL2013 and why not with TL2016? Same code, same image files. Anyway, thanks for your efforts. Appreciated. – xatt Aug 30 '16 at 19:40