Take the 2-minute tour ×
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.

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

1 Answer 1

up vote 2 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

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.