[Tex/LaTex] URL citation: Control breaks and add ‘Accessed’ as prefix text

bibtexhyphenationurls

Please consider the following BibTex reference output (source can be found below):

enter image description here

I am using \bibliographystyle{plain} as the output fits the requirements of a paper I'm writing. I tried natbib, but didn't come along with it as all bibliography styles have changed, even when using the plainnat style. What doesn't work good is the citation of referenced URLs that need to contain a date when they were accessed. All other citations (I do cite books, papers, etc. as well) work just like they should.

1) Is there any way to add the prefix 'Accessed:' before the dates (and only if they are present?), the first entry would look like

[1] Wikipedia, https://en.wikipedia.org, Accessed: March 2014

2) Is there any way to control the breaking of URLs in a way that it is prefered to not break them (in the examples [3] and [4] the URL could stay together if a linebreak was inserted before it, while the URL of example [5] is juts too long to stay within a single line)?

3) Is there an easier way to define a URL entry than I did (see below)?

Here is the LaTex source:

\documentclass[a4paper]{scrartcl}
    \bibliographystyle{plain}
    \usepackage{url}
    \usepackage{cite}
    \begin{document}
    \nocite{wiki-web1,wiki-web2,wiki-web3,wiki-web4,wiki-web5}
    \bibliography{bibtex}
\end{document}

and the BibTex source:

@Other{wiki-web1,
  Title                    = {Wikipedia},
  HowPublished             = {\url{https://en.wikipedia.org}},
  Month                    = mar,
  Timestamp                = {2014.03.16},
  Year                     = {2014}
},

@Other{wiki-web2,
  Title                    = {Wikipedia},
  Author = {Wikipedia Foundation},
  HowPublished             = {\url{https://en.wikipedia.org/wiki/Main_Page}},
  Month                    = mar,
  Year                     = {2014}
},

@Other{wiki-web3,
  Title                    = {Wikipedia},
  Author = {Wikipedia Foundation (SF)},
  HowPublished             = {\url{https://en.wikipedia.org/wiki/Main_Page}},
  Month                    = mar,
  Year                     = {2014}
},

@Other{wiki-web4,
  Title                    = {Wikipedia},
  Author = {Wikipedia Foundation (SF)},
  HowPublished             = {\url{https://en.wikipedia.org/wiki/Main_Page}},
  Month                    = mar,
  Year                     = {2014}
},

@Other{wiki-web5,
  Title                    = {Wikipedia},
  Author = {Wikipedia Foundation (SF)},
  HowPublished             = {\url{https://en.wikipedia.org/wiki/File:Camborne_Redruth_Community_Hospital_-_geograph.org.uk_-_716833.jpg#filehistory}},
  Month                    = mar,
  Year                     = {2014}
}

Best Answer

There are two possible roles of dates associated with a web document. The year and month fields generally indicate when the document was created or published. To provide information about when you (last) accessed the document, you could set up a note field for each entry, such as

note = "Last accessed 16 March 2014",

A full MWE that adds note fields would generate the following output:

enter image description here

\RequirePackage{filecontents}
\documentclass[a4paper]{scrartcl}
\bibliographystyle{plainnat}
\usepackage[hyphens]{url}
\usepackage[numbers]{natbib}
\begin{filecontents*}{\jobname.bib}
@misc{wiki-web1,
  Title                    = {Wikipedia},
  howpublished         = "\url{https://en.wikipedia.org}",
  Month                    = mar,
  Timestamp                = {2014.03.16},
  Year                     = {2014},
  note = "Last accessed 16 March 2014",
}

@misc{wiki-web2,
  Title                    = {Wikipedia},
  Author = {Wikipedia Foundation},
  howpublished         = "\url{https://en.wikipedia.org/wiki/Main_Page}",
  Month                    = mar,
  Year                     = {2014},
  note = "Last accessed 16 March 2014",
}

@misc{wiki-web3,
  Title                    = {Wikipedia},
  Author = {Wikipedia Foundation (SF)},
  howpublished         = "\url{https://en.wikipedia.org/wiki/Main_Page}",
  Month                    = mar,
  Year                     = {2014},
  note = "Last accessed 16 March 2014",
}

@misc{wiki-web4,
  Title                    = {Wikipedia},
  Author = {Wikipedia Foundation (SF)},
  howpublished         = "\url{https://en.wikipedia.org/wiki/Main_Page}",
  Month                    = mar,
  Year                     = {2014},
  note = "Last accessed 16 March 2014",
}

@misc{wiki-web5,
  Title                    = {Wikipedia},
  Author = {Wikipedia Foundation (SF)},
  howpublished         = "\url{https://en.wikipedia.org/wiki/File:Camborne_Redruth_Community_Hospital_-_geograph.org.uk_-_716833.jpg#filehistory}",
  Month                    = mar,
  Year                     = {2014},
  note = "Last accessed 16 March 2014",
}
\end{filecontents*}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
\nocite{wiki-web1,wiki-web2,wiki-web3,wiki-web4,wiki-web5}
\bibliography{\jobname}
\end{document}

To address some of your other queries. Yes, there are certain bibliography styles that automatically insert a line break before a url field. Your entries don't provided fields called url though, just howpublished.