2

Is it possible to define custom cell spacing in longtable?

Example:

\begin{longtable}{|>{\RaggedRight}p{8cm}|>{\RaggedRight}p{8cm}|}
    ...
    one & two\\
    three & four\\
    five & six\\
\end{longtable}

I would like to have the cells three and four to be 3cm high while the other cells remain as they are. How would I do that?

1
  • I did find a way to do it using \rule{0pt}{25pt} at every line beginning. Not quite so pretty, but as a workaround it does the trick. I am still open to better solutions, if anyone has an idea.
    – Socrates
    Sep 19, 2018 at 22:08

1 Answer 1

2

With longtblr enviroment of the new LaTeX3 package tabularray, it is easy to set row heights.

\documentclass{article}
\usepackage[a4paper,margin=1cm]{geometry}

\usepackage{tabularray}

\begin{document}

\begin{longtblr}[
  caption = {My First Long Table},
  label = {not:long},
]{
  colspec = {|Q[l,8cm]|Q[l,8cm]|},
  hlines, vlines,
}
  one   & two  \\
  \SetRow{3cm,rowsep=0pt} three & four \\
  five  & six \\
\end{longtblr}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .