![与数学相关的未定义序列错误](https://linux22.com/image/479267/%E4%B8%8E%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3%E7%9A%84%E6%9C%AA%E5%AE%9A%E4%B9%89%E5%BA%8F%E5%88%97%E9%94%99%E8%AF%AF.png)
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath, amssymb, mathtools}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{prop}{Proposition}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{defn}{Definition}[section]
\begin{document}
\section{The intuitive Limit}
\begin{defn}
The line $x = a$ is said to be a \textit{vertical asymptote} for $f(x)$ if either of the one sided limits $x \longrightarrow a^+$ or x $\longrightarrow a^-$ is infinite; that is, if
\begin{center}
$\displaystyle{\lim_{x \to a^{\pm}}} f(x) = \infty,$\space\space or \space\space$\displaystyle{\lim_{x \to a^{\pm}}} f(x) = - \infty$
\end{center}
\end{defn}
\begin{prop}
Consider the rational function $f(x) = \frac{a_nx^n\, +\, \dots\, +\, a_1x\, +\, a_0}{b_mx^m\, +\, \dots\, +\, b_1x\, +\, b_0 }$.\
\begin{enumerate}
\item If $n > m$ then $\displaystyle{\lim_{x \to \pm\infty}} f(x) = \pm\infty$, with the sign dependent on the sign of $a_n/b_m$
\item If $n < m$ then $\displaystyle{\lim_{x \to \pm\infty}} f(x) = 0$
\item If $n = m$ then $\displaystyle{\lim_{x \to \pm\infty}} f(x) = \frac{a_n}{b_m}$.
\end{enumerate}
\end{prop}
\section{The Rigorous Limit}
\begin{defn}
Suppose that $c, L \in \R$ is an open interval containing $c$ If $f : I \to \R$, we say that the \textbf{limit of f as x approaches c is L}, and write
\begin{center}
$\lim{x \to c} f(x) = L$,
\end{center}
if for every $\varepsilon > 0$ there exists a $\delta > 0$ such that whenever $0 < \vert x - c \rvert < \delta$ then $\lvert f(x) - l \rvert < \varepsilon$.\ In terms of quantifiers:
\begin{center}
$\forall \varepsilon > 0, \exists \delta > 0, \forall x \in \R (0 < \lvert x - c \rvert < \delta \implies \lvert f(x) - L \rvert < \varepsilon)$.
\end{center}
\end{defn}
\end{document}
问题发生在“严格限制”部分,其中定义给出了“未定义的控制序列”错误。
答案1
我借此机会改进并简化了您的代码:
我不明白为什么你将公式放在center
环境中而不是使用 \[ ... \]
构造。
另一点是,在我看来,在斜体文本中,枚举标签应该是向上的,这很容易通过“enumitem”获得
最后,我使用了\mfrac
中的 (中等大小分数) ,这在本上下文中nccmath
看起来更好。请注意必须加载\tfrac
nccmath
前 mathtools
amsmath
,如果您加载前者,则无需加载,因为它是 amsmath 的扩展。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{nccmath, amssymb, mathtools}
\usepackage{enumitem}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{prop}{Proposition}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{defn}{Definition}[section]
\def\R{\mathbb{R}}
\begin{document}
\section{The intuitive Limit}
\begin{defn}
The line $x = a$ is said to be a \textit{vertical asymptote} for $f(x)$ if either of the one sided limits $x \longrightarrow a^+$ or x $\longrightarrow a^-$ is infinite; that is, if
\[ \lim_{x \to a^{\pm}} f(x) = \infty,\quad\text{or} \quad\lim_{x \to a^{\pm}} f(x) = - \infty \]
\end{defn}
\begin{prop}
Consider the rational function $f(x) = \mfrac{a_nx^n\, +\, \dots\, +\, a_1x\, +\, a_0}{b_mx^m\, +\, \dots\, +\, b_1x\, +\, b_0 }$.\
\begin{enumerate}[font=\upshape]
\item If $n > m$ then $\lim\limits_{x \to \pm\infty} f(x) = \pm\infty$, with the sign dependent on the sign of $a_n/b_m$
\item If $n < m$ then $\lim\limits_{x \to \pm\infty} f(x) = 0$
\item If $n = m$ then $\lim\limits_{x \to \pm\infty} f(x) = \dfrac{a_n}{b_m}$.
\end{enumerate}
\end{prop}
\section{The Rigorous Limit}
\begin{defn}
Suppose that $c, L \in \R$ is an open interval containing $c$ If $f : I \to \R$, we say that the \textbf{limit of f as x approaches c is L}, and write
\[ \lim_{x \to c} f(x) = L, \]
if for every $\varepsilon > 0$, there exists a $\delta > 0$ such that whenever $0 < \vert x - c \rvert < \delta$ then $\lvert f(x) - l \rvert < \varepsilon$.\ In terms of quantifiers:
\[ \forall \varepsilon > 0, \exists \delta > 0, \forall x \in \R (0 < \lvert x - c \rvert < \delta \implies \lvert f(x) - L \rvert < \varepsilon). \]
\end{defn}
\end{document}
答案2
确切的错误信息是:
./doc.tex:35: Undefined control sequence.
l.35 Suppose that $c, L \in \R
$ is an open interval containing $c$ If $f : I...
注意 后面的换行符\R
。这意味着 TeX 直到 都读到了\R
,但之后发现这个错误时却没有读到。你可以推断未定义的控制序列是\R
。事实上,它没有在你的文档中定义。定义它的一种方法是输入:
\newcommand*{\R}{\mathbb{R}}
之前\begin{document}
,使用了\mathbb
来自的命令amsfonts
,这是由加载的包amssymb
。结果\mathbb
如下:
另一种方法是使用:
\newcommand*{\R}{\mathbf{R}}
\mathbf
给出一个粗体 R,如下所示:
在这两种方式中,使用哪一种取决于个人喜好。还有第三种方式bm
:
\newcommand*{\R}{\bm{R}}
但请注意,在这种情况下,粗体 R 将以斜体显示;我不确定在这种情况下这是否可取:
答案3
找不到命令\R
。将其放在前言中:\newcommand\R{\mathbb{R}}
,它就会起作用。