4

I am using the nomencl package and trying to remove the spacing between the start of the page and the "Nomenclature" title. \vspace{...} does not achieve the desired effect, so I assume this must be done through the nomencl pacakge. I have read the documentation and searched these forums, but I have not found any question addressing this problem. Can you help me fix my code?

Below is a small working example, modulo the spacing problem I have just described.

\documentclass[10pt]{report}
\usepackage{nomencl}
\makenomenclature

\begin{document}

Title

\nomenclature{GMRES}{Generalised method of residuals}
\nomenclature{RMSE}{Root mean squared error}
\nomenclature{PDE}{Partial differential equation}
\nomenclature{SPDE}{Stochastic partial differential equation}

\printnomenclature
\end{document}

I am compiling using the following sequence of commands:

pdflatex ${filename}.tex
makeindex ${filename}.nlo -s nomencl.ist -o ${filename}.nls
pdflatex ${filename}.tex

Thank you!

2
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – user11232
    Mar 18, 2015 at 0:26
  • Good MWE for a first question. Thank you for that.
    – user11232
    Mar 18, 2015 at 0:27

1 Answer 1

1

I'm not sure why you'd want to do it: the nomenclature is a chapter that should receive the same treatment as all the others.

Anyway, you have to neutralize the 50pt vertical space that report puts above chapter titles.

Here's a clean way to do it: when the thenomenclature environment is started, we patch \@makeschapterhead to remove the \vspace{50\p@} instruction.

% arara: pdflatex
% arara: nomencl
% arara: pdflatex

\documentclass[10pt]{report}
\usepackage{nomencl}
\usepackage{etoolbox}
\usepackage{showframe} % just to show the alignment

\makeatletter
\AtBeginEnvironment{thenomenclature}{%
  \patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{}{}{}%
}
\makeatother

\makenomenclature

\begin{document}

Title

\nomenclature{GMRES}{Generalised method of residuals}
\nomenclature{RMSE}{Root mean squared error}
\nomenclature{PDE}{Partial differential equation}
\nomenclature{SPDE}{Stochastic partial differential equation}

\printnomenclature
\end{document}

The arara directives are just for being able to compile the whole thing without hassles. The showframe package is for showing the result.

enter image description here

2
  • Thank you for the answer! I am moving the Nomenclature title up to comply with the chapters. For some reason it is not affected by the page style I set through fancyhdr, hence my question. Your example works fine, but when I compile my main document with your additions the position remains unchanged. I suspect that fancyhdr interferes with your patch, but I simply guessing at this point.
    – stephn28
    Mar 19, 2015 at 23:52
  • @stephn28 fancyhdr has nothing to do with typesetting of chapter titles.
    – egreg
    Mar 19, 2015 at 23:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .