Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In some books, the keywords page not only has a list of pages the keyword was referenced, it also bold or emphasize page numbers where the keyword was defined or explained. How do I do that with acronym option in glossaries?

With the MWE attached, the glossary page gives:

Fft fast Fourier transform. 1–3

I would like something akin to:

Fft fast Fourier transform. 2, 1-3

or 1,2,3 or similar. The best idea is to have a user field say user6 with a user defined label link such that in the acronym definition:

\newacronym[sort=FFT,user6={\pageref{link:fft}}]{FFT}{\textsc{Fft}}{fast Fourier transform}

I presume it may be quite an undertaking?

MWE:

\documentclass[11pt,a4paper]{article}
\usepackage[acronym,shortcuts]{glossaries} 
\newacronym[sort=FFT]{FFT}{\textsc{Fft}}{fast Fourier transform}
\makeglossaries

\begin{document}
\Ac{FFT} is widely used to compute Fourier transforms. For more information see p.\pageref{link:fft}
\newpage
\section{Fast Fourier Transform}\label{link:fft}
\Acf{FFT}, is a radix-2 algorithm implementing the discrete Fourier transform...........................................................%explanation
\newpage
\ac{FFT} %some other references
\newpage
\printglossary[type=\acronymtype]
\end{document}
share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

I think the simplest solution is to just use the format key at the principle reference. Like this:

\documentclass[11pt,a4paper]{article}
\usepackage{hyperref}
\usepackage[acronym,shortcuts]{glossaries} 
\newacronym[sort=FFT]{FFT}{\textsc{Fft}}{fast Fourier transform}
\makeglossaries

\begin{document}
\Ac{FFT} is widely used to compute Fourier transforms. For more
information see p.\pageref{link:fft}
\newpage
\section{Fast Fourier Transform}\label{link:fft}
\Acf[format=hyperbf]{FFT}, is a radix-2 algorithm implementing the discrete Fourier
transform...........................................................%explanation
\newpage
\ac{FFT} %some other references
\newpage
\printglossary[type=\acronymtype]
\end{document}
share|improve this answer
3  
+1, and I think my status as top user of the glossaries tag will soon be over. :-) –  lockstep Oct 19 '12 at 13:31
    
Ingenious! One small concern, how do I preserve the compatibility with hyperref? When I tried the above the hyperref link is not created at the bold page number –  Mobius Pizza Oct 19 '12 at 14:49
4  
@MobiusPizza change textbf to hyperbf (I've edited the example to include hyperref and made this change.) –  Nicola Talbot Oct 19 '12 at 14:55
    
Sorry for necroing this, I realize that using this method generates duplicated page number such as 8, 8. I guess there is no easy way round that unless manually changing all references text format to bf on p.8? –  Mobius Pizza Oct 26 '12 at 10:30
    
@MobiusPizza I don't think there is an easy way around this as there's no way of telling makeindex what to do with duplicate page numbers that have different formats. I usually use \gls[format=hyperbf] for the main reference and \glsentrytext for the neighbouring references. (Or \ac[format=hyperbf] and \glsentryshort.) The only alternative I can think of is to post-process the .gls or .acr file. –  Nicola Talbot Oct 26 '12 at 13:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.