多行数组

多行数组

我有一个巨大的传递函数,我使用 \eqnarray 在 latex 中写下来。但是,我想将其分成多行,以便可以放在 A4 文档中。我想在等号处将其拆分。我试过 \multline 和 \split,但它们似乎不适用于 \eqnarray?以下是我的代码 - 谢谢!

在此处输入图片描述

\documentclass[a4paper,12pt,default,numbered,print,index]{article}
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage{graphicx} % Required for the inclusion of images
\usepackage{setspace} % for use of \singlespacing and \doublespacing
\usepackage{pdfpages}
\usepackage{cite}
\usepackage[section]{placeins}
\usepackage{comment}
\usepackage{siunitx}
\usepackage{color}
\usepackage{ragged2e}
\usepackage{esvect}
\usepackage{mathtools}
\usepackage{lscape}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{array}
\usepackage{soul}
\usepackage{bm}
\usepackage{url}
\usepackage{xparse}
\usepackage{hyperref}

\begin{document}

\begin{tiny}
\begin{equation}\label{Eq:transferfunction}
\left[{\begin{array}    {c@{\hspace{2pt}}c@{\hspace{2pt}}c@{\hspace{2pt}}c@{\hspace{2pt}}c@{\hspace{2pt}    }c@{\hspace{2pt}}c@{\hspace{2pt}}c@{\hspace{2pt}}c@{\hspace{2pt}}} -\frac{1-M_1}    {c_1} & -\frac{A_2}{A_1}\frac{1+M_2}{c_2} & \frac{A_2}{A_1} \frac{M_2}{c_2} & 0     & 0 & 0 & 0 & 0 & 0 \\ 
-\frac{1-M_1}{c_1}  & 0 & 0 & - \frac{A_j}{A_1}\frac{1}{c_j} M_j & - \frac{A_j}    {A_1}\rho_j & \frac{A_j}{A_1} c_j M_j & 0 & 0 & 0\\
-\frac{1-M_1}{c_1}  & 0 & 0 & 0 & 0 & 0 & -\frac{A_T}{A_1}\frac{1}{c_T} M_T & -    \frac{A_T}{A_1}\rho_T & +\frac{A_T}{A_1}\frac{1}{c_T}M_T\\


\frac{1-M_1}{\rho_1}  & -\frac{1+M_2}{\rho_2} & -\frac{1}{\gamma-1}\frac{1}    {\rho_2} & 0 & 0 & 0 & 0 & 0  & 0\\
\frac{1-M_1}{\rho_1}  & 0 & 0 & -\frac{1}{\rho_j} & -c_j M_j &  -\frac{1}    {\gamma-1}\frac{1}{\rho_j} & 0 & 0 & 0\\
\frac{1-M_1}{\rho_1}  & 0 & 0 & 0 & 0 & 0 & -\frac{1}{\rho_T} & -c_T M_T & - -    \frac{1}{\gamma-1}\frac{1}{\rho_T} \\

0 & -(1+M_2)^2 & M_2^2 & (1+\frac{A_j}{A_2}M_j^2) & 2\frac{A_j}{A_2}\rho_j M_j     c_j & -M_j^2 \frac{A_j}{A_2} & 0 & 0  & 0 \\
0 & 0 & 0 & 0 & 0 & \frac{1}{\rho_j^\gamma} & 0 &0 & 0\\
0 & 0 & 0 & 0 & 0 &0 & 0 &0 &  \frac{1}{\rho_T^\gamma} \\

 \end{array}}\right] \left[ \begin{array}{c} P_1^-  \\P_2^+ \\ \sigma_2 \\     p_j'\\ u_j'\\ \sigma_j\\ p_T'\\ u_T'\\ \sigma_T \end{array}\right] = 
 \left[ \begin{array}{c} -\frac{1+M_1}{c_1} \\  -\frac{1+M_1}{c_1} \\ -    \frac{1+M_1}{c_1} \\  -\frac{1+M_1}{\rho_1} \\  -\frac{1+M_1}{\rho_1} \\  -        \frac{1+M_1}{\rho_1} \\ 0\\ 0\\ 0\\ \end{array}\right] P_1^{+} +  \left[ \begin{array}{c} \frac{M_1}{c_1} \\ \frac{M_1}{c_1}  \\ \frac{M_1}{c_1}  \\ -\frac{1}{\gamma-1}\frac{1}{\rho_1} \\-\frac{1}{\gamma-1}\frac{1}{\rho_1}\\ -\frac{1}{\gamma-1}\frac{1}{\rho_1}\\ 0\\ \frac{1}{\rho1^\gamma}\\     \frac{1}{\rho1^\gamma}\\ \end{array}\right] \sigma_1
\end{equation}
\end{tiny}

\end{document} 

答案1

我认为,您不应该在 中用两行方程显示整个表达式\tiny,而应该考虑使用两步方法:首先,使用 定义 9x9 矩阵\scripsize,然后使用常规字体大小显示编号方程。

在此处输入图片描述

\documentclass[a4paper,12pt,default,numbered, 
      print,index]{article}
%% simplified the preamble to focus on the essentials...
\usepackage{mathtools} % for 'bmatrix' env.
\usepackage{geometry}  % set page parameters suitably
\usepackage{array} % for '\extrarowheight' macro
\renewcommand\arraystretch{1.33}

\begin{document}

Define the matrix $B$ as follows:
\begingroup
\scriptsize % not \tiny
\setlength\arraycolsep{1.4pt}
\[
B=
\begin{bmatrix}
-\frac{1-M_1}{c_1} & -\frac{A_2}{A_1} \frac{1+M_2}{c_2} 
   & \frac{A_2}{A_1} \frac{M_2}{c_2} & 0 & 0 & 0 & 0 & 0 & 0 \\ 
-\frac{1-M_1}{c_1} & 0 & 0 & -\frac{A_j}{A_1} \frac{1}{c_j} M_j 
   & - \frac{A_j}{A_1}\rho_j & \frac{A_j}{A_1} c_j M_j & 0 & 0 & 0\\
-\frac{1-M_1}{c_1}  & 0 & 0 & 0 & 0 & 0 & -\frac{A_T}{A_1}\frac{1}{c_T} M_T 
   & -\frac{A_T}{A_1}\rho_T & +\frac{A_T}{A_1}\frac{1}{c_T}M_T\\
\frac{1-M_1}{\rho_1}  & -\frac{1+M_2}{\rho_2} & -\frac{1}{\gamma-1} \frac{1}{\rho_2} 
   & 0 & 0 & 0 & 0 & 0  & 0\\
\frac{1-M_1}{\rho_1}  & 0 & 0 & -\frac{1}{\rho_j} & -c_j M_j 
   & -\frac{1}{\gamma-1}\frac{1}{\rho_j} & 0 & 0 & 0\\
\frac{1-M_1}{\rho_1}  & 0 & 0 & 0 & 0 & 0 & -\frac{1}{\rho_T} & -c_T M_T 
   & -\frac{1}{\gamma-1}\frac{1}{\rho_T} \\
0 & -(1+M_2)^2 & M_2^2 & (1+\frac{A_j}{A_2}M_j^2) & 2\frac{A_j}{A_2}\rho_j M_j c_j 
   & -M_j^2 \frac{A_j}{A_2} & 0 & 0  & 0 \\
0 & 0 & 0 & 0 & 0 & \frac{1}{\rho_j^\gamma} & 0 &0 & 0\\
0 & 0 & 0 & 0 & 0 &0 & 0 &0 & \frac{1}{\rho_T^\gamma}\\ 
\end{bmatrix}
\]
\endgroup
Then,
\begin{equation}\label{eq:more_readable}
B \begin{bmatrix}
 P_1^-  \\P_2^+ \\ \sigma_2 \\     
 p_j'\\ u_j'\\ \sigma_j\\ 
 p_T'\\ u_T'\\ \sigma_T  
\end{bmatrix} 
= 
\begin{bmatrix} 
-\frac{1+M_1}{c_1}    \\  -\frac{1+M_1}{c_1}    \\ 
-\frac{1+M_1}{c_1}    \\  -\frac{1+M_1}{\rho_1} \\  
-\frac{1+M_1}{\rho_1} \\  -\frac{1+M_1}{\rho_1} \\ 
0\\ 0\\ 0\\  
\end{bmatrix}
P_1^{+} +  
\begin{bmatrix}
\frac{M_1}{c_1} \\ \frac{M_1}{c_1} \\ \frac{M_1}{c_1} \\ 
-\frac{1}{\gamma-1}\frac{1}{\rho_1} \\
-\frac{1}{\gamma-1}\frac{1}{\rho_1}\\ 
-\frac{1}{\gamma-1}\frac{1}{\rho_1}\\ 
 0 \\ \frac{1}{\rho1^\gamma}\\ \frac{1}{\rho1^\gamma}\\  
\end{bmatrix}
\sigma_1
\end{equation}
\end{document} 

相关内容