
類似的問題也被問過,但我發現它們沒有幫助。當我嘗試在 texstudio 中引用方程式時,我得到的只是 ??我插入的執行此操作的程式碼範例(我從維基百科獲取)是:
\begin{equation} \label{eq:solve}
x^2 - 5 x + 6 = 0
\end{equation}
\begin{equation}
x_1 = \frac{5 + \sqrt{25 - 4 \times 6}}{2} = 3
\end{equation}
\begin{equation}
x_2 = \frac{5 - \sqrt{25 - 4 \times 6}}{2} = 2
\end{equation}
and so we have solved equation ~\ref{eq:solve}
它沒有顯示我只是得到的數字??
,是的,我已經編譯了不止一次。
為了完整起見,我將包含程式碼的開頭:
\documentclass{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{MnSymbol}
\usepackage[thmmarks]{ntheorem}
\theoremheaderfont{\bfseries}
\theorembodyfont{\normalfont}
\theoremseparator{:}
\theoremsymbol{$\square$}
\newtheorem*{proof}{Proof}[chapter]
\newtheorem{prop}{Proposition}[chapter]
\newtheorem{corollary}{Corollary}[chapter]
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{lemma}{Lemma}
\numberwithin{theorem}{section}
\numberwithin{prop}{section}
\numberwithin{corollary}{section}
\numberwithin{lemma}{section}
答案1
載入包時需要指定選項amsmath
(除了 option 之外) 。 (另請參閱軟體包使用者指南的第 3.2.1 節。)thmmarks
ntheorem
ntheorem