I want to redefine the tabular environment, such that each for example
\begin{tabular}{c|c}
AAA&BBB\\
CCC&DDD\\
\end{tabular}
would produce (for example)
AAA,BBB;CCC,DDD;
Question 1 In order to redefine the &
, i use the following :
\catcode`\&=\active
\gdef&{,}
Which works, but i don't know if it is safe. In particular, this works only if i put this outside from the definition of tabular
, but i would prefer to have it inside, so that this definition vanishes when i quit the Tabular
.
Question 2 I don't know how to redefine the \\
.