[Tex/LaTex] Vertical spacing between equations and text

equationsnomenclaturespacing

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
\begin{equation}
a=
\begin{pmatrix}
1 & 0 \\
0 & 1 \\
\end{pmatrix}
\end{equation}
\begin{equation}
b=
\begin{pmatrix}
1 & 1 \\
1 & 1 \\
\end{pmatrix}
\end{equation}
\nomenclature{$b$}{Anything}%
\vspace{-    \parskip}
\begin{equation}
c=
\begin{pmatrix}
0 & 0 \\
0 & 0 \\
\end{pmatrix}
\end{equation}
\cleardoublepage
\begin{equation}
a=
\begin{pmatrix}
1 & 0 \\
0 & 1 \\
\end{pmatrix}
\end{equation}
\begin{equation}
b=
\begin{pmatrix}
1 & 1 \\
1 & 1 \\
\end{pmatrix}
\end{equation}
\begin{equation}
c=
\begin{pmatrix}
0 & 0 \\
0 & 0 \\
\end{pmatrix}
\end{equation}
\end{document}

Best Answer

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
\begin{equation}
a=A
\nomenclature{$a$}{Anything}
\end{equation}
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}
Related Question