[Tex/LaTex] Hyperref in BibTex and the JHEP Style for the Bibliography

bibliographiesbibtexhrefhyperref

I would like to attach a link to the name of an article (which doesn't have a DOI) in BibTex. I am using the JHEP style for the bibliography. However, the command \href{}{} does not work in the BibTeX file. For example, I can not see the name of the following article in the resulting pdf file

\documentclass[11pt,a4paper]{article}
\usepackage{jheppub}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amsthm, mathtools}
\usepackage{hyperref}
\hypersetup{urlcolor=Aquamarine, citecolor=red, linkcolor=Emerald}

\begin{document}

We use the results of \cite{MeeksPatrusky1978a}.

\end{document}

The BibTex item is

@article{MeeksPatrusky1978a,
    author = "Meeks, William H. and Patrusky, Julie",
    fjournal = "Illinois Journal of Mathematics",
    journal = "Illinois J. Math.",
    month = "06",
    number = "2",
    pages = "262--269",
    publisher = "Duke University Press",
    title = "{\href{https://projecteuclid.org:443/euclid.ijm/1256048735}{Representing Homology Classes by Embedded Circles on a Compact Surface}}",
    volume = "22",
    year = "1978"}

I am using the latest version of Texstudio. Any comment would be appreciated.

P.S. I have checked all the other relevant posts. I couldn't find the solution in any of them.

Best Answer

Apart from irrelevant errors caused by your MWE being incomplete, I get no errors, and in the absence of a log or something I can't guess what's going wrong.

But I suggest this is the wrong way to do things if you are trying to use the JHEP style properly. It recognises an "eprint" field which, if provided, will hyperlink the journal reference. I'd suggest that is probably the "official" and better way to achieve your aim while sticking to the particular style you are using. After all, the whole point of providing styles is to produce consistency! (A "doi" would be even better, if there is one.)

\documentclass[11pt,a4paper]{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{MeeksPatrusky1978a,
    author = "Meeks, William H. and Patrusky, Julie",
    fjournal = "Illinois Journal of Mathematics",
    journal = "Illinois J. Math.",
    month = "06",
    number = "2",
    pages = "262--269",
    publisher = "Duke University Press",
    title = "Representing Homology Classes by Embedded Circles on a Compact Surface",
    eprint = "https://projecteuclid.org:443/euclid.ijm/1256048735",
    volume = "22",
    year = "1978"}
\end{filecontents}
\usepackage{jheppub}

\usepackage[utf8]{inputenc}
\usepackage{amsmath, amsthm, mathtools}
\usepackage{hyperref}
\bibliographystyle{jhep}

\begin{document}

We use the results of \cite{MeeksPatrusky1978a}.

\bibliography{\jobname.bib}

\end{document}

Produces output from LaTeX code

Related Question