ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@bittext.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: mtxrun.lua:10080: bad argument #9 to 'format'
Date: Mon, 29 Jan 2024 12:08:02 +0100	[thread overview]
Message-ID: <00985A92-FA42-489B-97ED-03659A395C41@bittext.nl> (raw)
In-Reply-To: <b220d0f0-571b-4dae-832e-bc75a42faf98@klankschap.nl>

> On 29 Jan 2024, at 01:36, vm via ntg-context <ntg-context@ntg.nl> wrote:
> while also on linux platform:
> mtxrun --script font --list --spec --filter="fontname=ibm*"
> mtxrun --script font --list --spec --filter="fontname=ple*"
> give correct result (as in listing the available installed ibmplex fonts)
> mtxrun --script font --list --spec --filter="fontname=*"
> mtxrun --script font --list --spec --filter="fontname=p*"
> mtxrun --script font --list --spec --filter="fontname=pl*"
> lua error : function call: /home/vm/context/tex/texmf-linux-64/bin/mtxrun.lua:10080: bad argument #9 to 'format' (number expected, got string)
> apparently you need at least three characters in the the filter template.


I changed line 10066 in mtxrun.lua to



     templates[i]=“% "..w..”i"..between

and that fixed it.

The problem here is that the “big" results contain both ttc fonts (with subfont ids, which are numbers) and non-ttc fonts (with empty subfont ids, and those are strings).
This means the output template gets confused about whether it should use “%s” or “%i” as format string.

> $ mtxrun --script font --list --spec --filter="fontname=ple"
> table: 0x3bc80550ac0
> table: 0x3bc80550b00

This is what happens if there are no matches, apparently.

Best wishes,

Taco Hoekwater              E: taco@bittext.nl
genderfluid (all pronouns)

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-01-29 11:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28 21:13 [NTG-context] " Garulfo
2024-01-29  0:36 ` [NTG-context] " vm via ntg-context
2024-01-29 11:08   ` Taco Hoekwater [this message]
2024-01-29 12:07     ` Hans Hagen
2024-02-14 21:05       ` Garulfo
2024-02-14 22:03         ` Hans Hagen
2024-02-14 22:27           ` Mikael Sundqvist
2024-02-14 22:28             ` Mikael Sundqvist
2024-02-15  6:22           ` Garulfo

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00985A92-FA42-489B-97ED-03659A395C41@bittext.nl \
    --to=taco@bittext.nl \
    --cc=ntg-context@ntg.nl \


* 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).