The center
environment is actually defined in terms of a list
, so you can tweak all the parameters detailed in Section 56 of source2e
.
In terms of the spacing above the center
environment, you can use something like
\documentclass{article}
\usepackage{lipsum}
\let\oldcenter\center
\let\oldendcenter\endcenter
\renewenvironment{center}{\setlength\topsep{0pt}\oldcenter}{\oldendcenter}
\begin{document}
\lipsum[1]
\begin{center}
\lipsum[2]
\end{center}
\end{document}
The spacing below could be controlled by adding some glue at the end of the environment (after \oldendcenter
).
\begin{center}
? Use\centering
within a group. Say,\bgroup \centering ... your code ... \egroup'. You can use
\begingroup` and\endgroup
or simply enclose the code between{}
to form a group.