3

This question already has an answer here:


This is a follow up question to How to hide known warnings?


Recently I decide to stop ignoring LaTeX warnings :), and start trying to discover what's behind them and how to avoid them in future (or solve the problems informed when they are real).

One of those warnings, which I thought I had already understood, was pdfTeX warning (ext4): destination with the same identifier. Now I know that it is related to a hyperref package confusion regarding subequations (at least).

Why are these warnings displayed? Are they unimportant? How can avoid them or at least silent if they don't afect my texts? What are the known incopatible packages with hyperref?

Below is a MWE. Compiling it just like it is showed will result five warnings of the same type. More and more warnings show up using subnumcases and empheq packages for creating subequations in the same project (to test them uncomment \usepackage{empheq}, \usepackage{cases}, and the three final equations).

\documentclass{article} 
%\usepackage{silence} 
\usepackage{hyperref}   
\usepackage{mathtools} %loads amsmath
%\usepackage{empheq} 
%\usepackage{cases} 
\begin{document}
\section{\LaTeX~MWE}
 hyperref + subequations problem:

\begin{subequations}\label{group1}
\begin{align}
a1 \label{a1} \\
a2 \label{a2} \\
a3 \label{a3}
\end{align}
\end{subequations}

\begin{subequations}\label{group2}
\begin{align}
b1 \label{b1} \\
b2 \label{b2} \\
b3 \label{b3}
\end{align}
\end{subequations}

%\begin{subnumcases}{}
  %X \label{X} \\
  %Y \label{Y} \\
  %Z \label{Z}
%\end{subnumcases}

%\begin{subequations}{} 
 %\begin{empheq}{align}
  %A  \label{A} \\ 
  %B  \label{B} \\
  %C  \label{C}
 %\end{empheq} 
%\end{subequations}

%\begin{subequations}
 %\begin{empheq}{align}
         %l \label{l} \\
     %q \label{q} \\
     %x \label{x}
  %\end{empheq}
%\end{subequations}
\end{document}

I found many topics topics that may be related but in none of them I found a definitive answer to my questions. In the post subequations, hyperref and cleveref a workaround that can be usefull in my case was suggested (but I don't know the cleveref package yet).

marked as duplicate by Andrew Swann, Sebastiano, Stefan Pinnow, user36296, Bobyandbob Oct 10 '18 at 8:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    Switch \usepackage{hyperref} and \usepackage{mathtools}. hyperref should basically always the last package to be included, since it does many redefinitions. Doing the other way round causes the warning messages. – user31729 May 20 '14 at 8:56
  • Your code is compiled without any errors in my machine. – Pattisahusiwa May 20 '14 at 10:08
  • 1
    @AsisPattisahusiwa The warnings are in the log file. Christian Hupfer's suggestion fixes the problem. – Andrew Swann May 20 '14 at 10:39
  • @AndrewSwann, I've seen the errors and I agree with both of you. – Pattisahusiwa May 20 '14 at 10:58
  • @ChristianHupfer yes that change eliminate the warnings, but I don't understand why. I thought the order of the packages wouldn't afect the result but clearly I am wrong. Should we always let referencing packages (like hyperref and biblatex) for the last? – Claudia May 21 '14 at 2:29