ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: self defined conversion in \date
Date: Thu, 30 May 2024 23:01:56 +0200	[thread overview]
Message-ID: <73d86bb6-2dab-6def-6193-01e6b6b176a1@gmail.com> (raw)
In-Reply-To: <87bk4ncxxq.fsf@a16n.net>

Peter Münster schrieb am 30.05.2024 um 13:59:
> Hi,
> 
> It seems, that you cannot use self defined conversions in \date:
> 
> \defineconversion[mytest][X-\romannumerals]
> \starttext
> Self defined conversion: \convertnumber{mytest}{1} (OK)\\
> Predefined conversion in date: \date[d=1][day:a] (OK)\\
> Self defined conversion in date: \date[d=1][day:mytest] (not OK)
> \stoptext
> 
> Is this a bug, or a feature?
> 
> How could one use self defined conversions in \date please?

The \date mechanism can only use conversions which are defined on the 
Lua side but your custom conversion is only available on the TeX side.
You can however set the "X-" prefix as normal string in the output of 
\date and use a predefined conversion.

\starttext

\date[d=1][X-,day:r]

\date[d=1][X-,day:romannumerals]

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-05-30 21:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 11:59 [NTG-context] " Peter Münster
2024-05-30 21:01 ` Wolfgang Schuster [this message]
2024-05-30 21:22   ` [NTG-context] " Peter Münster
2024-05-30 21:33     ` 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=73d86bb6-2dab-6def-6193-01e6b6b176a1@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).