Latest news 2021-09-06: new blog post "Legacy Documents and TeX Live Docker Images".

Bug Tracker

ID 122🔗
Date: 2017-02-23 06:37:27
Status Closed (Fixed)
Category datetime2
Version 1.5.2
Summary spurious spaces in \DTMsetregional

Sign in to subscribe to notifications about this report.

Description

Hi,

I'm using the \DTMsetregional macro in a document to switch between numerical and text form (in French). However, each time this macro is used, two spaces are inserted. One come from the \DTMsetregional macro itself, the other from the \datefrench macro (called from \DTMsetregional in my setup).

The following patches fix the two issues:

diff --git a/datetime2.dtx b/datetime2.dtx
index 569cd0b..cbf063f 100644
--- a/datetime2.dtx
+++ b/datetime2.dtx
@@ -7374,7 +7374,7 @@
   {%
     \ifcsdef{date\languagename}
     {%
-      \csuse{date\languagename}
+      \csuse{date\languagename}%
     }%
     {%
 %    \end{macrocode}
diff --git a/datetime2-french.dtx b/datetime2-french.dtx
index 96f0075..6dd2804 100644
--- a/datetime2-french.dtx
+++ b/datetime2-french.dtx
@@ -726,7 +726,7 @@
     \DTMifcaseregional
     {}% do nothing
     {\DTMsetstyle{french}}%
-    {\DTMsetstyle{french-numeric}}
+    {\DTMsetstyle{french-numeric}}%
   }%
 }%
 %    \end{macrocode}
And here is a minimal doc to test:
\documentclass[french]{article}

\usepackage{babel}
\usepackage{datetime2}

\begin{document}

a\DTMsetregional[text]b\DTMdate{2016-12-12}c

\end{document}
The 'a' and 'b' letter should be nearby. Without the patches, two spaces are inserted.

Regards,
Vincent

MWE

Download (155B)

\documentclass[french]{article}

\usepackage{babel}
\usepackage{datetime2}

\begin{document}

a\DTMsetregional[text]b\DTMdate{2016-12-12}c

\end{document}

Evaluation

The spurious space in \DTMsetregional has now been fixed in v1.5.6 (2020-03-02), so this I'm closing this bug report as fixed. The other issue isn't a bug in datetime2 but is a bug in a separately maintained regional module and so isn't covered by this bug tracker.

The problem with datetime2-french.ldf needs to be fixed by the maintainer of the datetime2-french. I have sent a notification to all maintainers of the regional datetime2 modules about the spurious space problem.

Comments

0 comments.


Add Comment

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=122