4

I'm using this to make the dates in my bibliography appear as year month day, but the month is coming up as, e.g. "Mar." but I don't want the trailing dot.

  \iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}\iffieldundef{#2}{}{\nobreakspace}%
\iffieldundef{#2}
  {}
  {\mkbibmonth{\thefield{#2}}%
   \iffieldundef{#3}{}{\space}}%
\iffieldundef{#3}
  {}
  {\thefield{#3}}%
}%

So it appears as e.g. (accessed 2015 Mar. 19) but I want (accessed 2015 Mar 19)

I can't find where the abbreviations are defined, I tried dateabbrev=false but then I get (accessed 2015 March 19).

Here's a minimal working example:

\documentclass[a4paper,11pt,british]{article}
\usepackage[british]{babel}
\usepackage{csquotes}

\begin{filecontents}{mwe.bib}
@report{example2015,
    author =    {John Doe},
    title =     {Example Website},
    url =       {http://www.example.com/},
    urldate =   {2015-03-19},
    year =      {2015}
}
\end{filecontents}

\usepackage[backend=biber,style=numeric,date=comp,urldate=comp]{biblatex}

\makeatletter
\DefineBibliographyExtras{\bbl@main@language}
{
  \protected\def\mkbibdatelong#1#2#3{%
  %<year><month><day>
  \iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}\iffieldundef{#2}{}{\nobreakspace}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#3}{}{\space}}%
    \iffieldundef{#3}
      {}
      {\thefield{#3}}%
    }%
}
\makeatother

\addbibresource{mwe.bib}

\begin{document}
Hello.\autocite{example2015}

\printbibliography
\end{document}
1
  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Apr 16 '15 at 22:49
3

The definitions for the abbreviations of the months are in language.lbx files, in your case in the english.lbx file. To modify the behaviour, you can use the local customisation command (see Section 3.8 of the biblatex manual, textbook biblatex)

\DefineBibliographyStrings{english}{
    january   = Jan ,
    february  = Feb ,
    march     = Mar ,
    april     = Apr ,
    may       = May ,
    june      = Jun ,
    july      = Jul ,
    august    = Aug ,
    september = Sep,
    october   = Oct ,
    november  = Nov ,
    december  = Dec ,
}      

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.