TransWikia.com

How can I remove the blank space in urldate (while using ngerman and biblatex)?

TeX - LaTeX Asked on June 12, 2021

I want the urldate like the other dates. DeclareFieldFormat{urldate} seems not obviously be of help. Perhaps someone has an idea
Here is an MWE

documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage[natbib=true,backend=biber,style=authoryear]{biblatex}


addbibresource{biblatex-examples.bib}
    
    begin{document}
    
   My Birthday: 01.01.1900    
   
    autocite{ctan}

printbibliography    
    
    end{document} 

enter image description here

One Answer

You can remove the spaces by removing the thinspaces from the relevant localisation macro mkbibdateshort. Its original definition can be found in german.lbx (ll. 28-41) in v3.16

documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage[natbib=true,backend=biber,style=authoryear]{biblatex}

makeatletter
DefineBibliographyExtras{german}{%
  protecteddefmkbibdateshort#1#2#3{%
    iffieldundef{#3}
      {}
      {mkdayzeros{thefield{#3}}adddot}%
    iffieldundef{#2}
      {}
      {mkmonthzeros{thefield{#2}}%
       iffieldundef{#1}
         {}
         {iffieldundef{#3}{/}{adddot}}}%
    iffieldbibstring{#1}
      {bibstring{thefield{#1}}}
      {dateeraprintpre{#1}mkyearzeros{thefield{#1}}}}%
}
makeatother

addbibresource{biblatex-examples.bib}
    
begin{document}
  My Birthday: 01.01.1900

  autocite{ctan}

printbibliography
end{document}

(besucht am 01.10.2006)

See also https://github.com/plk/biblatex/issues/891

Correct answer by moewe on June 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP