
Perguntas semelhantes foram feitas, mas descobri que não ajudam em nada. Quando tento fazer referência a uma equação no texstudio, tudo que recebo é ?? Um exemplo de código que inseri que faz isso (peguei da Wikipedia) é:
\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}
Em vez de exibir um número, acabei de receber ??
e, sim, compilei mais de uma vez.
Para completar, incluirei o início do meu código:
\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}
Responder1
Você precisa especificar a opção amsmath
(além da opção thmmarks
) ao carregar o ntheorem
pacote. (Veja também a seção 3.2.1 do guia do usuário do ntheorem
pacote.)