Table row alignment?
Bernt Lie
Bernt.Lie at usn.no
Sun Jan 26 15:31:09 UTC 2020
From: Paul A. Rubin <parubin73 at gmail.com>
Sent: Sunday, January 26, 2020 16:11
To: Bernt Lie <Bernt.Lie at usn.no>; lyx-users at lists.lyx.org
Subject: Re: Table row alignment?
On 1/26/20 9:49 AM, Bernt Lie wrote:
From: lyx-users <lyx-users-bounces at lists.lyx.org><mailto:lyx-users-bounces at lists.lyx.org> On Behalf Of Paul A. Rubin
Sent: Saturday, January 25, 2020 21:49
To: lyx-users at lists.lyx.org<mailto:lyx-users at lists.lyx.org>
Subject: Re: Table row alignment?
On 1/21/20 3:58 AM, Bernt Lie wrote:
I use LyX 2.3.3 on 64bit Windows 10, latest version.
I have a floating table with 3 columns. In the first column, I have a figure, in the second column I need to rows of equations, and in the third column, I have a text line:
[cid:image001.jpg at 01D5D465.FA549410]
To get two rows of equations in a sigle table cell, I inserted a 2x1 table within the cell, and inserted a single-line equation in each sub cell. [If I instead insert a multiline equation in the cell, LyX preview crashes.]
My main problem is that I find it “ugly” that the three columns in the row (figure, two lines of equations, and text line] don’t align up well, horizontally. I have tried to choose the row containing the cylinder, the equations (Jz = ½*m..., Jx = Jy = ...), and the text (“Hollow cylinder...”), and select, say, top alignment, or centered alignment, but those icons/choices are disabled.
Is there a way to control the horizontal alignment?
Thanks.
-B
Without a MWE on which to experiment, it's hard to be certain. A couple of possibilities come to mind. One is to replace the 2x1 inner table with a multiline math formula (such as a "gathered" environment). Another is to click in a cell in the first column¸ click Edit > Table Settings (or right click and do the equivalent), set a fixed width for the first column and a vertical alignment of "Middle" in the column settings dialog.
Paul
--
I have attached a minimal LyX document with the *.svg file that I use. In the figure path of LyX, I have put the figure in a subdirectory “figs” – which can easily be changed.
I’ve tested a bit more, and it is the insertion of the *figure* that causes the problem. My “trick” of getting multiline math by inserting a table within a table cell works fine.
So: is it possible to vertically center the figure at the insertion point?
-B
What I proposed above works. Put the cursor in the "Geometry" cell, right click, select Settings..., and in the Column settings section of the Table Settings tab set a fixed width for the column. That enables the Vertical alignment control, which you set to Middle. You might want to horizontally center as well; that's up to you.
I've attached a modified version of the MWE.
Paul
Thanks! I get it! I need to *specify width* in order to *enable vertical alignment* -- at least for cells with graphics.
-B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20200126/382cee1a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 16435 bytes
Desc: image001.jpg
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20200126/382cee1a/attachment-0001.jpg>
More information about the lyx-users
mailing list