7

After updating my MiKTeX 2.9 package, .tex files which compiled perfectly with 0 error 0 warning now gives 0 error 1 warning:

Package etoolbox Warning: Patching '\begin' failed!  (pdflatex)
(etoolbox)  'AtBeginenvironment' will not work

A minimum working example is

\documentclass[11pt]{article}
\usepackage{html}
\usepackage{datetime}
\begin{document}
   MWE!
\end{document}

I don't really like to let unanswered warnings piling ups at the end of compilations, what, short of not using one of the two packages, can I do to suppress the warning?

  • 1
    Beware of using html.sty: it's a rather old and unmaintained package. – egreg Aug 19 '13 at 8:50
5

Because the minimum working example is short enough, it is tempting to try to run the datetime package before the html one, it gives

\documentclass[11pt]{article}
\usepackage{datetime}
\usepackage{html}
\begin{document}
  MWE!
\end{document}

Surprisingly, it works, there is no more warning!

  • 1
    Probably what happens here is that datetime loads etoolbox and patches successfully, while in the MWE in the question the html package probably alters \document in some very odd way. An alternative work around would therefore be to load etoolbox directly at some stage before loading html. – Joseph Wright Aug 19 '13 at 6:03
  • 1
    In a different document using revtex4-1, I resolved a similar warning by loading etoolbox immediately after declaring \documentclass. – EL_DON Jul 24 '18 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.