3

This question already has an answer here:

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 Oct 25 '15 at 11:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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
3

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

  • 1
    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

Not the answer you're looking for? Browse other questions tagged or ask your own question.