[Scilab-users] Sprintf and Italic font.
Samuel Gougeon
sgougeon at free.fr
Mon Mar 18 23:37:17 CET 2019
Hello,
Le 18/03/2019 à 01:56, Marcus Vinicius Pereira de Souza a écrit :
> Dear all,
> Kindly, I am generating a graphic and would like some information in
> the title to be in italics. Can someone help me? By way of
> illustration, see the script below:
> .../...
>
> title(sprintf('y(t) = -%0.2f exp(-0.5t)\ + %0.2f cos(4t)\ + %0.2f
> sin(4t) ',kp1,kp1,kp2))
> y(t) --> italic font
> exp --> italic font
> cos --> italic font
> sin --> italic font.
As recommended by Christophe, you may try for instance
tit = "$y(t)\mathsf{ = -%0.2f \mathit{exp}(-0.5t)\ + %0.2f
\mathit{cos}(4t)\ + %0.2f \mathit{sin}(4t)}$";
title(msprintf(tit, kp1,kp1, kp2))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190318/a12b134e/attachment.htm>
More information about the users
mailing list