From: "Meer H. van der" <H.vanderMeer@uva.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: date problem
Date: Wed, 20 Mar 2013 14:52:40 +0100 [thread overview]
Message-ID: <12DBBD2C-ABF6-4DA6-A5BE-42624E20FDC2@uva.nl> (raw)
In-Reply-To: <4451C3C4-3D71-45E0-A57D-4C2E0F14E45D@gmail.com>
One step further, thanks.
But why does
\edef\thedate{\rawdate[]}\writestatus{***}{\meaning\thedate}
result in
** > macro:->unknown march 2013
instead of 20 march 2013?
Hans van der Meer
On 20 mrt. 2013, at 14:39, Wolfgang Schuster <schuster.wolfgang@gmail.com>
wrote:
>
> Am 20.03.2013 um 14:26 schrieb H. van der Meer <H.vanderMeer@uva.nl>:
>
>> There is a nasty problem when defining the \date.
>>
>> First approach:
>> *** > macro:->\date
>> \def\thedate{\date}\writestatus{***}{\meaning\thedate}
>> Alas, I get lateron a luatex error on \date:
>> ! LuaTeX error [string "\directlua "]:1: invalid escape sequence near '\d'.
>>
>> Second approach, use \edef to get an expanded value.
>> \edef\thedate{\date}\writestatus{***}{\meaning\thedate}
>> *** > macro:->\date
>> Alas, the date is still the unexpanded macro and not something like 20 march 2013.
>>
>> How to?
>
> All commands with optional argument aren’t expandable and \date *has* two optional argument.
>
> To get now the date in the output you can either use the expandable \rawdate[] command (the brackets are necessary) or you use \ctxcommand{currentdate(<specification>,<language>)} (language can also be "false").
>
> 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://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2013-03-20 13:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 13:26 H. van der Meer
2013-03-20 13:39 ` Wolfgang Schuster
2013-03-20 13:52 ` Meer H. van der [this message]
2013-03-20 14:11 ` Wolfgang Schuster
2013-03-20 14:29 ` Meer H. van der
2013-03-20 14:50 ` Wolfgang Schuster
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=12DBBD2C-ABF6-4DA6-A5BE-42624E20FDC2@uva.nl \
--to=h.vandermeer@uva.nl \
--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).