矢量太宽

矢量太宽

我正在尝试将一个非常大的向量包含到我的 tex 文档中。但是,这个向量太宽,在右侧被截断。我想将它稍微向左“移动”一点,这样它就可以适合网站,而不会出现任何换行符。有人知道怎么做吗? 在此处输入图片描述

代码:

$$\frac{\partial f_{1}}{\partial \boldsymbol{y}}=    \left(\begin{array}{c} -\frac{x_{1}+\frac{x_{4}\,x_{5}\,\left(x_{7}+2\,y_{1}\right)}{\left(x_{6}+y_{1}\right)\,\left(x_{7}+y_{1}\right)}+\frac{x_{4}\,x_{5}\,x_{7}\,y_{1}}{\left(x_{6}+y_{1}\right)\,{\left(x_{7}+y_{1}\right)}^2}-\frac{x_{4}\,x_{5}\,y_{1}\,\left(x_{7}+2\,y_{1}\right)}{{\left(x_{6}+y_{1}\right)}^2\,\left(x_{7}+y_{1}\right)}}{x_{3}+x_{4}\,\left(\frac{x_{6}}{{\left(x_{6}+y_{1}\right)}^2}+\frac{x_{7}}{{\left(x_{7}+y_{1}\right)}^2}\right)}-\frac{x_{4}\,\left(\frac{2\,x_{6}}{{\left(x_{6}+y_{1}\right)}^3}+\frac{2\,x_{7}}{{\left(x_{7}+y_{1}\right)}^3}\right)\,\left(x_{1}\,\left(y_{1}-y_{3}\right)+\frac{x_{4}\,x_{5}\,y_{1}\,\left(x_{7}+2\,y_{1}\right)}{\left(x_{6}+y_{1}\right)\,\left(x_{7}+y_{1}\right)}\right)}{{\left(x_{3}+x_{4}\,\left(\frac{x_{6}}{{\left(x_{6}+y_{1}\right)}^2}+\frac{x_{7}}{{\left(x_{7}+y_{1}\right)}^2}\right)\right)}^2}\\ 0\\ \frac{x_{1}}{x_{3}+x_{4}\,\left(\frac{x_{6}}{{\left(x_{6}+y_{1}\right)}^2}+\frac{x_{7}}{{\left(x_{7}+y_{1}\right)}^2}\right)} \end{array}\right)$$

$$\frac{\partial f_{2}}{\partial \boldsymbol{y}}=     \left(\begin{array}{c} 0\\ -\frac{x_{8}+\frac{x_{10}\,x_{11}\,\left(x_{7}+2\,y_{2}\right)}{\left(x_{6}+y_{2}\right)\,\left(x_{7}+y_{2}\right)}+\frac{x_{7}\,x_{10}\,x_{11}\,y_{2}}{\left(x_{6}+y_{2}\right)\,{\left(x_{7}+y_{2}\right)}^2}-\frac{x_{10}\,x_{11}\,y_{2}\,\left(x_{7}+2\,y_{2}\right)}{{\left(x_{6}+y_{2}\right)}^2\,\left(x_{7}+y_{2}\right)}}{x_{9}+x_{10}\,\left(\frac{x_{6}}{{\left(x_{6}+y_{2}\right)}^2}+\frac{x_{7}}{{\left(x_{7}+y_{2}\right)}^2}\right)}-\frac{x_{10}\,\left(\frac{2\,x_{6}}{{\left(x_{6}+y_{2}\right)}^3}+\frac{2\,x_{7}}{{\left(x_{7}+y_{2}\right)}^3}\right)\,\left(x_{8}\,\left(y_{2}-y_{3}\right)+\frac{x_{10}\,x_{11}\,y_{2}\,\left(x_{7}+2\,y_{2}\right)}{\left(x_{6}+y_{2}\right)\,\left(x_{7}+y_{2}\right)}\right)}{{\left(x_{9}+x_{10}\,\left(\frac{x_{6}}{{\left(x_{6}+y_{2}\right)}^2}+\frac{x_{7}}{{\left(x_{7}+y_{2}\right)}^2}\right)\right)}^2}\\ \frac{x_{8}}{x_{9}+x_{10}\,\left(\frac{x_{6}}{{\left(x_{6}+y_{2}\right)}^2}+\frac{x_{7}}{{\left(x_{7}+y_{2}\right)}^2}\right)} \end{array}\right)$$

我认为可能适用于此处的包是“amsthm”包。我使用的文档类是 \documentclass[parskip,headsepline]{scrreprt}

答案1

这些向量包含 6 个非常大的\frac项。我建议您采用两个阶段来排版这些向量:首先,用 6 个大分数表达式给出它们的表达式;然后,说明这 6 个大表达式是什么。

在下面的代码中,请注意,我删除了所有 52 个\,间隔符、所有 52 个\left和所有 52 个\right自动调整大小指令。我确实必须分别引入 12 个\Bigl\Bigr指令。

在此处输入图片描述

\documentclass[parskip,headsepline]{scrreprt}
\usepackage{amsmath}  % for 'pmatrix' and 'align*' environments
\usepackage{bm}       % for '\bm' macro
\usepackage{booktabs} % for '\addlinespace' macro
\begin{document}

\[
\frac{\partial f_{1}}{\partial \bm{y}}=    
\begin{pmatrix}
-A_1-A_2 \\ 0 \\ A_3
\end{pmatrix}
\quad\text{and}\quad
\frac{\partial f_{2}}{\partial \bm{y}}=
\begin{pmatrix}
0 \\ -B_1-B_2 \\ B_3
\end{pmatrix}
\]
where
\begin{align*}
A_1 &= \frac{x_{1}+\frac{x_{4}x_{5}(x_{7}+2y_{1})}{(x_{6}+y_{1})(x_{7}+y_{1})}+\frac{x_{4}x_{5}x_{7}y_{1}}{(x_{6}+y_{1}){(x_{7}+y_{1})}^2}-\frac{x_{4}x_{5}y_{1}(x_{7}+2y_{1})}{{(x_{6}+y_{1})}^2(x_{7}+y_{1})}}{x_{3}+x_{4}\Bigl(\frac{x_{6}}{{(x_{6}+y_{1})}^2}+\frac{x_{7}}{{(x_{7}+y_{1})}^2}\Bigr)} \\
\addlinespace % a bit of vertical whitespace
A_2 &= \frac{x_{4}\Bigl(\frac{2x_{6}}{{(x_{6}+y_{1})}^3}+\frac{2x_{7}}{{(x_{7}+y_{1})}^3}\Bigr)\Bigl(x_{1}(y_{1}-y_{3})+\frac{x_{4}x_{5}y_{1}(x_{7}+2y_{1})}{(x_{6}+y_{1})(x_{7}+y_{1})}\Bigr)}{{\Bigl(x_{3}+x_{4}\Bigl(\frac{x_{6}}{{(x_{6}+y_{1})}^2}+\frac{x_{7}}{{(x_{7}+y_{1})}^2}\Bigr)\Bigr)}^2} \\ 
\addlinespace
A_3 &= \frac{x_{1}}{x_{3}+x_{4}\Bigl(\frac{x_{6}}{{(x_{6}+y_{1})}^2}+\frac{x_{7}}{{(x_{7}+y_{1})}^2}\Bigr)} \\
\addlinespace
B_1 &= \frac{x_{8}+\frac{x_{10}x_{11}(x_{7}+2y_{2})}{(x_{6}+y_{2})(x_{7}+y_{2})}+\frac{x_{7}x_{10}x_{11}y_{2}}{(x_{6}+y_{2}){(x_{7}+y_{2})}^2}-\frac{x_{10}x_{11}y_{2}(x_{7}+2y_{2})}{{(x_{6}+y_{2})}^2(x_{7}+y_{2})}}{x_{9}+x_{10}\Bigl(\frac{x_{6}}{{(x_{6}+y_{2})}^2}+\frac{x_{7}}{{(x_{7}+y_{2})}^2}\Bigr)} \\
\addlinespace
B_2 &= \frac{x_{10}\Bigl(\frac{2x_{6}}{{(x_{6}+y_{2})}^3}+\frac{2x_{7}}{{(x_{7}+y_{2})}^3}\Bigr)\Bigl(x_{8}(y_{2}-y_{3})+\frac{x_{10}x_{11}y_{2}(x_{7}+2y_{2})}{(x_{6}+y_{2})(x_{7}+y_{2})}\Bigr)}{{\Bigl(x_{9}+x_{10}\Bigl(\frac{x_{6}}{{(x_{6}+y_{2})}^2}+\frac{x_{7}}{{(x_{7}+y_{2})}^2}\Bigr)\Bigr)}^2}\\ 
\addlinespace
B_3 &= \frac{x_{8}}{x_{9}+x_{10}\Bigl(\frac{x_{6}}{{(x_{6}+y_{2})}^2}+\frac{x_{7}}{{(x_{7}+y_{2})}^2}\Bigr)} 
\end{align*}

\end{document}

相关内容