【问题标题】:LaTeX align environment missing $ insertedLaTeX 对齐环境缺少 $ 插入
【发布时间】:2015-11-16 06:51:15
【问题描述】:

我在证明中使用了 Align 环境,并且收到错误“插入的缺失 $”。除了 align 的第一行之外,我已经将所有内容都注释掉了,这会使错误消失,但我仍然无法弄清楚问题所在。我找不到任何解决方案。我错过了什么吗?

\documentclass[12pt,letterpaper]{article}
\usepackage{ifpdf, enumerate}
\usepackage{mla}
\usepackage{gb4e}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{stmaryrd}

\newcommand{\tuple}[1]{\ensuremath{\left \langle #1 \right \rangle }}
\newcommand{\evaluation}[2][]{\ensuremath{\llbracket #2\rrbracket^{#1}}}

\begin{document}

\begin{proof}
  \begin{align*} 
    \evaluation[\mathbb{M}]{(Mx)(D (x) \& V (x))} = 1 \iff \\
    \evaluation[\mathbb{M}]{\lbrack \alpha / x \rbrack (D (x) \& V (x))} = 1 \text{for most constants \alpha} \\
    \evaluation[\mathbb{M}]{(D (\alpha) \& V (\alpha))} = 1 \text{for most constants \alpha } \\
    \evaluation[\mathbb{M}]{D (\alpha)} = 1 \text{and} \evaluation[\mathbb{M}]{V (\alpha)} = 1 \text{for most constants \alpha } \\
    F(\alpha) \in F(D) \text{and} F(\alpha) \in F(V) \text{for most constants \alpha } \\
    \intertext{Examining the definitions of the model, we see that there are only four entities that are both in $F(D)$ and $F(V)$: Alice, Bob, Colin, and David. Because this is not more than half of the total twelve entities in the universe, our naive definition of ``most'' is not satisfied. Therefore the statement is false, which implies that the truth value of the origenal proposition is not 1.}
  \end{align*}
\end{proof}

\end{document}

这是错误消息的样子。

    ./test.tex:24: Missing $ inserted.
<inserted text>
                $
l.24   \end{align*}

?

【问题讨论】:

    标签: latex pdflatex


    【解决方案1】:

    您只漏掉了一个棘手的事实:\alpha 仅适用于数学模式,所以如果您替换所有出现的

    \text{for most constants \alpha} \\
    

    (第 18、19、20、21 行)与

    \text{for most constants }\alpha \\
    

    那么你的 tex 将顺利编译。另外:

    \text{for most constants}\ \alpha \\
    

    或:

    \text{for most constants $\alpha$} \\
    

    正如您在代码的第 22 行中所做的那样 (...$F(D)$ and $F(V)$...)。

    【讨论】:

    • 完美运行!谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-07
    • 1970-01-01
    • 2020-08-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多