# Better vertical space between paragraphs and centered tabular or figure

When I need to place a tabular or figure inside a paragraph (usually in exams or class notes) I use {\par\centering <tabular>/<figure>\par} because center environment uses too much vertical space. But I don't like my solution because tabular or figure are too close to previous and following paragraphs. I would like that vertical space between figures and paragraphs was similar to the one between lines. How can I do it?

\documentclass{article}
\usepackage{booktabs}
\usepackage{mwe}
\usepackage{lipsum}
\begin{document}

\lipsum[2]

{\par\centering
\begin{tabular}{ccc}
\toprule
a & b & c\\
\midrule
1 & 2 & 3\\
4 & 5 & 6\\
\bottomrule
\end{tabular}\par}

\lipsum[2]

{\par\centering
\includegraphics[width=.75\linewidth]{example-image}\par}

\lipsum[2]

\end{document}


-

\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{booktabs}
\usepackage{mwe}
\usepackage{lipsum}

\newenvironment{rcenter}
{\setlength{\topsep}{.5ex}\center}
{\endcenter}

\begin{document}

\lipsum[2]
\begin{rcenter}
\begin{tabular}{ccc}
\toprule
a & b & c\\
\midrule
1 & 2 & 3\\
4 & 5 & 6\\
\bottomrule
\end{tabular}
\end{rcenter}
\lipsum[2]
\begin{center}
\begin{tabular}{ccc}
\toprule
a & b & c\\
\midrule
1 & 2 & 3\\
4 & 5 & 6\\
\bottomrule
\end{tabular}
\end{center}

\lipsum[2]
\begin{rcenter}
\includegraphics[width=.75\linewidth]{example-image}
\end{rcenter}

\lipsum[2]

\end{document}


-
I recommend adding 0.5\baselineskip (or \baselineskip) before and after the tabular. It makes the lines back each other up better on the recto and verso pages. –  Marc van Dongen May 2 '13 at 11:06

The \addvbuffer command of the verbatimbox package provides a capability to add symmetric or asymmetric buffer space above and below an object (including adding space above and below tabular, images, "plain text" , etc.). Its syntax can be

\addvbuffer[space-above space-below]{object]


or

\addvbuffer[symmetric-space]{object}


or

\addvbuffer{object}


In this last case, it uses redefinable lengths associated with the package to set the buffer space. It can even use negative space, to shrink a pre-existing border.

Here is [roughly speaking] your code with some \addvbuffer applied. I use the first two syntaxes shown above.

\documentclass{article}
\usepackage{booktabs}
\usepackage{mwe}
\usepackage{lipsum}
\usepackage{verbatimbox}
\begin{document}

\lipsum[2]

{\par\centering
\begin{tabular}{ccc}
\toprule
a & b & c\\
\midrule
1 & 2 & 3\\
4 & 5 & 6\\
\bottomrule
\end{tabular}
}
\par}

\lipsum[2]

\scshape
The following figure is shown with asymmetric buffering on purpose, to
demonstrate the capability of the \verb|\addvbuffer| macro.  It also
shows the use of a negative buffer space.
\upshape
\begin{center}

oops! \centering didn't go away after the graphics insertion. (didn't try to test it to figure out why.) –  barbara beeton May 2 '13 at 13:20
@barbarabeeton Got it. The centering was a misplaced }. The asymmetric spacing was intentional to demonstrate capability of \addvbuffer. I've edited to correct the first, and highlight the second. –  Steven B. Segletes May 2 '13 at 15:32