\nocite 的問題

\nocite 的問題

我正在用 LaTex 寫論文,但參考書目有問題。我想寫下我放入的所有參考文獻,以及文本中未引用的參考文獻。我嘗試使用該命令\nocite{*},但當我使用它時,它確實顯示了所有引用,但在文本中,引用就像沒有數字的 [?] 。它正確執行,但當我不使用該命令時沒有所有引用。程式碼如下:

\documentclass[10pt,twoside,a4paper]{report}
\usepackage[english,mt]{ethidsc} 
\usepackage{pdfpages}
\usepackage{fixltx2e} 
\usepackage{emptypage}

\begin{document}
\maketitle  
%chapters....
\backmatter

\bibliographystyle{unsrt}
\bibliography{bibliography}

\end{document}

參考文獻位於 bibliography.bib 檔案中,寫法如下

@article{C2014,
author={Author},
journal={Journal C},
title={First Paper},
year={2020}
}

知道如何解決這個問題嗎?謝謝!

答案1

確保多次編譯您的文件:

  • pdflatexbibtex/ biberpdflatexpdflatex

報告類別中沒有\backmatter,所以我註解掉了該部分。我還刪除了現在不需要的fixltx2e-package。

下面的例子運行沒有問題:

\documentclass[10pt,a4paper]{report}

\usepackage{pdfpages}
% \usepackage{fixltx2e} 
\usepackage{emptypage}
\usepackage{kantlipsum}

\begin{filecontents}{bibliography.bib}
@article{C2014,
author={Firstname Lastname},
journal={Journal C},
title={First Paper},
year={2020}
}
\end{filecontents}

\title{Me, I, and all my other Personalities}
\author{Me I. Myself}

\begin{document}
\maketitle  

\chapter{First Chapter}
\kant[1]

\section{Here be a Citation}
This is the best article ever written: \cite{C2014}

% \backmatter
\nocite{*}
\bibliographystyle{unsrt}
\bibliography{bibliography}

\end{document}

引文

參考書目

相關內容