4

The following mwe

\documentclass{scrartcl}
\usepackage[demo]{graphicx}
\newlength{\testlength}
\setlength{\testlength}{.75\linewidth}
\begin{document}
\includegraphics[width=\testlength]{demo}

\includegraphics{demo}

\includegraphics[width=.75\linewidth]{demo}
\end{document}

Compiled with:

 This is pdfTeX, Version 3.1415926-2.5-1.40.14 

gives

enter image description here

after updating to texlive 2015

This is pdfTeX, Version 3.14159265-2.6-1.40.16

enter image description here

and

Zeile 6: Overfull \hbox (5736.69446pt too wide) in paragraph

I would like to define a width for all my figures, is this expected behavior?

0

1 Answer 1

3

If I compile with TeX Live 2014, adding \showthe\linewidth, I get

418.25555pt

With TeX Live 2015, instead, I get

8191.99998pt

This is apparently due to a change in KOMA-Script classes. On the other hand, it doesn't make much sense to set the length to 0.75\linewidth in the preamble, because \linewidth is a length that varies in the document.

You probably want

\newcommand\testlength{\dimexpr0.75\linewidth\relax}

so \testlength can take the current value of \linewidth. Or, if you want the length to be three quarters of the text width, do

\newlength{\testlength}
\AtBeginDocument{\setlength\testlength{0.75\columnwidth}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .