Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When using \today and \usepackage[norsk]{babel} (babel <v3.8l>) in December there is an extra space behind the month name. How do I get around this?

\documentclass{article}
\usepackage[norsk]{babel}
\begin{document}
\day12\month12\year2011
\today

12. desember 2011
\end{document}

12. desember 2011


Note 1

Javier Bezos writes that the issue is fixed in the forthcoming babel, version 3.9.

Note 2

Version 3.9 of babel was released March 2013.

share|improve this question

2 Answers 2

up vote 12 down vote accepted

The file norsk.dtx contains the following definition for \today:

\def\today{\number\day.~\ifcase\month\or
    januar\or februar\or mars\or april\or mai\or juni\or
    juli\or august\or september\or oktober\or november\or desember
    \fi
    \space\number\year}

and there's a spurious blank space generating the extra space; if you want to suppress the space, you need to add the following lines to the preamble of your document

\AtBeginDocument{\def\today{\number\day.~\ifcase\month\or
    januar\or februar\or mars\or april\or mai\or juni\or
    juli\or august\or september\or oktober\or november\or desember%
    \fi
    \space\number\year}}

I think this should be reported to the maintainer of the norsk module for babel.

share|improve this answer

It's a bit too late, but it's still worth adding this note.

When only Norsk is involved, redefining \today at begin document is fine. However, with two or more languages it's not correct: any command \selectlanguage{norsk} would resurrect the buggy definition.

The safest way to proceed is to say

\def\datenorsk{\def\today{\number\day.~\ifcase\month\or
    januar\or februar\or mars\or april\or mai\or juni\or
    juli\or august\or september\or oktober\or november\or desember\fi
    \space\number\year}}

because among the duties of \selectlanguage{norsk} is to issue \datenorsk. If this code is in the preamble, all will be well. When the norsk.ldf file will be corrected, the code will do no harm either.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.