I'm using subfiles within my report (written on sharelatex), when I compile a subfile it produces a warning. Am I doing something wrong or is this normal?


% \usepackage{acronym}

some text



/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/auxhook.sty Package auxhook Warning: Cannot patch \document, using \AtBeginDocument instead.

When I compile the main document it does not produce this warning.

The raw log file produces this warning

...... Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) Package auxhook Warning: Cannot patch \document, (auxhook) using \AtBeginDocument instead. ) (/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/kvoptions.sty Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) ....


I'm using the following packages:

% Used for referencing  
% For writing remarks in the text (is this going to be used?)  
% used to write and render different subfiles  
% used to draw boxed problems  
% for subcaptions in combined figures  
% used for Epigraphs of course  
% Makes weblinks clickable  
% used to display pictures  
% used to add urls with strange symbols  
% used for H command in figures  
% used for tickz pictures (Causes a warning)  
%used for the acronym page [printonlyused,withpage] are options  

% ######################### open section for code appendix #######################  
| improve this question | | | | |
  • 1
    I don't see your error but any file with \documentclass[report]{subfiles} shouldn't have a preamble. (Subfile uses the preamble from report.tex in any "subfile".) The line \usepackage{acronym} should be in report.tex. Try moving your preamble into the main file and see if this fixes the problem. – Andrew Aug 17 '16 at 11:36
  • @Andrew Thanks for the reply! Moving the package did not solve it unfortunately. However beginning a blank project indeed does not produce this error indeed. Did not thought of that. I use the TU Delft latex report template which has some lay out already configured. It seems auxhook is being called as a package (although I cannot see where) and produces this warning. I included the raw error log in my main question for clarity. – YouKnowWho Aug 17 '16 at 12:08
Package auxhook Warning: Cannot patch \document, (auxhook) using \AtBeginDocument instead.

I cannot see any error in this message that clearly says that it is a warning. Also the warning informs that the package can use and uses an alternative course of action.

The probability is quite high, that the warning can be ignored.

My typical use case for package auxhook is that I am using it to provide definition of macros at the begin of the .aux files, before they are used:

  • This avoids trouble, if a .aux file is read by another document.
  • Also the removal of a package does not invalidate the .aux files because of undefined commands.
| improve this answer | | | | |

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.