## LaTeX forum ⇒ Page Layout ⇒ Less Space between equations and text

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
eggmanneo
Posts: 10
Joined: Wed Apr 21, 2010 9:03 pm

### Less Space between equations and text

I'm trying to reduce the space between my text and equations. I mainly use the align environment. I tried using the commands
\setlength\abovedisplayskip{0pt}\setlength\belowdisplayskip{0pt}

In the preamble of my document, but these commands didn't seem to change anything. Below is an outline of my code

\documentclass[12pt]{article}\usepackage{setspace}\usepackage{lmodern}\usepackage{amsmath}\usepackage{amsfonts}\usepackage{hyperref}\usepackage[hmargin=1in,vmargin=1in]{geometry}\doublespacing\usepackage{times}\setlength\abovedisplayskip{0pt}\setlength\belowdisplayskip{0pt}\DeclareMathOperator* {\Max}{max}  %in equation mode, this lets you write max wrt choice variables\usepackage{graphicx}\def\inputGnumericTable{}  %spreadsheet program I use to make tables for latex        \usepackage[latin1]{inputenc}	\usepackage{color}        \usepackage{array}	\usepackage{longtable}        \usepackage{calc}        \usepackage{multirow}        \usepackage{hhline}        \usepackage{ifthen} \usepackage{harvard} \begin{document} \begin{align} \label{eq:budget}C_t \leq W_{K,m,t}H_{K,m,t}+W_{K,f,t}H_{K,f,t}+T_{m,t}B_{m,t}+T_{f,t}B_{f,t}+Y_t.\end{align}

the \vspace command seemed to work, but I would have to do this for every equation, and sometimes it can be hard to get the spacing exactly right with this command
Last edited by eggmanneo on Thu Sep 29, 2011 7:11 pm, edited 1 time in total.

Stefan Kottwitz
Posts: 8253
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi,

\normalsize resets those values, that's why they don't have effect in the preamble. A quick way to force the lengths at the beginning of the document:

\AtBeginDocument{%   \setlength\abovedisplayskip{0pt}   \setlength\belowdisplayskip{0pt}}

Or redefine \normalsize, such as for article with base font size 12pt:

\renewcommand\normalsize{%    \@setfontsize\normalsize\@xiipt{14.5}%    \setlength{\abovedisplayskip}{0pt}    \setlength{\abovedisplayshortskip}{0pt}    \setlength{\belowdisplayskip}{0pt}    \setlength{\belowdisplayshortskip}{0pt}    \let\@listi\@listI}\makeatother

Or if you don't know that macro or the base font size, you could add to \normalsize:

\makeatletter\g@addto@macro{\normalsize}{%    \setlength{\abovedisplayskip}{0pt}    \setlength{\abovedisplayshortskip}{0pt}    \setlength{\belowdisplayskip}{0pt}    \setlength{\belowdisplayshortskip}{0pt}}\makeatother

Stefan