矩阵超载边距

矩阵超载边距

我有以下矩阵

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{bmatrix}
        \frac{1}{2}\alpha s_L                                            & 0                             & \frac{1}{12}s_L(6y_{1}^0\alpha + \sqrt{3}\alpha s_L)                                                                                       & -\frac{1}{2}\alpha s_L                                           & 0                             & -\frac{1}{12} s_L(6y_{2}^0\alpha + \sqrt{3}\beta s_L)                                                                                      \\
        0                                                                & \frac{1}{2}\alpha s_L         & -\frac{1}{2}x_{1}^0\alpha s_L                                                                                                                         & 0                                                                & -\frac{1}{2}\alpha s_L        & \frac{1}{2}y_{1}^0 \alpha s_L                                                                                                                         \\
        \frac{1}{12}s_L(6y_{1}^0\alpha + \sqrt{3}\alpha s_L)  & -\frac{1}{2}x_{1}^0\alpha s_L & \frac{1}{24}s_L (12((x_{1}^0)^2 + (y_{1}^0)^2)\alpha + 4\sqrt{3}y_{1}^0\alpha s_L + \alpha s_L^2)         & -\frac{1}{12} s_L(6y_{2}^0\alpha + \sqrt{3}\beta s_L) & \frac{1}{2}x_{1}^0\alpha s_L  & \frac{1}{24} s_L (-12(x_{1}^0x_{2}^0 + y_{1}^0y_{2}^0)\alpha - 2\sqrt{3}(y_{1}^0 + y_{2}^0)\beta s_L + \alpha s_L^2) \\
        -\frac{1}{2}\alpha s_L                                           & 0                             & -\frac{1}{12} s_L(6y_{2}^0\alpha + \sqrt{3}\beta s_L)                                                                                      & \frac{1}{2}\alpha s_L                                            & 0                             & \frac{1}{12} s_L(6y_{2}^0\alpha + \sqrt{3}\beta s_L)                                                                                       \\
        0                                                                & -\frac{1}{2}\alpha s_L        & \frac{1}{2}x_{1}^0\alpha s_L                                                                                                                          & 0                                                                & \frac{1}{2}\alpha s_L         & -\frac{1}{2}x_{2}^0\alpha s_L                                                                                                                         \\
        -\frac{1}{12} s_L(6y_{1}^0\alpha + \sqrt{3}\beta s_L) & \frac{1}{2}x_{2}^0 \alpha s_L & \frac{1}{24} s_L (-12(x_{1}^0x_{2}^0 + y_{1}^0y_{2}^0)\alpha - 2\sqrt{3}(y_{1}^0 + y_{2}^0)\beta s_L + \alpha s_L^2) & \frac{1}{12} s_L(6y_{2}^0\alpha + \sqrt{3}\beta s_L)  & -\frac{1}{2}x_{2}^0\alpha s_L & \frac{1}{24}s_L (12((x_{2}^0)^2 + (y_{2}^0)^2)\alpha + 4\sqrt{3}y_{1}^0\alpha s_L + \alpha s_L^2)         \\
\end{bmatrix}
\end{document}

但它超出了边缘。 在此处输入图片描述 我该如何解决这个问题?

答案1

a_0我建议您用、等替换一些较长的表达方式a_1(请随意使用不同的缩写方法......),并提供单独的图例来列出缩写术语的含义。例如,

在此处输入图片描述

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\noindent
Consider
\[
\renewcommand\arraystretch{1.5}
\begin{bmatrix}
 a_0 & 0 & a_1 & -a_0 & 0 & a_3 \\
 0 & a_0 & -a_0 x_1^0 & 0 & -a_0 & a_0 y_1^0 \\
 a_1 & -a_0 x_1^0 & a_4 & a_3 & a_0 x_1^0 & a_5 \\
 -a_0 & 0 & a_3 & a_0 & 0 & a_3 \\
 0 & -a_0 & a_0 x_1^0 & 0 & a_0 & -a_0 x_2^0 \\
 -a_2 & a_0 x_2^0 & a_5 & a_3 & -a_0 x_2^0 & a_6 \\
\end{bmatrix}
\]
where 
\begingroup
\addtolength{\jot}{2pt}
\begin{align*} 
a_0&=\tfrac{1}{2}\alpha s_L \\
a_1&=\tfrac{1}{12} s_L (6y_1^0\alpha + \sqrt{3}\alpha s_L) \\
a_2&=\tfrac{1}{12} s_L (6y_1^0\alpha + \sqrt{3}\beta s_L) \\
a_3&=\tfrac{1}{12} s_L (6y_2^0\alpha + \sqrt{3}\beta s_L)\\
a_4&=\tfrac{1}{24} s_L [12((x_1^0)^2 + (y_1^0)^2)\alpha + 4\sqrt{3}y_1^0\alpha s_L + \alpha s_L^2] \\
a_5&=\tfrac{1}{24} s_L [-12(x_1^0x_2^0 + y_1^0y_2^0)\alpha - 2\sqrt{3}(y_1^0 + y_2^0)\beta s_L + \alpha s_L^2] \\
a_6&=\tfrac{1}{24} s_L [12((x_2^0)^2 + (y_2^0)^2)\alpha + 4\sqrt{3}y_1^0\alpha s_L + \alpha s_L^2]
\end{align*}
\endgroup

\end{document}

答案2

一个可能的解决方案是重新定义,即

\setcounter{MaxMatrixCols}{6}
\renewcommand\arraystretch{1.25}
\resizebox{\textwidth}{!}{%
  $\begin{bmatrix}
        \frac{1}{2}\alpha s_L                                            & 0                             & \frac{1}{12}s_L\left(6y_{1}^0\alpha + \sqrt{3}\alpha s_L\right)                                                                                       & -\frac{1}{2}\alpha s_L                                           & 0                             & -\frac{1}{12} s_L\left(6y_{2}^0\alpha + \sqrt{3}\beta s_L\right)                                                                                      \\
        0                                                                & \frac{1}{2}\alpha s_L         & -\frac{1}{2}x_{1}^0\alpha s_L                                                                                                                         & 0                                                                & -\frac{1}{2}\alpha s_L        & \frac{1}{2}y_{1}^0 \alpha s_L                                                                                                                         \\
        \frac{1}{12}s_L\left(6y_{1}^0\alpha + \sqrt{3}\alpha s_L\right)  & -\frac{1}{2}x_{1}^0\alpha s_L & \frac{1}{24}s_L \left(12\left(\left(x_{1}^0\right)^2 + \left(y_{1}^0\right)^2\right)\alpha + 4\sqrt{3}y_{1}^0\alpha s_L + \alpha s_L^2\right)         & -\frac{1}{12} s_L\left(6y_{2}^0\alpha + \sqrt{3}\beta s_L\right) & \frac{1}{2}x_{1}^0\alpha s_L  & \frac{1}{24} s_L \left(-12\left(x_{1}^0x_{2}^0 + y_{1}^0y_{2}^0\right)\alpha - 2\sqrt{3}\left(y_{1}^0 + y_{2}^0\right)\beta s_L + \alpha s_L^2\right) \\
        -\frac{1}{2}\alpha s_L                                           & 0                             & -\frac{1}{12} s_L\left(6y_{1}^0\alpha + \sqrt{3}\alpha s_L\right)                                                                                      & \frac{1}{2}\alpha s_L                                            & 0                             & \frac{1}{12} s_L\left(6y_{2}^0\alpha + \sqrt{3}\beta s_L\right)                                                                                       \\
        0                                                                & -\frac{1}{2}\alpha s_L        & \frac{1}{2}x_{1}^0\alpha s_L                                                                                                                          & 0                                                                & \frac{1}{2}\alpha s_L         & -\frac{1}{2}x_{2}^0\alpha s_L                                                                                                                         \\
        -\frac{1}{12} s_L\left(6y_{1}^0\alpha + \sqrt{3}\alpha s_L\right) & \frac{1}{2}x_{2}^0 \alpha s_L & \frac{1}{24} s_L \left(-12\left(x_{1}^0x_{2}^0 + y_{1}^0y_{2}^0\right)\alpha - 2\sqrt{3}\left(y_{1}^0 + y_{2}^0\right)\beta s_L + \alpha s_L^2\right) & \frac{1}{12} s_L\left(6y_{2}^0\alpha + \sqrt{3}\beta s_L\right)  & -\frac{1}{2}x_{2}^0\alpha s_L & \frac{1}{24}s_L \left(12\left(\left(x_{2}^0\right)^2 + \left(y_{2}^0\right)^2\right)\alpha + 4\sqrt{3}y_{1}^0\alpha s_L + \alpha s_L^2\right)         \\
    \end{bmatrix}$}

在此处输入图片描述

相关内容