我在 LaTeX 中写了一个长矩阵
\begin{equation}
\rho H =
\left(\begin{array}{ccc}
\rho_{11} \hbar \omega_{1} +\rho_{13} \hbar \Omega_{p} cos(t\omega_{p}) &
\rho_{12} \hbar \omega_{2}+ \rho_{13} \hbar \Omega_{c} cos(t\omega_{c}) &
\rho_{11} \hbar \Omega_{p} cos(t\omega_{p})+ \rho_{12} \hbar \Omega_{c} cos(t\omega_{c}) + \rho_{13} \hbar \omega_{3}\\
\rho_{21} \hbar \omega_{1} +\rho_{23} \hbar \Omega_{p} cos(t\omega_{p}) &
\rho_{22} \hbar \omega_{2}+ \rho_{23} \hbar \Omega_{c} cos(t\omega_{c}) &
\rho_{21} \hbar \Omega_{p} cos(t\omega_{p})+ \rho_{22} \hbar \Omega_{c} cos(t\omega_{c}) + \rho_{23} \hbar \omega_{3} \\
\hbar \Omega_{p} cos(t\Omega_{p}) & \hbar \Omega_{c} cos(t\Omega_{c}) & \hbar \omega_{3}
\end{array}\right)
\end{equation}
问题是,当我将文本转换为 PDF 时,我得到的矩阵在 PDF 中被剪切(未在 pdf 页面中全部查看) 有谁知道我该如何解决这个问题?
答案1
如果您使用环境(来自包) ,则可以在页边距内使用默认布局(10 pt)和geometry
包来加宽默认文本块。此环境使公式约为 80% ,如果您减少 的值:medsize
nccmath
\displaystyle
\arraycolsep
\documentclass{article}
\usepackage{mathtools, nccmath}
\usepackage[showframe, nomarginpar]{geometry}
\begin{document}
\mbox{}
\begin{equation}\setlength\arraycolsep{3 pt}
\begin{medsize}ρ H = \begin{pmatrix}
ρ_{11} \hbar ω_{1} +ρ_{13} \hbar Ω_{p} \cos(tω_{p}) &
ρ_{12} \hbar ω_{2}+ ρ_{13} \hbar Ω_{c} \cos(tω_{c}) &
ρ_{11} \hbar Ω_{p} \cos(tω_{p})+ ρ_{12} \hbar Ω_{c} \cos(tω_{c}) + ρ_{13} \hbar ω_{3}\\
ρ_{21} \hbar ω_{1} +ρ_{23} \hbar Ω_{p} \cos(tω_{p}) &
ρ_{22} \hbar ω_{2}+ ρ_{23} \hbar Ω_{c} \cos(tω_{c}) &
ρ_{21} \hbar Ω_{p} \cos(tω_{p})+ ρ_{22} \hbar Ω_{c} \cos(tω_{c}) + ρ_{23} \hbar ω_{3} \\
\hbar Ω_{p} \cos(tΩ_{p}) & \hbar Ω_{c} \cos(tΩ_{c}) & \hbar ω_{3}
\end{pmatrix}
\end{medsize}
\end{equation}
\end{document}
答案2
诸如此类的问题几乎总是可以通过改进符号来最好地解决。
\documentclass[12pt]{report}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\rho H =
\begin{pmatrix}
\rho_{11} \hbar \omega_{1} +\rho_{13} \hbar k_p & \rho_{12} \hbar \omega_{2} + \rho_{13} \hbar k_c &
\rho_{11} \hbar k_p + \rho_{12} \hbar k_c + \rho_{13} \hbar \omega_{3}\\
\rho_{21} \hbar \omega_{1} +\rho_{23} \hbar k_p & \rho_{22} \hbar \omega_{2}+ \rho_{23} \hbar k_c &
\rho_{21} \hbar k_p + \rho_{22} \hbar \Omega_{c} k_c + \rho_{23} \hbar \omega_{3} \\
\hbar k_p & \hbar k_c & \hbar \omega_{3}
\end{pmatrix},
\end{equation}
where $k_c= \Omega_c \cos(t\omega_c)$ and $k_p= \Omega_p \cos(t\omega_p)$.
\end{document}
注意使用pmatrix
来自amsmath 包默认情况下,它提供比数组更好的间距。
答案3
考虑到矩阵中元素的复杂性,如果您以列表的方式逐一列出这些元素,您的读者可能会很感激:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
\rho H &=
\begin{pmatrix}
a_{11} & a_{12} & a_{13}\\
a_{21} & a_{22} & a_{23}\\
a_{31} & a_{32} & a_{33}\\
\end{pmatrix}\\
\shortintertext{where}
a_{11} &= \rho_{11} \hbar \omega_{1} +\rho_{13} \hbar \Omega_{p} \cos(t\omega_{p}) \notag \\
a_{12} &= \rho_{12} \hbar \omega_{2}+ \rho_{13} \hbar \Omega_{c} \cos(t\omega_{c}) \notag \\
a_{13} &= \rho_{11} \hbar \Omega_{p} \cos(t\omega_{p})+ \rho_{12} \hbar \Omega_{c} \cos(t\omega_{c}) + \rho_{13} \hbar \omega_{3} \notag \\
a_{21} &= \rho_{21} \hbar \omega_{1} +\rho_{23} \hbar \Omega_{p} \cos(t\omega_{p}) \notag \\
a_{22} &= \rho_{22} \hbar \omega_{2}+ \rho_{23} \hbar \Omega_{c} \cos(t\omega_{c}) \notag \\
a_{23} &= \rho_{21} \hbar \Omega_{p} \cos(t\omega_{p})+ \rho_{22} \hbar \Omega_{c} \cos(t\omega_{c}) + \rho_{23} \hbar \omega_{3} \notag \\
a_{31} &= \hbar \Omega_{p} \cos(t\Omega_{p}) \notag \\
a_{32} &= \hbar \Omega_{c} \cos(t\Omega_{c}) \notag \\
a_{33} &= \hbar \omega_{3} \notag
\end{align}
\end{document}