# Nomenclature won't work [duplicate]

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?

## marked as duplicate by egreg xetex StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Oct 25 '15 at 11:59

• Welcome to TeX.SX! You have no typesetting text in your document! – user31729 Oct 25 '15 at 11:58
• I've deleted the xetex tag since this question is not related to xelatex or xetex at all – user31729 Oct 25 '15 at 12:03

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}


• I couldn't get it running. If I copy and paste your code into test.tex and then compile it through TexStudio with XeLaTex, the only visible thing in the resulting test.pdf is "Some text". Other then that there is a test.aux, test.log, test.nlo, test.ssynctex.gz. – Socrates Oct 25 '15 at 16:38
• With typeset you mean "Some text", right? – Socrates Oct 25 '15 at 16:41
• @Socrates: Exactly, Some text, that is typesetting. Without it you have an empty document and there will be no nomenclature. By the way, if you use xelatex, what's the purpose of \usepackage{inputenc} then? And it works the way I wrote in my post too (even with xelatex)! – user31729 Oct 25 '15 at 20:59