I would like to have a little table without caption within my text. There should be, however, some space between the preceeding and following lines of text. The following snippet
\documentclass{report}
\begin{document}
Some text. Some text. Some text. Some text. Some text. Some text.
\\
\begin{center}
\begin{tabular}{r|c|c|}
&A&B\\\hline
C&AC&BC\\\hline
D&AD&DB\\\hline
\end{tabular}
\end{center}
\\\noindent
Some text. Some text. Some text. Some text.
\end{document}
does create a blank line above the table, but gives an error below as there is 'no line to end'. What's the right syntax here?
Best Answer
The
center
environment already adds some vertical space before and after it (while the\centering
macro does not). If you want additional space, use, e.g.,\smallskip
,\medskip
, or\bigskip
.As
center
s spacing is based on that of the (internal)trivlist
environment, you may also use the enumitem package to modifytrivlist
. This will save you typing\medskip
before and after every in-text table, but it will also affect the spacing of other environments that usetrivlist
(e.g.,flushleft
).