Augmented matrix is not produced correctly

Paul A. Rubin parubin73 at gmail.com
Wed May 6 17:43:47 UTC 2020


On 5/6/20 12:48 PM, Paul Smith wrote:
> On Wed, May 6, 2020 at 5:13 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.
>
> Paul
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.

Paul

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20200506/510cf9a3/attachment-0001.html>


More information about the lyx-users mailing list