為什麼我的參考書目沒有顯示?

為什麼我的參考書目沒有顯示?

我正在使用 sublime text,每當我想添加參考書目時,它都會失敗並出現警告:空參考書目。我該如何解決這個問題?這是我的程式碼:

\documentclass[12pt, a4paper, leqno]{article}
\usepackage{a4wide}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{appendix}
\usepackage{float, afterpage, rotating, graphicx}
\usepackage{epstopdf}
\usepackage{longtable, booktabs, tabularx}
\usepackage{fancyvrb, moreverb, relsize}
\usepackage{eurosym, calc}
\usepackage{amsmath, amssymb, amsfonts, amsthm, bm}
\usepackage{newtxtext,newtxmath}
\usepackage{caption}
\usepackage{mdwlist}
\usepackage{xfrac}
\usepackage{setspace}
\usepackage{xcolor}
\usepackage{subcaption}
\usepackage{minibox}
\usepackage{makecell}
\renewcommand{\theadfont}{\normalsize}
\usepackage{geometry}
\geometry{
 left=3cm,
 right=2cm,
 top=2cm,
 bottom=2cm,
}

\usepackage[backend=biber]{biblatex}
\addbibresource{refs.bib}
\usepackage[unicode=true]{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=black,
    anchorcolor=black,
    citecolor=black,
    filecolor=black,
    menucolor=black,
    runcolor=black,
    urlcolor=black
}

\widowpenalty=10000
\clubpenalty=10000

\setlength{\parskip}{2ex}
\setlength{\parindent}{0ex}
\setstretch{1.5}

\begin{document}
abcdefghijklmn...

\newpage
\printbibliography
\end{document}

我的圍脖文件是

@article{acemoglu2008income,
  title={Income and democracy},
  author={Acemoglu, Daron and Johnson, Simon and Robinson, James A and Yared, Pierre},
  journal={American Economic Review},
  volume={98},
  number={3},
  pages={808--42},
  year={2008}
}

@book{baltagi2008econometric,
  title={Econometric analysis of panel data},
  author={Baltagi, Badi},
  year={2008},
  publisher={John Wiley \& Sons}
}

@article{kiviet1995bias,
  title={On bias, inconsistency, and efficiency of various estimators in dynamic panel data models},
  author={Kiviet, Jan F},
  journal={Journal of econometrics},
  volume={68},
  number={1},
  pages={53--78},
  year={1995},
  publisher={Elsevier}
}

答案1

您需要在文件中引用來源,以便它們出現在參考書目中。將您的 .tex 檔案更改為:

\documentclass[12pt, a4paper, leqno]{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{refs.bib}
\begin{document}
a\autocite[\pno~1]{acemoglu2008income}

b\autocite{baltagi2008econometric}

cdefghijklmn...

\nocite{kiviet1995bias}

\newpage
\printbibliography
\end{document}

它應該有效。請記住運行 pdflatex、biber、pdflatex、pdflatex 以獲得所有正確的參考文獻和註釋。

考慮在下一個問題上發布一個最小的工作範例(沒有所有額外的使用包);有時建立一個最小的範例可以揭示問題所在。

相關內容