In this this question, we find ##! in the context of a \newcommand definition, and specifically right after the \addtablerow command from the etoolbox package is used. What does ##! mean here? Why is it used?
Here is the code from that answer in which the ##! appears after \addtablerow:
\newcommand{\myTable}[1]{
\renewcommand*\do[1]{\addtablerow##1!}
\begin{tabular}{|p{0.4\textwidth}|p{0.2\textwidth} | p{0.2\textwidth} | p{0.2\textwidth}|}
\hline
Name & Role & Presence & Present \\ \hline
\docsvlist{#1} \hline
\end{tabular}
}
I don't see an explanation in the etoolbox or etex documentation, so I am not sure where this would be documented.
1from your question.##1is what you have to do when you\(re)newcommandwith arguments within the definition of a\newcommand; this is so that the "inner" argument list can be distinguished from the "outer" argument list (which already uses#1). See https://tex.stackexchange.com/q/42463/119 – Willie Wong Nov 28 '23 at 22:43etoolbox. The doubling of hashes is a general thing in TeX. – cfr Nov 29 '23 at 00:35##is standard tex processing and!is a local definition made in the post that you cite, a line above the code you show here. – David Carlisle Nov 29 '23 at 00:49\nilis used as the delimiter. In the code in your question!is used just like\niland in fact you can replace the!with\nilin the corrected code in this answer to see that the choice is arbitrary. – Alan Munn Nov 29 '23 at 00:58