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}
Best Answer
Define your own environment: