I want to pass an argument to a self-made tabular environment in the following format:
\begin{customTabular}{|c|c|}{'@'}
...such that the second argument (here '@'
, WITHIN PARANTHESIS) is treated as a column separator symbol by the LaTeX document. How this can be done? Please suggest the changes/modifications in the code attached.
The code for customTabular
environment is as follows (here, mytabular
is similar to customTabular
):
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentEnvironment {mytabular} { O{\,} }
{
\char_set_catcode_other:N \&
\char_set_catcode_alignment:n {`#1}
\begin{tabular}
}
{
\end{tabular}
}
\ExplSyntaxOff