3

I am getting a comma after the URL link in the bibliography which I want to remove since it does not belong there.

How can I remove the comma from the bibliography?

tex file:

\documentclass[
    11pt,
    english,
    twoside,
    a4paper,
    headsepline,
    footsepline
]{scrbook}

\usepackage{a4}   
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[numbers]{natbib}
\usepackage[hyphens]{url}
\usepackage{color}
\usepackage[bookmarks=true,
                    bookmarksopen=true,
                    bookmarksnumbered=true,
                    colorlinks=true,
                    citecolor=black,
                    linkcolor=black                 
                    ]
                   {hyperref}

\begin{document}

Mowing down trees, flooding streets and battering buildings, Patricia hit land as a Category 5 hurricane on Friday \cite{wazeText} evening before grinding inland. It moved quickly but lost power in the mountains that rise up along the Pacific coast and was downgraded to a tropical depression on Saturday morning as it headed through central \cite{restRoy} Mexico \cite{jdkWiki}.

        \bibliographystyle{unsrtnat}
        \bibliography{bibliography}

\end{document}

bibliography

    @misc{wazeText,
         author = {Wikipedia},
         title = {Waze},
         howpublished = {\url{https://en.wikipedia.org/wiki/Waze}},
  note = {Accessed: 06.11.2015}
}

@misc{restRoy,
  author = {Wikipedia},
  title = {{Representational state transfer}},
  howpublished = {\url{https://en.wikipedia.org/wiki/Representational_state_transfer}},
  note = {Accessed: 07.11.2015}
}

@misc{jdkWiki,
  author = {Wikipedia},
  title = {{Java Development Kit}},
  howpublished = {\url{https://en.wikipedia.org/wiki/Java_Development_Kit}},
  note = {Accessed: 06.11.2015}
}

    @misc{waze,
         author = {androidcommunity},
         title = {Waze traffic app updates with {Foursquare} and {Yelp} integration},
         howpublished = {\url{http://androidcommunity.com/waze-traffic-app-updates-with-foursquare-and-yelp-integration-20120131/}},
  note = {Accessed: 29.09.2015}
}

enter image description here

7
  • 1
    Please, don't use package a4.
    – Johannes_B
    Dec 20, 2015 at 15:52
  • 1
    Honestly, i would use package biblatex to do the job. On the other hand, though wikipedia does the export in that way, wikipedia cannot be the author of a wikipedia entry.
    – Johannes_B
    Dec 20, 2015 at 15:54
  • You added another entry. Here as well, androidcity provides the information, but is not the author. But for a blog-post an author is often well defined, in this case, it is Michael Crider.
    – Johannes_B
    Dec 20, 2015 at 17:09
  • @Johannes_B: I found this article which describes how to cite from Wikipedia in Latex. en.wikipedia.org/wiki/Wikipedia:Citing_Wikipedia
    – TheBook
    Dec 20, 2015 at 17:26
  • What do you mean?
    – Johannes_B
    Dec 20, 2015 at 17:28

1 Answer 1

3

You saw the warning that the year is missing in your bib entrys? Adding them everything works as you want. You can use url instead of howpublished.

Please see the mwe:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{wazeText,
  author       = {Wikipedia},
  title        = {Waze},
  year         = {2015},
  url          = {https://en.wikipedia.org/wiki/Waze},
  note         = {Accessed: 06.11.2015},
}

@misc{restRoy,
  author = {Wikipedia},
  title = {{Representational state transfer}},
  howpublished = {\url{https://en.wikipedia.org/wiki/Representational_state_transfer}},
  year = {2015},
  note = {Accessed: 07.11.2015},
}

@misc{jdkWiki,
  author = {Wikipedia},
  title = {{Java Development Kit}},
  howpublished = {\url{https://en.wikipedia.org/wiki/Java_Development_Kit}},
  note = {Accessed: 06.11.2015},
}
\end{filecontents*}


\documentclass[%
  11pt,
  english,
  twoside,
  a4paper,
  headsepline,
  footsepline
]{scrbook}

%\usepackage{a4}   
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\usepackage[numbers]{natbib}
\usepackage[hyphens]{url}
\usepackage{color}
\usepackage[%
  bookmarks=true,
  bookmarksopen=true,
  bookmarksnumbered=true,
  colorlinks=true,
  citecolor=black,
  linkcolor=black                 
]{hyperref}

\begin{document}

Mowing down trees, flooding streets and battering buildings, Patricia hit land as a Category 5 hurricane on Friday \cite{wazeText} evening before grinding inland. It moved quickly but lost power in the mountains that rise up along the Pacific coast and was downgraded to a tropical depression on Saturday morning as it headed through central \cite{restRoy} Mexico \cite{jdkWiki}.

\bibliographystyle{unsrtnat}
\bibliography{\jobname}

\end{document}

and the result:

enter image description here

2
  • I have added a new entry where I have noticed that it worked for it before. Is there any explanation why did it work for the last entry and did not it work for the other 3 entries? Please take a look at my edited question. Since note and year have the same meaning?
    – TheBook
    Dec 20, 2015 at 16:32
  • What does year mean in the entry? does it mean when the homepage was created or accessed as note?
    – TheBook
    Dec 20, 2015 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .