# mdframed broken in TeXLive2017

Since an update of TeXLive2017 through tlmgr yesterday, mdframed seems broken: the following MWE

\documentclass{article}
\usepackage{mdframed}
\begin{document}
test
\end{document}


throws this error (with latex,pdflatex, lualatex)

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.384   \kvsetkeys{mdf}{framemethod=default,}

? ^C! Interruption.
\GenericError  ...
\endgroup
l.384   \kvsetkeys{mdf}{framemethod=default,}


Maybe an error with xkeyval ?

• \kvsetkeys is not a xkeyval macro. Looks like kvoptions – user31729 Feb 7 '18 at 10:32
• I tested your code and there were no problems, but I have to update right now in order to see whether an update introduces the problem. mdframed itself has no upvotes for years now, however – user31729 Feb 7 '18 at 10:36
• Works ok after todays update. Perhaps a side effect of the etoolbox bug which appeared yesterday but is gone by now. – Ulrike Fischer Feb 7 '18 at 10:38
• After update there is no problem with mdframed etc. – user31729 Feb 7 '18 at 10:41
• No problem here either using a fully updated TL17. If the problem persists the OP should perhaps post the log file for a compilation of this very MWE. Perhaps there is a local package lurking around somewhere. – daleif Feb 7 '18 at 11:07

It's a problem due to the buggy etoolbox version 2.5b; with version 2.5c (released 2018/02/06 and today on TeX Live mirrors) it disappears.

With version 2.5b I get

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.384   \kvsetkeys{mdf}{framemethod=default,}


The error is not due to \kvsetkeys.

Update etoolbox to version 2.5c (released 2018/02/06 and on TeX Live mirrors since 2018/02/07) and the problem will be solved.