参考文献和引文标注未打印

参考文献和引文标注未打印

我正在写一篇文章。MWE 如下所示。

\documentclass[a4paper,times,12pt,ifthen]{article}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{epsfig}
\usepackage{epstopdf}
\usepackage{nomencl}
%\makeindex
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage[top= 2.00cm,bottom = 2.00cm,left= 2.00cm,right= 2.00cm]{geometry}
\makeatletter % these following 3 command will print reference without box
\renewcommand*{\@biblabel}[1]{\hfill#1.}
\makeatother
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{authblk}
\usepackage[acronym,nonumberlist]{glossaries} % prints glossary without page number at end
\usepackage{longtable} %spans table in two pages
\usepackage{subfigure} %gives subfigures
\usepackage{array} % justify table content
\usepackage{booktabs} % will center justified table
\usepackage[authoryear]{natbib}
\usepackage{color} % will print colour text
\bibliographystyle{agsm}
\RequirePackage{ifthen}
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{G}}{\item[\textbf{Greek Symbols}]}{
\ifthenelse{\equal{#1}{S}}{\item[\textbf{Subscripts}]}{}}}
\makenomenclature
\makeglossaries

\begin{document}
Comparing results in \citep{Shigley2011} with \citet{Duffy2010} and \cite{Carslaw1959}.

\makenomenclature
\printnomenclature
\printglossaries
\bibliographystyle{unsrtnat}
\bibliography{CoalCombustion.bib}
\end{document}

Bibtex 文件 CoalCombustion.bib 是

@book{Carslaw1959,
  title={Heat in solids},
  author={Carslaw, HS and Jaeger, JC},
  volume={19591},
  year={1959},
  publisher={Clarendon Press, Oxford}
}

@book{Duffy2010,
  title={Transform methods for solving partial differential equations},
  author={Duffy, Dean G},
  year={2010},
  publisher={CRC press}
}

@book{Shigley2011,
  title={Shigley's mechanical engineering design},
  author={Shigley, Joseph Edward},
  year={2011},
  publisher={Tata McGraw-Hill Education}
}

输出为 在此处输入图片描述

为什么正文和参考文献中没有打印引用?

答案1

一些建议/意见:

  • 改为\bibliography{CoalCombustion.bib}\bibliography{CoalCombustion}即省略.bib扩展名。

  • 选择一种(且仅选择一种)书目样式 -agsm或者unsrtnat但并非两者兼而有之。如果您选择该agsm样式,请加载该har2nat包以最大程度地兼容诸如 之类的包hyperref

  • 确保先运行 LaTeX,然后运行 ​​BibTeX,然后运行 ​​LaTeX再两次\cite生成预期的、\citep和的引文标注\citet

相关内容