I am trying to get an "in-line" citation (they are usually used in the abstract or in figure captions) in latex using the revtex4-2 documentclass. It should be something like
This is some text, and here is some reference [b. aa, Reference Title (Source, 2023)].
The code is
\documentclass[reprint, nofootinbib, amsmath, amssymb, aps]{revtex4-2}
\usepackage{natbib}
\usepackage{bibentry}
\usepackage{filecontents}
\begin{filecontents}{testbib.bib}
@book{ref,
author = {aa, bb},
title = {Reference Title},
year = 2023,
publisher = {dd},
}
\end{filecontents}
\begin{document}
This is some text, and here is some reference [\bibentry{ref}]
\bibliographystyle{apsrev4-2}
\bibliography{testbib}
\end{document}
Which produces a page with the text
This is some text, and here is some reference []
followed by a horizontal line (which indicates that the references are following) and
[1] b. aa, Reference Title (dd, 2023).
which is the usual bibliography.
So there are two problems here. First, the entry is not displayed in the text, and secondly, the reference still appears in the bibliography. How can I add such an inline citation?
\bibentrycitations? – Dai Bowen Jun 11 '23 at 15:54\cite) should appear in the regular bibliography in the end. – HerpDerpington Jun 11 '23 at 16:20\bibentry, either there cannot be any bibliography, or any\bibentrycited references must appear in the bibliography. – Dai Bowen Jun 11 '23 at 17:11\bibentry? – HerpDerpington Jun 11 '23 at 17:38natbib-compatible. I have no ideas without manually editing the.bblfile. – Dai Bowen Jun 11 '23 at 18:20