MakeIndex, Nomenclature, Glossaries and AcronymsIndex of a glossary ???

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
latez
Posts: 1
Joined: Sun Jan 18, 2009 7:26 pm

Index of a glossary ???

Post by latez »

Hi all, I'm new and I'm coming looking for help since I've got this problem I don't know how to resolve.

I'm using the glossary package and I've got a latex file which represents a common glossary to several other documents, so it's structure is (mainly) just a list of \glossary followed by a \printglossary with no text, something like this:

Code: Select all

\glossary{name={x}, description={abc}}
\glossary{name={y}, description={def}}
\glossary{name={z}, description={ghi}}
...
\printglossary
Now it's needed to have a index of the glossary terms, in other words I need in the end of document an alphabetical index of the words included in the glossary (the name attribute of the entries). A solution like this won't work:

Code: Select all

\index{x}
\glossary{name={x}, description={abc}}
\index{y}
\glossary{name={y}, description={def}}
\index{z}
\glossary{name={z}, description={ghi}}
...
\printglossary
\printindex
The index is created with correct names but all refers to the same page, the page where the \index tags are written instead of the page where the glossary page is printed. So reading the glossary documentation I was trying to insert the index names via glossary commands (tricky thing, at least for me); after a few tries I came to something like

Code: Select all

\renewcommand{\glsafternum}{\index{\entryname}}
which insert after each entry and index mark, but the tag \entryname gives the default string "Notation" for each entry and not the name of the current entry. I'd need a way to refer to the actual name of the glossary entry and the trick would be done.

Any help on how to do this or on how to solve this problem in another way would be great. I hope my problem has been clearly explained, I'm here for any questions. Thanks in advance!

P.S. By the way, I don't know if this could be useful but I use the perl script to create the glossary and the makeindex command to generate the index and they've always worked without problems.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Index of a glossary ???

Post by nlct »

Hi,

I'm not quite sure what you're asking as it sounds like you want the page number of the actual glossary in the entry's location list, which doesn't really make sense. However, the glossary package is obsolete and has known issues with occasionally getting the location numbers wrong, so you'd be better off using the replacement glossaries package. You can then define your terms and later reference them. The page numbers will refer to where ever you reference the term.

Regards
Nicola Talbot
Post Reply