Hans Hagen schrieb am 27.01.2021 um 22:31:
On 1/27/2021 6:28 PM, Peter Münster wrote:
On Sun, Jan 10 2021, Peter Münster wrote:
\currentdate% same as \date, but I would expect the day of today...
Should I fill a bug-report on the tracker?
Perhaps also for the missing space after \date[]?
Reporting here is faster. Can (lazy me) Wolfgang confirm the issue?
1. Wrong date
The \date command has wrong/weird grouping which makes global changes
for the day, month and year.
\permanent\tolerant\protected\def\date[#1]#*[#2]%
{\dontleavehmode
\ifparameter#1\or
\begingroup
\letdummyparameter\c!d\normalday
\letdummyparameter\c!m\normalmonth
\letdummyparameter\c!y\normalyear
\getdummyparameters[#1]%
\normalexpanded
{\endgroup
\normalday \number\directdummyparameter\c!d\relax
\normalmonth\number\directdummyparameter\c!m\relax
\normalyear \number\directdummyparameter\c!y\relax}%
\fi
...}
2. Missing space
When not all optional arguments are used the space after the last given
argument is gobbled. This was normal behavior for a long time until you
changed the code in MkIV to keep them.
\tolerant\def\foo[#1]#*[#2]%
{[#1][#2]}
\starttext
a \foo [1] b
a \foo [1] [2] b
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________