Am 04.02.2026 um 15:29 schrieb Pablo Rodriguez via ntg-context:
On 2/4/26 05:27, Wolfgang Schuster wrote:
Am 03.02.2026 um 19:50 schrieb Pablo Rodriguez via ntg-context:
[...]
Could anyone confirm the issue? I really don’t know what I may be missing.

1. You don't mention what error you get.

Many thanks for your reply, Wolfgang.

Of course, this was my fault. I may experience issues on Windows (at
work), but I can only report them on Linux (at home).

I didn’t copy the minimal sample I had on Windows, but I realized what
was wrong with it:

   \definefontfamily[mainface][tt][TeX Gyre Cursor][rscale=.25]

The missing zero is mandatory in this case (and it didn’t go in the
sample I created at home).

Since ommiting the zero is allowed in other (at least for dimensions), I
wonder whether it would make sense to allow the missing zero in rscale.

You don't need the leading zero when a decimal value is used as factor for a dimsneion, e.g. .2\texwidth.

In this case it does matter because the rscale value is passed to the font loader as number with the \number command. When you pass a number to \number, the command expects a integer value and decimal values (e.g. 0.25) aren't the correct argument but when you add a leading zero you're lucky, because you 0 as value and the decimal value is just kept as additional content.

\starttext

\number\plusone % works

\number 0.25 % works because \number sees 0

\number .25 % fails because \number sees .

\starttext

A way to fix this is a complexer value checker which uses \ifchknumber to check if the argument start with a number, otherwise no interpretation happens.

\def\CheckedNumber#1%
  {\ifchknumber#1\or
     \tointeger\lastchknumber
   \else
     #1%
   \fi}

\CheckedNumber\plusone

\CheckedNumber{0.25}

\CheckedNumber{.25}

\stoptext

Wolfgang

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

maillist : [email protected] / 
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 via email to