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

Makogan
  • 885

1 Answers1

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!

hesham
  • 1,443
  • 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 https://tex.stackexchange.com/a/464290/91556 – hesham Jun 14 '20 at 01:53