TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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}
share|improve this question
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. – Harish Kumar Sep 26 '12 at 16:25
up vote 3 down vote accepted

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.

share|improve this answer

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).

share|improve this answer
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
@tohecz \topsep influences top separation, not bottom – cmhughes Sep 26 '12 at 18:22
@user15042 it wasn't obvious that you wanted to have only certain instances; I assumed you wanted to change all of them. Looks like Werner has given a way to do certain instances – cmhughes Sep 26 '12 at 18:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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