Quantcast
Channel: Putting a vertical line through text in a table - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 4

Answer by F. Pantigny for Putting a vertical line through text in a table

$
0
0

Here is a solution with {NiceTabular} on nicematrix. The dashed rules are drawn with TikZ by using the Tikz nodes created under the cells, rows and columns by nicematrix.

\documentclass{article}\usepackage{nicematrix,tikz}\begin{document}\begin{NiceTabular}{>{\itshape}cccc}[hvlines]  \RowStyle{\itshape}& Dig & Weed & Cut \\  Boris    & 50  & 0    & 50  \\  Percival & 20  & 0    & 30  \\  Spike    &  0  & 0    & 0 \CodeAfter  \tikz \draw [dashed,red] (4.5-|1) -- (4.5-|last) (1-|3.5) -- (last-|3.5) ; \end{NiceTabular}\end{document}

You need several compilations.

Output of the above code


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>