[NTG-context] $\sin \theta$ behave differently in metafun
śrīrāma
citturs at gmail.com
Sat Apr 16 06:56:54 CEST 2022
On 4/16/22 4:34 AM Jeong Dal via ntg-context wrote:
> I use $\sin \theta$ and $\cos \theta$ behave differently in text and in
metafun.
> It works well sometime before but it doesn’t in metafun now.
> What is wrong in my example?
>
> Thank you for reading.
> Best regards,
>
> Dalyoung
>
> Here is a MWE.
>
> \startbuffer[pointCircle]
> numeric u; u:=1cm;
> pair A,B,C;
> draw fullcircle scaled 4u;
> A := dir(25)*2u;
> label.top(textext("$P=(\cos\theta, \sin\theta)$"), A);
> B := dir(-25)*2u;
> label.bot(textext("$Q=(\cos(-\theta), \sin(-\theta))$"), B);
> C := (xpart A, 0); label.lrt(textext("$A$"), C);
> label(textext("$O$"), origin);
> \stopbuffer
> \starttext
> I'd like use $\sin$ and $\cos$ in the metafun. But it shows strange text
instead
> of $\sin$ and $\cos$.
>
> \processMPbuffer[pointCircle]
>
> \stoptext
Hi Hans and Mikael (and others on the list),
I can confirm that even with the newest LMTX [2022.04.15 20:20] the above might
actually be a bug. mfunctions inside MP strings are not properly rendred. A
tiny MWE:
\starttext
\startMPcode
draw textext("\m{\max_i x_i}");
\stopMPcode
\stoptext
Could trace it down to '\math_function_handle_label' [math-ini] but not sure
what MP is doing. Also looked into mp-mlib, mlib-pps but could not figure it
out. I request you to kindly look into it.
Thanks,
Sreeram
More information about the ntg-context
mailing list