[NTG-context] \setupmathematics with stylealternative not working

Mikael P. Sundqvist mickep at gmail.com
Sun Feb 24 10:23:09 CET 2019


On Sat, Feb 23, 2019 at 8:17 AM Mikael P. Sundqvist <mickep at gmail.com> wrote:
>
> On Fri, Feb 22, 2019 at 7:25 PM Hans Hagen <j.hagen at xs4all.nl> wrote:
> >
> > On 2/22/2019 9:24 AM, Henri Menke wrote:
> > > I can confirm.  My workaround which predates the stylealternative
> > > mechanism also stopped working, so there must be an issue on the level
> > > of font feature selection.
> > >
> > > \definefontfeature [math-text]         [math-text]         [ss04=yes]
> > > \definefontfeature [math-script]       [math-script]       [ss04=yes]
> > > \definefontfeature [math-scriptscript] [math-scriptscript] [ss04=yes]
> > > \setupbodyfont[lucidaot]
> > > \starttext
> > > \startTEXpage[offset=3bp]
> > > $\mathcal A$
> > > \stopTEXpage
> > > \stoptext
> > that is a nasty one ... in font-fil.mkvi : we cannot use an edef as that
> > makes features get lost
> >
> > \def\font_basics_get_font_parameter_nop#key=#value,%
> >    {\if]#key%
> >       \font_basics_get_font_parameter_nop_finish
> >     \else
> >       \expandafter\normaldef\csname p_#key\endcsname{#value}%  % no edef
> > as we need to keep \mathsizesuffix
> >       \expandafter\font_basics_get_font_parameter_nop
> >     \fi}
> >
> > \def\font_basics_get_font_parameter_yes#key=#value,%
> >    {\if]#key%
> >       \font_basics_get_font_parameter_yes_finish
> >     \else
> >       \expandafter\normaldef\csname p_#key\endcsname{#value}%  % no edef
> > as we need to keep \mathsizesuffix
> >       \expandafter\font_basics_get_font_parameter_yes
> >     \fi}
> >
> > but even then, the official way to trigger such features is
> >
> > \setupmathematics[stylealternative=calligraphic]
> >
> >
>
> Works! Thanks! It is in the details... :)
>
> /Mikael

I just realized that there is still some problem with the stylealternative:

With the document

%% TEST 1
\setupbodyfont[lucidaot]
\setupmathematics[
stylealternative={calligraphic},
]
\starttext
$x+\mathcal A$
\stoptext
%%%

I get both the calligraphic AND the italic keys enabled, even though
the italic key should not be set. However, with the test file

%%% TEST 2
\setupbodyfont[lucidaot]
\setupmathematics[
stylealternative={italic},
]
\starttext
$x+\mathcal A$
\stoptext
%%%

I do not get any of them enabled. In particular the italic key is not
enabled, which I assume it should be.

/Mikael


More information about the ntg-context mailing list