1

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?

0 Answers0