# cancel package and tables

I have a "friend" who needs to do some kind of strikethrough or cancel but for a whole row or column (or both) of a table at a time. It should ideally be something supported by MathJax, so various picture packages e.g. tikz aren't what my "friend" is interested in. Any ideas?

While it requires manual specification of measurements, it has the advantage of working without any special packages or tools. It amounts to \rlapping \rules.

\documentclass{article}
\begin{document}
\begin{tabular}{ccc}
This & is & a \\
\rlap{\rule[2.5pt]{4.5cm}{1pt}}table & built & using\\
the & \rlap{\smash{\makebox[7ex]{\rule[-2pt]{1pt}{35pt}}}}tabular & environment
\end{tabular}
\end{document}


Here is the array equivalent, since MathJax does not support tabular. Obviously, if the table content is math, the \mbox nonsense can be dispensed with.

\documentclass{article}
\begin{document}
$$\begin{array}{ccc} \mbox{This} & \mbox{is} & \mbox{a} \\ \rlap{\rule[2.5pt]{4.5cm}{1pt}}\mbox{table} & \mbox{built} & \mbox{using}\\ \mbox{the} & \rlap{\smash{\makebox[7ex]{\rule[-2pt]{1pt}{35pt}}}}\mbox{tabular} & \mbox{environment} \end{array}$$
\end{document}

• Interesting! But tabular isn't supported by MathJax, I think - any ideas for that? For instance, could the same thing work in an array environment? – kcrisman May 25 '17 at 17:33
• @kcrisman I don't have familiarity with MathJax, but I do know that array is essentially a math version of tabular. Thus, it is hard to believe that array would work in MathJax, but tabular not. – Steven B. Segletes May 25 '17 at 17:41
• @kcrisman ...but to you direct question, yes, the identical result can be achieved in an array environment, allowing of course that all text has to be placed in an \mbox to avoid it being set as math. – Steven B. Segletes May 25 '17 at 17:44
• The MathJax author has explicitly stated that since it is a text macro, not a math one, it will not be supported. – kcrisman May 25 '17 at 18:29
• @kcrisman I see...where is TextJax when you need it? – Steven B. Segletes May 25 '17 at 18:34

Thanks to @Steven I have something kludgy but usable in MathJax, I think, especially because my friend will only have numerical input:

\begin{array}{ccc}
This & is & a \\
\rlap{\raise{2px}\Rule{6cm}{1pt}{0pt}}table & built & using\\
the & \rlap{\hspace{30px}\smash{{\Rule{1pt}{32pt}{2pt}}}}tabular & environment
\end{array}