Menu

#432 Inconsistent distance between matrix columns when the first row is missing cells and the `between origins` matrix option is specified

v1.0 (example)
open
nobody
None
5
2017-07-24
2017-07-24
Evan Aad
No

This may, technically, not be a bug, but it is, in my opinion, an undesireable behavior that should be changed.

Consider the following LaTeX manuscript featuring a TikZ picture of a simple 2x3 matrix. In the first row only the first cell is specified.

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
  \matrix[nodes=draw,column sep={1cm,between origins}]
  {
    \node {1}; \\
    \node {4}; & \node {5}; & \node {6}; \\
  };
\end{tikzpicture}
\end{document}

The user clearly intended for the columns to be spaced apart by 1cm between the origins, however the actual rendering (see attached image) shows a paculiar behavior: only the last two columns are spaced apart as desired, whereas the first two column are neither spaced apart 1cm between origins nor 1cm between borders.

This may, technically, not be a bug, since the manual states in the end of p. 307:

The between origins option can only be used for columns mentioned in the first row, that is, you cannot specify this option for columns introduced only in later rows.

I find this statement to be ambiguous, but it CAN be interpreted as implying that if the 'between origins' option is given in the matrix option list and my first row doesn't have at least as many columns as any other row, then the input is invalid and the resulting picture is undefined.

However, in my opinion, the intention of the user is clear and the matrix is simple, and therefore the result should be rendered as the user intended. At the very least, the above mentioned paragraph from the manual should be rephrased to make the limitations clearer.

Similarl comments apply to PGF matrices, in which case the offensive line corresponding to the one cited above is the following on p. 1042:

This mode may only be used between columns already introduced in the first row.

If this mode may only be used between column already introduced in the first row, then an error should be issued if this mode is not used in this manner.

1 Attachments

Discussion

Auth0 Logo