1

The following code leads to an endless loop. pdflatex is at 100% CPU and the log is constantly increasing with number counted upwards.

\documentclass{article}
\usepackage{mdframed}
\begin{document}
\mdframed
\vrule height 210mm
\endmdframed
\end{document}
topskip
  • 37,020
  • I get normal output in both cases (without commenting end-of-lines). Same version of mdframed. – egreg Feb 02 '12 at 21:06
  • I don't get any errors compiling your code with \usepackage[demo]{graphicx}, neither with framed nor mdframed (v1.2a). – cgnieder Feb 02 '12 at 21:12
  • 1
    Maybe try to get the latest version of l3kernel and its brothers? – yo' Feb 02 '12 at 21:24
  • 3
    I have done your homework, Matthias ;) (... and made a MWE) – topskip Feb 04 '12 at 18:08
  • 2
    A solution to the answer: you should buy a CRAY computer, a CRAY is the only computer that runs an endless loop in just 4 hours... – topskip Feb 04 '12 at 18:18
  • 1
    In cases like this it's very useful to run LaTeX from a terminal, rather than from the front-end; the behavior is clearly due to trying to fit an object which is bigger than the page in height. Running from the terminal would show immediately that TeX is shipping out pages after pages. – egreg Feb 04 '12 at 18:30
  • Sorry for not providing an answer. I have seen that a new release of mdframed is published on ctan. Is this problem adressed in the new release? – Matthias Pospiech Feb 05 '12 at 16:16

1 Answers1

4

Based on the example of Patrick, I can provide an answer.

The material of the environment mdframed is saved in a simple \vbox. Based on computed lengths related to the text height, the box will be split by \vsplit. Your material can't be split, so you run into an endless loop because mdframed repeats the splitting algorithm. Up to now there is no check for such situations.

In order to avoid the endless loop you can use the option nobreak. However the result is a blank page and the output itself.

\documentclass{scrartcl}
\usepackage{mdframed}
\usepackage{lipsum}
\begin{document}
\begin{mdframed}[nobreak=true]
 \vrule height 250mm
\end{mdframed}
\end{document}
egreg
  • 1,121,712
Marco Daniel
  • 95,681