Search code examples
latexrow

Creating a Latex table, in which the last row is always at the same position and doesn't move even new content is added to the other rows


I want to Create a Latex table, in which the last row is always at the same position and doesn't move even new content is added to the other rows.

![enter image description here]
(https://i.sstatic.net/NtycV.png)

In the attached figure, the problem is with the 3rd row, when I write a long text the 4th, 5th... rows are moving, and I want the to be always at the same place with a short or a long text (independent of the content).


Solution

  • If you use the tabularray package, you can specify how height the row should be:

    \documentclass{article}
    
    \usepackage{tabularray}
    
    \begin{document}
    
    \noindent\begin{tblr}{
      colspec={X},
      vlines,
      hlines,
      row{3}={ht=5cm}
    }
    test\\
    test\\
    some long textsome long textsome long textsome long textsome long textsome long tsome long textsome long textsome long textsome long textsome long textsome long textsome long text
    test\\
    test
    \end{tblr}
    
    \end{document}