LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and AcronymsNomenclature error

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

Nomenclature error

Postby guest123 » Fri Sep 25, 2009 11:25 am

Hello I have a problem with nomenclature.
  1. \documentclass[english,12pt,a4paper]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[latin9]{inputenc}
  4. \usepackage{float}
  5. \usepackage{graphicx}
  6. \usepackage{multirow}
  7. \usepackage{nomencl}
  8. \usepackage{makeidx}
  10. \makenomenclature
  11. \makeindex testled.nlo -s -o testled.nls
  13. \begin{document}
  15. \noindent Text1
  16. \noindent text2
  17. \noindent text3
  18. \nomenclature{a}{description, unit$}
  19. \printnomenclature
  21. \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?

User avatar
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Fri Sep 25, 2009 11:31 am

You understood something wrong. You can't generate the nomenclature inside your document this way.
  1. \makeindex testled.nlo -s -o testled.nls

Omit this line. You have to run makeindex on the command line.
  1. makeindex testled.nlo -s -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
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Posts: 2
Joined: Fri Sep 25, 2009 11:18 am

Postby guest123 » Fri Sep 25, 2009 10:51 pm

Thank you very much, works now :).

Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 6 guests