Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Tabular custom rules across certain columns

I'm using two custom table rules to reproduce the following table:

enter image description here

The codes below have problems at the edges, how to avoid the rules from producing extra spaces and extra length.

enter image description here

\documentclass{article}
\usepackage{array}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{fourier}
\usepackage{setspace}
\setstretch{1.5}
\DeclareMathOperator{\im}{im}

\makeatletter
\newcommand{\Lmidrule}{%
    \noalign {\ifnum 0=`}\fi \hrule height .55pt
    \futurelet \reserved@a \@xhline
}
\newcolumntype{"}{@{\hskip\tabcolsep\vrule width .65pt\hskip\tabcolsep}}
\makeatother

\makeatletter
\def\Cline#1#2{\@Cline#1#2\@nil}
\def\@Cline#1-#2#3\@nil{%
  \omit
  \@multicnt#1%
  \advance\@multispan\m@ne
  \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
  \@multicnt#2%
  \advance\@multicnt-#1%
  \advance\@multispan\@ne
  \leaders\hrule\@height#3\hfill
  \cr}
\makeatother

\begin{document}

\begin{center}
\begin{tabular}{c"c"c"c"c"c"c"c"c}\toprule 
& $V_1$ & $V_2$ & $\cdots$ & $V_k$ & $V_{k+1}$ & $\cdots$ & $V_m$ 
\\\Lmidrule
& $\alpha_1$ & $\alpha_2$ & $\cdots$ & $\alpha_k$ &&&& 
\\\Cline{1-5}{.55pt}
\multirow{4}{*}{$\im T$} & $T\alpha_1$ & $T\alpha_2$ & $\cdots$ & $T\alpha_k$ &&&& 
\\
& $\vdots$ & $\vdots$ & & $\vdots$ &&&& $V/\ker T$
\\
& $T^{l_1-2}\alpha_1$ & $T^{l_2-2}\alpha_2$ & $\cdots$ & $T^{l_k-2}\alpha_k$&&&& 
\\\Cline{2-9}{.55pt}
& $T^{l_1-1}\alpha_1$ & $T^{l_2-1}\alpha_2$ & $\cdots$ & $T^{l_k-1}\alpha_k$ 
& $\alpha_{k+1}$ & $\cdots$ & $\alpha_m$ & $\ker T$ 
\\\bottomrule 
\end{tabular}
\end{center}

\end{document}

The custom rules are from:

How can I reproduce this table with thick lines?

Thick Lines on table

Answer*

Cancel