# Vertical spacing between equations and text

I'm running into an issue where if I add \nomenclature{$a$}{A}% after an equation it adds extra space. I have many equations and half of them require the \nomenclature command, however, those that don't have awkward spacing. I'm using MiKTeX 2.9 on Windows 7.

I've tried using \vspace{-\baselineskip} and \vspace{-\parskip} to no avail.

Using the example below you can skip between pages 2 & 3 and you can easily tell that the the bottom equation is being `pushed' downwards.

\documentclass{report}
\usepackage{amsmath}
\usepackage{nomencl}
\makenomenclature
\begin{document}
\printnomenclature
\cleardoublepage
$$a= \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ \end{pmatrix}$$
$$b= \begin{pmatrix} 1 & 1 \\ 1 & 1 \\ \end{pmatrix}$$
\nomenclature{$b$}{Anything}%
\vspace{-    \parskip}
$$c= \begin{pmatrix} 0 & 0 \\ 0 & 0 \\ \end{pmatrix}$$
\cleardoublepage
$$a= \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ \end{pmatrix}$$
$$b= \begin{pmatrix} 1 & 1 \\ 1 & 1 \\ \end{pmatrix}$$
$$c= \begin{pmatrix} 0 & 0 \\ 0 & 0 \\ \end{pmatrix}$$
\end{document}
• Why don't you put \nomenclature inside the equation environment? – egreg Jun 5 '12 at 21:34

You can put the \nomenclature command inside the equation environment.

Recall also that consecutive display environments are not recommended and that amsmath provides many environments for displays. Here's with align:

\documentclass{report}
\usepackage{amsmath}
\usepackage{nomencl}
\makenomenclature

\begin{document}

\printnomenclature

\cleardoublepage

Some text
$$a=A \nomenclature{a}{Anything}$$
Some other text
\begin{align}
a&=
\begin{pmatrix}
1 & 0 \\
0 & 1 \\
\end{pmatrix}
\\
b&=
\begin{pmatrix}
1 & 1 \\
1 & 1 \\
\end{pmatrix}
\nomenclature{$b$}{Anything}
\\
c&=
\begin{pmatrix}
0 & 0 \\
0 & 0 \\
\end{pmatrix}
\end{align}

\end{document}
• Thanks, +1. For me it was between theorem environments, so it seems not to be specific to math display environments. (Worst case was: after and before \end{theorem}. Really big space before the next \begin{theorem}.) – WolframH Sep 7 '14 at 13:28