# Undefined control sequence error on \fancy@reset, \f@ncyolh and \f@ncyorh when using newlfm class

I updated to TeXLive 2017 and couldn't get newlfm.cls to work without errors. Here is a minimal example:

\documentclass{newlfm}
\begin{document}
\begin{newlfm}
\end{newlfm}
\end{document}


LaTex is throwing undefined control sequence errors on \fancy@reset, \f@ncyolh, and \f@ncyorh.

What causes the errors? What am I missing?

• Welcome to TeX.SX! The fancyhdr package has been updated and those macros have been removed. This happens when a class/package uses internals of another package. – egreg Jun 29 '17 at 20:53
• ...and there's technically very little need to use newlfm since everything in terms of the layout can be recreated using the default article class. – Werner Jun 29 '17 at 21:00
• @egreg: thanks for the pointer. It works now after patching newlfm.cls according to the new fancyhdr macros. For anyone who is interested, here is a patch: pastebin.com/F3KcpYYJ – wto Jun 30 '17 at 2:44
• And the complete patched newlfm: pastebin.com/5bkkMEap – Martin Monperrus Oct 10 '17 at 15:10

Presumably the following patch (via etoolbox) suffices:

\usepackage{etoolbox}

\makeatletter

The error resulted from hard-coding package-dependent variables, which was changed in an updated release of fancyhdr. By adding the above to your preamble, the older fancyhdr names will be substituted for the newer names.