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.

I am using the multibib and hyperref packages.
I would like to create clickable citations for my bibliographies.
It works for the first one (biblio.bib) but not the second one (awebsite.bib)

Here is my minimal working example.

\documentclass[utf8]{article}
\usepackage[english]{babel}

\usepackage{multibib}
\newcites{awebsite}{Another bibliography}

\usepackage[colorlinks=true]{hyperref}

\begin{document}
The quick brown fox \cite[p.4]{article} jumps over
\cite[p.5]{articleweb} the lazy dog \citeawebsite[p.6]{articleweb}.

\bibliographystyle{plain}
\bibliography{biblio}

\bibliographystyleawebsite{plain}
\bibliographyawebsite{awebsite}

\end{document}

The two BIB files (biblio.bib and awebsite.bib) are herebelow.

@inproceedings{article, title = "{Title}", author = "Authors", booktitle = "{BT}"}

...

@article{articleweb, author = {A}, title = "{Title2}", year = {2013}, note = {\url{URL}}}

And there is the result (PDF)...


The quick brown fox [1, p.4] jumps over [2, p.5] the lazy dog [2, p.6].

References

[1] Authors. Title. In BT.

Another bibliography

[2] A. Title2. 2013. URL.


The first link to References [1] is created but not the two others. Why ?

Thanks in advance for any suggestions on how to fix this.

share|improve this question
    
Welcome to TeX.SX. –  Claudio Fiandrino Mar 28 '13 at 16:51
    
The url can be in its own field url={}, instead of inside note={}, although I don't think that is the main culprit here. Have you run latex multiple times? –  cryptic0 Mar 28 '13 at 16:55
    
Thank you for your welcome, Claudio. crypticO, yes ! I know that I have to « clean » my BIB files and remove some unnecessary brackets and quotes. Well, thanks anyway, for looking at my case. :) –  eddyte Mar 28 '13 at 17:44
add comment

1 Answer

up vote 2 down vote accepted

Since multibib supports natbib, and natbib supports hyperref, load natbib, too.

\documentclass{article}
\usepackage[english]{babel}

\usepackage{filecontents}
\begin{filecontents}{biblio.bib}
  @inproceedings{article, title = "{Title}", author = "Authors", booktitle = "{BT}"}
\end{filecontents}
\begin{filecontents}{awebsite.bib}
  @article{articleweb, author = {A}, title = "{Title2}", year = {2013}, note = {\url{URL}}}
\end{filecontents}

\usepackage{natbib}         %% load this, too
\usepackage{multibib}
\newcites{awebsite}{Another bibliography}

\usepackage[colorlinks=true]{hyperref}

\begin{document}
The quick brown fox \cite[p.4]{article} jumps over
\cite[p.5]{articleweb} the lazy dog \citeawebsite[p.6]{articleweb}.

\bibliographystyle{plain}
\bibliography{biblio}

\bibliographystyleawebsite{plain}
\bibliographyawebsite{awebsite}
\end{document}

gives

sample output

share|improve this answer
    
Fantastic ! It works ! Thank you very much. I tried to use natbib but it didn't work. In fact, natbib must be called before multibib and hyperref. If not, an error « Extra \else, Use of \@citex doesn't match its definition » occurs. Thank you, thank you, thank you for your help. :) –  eddyte Mar 28 '13 at 17:33
    
@eddyte Yes, hyperref usually comes last, and multibib has to come after natbib. –  mafp Mar 28 '13 at 17:39
    
I am used to classifying the packages in alphabetical order. Well, given that kind of problem, this is really a bad habit I'll try to get over. Thank you mafp. :) –  eddyte Mar 28 '13 at 18:00
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.