我遇到一个问题,每当我的参考书目中有多个具有相同“作者”的条目时,它们末尾都会有一个额外的逗号。你能告诉我如何去掉它们吗
以下是条目示例
结果如下
正如建议的那样,这是我的乳胶文件
% Set up the document
\documentclass{book} % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
% Include any extra LaTeX packages required
\usepackage[square, numbers, comma, sort&compress]{natbib} % Use the "Natbib" style for the references in the Bibliography
\usepackage{verbatim} % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector} % Allows "\bvec{}" and "\buvec{}" for "blackboard" style 6
\usepackage{amssymb}
\usepackage{caption,sansmath}
\usepackage{multirow}
\usepackage{soul}
\usepackage{fancyhdr}
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage{pgfplots}
\usepackage{tabularx,ragged2e,booktabs,caption}
%Fixing many float unprocessed
\usepackage[section] {placeins}
\usepackage[T1]{fontenc} %COMMENT OUT THE FONT
%\usepackage[bitstream-charter]{mathdesign}
\usepackage[expert]{mathdesign}
\usepackage{textcomp}
\usepackage{charter}
\begin{document}
Two problems. One is that if two references have the same author, there is an extra comma at the end of those reference \cite{Ackermann01}. Now I cite another whose author is the same with the previous - Please have a look at the bibliography the \cite{Ackermann02}.
Another one with different author \cite{Safari}
\label{Bibliography}
\lhead{\emph{Bibliography}} % Change the left side page header to "Bibliography"
\bibliographystyle{unsrtnat} % Use the "unsrtnat" BibTeX style for formatting the Bibliography
\bibliography{Bibliography} % The references (bibliography) information are stored in the file named "Bibliography.bib"
\end{document} % The End
这是我的书目文件,
@unpublished{Safari,
author = "Rollin Safari",
title = "A hunt",
note = "Available at \url{www.rollin-wild.com/}. Last accessed on May 1$^{st}$ 2013"}
@unpublished{Ackermann01,
author = "Pascal Ackermann",
title = "Lady {F}inwe",
note = "Available at \url{http://pascal.ackermann.free.fr/}. Last accessed on May 1$^{st}$ 2013"}
@unpublished{Ackermann02,
author = "Pascal Ackermann",
title = "Fille {F}leur",
note = "Available at \url{http://pascal.ackermann.free.fr/}. Last accessed on May 1$^{st}$ 2013"}
答案1
你能为同一作者的这些条目指定一个年份吗?你描述的问题就消失了:
\documentclass{book}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@unpublished{Safari,
author = "Rollin Safari",
title = "A hunt",
note = "Available at \url{www.rollin-wild.com/}. Last accessed on May 1$^{st}$ 2013",
year = 2000,
}
@unpublished{Ackermann01,
author = "Pascal Ackermann",
title = "Lady {F}inwe",
note = "Available at \url{http://pascal.ackermann.free.fr/}. Last accessed on May 1$^{st}$ 2013",
year = 2000,
}
@unpublished{Ackermann02,
author = "Pascal Ackermann",
title = "Fille {F}leur",
note = "Available at \url{http://pascal.ackermann.free.fr/}. Last accessed on May 1$^{st}$ 2013",
year = 2000,
}
\end{filecontents}
\usepackage[square, numbers, comma, sort&compress]{natbib}
\usepackage[T1]{fontenc}
\begin{document}
% this problem disappears if you assign a year field to these entries
Two problems. One is that if two references have the same author,
there is an extra comma at the end of those reference
\cite{Ackermann01}. Now I cite another whose author is the same
with the previous - Please have a look at the bibliography the
\cite{Ackermann02}.
Another one with different author \cite{Safari}.
\bibliographystyle{unsrtnat}
\bibliography{\jobname}
\end{document}