2

I have a nested tabu table and am using \vspace to simulate an empty line in the same cell. At the end of the cell is text which spans two rows. (If either of these three conditions is not met the issue does not appear or is not as bad.)

The result is that the last line of text is very very close to the border of the table. This looks awkward. But I could not find any way to have more space there while all the three preconditions from above are met.

This is the minimal example code:

\documentclass[10pt,a4paper]{article}
\usepackage{tabu}

\begin{document}

\tabulinesep=3pt
\begin{tabu}{lp{5cm}}
a & a \\ \hline
b &  inner table: \newline  
  \begin{tabu}{lX}
   0: & descriptive text \\
   1: & descriptive text \\
   \end{tabu}
   \vspace{8pt} \newline
   Some longer text which will break into the next line.  \\ \hline
c & c
\end{tabu}

\end{document}

And this is how it looks:

Screenshot of result

  • Don't use \newline and leave a blank space before \vspace{8pt} – egreg Nov 13 '12 at 15:29
2
\documentclass[10pt,a4paper]{article}
\usepackage{tabu}

\begin{document}

\tabulinesep=3pt
\begin{tabu}{lp{5cm}}
a & a \\ \hline
b &  inner table: \newline
  \begin{tabu}{lX}
   0: & descriptive text \\
   1: & descriptive text \\
   \end{tabu}%   
   \vspace*{8pt}
   \par\noindent   
   Some longer text which will break into the next line.\\ \hline
c & c
\end{tabu}

\end{document}

enter image description here

| improve this answer | |
  • Since it works for my example I'll accept this answer. Unfortunately my actual document is a lot more complex. The problematic cell is created by this command: \newcommand{\myCol}[1]{ \multicolumn{2}{l|}{ \rlap{\parbox[t]{\descColWidth}{#1}}} } Leaving out \rlap it works, as long as I don't include the colortbl package which I actually also need. Maybe I should contact the colortbl package maintainer because of this. – user21903 Nov 14 '12 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.