[OS X TeX] OT: low-tech bibliographic hyperlinking

Bruno Voisin bvoisin at mac.com
Wed May 2 11:23:35 EDT 2007


Until someday I embark into exploring the intricacies of BibTeX and  
natbib, I was looking for a quick-and-dirty way of having, in author- 
date style and with the hyperref package, bibliographic references  
entered manually in the text turned into hyperlinks pointing to the  
corresponding references in a list of references entered manually at  
the end.

Namely, imagine you've got the hyperref package loaded and a list of  
references entered manually in the form:

\begin{thebibliography}{99}

\bibitem{HerHim07}
Her, A~B. \& Him, C.~D. (2007)
Ultra-modern boredom.
\textit{Modern Chic Magazine} \textbf{0}(2}, 1--99.

\end{thebibliography}

at the end of your document. Then you want to write, again manually,  
"Her \& Him (2007)" in the preceding text and make this a hyperlink  
pointing to the corresponding reference in the list of references.  
When you're using \cite proper I suppose this is done automatically,  
but imagine you don't want to use \cite and you want to resort  
instead to an explicit command of hyperref.

The problem is the lack of documentation of the hyperref internals.  
Looking at the hyperref source code, it seems each \bibitem command  
creates a hyperanchor cite.<argument>, where <argument> is the  
argument of \bibitem, as if a \hypertarget{cite.<argument>}{} had  
been inserted immediately after the \bibitem command. For example,  
the above \bibitem{HerHim07} creates a hypertarget cite.HerHim07  
immediately before "Her, A. B. & Him, C. D. (2007)" in the PDF output.

Based on this, I've been able to enter the hyperlinks manually using  
\hyperlink{cite.<argument>}{text of the hyperlink}, yielding for the  
above example \hyperlink{cite.HerHim07}{Her \& Him (2007)}.  
Beforehand I had tried \hyperref[HerHim07]{Her \& Him (2007)} and  
\hyperref[cite.HerHim07]{Her \& Him (2007)} with no luck.

This seems a pretty ugly solution, and I'm wondering whether I'm not  
missing something obvious.

Bruno Voisin



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list