2

I have a bibtex file where every element has a url, e.g:

@article{preiner_gaussian-product_2019,
    title = {Gaussian-product subdivision surfaces},
    volume = {38},
    issn = {0730-0301, 1557-7368},
    url = {https://dl.acm.org/doi/10.1145/3306346.3323026},
    doi = {10.1145/3306346.3323026},
    language = {en},
    number = {4},
    urldate = {2020-05-22},
    journal = {ACM Transactions on Graphics},
    author = {Preiner, Reinhold and Boubekeur, Tamy and Wimmer, Michael},
    month = jul,
    year = {2019},
    pages = {1--11},
    file = {Full Text:/home/makogan/Zotero/storage/4VCQH8QL/Preiner et al. - 2019 - Gaussian-product subdivision surfaces.pdf:application/pdf}
}

I am trying to make it so that when I compile the final pdf, the title of the article is linked to the url, e.g:

\href{https://dl.acm.org/doi/10.1145/3306346.3323026}{Gaussian-product subdivision surfaces}

In other words I need to configure the command:

\bibliography{bibliography}
\bibliographystyle{ieeetr}

To guarantee that if available the title in the reference is a clickable link to the original document.

As requested in a comment: enter image description here

5
  • Are you using \usepackage{hyperref}? – algae Jun 13 '20 at 23:45
  • I am, yes. However it only links the citations to the references, not the references to the source – Makogan Jun 14 '20 at 0:06
  • Should the the url link show in the ref title? What about showing at the end of the ref entry? – hesham Jun 14 '20 at 0:29
  • 1
    Can you show a picture example of how you want the reference entry be displayed at the pdf? – hesham Jun 14 '20 at 0:32
  • Provided at the bottom of the question now. – Makogan Jun 14 '20 at 0:44
2

It looks like you are reversing the order of the \href inputs. The correct use of \href is

\href{https://web/address/link}{Text to be displayed}

Applying this correction, the output would be

enter image description here

This is a minimal code of main tex

\documentclass{article}
\bibliographystyle{ieeetr}
\usepackage{hyperref} % you can add the option [hidelink] if you dont want to show the square box, the links would still be active
\begin{document}
    Check ref.1 \cite{preiner_gaussian-product_2019}.
\bibliography{reference}
\end{document}

And this is the corrected bib entry configuration in the bib file

@article{preiner_gaussian-product_2019,
    title = {\href{https://dl.acm.org/doi/10.1145/3306346.3323026}{Gaussian-product subdivision surfaces}},
    volume = {38},
    issn = {0730-0301, 1557-7368},
    url = {https://dl.acm.org/doi/10.1145/3306346.3323026},
    doi = {10.1145/3306346.3323026},
    language = {en},
    number = {4},
    urldate = {2020-05-22},
    journal = {ACM Transactions on Graphics},
    author = {Preiner, Reinhold and Boubekeur, Tamy and Wimmer, Michael},
    month = jul,
    year = {2019},
    pages = {1--11},
    file = {Full Text:/home/makogan/Zotero/storage/4VCQH8QL/Preiner et al. - 2019 - Gaussian-product subdivision surfaces.pdf:application/pdf},
}

Note that this way you did not benefit from the url field in your bib entry. If you use another bibliography style (e.g. \bibliographystyle{IEEEtran}, the url field that you entered will be displayed at the end of the bib entry, like this

enter image description here

In that case will you still need the ref title be linked to the url by \href? Well I guess that's up to you!

1
  • If you further need the entire whole bib entry linking to the url (although it's pretty cumbersome and you may need to switch to biblatex), have a look at tex.stackexchange.com/a/464290/91556 – hesham Jun 14 '20 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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