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.

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

share|improve this question
    
Don't use \newline and leave a blank space before \vspace{8pt} –  egreg Nov 13 '12 at 15:29
add comment

1 Answer 1

up vote 1 down vote accepted
\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

share|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
add comment

Your Answer

 
discard

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

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