I would like to make a command in LaTeX that can be used like this:
\zoneaxis{1 2 -3}
\zoneaxis{2 -1 -1 10}
and would produce this:
$[1\,2\,\overline{3}]$
$[2\,\overline{1}\,\overline{1}\,10]$
That is, the three or four numbers are set into brackets, any minus signs are set as overlines, and there is a little space between the numbers.
It seems like I would have to get into character-by-character parsing, but I have no idea where to look for how to do that.
Does something like this already exist? If not, where could I find out how to do this?