MakeIndex, Nomenclature, Glossaries and AcronymsNomenclature error

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
guest123
Posts: 2
Joined: Fri Sep 25, 2009 11:18 am

Nomenclature error

Post by guest123 »

Hello I have a problem with nomenclature.

Code: Select all

\documentclass[english,12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{float}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{nomencl}
\usepackage{makeidx}

\makenomenclature
\makeindex testled.nlo -s nomencl.ist -o testled.nls

\begin{document}

\noindent Text1
\noindent text2
\noindent text3
\nomenclature{a}{description, unit$}
\printnomenclature

\end{document}
In this case an error "Missing \begin{document}" occured.

When i put \makeindex after \begin{document} I have error: Can be used only in preamble. So what should I do to make it work?

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Nomenclature error

Post by localghost »

You understood something wrong. You can't generate the nomenclature inside your document this way.

Code: Select all

\makeindex testled.nlo -s nomencl.ist -o testled.nls
Omit this line. You have to run makeindex on the command line.

Code: Select all

makeindex testled.nlo -s nomencl.ist -o testled.nls
More information can be found in the nomencl manual. Depending on your editor you might incorporate this line into the compilation process.


Best regards and welcome to the board
Thorsten
guest123
Posts: 2
Joined: Fri Sep 25, 2009 11:18 am

Re: Nomenclature error

Post by guest123 »

Thank you very much, works now :).
Post Reply