0

I had inserted these equations:

\begin{subequations}
    \begin{align}   
        \rho(\bm{z}) = \bm{z}; 
        \label{eq.:Rho(z)=z} \\
        \bm{x}(\bm{z}) = \epsilon + (1 - \epsilon){\bm{z}}^p, & \quad \text{for } p \geqslant 1
        \label{eq.:SIMP}
    \end{align}
\end{subequations}

\begin{equation}
    \overline{\bm{z}} = \frac{\tanh\left(\beta\eta\right) + \tanh\left(\beta\left(\bm{z} - \eta\right)\right)}{\tanh\left(\beta\eta\right) + \tanh\left(\beta\left(1 - \eta\right)\right)}
    \label{eq.:HeavisideFnc}
\end{equation}

And I got this warning message with no info:

Warinig Message

I am using these two packages:

\usepackage{amsmath,amsfonts,amssymb} 
\usepackage{bm} 

There is these warning in the log. file:

Chapter 3.
<Imagens/Design_Domain.pdf, id=754, 262.73157pt x 184.43906pt>
File: Imagens/Design_Domain.pdf Graphic file (type pdf)

<use Imagens/Design_Domain.pdf>
Package pdftex.def Info: Imagens/Design_Domain.pdf used on input line 13.
(pdftex.def)             Requested size: 210.18552pt x 147.55144pt.
 [26

 <./Imagens/Design_Domain.pdf>] [27pdfTeX warning (ext4): destination with the 
same identifier (name{equation.3.2.1}) has been already used, duplicate ignored

    \AtBegShi@Output ...ipout \box \AtBeginShipoutBox 
                                                      \fi \fi 
    l.51 
         ] <Imagens/SIMP.pdf, id=800, 392.96812pt x 322.95656pt>
    File: Imagens/SIMP.pdf Graphic file (type pdf)

    <use Imagens/SIMP.pdf>
    Package pdftex.def Info: Imagens/SIMP.pdf used on input line 54.
    (pdftex.def)             Requested size: 392.96715pt x 322.95576pt.
    pdfTeX warning (ext4): destination with the same identifier (name{equation.3.2.
    2}) has been already used, duplicate ignored
    <to be read again> 
                       \relax 
    l.63 \begin{equation}
                          [28 <./Imagens/SIMP.pdf>]

The '.log' file says I have inserted the same equations twice, but I didn't.

Equation

As one can see, equation.3.2.1 is the first equation of this file created using subequations package in the subsection 3.2.1 of my .tex file and the equation.3.2.2 is the second equation of it. In section 3.2.2 I define another equation, which is also the labeled as equation.3.2.2, causing this warning in latex.

Finally, the .aux file has this:

\@writefile{toc}{\contentsline {section}{\numberline {3.2}Material Model}{27}{section.3.2}}
\newlabel{sec.:Model}{{3.2}{27}{Material Model}{section.3.2}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.1}Solid Isotropic Material with Penalization (SIMP)}{27}{subsection.3.2.1}}
\newlabel{subsec.:SIMP}{{3.2.1}{27}{Solid Isotropic Material with Penalization (SIMP)}{subsection.3.2.1}{}}
\newlabel{eq.:Rho(z)=z}{{3.1a}{27}{Solid Isotropic Material with Penalization (SIMP)}{equation.3.2.1}{}}
\newlabel{eq.:SIMP}{{3.1b}{27}{Solid Isotropic Material with Penalization (SIMP)}{equation.3.2.2}{}}
\citation{Leitao_et_al2018}
\citation{Lahuerta2012}
\citation{Lahuerta2012}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.2}Heaviside Projection Function}{28}{subsection.3.2.2}}
\newlabel{subsec.:Heaviside_Fnc}{{3.2.2}{28}{Heaviside Projection Function}{subsection.3.2.2}{}}
\newlabel{eq.:HeavisideFnc}{{3.2}{28}{Heaviside Projection Function}{equation.3.2.2}{}}

I had tried to fix this, but I didn't found how. Does anyone know how to solve this? Thanks in advice.

  • 1
    Could you post a full compilable code which reproduces the problems, not snippets? – Bernard Jul 26 '18 at 22:43
  • 2
    off-topic but tanh wouldn't really look nice, you should probably declare a new operator. Try \DeclareMathOperator{\tanh}{tanh} in the preamble and then you can use \tanh and it will look like tan and sin and cos and all the rest – Au101 Jul 26 '18 at 23:22
  • 3
    Actually ignore that and just use \tanh I think it comes free, but I do know some of them don't – Au101 Jul 26 '18 at 23:23
  • 2
    your warning clearly stated that you have two labels which are the same. since with given code snippet we cant reproduce your problem (it works fine), we can't further help you. – Zarko Jul 27 '18 at 4:58
  • 2
    @Zarko where in that log do you see anything about two labels with the same name? It is a duplicate hyperref identifier. The conclusion is the same though, we need a full mwe the generates this warning. It can be caused by al sorts of things. – daleif Jul 27 '18 at 5:32
2

You probably load hyperref before you load amsmath. Then hyperref does not work correctly with some environements from amsmath. To avoid prolems like this,

\usepackage{hyperref}

should always come after other \usepackage statements.

For example

\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{bm}
\usepackage{hyperref}
\begin{document}
\begin{subequations}
    \begin{align}   
        \rho(\bm{z}) = \bm{z}; 
        \label{eq.:Rho(z)=z} \\
        \bm{x}(\bm{z}) = \epsilon + (1 - \epsilon){\bm{z}}^p, & \quad \text{for } p \geqslant 1
        \label{eq.:SIMP}
    \end{align}
\end{subequations}

\begin{equation}
    \overline{\bm{z}} = \frac{\tanh\left(\beta\eta\right) + \tanh\left(\beta\left(\bm{z} - \eta\right)\right)}{\tanh\left(\beta\eta\right) + \tanh\left(\beta\left(1 - \eta\right)\right)}
    \label{eq.:HeavisideFnc}
  \end{equation}
\end{document}

works correctly, while

\documentclass{article}
\usepackage{hyperref}% -- BAD! Too early, hyperref should be last
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{bm}
\begin{document}
\begin{subequations}
    \begin{align}   
        \rho(\bm{z}) = \bm{z}; 
        \label{eq.:Rho(z)=z} \\
        \bm{x}(\bm{z}) = \epsilon + (1 - \epsilon){\bm{z}}^p, & \quad \text{for } p \geqslant 1
        \label{eq.:SIMP}
    \end{align}
\end{subequations}

\begin{equation}
    \overline{\bm{z}} = \frac{\tanh\left(\beta\eta\right) + \tanh\left(\beta\left(\bm{z} - \eta\right)\right)}{\tanh\left(\beta\eta\right) + \tanh\left(\beta\left(1 - \eta\right)\right)}
    \label{eq.:HeavisideFnc}
  \end{equation}
\end{document}

leads to the warning you noticed.

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.