Edit: The class smfart is one of several classes created by the Société Mathématique de France for typesetting mathematics. Here is its CTAN page, where it lies under smflatex, and here is the documentation.

Briefly put, the class smfart, when combined with hyperref, does not properly link to the theorem environment.

Here is a minimal working example:




Consider \ref{thetheorem}


I compile by running pdflatex on the file twice. The second time, you get the following error message:

pdfTeX warning (dest): name{smfthm.0.1} ha
s been referenced but does not exist, replaced by a fixed one

It is not difficult to check that the hyperlink which should link to the theorem actually links to the very beginning of the document.

What is going on here? Is there a known way to fix this?

  • 1
    Since smfart is not a known class, it might be an idea to provide a link to where one can get this (it is not listed on CTAN).
    – daleif
    Jun 11 '14 at 15:19
  • 2
    The problem seems to lie in the fact that smfart loads amsthm but also modifies the meaning of several commands of this package, while hyperref works under the assumption that these commands are not redefined.
    – egreg
    Jun 11 '14 at 16:20

The smfart class changes the definitions related to new theorems, after loading amsthm, in particular \@begintheorem.

Now hyperref sees that amsthm is loaded and so hooks in \@begintheorem expecting it to be the same as provided by the package, but it is not. Conflict ensues.

Since smfart and the other similar classes are not on CTAN it is very unlikely that Heiko Oberdiek takes action for coping with it. This is a job for the developers of the class, if they want to support hyperref in their documents.

  • Hi, do you know if there is some "hack" we can use to fix this problem while we wait for the class developers to solve the issue?
    – vap
    Apr 8 '18 at 19:48
  • @vap Sorry, no.
    – egreg
    Apr 8 '18 at 20:18

Inserting a \phantomsection before \label{bla} fixes this issue. See also here.


Inspired by the observation of egreg, I've compared the files smfart.cls and amsthm.sty. It seems that there are two crucial lines in the amsth.sty version of \@begintheorem which are missing in the smfart.cls version, namely


Adding these two lines into the definition of \@begintheorem in smfart.cls seems to resolve the problem. Here is an example of modification:

  \ifdim\wd\@tempboxa>0.7\linewidth \smf@skippttrue\fi
  \item [\thm@indent]%
  %%    \hskip\z@\ignorespaces
  \thmheadnl % possibly a newline.
   \global\@inlabeltrue   %the two lines 
   \everypar\dth@everypar %borrowed from amsthm

I would be happy if anyone can kindly explain the meaning of these two lines.

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.