3

I have the following .bib file

@misc{TestEntry.2020,
 author = {Last Name, First Name},
 year = {2020},
 title = {Title of Homepage},
 url = {https://tex.stackexchange.com},
 urldate = {01.01.2020}
}

and the following code:

\documentclass[a4paper,12pt]{article}
\usepackage{csquotes}
\usepackage{natbib}

\title{Title}
\author{Author}

\begin{document}
\maketitle
\section*{Introduction}
    \paragraph{Paragraph title}
        Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
        diam nonumy eirmod tempor invidunt ut labore et dolore magna
        aliquyam erat, sed diam voluptua. At vero eos et accusam et justo
        duo dolores et ea rebum \citealt{TestEntry.2020}.

\bibliographystyle{chicago}
\bibliography{Literature}
\end{document}

The result contains a bibliography like this Bibliography status quo

However, I would like the content of the fields url and urldate to be included in the bibliography, e.g. in the form Available online at: https://tex.stackexchange.com, last accessed on 01.01.2020.

Can anyone point me to how I can achieve this?

1

1 Answer 1

2

You wrote,

I would like the content of the fields url and urldate to be included in the bibliography, e.g. in the form

Available online at: https://tex.stackexchange.com, last accessed on 01.01.2020.

The chicago bibliography style is actually quite old. For sure, it does not truly represent the bibliographic formatting guidelines of the current, viz., 17th, edition of the Chicago Manual of Style. If you need to adhere to "Chicago"'s current guidelines, you should look into using biblatex and its biblatex-chicago style.

If you decide to stay with BibTeX and the by now rather obsolete chicago bibliography style, you should also be aware of the fact that it is so old that "Chicago" made no mention of how to format url and urldate fields back then. If a bibliography style doesn't specify what should be done with certain fields, these fields will simply be ignored by BibTeX. That's precisely what you're experiencing.

Fortunately for you, though, the chicago bib style does specify what to do with the note field, for virtually all entry types, including the @misc entry type. Hence, you may want to rewrite the bib entry in question as

@misc{TestEntry.2020,
 author = {Last Name, First Name},
 year   = {2020},
 title  = {Title of Homepage},
 note   = {Available online at: \url{https://tex.stackexchange.com}, 
           last accessed on 01.01.2020}
}

Since this approach involves using a macro called \url, you will also need to load a package that defines a macro by that name. I suggest you load the xurl package, as it permits abritrary line break points in URL strings.

A full MWE (mininum working example):

enter image description here

\documentclass[a4paper,12pt]{article}
\begin{filecontents}[overwrite]{Literature.bib}
@misc{TestEntry.2020,
 author = {Last Name, First Name},
 year   = {2020},
 title  = {Title of Homepage},
 note   = {Available online at: \url{https://tex.stackexchange.com}, 
           last accessed on 01.01.2020}
}
\end{filecontents}

\usepackage{natbib}
\bibliographystyle{chicago}

\usepackage{xurl} % for "\url" macro
\usepackage[colorlinks,allcolors=blue]{hyperref} % optional

\begin{document}
\noindent
\citealt{TestEntry.2020}.
\bibliography{Literature}
\end{document}

Addendum to address the OP's follow-up request raised in a comment. To process the bibliography and citation call-outs using the biblatex package -- more precisely: the biblatex-chicago package -- I suggest you make some modifications to the entry at hand:

  • The good news is that biblatex does know about fields called url and urldate. However, it's necessary to cast the contents of the urldate field in yyyy-mm--dd format (aka ISO8601 format): 2020-01-01 is good, but 01.01.2020 is not.

  • I would change the entry type from BibTeX's catch-all @misc to @online.

  • Unless you have a very good reason for using BibTeX rather than biber as the back-end program need to sort the bibliographic entries, do run biber, not BibTeX.

enter image description here

\documentclass[a4paper,12pt]{article}
\begin{filecontents}[overwrite]{Literature.bib}
@online{TestEntry.2020,
 author = {Last Name, First Name},
 year   = {2020},
 title  = {Title of Homepage},
 url    = {https://tex.stackexchange.com},
 urldate= {2020-01-01}
}
\end{filecontents}
\usepackage[backend=biber]{biblatex-chicago}
\addbibresource{Literature.bib}

\usepackage{xurl} % for "\url" macro
\usepackage[colorlinks,allcolors=blue]{hyperref} % optional

\begin{document}
\noindent
\citeauthor{TestEntry.2020}, \citeyear{TestEntry.2020}
\printbibliography
\end{document}
2
  • That's awesome, thank you! Would you be able to elaborate on the equivalent code using biblatex-chicago?
    – Ivo
    Jan 22, 2020 at 14:43
  • @Ivo - Please see the addendum I posted just now.
    – Mico
    Jan 22, 2020 at 15:28

You must log in to answer this question.

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