From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: printing the current date
Date: Wed, 27 Jan 2021 23:48:30 +0100 [thread overview]
Message-ID: <f7378bd1-c018-195c-478a-db5b67e62981@gmail.com> (raw)
In-Reply-To: <92ded4ac-8ebc-f388-3594-86fbf4567a8c@xs4all.nl>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2021-01-27 22:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-10 18:23 Peter Münster
2021-01-10 18:25 ` Fabrice L
2021-01-10 19:26 ` Peter Münster
2021-01-27 17:28 ` Peter Münster
2021-01-27 21:31 ` Hans Hagen
2021-01-27 22:48 ` Wolfgang Schuster [this message]
2021-03-12 23:10 ` missing space after \date[] (was: printing the current date) Peter Münster
2021-03-13 9:08 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7378bd1-c018-195c-478a-db5b67e62981@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).