TransWikia.com

Abbreviations of Weeknames in German

TeX - LaTeX Asked by Concerto on January 9, 2021

This is pretty straight-forward.

I have finally managed to abbreviate weeknames in “British”, i.e. en-GB. (What I need is ngerman)

But, as I’m working on a German document, I need the date format exactly like this: Mi, 18. November. Even better would be Mi, 18. Nov.

All I have managed is either Wed, 18. November, or Mittwoch, 18. November.
If relevant, I’m using XeTeX on VerbTeX.

My Code/MWE:

documentclass[%
letterpaper,%
ngerman,%
5pt,%
]{article}
usepackage[utf8]{inputenc}
usepackage{indentfirst}
usepackage{ragged2e}
usepackage[ngerman]{babel} 
usepackage{isodate} 
usepackage[%
useregional,
showdow,
ngerman,
]{datetime2}

DTMlangsetup*[ngerman]{abbr}
begin{document}
DTMlangsetup*{showyear=false}
DTMdate{2020-11-18}
end{document}`

One Answer

Use german (regionless style) instead of ngerman in the optional argument of DTMlangsetup* as shown in the following example in order to get the abbreviated week day and month names. Alternatively, the german module for the datetime2 package, also offers de-DE, de-AT and de-CH for the corresponding regional variants.

documentclass[%
letterpaper,%
ngerman,%
5pt,%
]{article}
usepackage{babel} 
usepackage[%
useregional,
showdow
]{datetime2}

DTMlangsetup*[german]{abbr}
begin{document}
DTMlangsetup*{showyear=false}
DTMdate{2020-11-18}
end{document}

enter image description here


Background:

From the datetime2 documentation:

enter image description here

Correct answer by leandriis on January 9, 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