我插入了以下方程式:
\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}
我收到了这条没有任何信息的警告信息:
我正在使用这两个包:
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{bm}
日志文件中有这些警告:
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>]
“.log”文件显示我插入了两次相同的方程式,但我没有。
可以看到,equation.3.2.1 是使用subequations
文件 3.2.1 小节中的包创建的此文件的第一个方程.tex
,而 equation.3.2.2 是它的第二个方程。在 3.2.2 节中,我定义了另一个方程,它也被标记为 equation.3.2.2,导致 latex 中出现此警告。
最后,该.aux
文件包含以下内容:
\@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}{}}
我曾尝试修复此问题,但不知道该如何解决。有人知道如何解决吗?谢谢您的建议。
答案1
您可能hyperref
在加载之前就加载了amsmath
。然后hyperref
无法在某些环境下正常工作amsmath
。为了避免此类问题,
\usepackage{hyperref}
应始终位于其他\usepackage
语句之后。
例如
\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}
正常工作,而
\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}
导致您注意到警告。