Skip to content

incorrect vertical-align settings with tabular #2732

@xworld21

Description

@xworld21

The following

\documentclass{article}
\usepackage{array}
\begin{document}
    \begin{tabular}{c|p{2cm}|c}
         a&  a very long line, enough to wrap (p) & b
    \end{tabular}

    \begin{tabular}{c|m{2cm}|c}
         a&  a very long line, enough to wrap (m) & b
    \end{tabular}

    \begin{tabular}{c|b{2cm}|c}
         a&  a very long line, enough to wrap (b) & b
    \end{tabular}
\end{document}

should look like

Image

but it comes out as

Image

Even after temporarily setting .ltx_td { vertical-align: baseline !important; }, you get

Image

There are three bugs here:

  1. The width of p{2cm} gets lost.
  2. All cells should be vertical-align: baseline, no matter what.
  3. The content of the column m should have ltx_align_middle instead of ltx_align_top.

Changing all three manually gives you

Image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions