我正在使用 TeXstudio 并尝试列出文档中的参考书目内容。我编译了 .tex 文件,没有错误,但没有输出。
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{indentfirst}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{blindtext}
\usepackage{changepage}
\usepackage{lipsum}
\usepackage{filecontents}
\usepackage[style=authoryear, backend=bibtex]{biblatex}
\newenvironment{subs}
{\adjustwidth{2em}{0pt}}
{\endadjustwidth}
\begin{filecontents}{sample.bib}
@article{awad2011machine,
title={Machine Learning methods for E-mail Classification},
author={Awad, WA and ELseuofi, SM},
journal={International Journal of Computer Applications},
volume={16},
number={1},
year={2011},
publisher={International Journal of Computer Applications, 244 5 th Avenue,\# 1526, New York, NY 10001, USA India}
}
@article{willett2006porter,
title={The Porter stemming algorithm: then and now},
author={Willett, Peter},
journal={Program},
volume={40},
number={3},
pages={219--223},
year={2006},
publisher={Emerald Group Publishing Limited}
}
@inproceedings{mccallum1998comparison,
title={A comparison of event models for naive bayes text classification},
author={McCallum, Andrew and Nigam, Kamal and others},
booktitle={AAAI-98 workshop on learning for text categorization},
volume={752},
pages={41--48},
year={1998},
organization={Citeseer}
}
@article{pop2006approach,
title={An approach of the Naive Bayes classifier for the document classification},
author={Pop, Ioan},
journal={General Mathematics},
volume={14},
number={4},
pages={135--138},
year={2006},
publisher={University}
}
\end{filecontents}
\bibliography{sample}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
我尝试了很多建议的解决方案,但不幸的是都没有用
答案1
我尝试了很多建议的解决方案,但不幸的是都没有用
如果你能更具体一点的话,那将会很有帮助哪个您已尝试过的建议解决方案。
我的电脑上没有 TeXstudio,所以我无法判断你的前端在做什么。当我从 TeXworks 作为前端、从 MacTeX2016 作为后端运行你的代码时,我确实注意到 biblatex 发出了关于条目字段中“逗号太多”的投诉publisher
。awad2011machine
如果我在所有条目中将名为的字段更改publisher
为xpublisher
并重新运行你的代码,我不会再收到警告消息。
尽管如此,你应该更加努力地确保内容所有条目都是正确的。快速浏览一下您的代码,立即就会发现大写字母不正确,并且无法防止 BibTeX 将单词小写化。
以下是对您的代码进行一些明智的修正后的输出 - 请注意,我还\bibliography{sample}
用更惯用的方式进行了替换\addbibresource{sample.bib}
:
\RequirePackage{filecontents}
\begin{filecontents}{sample.bib}
@article{awad2011machine,
title ={Machine learning methods for \mbox{E-mail} Classification},
author ={Awad, W. A. and Elseuofi, S. M.},
journal={International Journal of Computer Applications},
volume ={16},
number ={1},
year ={2011},
xpublisher={International Journal of Computer Applications, 244 5th Avenue, \#~1526, New York, NY 10001, USA}
}
@article{willett2006porter,
title ={The {Porter} stemming algorithm: then and now},
author ={Willett, Peter},
journal={Program},
volume ={40},
number ={3},
pages ={219--223},
year ={2006},
xpublisher={Emerald Group Publishing Limited}
}
@inproceedings{mccallum1998comparison,
title ={A comparison of event models for {Naive Bayes} text classification},
author ={McCallum, Andrew and Nigam, Kamal and others},
booktitle={AAAI-98 Workshop on Learning for Text Categorization},
volume ={752},
pages ={41--48},
year ={1998},
organization={Citeseer}
}
@article{pop2006approach,
title ={An approach of the {Naive Bayes} classifier for the document classification},
author ={Pop, Ioan},
journal={General Mathematics},
volume ={14},
number ={4},
pages ={135--138},
year ={2006},
xpublisher={University}
}
\end{filecontents}
\documentclass[12pt]{article}
\usepackage[style=authoryear, backend=bibtex]{biblatex}
\addbibresource{sample.bib}
%\usepackage{graphicx}
%\usepackage{indentfirst}
%\usepackage{mathtools}
%\usepackage{amsmath}
%\usepackage{blindtext}
%\usepackage{changepage}
%\usepackage{lipsum}
%\newenvironment{subs}
% {\adjustwidth{2em}{0pt}}
% {\endadjustwidth}
\begin{document}
\nocite{*}
\printbibliography
\end{document}