In this question tikz-matrix-as-a-replacement-for-tabular a nice solution was given to let the matrix in tikz behave like tabular.
In this solution cell/.style={rectangle}
was used to draw lines around every cell. But usually, however, I'd rather not give my tables this "grid"-look.
Is there a way within the tikz matrix to draw horizontal lines between rows that essentially behave like \hline
within tabular?
I know I could put a node in the first and final cell of a row and draw a line between them, but this is not really handy compared to a single command like \hline
and not very automated either.
Best Answer
You can use a style that uses
execute at end cell
to draw a horizontal line at the top or bottom edge of selected cells. By applying this style to complete usingrow <number>/.style
, you can get an effect similar to\hline
: