0

There is a small space after every period in the German short date (as well as urldate and every other date) of biblatex:

MWE

\documentclass{article}
\usepackage{filecontents}

\begin{filecontents}{literature.bib}
  @online{foobar,
    url = {https://www.foo.bar},
    date = {2019-09-24},
    urldate = {2019-09-24},
  }
\end{filecontents}

\usepackage[ngerman]{babel}
\usepackage{url}
\usepackage[date=short]{biblatex}
\bibliography{literature.bib}

\begin{document}
  \nocite{foo,foobar}
  \printbibliography
\end{document}

Why? How do I get rid of it?

1

There is indeed a \thinspace after every period in the German short date of biblatex. It is inserted on purpose in german.lbx:

  \protected\def\mkbibdateshort#1#2#3{%
    \iffieldundef{#3}
      {}
      {\mkdayzeros{\thefield{#3}}\adddot
       \iffieldundef{#2}{}{\thinspace}}%
    \iffieldundef{#2}
      {}
      {\mkmonthzeros{\thefield{#2}}%
       \iffieldundef{#1}
         {}
         {\iffieldundef{#3}{/}{\adddot\thinspace}}}%
    \iffieldbibstring{#1}
      {\bibstring{\thefield{#1}}}
      {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%

Having found out this, I searched for it in the biblatex doc, without success. Then I was searching here and found the following: Bug in isodata?: German short date with horizontal spaces after periods. So, the package isodate seems to do the same thing.

Ulrike Fischer advised to look into the docs, so I did. Et voilà:

The spacings for the numerical formats in the German language (24. 12. 2000 resp. 24. 12. 00) were taken from the Duden [2] and are the defaults when using one of the German derivatives. [...]

References

[2] DUDEN Band 1. Die deutsche Rechtschreibung. 21. Auflage, Dudenverlag, Mannheim, Germany, 1996.

I haven't found a similar advice in the online version https://duden.de, nor do I like the spacing.

To get rid of it, just redefine the \mkbibdateshort from german.lbx:

MWE

\documentclass{article}
\usepackage{filecontents}

\begin{filecontents}{literature.bib}
  @online{foobar,
    url = {https://www.foo.bar},
    date = {2019-09-24},
    urldate = {2019-09-24},
  }
\end{filecontents}

\usepackage[ngerman]{babel}
\usepackage{url}
\usepackage[date=short]{biblatex}
\bibliography{literature.bib}

\DefineBibliographyExtras{ngerman}{% from german.lbx
  \protected\def\mkbibdateshort#1#2#3{%
  \iffieldundef{#3}
  {}
  {\mkdayzeros{\thefield{#3}}\adddot
    \iffieldundef{#2}{}{}}%<-\thinspace removed
  \iffieldundef{#2}
  {}
  {\mkmonthzeros{\thefield{#2}}%
    \iffieldundef{#1}
    {}
    {\iffieldundef{#3}{/}{\adddot}}}%<-\thinspace removed
  \iffieldbibstring{#1}
  {\bibstring{\thefield{#1}}}
  {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
}

\begin{document}
  \nocite{foo,foobar}
  \printbibliography
\end{document}

Wouldn't it be neat if this became easier..?

  • 1
    github.com/plk/biblatex/issues/891 The question is what would be a good interface. – moewe Sep 24 at 15:32
  • @moewe Thanks for the link, I wasn't aware of that. Maybe one should consider to put the info from the isodate documentation into the biblatex documentation as well? – nox Sep 24 at 16:30

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.