[Tex/LaTex] Nomenclature won’t work

nomenclaturetexstudio

I'm trying to get a nomenclature running in LaTeX. The problem is that the nomenclature never is printed. I got an example from here:

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{nomencl}
\makenomenclature

\begin{document}

\nomenclature{$c$}{Speed of light in a vacuum inertial frame}
\nomenclature{$h$}{Planck constant}

\printnomenclature
\end{document}

Without printing errors this wouldn't even create a PDF.

I use Ubuntu 15.04, I have almost all texlive-packages installed, I compile using TexStudio and XeLaTex.

What must I do to get the nomenclature running?

Best Answer

The nomencl package needs some typeset text in the document -- otherwise it won't write the foo.nlo file (if the document is called foo.tex).

After the foo.nlo exists, it's necessary to use (in terminal or in an editor 'external utilities' command.)

makeindex -s nomencl.ist -o foo.nls foo.nlo

The nomencl.ist is provided by the nomencl package already.

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{nomencl}
\makenomenclature

\begin{document}

\nomenclature{$c$}{Speed of light in a vacuum inertial frame}
\nomenclature{$h$}{Planck constant}

Some text

\printnomenclature
\end{document}

enter image description here

Related Question