LaTeX forum ⇒ Document Classes[Glossaries] Making acronym entries link to glossary entries

Information and discussion about specific document classes and how to create your own document classes.
robbiie
Posts: 3
Joined: Wed Nov 05, 2008 5:22 pm

[Glossaries] Making acronym entries link to glossary entries

Postby robbiie » Wed Nov 05, 2008 5:35 pm

Hi all,

since a few days I busy myself in trying to find a solution to the following problem:

I'm using the glossaries package for creating a glossary and a list of acronyms in my document.
\usepackage[style=altlist,
nonumberlist,
numberedsection,
acronym,
toc]
{glossaries}


I defined an acronym, e.g.
\newacronym{POS}{POS}{Part Of Speech}

and a separate glossary entry, e.g.
\newglossaryentry{pos}{name=Part Of Speech,description={"`Part of speech"' Description}}


Now, what I would like to have, is the following:

When I reference an acronym in my text using
\gls{pos}

I would like it to be added in the list of acronyms stating that pos stands for "PART OF SPEECH", which is no problem. But, at the same time, I would like the "PART OF SPEECH" description to link to the glossary entry of "pos".

I don't find any clue on how to do this - neither in the documentation, nor in the FAQs of glossaries.

Can anyone help, please?
Thanks,
Robbiie

User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Postby nlct » Thu Nov 06, 2008 11:30 am

Hi,

Try

\newacronym{POS}{POS\glsadd{pos}}{Part Of Speech}

Regards
Nicola Talbot

robbiie
Posts: 3
Joined: Wed Nov 05, 2008 5:22 pm

Postby robbiie » Thu Nov 06, 2008 12:56 pm

Hi Nicola,

very nice of you to answer yourself. Thanks :)

If I understand your documentation correcty, \glsadd means just to statically add an entry to the glossary without any hyper links. Unfortunately that's not what I want. I'd rather have the following:

\newacronym{POS}{POS}{\glslink{pos}{Part of Speech}}

or
\newacronym{POS}{\glslink{pos}{POS}}{Part of Speech}


so that I can follow a link from the table of acronyms to the according glossary entry. Trying both statements results in compile errors, since - i guess - it's not possible to nest \glslink in any other command.

Regards,
Robbiie

User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Postby nlct » Fri Nov 07, 2008 11:31 am

Hi,

sorry I misunderstood. Is the following what you want?

\documentclass{article}

\usepackage[colorlinks]{hyperref}
\usepackage[style=altlist,
nonumberlist,
numberedsection,
acronym,
toc]
{glossaries}

\makeglossaries

\newglossaryentry{pos}{name=\glslink{POS}{Part Of Speech},text=Part of Speech,description={``Part of Speech''
 Description}}
\newacronym[description={\glslink{pos}{Part of Speech}}]{POS}{POS}{Part Of
 Speech}

\begin{document}

\gls{POS}

\printglossaries

\end{document}


Note that for the above example you will need to do:

pdflatex filename
makeglossaries filename
pdflatex filename
makeglossaries filename
pdflatex filename

to get the completed document. (This is because pos isn't referenced in the main body of the document, so it won't be referenced until the list of acronyms is present.)

Regards
Nicola Talbot

robbiie
Posts: 3
Joined: Wed Nov 05, 2008 5:22 pm

Postby robbiie » Fri Nov 07, 2008 12:04 pm

Hi Nicola,

that's exactly what I wanted! Thanks a lot!!!! :D

amarradi
Posts: 1
Joined: Sat Sep 19, 2009 10:48 am

Postby amarradi » Sat Sep 19, 2009 10:51 am

Hallo together,

thats a cool board, Thanks. I need help.
I use this tutorial and it runs very well. How can i sort my glossary, tike the Acronym-List?

Many greeting from germany

Bye amarradi

User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Postby nlct » Wed Sep 23, 2009 11:46 am

amarradi wrote:How can i sort my glossary, tike the Acronym-List?


You need to use an external indexing application to sort the glossary. You can either use makeindex or xindy. If you have Perl installed, you can just run the makeglossaries script with the name of your document without the .tex extension.

Regards
Nicola Talbot

TeddyNall
Posts: 1
Joined: Mon Apr 25, 2011 6:27 pm

Postby TeddyNall » Mon Apr 25, 2011 6:28 pm

can u give me a zithromax link to the perl script?
Last edited by TeddyNall on Tue May 10, 2011 5:45 pm, edited 1 time in total.

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

Postby localghost » Mon Apr 25, 2011 6:34 pm

TeddyNall wrote:can u give me a link to the perl script?

The Perl script is part of the glossaries package. Install it by the package manager of your TeX distribution. With Strawberry Perl you can install a free interpreter for Wind0ws.


Best regards and welcome to the board
Thorsten
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


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 6 guests