答案1
另一种方法,稍微简单一点
\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}
\begin{document}
\[
R_{a,b}(\theta)=\left[\quad r_{i,j}\left.
\begin{array}{r;{2pt/2pt}l}
& r_{a,a}=\cos(\theta) \\
& r_{b,b}=\cos(\theta) \\
& r_{a,b}=-\sin(\theta) \\
& r_{b,a}=\sin(\theta) \\
& r_{j,j}=1,\quad j\ne a,\quad j\ne b \\
& r_{i,j}=0,\quad \mathrm{elsewhere} \\
\end{array}
\,\right.\right]
\]
\end{document}
答案2
对于虚线,您可以使用arydshln
包并将虚线长度和间距设置为适当的值:
\usepackage{arydshln}
\setlength{\dashlinedash}{0.5pt}
\setlength{\dashlinegap}{1pt}
对于居中r_{i,j}
,你可以array
在水平内嵌套一个垂直的array
。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{arydshln}
\setlength{\dashlinedash}{0.5pt}
\setlength{\dashlinegap}{1pt}
\begin{document}
\begin{equation*}
R_{a,b}(\theta)=\left[\begin{array}{l:l}
r_{i,j} & \begin{array}{l}
r_{a,a}=\cos(\theta) \\
r_{b,b}=\cos(\theta) \\
r_{a,b}=-\sin(\theta) \\
r_{b,a}=\sin(\theta) \\
r_{j,j}=1,\quad j\ne a,\quad j\ne b \\
r_{i,j}=0,\quad \mathrm{elsewhere} \\
\end{array}
\end{array}\right] \\
\end{equation*}
\end{document}
答案3
pstricks
一种用于虚线垂直线的解决方案,以及alignedat
一个内部环境bmatrix
,允许对齐符号=
:
\documentclass{article}
\usepackage{mathtools}
\usepackage{pst-node}
\usepackage{auto-pst-pdf} %% to compile with pdflatex
\begin{document}
\begin{equation*}
\begin{pspicture}
R_{a,b}(θ)=\begin{bmatrix}
r_{i,j} & \begin{alignedat}{2}
& \pnode[-1.3ex, 1ex]{B} & r_{a,a} & =\cos(θ) \\
& & r_{b,b} & =\cos(θ) \\
& & r_{a,b} & =-\sin(θ) \\
& & r_{b,a} & =\sin(θ) \\
& & r_{j,j} & =1,\quad j\ne a,\quad j\ne b \\
& \pnode[-1.3ex, -0.25ex]{E} & r_{i,j} & =0,\quad \mathrm{elsewhere} \\
\end{alignedat}
\end{bmatrix}
\ncline[linestyle = dotted, dotsep = 1.5pt]{B}{E}
\end{pspicture}
\end{equation*}
\end{document}
答案4
{bNiceArray}
有了就很容易了nicematrix
。
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\[
R_{a,b}(\theta)=
\begin{bNiceArray}{c:l@{}l}
\Block{*-1}{r_{i,j}}
& r_{a,a} & =\cos(\theta) \\
& r_{b,b} & =\cos(\theta) \\
& r_{a,b} & =-\sin(\theta) \\
& r_{b,a} & =\sin(\theta) \\
& r_{j,j} & =1,\quad j\ne a,\quad j\ne b \\
& r_{i,j} & =0,\quad \mathrm{elsewhere} \\
\end{bNiceArray}
\]
\end{document}
您需要多次编译(因为nicematrix
在后台使用 PGF/Tikz 节点)。