我在使用数学包或命令时遇到了麻烦,我无法分辨。
我有以下包裹:
\usepackage{float}
\usepackage{gensymb}
\usepackage{courier}
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{rotating}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{mathtools}
\usepackage{multirow}
下面的简单文本无法编译:
pixels, $Y$, and a similar set of predicted segmentation, $Y^'$ (in the binary case, i.e. where $Y_i$,
$Y_i^'$ $\in{0,1}, \forall i \in[1,n]$ is as follows in Equation \ref{eq:iou}:
结果是:
Missing { inserted.
Check that your $'s match around math expressions. If they do, then you've probably used a symbol in normal text that needs to be in math mode. Symbols such as subscripts ( _ ), integrals ( \int ), Greek letters ( \alpha, \beta, \delta ), and modifiers (\vec{x}, \tilde{x} ) must be written in math mode. See the full list here.If you intended to use mathematics mode, then use $ … $ for 'inline math mode', $$ … $$ for 'display math mode' or alternatively \begin{math} … \end{math}.
<to be read again>
^
l.463 ...milar set of predicted segmentation, $Y^'
$ (in the binary case, i.e...
A left brace was mandatory here, so I've put one in.
You might want to delete and/or insert some corrections
so that I will find a matching right brace soon.
(If you're confused by all this, try typing `I}' now.)
! Missing } inserted.
<inserted text>
}
l.463 ...ilar set of predicted segmentation, $Y^'$
(in the binary case, i.e....
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.
Check that your $'s match around math expressions. If they do, then you've probably used a symbol in normal text that needs to be in math mode. Symbols such as subscripts ( _ ), integrals ( \int ), Greek letters ( \alpha, \beta, \delta ), and modifiers (\vec{x}, \tilde{x} ) must be written in math mode. See the full list here.If you intended to use mathematics mode, then use $ … $ for 'inline math mode', $$ … $$ for 'display math mode' or alternatively \begin{math} … \end{math}.
<to be read again>
^
l.464 $Y_i^'
$ $\in{0,1}, \forall i \in[1,n]$ is as follows in Equation \ref...
A left brace was mandatory here, so I've put one in.
You might want to delete and/or insert some corrections
so that I will find a matching right brace soon.
(If you're confused by all this, try typing `I}' now.)
! Missing } inserted.
<inserted text>
}
l.464 $Y_i^'$
$\in{0,1}, \forall i \in[1,n]$ is as follows in Equation \ref...
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.
我已经有了,还需要添加额外的包吗\usepackage{mathtools}
?我试过包括\usepackage{amsmath}
和\usepackage{amssymb}
(一起和单独),但错误仍然存在。
答案1
你的例子可以简化为
\documentclass{article}
\begin{document}
$Y_i^'$ $\in{0,1}, \forall i \in[1,n]$
\end{document}
标记^'
不正确,而且你应该有一个数学表达式,而不是分成两个
\documentclass{article}
\begin{document}
$Y'_i \in \{0,1\}, \forall i \in [1,n]$
\end{document}