I'm filling in large sparse matrices, for example
\begin{bmatrix}
0 & -2 & 1 & & -1 & 2 \\
2 & \ddots & \ddots & \ddots & & -1 \\
-1 & \ddots & \ddots & \ddots & \ddots & \\
& \ddots & \ddots & \ddots & \ddots & 1 \\
1 & & \ddots & \ddots & \ddots & -2 \\
-2 & 1 & & -1 & 2 & 0
\end{bmatrix}
I do not like the way the dots are spaced. I would like them to be equally spaced across the diagonals. I guess this can be done using TikZ but is there an easier way?
Best Answer
It's not difficult with TikZ. I have just removed the
ddots
It looks slightly faint in the picture but if you wish you can add the option
thick
to thedraw
commands.