1

The following code used to compile with TeX Live 2014, but does not compile with TeX Live 2015. I now get the error:

! Missing \endgroup inserted.
<inserted text>
                \endgroup
l.158   \closing{Yours Sincerely}

This may be related to changes in KOMA. None of the other relevant package appear to have changed recently. I'd be interested in an explanation of why this no longer works.

\documentclass[12pt]{scrlttr2}
\usepackage{mdframed}
\surroundwithmdframed[linewidth=2pt]{tabular}

\usepackage[T1]{fontenc}
\usepackage{fouriernc}

\begin{document}

\def\today{6th April, 2015}
\begin{letter}{Addressee}

  \opening{Dear,}

  \closing{Yours Sincerely}

\end{letter}
\end{document}
Faheem Mitha
  • 7,778
  • \closing uses a tabular internally while measuring the width of itself. Surrounding that with a frame leads to the error message you encounter as shown in chat already. – Johannes_B Dec 14 '15 at 10:30
  • @Johannes_B And why on earth don't you give an answer instead of a comment? You waste my time with this behaviour! – Keks Dose Dec 14 '15 at 14:02
  • @KeksDose Sorry for wasting your time. Please post an answer. – Johannes_B Dec 14 '15 at 14:03
  • From looking at my history, it looks lke my "solution" was simply to remove the line \surroundwithmdframed[linewidth=2pt]{tabular}. – Faheem Mitha Jun 10 '16 at 16:47

1 Answers1

2

The \closing is a very special tabular environment.

Boiling down to the absolute minimum, the following MWE comes up:

\documentclass{article}
\usepackage{mdframed}
%\surroundwithmdframed[linewidth=2pt]{tabular}
\begin{document}
\newlength{\faheem}
\settowidth{\faheem}{%
    \begin{mdframed}
    \begin{tabular}{l}
        lala
    \end{tabular}
\end{mdframed}
}
\end{document}

You cannot use frames inside a \settowidth command. You cannot have a frame inside

Johannes_B
  • 24,235
  • 10
  • 93
  • 248
  • I'm not following exactly what goes wrong here. Can you elaborate? Specifically, what does the settowidth command correspond to in my original code? – Faheem Mitha Jun 10 '16 at 17:03
  • @FaheemMitha We talked about this in december, i just looked at the chat transscript and copied the example over here since an answer was requested. Can you check the transscript if you see anything helpful for you? If so, you can add it to the answer. If not, ping me and i will add something later. – Johannes_B Jun 10 '16 at 17:20
  • Could you add a url for the relevant portion of the chat transcript? Thanks. – Faheem Mitha Jun 10 '16 at 18:25
  • @FaheemMitha http://chat.stackexchange.com/transcript/41?m=26153761#26153761 – Johannes_B Jun 11 '16 at 06:55