[Tex/LaTex] Make whole line of a table stroke through

tablestext-decorations

Related to Make first row of table all bold, however the solution seems not to be transferable to striking text through (see Strikethrough command that affects all following text, like \bfseries).

So far my solution works by overlaying the respective line with

\renewcommand{\sttableline}{\rlap{\rule[3pt]{1\paperwidth}{.4pt}}}

through a command in the spirit of my first referenced Q&A above. This is however very unflexible and needs manual adjustment depending on how the respective table is scaled/placed on the page.

Edit: Idealy the solution I'm looking for would work withou any modification in the last columns and only need modification of the table header and entries in the first columns.

Best Answer

While someone else provides a better answer, you can always use a tikzmark

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}

\begin{document}
\begin{tabular}{lcr}
a & a & a \\
\tikzmark{start}b & b & b\tikzmark{end} \\
c & c & c \\
\end{tabular}

\tikz[remember picture] \draw[overlay] ([yshift=.35em]pic cs:start) -- ([yshift=.35em]pic cs:end);
\end{document}

enter image description here

Related Question