German date notation in paragraphs

According to the DIN ISO 8601 a German date needs to be formated without a linebreak between in it. So LaTeX have to break before or after the date. Instead sometimes a date exceeds the linewidth.

See the MWE:

\documentclass{article}
\usepackage{lipsum}
\usepackage[ngerman]{isodate}
\numdate
\overfullrule=3pt

\begin{document}
\lipsum[2]
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh \printdate{16.09.2014} abcdefg hijklmnop
\end{document}

How to handle this issue, that the date isn't exceeding?

• You can rephrase the sentence and use the date at the beginning ... – Mensch Sep 16 '14 at 16:14
• Yes I could. But not when I have to adopt the phrases from somebody else. – Rafael Wörner Sep 16 '14 at 16:22

If you write a whole line with only two words, what should TeX do?

Solution for daily usage: \usepackage{microtype}.

• This was just a MWE. For sure: the real document is normal native language with more than 2 words. Thanks, I'll take a look on the package – Rafael Wörner Sep 16 '14 at 16:19

I suggest that you enclose the offending paragraph in a sloppyparenvironment, i.e.

\documentclass{scrartcl}
\usepackage{lipsum}
\usepackage[ngerman]{isodate}
\numdate
\overfullrule=3pt

\begin{document}
\lipsum[2]
\begin{sloppypar}
abcdefghijklmnop qrstuvwxyzabcdefg hijklmnopqrstuvwxyzabcdefgh \printdate{16.09.2014} abcdefg hijklmnop
\end{sloppypar}
\end{document}

Of course, in your example, you will have an awfull linebreaking due to lack of possible breakpoint in the example. In real text, where the lines are compose of several words, and using microtype, that will normally not be a big problem, but be prepared to edit the text (if you are authorised) to avoid such consequences.

I suggest you start using microtypeand in the absolutely last touch up of the document (the final, final final version), you use sloppypar only if nothing else you are allowed to do, works.

• I tried your given MWE and also adopted the sentence to native language (so more than 2 words). Actually doesn't change anything. – Rafael Wörner Sep 16 '14 at 16:54
• @RafaelWörner I misunderstood your question. See my revised answer. – Sveinung Sep 16 '14 at 17:14