Here I make the
. active inside
\tab and restore it when I am done. Inside
. can become
\item if the next token is a not a nested
\tab and it becomes
\relax if the next token is a nested
\tab. I keep track of the nesting level with a simple counter, and only restore the
catcode 12 definition of
. when the nesting level reaches back to zero.
I have EDITED to allow switching between text mode and math mode processing.
In my RE-EDIT, I have resolved the issue of the stray
$$ lines which popped up in math mode (requiring a countermanding
\vspace), so that no
\vspaces are presently required, and the spacing in math mode matches that of a true
In my MWE, I have placed text and math versions side-by-side in minipages for comparison.
I would add in passing that, as is, the OP has prohibited the use of the dot as part of his argument, since his requested syntax will interpret the
. as a call for a new
\item or nested
itemize. If one really does need a dot as part of the data stream, it would make sense to choose a different character than
. as the parsing separator, which is easy enough to accomplish by way of substitution in the MWE.