Similar to this question: this, and this, but it did not help me.
UPDATE: I am specifically looking for the res class. However, I do not care if bibentry is used or something else.
I cannot compile references, the problem seems to be with bibentry, hyperref, and the bibliography files. The code results either in an error or compiles but the references are not printed out, depending on whether hyperref is loaded before or after bibentry.
Here is a MWE where I removed all other details. This produces the relevant errors.
\documentclass[10pt]{res}
\usepackage[margin=1in,left=0.8in,right=1.2in]{geometry}
\usepackage{bibentry}
\makeatletter\let\saved@bibitem\@bibitem\makeatother
\usepackage{enumitem}
\nobibliography{thebib}
\bibliographystyle{ieeetr}
\usepackage[hidelinks,pagebackref=true,linktocpage]{hyperref}
\makeatletter\let\@bibitem\saved@bibitem\makeatother
\hypersetup{linkcolor=blue}
\begin{document}
\begin{resume}
\section{\sc Publications}
\begin{enumerate}
\item \bibentry{singh2019popov}
\end{enumerate}
\end{resume}
\end{document}
And this is the bibtex file called thebib.bib
@Article{singh2019popov,
author = {Singh, Bismark},
title = {{Popov, Berg, Sokolov}: A Street with Three Plaques},
journal = {The Mathematical Intelligencer},
year = {2019},
volume = {41},
number = {4},
pages = {13--15},
month = {Dec},
issn = {1866-7414},
day = {01},
doi = {10.1007/s00283-019-09936-1},
url = {https://doi.org/10.1007/s00283-019-09936-1},
}
\nobibliography{thebib} \bibliographystyle{ieeetr}are inside the document environment. I also had to change\nobibliography{thebib}to\bibliography{thebib}, but that's probably due to some package i'm missing. Can you try running it again with those two commands inside the document environment and tell us the result? – Arak Tog Feb 12 '20 at 17:06\documentclass[10pt]{article}\usepackage{bibentry}\begin{document}\nobibliography{thebib}\bibliographystyle{ieeetr}Some text here. My publications:\begin{itemize}\item \bibentry{singh2019popov}\item \bibentry{singh2019popov}\end{itemize}Some other text.
– Arak Tog Feb 12 '20 at 17:23\end{document}