title: How can I check in latex whether a new chapter starts on current page?
body: <p>I am using the <a href="https://www.ctan.org/tex-archive/macros/latex/contrib/everypage?lang=de" rel="nofollow">everypage</a> package. Using the \AddEverypageHook command I can repeat actions at the beginning of every page of a document. Now I want to do something like this:</p>
  
  <pre><code>\AddEverypageHook{
    \if "New chapter starts at current page." - "Do stuff." 
    \else "Do other stuff."
    \fi
  }
  </code></pre>
  
  <p>How can I check in latex, whether a  new chapter starts at the current page?</p>