[Tex/LaTex] LuaLaTeX, TeXLive 2016, standalone: undefined control sequence

luatexstandalonetexlivetexlive-2016

Since I installed TeXLive 2016 I cannot build documents with the standalone document class any more using LuaLaTeX (PDFLaTeX works fine). For example:

\documentclass{standalone}
\begin{document}
hi
\end{document}

Gives me:

! Undefined control sequence.
\sa@placebox ->\newpage \global \pdfpagewidth 
                                              =\wd \sa@box \global \pdfpageh...

l.4 \end{document}

How to fix that?

Best Answer

The fix is easy: add \RequirePackage{luatex85} as the very first line, a temporary workaround until standalone is updated. It should do no harm even after the update.

\RequirePackage{luatex85}
\documentclass{standalone}
\begin{document}
hi
\end{document}
Related Question