LaTeX 错误:此处没有结束行

LaTeX 错误:此处没有结束行

我的问题很简单:下面的代码有什么问题?

\begin{proof}
Let $N = (Q, \sum, \delta, q_0, F)$ be the NFA recognising some language $A$. We construct a DFA $M = (Q_1, \sum, \delta_1, q_1, F_1)$ recognising $A$. Before doing that full construction, let's first consider the easier case wherein $N$ has no $\epsilon$ arrows. Later, we take the $\epsilon$ arrows into account.
\begin{enumerate}
\item $Q' = \mathcal{P}(Q)$, i.e. every state of $M$ is a set of states of $N$.
\end{enumerate}
\end{proof}

请注意,在此证明环境之前我能够使用其中的所有内容...

我花了半个小时试图找出问题所在,似乎有人在跟我开玩笑,这让我无法工作,而我只有几个小时来完成这个问题。

谢谢!

答案1

你对环境的重新定义proof非常是错的,最好坚持一个amsmath

如果您不喜欢关键字“Proof”用斜体显示,而更喜欢用粗体斜体显示(我不会),您可以很容易地做到这一点:

\documentclass{article}
\usepackage{amsthm}
\usepackage{xpatch}

\xpatchcmd{\proof}{\itshape}{\bfseries\itshape}{}{}

\begin{document}

\begin{proof}
Let $N = (Q, \sum, \delta, q_0, F)$ be the NFA recognising some language $A$. We construct a DFA $M =
(Q_1, \sum, \delta_1, q_1, F_1)$ recognising $A$. Before doing that full construction, let's first
consider the easier case wherein $N$ has no $\epsilon$ arrows. Later, we take the $\epsilon$ arrows
into account.
\begin{enumerate}
\item $Q' = \mathcal{P}(Q)$, i.e. every state of $M$ is a set of states of $N$.
\item $Q' = \mathcal{P}(Q)$, i.e. every state of $M$ is a set of states of $N$.\qedhere
\end{enumerate}
\end{proof}

Text following the proof will be separated from the proof.

\end{document}

请注意,当证明以列表环境或显示结束时,您应该通过发出来帮助 LaTeX \qedhere,否则不需要。

在此处输入图片描述

如果你想要一个黑色的墓碑,只需添加

\renewcommand{\qedsymbol}{$\blacksquare$}

并加载amssymb

\documentclass{article}
\usepackage{amsthm,amssymb}
\usepackage{xpatch}

\xpatchcmd{\proof}{\itshape}{\bfseries\itshape}{}{}
\renewcommand{\qedsymbol}{$\blacksquare$}

\begin{document}

\begin{proof}
Let $N = (Q, \sum, \delta, q_0, F)$ be the NFA recognising some language $A$. We construct a DFA $M = 
(Q_1, \sum, \delta_1, q_1, F_1)$ recognising $A$. Before doing that full construction, let's first 
consider the easier case wherein $N$ has no $\epsilon$ arrows. Later, we take the $\epsilon$ arrows 
into account.
\begin{enumerate}
\item $Q' = \mathcal{P}(Q)$, i.e. every state of $M$ is a set of states of $N$.
\item $Q' = \mathcal{P}(Q)$, i.e. every state of $M$ is a set of states of $N$.\qedhere
\end{enumerate}
\end{proof}

Text following the proof will be separated from the proof.

\end{document}

在此处输入图片描述

相关内容