# Align all descriptions relative to the longest symbol in a nomenclature

I'm using the nomencl-package for a list of symbols. Line breaks are inserted automatically whenever a description of a symbol is too long. However, if a symbol itself is too long, the indentation of the first and second line of the description is not aligned. The following example shows what I mean:

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

\usepackage{nomencl}
\makenomenclature

\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
\item[\bfseries
\ifstrequal{#1}{A}{A}{}
]}

\begin{document}
\mbox{}

\nomenclature[A]{$a$}{Abc def ghi jkl mno pqr stu vwx yz. 123 456 789 101112 131415 161718 192021}
\nomenclature[A]{$foobar123$}{Abc def ghi jkl mno pqr stu vwx yz. 123 456 789 101112 131415 161718 192021}

\printnomenclature

\end{document}


This is how the rendered output looks like:

Is it possible to automatically indent all descriptions relative to the longest symbol in the list ($foobar123$ in the example)?

• Relative to the whole nomenclature, or on a per letter basis? Sep 16, 2019 at 19:19
• @Bernard There should be be an indentation of the description after the last letter of the longest symbol ($fooa123$) and the indentation of the description of every other symbol (e.g. $a$) should be aligned with that description. Sep 17, 2019 at 4:17
• Looks like you want a table to display the nomenclature instead of a description list (=> the nomentbl style) Nov 3, 2019 at 7:41
• @clemens I don't know if what you write is what I want. How could I do it? Nov 3, 2019 at 9:50
• I wanted to answer your question but it seems there's a bug when using the nomentbl option. I made a report of this here: github.com/borisveytsman/nomencl/issues/7 Nov 3, 2019 at 15:14

\setlength{\nomlabelwidth}{xcm}

(where x is replaced with a suitably chosen value).