3

I am having a problem that whenever I have more than one entry with the same "author", then in my bibliography, both of them will have an extra comma at the end. Could you show me how to get rid of them

Here are exemples of the entries enter image description here

And here is the results enter image description here

As suggested, here is my latex files

 % 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

And here is my bibliography file,

@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"}
  • Without showing the code that you used to produce the output it's impossible to help. What are you using to format the references? natbib? biblatex? You need to make a minimal document that shows the problem. It should have only the package(s) you are using to format the bibliography, and any other bibliography related code and nothing else. – Alan Munn Jun 12 '13 at 0:23
  • I am using natlib, I downloaded a latex template and start using it acutually (\usepackage[square, numbers, comma, sort&compress]{natbib} % Use the "Natbib" style for the references in the Bibliography) – wererabit Jun 12 '13 at 0:30
  • 1
    As I said, you should construct a small document that shows the problem and edit your question to add that. And instead of posting an image of your .bib items, you should paste the actual entries (formatted as code (click on the {} icon to format code in your question)). – Alan Munn Jun 12 '13 at 0:47
  • 2
    Looks like an empty year in your .bib entries is the culprit. – jon Jun 17 '13 at 4:10
2

Can you assign a year to these entries by the same author? The problem you describe then disappears:

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.