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.

There are tables in my document. The baselines between the last row of each table and the following text is usually circa 16,25p (see below). Now I wanted to add right-aligned text to some selected one-line rows (EXPLANATION IN COL2).

I tried it two ways (using packages calc and tabularx; see below) but this seems to change the 16,25p space. How can I maintain 16,25p space?

I would like to retain two columns because some text from later rows may go beyond where EXPLANATION IN COL2 starts. My preference would be the approach using calc.

\documentclass{article}
\usepackage{tabularx}\usepackage{calc}
\begin{document}
\setlength{\parindent}{0pt}

\begin{tabular}[t]{@{}p{75pt}@{}@{}l@{}}
COL1TEXT & COL2TEXT\\
COL1TEXT & COL2TEXT
\end{tabular}
\vspace{5pt}\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis
sem.\vspace{30pt}\par

\begin{tabular}[t]{@{}p{75pt}@{}@{}p{\textwidth-75pt}@{}}
COL1TEXT & COL2TEXT \hfill EXPLANATION IN COL2\\
COL1TEXT & COL2TEXT
\end{tabular}
\vspace{5pt}\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis
sem.\vspace{30pt}\par

\begin{tabularx}{\textwidth}{@{}p{75pt}@{}@{}X@{}}
COL1TEXT & COL2TEXT \hfill EXPLANATION IN COL2\\
COL1TEXT & COL2TEXT
\end{tabularx}
\vspace{5pt}\par
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis
sem.
\end{document}

enter image description here

share|improve this question

1 Answer 1

up vote 6 down vote accepted

It's always best to add vertical space in vertical mode so

\par\vspace{5pt}

not

\vspace{5pt}\par

also although it does no harm @{}@{} is rather odd markup you only need one: @{}.

share|improve this answer

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.