6

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}
  • 1
    Why don't you put \nomenclature inside the equation environment? – egreg Jun 5 '12 at 21:34
3

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

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.