canvas-latex icon indicating copy to clipboard operation
canvas-latex copied to clipboard

Rendering issue with text above multi-row array/matrix

Open markhats opened this issue 4 years ago • 2 comments

There is a rendering issue when trying to render an array or matrix with some text above it. e.g.

\text{Title}\newline \begin{array}{rr} x & y\\1 & 2\\3 & 4\end{array}

This renders the 'Title' text over the top of the array. The more rows that are added to the array, the lower the title is displayed.

image

Thanks

markhats avatar Feb 24 '21 12:02 markhats

Hi! Thanks for bringing up this issue! It appears to be something about the way \begin{matrix} and \begin{array} interacts with the spacing of things around it that is causing this overlap. We'll be taking a look into it.

In the meanwhile here's a temporary (and very hacky) stopgap that might be useful: \text{title}\newline \text{ }\newline \begin{array}{rr} x & y\\1 & 2\\3 & 4\end{array}

LinGrin avatar Feb 25 '21 15:02 LinGrin

Thanks for the info. I did notice that adding empty lines changed the positioning to be closer to what is expected. However, as more rows are added to the array, more empty lines are required to position the title at the top.

markhats avatar Feb 25 '21 16:02 markhats