Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

As is known, the tabu environment does not automatically adjust the vertical distance between a cell with multiple lines and another cell, cf. Text too close to cell border when having a nested tabu and \vspace in a cell and Consistent vertical spacing with tabu.

This can be adjusted with tabu's \tabulinesep command, but instead of setting this separator to some arbitrary value, I would like it to be the same as the vertical distance between lines in the document as such. How do I do that?

\documentclass{article}
\usepackage{tabu,setspace}
    \singlespacing
\parindent=0pt

\begin{document}
%   \tabulinesep = <whatever the distance between lines in the document is>
    \begin{tabu} to\linewidth{lX}
        Lipsum & Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh\\
        Lipsum & FkRtfh\\
    \end{tabu}
\end{document}

enter image description here

share|improve this question
    
Does @egreg's answer to Strange line spacing effects in longtabu help? –  cgnieder Mar 19 '13 at 18:44
    
@cgnieder: I don't know, because I don't know what strut is. Is that always equal to the line spacing in the document? –  Sverre Mar 19 '13 at 18:53
1  
A strut is an invisible vertical rule with a height of 70% of \baselineskip and a depth of 30% of \baselineskip. Have you tried out the solution in the linked answer? –  cgnieder Mar 19 '13 at 19:02
    
After some testing and careful comparison, it seems like adding <{\strut} to the X column does the trick. It would've been nice to add something about the strut to \tabulinesep=, but I only get error messages. –  Sverre Mar 19 '13 at 19:07
1  
the problem is not the line sep but the missing depth in tabu's cells (this is a bug in tabu, IMHO). Setting \tabulinesep won't help to get consistent line spacing. –  cgnieder Mar 19 '13 at 19:17
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.