我有以下表达式(表示两个变量函数的泰勒展开式):
\begin{equation}
B^{n}(s,p) = \left(\left\( \begin{array}{ll}
a_{10}s + a_{01}p+a_{20}s^{2} +a_{11}sp +...+a_{03}p^{3}\\
b_{10}s + b_{01}p + b_{20}s^{2} + b_{11}sp + ...+b_{03}p^{3}\end{array} \right) + O(|(s,p)|^{4}) \right
\label{Taylorf}
\end{equation}
当我编译该文件时,出现以下两个错误消息:
! Missing delimiter (. inserted).
<to be read again>
\begingroup
l.435 B^{n}(s,p) = \left(\left\(
\begin{array}{ll}
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>'.
! LaTeX Error: Bad math environment delimiter.
但是,文件仍然编译成功,输出的 pdf 文件对我来说看起来不错。那么问题是什么?我该如何纠正这两个错误?
其次,我该怎么做才能使系数“a”和“b”彼此对齐?
答案1
没有分隔符 \(
和\right
最后没有分隔符。
以下是您可能想要的一种布局:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\setlength{\arraycolsep}{0pt}
B^n(s,p) = \Biggl(\biggl( \begin{array}{ *{6}{r} }
a_{10}s +{} & a_{01}p +{} & a_{20}s^2 +{} & a_{11}sp +{} & \dots +{} & a_{03}p^3 \\
b_{10}s +{} & b_{01}p +{} & b_{20}s^2 +{} & b_{11}sp +{} & \dots +{} & b_{03}p^3
\end{array} \biggr) + O\bigl(|(s,p)|^4\bigr) \Biggr)
\end{equation}
\end{document}
通过将每个术语设置在右对齐的列array
内来实现行之间的水平对齐。通过在单元格内没有剩余术语的位置提供一个空组来保持周围的间距。r
+