I have a nomenclature section in my paper where I defined my symbols. For example:

\entry{$\hat{q}$}{Continuum scale conserved quantity}
\entry{$\hat{f}^0$}{Continuum scale source density function}

My code compiles properly, but the space between the symbol and its corresponding definition seems to be constant such that the definitions are not all aligned in one column. How can I modify it to ensure that the descriptions begin at the same point?

  • 2
    please edit the code to be a complete document showing the problem and packages used: I guessed nomencl.sty) but that doesn't define \entry – David Carlisle Mar 8 '13 at 22:34
  • @DavidCarlisle: Done. I don't think i used nomencl.sty unless the asme2e package implicitly uses it. I'm not really sure. – Paul Mar 8 '13 at 23:00
  • The class file (asme2e.cls) isn't on CTAN as far as I can tell, could you post a link? (Is it this one for example?) – Torbjørn T. Mar 8 '13 at 23:04
  • @TorbjørnT.: Here's the link: iel.ucdavis.edu/code/ASME/conf-1.7/asme2e.cls – Paul Mar 8 '13 at 23:18
  • @Paul The \entry command is defined by \newbox\tempbox \newcommand\entry[2]{% \setbox\tempbox\hbox{##1.\quad} \hangindent\wd\tempbox\noindent{##1}\quad\ignorespaces##2\par}. Not the best, IMO. However, if you want to submit a paper to ASME, you probably have to adhere to the style file. – jub0bs Mar 8 '13 at 23:21

If the asme2.cls is the one found here it's the normal behavior. You can change it by adding the code between \makeatletter and \makeatother (included) to your document:


%%% Start of code to add
        \@latex@warning{Entry `\unexpanded{##1}' is wider}%
%% End of code to add

\entry{$\hat{q}$}{Continuum scale conserved quantity}
\entry{$\hat{f}^0$}{Continuum scale source density function}

You can specify the widest entry as an optional argument to \begin{nomenclature}; if you don't guess correctly, there will be a warning in the log file. For example, if you write


you'll get the warning

LaTeX Warning: Entry `$\hat {f}^0$' is wider on input line 31.

If you don't specify an optional argument, you obtain the same behavior as defined by the class.

enter image description here

  • I wish I could upvote this 10 times. This issue with the asme.cls template was bugging me so much. – grfrazee Jan 30 '17 at 1:44

As already pointed out the non-aligned setting is the expected behaviour of asme2e. Here is my take of a redefinition using a \list. It also indents long descriptions so that the description forms an aligned block, just like the original environment. As an optional argument my nomenclature environment takes the width of the symbol column, which defaults to 1cm.

% \addtolength{\textwidth}{-1pt}
% \usepackage{graphicx}
% \usepackage{amsmath}
% \usepackage{amssymb}
% \special{papersize=8.5in,11in}

    \list{}{\leftmargin #1}%

% or use \begin{nomenclature}[1.5cm] to have a wider symbol column
\entry{$\hat{q}$}{Continuum scale conserved quantity}
\entry{$\hat{f}^{0}$}{Continuum scale source density function}
\entry{$A$}{Long description long description long description long description long description long description long description long description long description}

sample output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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