Bug Tracker

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

Report

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

\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.

Add comment or return to search results.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

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

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

Click on the Preview button to preview the message.

Return to search results.