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
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 \appendto
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) : token call