Interference between atbegshi and hyperref when producing table of contents headings on every page of TOC

Beuthe, Thomas thomas.beuthe at
Wed Feb 12 21:01:56 CET 2020

Thanks for the quick reply Ulrike.

> > The problem I was trying to solve is as follows: produce "TABLE OF CONTENTS" or "LIST OF TABLES" or "LIST OF FIGURES" headers over every page with these elements.
> > A search leads to discussion of this topic and suggested solutions involving the atbegshi package.
> That is certainly the last thing I would try. headers and footers
> can be setup with fancyhdr or scrlayer-scrpage or with tools of the
> involved class.

Interesting.  I got the same reaction earlier in private communication.

> > This seemed to work well, but then I noticed that all of the
> > backrefs produced the hyperref package broke and now only pointed
> > to the first page of the document.
> yes. Pageanchors are setup with atbegshi too, and avoiding side
> effects needs quite some knowledge. Drop the idea to use atbegshi
> unless you can come up with a very good example that demonstrates
> why fancyhdr or scrlayer-scrpage doesn't work.

I agree, using headers would be the ideal solution if I was producing
a document by myself and under my own control. But I am not.
I am trying to layer this functionality into a template that diverse
other people will use within the organization.
To start their document, all they have to do is say:

(fill in the values of a bunch of variables first, and then:)

\chapter{Let's Start With Chapter 1!!}
(and so on)

No messing around with headers to achieve the desired effect,
because I really can't expect them to do this.
Just a simple and automatic method that still allows them
full normal control over the placement of the TOC, LOF, LOT in the normal way.

So unfortunately I have to go with this. I will take my lumps if something goes wrong,
and at least the damage would be relatively limited.
But I would still be interested if I am potentially harming anything else with my approach,
or if there is anything I should be considering to minimize a possible mess.

This email is confidential between the sender and the intended recipient specified in the message, and may contain proprietary or otherwise protected information of the intended parties. If you received this email in error, please notify the sender immediately and confirm you have deleted this message. Any unauthorized review, disclosure, retransmission, dissemination or other use of or reliance on this information may be unlawful and is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the texhax mailing list.