0

I have two code examples here.

Option british for babel

\documentclass{article}
\usepackage[british]{babel}
\usepackage[style=authoryear,date=year,urldate=long,dateabbrev=false]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}

Read \textcite{markey}.

\printbibliography
\end{document}

Output:

Markey, Nicolas (2005). Tame the BeaST. The B to X of BibTeX. Version 1.3. URL: http://mirror.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf (visited on 1st October 2006).

Option australian for babel

\documentclass{article}
\usepackage[australian]{babel}
\usepackage[style=authoryear,date=year,urldate=long,dateabbrev=false]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}

Read \textcite{markey}.

\printbibliography
\end{document}

Output:

Markey, Nicolas (2005). Tame the BeaST. The B to X of BibTeX. Version 1.3. url: http://mirror.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf (visited on 1 October 2006).

I want this output. This output has "1 October 2006" and I want this. The previous output had "1st October 2006" which I do not want.

My question

Now apparently the file texmf-dist/tex/latex/biblatex/lbx/australian.lbx has only this:

\ProvidesFile{australian.lbx}
[\abx@lbxid]

\InheritBibliographyExtras{british}
\DeclareBibliographyExtras{%
  \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}}}}%
  \protected\def\mkbibyeardivisiondateshort#1#2{%
    \mkbibyeardivision{\thefield{#2}}%
    \iffieldundef{#1}{}{\space}%
    \mkyearzeros{\thefield{#1}}}%
  \protected\def\mkbibyeardivisiondatelong#1#2{%
    \mkbibyeardivision{\thefield{#2}}%
    \iffieldundef{#1}{}{\space}%
    \mkyearzeros{\thefield{#1}}}%
}

\InheritBibliographyStrings{english}

\endinput

It looks like australian.lbx redefines only a few date formats but it is otherwise same as british.lbx (because it inherits british). Is it possible to tell biblatex to use australian only for \mkbibdatelong but british for everything else?

If not for this preferred date format (per our university style guide), I am supposed to be using british for everything else. But since australian inherits british and gives this preferred date format, I am considering using australian. So my question is can I just use australian.lbx to produce the output I want? Or would doing so lead to problems later?

I know I can always explicitly redefine \mkbibdatelong myself (like shown in this answer: https://tex.stackexchange.com/a/672612/18587) but I was thinking why duplicate code that is already present in australian.lbx? So I still want to know if simply using \usepackage[australian]{babel} is going to lead me to problems later?

To summarize my questions:

  1. Can using \usepackage[australian]{babel} cause problems when I want british style for the rest of the document?
  2. Is there a way to tell biblatex to use australian only for \mkbibdatelong and use british for everything else?
2
  • Isn't australian.lbx doing exactly what you want?
    – Cicada
    Jan 24 at 2:38
  • @Cicada Yes, and that is why I ask this question. To understand if using australian (when I would otherwise normally use british) could lead to any problems that I cannot foresee right now. More experienced LaTeX users and developers might be able to tell me whether it is a bad idea to use australian when my original intention was to use british. Jan 24 at 9:47

1 Answer 1

3

Q1: What if I use \usepackage[australian]{babel} instead of \usepackage[british]{babel}?

Since australian.lbx inherits its strings from english.lbx and not british.lbx, you'll see a difference for the strings that differ between english and british. At the moment strings that differ are is organizer, organizers and byorganizer (British has "organiser" etc., while English and thus also Australian has "organizer").

Furthermore, if you load babel with the australian option instead of british, your entire document will use babel's Australian localisation. For babel the Australian localisation differs from the British localisation only in the date format (analogous to the difference in biblatex's date format for those languages). In particular the hyphenation patterns are the same.

Other packages that react to the global language settings might, however, behave differently.


Q2: Is there a shorter way?

I think the most straightforward way to get the desired date format is to just copy the code from australian.lbx into \DefineBibliographyExtras{british} as show in Format "visited on" date in "dd Month yyyy" format (example: "1 October 2006") in references list. If you absolutely cannot live with that, you can try to make british an alias for australian, so that biblatex loads australian.lbx instead of british.lbx even when the main language is british.

\documentclass{article}
\usepackage[british]{babel}
\usepackage[style=authoryear,date=year,urldate=long,dateabbrev=false]{biblatex}

\DeclareLanguageMapping{british}{australian}

\addbibresource{biblatex-examples.bib}
\begin{document}

Read \textcite{markey}.

\printbibliography
\end{document}
1
  • Interestingly, Australian usage is a multi-format one, although the one defined in the .lbx is widespread and the most common. There is no (real) official standards body to define such things. Style guides (if any) can be used as a defacto standard for a discipline but these can vary and can even encourage departures from their "standard" in certain contexts. Consistency of usage is probably the only real requirement. (And being flexible. :) )
    – Cicada
    Jan 29 at 10:10

You must log in to answer this question.

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