I'm getting some strange behaviour with \multicolumn
s and dashed lines. I need a single-column \multicolumn
in a document (since I need a partial-height vertical line, and that seems to be how you do those things); unfortunately, attempting to make that vertical line dashed seems to break. A two-column \multicolumn
with a dashed vertical line works just fine, as does a one-column one with a solid vertical line; it only breaks when you have both a width of one column and a dashed line.
MWEs:
This works:
\documentclass{article}
\usepackage{colortbl}
\usepackage{arydshln}
\usepackage{tabu}
\begin{document}
\begin{tabu}{X[c] X[c] | X[c] : X[c]}
test & test & test & test\\
test & \multicolumn{1}{|c|}{test} & test\\
\end{tabu}
\end{document}
This does too:
\documentclass{article}
\usepackage{colortbl}
\usepackage{arydshln}
\usepackage{tabu}
\begin{document}
\begin{tabu}{X[c] X[c] | X[c] : X[c]}
test & test & test & test\\
test & \multicolumn{2}{|c:}{test} & test\\
\end{tabu}
\end{document}
This, however, doesn't:
\documentclass{article}
\usepackage{colortbl}
\usepackage{arydshln}
\usepackage{tabu}
\begin{document}
\begin{tabu}{X[c] X[c] | X[c] : X[c]}
test & test & test & test\\
test & \multicolumn{1}{|c:}{test} & test\\
\end{tabu}
\end{document}
Is there any way I can get a partial-height dashed line next to a one-column-width cell?
(Before anyone says anything, yes, I know vertical lines are normally a bad design decision. I've got a situation where I need to make it clear which cells have been merged and which haven't in a large-ish and complex table, and vertical lines are by far the clearest way to do that.)
Best Answer
It works if you move the dotted line to the next column.