
\ref 명령이 정렬된 방정식에 필요한 것보다 더 높은 숫자 1을 조판하는 문제가 있습니다. 방정식의 번호는 올바르게 지정되었지만 참조가 꺼져 있습니다. align의 마지막 방정식에 대한 \ref 호출은 ??만 인쇄합니다. 방정식 환경이 올바르게 작동합니다.
\documentclass{pnastwo}
\usepackage[xdvi]{graphicx}
\usepackage{amsmath}
\usepackage{xfrac}
\usepackage{refcount}
\begin{document}
\begin{article}
\begin{align}
vt=d\\\nonumber
\label{eq:1}
\end{align}
\begin{align}
\frac{d}{t}=v\\\nonumber
\label{eq:2}
\end{align}
\begin{equation}
t=\frac{d}{v}\\\nonumber
\label{eq:3}
\end{equation}
Here is the first reference: \ref{eq:1}
And here is the second: \ref{eq:2}
And here is the third: \ref{eq:3}
\end{article}
\end{document}
생산하다
첫 번째 참조는 다음과 같습니다. 2
그리고 두 번째는 다음과 같습니다. ??
그리고 여기 세 번째가 있습니다: 3
답변1
또는 와 \\
같은 환경에서는 후행이 있어서는 안 됩니다 . 한 줄 디스플레이에도 또는 를 사용하면 안 됩니다 . 게다가 내부에서는 아무것도 하지 않습니다 .align
gather
align
gather
\\
equation
이 \label
명령은 해당 명령이 속하는 표시 줄을 나타냅니다. \nonumber
LaTeX를 혼란스럽게 한 후에 제공합니다 .
\documentclass{pnastwo}
\usepackage{amsmath}
\usepackage{lipsum} % just for the example
\begin{document}
\begin{article}
\lipsum*[1]
\begin{align}
vt &= d \label{eq:1} \\
\frac{d}{t} & =v \label{eq:2}
\end{align}
\lipsum*[3]
\begin{equation}
t=\frac{d}{v} \label{eq:3}
\end{equation}
\lipsum[4]
Here is the first reference: \ref{eq:1}
And here is the second: \ref{eq:2}
And here is the third: \ref{eq:3}
\end{article}
\end{document}
최종 메모
패키지 lipsum
는 단지 텍스트를 제공하기 위한 것입니다. xdvi
다음 옵션을 사용하지 마십시오 graphicx
. 존재하지만 이전 버전과의 호환성을 위해서만 사용됩니다. 와 같은 드라이버를 사용하지 않는 경우에는 dvipdfmx
옵션을 제공해서는 안 됩니다. 또한 예제에 필요하지 않은 패키지도 제거했습니다.