0

I am working on my bibliography using Biblatex-Chicago, but in my printed bibliography every entry has the date accessed listed before the URL, but I want the date accessed at the end.

Here is a MWE:

 \documentclass[openany, 12pt]{book}

\usepackage{tabularx}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage[margin=2.5cm]{geometry}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{listings}
\usepackage{color}
\usepackage{subcaption}
\usepackage{hanging}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}

\onehalfspacing

\usepackage{fontspec} 
\setmainfont{Times New Roman}
\usepackage[short, backend=biber,
firstinits=true, sorting=nyt]{biblatex-chicago}
\bibliography{Dissertation.bib}

\newcolumntype{b}{X}
\newcolumntype{s}{<{\hsize=.5\hsize}X}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{frame=tb,
    language=R,
    aboveskip=3mm,
    belowskip=3mm,
    showstringspaces=false,
    columns=flexible,
    numbers=none,
    keywordstyle=\color{blue},
    numberstyle=\tiny\color{gray},
    commentstyle=\color{dkgreen},
    stringstyle=\color{mauve},
    breaklines=true,
    breakatwhitespace=true,
    tabsize=3
}

\begin{document}

Sample sentence.\footcite{Rae17}

\printbibliography[heading=none]

\end{document}

An example of a source I use:

   @Electronic{Rae17,
  author       = {Alisdair Rae},
  year         = {2017},
  title        = {A Land Cover Atlas of the United Kingdom},
  organization = {University of Sheffield},
  url          = {https://figshare.com/articles/A_Land_Cover_Atlas_of_the_United_Kingdom_Document_/5266495},
  urldate = {2018-04-16}
}

When I execute, the entries in the bibliography look like:

[1]: https://i.sstatic.net/ox7b2.png

I want the access date last, after the URL. Does anyone know how I can force it?

2 Answers 2

1

Changing the order of the fields in the bib driver a bit:

 \documentclass[openany, 12pt]{book}

\usepackage{tabularx}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage[margin=2.5cm]{geometry}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{listings}
\usepackage{color}
\usepackage{subcaption}
\usepackage{hanging}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}

\onehalfspacing

%\usepackage{fontspec} 
%\setmainfont{Times New Roman}
\usepackage[short, backend=biber,
firstinits=true, sorting=nyt]{biblatex-chicago}
\bibliography{Dissertation.bib}

\newcolumntype{b}{X}
\newcolumntype{s}{<{\hsize=.5\hsize}X}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{frame=tb,
    language=R,
    aboveskip=3mm,
    belowskip=3mm,
    showstringspaces=false,
    columns=flexible,
    numbers=none,
    keywordstyle=\color{blue},
    numberstyle=\tiny\color{gray},
    commentstyle=\color{dkgreen},
    stringstyle=\color{mauve},
    breaklines=true,
    breakatwhitespace=true,
    tabsize=3
}

\makeatletter
\DeclareBibliographyDriver{online}{%
  \usebibmacro{bibindex}%
  \usebibmacro{author/editor}%
  \setunit{\addspace}%
  \printfield{nameaddon}%
  \newunit\newblock
  \usebibmacro{title+stitle}%
  \setunit{\addspace}%
  \usebibmacro{language+transtitle}%
  \newunit% 16th ed.
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printlist{organization}% Rearranged for 16th ed.
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{date}%
  \newunit\newblock % <- moved
  \printfield{url}% <- moved
  \newunit\newblock
  \iffieldundef{urlyear}%
  {}%
  {\printurldate}% Date fix
  \newunit\newblock
  \iftoggle{cms@doionly}%
  {\iffieldundef{doi}%
    {}%
    {\printfield{doi}%
      \clearfield{url}}}%
  {\printfield{doi}}%
  \newunit\newblock
  \usebibmacro{eprint}%
  \newunit\newblock
  \printfield{addendum}%
  \newunit\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{cms@related}%
  {\usebibmacro{related:init}%
    \usebibmacro{related}%
    \newunit}%
  {}%
  \usebibmacro{originally+published+as}%
  \usebibmacro{finentry}}

\makeatother

\begin{document}

Sample sentence.\footcite{Rae17}

\printbibliography[heading=none]

\end{document}
1
  • Worked like a charm -- thanks!
    – MGaius
    Sep 2, 2019 at 11:48
0

We can patch the relevant bibliography driver in the default chicago-notes.bbx with the help of package xpatch:

 \documentclass[openany, 12pt]{book}

\usepackage{tabularx}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage[margin=2.5cm]{geometry}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{listings}
\usepackage{color}
\usepackage{subcaption}
\usepackage{hanging}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}

\onehalfspacing

\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage[short, backend=biber, giveninits, sorting=nyt]{biblatex-chicago}
\addbibresource{Dissertation.bib}

\newcolumntype{b}{X}
\newcolumntype{s}{<{\hsize=.5\hsize}X}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{frame=tb,
    language=R,
    aboveskip=3mm,
    belowskip=3mm,
    showstringspaces=false,
    columns=flexible,
    numbers=none,
    keywordstyle=\color{blue},
    numberstyle=\tiny\color{gray},
    commentstyle=\color{dkgreen},
    stringstyle=\color{mauve},
    breaklines=true,
    breakatwhitespace=true,
    tabsize=3
}

\usepackage{xpatch}
%
\xpatchbibdriver{online}{%
  \newunit\newblock
  \iffieldundef{urlyear}%
  {}%
  {\printurldate}% Date fix
 }{}{}{}

\xpatchbibdriver{online}{%
 \printfield{url}%
 }{%
 \printfield{url}%
  \newunit\newblock
  \iffieldundef{urlyear}%
  {}%
  {\printurldate}% Date fix
 }{}{}

\begin{document}

Sample sentence.\footcite{Rae17}

\printbibliography[heading=none]

\end{document} 

enter image description here

You must log in to answer this question.

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