4

When I have symbols like $\|\|$ in a nomenclature entry, then the entry doesn't show. Using this minimal example:

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

\usepackage{nomencl}
\makenomenclature

\begin{document}
\mbox{}

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

\printnomenclature
\end{document}

I get an entry for the speed of light and the planck constant but the norm entry just falls under the bus. Is this deliberate? How can I make the norm show in the nomenclature?

2
  • Exactly what should \|\| mean here? Is the the norm function? Isn't that normally written as \lVert{}\cdot{}\rVert to mark it as a function?
    – daleif
    Dec 19, 2018 at 14:24
  • 1
    | is one of makeindex's special characters. See tex.stackexchange.com/questions/31562 Dec 19, 2018 at 15:48

2 Answers 2

1

You need to escape the special characters, the backslash and the vertical bar:

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

\usepackage{nomencl}
\makenomenclature

\begin{document}
\mbox{}

\nomenclature{$c$}{Speed of light in a vacuum inertial frame}
\nomenclature{$h$}{Planck constant}
\nomenclature{$"\"|\,{\cdot}\,"\"|$}{Norm}

\printnomenclature
\end{document}

On the other hand using \lVert and \rVert is simpler (and more correct)

\nomenclature{$\lVert\,{\cdot}\,\rVert$}{Norm}

enter image description here

2

As @Nicola-Talbot pointed out, | is a special character for makeindex. But it's better to use $\Vert$ in any case. As an aside, I'm a big fan of the paired delimiter setup in the mathtools package: it ensures that you never have unmatched parentheses.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{nomencl}
\makenomenclature

\begin{document}


hello

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

\printnomenclature
\end{document}

You must log in to answer this question.

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