Table row alignment?

Paul A. Rubin parubin73 at gmail.com
Sun Jan 26 16:18:39 UTC 2020


On 1/26/20 10:31 AM, Bernt Lie wrote:
>
> *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:
>
>         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
>
That's true for any cell content, not just for graphics. To set a 
vertical alignment in a column, you first have to fix the column width.

Paul


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20200126/a14555f4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 16435 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20200126/a14555f4/attachment-0001.jpg>


More information about the lyx-users mailing list