我尝试使用附加的代码在矩阵内创建一条水平线。但是,它没有起作用,编译过程给出了超时消息。它在没有 \hline 命令的情况下正常工作。任何帮助!
\documentclass[journal,draftcls,onecolumn,12pt,twoside]{IEEEtran}
\usepackage{array}
\usepackage{blkarray}
\begin{document}
\begin{equation}
\centering
W_b(1)=\begin{blockarray}{cccccc}
\begin{block}{(ccccc)c}
a & b & & & & \matindex{\leftarrow d=0} \\
\ddots & \ddots& & & & \matindex{\vdots} \\
& a & b & & & \matindex{\ \ \ \ \leftarrow d=d_b-1} \\
%\hline
c & d & & & & \matindex{\leftarrow d=d_b} \\
\ddots &\ddots & & & & \matindex{\vdots} \\
& c & d & & & \matindex{\leftarrow d=D}
\end{block}
\end{blockarray},
\label{eq:eq4}
\end{equation}
\end{document}
答案1
看看以下解决方案是否能满足您的要求:
\documentclass[11pt]{article}
\usepackage{lmodern}
\usepackage{blkarray, bigstrut}
\usepackage{booktabs}
\begin{document}
\begin{equation}
W_b(1)=\begin{blockarray}{(cc cc c)l}
\bigstrut[t]
a & b & & && \leftarrow d=0 \\
\ddots & \ddots & & && \vdots \\
& a & b & && \leftarrow d=d_b-1 \\
\cmidrule(lr){1-5}
c & d & & && \leftarrow d=d_b \\
\ddots &\ddots & & && \vdots \\
& c & d\bigstrut[b] & && \leftarrow d=D \\
\end{blockarray}
\end{equation}
or
\begin{equation}
W_b(1)=\begin{blockarray}{(cc cc)l}
\bigstrut[t]
a & b & & & \leftarrow d=0 \\
\ddots & \ddots & & & \vdots \\
& a & b & & \leftarrow d=d_b-1 \\
\cmidrule(lr){1-4}
c & d & & & \leftarrow d=d_b \\
\ddots &\ddots & & & \vdots \\
& c & d\bigstrut[b] & & \leftarrow d=D \\
\end{blockarray}
\end{equation}
\end{document}