latex 图表标题加入矩阵

矩阵在图表标题中出现会出现错误,因为 ‘\\’ 在这里是不能够被使用的。所以就需要一个额外的命令

\protect

\caption{
This is a matrix
\left(\protect\begin{array}{cc}
  1 & 1    \protect\\
  2 & 2 
\protect\end{array}\right)
}

在\begin,\end,\\, 这三个符号前加入\protect,这样就可以了。

posted @ 2019-05-04 10:48  qinghev  阅读(659)  评论(0编辑  收藏  举报