Augmented matrix is not produced correctly

Paul Smith phhs80 at gmail.com
Wed May 6 22:26:55 UTC 2020


On Wed, May 6, 2020 at 6:43 PM Paul A. Rubin <parubin73 at gmail.com> wrote:
>
> I suspect that I have found a bug: When I do what I do at the attached
> screenshot, I do not get what one would have expected (the vertical
> line drawn between the first and the second column).
>
> This discussion may be relevant:
>
> https://tex.stackexchange.com/questions/299221/adding-vertical-line-equal-sign-to-augmented-bmatrix-without-using-array
>
> What version of LyX are you using? I get the vertical line using LyX 2.3.4.2 on Linux Mint.
>
> Thanks, Paul. I am using
>
> LyX Version 2.3.4.2
>
> on Fedora Linux 31.
>
> Have you selected the matrix decoration as [x], Paul?
>
> As soon as one does that, LyX uses bmatrix environment, with which it
> is impossible to get an augmented matrix.
>
> Sorry, missed that part. You're right, that does nuke the vertical line.
> A workaround is to use the [] math toolbar button to create the brackets
> and insert the matrix inside. It's not perfect -- there seems to be more
> white space between brackets and matrix -- but it's in the ballpark.
>
> No, Paul. There is a better approach: The one presented at the
> web-address I mention on my initial message: In the horizontal
> alignment, insert:
>
> @{}c|c@{}
>
> and select no matrix decoration. Then enter the brackets as you
> suggested. You will see that the extra white space between brackets
> and matrix will be gone.
>
> I would suggest that LyX implements this approach: Augmented matrices
> are shown very nicely and neatly.
>
> You should submit a ticket for this. I did a little experimenting and discovered that if you do exactly what you were doing in the screenshot except make any one column left or right justified rather than centered, LyX nests an array inside a bmatrix. With all centering, LyX just uses a bmatrix and drops the contents of the horizontal alignment field. (I did not experiment with vertical alignments.) So unless there is a reason not to do so, the answer might simply be to nest an array inside a bmatrix in all cases.
>
> The fact that LyX is deviating from its usual behavior in this one case has me wondering whether the exception was created deliberately, to accommodate some other use case.

Thanks, Paul. I have meanwhile submitted a ticket for this:

https://www.lyx.org/trac/ticket/11854

Paul


More information about the lyx-users mailing list