如何將 bibentry 與 .bbl 而不是 .bib 檔案一起使用?

如何將 bibentry 與 .bbl 而不是 .bib 檔案一起使用?

我有 2 個文檔,我想讓參考文獻保持一致。將它們稱為文檔 A 和文檔 B。

我像往常一樣編譯文檔 A,它輸出一個 .bbl 檔案。現在,我想編譯文件 B,其中 (1) 引文編號與文件 A 相同,並且 (2) 我想刪除參考文獻清單並以文字形式列印參考書目條目(不是引文編號)。

例如,這裡是文檔A:

文件文件

\documentclass{article}
\usepackage{cite} 
\usepackage[utf8]{inputenc}
\usepackage{bibentry}

\begin{document}

\nobibliography{my_bib1.bib, my_bib2.bib}

This is a reference to \cite{myref1} and \cite{myref2}. 

And, this is my in text bibliography entry:

\cite{myref1} \bibentry{myref1}

More text. More text.

\newpage
{
    \bibliographystyle{plain}
}

\end{document}

而且,這些是我在文件 A 中使用的 .bib 檔案。

my_bib1.bib

@article{myref1,
  title={Paper Title 1},
  author={LastnameA, A and LastnameB, B and LastnameC, C},
  journal={arXiv preprint arXiv:0000.00000},
  year={2024}
}

my_bib2.bib

@article{myref2,
  title={Paper Title 2},
  author={LastnameA, A and LastnameB, B and LastnameC, C},
  journal={arXiv preprint arXiv:0000.00000},
  year={2024}
}

現在,在文件 B 中,我有以下內容(顯然不起作用):

\documentclass{article}
\usepackage{cite} 
\usepackage[utf8]{inputenc}

\usepackage{bibentry}

\begin{document}

\input{doca.bbl}

This is a reference to~\cite{myref1} and~\cite{myref2}. 

\cite{myref1} \bibentry{myref1}

More text.

\end{document}

我有 2 個問題:

  1. 第一個是\bibentry沒工作。據我了解,我需要先打電話\nobibliography再打電話\bibentry;但是,我沒有呼叫\nobibliography文件 B,因為我正在使用.bbl文件 A 中的內容。
  2. 第二個是我無法從文件中刪除引用列表,因為.bbl包含\begin{thebibliography}\end{thebibliography}

有辦法實現我想要的嗎?也就是說,以文字形式列印參考書目條目並保持兩個文件之間的參考書目編號一致?我可以使用上面的方法實現其中之一,但我無法讓它們都工作。

我知道我可以使用xrxcite套件來使引用保持一致,但我沒有看到它們可以用來規避上述問題的方法。

相關內容