6

I am quite new to LaTeX, but I've been piecing some things together to develop a template with the style I use. Specifically, I need to use the Annals of the Association of American Geographers (AAG) style, which is a modified Chicago style. I have managed to almost get what I need for citations (which has been no small feat); I can currently generate the following:

a sample of my bibliogrphic style

However, to be compliant with the AAG style I need to have the date in the format dd Mon. yyyy. In searching around, I've found the suggestion to use Australian English via babel, which gives me this:

enter image description here

Unfortunately, now the serial comma has been dropped from the authors list.

Here is the MWE of my TeX (with Australian):

\documentclass{article}

\usepackage[australian,american]{babel}

\usepackage[authordate-trad, backend=biber, dateabbrev=true, firstinits=true, maxcitenames=3, isbn=false, doi=false, eprint=false]{biblatex-chicago}

%Set custom strings for url and date labels (available at and last accessed)
\NewBibliographyString{available}
\NewBibliographyString{urlwhen}

\DefineBibliographyStrings{english}{%
  available = {Available at},
}

\DefineBibliographyStrings{english}{%
  urlwhen = {last accessed},
}

\DeclareFieldFormat{url}{\bibstring{available}\addcolon\space\url{#1}}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlwhen}\addcolon\space{#1}}}

% Set url + date appearance in bib (add doi here if needed)
\renewbibmacro*{bib+doi+url}{%
  \usebibmacro{url+urldate}
  }

%Remove Quotes around titles
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\isdot}

\addbibresource[datatype=bibtex]{biblio.bib}
\begin{document}
\autocite{article}

\renewcommand*{\bibname}{References}
\begin{otherlanguage}{australian}
\printbibliography 
\end{otherlanguage}
\end{document}

And here is the .bib:

@article{article,
 Author = {Brown, J. C. and Jepson, W. E. and Kastens, J. H. and Wardlow, B. D. and Lomas, J. M. and Price, K. P.},
 Number = {2},
 Pages = {117-148},
 Title = {Multitemporal, moderate-spatial-resolution remote sensing of modern agricultural production and land modification in the Brazilian Amazon},
 Url = {http://www.somehost.org/somefolder/somefile.pdf},
 Urldate = {2013-10-27},
 Volume = {44},
 Year = {2007}}

Does anyone have an thoughts as to the best way to get what I need? That is, how can I get the date format without losing the comma?

Thanks!

5

There is also a way without switching the language to australian, which in my opinion is not the best idea if your document is actually american.

You will just have to tell biblatex to change the date format for american by putting the following chunk of code into your preamble.

You can find the definitions in australia.lbx, the other date formats are inherited from british.lbx. Just copy the relevant definitions from there (relevant are \mkbibdatelong, \mkbibdateshort, if it is used also \mkbibordinal).

\DefineBibliographyExtras{american}{%
  \protected\def\mkbibdateshort#1#2#3{%
    \iffieldundef{#3}
      {}
      {\mkdayzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{/}}%
    \iffieldundef{#2}
      {}
      {\mkmonthzeros{\thefield{#2}}%
       \iffieldundef{#1}{}{/}}%
    \iffieldbibstring{#1}
      {\bibstring{\thefield{#1}}}
      {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\stripzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}}%
}

If you plan on using this date format more often, an even more biblatex-y way would be to create a new localisation file named american-dmy.lbx with the following content

\ProvidesFile{american-dmy.lbx}[american localisation with dmydate format for long dates]

\InheritBibliographyExtras{american}
\DeclareBibliographyExtras{%
  \protected\def\mkbibdateshort#1#2#3{%
    \iffieldundef{#3}
      {}
      {\mkdayzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{/}}%
    \iffieldundef{#2}
      {}
      {\mkmonthzeros{\thefield{#2}}%
       \iffieldundef{#1}{}{/}}%
    \iffieldbibstring{#1}
      {\bibstring{\thefield{#1}}}
      {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\stripzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}}%
}
\InheritBibliographyStrings{american}
\endinput

And load this language configuration via

\DeclareLanguageMapping{american}{american-dmy}

A fully self-contained MWE for the second solution (if you use it in your document you will have the .bib file and american-dmy.lbx somewhere LaTeX can find it and can omit the filecontents, of course)

\documentclass{article}
\usepackage[american]{babel}
\usepackage[authordate-trad, backend=biber, dateabbrev=true, firstinits=true, maxcitenames=3, isbn=false, doi=false, eprint=false]{biblatex-chicago}
\DeclareLanguageMapping{american}{american-dmy}

\begin{filecontents}{american-dmy.lbx}
\ProvidesFile{american-dmy.lbx}[american localisation with dmydate format for long dates]

\InheritBibliographyExtras{american}
\DeclareBibliographyExtras{%
  \protected\def\mkbibdateshort#1#2#3{%
    \iffieldundef{#3}
      {}
      {\mkdayzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{/}}%
    \iffieldundef{#2}
      {}
      {\mkmonthzeros{\thefield{#2}}%
       \iffieldundef{#1}{}{/}}%
    \iffieldbibstring{#1}
      {\bibstring{\thefield{#1}}}
      {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\stripzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}}%
}
\InheritBibliographyStrings{american}
\endinput
\end{filecontents}

\begin{filecontents}{\jobname.bib}
@article{article,
 Author = {Brown, J. C. and Jepson, W. E. and Kastens, J. H. and Wardlow, B. D. and Lomas, J. M. and Price, K. P.},
 Number = {2},
 Pages = {117-148},
 Title = {Multitemporal, moderate-spatial-resolution remote sensing of modern agricultural production and land modification in the Brazilian Amazon},
 Url = {http://www.somehost.org/somefolder/somefile.pdf},
 Urldate = {2013-10-27},
 Volume = {44},
 Year = {2007}}
\end{filecontents}

\DefineBibliographyStrings{american}{%
  url = {available at},
  urlseen = {last accessed},
}

\DeclareFieldFormat{url}{\bibstring{url}\addcolon\space\url{#1}}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\addcolon\space{#1}}}

% Set url + date appearance in bib (add doi here if needed)
\renewbibmacro*{bib+doi+url}{%
  \usebibmacro{url+urldate}%
}

%Remove Quotes around titles
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\isdot}

\addbibresource{\jobname.bib}
\begin{document}
\autocite{article}

\renewcommand*{\bibname}{References}
\printbibliography 
\end{document}

yields

enter image description here


Note also that it is better to use capitalisation as if the word were to appear mid-sentence than at the beginning ("Note that all expressions should be capitalized as they usually are when used in the middle of a sentence. The biblatex package will automatically capitalize the first word when required at the beginning of a sentence. Expressions intended for use in headings should be capitalized in a way that is suitable for titling" biblatex documentation v. 2.8, §3.8 "Localization Commands", p. 90. I changed available = {Available at}, to available = {available at},.). Also biblatex already provides localisation strings for the URL (called url) and urlseen for the date the URL was visited, so you could use those instead of declaring new ones.

  • Thanks for your very comprehensive answer. I agree, using australian is not ideal as I am writing in american. This is a much better way to do this, and I learned a lot from you post. – phoetrymaster Oct 30 '13 at 18:13
  • @phoetrymaster Glad to be of help. – moewe Oct 30 '13 at 19:29
3

In further digging into the docs and experimenting with this, I managed to find a way to do it. Adding the following to the document will add in the serial comma and keep the Australian date format:

\DefineBibliographyExtras{australian}{%
  \renewcommand*{\finalandcomma}{\addcomma\addspace}
}

The result being:

Success! Proper reference format

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.