-1

When I am executing the TeX file below, the warning:

Cannot patch \document,(auxhook) using \AtBeginDocument instead.

is given. plz solve this problem.

\documentclass{article}
\usepackage{docmute}
\usepackage{hyperref}
\begin{document}
    Lorem ipsum
\end{document}
3
  • 4
    Welcome to TeX.SX! Do you think we can make anything useful out of I am facing below given problem when executing the Tex file Cannot patch \document,(auxhook) using \AtBeginDocument instead. plz solve this problem??? Please provide the document that causes this problem Commented Apr 24, 2016 at 6:30
  • 4
    We are not here to solve your problems, we are here to help you (Ok, mostly the others, but anyway). Solving your problems is your job. If you want us to help with your problem, help us to understand it. Commented Apr 24, 2016 at 6:53
  • Sorry, I am really shocked: the colleague user103987 did provide a file to reconstruct. Commented Apr 22, 2024 at 21:02

1 Answer 1

7

Package auxhook provides hooks for writing at the begin of .aux files. The typical usage case is providing command definitions (\providecommand) to disable commands, when the package, that defines the command, is no longer loaded. Therefore package auxhook needs access to the point right after opening the .aux files for writing. The main .aux file is opened in \begin{document}, therefore it tries to patch it. If the patching fails, because \document is changed by a class, package, newer LaTeX version or whatever, then it uses the official hook \AtBeginDocument. Depending on the used class and packages it might be a little too late. Therefore a warning is given. Probably the warning can be ignored in many or most cases. If you want clarity, then a minimal document for analysis is needed.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.