Text FormattingNomenclature in main document

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
poeli
Posts: 19
Joined: Tue Mar 11, 2014 10:59 am

Nomenclature in main document

Post by poeli »

Hi all,

I was able to make a nomenclature list using the \nomencl command. I did this in a seperate document. When doing a makeindex and pdflatex, it all shows up nice. No problem.
But then when I want to implement this document into my main file trouble begins. I get the following:

'
! Undefined control sequence.
l.7 \nomenclature
{$\rho$}{Air density ($\frac{kg}{m^3}$)}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
'

For each and every entry in my nomenclature. The nomenclature does show up as text, but all close together just as regular text.
The only thing I did in my main doc is
\chapter*{Nomenclature}
\input{nom}

Anyone a solution to this? Let me know if you need a minimal working example, but I think it's just something I'm missing.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Nomenclature in main document

Post by kaiserkarl13 »

You need to use the \printnomenclature command somewhere in your main document. You also need to include the nomencl package. Do NOT use \input to include this file.
poeli
Posts: 19
Joined: Tue Mar 11, 2014 10:59 am

Re: Nomenclature in main document

Post by poeli »

Thanks, but the problem is that all the nomenclature is also in a seperate file... Which looks like this:
\nomenclature{SPL}{Sound pressure level (dB)}
\nomenclature{$f$}{Frequency (Hz)}
\nomenclature{$B$}{Number of blades (-)}
\nomenclature{RPM}{Revolutions per minute (Hz)}

What do I do then with this document if I can't use input?
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Nomenclature in main document

Post by kaiserkarl13 »

You still need to include the nomencl package and use \printnomenclature. The fact that you made the nomenclature command externally makes little difference. It should have the same name as the file you're including it in (different extension).

You might (might) be able to fake it out using \input, but you still need the nomencl package in the included document. That's what the error message is telling you: it doesn't know what the \nomenclature command means, because it's defined in the nomencl package (which you didn't include).
Post Reply