Is it possible to control the space above and below center, e.g. the way it can be controlled above and below math display? In other words, is there an equivalent to, say,

\setlength\abovedisplayskip{3pt plus 2pt minus 2pt}
\setlength\belowdisplayskip{3pt plus 2pt minus 2pt}
  • 3
    Do you mean \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. – user11232 Sep 26 '12 at 16:25

You can define your mycenter environment and pass a length (optionally) to modify the top/bottom gap:

enter image description here

\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry
  {\setlength{\topsep}{#1}\par\kern\topsep\centering}% \begin{mycenter}[<len>]
  {\par\kern\topsep}% \end{mycenter}
\setlength{\parindent}{0pt}% Just for this MWE
1: \lipsum[2]
  2: \lipsum[2]
3: \lipsum[2]
  4: \lipsum[2]
5: \lipsum[2]
  6: \lipsum[2]
7: \lipsum[2]

geometry and lipsum were loaded specifically for this MWE, and may not be needed in your final document.


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




The spacing below could be controlled by adding some glue at the end of the environment (after \oldendcenter).

  • Just to make sure: is it that that \topsep influences both top and bottom margin, isn't it? – yo' Sep 26 '12 at 16:52
  • I want to control the space above and below the center environment but only in certain instances and \setlength\topsep{0pt} controls space both above and below \begin{center} xxx \end{center} – schremmer Sep 26 '12 at 17:07
  • @tohecz Yes, it would be nice to control them separately but I can live with \topsep. – schremmer Sep 26 '12 at 17:24
  • 2
    @tohecz \topsep influences top separation, not bottom – cmhughes Sep 26 '12 at 18:22
  • 1
    How to remove the bottom space? It is not clear from your answer. Please let me know. – Rajat Jun 9 '17 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.