[Scilab-Dev] Issue with unicode exponents

Samuel Gougeon sgougeon at free.fr
Fri Dec 6 11:32:31 CET 2019


Le 29/11/2019 à 12:10, Stéphane Mottelet a écrit :
>
> Hello,
>
> Altough I am the author or this patch, I find this may be a bit too 
> early to make the hypothesis that Scilab would be systematically 
> launched in an environment that allows Unicode chars.
>
This hypothesis is not needed to go on with Unicode in terminal modes 
and improve things about this. On windows,  including the code page 
setting in the Scilab binary as proposed by Antoine is a first 
interesting and required step.

> This could be, at least, a rendering option (BTW we need an unified 
> way of customizing display in the preferences tab).
>

Allowing and even using an UTF-8 font in Scilab NW and NWNI modes should 
not be an option. It should be the default.


> However, using a one line display seems an improvement to me, it 
> allows a much better rendering of polynomials and rationals (see 
> https://codereview.scilab.org/#/c/21142/).
>
Because exponents are really too small, and because the console can't be 
zoomed interactively with a shortkey and the mouse wheel, in term of 
readability, the current status is clearly the best:

--> (1-%z).^(0:4)
  ans  =
                       2            2   3            2 3   4
    1   1 -z   1 -2z +z    1 -3z +3z  -z    1 -4z +6z -4z  +z

In term of compacity, indeed using Unicode exponents is a good idea. 
Unfortunately, with some fonts like Consolas, all exponents are so small 
wrt to the base font size that i use to use that some of them  become 
hardly distinguishable.

--> (1-%z).^(0:4)
  ans  =
    1   1 -z   1 -2z +z²   1 -3z +3z² -z³   1 -4z +6z² -4z³ +z⁴

But this can be worked around by increasing the font size (from 
Monospaced 14 to 16, for me).


> Maybe a intermediary step would be to use a hat notation, e.g.
>
> --> p=(1+%i+%s)^7
>
> p = 8-8i -56is -(84+84i)s^2 -140s^3 -(70-70i)s^4 +42is^5 +(7+7i)s^6 +s^7
>

Definitively not. It turns crowdy. Keeping the current 2-line display 
would be better, even if it's less compact vertically.

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20191206/e76e377c/attachment.htm>


More information about the dev mailing list