Document Classeshyperref | Problem with Footnotes in a custom Class

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Igognito
Posts: 2
Joined: Wed Jun 27, 2012 2:54 pm

hyperref | Problem with Footnotes in a custom Class

Post by Igognito »

Hello,

I'm getting the following message:
pdfTeX warning (dest): name{Hfootnote.1} has been referenced but does not exist, replaced by a fixed one.
I'm using a custom class for the document (see attachments). I have searched and found out that usually this is resolved by loading the package hyperref as the last package. But this is not the case in my problem.

I believe that the class should be modified to solve this problem, but I have no idea where to start from. Could anyone give me a suggestion?

Thank you in advance.

ps: I have attached the class and a minimal working example that throws the warning. It is possible that you might get also a language related warning that is not important in my case. I believe it is related with installed packages on the computer as depending the PC I use I get the warning or not.
Attachments
mwe.tex
The minimal working example
(84 Bytes) Downloaded 313 times
adsphd.cls
The document class I'm using
(49.7 KiB) Downloaded 294 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

hyperref | Problem with Footnotes in a custom Class

Post by Stefan Kottwitz »

Hi,

welcome to the board!

It seems that the problem is caused by a wrong loading order of setspace and hyperref: setspace has to be loaded before hyperref, the class does it wrong.

Besides fixing it in the class, you can solve it by loading setspace yourself earlier, i.e. before the class. This MWE works without warning:

Code: Select all

\RequirePackage{setspace}
\documentclass[print]{adsphd}

\begin{document}
blah \footnote{test}
\end{document}
Stefan
LaTeX.org admin
Igognito
Posts: 2
Joined: Wed Jun 27, 2012 2:54 pm

Re: hyperref | Problem with Footnotes in a custom Class

Post by Igognito »

Thank you.

That removed plenty of warnings :D

Cheers
Post Reply