Latex 使用\bibentry在内联引用前面显示数字

Latex 使用\bibentry在内联引用前面显示数字,latex,bibliography,Latex,Bibliography,我想显示由bibentry包中的\bibentry生成的完整内联引用前面的数字,与参考书目中出现的数字匹配 在以下MWE中,这将对应于缩进的\bibentry前面的[2]。我该怎么做 \documentclass[11pt]{article} \usepackage{bibentry} \begin{filecontents}{test.bib} @misc{Emma, author = "Emma", title = "Emma's publication", year = "2001" }

我想显示由
bibentry
包中的
\bibentry
生成的完整内联引用前面的数字,与参考书目中出现的数字匹配

在以下MWE中,这将对应于缩进的
\bibentry
前面的[2]。我该怎么做

\documentclass[11pt]{article}
\usepackage{bibentry}
\begin{filecontents}{test.bib}
@misc{Emma,
author = "Emma",
title = "Emma's publication",
year = "2001" }
@misc{Martha,
author = "Martha",
title = "Interesting thoughts",
year = "2003" }
@misc{Paul,
author = "Paul",
title = "Paul's essay",
year = "2000" }
\end{filecontents}
\begin{document}
\nobibliography*
\noindent
This is a usual reference~\cite{Emma}.
Now I'm referring to\\[5pt]
\indent \bibentry{Martha}.\\[5pt]
The following is again a normal reference~\cite{Paul}.
\bibliography{test}
\bibliographystyle{plain}
\end{document}

我想
bibentry
不允许这样做,一个可能的解决方案是将新命令(或重新定义
\bibentry
)定义为
\cite
\bibentry

诸如此类的事情:

\let\oldbibentry\bibentry
\更新命令{\bibentry}[1]{\cite{1}\oldbibbentry{1}
因此,如果我们尝试以下代码:

\documentclass[11pt]{article}
\usepackage{bibentry}
%将bibentry命令重新定义为cite-then-bibentry
\让\oldbibentry\bibentry
\更新命令{\bibentry}[1]{\cite{1}\oldbibbentry{1}
\开始{filecontents}{test.bib}
@misc{Emma,
作者=“Emma”,
title=“Emma的出版物”,
年份=“2001”}
@杂项{玛莎,
作者=“玛莎”,
title=“有趣的想法”,
年份=“2003”}
@misc{Paul,
作者=“保罗”,
title=“保罗的文章”,
年份=“2000”}
\结束{filecontents}
\贵族传记*
\开始{document}
\诺登
这是一个常用的参考~\cite{Emma}。
现在我指的是\\[5pt]
\缩进\bibentry{Martha}.\\[5pt]
下面是一个普通的引用~\cite{Paul}。
\参考书目{test}
\书目样式{plain}
\结束{document}
它应该生产:

漂亮。这很明显,真的,但我没有想到。谢谢