我收到以下错误:
\documentclass[12pt,a4paper,english]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\left\{\begin{matrix}
u_t+vu_x=0 & x \in \mathbb{R}\\
g(x)=u(x,0)=\textrm{exp}(-10x^2) & x \in \mathbb{R}
\end{matrix}\right
\end{equation*}
\end{document}
我得到了错误
Blockquote Missing delimiter (. inserted).
<to be read again>
$
l.12 \end{equation*}
I was expecting to see something like `(' or `\{' or
`\}' here. If you typed, e.g., `{' instead of `\{', you
should probably delete the `{' by typing `1' now, so that
braces don't get unbalanced. Otherwise just proceed.
Acceptable delimiters are characters whose \delcode is
nonnegative, or you can use `\delimiter <delimiter code>'.
有什么问题?我不明白它为什么抱怨\end{equation*}
。
答案1
\right.
使用(其中.
表示“空分隔符”)可以解决该问题。但您应该使用cases
。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{equation*}
\left\{\begin{matrix}
u_t+vu_x=0 & x \in \mathbb{R}\\
g(x)=u(x,0)=\textrm{exp}(-10x^2) & x \in \mathbb{R}
\end{matrix}\right.
\end{equation*}
\begin{equation*}
\begin{cases}
u_t+vu_x=0 & x \in \mathbb{R}\\
g(x)=u(x,0)=\exp(-10x^2) & x \in \mathbb{R}
\end{cases}
\end{equation*}
\end{document}
并且它不是\textrm{exp}
,而是\exp
(这是预定义的)。请参阅\mathrm 和 \operatorname 之间有什么区别?了解更多信息。