# Double vertical line column type in tabular

I need a column type with 2 vertical lines but I want the horizontal line to not go trought it.

The result would be like this :

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{array}

\begin{document}

\begin{tabular}{| p{5cm} | p{0.1cm} | p{5cm} |}
\cline{1-1} \cline{3-3}
\lipsum[1][1] & & \lipsum[1][1]  \\
\cline{1-1} \cline{3-3}
\lipsum[1][1] & & \lipsum[1][1]  \\
\cline{1-1} \cline{3-3}
\end{tabular}

\end{document}


But that way, I can't make the space smaller.

So, I've created this columntype :

\newcolumntype{D}{!{\vrule \hspace{0.1cm} \vrule}}


And this is the result :

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{array}

\newcolumntype{D}{!{\vrule \hspace{0.1cm} \vrule}}

\begin{document}

\begin{tabular}{| p{5cm} D p{5cm} |}
\hline
\lipsum[1][1] & \lipsum[1][1]  \\
\hline
\lipsum[1][1] & \lipsum[1][1]  \\
\hline
\end{tabular}

\end{document}


I have no idea how to create this new column type and code the fact that I was the horizontal line to be interruped ... And the \cline command is not helping here ..

It's possible to achieve this by a combination of cmidrule with NiceTabular.

\documentclass{article}

\usepackage{lipsum}
\usepackage{nicematrix}
\usepackage{booktabs}

\begin{document}

\begin{NiceTabular}{|p{5cm}||p{5cm}|}
\cmidrule(r{0.25em}){1-1} \cmidrule{2-2}
\lipsum[1][1] & \lipsum[1][1]  \\
\cmidrule(r{0.25em}){1-1} \cmidrule{2-2}
\lipsum[1][1] & \lipsum[1][1]  \\
\cmidrule(r{0.25em}){1-1} \cmidrule{2-2}
\end{NiceTabular}

\end{document}


• Thanks !! This is very nice !! :) Nov 29 '21 at 13:20
• You are welcome. BTW, it's better to wait for some time (maybe a day) before accepting an answer as it is quite common to get a better answer later. Nov 29 '21 at 13:54