* Issue with latest LMTX version 2020-05-25
@ 2020-05-26 9:29 Joseph
2020-05-26 9:56 ` Hans Hagen
2020-05-26 9:58 ` Hans Hagen
0 siblings, 2 replies; 3+ messages in thread
From: Joseph @ 2020-05-26 9:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/html, Size: 2761 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Issue with latest LMTX version 2020-05-25
2020-05-26 9:29 Issue with latest LMTX version 2020-05-25 Joseph
@ 2020-05-26 9:56 ` Hans Hagen
2020-05-26 9:58 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2020-05-26 9:56 UTC (permalink / raw)
To: mailing list for ConTeXt users, Joseph
On 5/26/2020 11:29 AM, Joseph wrote:
> Dear list,
>
> With following MWE :
>
> %%%
>
> \startluacode
>
> \stopluacode
>
> \appendtoks\ctxlua{userdata.font_switch(\fontid\font)}\to \everyfontswitch
>
> \setupbodyfont[mainfont, 9pt]
>
> \starttext
>
> Foo.
>
> \stoptext
>
> %%%
>
> I get following error (commenting out the \appendtoks line makes the
> error to disappear) :
I get nothing because you rmwe is really minimal in the sense that
font_switch is not defined.
Anyway, what you need to do it this:
\number\fontid\font
which will work in mkiv and lmtx or
\the\fontid\font
which also works in lmtx.
I changed a couple of these 'internal quantities' to behave like number
tokens which has some advantages (for instance, such a token doesn't
need to have a space or \relax as sentinel in situations where a
lookahead can spoil your game). There is a whole bunch of these
quantities and some were numbers and some serialized numbers and i just
made that consistent across the repertoire. It's anyway good practice to
put something \number in front when you wonder of what you get is a
number. Just consider it progress.
(there's also \setfontid so maybe you don't need the lua code at all)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Issue with latest LMTX version 2020-05-25
2020-05-26 9:29 Issue with latest LMTX version 2020-05-25 Joseph
2020-05-26 9:56 ` Hans Hagen
@ 2020-05-26 9:58 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2020-05-26 9:58 UTC (permalink / raw)
To: mailing list for ConTeXt users, Joseph
On 5/26/2020 11:29 AM, Joseph wrote:
> \appendtoks\ctxlua{userdata.font_switch(\fontid\font)}\to \everyfontswitch
btw, using font.current() is more natural at the lua end
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-26 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 9:29 Issue with latest LMTX version 2020-05-25 Joseph
2020-05-26 9:56 ` Hans Hagen
2020-05-26 9:58 ` Hans Hagen
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).