Ah, thank you, Wolfgang,

I tried {, } and not {, },. The result is that the rest vanishes.


Thomas


Am 03.10.24 um 11:27 schrieb Wolfgang Schuster:
Thomas Meyer schrieb am 03.10.2024 um 10:59:
Thank you very much, Wolfgang,

that helps me a lot.
But how can I change the formatting
{“weekday,space,day,space,month,space,year”}
so that I get a comma after weekday and a period after day? Where can I find something about this?

Aside from keywords like day, weekday etc. the \date (and \currentdate) commands allows free input which used as separator between these keywords. To set a period as separator just put . as entry in the list but ensure to use braces around , because it will otherwise be interpreted as list separator.

When you use TeX command within Lua use double backslashes (\\) because a backslash has special meaning here and with \\ you tell Lua to put a single \ in the output.

%%%% begin example
\starttext

\currentdate[weekday,{, },day,. ,month,space,year]
%\currentdate[weekday,{, },day,.\ ,month,space,year]

\currentdate[weekday,\textcomma\ ,day,\textperiod\ ,month,space,year]

\startluacode
context.currentdate{ "weekday,{, },day,. ,month,space,year" }
\stopluacode

\startluacode
context.currentdate{ "weekday,\\textcomma\\ ,day,\\textperiod\\ ,month,space,year" }
\stopluacode

\stoptext
%%%% end example

Wolfgang