Vertical alignment in tables

Jürgen Spitzmüller jspitzm at gmail.com
Wed Aug 14 12:30:32 UTC 2024


Am Mittwoch, dem 14.08.2024 um 12:44 +0200 schrieb Axel Dessecker via
lyx-users:
> Thank you for table improvements in 2.4.0. Unfortunately I still have
> problems 
> to vertically align text.
> 
> In the MWE, row 3 is shown to be vertically centered but this does
> not seem to 
> work. From column 3 to the right, all cells in this row are correctly
> shown as 
> vertically top-aligned but I'm not allowed to change this.

the "m" specifier does not work within tabularx, these columns are
hardcoded to p (top alignment). This is documented in the tabularx
manual.

You can change that for a table by adding in front of the table:
\renewcommand{\tabularxcolumn}[1]{m{#1}}

If you do it in beamer, this needs to be within a fragile frame,
though.

See attached modification of your example.

HTH,
-- 
Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MWE_Table.lyx
Type: application/x-lyx
Size: 9005 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240814/a99e90db/attachment.lyx>


More information about the lyx-users mailing list