这种排列有什么问题?
语境:
首先,对这篇太长的文章表示歉意。
因此,我第一次在 LaTex 文章文档中使用对齐环境,但效果不佳。这是我的文章文档的序言:
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{parskip}
\usepackage[margin=1.25in]{geometry}
\usepackage[shortlabels]{enumitem}
\usepackage{graphicx}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{1pt}
\addtolength\parskip{3ex}
\fancyhfoffset{0.2cm}
\pagestyle{fancy}
\rfoot{Redacted}
\setcounter{secnumdepth}{4}
\addtolength{\footskip}{0.2in}
\newtheorem*{theorem}{\sc{Theorem}}
\newtheorem*{definition}{\sc{Definition}}
\newtheorem*{proposition}{\sc{Proposition}}
\newtheorem*{corollary}{\sc{Corollary}}
\newtheorem*{claim}{\sc{Claim}}
\newtheorem*{properties}{\sc{Properties}}
\newtheorem*{remark}{\sc{Remark}}
\DeclareMathOperator{\N}{\mathbb{N}}
\DeclareMathOperator{\Z}{\mathbb{Z}}
\DeclareMathOperator{\Q}{\mathbb{Q}}
\DeclareMathOperator{\R}{\mathbb{R}}
\DeclareMathOperator{\C}{\mathbb{C}}
\begin{document}
问题
在本文中,我想对齐一些方程式,因此我根据网上的一些指南使用了以下代码:
We can now use the Pythagorean Theorem to find PE in two different equations which utilise $x$ and hence solve for $x$:
\emph{From $\triangle$PEB:}
\begin{align*}
PE &= $\sqrt{BP^2 - x^2}$ \\
&= $\sqrt{10^2 - x^2}$ \\
&= $\sqrt{100 - x^2}$
\end{align*}
并且错误日志似乎也在自我纠正(即,它纠正了某些内容,然后尝试纠正它认为不正确的纠正...你知道吗?只需查看日志:)
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing { inserted.
<inserted text>
{
l.65 \end{align*}
I've put in what seems to be necessary to fix
the current column of the current alignment.
Try to go on, since this might almost work.
! Extra }, or forgotten $.
<recently read> }
l.65 \end{align*}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing { inserted.
<inserted text>
{
l.65 \end{align*}
I've put in what seems to be necessary to fix
the current column of the current alignment.
Try to go on, since this might almost work.
! Extra }, or forgotten $.
<recently read> }
l.65 \end{align*}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing { inserted.
<inserted text>
{
l.65 \end{align*}
I've put in what seems to be necessary to fix
the current column of the current alignment.
Try to go on, since this might almost work.
! Extra }, or forgotten $.
<recently read> }
l.65 \end{align*}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Extra }, or forgotten $.
<recently read> }
l.65 \end{align*}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing \endgroup inserted.
<inserted text>
\endgroup
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Misplaced \omit.
\math@cr@@@ ...@ \@ne \add@amps \maxfields@ \omit
\kern -\alignsep@ \iftag@ ...
l.65 \end{align*}
I expect to see \omit only after tab marks or the \cr of
an alignment. Proceed, and I'll ignore this case.
! Missing { inserted.
<inserted text>
{
l.65 \end{align*}
I've put in what seems to be necessary to fix
the current column of the current alignment.
Try to go on, since this might almost work.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Extra }, or forgotten $.
<recently read> }
l.65 \end{align*}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing \endgroup inserted.
<inserted text>
\endgroup
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Misplaced \omit.
\math@cr@@@ ...@ \@ne \add@amps \maxfields@ \omit
\kern -\alignsep@ \iftag@ ...
l.65 \end{align*}
I expect to see \omit only after tab marks or the \cr of
an alignment. Proceed, and I'll ignore this case.
! Missing { inserted.
<inserted text>
{
l.65 \end{align*}
I've put in what seems to be necessary to fix
the current column of the current alignment.
Try to go on, since this might almost work.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Extra }, or forgotten $.
<recently read> }
l.65 \end{align*}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Missing $ inserted.
<inserted text>
$
l.65 \end{align*}
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
! Missing \endgroup inserted.
<inserted text>
\endgroup
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Missing } inserted.
<inserted text>
}
l.65 \end{align*}
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.
! Misplaced \omit.
\math@cr@@@ ...@ \@ne \add@amps \maxfields@ \omit
\kern -\alignsep@ \iftag@ ...
l.65 \end{align*}
I expect to see \omit only after tab marks or the \cr of
an alignment. Proceed, and I'll ignore this case.
! Missing { inserted.
<inserted text>
{
l.65 \end{align*}
I've put in what seems to be necessary to fix
the current column of the current alignment.
Try to go on, since this might almost work.
所以基本上所有错误日志都让我感到困惑,我不太清楚该怎么办。希望有人能帮忙解决这个问题!
谢谢!
答案1
因此,正如评论中指出的那样,这是一个相对简单的修复 - 换句话说,对于一篇长篇文章来说,这是一个相对较短的答案:):
环境align
,就其本质而言,已经是数学模式,因此不要$
在其中使用。删除$
可获得所需的输出。
IE
We can now use the Pythagorean Theorem to find PE in two different equations which utilise $x$ and hence solve for $x$:
\emph{From $\triangle$PEB:}
\begin{align*}
PE &= \sqrt{BP^2 - x^2} \\
&= \sqrt{10^2 - x^2} \\
&= \sqrt{100 - x^2}
\end{align*}